open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
https://mmaction2.readthedocs.io
Apache License 2.0
4.28k stars 1.25k forks source link

input by using a TSN model error #2418

Open Ishihara-Masabumi opened 1 year ago

Ishihara-Masabumi commented 1 year ago

The doc issue

I run using TSN model according to https://github.com/open-mmlab/mmaction2/blob/main/demo/README.md, the following error occurred.

$ python demo/demo_inferencer.py demo/demo.mp4 \
>     --rec configs/recognition/tsn/tsn_r50_8xb32-1x1x8-100e_kinetics400-rgb.py \
>     --label-file tools/data/kinetics/label_map_k400.txt
Traceback (most recent call last):
  File "demo/demo_inferencer.py", line 70, in <module>
    main()
  File "demo/demo_inferencer.py", line 65, in main
    mmaction2 = MMAction2Inferencer(**init_args)
  File "/home/dl/openmmlab4/mmaction2/mmaction/apis/inferencers/mmaction2_inferencer.py", line 73, in __init__
    self.actionrecog_inferencer = ActionRecogInferencer(
  File "/home/dl/openmmlab4/mmaction2/mmaction/apis/inferencers/actionrecog_inferencer.py", line 74, in __init__
    super().__init__(
  File "/home/dl/miniconda3/envs/openmmlab4/lib/python3.8/site-packages/mmengine/infer/infer.py", line 156, in __init__
    cfg, _weights = self._load_model_from_metafile(model)
  File "/home/dl/miniconda3/envs/openmmlab4/lib/python3.8/site-packages/mmengine/infer/infer.py", line 387, in _load_model_from_metafile
    raise ValueError(f'Cannot find model: {model} in {self.scope}')
ValueError: Cannot find model: configs/recognition/tsn/tsn_r50_8xb32-1x1x8-100e_kinetics400-rgb.py in mmaction

Please let me know how to fix it.

Suggest a potential alternative/fix

No response

cir7 commented 1 year ago

thanks for your feedback. the bug is due to the outdated config file path in the document, you could solve it by replacing the path with a valid one, which is commonly similar to the original one. we will fix the issue in pr