-
Notifications
You must be signed in to change notification settings - Fork 2
/
Setting up Object Detection.txt
28 lines (15 loc) · 1.27 KB
/
Setting up Object Detection.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
The object detection script was changed, isntead of saving the images with the box and labels it cuts the images with the area of the min/max of x's and y's of the box areas.
If you do not have protobuffer in your environment you'll have to set it up.
You can download it here: https://github.com/google/protobuf/releases
Windows: protoc-3.5.1-win32.zip
Linux: protoc-3.5.1-linux-x86_64.zip or 32bits....
Extract it and add the bin folder to your PATH :)
Now you should be able to execute the command:
(Do it in the hunter2_fashion folder)
protoc object_detection/protos/*.proto --python_out=.
After that, download http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_resnet_v2_atrous_oid_2018_01_28.tar.gz
Put it in the hunter2_fashion folder and untar? it
Now you should be able to run python object_detection.py.
If you wanna run the images in a smaller number of images change the range of values in the line
TEST_IMAGE_PATHS = [ os.path.join(PATH_TO_TEST_IMAGES_DIR, '{}.jpg'.format(i)) for i in range(0,len([name for name in os.listdir(PATH_TO_TEST_IMAGES_DIR) if os.path.isfile(os.path.join(PATH_TO_TEST_IMAGES_DIR, name))])+1) ]
This should also take into account the images in the train dataset, which are not fully order due to deletion of broken images.