chuanenlin / drone-net

https://towardsdatascience.com/tutorial-build-an-object-detection-system-using-yolo-9a930513643a
154 stars 66 forks source link

Image labels are wrong #1

Open DogukanAltay opened 5 years ago

DogukanAltay commented 5 years ago

You should specify the labeling format. If it is , the bounding boxes are completely broken.

chuanenlin commented 5 years ago

The class ID is the first digit of each line in the label .txt files. In YOLO, the IDs start from 0 and increments by one for each new class. Since the labels are specifically for one class only (drone), all the labels have ID of 0.

JSGFJSG commented 5 years ago

Could you explain how is stored the bounding box information in the label files?. Because if you draw the bounding box in the image, it is completely broken.

Thanks

chuanenlin commented 5 years ago

@JSGFJSG The labels are in the format: [class_id] [x_center] [y_center] [x_width] [y_width] which is the standard format for YOLO.

JSGFJSG commented 5 years ago

@chuanenlin Why don't you use the bounding box coordinates normalized by image width and height as is indicated in https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects?. Thanks in advance.

chuanenlin commented 5 years ago

@JSGFJSG I haven't normalized the coordinates because this is the correct labeling format for the Linux (original) version of YOLO. However, I think it should be relatively straightforward to do normalization since you can easily find the image width and height of all raw images.