1

Im running training process with TF Object Detection API on my own dataset with several classes, however after pretty big amount of steps (about 20k) I can see at PerformanceByCategory menu in TensorBoard that mAP is increasing only for one category, other are not even started.

enter image description here

My dataset is in PascalVOC format and I was following this answer to create it. After data preparation I have generated Pascal records, edited label map and pipeline config, downloaded all the staff with ssd model checkpoints to Google Cloud Platform and started training and evaluation jobs accordingly to Object Detection API Documentation.

But it seems from TensorBoard that something is wrong with data or something other because nothing happens with my another classes.

Are there any hints or features when training Object Detection API with several classes?

Thanks for any help in advance!

[EDITED]:

So having tried to train model with PascalVOC dataset they provide by default in tutorial I noticed that their Pascal records are much larger than mine. I opened them in text editor and there were references for every class from ImageSets, however my records contain references for only that class I pointed in create_pascal_tf_records.py.

What am I missing guys? Please help!

Michael
  • 1,170
  • 2
  • 14
  • 35
  • `num_steps` denotes the total number of iterations your program will run. It seems there are some problem with you data, check your data are properly retrieved by the reader – Ishant Mrinal Aug 07 '17 at 10:35
  • how can I check that, body? I was following [this answer](https://stackoverflow.com/questions/44973184/train-tensorflow-object-detection-on-own-dataset) to generate data in voc pascal format, after I have created pascal tf records and changed label map. Everything looks ok, what can affect in this case? – Michael Aug 07 '17 at 11:48

1 Answers1

1

OK, I think I have figured out what was wrong.

The main problem was I made ImageSets uncorrectly. For each class I have been adding their corresponding lists of images, so each train and val files were different in my case.

Due to this answer:

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.

Because of every file is different the create_pascal_tf_records.py was picking paths to only my first class.

Hope this will help someone else.

Michael
  • 1,170
  • 2
  • 14
  • 35
  • I am also facing the same issue, can you please elaborate how to solve this issue? . I have 3 classes, I labeled them using labelImg and then created the csv of the xml and then created my tfrecords, altogether for all 3 classes. So, in this case, I have only 1 train tfrecords and 1 val tfrecords. Help me!! – saikishor May 03 '18 at 15:23
  • @saikishor in my case, the fault was in train and val files. I had different lists of images for each of these files, but as figured out all these files should have same image lists. So, for example aeroplane_train.txt, dog_train.txt, cat_train.txt and others should have same first column, only second differs. – Michael May 04 '18 at 07:32
  • Good to know that!! I found the issue with mine last night, because, I have accidentally mention the number of classes as 1 in the config file, so I couldn't see it. In my case, I have created my dataset from the csv file created from those xmls. I found it to be easy. Thanks for the reply. – saikishor May 04 '18 at 08:11
  • @saikishor happy to hear you have resolved an issue! Good luck – Michael May 04 '18 at 10:13