Currently using the YOLO v5 code from this https://github.com/ultralytics/yolov5 in which each txt has a line referring to the <object-class> <x> <y> <width> <height>
(image below). Each image has multiple classes (in the annotation file below the image has a <object-class>
of 0
and 27
). The goal is to select an equal number of object-class
from the entire dataset. Currently, the issue is that the image comes with the other labels/bounding boxes too. How can I filter so only a certain row is read from the annotation file? Currently have 1000s of annotation files.
image source: COCO json annotation to YOLO txt format