HRNet / Lite-HRNet

This is an official pytorch implementation of Lite-HRNet: A Lightweight High-Resolution Network.
Apache License 2.0
838 stars 127 forks source link

cannot import name 'Config' from 'mmcv' #82

Open Ergou-Liu opened 1 year ago

Ergou-Liu commented 1 year ago

Lite-HRNet$ python ./tools/train.py Traceback (most recent call last): File "./tools/train.py", line 9, in from mmcv import Config, DictAction ImportError: cannot import name 'Config' from 'mmcv' (/home/name/anaconda3/envs/lite-hrnet/lib/python3.8/site-packages/mmcv/init.py)

haowei2020 commented 1 year ago

Lite-HRNet$ python ./tools/train.py Traceback (most recent call last): File "./tools/train.py", line 9, in from mmcv import Config, DictAction ImportError: cannot import name 'Config' from 'mmcv' (/home/name/anaconda3/envs/lite-hrnet/lib/python3.8/site-packages/mmcv/init.py)

貌似新的mmcv没有Config这个类的定义,挪到了mmengin,你可以装个低版本的mmcv,比如1.6的

Tony-958 commented 11 months ago

1.6 的没有 mmcv.transforms 这个吖。你们用的哪个 mmcv 呢