Search code examples
tensorflowgoogle-colaboratoryobject-detection-api

How can I install the tensorflow object detection API on Google colab?


I tried running tensorflow object detection API on Colab according to Inline Link

I got such an error at the first Install required packages. How can I solve it?

Background : Python2 , GPU

/root
fatal: destination path 'models' already exists and is not an empty directory.
/root/models/research
Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 23, in <module>
    from object_detection.builders import model_builder
ImportError: No module named object_detection.builders

Solution

  • I'm not clear about from which directory you are executing the command. if you executing it from content directory then go to model and then to research directory.

    %cd ~/models/research
    !python object_detection/builders/model_builder_test.py
    

    If you don't have model directory clone it by using

    !git clone --quiet https://github.com/tensorflow/models.git