AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.59k stars 7.95k forks source link

How to prepare annotation file for a multi label object detection problem? #7225

Open dsbyprateekg opened 3 years ago

dsbyprateekg commented 3 years ago

Hi @AlexeyAB & Team ,

I am planning to solve a multi-label problem using YOLOv4. The problem is to detect the presence and position of catheters and lines on chest x-rays- https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/data

The dataset has x-ray images and each image may have multiple catheters and lines as per the given annotation csv file- annotations

The sample image of xray with and without annotation is as below- xray

One sample of multi labels annotations- multi

Now my question is can we convert the given annotations from csv file into YOLO format? Because if we can do so then ths will be very helful in data preparation. Otherwise how can I annotate the multi lables in one image? Please suggest how to proceed?

stephanecharette commented 3 years ago

I have two pages that talk about annotations. Unfortunately, I don't know how I would do what you are asking. While I can imagine annotating the entire catheter or line as a single object, I don't know how I would go about finding the exact path it is taking.

Regardless, here are the two pages in case that helps you:

If you are looking for more info on the format the annotations use in the .txt file, I also have a page that describes that: