PaddleVideo icon indicating copy to clipboard operation
PaddleVideo copied to clipboard

BMN的inference模型无法导出

Open GeLee-Q opened this issue 5 years ago • 3 comments

使用环境 :百度 AI studio Notebook 问题:按照PaddleVideo/docs/zh-CN/start.md文档中 2.模型推理 的方法来导出 报错 python tools/export_model.py
-c ./PaddleVideo/configs/localization/bmn.yaml
-p .PaddleVideo/BMN.pdparams
-o ./inference

/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/utils.py:26: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations def convert_to_list(value, n, name, dtype=np.int): Building model(BMN)... Traceback (most recent call last): File "PaddleVideo/tools/export_model.py", line 106, in main() File "PaddleVideo/tools/export_model.py", line 79, in main model = build_model(cfg) File "/home/aistudio/PaddleVideo/paddlevideo/modeling/builder.py", line 50, in build_model return build_localizer(cfg) File "/home/aistudio/PaddleVideo/paddlevideo/modeling/builder.py", line 41, in build_localizer return build(cfg, LOCALIZERS, key='framework') File "/home/aistudio/PaddleVideo/paddlevideo/utils/build_utils.py", line 35, in build return obj_cls(**cfg_copy) File "/home/aistudio/PaddleVideo/paddlevideo/modeling/framework/localizers/base.py", line 30, in init self.backbone = builder.build_backbone(backbone) File "/home/aistudio/PaddleVideo/paddlevideo/modeling/builder.py", line 21, in build_backbone return build(cfg, BACKBONES) File "/home/aistudio/PaddleVideo/paddlevideo/utils/build_utils.py", line 35, in build return obj_cls(**cfg_copy) TypeError: init() got an unexpected keyword argument 'pretrained'

  • 在BMN的md文件中并没有看到可以将其应用于单个视频的方法,请问该如何操作呢?
  • 还是说BMN模型暂时无法导出并且使用predict.py进行预测?

GeLee-Q avatar Feb 02 '21 19:02 GeLee-Q

是的,BMN的inference尚未支持,我们也正在看~

huangjun12 avatar Feb 03 '21 06:02 huangjun12

是的,BMN的inference尚未支持,我们也正在看~

您好,BMN的inference 预计什么时间可以支持呀?

JianxinYuan avatar Apr 16 '21 07:04 JianxinYuan

BMN inference已支持。 pr参考: #141 用法参考文档: https://github.com/PaddlePaddle/PaddleVideo/blob/develop/docs/zh-CN/model_zoo/localization/bmn.md#模型推理

huangjun12 avatar May 14 '21 08:05 huangjun12