ElectroNath / -Training-an-Object-Detection-Model-with-TensorFlow-API-using-Google-COLAB

Follow my medium post for the tutorial. https://medium.com/analytics-vidhya/training-an-object-detection-model-with-tensorflow-api-using-google-colab-4f9a688d5e8b
15 stars 22 forks source link

ModuleNotFoundError: No module named 'nets' #3

Open kajal-99 opened 4 years ago

kajal-99 commented 4 years ago

Traceback (most recent call last): File "model_builder_test.py", line 21, in from object_detection.builders import model_builder File "/content/gdrive/My Drive/models/research/object_detection/builders/model_builder.py", line 59, in from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res File "/content/gdrive/My Drive/models/research/object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor.py", line 30, in from nets import inception_resnet_v2 ModuleNotFoundError: No module named 'nets'

please help me to do this

AdityaR-Bits commented 3 years ago

nets will be located in your "slim" folder which is in the "research" folder before "object_detection"

mnatsirm commented 3 years ago

you need to export pythonpath. you can do this in colab with

import os
work_env_path = ':/content/gdrive/My Drive/models/:/content/gdrive/My Drive/models/research/:/content/gdrive/My Drive/models/research/slim'
os.environ['PYTHONPATH'] += work_env_path