raccoon_dataset
raccoon_dataset copied to clipboard
ModuleNotFoundError: No module named 'object_detection'
I am using Win10 and Spyder, I have tried to run : generate_tfrecord.py, Unfortunately,shows "ModuleNotFoundError: No module named 'object_detection'", I guess the problem is the path, how to set the path in spyder?
I'm hitting this hurdle too. Same environment.
not sure concerning windows, but on Ubuntu you have to deploy object detection module by running setup.py from the research folder, then set PYTHONPATH accordingly please check the tensorflow github for the correct run command configuration
on win10 go to ( \model master\models-master\research) open cmd in this path and type python setup.py install
it should work
I've managed to solve this problem in my system (win 10). The solution is not very straightforward but here :
- First u need to clone Tensorflow Object Detection API repository https://github.com/tensorflow/models.
- Follow the installation provided in https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md
- In the step 2, you are required to compile protobuf library, so download the protobuf compiler at https://github.com/google/protobuf/releases/latest (at the time of this writing (3.5.1), there's a bug in protoc which may or may not related to the Windows environment, my solution is use the protoc v 3.4.0)
- Append the PYTHONPATH environment variable with the directory of
<your cloned tensorflow object detection api>/research/and<your cloned tensorflow object detection api>/research/slim(dont forget to add the PYTHONPATH to Path if you haven't done so. - No more ModuleNotFoundError: No module named 'object_detection'
on win10 go to ( \model master\models-master\research) open cmd in this path and type
python setup.py installit should work
Thank you. It worked. (y)
please show me the path of win 10 go to ( \model master\models-master\research) im newbie
on win10 go to ( \model master\models-master\research) open cmd in this path and type
python setup.py installit should workThank you. It worked. (y)
Me too! Thanks
on win10 go to ( \model master\models-master\research) open cmd in this path and type
python setup.py installit should work
is that path is found in Tensorflow Object Detection API repository ???
Hi, you have to do the following commands to make it work for you :
protoc object_detection/protos/*.proto --python_out=.
Add the following to your ~/.bashrc :
export PYTHONPATH=$PYTHONPATH:<PATH_TO_TF>/TensorFlow/models/research/object_detection:<PATH_TO_TF>/TensorFlow/models/research:<PATH_TO_TF>/TensorFlow/models/research/slim
thank you its literally worked
pip install tensorflow-object-detection-api
Adding the full path to the object detection module solved the error in my case
import sys
sys.path.append(..../full_path_to_object_detection_module/)
pip install tensorflow-object-detection-api
it did work, thanks so much
Hi, I am getting the following errors.. when I run the main training program.. (tensorflow) C:\tensorflow\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config Traceback (most recent call last): File "train.py", line 54, in from object_detection.builders import model_builder File "C:\tensorflow\models\research\object_detection\builders\model_builder.py", line 20, in from object_detection.builders import anchor_generator_builder File "C:\tensorflow\models\research\object_detection\builders\anchor_generator_builder.py", line 23, in from object_detection.anchor_generators import flexible_grid_anchor_generator ModuleNotFoundError: No module named 'object_detection.anchor_generators'
i got this error while i was trying to run this code. and i have already installed tensorflow package from conda. what shuld i di to solve this error?
ModuleNotFoundError Traceback (most recent call last)
ModuleNotFoundError: No module named 'object_detection'