Last active
August 15, 2020 00:28
-
-
Save Namburger/67c3bcffb262ec311f79663117921ea5 to your computer and use it in GitHub Desktop.
Install object detection API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import tensorflow 1.x and install tf_slim. | |
%tensorflow_version 1.x | |
!pip install tf_slim | |
!pip show tensorflow | |
# Install protobuf-compiler and the tensorflow's Object Detection API. | |
!apt-get install protobuf-compiler | |
!git clone https://github.com/tensorflow/models.git | |
%cd models/research | |
# Compile all the protobuf dependencies. | |
!protoc object_detection/protos/*.proto --python_out=. | |
# Set up and install the object detection API. | |
!cp object_detection/packages/tf1/setup.py . | |
!python -m pip install . | |
# Run a test to make sure setup is correct. | |
!python object_detection/builders/model_builder_test.py | |
import os | |
os.environ['PYTHONPATH'] += ':/content/models/research/' | |
os.environ['PYTHONPATH'] += ':/content/models/research/slim/' | |
os.environ['PYTHONPATH'] += ':/content/models/research/object_detection/utils/' | |
os.environ['PYTHONPATH'] += ':/content/models/research/object_detection' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment