label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

Export to YOLO format for Video Annotation

Open sajidahmed12 opened this issue 2 years ago • 6 comments
trafficstars

I was trying to annotate bounding boxes in a video and trying to export the annotations into YOLO format {images, labels.txt}

Describe the solution you'd like I would like to annotate videos and draw bounding boxes similar to what we do while using images. And I would like to export the data into YOLO format and possibly COCO format as mentioned earlier.

Added a picture to showcase the current scenario of l;abel-studio for video annotation data export.

image

sajidahmed12 avatar Jun 15 '23 07:06 sajidahmed12

This is precisely what I want to do as well! :) +1

I don't think it will be hard (all the metadata I need is there to hammer out a re-usable script) for my dataset and my use, but it would be nice to click a button and have it process the video for me in a format that is popular :)

KeithHanson avatar Jun 24 '23 03:06 KeithHanson

Hi, I also want this feature. I don't want to use outsourced material to achieve this tiny problem. Here are some issues discussed for the same problem.

https://github.com/heartexlabs/label-studio/issues/3405

https://github.com/deepinvalue/video_annotations_to_yolo

However, I found this "enable" parameter in an official document. Does this mean Label Studio automatically interpolates video annotation?

Whether the consequent frames interpolation is toggled on / off (for example, to label occlusion)

https://labelstud.io/templates/video_object_detector.html#:~:text=frame%20(clock%2Dwise)-,enabled,-boolean

shure-dev avatar Jun 24 '23 11:06 shure-dev

@shure-dev Basically, yes. When you label something, it will interpolate to the end of the video automatically. You then click the enable/disable button for the keyframe, and you can turn off interpolation.

In the output, they're telling us through the enabled attribute, "Hey, between this keyframe and the next, it was intended by the labeler that the bounding box is interpolated." so as the person using this label output, you'll know what to do.

When it is enabled: false, it means that this one frame has this bounding box, and that is all (ie. when something pops off the screen and back on - you wouldn't want interpolation for that).

KeithHanson avatar Jun 24 '23 12:06 KeithHanson

+1

mhasan502 avatar Jun 25 '23 13:06 mhasan502

@KeithHanson

Hi, thank you for your comment

Could you tell me how to use YOLO easily without massive effort with Label Studio? I tried to search for information on the Internet, however, I couldn't find a practical & specific way to annotate a video and use it for YOLO Should we use this ML backend feature? But it seems complicated and heavy. https://labelstud.io/guide/ml.html#Quickstart-with-an-example-ML-backend

Can we annotate on Label Studio with a custom ml model easily without the ML-backend feature??

I think there must be an easy way to use YOLO on Label Studio, for video data.

On the other hand, there is an automatic annotation feature in CVAT, we can just upload ML model https://opencv.github.io/cvat/docs/manual/advanced/automatic-annotation/

Should we use CVAT??

shure-dev avatar Jun 26 '23 08:06 shure-dev

This is my exact problem too. Thinking about using CVAT anyway.

firstrandell avatar Jul 27 '23 19:07 firstrandell

+1

shure-dev avatar Dec 08 '23 09:12 shure-dev

+1

salmankdurrani avatar Feb 29 '24 10:02 salmankdurrani

Similar issue https://github.com/HumanSignal/label-studio/issues/3405

makseq avatar Jun 13 '24 11:06 makseq

You can use the following code to convert annotated videos from Label Studio to YOLO format. (Note: Only Object detection is supported) Repo: https://github.com/m-usman98/LabelStudio-To-YOLO-Format

m-usman98 avatar Dec 02 '24 03:12 m-usman98