Open fengjingchehu opened 8 months ago
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
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.
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.