0
votes

import os

from object_detection.utils import label_map_util

from object_detection.utils import visualization_utils as viz_utils

from object_detection.builders import model_builder

ERROR

ModuleNotFoundError Traceback (most recent call last) in

2 from object_detection.utils import label_map_util

3 from object_detection.utils import visualization_utils as viz_utils

----> 4 from object_detection.builders import model_builder

~\AppData\Roaming\Python\Python37\site-packages\object_detection\builders\model_builder.py in

 33 from object_detection.meta_architectures import rfcn_meta_arch

 34 from object_detection.meta_architectures import ssd_meta_arch

---> 35 from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res

 36 from object_detection.models import faster_rcnn_inception_v2_feature_extractor as frcnn_inc_v2

 37 from object_detection.models import faster_rcnn_nas_feature_extractor as frcnn_nas

~\AppData\Roaming\Python\Python37\site-packages\object_detection\models\faster_rcnn_inception_resnet_v2_feature_extractor.py in

 26 
 27 from object_detection.meta_architectures import faster_rcnn_meta_arch

---> 28 from nets import inception_resnet_v2

 29 

 30 slim = tf.contrib.slim

ModuleNotFoundError: No module named 'nets'

1

1 Answers

0
votes

In the models/research directory, run the following commands

protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python -m pip install .

Then finally test the installation by running python object_detection/builders/model_builder_tf2_test.py

If you are using Tensorflow version 1.X, just replace tf2 with tf1 in the installation and testing commands
Source