eshirima
eshirima

Reputation: 3867

Create PASCAL Voc for Tensorflow Object Detection API

This question is an extension of this one.

TLDR; I'm trying to train the TS Object Detection API using my own dataset. For proof of concept, I decided to adhere my dataset to the Pascal VOC 2012 benchmark.

At the moment, I am trying to create a TFRecord from my Pascal VOC annotations.

Looking at this line in their create_pascal_tf_record.py script, they're just grabbing the aeroplane's descriptor; lack of a better word, text file. Why is this so? What about the other classes' descriptors?

Side Note

This file; titled aeroplane_train.txt, was included along with the Pascal VOC 2012 dataset inside VOC2012/ImageSets/Main/.

A peek into the file shows that the first column represents an image name and the -1 or 1 states whether that particular image consists of the class(aeroplane) we're interested in.

Partial contents of the aeroplane_train.txt file:

2008_000008 -1
2008_000015 -1
2008_000019 -1
2008_000023 -1
2008_000028 -1
2008_000033  1
2008_000036 -1
2008_000037  1
2008_000041 -1
2008_000045 -1
2008_000053 -1
2008_000060 -1
2008_000066 -1
2008_000070 -1
2008_000074 -1
2008_000085 -1
2008_000089 -1
2008_000093 -1
2008_000095 -1
2008_000096 -1
2008_000097 -1
2008_000099 -1
2008_000103 -1
2008_000105 -1
2008_000109 -1
2008_000112 -1
2008_000128 -1
2008_000131 -1
2008_000132 -1
2008_000141 -1

Upvotes: 2

Views: 6247

Answers (1)

Jonathan Huang
Jonathan Huang

Reputation: 1558

I answered a similar question here. The punchline is that we currently only look at the first column of the aeroplane_train.txt file (which is the same as the other xxx_train.txt files) and lets us figure out the path for each image in the training set.

Upvotes: 7

Related Questions