Search code examples
machine-learningtensorflowobject-detection

Tensorflow Object Detection API


I decided to take a dip into ML and with a lot of trial and error was able to create a model using TS' inception.

To take this a step further, I want to use their Object Detection API. But their input preparation instructions, references the use of Pascal VOC 2012 dataset but I want to do the training on my own dataset.

Does this mean I need to setup my datasets to either Pascal VOC or Oxford IIT format? If yes, how do I go about doing this?

If no (my instinct says this is the case), what are the alternatives of using TS object detection with my own datasets?

Side Note: I know that my trained inception model can't be used for localization because its a classifier

Edit:

For those still looking to achieve this, here is how I went about doing it.


Solution

  • The training jobs in the Tensorflow Object Detection API expect to get TF Record files with certain fields populated with groundtruth data.

    You can either set up your data in the same format as the Pascal VOC or Oxford-IIIT examples, or you can just directly create the TFRecord files ignoring the XML formats.

    In the latter case, the create_pet_tf_record.py or create_pascal_tf_record.py scripts are likely to still be useful as a reference for which fields the API expects to see and what format they should take. Currently we do not provide a tool that creates these TFRecord files generally, so you will have to write your own.