├── data ├── map.pbtxt ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── 8.jpg ├── 9.jpg ├── 10.jpg ├── 11.jpg ├── 12.jpg ├── 13.jpg ├── 14.jpg ├── 15.jpg ├── 16.jpg ├── 17.jpg ├── 18.jpg ├── 19.jpg ├── 20.jpg ├── 21.jpg ├── 22.jpg ├── 23.jpg ├── 24.jpg ├── 25.jpg ├── 26.jpg ├── 27.jpg ├── 28.jpg ├── 29.jpg ├── 30.jpg ├── 31.jpg ├── 32.jpg ├── 33.jpg ├── 34.jpg ├── 35.jpg ├── 36.jpg ├── 37.jpg ├── 38.jpg ├── 39.jpg ├── 40.jpg ├── 41.jpg ├── 42.jpg ├── 43.jpg ├── 44.jpg ├── 45.jpg ├── 46.jpg ├── 47.jpg ├── 48.jpg ├── 49.jpg ├── 50.jpg ├── 51.jpg ├── 52.jpg ├── 53.jpg ├── 54.jpg ├── 55.jpg ├── 56.jpg ├── 57.jpg ├── 58.jpg ├── 59.jpg ├── 60.jpg ├── 24.xml ├── 43.xml ├── 15.xml ├── 17.xml ├── 27.xml ├── 3.xml ├── 30.xml ├── 33.xml ├── 38.xml ├── 39.xml ├── 44.xml ├── 49.xml ├── 23.xml ├── 57.xml ├── 2.xml ├── 9.xml ├── 1.xml ├── 10.xml ├── 18.xml ├── 20.xml ├── 26.xml ├── 29.xml ├── 31.xml ├── 35.xml ├── 4.xml ├── 42.xml ├── 48.xml ├── 5.xml ├── 50.xml ├── 16.xml ├── 28.xml ├── 34.xml ├── 36.xml ├── 47.xml ├── 56.xml ├── 60.xml ├── 51.xml ├── 7.xml ├── 22.xml ├── 25.xml ├── 32.xml ├── 37.xml ├── 46.xml ├── 55.xml ├── 59.xml ├── 19.xml ├── 45.xml ├── 13.xml ├── 21.xml ├── 6.xml ├── 41.xml ├── 11.xml ├── 58.xml ├── 14.xml ├── 8.xml ├── 54.xml ├── 12.xml ├── 40.xml ├── 53.xml └── 52.xml ├── .gitignore ├── test ├── 1.jpg ├── 2.jpg ├── 3.jpg └── 4.jpg ├── README.md ├── annotate.py ├── ssd_mobilenet_v1_coco.config └── create_pascal_tf_record.py /data/map.pbtxt: -------------------------------------------------------------------------------- 1 | item { 2 | id: 1 3 | name: "race car" 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*.tfrecord 2 | /ssd_mobilenet_v1_coco_11_06_2017/ 3 | /inference/ 4 | /test/*.xml 5 | /training/ 6 | -------------------------------------------------------------------------------- /data/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/1.jpg -------------------------------------------------------------------------------- /data/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/2.jpg -------------------------------------------------------------------------------- /data/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/3.jpg -------------------------------------------------------------------------------- /data/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/4.jpg -------------------------------------------------------------------------------- /data/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/5.jpg -------------------------------------------------------------------------------- /data/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/6.jpg -------------------------------------------------------------------------------- /data/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/7.jpg -------------------------------------------------------------------------------- /data/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/8.jpg -------------------------------------------------------------------------------- /data/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/9.jpg -------------------------------------------------------------------------------- /test/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/test/1.jpg -------------------------------------------------------------------------------- /test/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/test/2.jpg -------------------------------------------------------------------------------- /test/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/test/3.jpg -------------------------------------------------------------------------------- /test/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/test/4.jpg -------------------------------------------------------------------------------- /data/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/10.jpg -------------------------------------------------------------------------------- /data/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/11.jpg -------------------------------------------------------------------------------- /data/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/12.jpg -------------------------------------------------------------------------------- /data/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/13.jpg -------------------------------------------------------------------------------- /data/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/14.jpg -------------------------------------------------------------------------------- /data/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/15.jpg -------------------------------------------------------------------------------- /data/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/16.jpg -------------------------------------------------------------------------------- /data/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/17.jpg -------------------------------------------------------------------------------- /data/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/18.jpg -------------------------------------------------------------------------------- /data/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/19.jpg -------------------------------------------------------------------------------- /data/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/20.jpg -------------------------------------------------------------------------------- /data/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/21.jpg -------------------------------------------------------------------------------- /data/22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/22.jpg -------------------------------------------------------------------------------- /data/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/23.jpg -------------------------------------------------------------------------------- /data/24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/24.jpg -------------------------------------------------------------------------------- /data/25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/25.jpg -------------------------------------------------------------------------------- /data/26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/26.jpg -------------------------------------------------------------------------------- /data/27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/27.jpg -------------------------------------------------------------------------------- /data/28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/28.jpg -------------------------------------------------------------------------------- /data/29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/29.jpg -------------------------------------------------------------------------------- /data/30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/30.jpg -------------------------------------------------------------------------------- /data/31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/31.jpg -------------------------------------------------------------------------------- /data/32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/32.jpg -------------------------------------------------------------------------------- /data/33.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/33.jpg -------------------------------------------------------------------------------- /data/34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/34.jpg -------------------------------------------------------------------------------- /data/35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/35.jpg -------------------------------------------------------------------------------- /data/36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/36.jpg -------------------------------------------------------------------------------- /data/37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/37.jpg -------------------------------------------------------------------------------- /data/38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/38.jpg -------------------------------------------------------------------------------- /data/39.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/39.jpg -------------------------------------------------------------------------------- /data/40.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/40.jpg -------------------------------------------------------------------------------- /data/41.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/41.jpg -------------------------------------------------------------------------------- /data/42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/42.jpg -------------------------------------------------------------------------------- /data/43.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/43.jpg -------------------------------------------------------------------------------- /data/44.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/44.jpg -------------------------------------------------------------------------------- /data/45.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/45.jpg -------------------------------------------------------------------------------- /data/46.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/46.jpg -------------------------------------------------------------------------------- /data/47.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/47.jpg -------------------------------------------------------------------------------- /data/48.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/48.jpg -------------------------------------------------------------------------------- /data/49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/49.jpg -------------------------------------------------------------------------------- /data/50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/50.jpg -------------------------------------------------------------------------------- /data/51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/51.jpg -------------------------------------------------------------------------------- /data/52.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/52.jpg -------------------------------------------------------------------------------- /data/53.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/53.jpg -------------------------------------------------------------------------------- /data/54.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/54.jpg -------------------------------------------------------------------------------- /data/55.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/55.jpg -------------------------------------------------------------------------------- /data/56.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/56.jpg -------------------------------------------------------------------------------- /data/57.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/57.jpg -------------------------------------------------------------------------------- /data/58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/58.jpg -------------------------------------------------------------------------------- /data/59.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/59.jpg -------------------------------------------------------------------------------- /data/60.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewCarterUK/tf-example-object-detection-api-race-cars/HEAD/data/60.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Example: Annotating Large Datasets with the TensorFlow Object Detection API 2 | 3 | This repository holds the example project that demonstrates how the TensorFlow Object Detection API can be used to predict annotations for large datasets. 4 | 5 | The example images inside the `data/` directory are from a variety of sources. They are not provided under any license, nor covered by any license used by this project or its dependencies. 6 | -------------------------------------------------------------------------------- /data/24.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 24.jpg 4 | /home/andrew/Desktop/formula-1/24.jpg 5 | 6 | Unknown 7 | 8 | 9 | 259 10 | 194 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 19 21 | 20 22 | 239 23 | 162 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/43.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 43.jpg 4 | /home/andrew/Desktop/formula-1/43.jpg 5 | 6 | Unknown 7 | 8 | 9 | 275 10 | 183 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 53 21 | 90 22 | 209 23 | 167 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/15.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 15.jpg 4 | /home/andrew/Desktop/formula-1/15.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1500 10 | 1000 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 707 21 | 152 22 | 1441 23 | 712 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/17.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 17.jpg 4 | /home/andrew/Desktop/formula-1/17.jpg 5 | 6 | Unknown 7 | 8 | 9 | 720 10 | 250 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 290 21 | 150 22 | 511 23 | 238 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/27.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 27.jpg 4 | /home/andrew/Desktop/formula-1/27.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1280 10 | 720 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 142 21 | 256 22 | 1139 23 | 488 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/3.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 3.jpg 4 | /home/andrew/Desktop/formula-1/3.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1536 10 | 864 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 126 21 | 184 22 | 1462 23 | 757 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/30.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 30.jpg 4 | /home/andrew/Desktop/formula-1/30.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1024 10 | 683 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 320 21 | 409 22 | 809 23 | 646 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/33.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 33.jpg 4 | /home/andrew/Desktop/formula-1/33.jpg 5 | 6 | Unknown 7 | 8 | 9 | 750 10 | 500 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 304 21 | 309 22 | 638 23 | 448 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/38.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 38.jpg 4 | /home/andrew/Desktop/formula-1/38.jpg 5 | 6 | Unknown 7 | 8 | 9 | 623 10 | 415 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 181 21 | 204 22 | 421 23 | 318 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/39.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 39.jpg 4 | /home/andrew/Desktop/formula-1/39.jpg 5 | 6 | Unknown 7 | 8 | 9 | 800 10 | 534 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 263 21 | 163 22 | 611 23 | 343 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/44.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 44.jpg 4 | /home/andrew/Desktop/formula-1/44.jpg 5 | 6 | Unknown 7 | 8 | 9 | 600 10 | 400 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 102 21 | 104 22 | 473 23 | 269 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/49.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 49.jpg 4 | /home/andrew/Desktop/formula-1/49.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1000 10 | 667 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 92 21 | 302 22 | 950 23 | 597 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/23.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 23.jpg 4 | /home/andrew/Desktop/formula-1/23.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1600 10 | 1067 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 477 21 | 616 22 | 1268 23 | 1026 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/57.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 57.jpg 4 | /home/andrew/Desktop/formula-1/57.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1000 10 | 667 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 313 21 | 332 22 | 825 23 | 519 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /data/2.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 2.jpg 4 | /home/andrew/Desktop/formula-1/2.jpg 5 | 6 | Unknown 7 | 8 | 9 | 400 10 | 267 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 20 21 | 82 22 | 304 23 | 259 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 173 33 | 47 34 | 366 35 | 187 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/9.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 9.jpg 4 | /home/andrew/Desktop/formula-1/9.jpg 5 | 6 | Unknown 7 | 8 | 9 | 285 10 | 177 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 6 21 | 55 22 | 159 23 | 131 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 127 33 | 55 34 | 282 35 | 129 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/1.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 1.jpg 4 | /home/andrew/Desktop/formula-1/1.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1536 10 | 864 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 191 21 | 284 22 | 758 23 | 652 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 862 33 | 264 34 | 1440 35 | 637 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/10.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 10.jpg 4 | /home/andrew/Desktop/formula-1/10.jpg 5 | 6 | Unknown 7 | 8 | 9 | 427 10 | 240 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 28 21 | 79 22 | 190 23 | 138 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 219 33 | 95 34 | 340 35 | 165 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/18.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 18.jpg 4 | /home/andrew/Desktop/formula-1/18.jpg 5 | 6 | Unknown 7 | 8 | 9 | 615 10 | 409 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 67 21 | 206 22 | 531 23 | 386 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 123 33 | 12 34 | 373 35 | 149 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/20.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 20.jpg 4 | /home/andrew/Desktop/formula-1/20.jpg 5 | 6 | Unknown 7 | 8 | 9 | 427 10 | 240 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 244 21 | 81 22 | 302 23 | 117 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 208 33 | 80 34 | 264 35 | 114 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/26.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 26.jpg 4 | /home/andrew/Desktop/formula-1/26.jpg 5 | 6 | Unknown 7 | 8 | 9 | 710 10 | 355 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 75 21 | 83 22 | 601 23 | 331 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 68 33 | 31 34 | 344 35 | 185 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/29.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 29.jpg 4 | /home/andrew/Desktop/formula-1/29.jpg 5 | 6 | Unknown 7 | 8 | 9 | 580 10 | 280 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 16 21 | 77 22 | 216 23 | 203 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 358 33 | 77 34 | 563 35 | 205 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/31.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 31.jpg 4 | /home/andrew/Desktop/formula-1/31.jpg 5 | 6 | Unknown 7 | 8 | 9 | 750 10 | 500 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 24 21 | 154 22 | 625 23 | 435 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 420 33 | 45 34 | 706 35 | 219 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/35.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 35.jpg 4 | /home/andrew/Desktop/formula-1/35.jpg 5 | 6 | Unknown 7 | 8 | 9 | 275 10 | 183 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 18 21 | 16 22 | 107 23 | 71 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 26 33 | 60 34 | 252 35 | 165 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/4.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 4.jpg 4 | /home/andrew/Desktop/formula-1/4.jpg 5 | 6 | Unknown 7 | 8 | 9 | 768 10 | 432 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 178 21 | 182 22 | 700 23 | 369 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 258 33 | 35 34 | 751 35 | 214 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/42.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 42.jpg 4 | /home/andrew/Desktop/formula-1/42.jpg 5 | 6 | Unknown 7 | 8 | 9 | 275 10 | 183 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 105 21 | 101 22 | 252 23 | 168 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 21 33 | 81 34 | 139 35 | 139 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/48.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 48.jpg 4 | /home/andrew/Desktop/formula-1/48.jpg 5 | 6 | Unknown 7 | 8 | 9 | 800 10 | 533 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 110 21 | 189 22 | 734 23 | 523 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 46 33 | 32 34 | 479 35 | 249 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/5.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 5.jpg 4 | /home/andrew/Desktop/formula-1/5.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1200 10 | 675 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 79 21 | 44 22 | 532 23 | 312 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 394 33 | 162 34 | 1151 35 | 627 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/50.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 50.jpg 4 | /home/andrew/Desktop/formula-1/50.jpg 5 | 6 | Unknown 7 | 8 | 9 | 800 10 | 533 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 59 21 | 226 22 | 427 23 | 439 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 477 33 | 51 34 | 764 35 | 211 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/16.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 16.jpg 4 | /home/andrew/Desktop/formula-1/16.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1200 10 | 800 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 449 21 | 536 22 | 551 23 | 598 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 223 33 | 607 34 | 362 35 | 712 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/28.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 28.jpg 4 | /home/andrew/Desktop/formula-1/28.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1280 10 | 720 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 739 21 | 259 22 | 997 23 | 405 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 449 33 | 258 34 | 699 35 | 403 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/34.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 34.jpg 4 | /home/andrew/Desktop/formula-1/34.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1000 10 | 425 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 80 21 | 232 22 | 414 23 | 395 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 650 33 | 256 34 | 922 35 | 400 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/36.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 36.jpg 4 | /home/andrew/Desktop/formula-1/36.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1200 10 | 800 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 39 21 | 492 22 | 585 23 | 726 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 854 33 | 305 34 | 1176 35 | 472 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/47.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 47.jpg 4 | /home/andrew/Desktop/formula-1/47.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1013 10 | 675 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 263 21 | 183 22 | 969 23 | 602 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 255 33 | 12 34 | 818 35 | 301 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/56.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 56.jpg 4 | /home/andrew/Desktop/formula-1/56.jpg 5 | 6 | Unknown 7 | 8 | 9 | 835 10 | 557 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 185 21 | 99 22 | 533 23 | 291 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 172 33 | 256 34 | 693 35 | 545 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/60.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 60.jpg 4 | /home/andrew/Desktop/formula-1/60.jpg 5 | 6 | Unknown 7 | 8 | 9 | 918 10 | 613 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 133 21 | 300 22 | 458 23 | 454 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 374 33 | 338 34 | 804 35 | 503 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /data/51.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 51.jpg 4 | /home/andrew/Desktop/formula-1/51.jpg 5 | 6 | Unknown 7 | 8 | 9 | 660 10 | 372 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 11 21 | 94 22 | 516 23 | 290 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 365 33 | 40 34 | 658 35 | 211 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 1 42 | 0 43 | 44 | 154 45 | 1 46 | 498 47 | 155 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/7.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 7.jpg 4 | /home/andrew/Desktop/formula-1/7.jpg 5 | 6 | Unknown 7 | 8 | 9 | 750 10 | 406 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 110 21 | 243 22 | 330 23 | 379 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 182 33 | 127 34 | 322 35 | 212 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 517 45 | 12 46 | 588 47 | 60 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/22.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 22.jpg 4 | /home/andrew/Desktop/formula-1/22.jpg 5 | 6 | Unknown 7 | 8 | 9 | 795 10 | 530 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 349 21 | 206 22 | 759 23 | 444 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 178 33 | 129 34 | 548 35 | 326 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 8 45 | 56 46 | 256 47 | 195 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/25.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 25.jpg 4 | /home/andrew/Desktop/formula-1/25.jpg 5 | 6 | Unknown 7 | 8 | 9 | 600 10 | 400 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 20 21 | 59 22 | 249 23 | 210 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 159 33 | 188 34 | 497 35 | 358 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 1 42 | 0 43 | 44 | 272 45 | 1 46 | 567 47 | 102 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/32.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 32.jpg 4 | /home/andrew/Desktop/formula-1/32.jpg 5 | 6 | Unknown 7 | 8 | 9 | 810 10 | 541 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 144 21 | 197 22 | 327 23 | 289 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 171 33 | 245 34 | 316 35 | 357 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 261 45 | 339 46 | 611 47 | 507 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/37.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 37.jpg 4 | /home/andrew/Desktop/formula-1/37.jpg 5 | 6 | Unknown 7 | 8 | 9 | 623 10 | 415 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 1 18 | 0 19 | 20 | 1 21 | 211 22 | 114 23 | 286 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 246 33 | 228 34 | 390 35 | 316 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 420 45 | 224 46 | 579 47 | 309 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/46.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 46.jpg 4 | /home/andrew/Desktop/formula-1/46.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1600 10 | 1067 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 532 21 | 26 22 | 1015 23 | 279 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 779 33 | 109 34 | 1366 35 | 424 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 221 45 | 354 46 | 1268 47 | 937 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/55.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 55.jpg 4 | /home/andrew/Desktop/formula-1/55.jpg 5 | 6 | Unknown 7 | 8 | 9 | 918 10 | 613 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 37 21 | 264 22 | 585 23 | 552 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 182 33 | 162 34 | 497 35 | 325 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 357 45 | 226 46 | 656 47 | 425 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/59.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 59.jpg 4 | /home/andrew/Desktop/formula-1/59.jpg 5 | 6 | Unknown 7 | 8 | 9 | 780 10 | 520 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 129 21 | 237 22 | 324 23 | 377 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 447 33 | 144 34 | 752 35 | 286 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 285 45 | 259 46 | 613 47 | 433 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /data/19.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 19.jpg 4 | /home/andrew/Desktop/formula-1/19.jpg 5 | 6 | Unknown 7 | 8 | 9 | 710 10 | 240 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 117 21 | 15 22 | 247 23 | 86 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 432 33 | 80 34 | 655 35 | 228 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 311 45 | 49 46 | 490 47 | 149 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 217 57 | 34 58 | 363 59 | 111 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /data/45.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 45.jpg 4 | /home/andrew/Desktop/formula-1/45.jpg 5 | 6 | Unknown 7 | 8 | 9 | 275 10 | 183 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 222 21 | 36 22 | 247 23 | 52 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 199 33 | 53 34 | 228 35 | 70 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 165 45 | 62 46 | 198 47 | 83 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 62 57 | 83 58 | 161 59 | 129 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /data/13.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 13.jpg 4 | /home/andrew/Desktop/formula-1/13.jpg 5 | 6 | Unknown 7 | 8 | 9 | 900 10 | 616 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 55 21 | 192 22 | 242 23 | 313 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 120 33 | 374 34 | 363 35 | 528 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 359 45 | 286 46 | 574 47 | 418 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 579 57 | 392 58 | 832 59 | 543 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /data/21.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 21.jpg 4 | /home/andrew/Desktop/formula-1/21.jpg 5 | 6 | Unknown 7 | 8 | 9 | 941 10 | 529 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 1 18 | 0 19 | 20 | 1 21 | 178 22 | 260 23 | 362 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 513 33 | 81 34 | 857 35 | 237 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 501 45 | 190 46 | 831 47 | 371 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 109 57 | 270 58 | 713 59 | 506 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /data/6.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 6.jpg 4 | /home/andrew/Desktop/formula-1/6.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1500 10 | 1000 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 180 21 | 605 22 | 571 23 | 828 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 476 33 | 473 34 | 809 35 | 677 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 719 45 | 343 46 | 1050 47 | 519 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 1032 57 | 298 58 | 1378 59 | 461 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /data/41.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 41.jpg 4 | /home/andrew/Desktop/formula-1/41.jpg 5 | 6 | Unknown 7 | 8 | 9 | 275 10 | 183 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 1 18 | 0 19 | 20 | 1 21 | 37 22 | 42 23 | 55 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 64 33 | 37 34 | 116 35 | 56 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 94 45 | 79 46 | 204 47 | 137 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 121 57 | 35 58 | 169 59 | 57 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 171 69 | 34 70 | 212 71 | 56 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 230 81 | 32 82 | 270 83 | 55 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /data/11.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 11.jpg 4 | /home/andrew/Desktop/formula-1/11.jpg 5 | 6 | Unknown 7 | 8 | 9 | 795 10 | 530 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 253 21 | 339 22 | 495 23 | 471 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 291 33 | 235 34 | 422 35 | 308 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 396 45 | 195 46 | 492 47 | 245 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 503 57 | 164 58 | 576 59 | 205 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 546 69 | 124 70 | 605 71 | 163 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 454 81 | 111 82 | 528 83 | 148 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /data/58.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 58.jpg 4 | /home/andrew/Desktop/formula-1/58.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1280 10 | 720 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 185 21 | 261 22 | 386 23 | 352 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 341 33 | 219 34 | 553 35 | 297 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 397 45 | 358 46 | 650 47 | 441 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 408 57 | 293 58 | 646 59 | 367 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 702 69 | 285 70 | 933 71 | 372 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 927 81 | 352 82 | 1182 83 | 432 84 | 85 | 86 | 87 | race car 88 | Unspecified 89 | 0 90 | 0 91 | 92 | 1044 93 | 314 94 | 1277 95 | 393 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /data/14.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 14.jpg 4 | /home/andrew/Desktop/formula-1/14.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1000 10 | 440 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 1 18 | 0 19 | 20 | 514 21 | 1 22 | 613 23 | 37 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 223 33 | 136 34 | 330 35 | 215 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 336 45 | 155 46 | 442 47 | 243 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 1 54 | 0 55 | 56 | 305 57 | 334 58 | 409 59 | 440 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 513 69 | 291 70 | 631 71 | 394 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 653 81 | 275 82 | 764 83 | 372 84 | 85 | 86 | 87 | race car 88 | Unspecified 89 | 0 90 | 0 91 | 92 | 420 93 | 15 94 | 509 95 | 88 96 | 97 | 98 | 99 | race car 100 | Unspecified 101 | 1 102 | 0 103 | 104 | 652 105 | 1 106 | 743 107 | 67 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /data/8.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 8.jpg 4 | /home/andrew/Desktop/formula-1/8.jpg 5 | 6 | Unknown 7 | 8 | 9 | 690 10 | 366 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 155 21 | 3 22 | 231 23 | 66 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 107 33 | 49 34 | 199 35 | 114 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 1 42 | 0 43 | 44 | 1 45 | 132 46 | 83 47 | 220 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 21 57 | 230 58 | 157 59 | 332 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 175 69 | 283 70 | 361 71 | 357 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 408 81 | 283 82 | 574 83 | 352 84 | 85 | 86 | 87 | race car 88 | Unspecified 89 | 0 90 | 0 91 | 92 | 529 93 | 233 94 | 652 95 | 296 96 | 97 | 98 | 99 | race car 100 | Unspecified 101 | 0 102 | 0 103 | 104 | 536 105 | 97 106 | 594 107 | 136 108 | 109 | 110 | 111 | race car 112 | Unspecified 113 | 0 114 | 0 115 | 116 | 592 117 | 166 118 | 649 119 | 216 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /data/54.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 54.jpg 4 | /home/andrew/Desktop/formula-1/54.jpg 5 | 6 | Unknown 7 | 8 | 9 | 904 10 | 603 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 1 18 | 0 19 | 20 | 198 21 | 1 22 | 335 23 | 82 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 447 33 | 61 34 | 596 35 | 157 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 633 45 | 111 46 | 789 47 | 216 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 225 57 | 144 58 | 383 59 | 249 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 434 69 | 322 70 | 638 71 | 446 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 599 81 | 397 82 | 798 83 | 534 84 | 85 | 86 | 87 | race car 88 | Unspecified 89 | 0 90 | 0 91 | 92 | 165 93 | 358 94 | 363 95 | 479 96 | 97 | 98 | 99 | race car 100 | Unspecified 101 | 0 102 | 0 103 | 104 | 157 105 | 425 106 | 363 107 | 569 108 | 109 | 110 | 111 | race car 112 | Unspecified 113 | 1 114 | 0 115 | 116 | 477 117 | 1 118 | 611 119 | 38 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /data/12.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 12.jpg 4 | /home/andrew/Desktop/formula-1/12.jpg 5 | 6 | Unknown 7 | 8 | 9 | 710 10 | 240 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 472 21 | 160 22 | 573 23 | 223 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 1 30 | 0 31 | 32 | 30 33 | 1 34 | 82 35 | 23 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 1 42 | 0 43 | 44 | 183 45 | 1 46 | 244 47 | 33 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 236 57 | 12 58 | 295 59 | 49 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 108 69 | 50 70 | 174 71 | 88 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 109 81 | 32 82 | 172 83 | 68 84 | 85 | 86 | 87 | race car 88 | Unspecified 89 | 0 90 | 0 91 | 92 | 206 93 | 92 94 | 286 95 | 140 96 | 97 | 98 | 99 | race car 100 | Unspecified 101 | 0 102 | 0 103 | 104 | 257 105 | 120 106 | 340 107 | 171 108 | 109 | 110 | 111 | race car 112 | Unspecified 113 | 0 114 | 0 115 | 116 | 314 117 | 137 118 | 404 119 | 193 120 | 121 | 122 | 123 | race car 124 | Unspecified 125 | 0 126 | 0 127 | 128 | 349 129 | 165 130 | 452 131 | 229 132 | 133 | 134 | 135 | race car 136 | Unspecified 137 | 0 138 | 0 139 | 140 | 197 141 | 158 142 | 300 143 | 223 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /annotate.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import os 3 | import tensorflow as tf 4 | from PIL import Image 5 | from utils import label_map_util 6 | from pascal_voc_writer import Writer 7 | 8 | if tf.__version__ < '1.4.0': 9 | raise ImportError('Please upgrade your tensorflow installation to v1.4.* or later!') 10 | 11 | PATH_TO_CKPT = 'inference/frozen_inference_graph.pb' 12 | PATH_TO_LABELS = 'data/map.pbtxt' 13 | 14 | TOTAL_IMAGES = 10 #Edit this number to the numbers of images you have. 15 | 16 | NUM_CLASSES = 1 17 | 18 | detection_graph = tf.Graph() 19 | with detection_graph.as_default(): 20 | od_graph_def = tf.GraphDef() 21 | with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid: 22 | serialized_graph = fid.read() 23 | od_graph_def.ParseFromString(serialized_graph) 24 | tf.import_graph_def(od_graph_def, name='') 25 | 26 | label_map = label_map_util.load_labelmap(PATH_TO_LABELS) 27 | categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True) 28 | category_index = label_map_util.create_category_index(categories) 29 | 30 | def load_image_into_numpy_array(image): 31 | (im_width, im_height) = image.size 32 | return np.array(image.getdata()).reshape( 33 | (im_height, im_width, 3)).astype(np.uint8) 34 | 35 | PATH_TO_TEST_IMAGES_DIR = 'test' 36 | TEST_IMAGE_PATHS = [ os.path.join(PATH_TO_TEST_IMAGES_DIR, '{}.jpg'.format(i)) for i in range(1,TOTAL_IMAGES) ] 37 | 38 | with detection_graph.as_default(): 39 | with tf.Session(graph=detection_graph) as sess: 40 | # Definite input and output Tensors for detection_graph 41 | image_tensor = detection_graph.get_tensor_by_name('image_tensor:0') 42 | # Each box represents a part of the image where a particular object was detected. 43 | detection_boxes = detection_graph.get_tensor_by_name('detection_boxes:0') 44 | # Each score represent how level of confidence for each of the objects. 45 | # Score is shown on the result image, together with the class label. 46 | detection_scores = detection_graph.get_tensor_by_name('detection_scores:0') 47 | detection_classes = detection_graph.get_tensor_by_name('detection_classes:0') 48 | num_detections = detection_graph.get_tensor_by_name('num_detections:0') 49 | for image_path in TEST_IMAGE_PATHS: 50 | image = Image.open(image_path) 51 | image_width, image_height = image.size 52 | # the array based representation of the image will be used later in order to prepare the 53 | # result image with boxes and labels on it. 54 | image_np = load_image_into_numpy_array(image) 55 | # Expand dimensions since the model expects images to have shape: [1, None, None, 3] 56 | image_np_expanded = np.expand_dims(image_np, axis=0) 57 | # Actual detection. 58 | (boxes, scores, classes, num) = sess.run( 59 | [detection_boxes, detection_scores, detection_classes, num_detections], 60 | feed_dict={image_tensor: image_np_expanded}) 61 | 62 | boxes = np.squeeze(boxes) 63 | classes = np.squeeze(classes) 64 | scores = np.squeeze(scores) 65 | 66 | writer = Writer(image_path, image_width, image_height) 67 | 68 | for index, score in enumerate(scores): 69 | if score < 0.5: 70 | continue 71 | 72 | label = category_index[classes[index]]['name'] 73 | ymin, xmin, ymax, xmax = boxes[index] 74 | 75 | writer.addObject(label, int(xmin * image_width), int(ymin * image_height), 76 | int(xmax * image_width), int(ymax * image_height)) 77 | 78 | 79 | annotation_path = os.path.splitext(image_path)[0] + '.xml' 80 | writer.save(annotation_path) 81 | -------------------------------------------------------------------------------- /ssd_mobilenet_v1_coco.config: -------------------------------------------------------------------------------- 1 | # SSD with Mobilenet v1 configuration for MSCOCO Dataset. 2 | # Users should configure the fine_tune_checkpoint field in the train config as 3 | # well as the label_map_path and input_path fields in the train_input_reader and 4 | # eval_input_reader. Search for "PATH_TO_BE_CONFIGURED" to find the fields that 5 | # should be configured. 6 | 7 | model { 8 | ssd { 9 | num_classes: 1 10 | box_coder { 11 | faster_rcnn_box_coder { 12 | y_scale: 10.0 13 | x_scale: 10.0 14 | height_scale: 5.0 15 | width_scale: 5.0 16 | } 17 | } 18 | matcher { 19 | argmax_matcher { 20 | matched_threshold: 0.5 21 | unmatched_threshold: 0.5 22 | ignore_thresholds: false 23 | negatives_lower_than_unmatched: true 24 | force_match_for_each_row: true 25 | } 26 | } 27 | similarity_calculator { 28 | iou_similarity { 29 | } 30 | } 31 | anchor_generator { 32 | ssd_anchor_generator { 33 | num_layers: 6 34 | min_scale: 0.2 35 | max_scale: 0.95 36 | aspect_ratios: 1.0 37 | aspect_ratios: 2.0 38 | aspect_ratios: 0.5 39 | aspect_ratios: 3.0 40 | aspect_ratios: 0.3333 41 | } 42 | } 43 | image_resizer { 44 | fixed_shape_resizer { 45 | height: 300 46 | width: 300 47 | } 48 | } 49 | box_predictor { 50 | convolutional_box_predictor { 51 | min_depth: 0 52 | max_depth: 0 53 | num_layers_before_predictor: 0 54 | use_dropout: false 55 | dropout_keep_probability: 0.8 56 | kernel_size: 1 57 | box_code_size: 4 58 | apply_sigmoid_to_scores: false 59 | conv_hyperparams { 60 | activation: RELU_6, 61 | regularizer { 62 | l2_regularizer { 63 | weight: 0.00004 64 | } 65 | } 66 | initializer { 67 | truncated_normal_initializer { 68 | stddev: 0.03 69 | mean: 0.0 70 | } 71 | } 72 | batch_norm { 73 | train: true, 74 | scale: true, 75 | center: true, 76 | decay: 0.9997, 77 | epsilon: 0.001, 78 | } 79 | } 80 | } 81 | } 82 | feature_extractor { 83 | type: 'ssd_mobilenet_v1' 84 | min_depth: 16 85 | depth_multiplier: 1.0 86 | conv_hyperparams { 87 | activation: RELU_6, 88 | regularizer { 89 | l2_regularizer { 90 | weight: 0.00004 91 | } 92 | } 93 | initializer { 94 | truncated_normal_initializer { 95 | stddev: 0.03 96 | mean: 0.0 97 | } 98 | } 99 | batch_norm { 100 | train: true, 101 | scale: true, 102 | center: true, 103 | decay: 0.9997, 104 | epsilon: 0.001, 105 | } 106 | } 107 | } 108 | loss { 109 | classification_loss { 110 | weighted_sigmoid { 111 | anchorwise_output: true 112 | } 113 | } 114 | localization_loss { 115 | weighted_smooth_l1 { 116 | anchorwise_output: true 117 | } 118 | } 119 | hard_example_miner { 120 | num_hard_examples: 3000 121 | iou_threshold: 0.99 122 | loss_type: CLASSIFICATION 123 | max_negatives_per_positive: 3 124 | min_negatives_per_image: 0 125 | } 126 | classification_weight: 1.0 127 | localization_weight: 1.0 128 | } 129 | normalize_loss_by_num_matches: true 130 | post_processing { 131 | batch_non_max_suppression { 132 | score_threshold: 1e-8 133 | iou_threshold: 0.6 134 | max_detections_per_class: 100 135 | max_total_detections: 100 136 | } 137 | score_converter: SIGMOID 138 | } 139 | } 140 | } 141 | 142 | train_config: { 143 | batch_size: 8 144 | optimizer { 145 | rms_prop_optimizer: { 146 | learning_rate: { 147 | exponential_decay_learning_rate { 148 | initial_learning_rate: 0.004 149 | decay_steps: 800720 150 | decay_factor: 0.95 151 | } 152 | } 153 | momentum_optimizer_value: 0.9 154 | decay: 0.9 155 | epsilon: 1.0 156 | } 157 | } 158 | fine_tune_checkpoint: "ssd_mobilenet_v1_coco_11_06_2017/model.ckpt" 159 | from_detection_checkpoint: true 160 | # Note: The below line limits the training process to 200K steps, which we 161 | # empirically found to be sufficient enough to train the pets dataset. This 162 | # effectively bypasses the learning rate schedule (the learning rate will 163 | # never decay). Remove the below line to train indefinitely. 164 | num_steps: 200000 165 | data_augmentation_options { 166 | random_horizontal_flip { 167 | } 168 | } 169 | data_augmentation_options { 170 | ssd_random_crop { 171 | } 172 | } 173 | } 174 | 175 | train_input_reader: { 176 | tf_record_input_reader { 177 | input_path: "dataset.tfrecord" 178 | } 179 | label_map_path: "data/map.pbtxt" 180 | } 181 | -------------------------------------------------------------------------------- /data/40.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 40.jpg 4 | /home/andrew/Desktop/formula-1/40.jpg 5 | 6 | Unknown 7 | 8 | 9 | 800 10 | 440 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 499 21 | 306 22 | 665 23 | 396 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 624 33 | 254 34 | 736 35 | 329 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 452 45 | 251 46 | 560 47 | 336 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 288 57 | 251 58 | 392 59 | 316 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 153 69 | 244 70 | 258 71 | 311 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 263 81 | 202 82 | 357 83 | 266 84 | 85 | 86 | 87 | race car 88 | Unspecified 89 | 0 90 | 0 91 | 92 | 580 93 | 187 94 | 677 95 | 243 96 | 97 | 98 | 99 | race car 100 | Unspecified 101 | 0 102 | 0 103 | 104 | 100 105 | 212 106 | 188 107 | 271 108 | 109 | 110 | 111 | race car 112 | Unspecified 113 | 0 114 | 0 115 | 116 | 113 117 | 183 118 | 193 119 | 234 120 | 121 | 122 | 123 | race car 124 | Unspecified 125 | 0 126 | 0 127 | 128 | 497 129 | 195 130 | 582 131 | 249 132 | 133 | 134 | 135 | race car 136 | Unspecified 137 | 0 138 | 0 139 | 140 | 336 141 | 157 142 | 409 143 | 203 144 | 145 | 146 | 147 | race car 148 | Unspecified 149 | 0 150 | 0 151 | 152 | 354 153 | 175 154 | 435 155 | 226 156 | 157 | 158 | 159 | race car 160 | Unspecified 161 | 0 162 | 0 163 | 164 | 269 165 | 135 166 | 337 167 | 178 168 | 169 | 170 | 171 | race car 172 | Unspecified 173 | 0 174 | 0 175 | 176 | 286 177 | 116 178 | 344 179 | 152 180 | 181 | 182 | 183 | race car 184 | Unspecified 185 | 0 186 | 0 187 | 188 | 350 189 | 88 190 | 395 191 | 117 192 | 193 | 194 | 195 | race car 196 | Unspecified 197 | 0 198 | 0 199 | 200 | 377 201 | 95 202 | 428 203 | 124 204 | 205 | 206 | 207 | race car 208 | Unspecified 209 | 0 210 | 0 211 | 212 | 343 213 | 106 214 | 404 215 | 141 216 | 217 | 218 | 219 | race car 220 | Unspecified 221 | 0 222 | 0 223 | 224 | 394 225 | 130 226 | 463 227 | 170 228 | 229 | 230 | 231 | race car 232 | Unspecified 233 | 0 234 | 0 235 | 236 | 486 237 | 162 238 | 564 239 | 213 240 | 241 | 242 | 243 | race car 244 | Unspecified 245 | 0 246 | 0 247 | 248 | 463 249 | 119 250 | 522 251 | 156 252 | 253 | 254 | 255 | race car 256 | Unspecified 257 | 0 258 | 0 259 | 260 | 486 261 | 142 262 | 552 263 | 186 264 | 265 | 266 | 267 | -------------------------------------------------------------------------------- /data/53.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 53.jpg 4 | /home/andrew/Desktop/formula-1/53.jpg 5 | 6 | Unknown 7 | 8 | 9 | 918 10 | 613 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 766 21 | 32 22 | 827 23 | 73 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 669 33 | 66 34 | 735 35 | 110 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 722 45 | 78 46 | 793 47 | 123 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 781 57 | 112 58 | 853 59 | 157 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 795 69 | 222 70 | 874 71 | 274 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 649 81 | 103 82 | 719 83 | 147 84 | 85 | 86 | 87 | race car 88 | Unspecified 89 | 0 90 | 0 91 | 92 | 472 93 | 210 94 | 550 95 | 260 96 | 97 | 98 | 99 | race car 100 | Unspecified 101 | 0 102 | 0 103 | 104 | 582 105 | 158 106 | 655 107 | 205 108 | 109 | 110 | 111 | race car 112 | Unspecified 113 | 0 114 | 0 115 | 116 | 556 117 | 168 118 | 625 119 | 218 120 | 121 | 122 | 123 | race car 124 | Unspecified 125 | 0 126 | 0 127 | 128 | 748 129 | 158 130 | 824 131 | 207 132 | 133 | 134 | 135 | race car 136 | Unspecified 137 | 0 138 | 0 139 | 140 | 717 141 | 170 142 | 794 143 | 219 144 | 145 | 146 | 147 | race car 148 | Unspecified 149 | 0 150 | 0 151 | 152 | 624 153 | 231 154 | 709 155 | 283 156 | 157 | 158 | 159 | race car 160 | Unspecified 161 | 0 162 | 0 163 | 164 | 530 165 | 225 166 | 613 167 | 278 168 | 169 | 170 | 171 | race car 172 | Unspecified 173 | 0 174 | 0 175 | 176 | 742 177 | 297 178 | 828 179 | 354 180 | 181 | 182 | 183 | race car 184 | Unspecified 185 | 0 186 | 0 187 | 188 | 493 189 | 277 190 | 583 191 | 330 192 | 193 | 194 | 195 | race car 196 | Unspecified 197 | 0 198 | 0 199 | 200 | 590 201 | 297 202 | 677 203 | 355 204 | 205 | 206 | 207 | race car 208 | Unspecified 209 | 0 210 | 0 211 | 212 | 643 213 | 331 214 | 728 215 | 390 216 | 217 | 218 | 219 | race car 220 | Unspecified 221 | 0 222 | 0 223 | 224 | 615 225 | 364 226 | 705 227 | 422 228 | 229 | 230 | 231 | race car 232 | Unspecified 233 | 0 234 | 0 235 | 236 | 385 237 | 398 238 | 480 239 | 458 240 | 241 | 242 | 243 | race car 244 | Unspecified 245 | 0 246 | 0 247 | 248 | 435 249 | 387 250 | 530 251 | 444 252 | 253 | 254 | 255 | race car 256 | Unspecified 257 | 0 258 | 0 259 | 260 | 463 261 | 369 262 | 548 263 | 425 264 | 265 | 266 | 267 | -------------------------------------------------------------------------------- /create_pascal_tf_record.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # ============================================================================== 15 | 16 | # The script below has been modified to create TFRecord files for 17 | # datasets that use the PASCAL VOC annotation format. 18 | # 19 | # This script assumes that files exist in a data directory with a strict 20 | # format. The annotation file path must be the same as the image file 21 | # path, but 'xml' instead of 'jpg' as the extension. File path information 22 | # inside the XML file is ignored. 23 | # 24 | # The original can be found here: 25 | # https://github.com/tensorflow/models/blob/master/research/object_detection/dataset_tools/create_pascal_tf_record.py 26 | 27 | r"""Convert raw PASCAL dataset to TFRecord for object_detection. 28 | 29 | Example usage: 30 | python object_detection/dataset_tools/create_pascal_tf_record.py \ 31 | --data_dir=/home/user/data \ 32 | --output_path=/home/user/pascal.record \ 33 | --label_map_path=/home/user/data/map.pbtxt 34 | """ 35 | from __future__ import absolute_import 36 | from __future__ import division 37 | from __future__ import print_function 38 | 39 | import hashlib 40 | import io 41 | import logging 42 | import os 43 | import glob 44 | 45 | from lxml import etree 46 | import PIL.Image 47 | import tensorflow as tf 48 | 49 | from object_detection.utils import dataset_util 50 | from object_detection.utils import label_map_util 51 | 52 | 53 | flags = tf.app.flags 54 | flags.DEFINE_string('data_dir', None, 'Root directory to raw PASCAL VOC dataset.') 55 | flags.DEFINE_string('output_path', None, 'Path to output TFRecord') 56 | flags.DEFINE_string('label_map_path', None, 57 | 'Path to label map proto') 58 | flags.DEFINE_boolean('ignore_difficult_instances', False, 'Whether to ignore ' 59 | 'difficult instances') 60 | FLAGS = flags.FLAGS 61 | 62 | 63 | def dict_to_tf_example(data, 64 | image_path, 65 | label_map_dict, 66 | ignore_difficult_instances=False): 67 | """Convert XML derived dict to tf.Example proto. 68 | 69 | Notice that this function normalizes the bounding box coordinates provided 70 | by the raw data. 71 | 72 | Args: 73 | data: dict holding PASCAL XML fields for a single image (obtained by 74 | running dataset_util.recursive_parse_xml_to_dict) 75 | image_path: Path to image described by the PASCAL XML file 76 | label_map_dict: A map from string label names to integers ids. 77 | ignore_difficult_instances: Whether to skip difficult instances in the 78 | dataset (default: False). 79 | 80 | Returns: 81 | example: The converted tf.Example. 82 | 83 | Raises: 84 | ValueError: if the image pointed to by data['filename'] is not a valid JPEG 85 | """ 86 | with tf.gfile.GFile(image_path, 'rb') as fid: 87 | encoded_jpg = fid.read() 88 | encoded_jpg_io = io.BytesIO(encoded_jpg) 89 | image = PIL.Image.open(encoded_jpg_io) 90 | if image.format != 'JPEG': 91 | raise ValueError('Image format not JPEG') 92 | key = hashlib.sha256(encoded_jpg).hexdigest() 93 | 94 | width = int(data['size']['width']) 95 | height = int(data['size']['height']) 96 | 97 | xmin = [] 98 | ymin = [] 99 | xmax = [] 100 | ymax = [] 101 | classes = [] 102 | classes_text = [] 103 | truncated = [] 104 | poses = [] 105 | difficult_obj = [] 106 | for obj in data['object']: 107 | difficult = bool(int(obj['difficult'])) 108 | if ignore_difficult_instances and difficult: 109 | continue 110 | 111 | difficult_obj.append(int(difficult)) 112 | 113 | xmin.append(float(obj['bndbox']['xmin']) / width) 114 | ymin.append(float(obj['bndbox']['ymin']) / height) 115 | xmax.append(float(obj['bndbox']['xmax']) / width) 116 | ymax.append(float(obj['bndbox']['ymax']) / height) 117 | classes_text.append(obj['name'].encode('utf8')) 118 | classes.append(label_map_dict[obj['name']]) 119 | truncated.append(int(obj['truncated'])) 120 | poses.append(obj['pose'].encode('utf8')) 121 | 122 | example = tf.train.Example(features=tf.train.Features(feature={ 123 | 'image/height': dataset_util.int64_feature(height), 124 | 'image/width': dataset_util.int64_feature(width), 125 | 'image/filename': dataset_util.bytes_feature( 126 | data['filename'].encode('utf8')), 127 | 'image/source_id': dataset_util.bytes_feature( 128 | data['filename'].encode('utf8')), 129 | 'image/key/sha256': dataset_util.bytes_feature(key.encode('utf8')), 130 | 'image/encoded': dataset_util.bytes_feature(encoded_jpg), 131 | 'image/format': dataset_util.bytes_feature('jpeg'.encode('utf8')), 132 | 'image/object/bbox/xmin': dataset_util.float_list_feature(xmin), 133 | 'image/object/bbox/xmax': dataset_util.float_list_feature(xmax), 134 | 'image/object/bbox/ymin': dataset_util.float_list_feature(ymin), 135 | 'image/object/bbox/ymax': dataset_util.float_list_feature(ymax), 136 | 'image/object/class/text': dataset_util.bytes_list_feature(classes_text), 137 | 'image/object/class/label': dataset_util.int64_list_feature(classes), 138 | 'image/object/difficult': dataset_util.int64_list_feature(difficult_obj), 139 | 'image/object/truncated': dataset_util.int64_list_feature(truncated), 140 | 'image/object/view': dataset_util.bytes_list_feature(poses), 141 | })) 142 | return example 143 | 144 | 145 | def main(_): 146 | data_dir = FLAGS.data_dir 147 | 148 | if not data_dir: 149 | logging.error('Must provide a data directory') 150 | return 151 | 152 | output_path = FLAGS.output_path 153 | 154 | if not output_path: 155 | logging.error('Must provide an output path') 156 | return 157 | 158 | label_map_path = FLAGS.label_map_path 159 | 160 | if not label_map_path: 161 | logging.error('Must provide a label map path') 162 | return 163 | 164 | writer = tf.python_io.TFRecordWriter(output_path) 165 | 166 | label_map_dict = label_map_util.get_label_map_dict(label_map_path) 167 | 168 | logging.info('Reading from data directory.') 169 | 170 | data_dir_jpg_query = os.path.join(data_dir, '*.jpg') 171 | 172 | for idx, image_path in enumerate(glob.glob(data_dir_jpg_query)): 173 | if idx % 20 == 0: 174 | logging.info('On image %d (%s)', idx, image_path) 175 | 176 | annotation_path = os.path.splitext(image_path)[0] + '.xml' 177 | 178 | with tf.gfile.GFile(annotation_path, 'r') as fid: 179 | xml_str = fid.read() 180 | 181 | xml = etree.fromstring(xml_str) 182 | data = dataset_util.recursive_parse_xml_to_dict(xml)['annotation'] 183 | 184 | tf_example = dict_to_tf_example(data, image_path, label_map_dict, 185 | FLAGS.ignore_difficult_instances) 186 | 187 | writer.write(tf_example.SerializeToString()) 188 | 189 | writer.close() 190 | 191 | 192 | if __name__ == '__main__': 193 | tf.app.run() 194 | -------------------------------------------------------------------------------- /data/52.xml: -------------------------------------------------------------------------------- 1 | 2 | formula-1 3 | 52.jpg 4 | /home/andrew/Desktop/formula-1/52.jpg 5 | 6 | Unknown 7 | 8 | 9 | 1000 10 | 667 11 | 3 12 | 13 | 0 14 | 15 | race car 16 | Unspecified 17 | 0 18 | 0 19 | 20 | 412 21 | 197 22 | 445 23 | 221 24 | 25 | 26 | 27 | race car 28 | Unspecified 29 | 0 30 | 0 31 | 32 | 279 33 | 235 34 | 324 35 | 263 36 | 37 | 38 | 39 | race car 40 | Unspecified 41 | 0 42 | 0 43 | 44 | 219 45 | 251 46 | 272 47 | 282 48 | 49 | 50 | 51 | race car 52 | Unspecified 53 | 0 54 | 0 55 | 56 | 767 57 | 471 58 | 892 59 | 554 60 | 61 | 62 | 63 | race car 64 | Unspecified 65 | 0 66 | 0 67 | 68 | 713 69 | 370 70 | 803 71 | 423 72 | 73 | 74 | 75 | race car 76 | Unspecified 77 | 0 78 | 0 79 | 80 | 606 81 | 374 82 | 693 83 | 429 84 | 85 | 86 | 87 | race car 88 | Unspecified 89 | 0 90 | 0 91 | 92 | 583 93 | 500 94 | 714 95 | 583 96 | 97 | 98 | 99 | race car 100 | Unspecified 101 | 0 102 | 0 103 | 104 | 549 105 | 473 106 | 676 107 | 549 108 | 109 | 110 | 111 | race car 112 | Unspecified 113 | 0 114 | 0 115 | 116 | 434 117 | 416 118 | 539 119 | 481 120 | 121 | 122 | 123 | race car 124 | Unspecified 125 | 0 126 | 0 127 | 128 | 300 129 | 414 130 | 405 131 | 476 132 | 133 | 134 | 135 | race car 136 | Unspecified 137 | 0 138 | 0 139 | 140 | 94 141 | 433 142 | 217 143 | 503 144 | 145 | 146 | 147 | race car 148 | Unspecified 149 | 0 150 | 0 151 | 152 | 114 153 | 405 154 | 222 155 | 464 156 | 157 | 158 | 159 | race car 160 | Unspecified 161 | 0 162 | 0 163 | 164 | 323 165 | 380 166 | 413 167 | 436 168 | 169 | 170 | 171 | race car 172 | Unspecified 173 | 0 174 | 0 175 | 176 | 473 177 | 350 178 | 554 179 | 401 180 | 181 | 182 | 183 | race car 184 | Unspecified 185 | 0 186 | 0 187 | 188 | 265 189 | 343 190 | 344 191 | 391 192 | 193 | 194 | 195 | race car 196 | Unspecified 197 | 0 198 | 0 199 | 200 | 263 201 | 281 202 | 323 203 | 316 204 | 205 | 206 | 207 | race car 208 | Unspecified 209 | 0 210 | 0 211 | 212 | 250 213 | 323 214 | 325 215 | 367 216 | 217 | 218 | 219 | race car 220 | Unspecified 221 | 0 222 | 0 223 | 224 | 394 225 | 321 226 | 466 227 | 365 228 | 229 | 230 | 231 | race car 232 | Unspecified 233 | 0 234 | 0 235 | 236 | 397 237 | 275 238 | 455 239 | 312 240 | 241 | 242 | 243 | race car 244 | Unspecified 245 | 0 246 | 0 247 | 248 | 481 249 | 314 250 | 554 251 | 358 252 | 253 | 254 | 255 | race car 256 | Unspecified 257 | 0 258 | 0 259 | 260 | 577 261 | 317 262 | 652 263 | 360 264 | 265 | 266 | 267 | race car 268 | Unspecified 269 | 0 270 | 0 271 | 272 | 557 273 | 306 274 | 623 275 | 348 276 | 277 | 278 | 279 | race car 280 | Unspecified 281 | 0 282 | 0 283 | 284 | 448 285 | 270 286 | 500 287 | 303 288 | 289 | 290 | 291 | race car 292 | Unspecified 293 | 0 294 | 0 295 | 296 | 517 297 | 269 298 | 577 299 | 309 300 | 301 | 302 | 303 | race car 304 | Unspecified 305 | 0 306 | 0 307 | 308 | 482 309 | 278 310 | 544 311 | 314 312 | 313 | 314 | 315 | --------------------------------------------------------------------------------