我已经按照本教程来训练我的自定义对象,但是在“训练模型”步骤中,通过执行以下命令:
python train.py --logtostderr --train_dir = training / --pipeline_config_path = training / ssd_inception_v2_coco.config
我得到这个结果:
(tensorflow_cpu) C:\Users\sid\Documents\Tensorflow\models\research\object_detection\legacy>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_inception_v2_coco.config
Traceback (most recent call last):
File "train.py", line 51, in <module>
from object_detection.builders import model_builder
File "C:\Users\sid\Anaconda3\envs\tensorflow_cpu\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\builders\model_builder.py", line 35, in <module>
from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res
File "C:\Users\sid\Anaconda3\envs\tensorflow_cpu\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\models\faster_rcnn_inception_resnet_v2_feature_extractor.py", line 29, in <module>
from nets import inception_resnet_v2
ModuleNotFoundError: No module named 'nets'
答案 0 :(得分:0)
您可能需要安装软件包“网络” 。
在Linux中,这意味着将其输入终端:
pip install nets
当然,您需要在python脚本中添加一个导入行:
import nets