Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run demo. #94

Open
fengjingchehu opened this issue Mar 15, 2024 · 2 comments
Open

Failed to run demo. #94

fengjingchehu opened this issue Mar 15, 2024 · 2 comments

Comments

@fengjingchehu
Copy link

fengjingchehu commented Mar 15, 2024

i got torch version 1.13.0+cu116,
mmaction2 0.15.0
mmcv 2.1.0
mmdet 3.3.0

i always meet this error with anyother version:
user@user-Super-Server:/mnt/745425dc-5d5b-4490-9d38-57169dcb2ab3/wxl/Video-Swin-Transformer-master$ python demo/demo_spatiotemporal_det.py --video input/test1.mp4 --config configs/detection/ava/slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb.py --checkpoint https://download.openmmlab.com/mmaction/detection/ava/slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb/slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb_20201217-16378594.pth --det-config demo/faster_rcnn_r50_fpn_2x_coco.py --det-checkpoint http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_2x_coco/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth --det-score-thr 0.9 --action-score-thr 0.5 --label-map demo/label_map_ava.txt --predict-stepsize 8 --output-stepsize 4 --output-fps 6
Traceback (most recent call last):
File "demo/demo_spatiotemporal_det.py", line 11, in
from mmcv import DictAction
ImportError: cannot import name 'DictAction' from 'mmcv' (unknown location)

so I want to know which version I can successfully run.

@Tommy-shelby-github
Copy link

I have the same question. According to the update of mmcv version, some modules have been removed.https://mmcv.readthedocs.io/zh-cn/latest/get_started/api_reference.html#mmcv-parallel

@asatpathy314
Copy link

asatpathy314 commented Sep 25, 2024

The init.py file for the custom mmaction folder in the repo has a check for mmcv version:

mmcv_minimum_version = '1.3.1'
mmcv_maximum_version = '1.4.0'

mmcv_version = digit_version(mmcv.__version__)

assert (digit_version(mmcv_minimum_version) <= mmcv_version
        <= digit_version(mmcv_maximum_version)), \
    f'MMCV=={mmcv.__version__} is used but incompatible. ' \
    f'Please install mmcv>={mmcv_minimum_version}, <={mmcv_maximum_version}.'

Basically for the inference to work mmcv version should be between 1.3.1 and 1.4.0. Unfortunately due to the removal of digit_version(mmcv.__version__) from mmcv even this code itself doesn't work, but it can still point you in the right direction.

A good PR for this project might be the implementation of pinned dependencies, it seems like there's a lot of issues with dependency updates breaking repo code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants