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
2.21k stars 242 forks source link

请问rt-detr使用dab-detr的宽高调制了嘛 #45

Open flyingbird9 opened 1 year ago

flyingbird9 commented 1 year ago

在代码的哪个部分呢

lyuwenyu commented 1 year ago

rtdetr的reference box的逻辑
https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_paddle/ppdet/modeling/transformers/rtdetr_transformer.py#L210 https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_paddle/ppdet/modeling/transformers/rtdetr_transformer.py#L62

flyingbird9 commented 1 year ago

谢谢,请问我运行pytorch版本遇到了这个问题,请问是什么原因呢 屏幕截图 2023-08-25 101152

lyuwenyu commented 1 year ago

自己的数据还是? 另外torch的版本需要 torch==2.01

flyingbird9 commented 1 year ago

我用的自己的数据,但是在paddle下能跑,我用的cpu 版本,torch是2.0.1

Zhao-Yian commented 1 year ago

自己的数据需要保证处理成coco格式,其中image_id需要是int类型,并且和图像文件名一一对应,否则使用torchvision.datasets.CocoDetection在按索引读取数据的时候会抛出异常。

另外,使用自己的数据注意一下这两个变量有没有正确设置,比如自定义数据集有7个非背景类别,那么num_classes需要设置为8(+背景类),remap_mscoco_category需要设置为False. image