0

I have found instructions on installations but despite setting sys path it gives me error saying No such file or directory: 'content/drive/MyDrive/TensorFlow/models/research' This is my entire code from cloning repository to setting path:

%cd /content/drive/My Drive/Tensorflow
!git clone https://github.com/tensorflow/models.git

!apt-get install protobuf-compiler python-lxml python-pil
!pip install Cython pandas tf-slim lvis

%cd /content/drive/My Drive/Tensorflow/models/research
!protoc object_detection/protos/*.proto --python_out=.

import os
import sys


os.environ['PYTHONPATH']+=":/content/drive/MyDrive/TensorFlow/models"

sys.path.append("/content/drive/MyDrive/TensorFlow/models/research")
sys.path.append('/content/drive/MyDrive/TensorFlow/models/research/slim')
print("done")

1 Answer 1

1

The best way to use the object detection API by installing all the required packages is by following the instructions given in the official repo here for version 2.x and here for Tensorflow version 1.x

Once you finish installing and successfully run all tests using the above links(s), you can use the documentation here to learn how to use it to train or test on your own dataset

Sign up to request clarification or add additional context in comments.

5 Comments

Everything worked fine. But just where do i have to copy this "!cp object_detection/packages/tf2/setup.py" since it should be like this "!cp source destination" so one of them is missing.
If you look closely, the command is cp object_detection/packages/tf2/setup.py .. There is a . after setup.py at the end. The . indicates the current directory. You should be executing these commands from the models/research directory as mentioned, and hence as a result, setup.py will be copied to the models/research directory
Thank you very much for your explanations. I have already solved the problem)
Please consider marking the answer as accepted by clicking the tick button if it solved your problem :)
Yeah for sure, I have already done that but since I have less than 10 reputation It will be considered after I am over 10 reputation)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.