Dmitry.AI

How did I run the official Object Detection API tutorial (`object_detection_tutorial.ipynb`) for TensorFlow in Windows 7?

object-detection
windows
tensorflow-usage
tensorflow
tensorflow-object-detection
(Dmitry Fedyuk) #1

Step 1

How did I install TensorFlow 1.13.1 to Windows 7?

Step 2

I have cloned the tensorflow-models repository (models and examples built with TensorFlow):

git clone https://github.com/tensorflow/models.git

Step 3

I have installed some dependencies:

pip install pillow
pip install lxml
pip install jupyter
pip install matplotlib

Step 4

I have installed COCO (a large image dataset designed for object detection, segmentation, person keypoints detection, stuff segmentation, and caption generation):

git clone https://github.com/cocodataset/cocoapi.git
mv cocoapi/PythonAPI/pycocotools tensorflow/models/research

Step 5

I have installed Protobuf 3.7.1 (the latest version, the protoc-3.7.1-win64.zip file).

Step 6

I have run Protobuf via Git BASH:

cd tensorflow/models/research
C:/work/clients/tensorflow/protoc-3.7.1-win64/bin/protoc.exe object_detection/protos/*.proto --python_out=.

A *.py file will be generated for each *.proto file:
02

Step 7

I have installed Anaconda (a data science platform): Anaconda3-2019.03-Windows-x86_64.exe

Step 8

I have created the PYTHONPATH environment variable and set the following value to it:

C:\work\clients\tensorflow\models\research;C:\work\clients\tensorflow\models\research\slim;C:\work\clients\tensorflow\models\research\object_detection;C:\tools\anaconda;C:\tools\anaconda\Scripts;C:\tools\anaconda\Library\bin

Step 9

Then I have run the object_detection_tutorial.ipynb demo:

cd models/research/object_detection
jupyter-notebook object_detection_tutorial.ipynb

03

Step 10

On the previous step, Jupyter Notebook provided me an URL:

http://localhost:8888/?token=936871153637a4969d857eeab082564257a64d6872729bc3

I have pasted it to my browser:
01

Step 11

I have scrolled the filesystem list down, found the object_detection_tutorial.ipynb file and clicked it:
02

Step 12

Jupyter Notebook showed me the screen:
05

Step 13

I have commented out the following coce block:

Step 14

I have replaced the image1.jpg and image2.jpg files in the research/object_detection/test_images folder with my own test images (with the same names).

Step 15

I have chosen the «Cell» → «Run All» menu item:
06

01

How did I install TensorFlow 1.13.1 to Windows 7?