lyuwenyu / RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥
Apache License 2.0
1.64k stars 178 forks source link

bbox format and normalization #324

Closed PaulineTreyvaud closed 4 weeks ago

PaulineTreyvaud commented 1 month ago

Hi ! Thanks for the great work and the continuous improvements.

I was wondering about the dataloader : I don't understand why at l20 we convert the box annotation without specifying the input format. When I run the code and print the in_fmt (transforms.py l136), it display (XYXY), while the common coco annotation format is xywh (top left corner, width, lenght). Shouldn't the input format be specified as well in the dataloader ?

Thanks !

lyuwenyu commented 4 weeks ago

In CocoDetection , the box format is xyxy by default. https://github.com/lyuwenyu/RT-DETR/blob/5b628eaa0a2fc25bdafec7e6148d5296b144af85/rtdetr_pytorch/src/data/coco/coco_dataset.py#L47

https://github.com/lyuwenyu/RT-DETR/blob/5b628eaa0a2fc25bdafec7e6148d5296b144af85/rtdetr_pytorch/src/data/coco/coco_dataset.py#L102

PaulineTreyvaud commented 4 weeks ago

Thank you !