12

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.

2
  • deadlink in the question Commented Jul 12, 2019 at 12:16
  • updated the links! Commented Jul 13, 2019 at 5:31

2 Answers 2

12

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.

Sign up to request clarification or add additional context in comments.

7 Comments

Thank you so much for the guidance.. I actually was already heading down the Pascal Voc generation route. I'll keep you updated with how it turns down. I had another TS related problem if you don't mind taking a look at it as well. Thank you so much!!!
I also have the same issue. Please do tell me what are you going to fill in for data fields like "truncated" or "difficult" since my dataset does not have these fields.
You don't have to fill in the truncated or difficult fields (they will be ignored by the training/eval binaries).
@JonathanHuang Quick question.. I'm reviewing the create_pascal_tf_record.py script and on this line they explicitly just grab the aeroplane_train.txt only. Why is this so? What about the other classes then?
@ShamaneSiriwardhana I shared my entire experience here. Don't forget to up vote if it helps solve your issue. Happy coding, cheers mate :)
|
0

Except TF Object Detection API you may look at OpenCV Haar Cascades. I was starting my object detection way from that point and if provide well prepared data set it works pretty fine.

There are also many articles and tutorials about creating your own cascades, so it`s easy to start. I was using this blog, it helps me a lot.

1 Comment

I appreciate the suggestion but I already tried Haar Cascades actually before deciding to use the Object Detection API. Two main problems with it. 1: Resizing my object to even 20X40 made my final object look like a blob of black pixels. 2: Once i resized it to the smallest size that still kept its true form, even after letting it run for 48 hours, it didn't even get past stage 0 of training.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.