models icon indicating copy to clipboard operation
models copied to clipboard

create_mscoco_tf_record.py for Object Detection API

Open BoltzmannBrain opened this issue 9 years ago • 16 comments

The new Object Detection API is great, but how come there are no details for evaluating the models on MS COCO? The models were trained on this data, so it would be great to include a create_mscoco_tf_record.py (like you have for the PASCAL and Oxford pet datasets) to test on the MS COCO data. Not to mention then people would be able to reproduce the paper results.

BoltzmannBrain avatar Jun 21 '17 03:06 BoltzmannBrain

There's a version for the im2txt model, but it's specific to the MS COCO captions dataset.

BoltzmannBrain avatar Jun 21 '17 03:06 BoltzmannBrain

Hi @BoltzmannBrain - yes, we'd like to have scripts for COCO. For the first release, we decided to leave it out for a number of reasons, but if you don't want to wait, it should be easy enough to modify the code for the im2txt model to output tfrecord files for bounding box detection.

The config files that we have provided for the Pets dataset are exactly the same ones (except for the paths to labelmap and dataset) that we use internally for training on COCO, so really the main thing that's missing is a dataset.

jch1 avatar Jun 21 '17 03:06 jch1

Sounds good, I'll work off the im2txt version for now. Thank you for the quick response :)

BoltzmannBrain avatar Jun 21 '17 03:06 BoltzmannBrain

@BoltzmannBrain Did you end up creating a script? trying to evaluate the model on MSCOCO as well, was also hoping to reproduce the paper results

jaydee713 avatar Jun 22 '17 20:06 jaydee713

@jaydee713 not yet, hopefully I'll have time to get to it this weekend. If I do I'll be sure to push it and let you know here.

BoltzmannBrain avatar Jun 23 '17 02:06 BoltzmannBrain

@BoltzmannBrain any luck? I've tried fidgeting with a script myself but keep running into miscellaneous errors... I'm still relatively new to TF so it's giving me quite the headache haha. Hopefully you've had better luck?

jaydee713 avatar Jun 28 '17 12:06 jaydee713

@jaydee713 sorry this has fallen to my back-burner; it's one of a few experiments for a side project. Not to mention that it looks like I'll need to train my own models and can't utilize the pre-trained weights here 🙁 .

BoltzmannBrain avatar Jun 28 '17 15:06 BoltzmannBrain

Closing this for now.

alive-zk avatar Jun 30 '17 17:06 alive-zk

@jaydee713 I wrote a script to convert coco dataset to tfrecords according the "create_pascal_tf_record.py", actually, it is very easy. You only need to supply the labels of bbox, coordinates of the bboxs. If you need it, you can contact me.

MetaPeak avatar Jul 05 '17 03:07 MetaPeak

Hi, everyone, I wrote the code to convert coco dataset to tf record for Tensorflow object detection API . Here is the code. https://github.com/MetaPeak/tensorflow_object_detection_create_coco_tfrecord

MetaPeak avatar Jul 05 '17 06:07 MetaPeak

Great job! I will try it immediately

offbye avatar Oct 23 '17 10:10 offbye

I just have try it and fix some problems! Now I can train model on mscoco dataset !
https://github.com/offbye/tensorflow_object_detection_create_coco_tfrecord/

offbye avatar Oct 23 '17 12:10 offbye

FYI, https://github.com/tensorflow/models/blob/master/research/object_detection/dataset_tools/create_coco_tf_record.py was added in a recent update :), and coco_detection_metrics was added too! Thanks to the object detection team!

janeliulwq avatar Mar 01 '18 17:03 janeliulwq

Doe someone of you know how to create the tf record file for only some selected, but not all, coco classes?

gustavz avatar Jun 03 '18 16:06 gustavz

Doe someone of you know how to create the tf record file for only some selected, but not all, coco classes?

hello GustavZ, have you found any way to create part of coco dataset into TFrecord file?

MyyyPanda avatar Feb 17 '19 16:02 MyyyPanda

Doe someone of you know how to create the tf record file for only some selected, but not all, coco classes?

hello GustavZ, have you found any way to create part of coco dataset into TFrecord file?

I would also be interested if someone managed to create part of the coco dataset.

NoraKrbr avatar Jul 26 '19 08:07 NoraKrbr