ImportError: cannot import name 'calculate_uncertainty' from 'mmdet.apis'.
chiran7 opened this issue · 3 comments
File "tools/train.py, line 19, in
from mmdet.apis import single_gpu_test, calculate_uncertainty
ImportError: cannot import name 'calculate_uncertainty' from 'mmdet.apis'.
Definition of import 'calculate_uncertainty' is not available inside mmdet.apis. Can you suggest a way to inlcude the definition for this function required by train.py?
thank you for your time and consideration.
Have you followed the step 5 in Section Environment Installation, especially the compilation?
Dear Author,
Thank you. It is showing the following error (while trying for RetinaNet) for python tools/train.py configs/MIAOD.py
File "/home/cshah/.local/lib/python3.8/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
KeyError: "RetinaNet: 'MIAODRetinaHead is not in the models registry'"
For using SSD detection, i tried python tools/train.py configs/MIAOD_SSD.py. However, it gives following error:
File "/home/cshah/.local/lib/python3.8/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
TypeError: SingleStageDetector: SSDHead: init() got an unexpected keyword argument 'C'
I have installed both mmcv and mmdetection. Can you suggest a better solution for RetinaNet or SSD to train the network?
Thank you for your time and consideration.
Please follow the step 5 in Section Environment Installation. It includes THE COMPILATION PART.