Convert unknown labels to yolov5

Hello datascience-community,

i need your kind assistance.

I own a dataset of images with unknown label format, wich is:

angry_actor_104.jpg 0 28 113 226 141 22.9362 0

It indicates an image as follows:

image_name face_id_in_image face_box_top face_box_left face_box_right face_box_bottom face_box_cofidence expression_label

My question is: How can this be converted into the yolov5 format?

I have been looking this up for a long time and hope someone can help.
Thank you very much in advance.

Best regards

Hi, from rewriting your dataset,

image_name: angry_actor_104.jpg
face_id_in_image: 0
face_box_top: 28
face_box_left: 113
face_box_right: 226
face_box_bottom: 141
face_box_cofidence: 22.9362
expression_label: 0

YOLOv5 handles the dataset both image and the corresponding annotation have the same file name.
The annotation only includes the followings,
label, box_center_x, box_center_y, width, height
and all coordinates are [0, 1).

Consequently, your annotation should be
filename: angry_actor_104.txt
Inside the file,
expression_label bbox_center_x bbox_center_y bbox_width bbox_height

if there are multiple bbox inside an image, your annotation text file should be
expression_label1 bbox_center_x1 bbox_center_y1 bbox_width1 bbox_height1
expression_label2 bbox_center_x2 bbox_center_y2 bbox_width2 bbox_height2