VisDrone-Dataset icon indicating copy to clipboard operation
VisDrone-Dataset copied to clipboard

How to convert VisDrone label format to yolo

Open ziyaakhan opened this issue 2 years ago • 5 comments

Hi how convert VisDrone annotations to yolo v7 format ?

ziyaakhan avatar Dec 28 '22 10:12 ziyaakhan

Hello, did you manage to do this?

frankykubo avatar Feb 22 '23 16:02 frankykubo

Hi, i couldn't do it but i found this https://www.kaggle.com/datasets/mainhatnam/visdrone-2019-mot-train?select=images

ziyaakhan avatar Feb 22 '23 20:02 ziyaakhan

Thats nice! I am gonna give it a try. Could you fine train any yolo model with that?

Also, I found this: https://github.com/ultralytics/yolov5/blob/master/data/VisDrone.yaml which is script to actually transform VisDrone dataset to yolo-awaited shape. But I cant get it to work because of error:

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 6.00 GiB total capacity; 5.32 GiB already allocated; 0 bytes free; 5.35 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

which happens after few entries in first epoch.

frankykubo avatar Feb 23 '23 00:02 frankykubo

Thats nice! I am gonna give it a try. Could you fine train any yolo model with that?

Yes it is compatible with all versions

Also, I found this: https://github.com/ultralytics/yolov5/blob/master/data/VisDrone.yaml which is script to actually transform VisDrone dataset to yolo-awaited shape. But I cant get it to work because of error:

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 6.00 GiB total capacity; 5.32 GiB already allocated; 0 bytes free; 5.35 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

which happens after few entries in first epoch.

Vram is full, my suggestion choose a lower batch size

ziyaakhan avatar Feb 24 '23 18:02 ziyaakhan

If you're looking for a better way to convert the annotations with a cleaner script, I had been working on this sometime back.

I've added the code to convert the annotations as well as the annotations in the YOLO format on my Github here. Feel free to use that for your experiments if you'd like.

adityatandon avatar Feb 25 '23 01:02 adityatandon