在集成 mmdetection 框架时遇到这样的问题。
ModuleNotFoundError: No module named 'mmdet.version'
mmdetection 框架搭建过程很容易忽略 编译过程
root@48ea75026556:/mmdetection# python sg-pcr-client/pcr_agant_new.py
Traceback (most recent call last):
File "sg-pcr-client/pcr_agant_new.py", line 9, in <module>
from pr_handler_new import PicRecHandler
File "/home/mmxsrt/sg-pcr-client/pr_handler_new.py", line 4, in <module>
from mmdet.apis import init_detector, inference_detector, show_result
File "/mmdetection/mmdet/__init__.py", line 1, in <module>
from .version import __version__, short_version
ModuleNotFoundError: No module named 'mmdet.version'
root@48ea75026556:/mmdetection#
其实在mmdetection-master中 有个docker目录
里面很清楚的描述了搭建过程。贴上dockerfile代码
1 ARG PYTORCH