Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create tfrecord for coco dataset. #401

Open
NaveenVinayakS opened this issue May 27, 2022 · 1 comment
Open

How to create tfrecord for coco dataset. #401

NaveenVinayakS opened this issue May 27, 2022 · 1 comment

Comments

@NaveenVinayakS
Copy link

I am looking to train this on coco dataset but how to create tfrecord for coco dataset. No code is given for coco tfrecord creation only for VOC tfrecord creation is given . can someone help me with this.

@P4ll
Copy link

P4ll commented Aug 15, 2022

Hello. @NaveenVinayakS

Where is the problem? You need write a script like in a tools/voc2012.py.

For this model enough just image/encoded, image/object/bbox/xmin, image/object/bbox/xmax, image/object/bbox/ymin, image/object/bbox/ymax, image/object/class/text.

image/encoded - just open image as bytes
image/object/bbox/xmin - x min bbox value divided by width
image/object/bbox/xmax - (x min bbox value + width) divided by width
image/object/bbox/ymin - y min bbox value divided by height
image/object/bbox/ymax - (y min bbox value + height) divided by height
image/object/class/text - label string

coco annotation bbox structure
[top left x position, top left y position, width, height]

I have the script for converting YOLO format to tfRecord if u need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants