Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 1.4 KB

File metadata and controls

22 lines (18 loc) · 1.4 KB

COCO-python-script-for-object-detection-data

Description

create_data.py will create a .txt file per image. Each file contains in char format the value of each pixel of the image in RGB mode. the images are padded so that the size of each image is 640x640. So each .txt file contains 640x640x3 values separated with commas. In addition the file will contain the values always in char format x,y,h,w,category_object for each object in the image. x,y are the coordinates value of the box of the object starting from the left corner, h,w are the sizes of the box of the object and category_object is a number identifying the object. The category_object id can be seen here: https://github.com/nightrome/cocostuff/blob/master/labels.txt

So, for instance if we have an image with 3 objects we have: 640x640x3 values separated with commas and then ...,x1,y1,h1,w1,id1,x2,y2,h2,w2,id2,x3,y3,h3,w3,id3,