我正在尝试使用对象检测api训练自定义对象检测模块。我已将所有内容放在一起并尝试使用“Google Colab”训练模块。当我尝试训练模块时,会出现此错误。
Traceback (most recent call last):
File "train.py", line 49, in <module>
from object_detection import trainer
File "/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/trainer.py", line 33, in <module>
from deployment import model_deploy
ModuleNotFoundError: No module named 'deployment'
我还执行相当于export PYTHONPATH=$PYTHONPATH:
pwd :
pwd /slim
import sys
sys.path.append('/content/models/research/slim/')
如何克服此错误?
答案 0 :(得分:0)
复制&#39;部署&#39;文件夹在&#39; slim&#39;。然后将其粘贴到网站包&#39;你的python环境的文件夹 希望这有帮助!
答案 1 :(得分:0)
对于Google Colab,
import os
os.environ['PYTHONPATH'] += ':/models/research/:/models/research/slim/'
这个作品..