yolov3-tf2 icon indicating copy to clipboard operation
yolov3-tf2 copied to clipboard

How to create tfrecord for coco dataset.

Open NaveenVinayakS opened this issue 2 years ago • 1 comments

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.

NaveenVinayakS avatar May 27 '22 03:05 NaveenVinayakS

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.

P4ll avatar Aug 15 '22 11:08 P4ll