0

I am trying to use the Tensorflow object detection API to create my own model, so I created a virtudal enviorement,installed tensorflow 2.16.1, and I am using python 3.12.3. I installed Slim as well, and I want execute the proto files using protoc. When I run the command python model_builder_tf2_test.py to verify the setup and configuration of the TensorFlow Object Detection API with TensorFlow, it always generates an error.

File "C:\Users\user\tfodV\Lib\site-packages\object_detection\models\faster_rcnn_pnas_feature_extractor.py", line 24, in from nets.nasnet import nasnet_utils ModuleNotFoundError: No module named 'nets.nasnet'

When I verified the existence of the package, it does exist, I also added from the the object_detection folder the research folder, Slim folder and the nets to environment variable to maybe solve the issues yet the same problem arose.

2
  • This is an issue that you can find relevant. I am not familiar with tenserflow but it seems that nasnet is a submodule of nets. Sot this can help: github.com/tensorflow/models/issues/729
    – Adam Basha
    Commented Jun 17, 2024 at 14:42
  • Hi @wiem , The error you are facing is that the tf object Detection API cannot locate slim’s model components. Try to directly import path check in model builder_tf2_test.py.open that file and ensure nasnet_utils imports correctly import sys ,sys.path.append(‘slim_folder_path’).the re-run the test command.
    – Sagar
    Commented Oct 31, 2024 at 11:29

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.