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

训练时 AP AR 一直为0 #232

Open WjzZwd opened 5 months ago

WjzZwd commented 5 months ago

我制作了自己的数据集 并且整理为了coco格式 image 同时我修改了https://github.com/lyuwenyu/RT-DETR/blob/main/rtdetr_pytorch/src/data/coco/coco_dataset.py#L154处为我的类 image 并且相对应地修改了coco_detection.yaml中的代码 image 但训练时结果一直如下图所示 image 请问这是为什么呢 (ps:不知道这个warning有没有影响 image

lyuwenyu commented 5 months ago

warning没影响, 可视化看下是框不对还是类别不对

WjzZwd commented 5 months ago

我的问题解决了,这是因为我在制作COCO数据集时,annotations中的每一个元素的id,我都会在下一个图片中重新从1初始化开始,实际上,这个id应该是贯彻了整个annotations的,不应该在每个新的图片来到时初始化

minh132 commented 5 months ago

@WjzZwd Can you provide your new config

WjzZwd commented 5 months ago

which file you want?

---原始邮件--- 发件人: @.> 发送时间: 2024年3月20日(周三) 上午10:25 收件人: @.>; 抄送: @.**@.>; 主题: Re: [lyuwenyu/RT-DETR] 训练时 AP AR 一直为0 (Issue #232)

@WjzZwd Can you provide your new config

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

minh132 commented 5 months ago

@WjzZwd file coco_dataset.py

WjzZwd commented 5 months ago

OK i will send you soon

---原始邮件--- 发件人: @.> 发送时间: 2024年3月20日(周三) 上午10:32 收件人: @.>; 抄送: @.**@.>; 主题: Re: [lyuwenyu/RT-DETR] 训练时 AP AR 一直为0 (Issue #232)

@WjzZwd file coco_dataset.py

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

minh132 commented 5 months ago

Hello @WjzZwd , can I ask you something about RTDETR. I have train RT DETR using an aquarium dataset in Roboflow but the result is very bad. Can you provide the dataset you use to train and some config for me. Thanks

Vào Th 4, 20 thg 3, 2024 vào lúc 09:27 windy_z @.***> đã viết:

which file you want?

---原始邮件--- 发件人: @.> 发送时间: 2024年3月20日(周三) 上午10:25 收件人: @.>; 抄送: @.**@.>; 主题: Re: [lyuwenyu/RT-DETR] 训练时 AP AR 一直为0 (Issue #232)

@WjzZwd Can you provide your new config

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/lyuwenyu/RT-DETR/issues/232#issuecomment-2008574671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVJNOIOM6DU3AVVMDIY3X7TYZDXXZAVCNFSM6AAAAABE2EABKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBYGU3TINRXGE . You are receiving this because you commented.Message ID: @.***>

WjzZwd commented 5 months ago

Hello @WjzZwd , can I ask you something about RTDETR. I have train RT DETR using an aquarium dataset in Roboflow but the result is very bad. Can you provide the dataset you use to train and some config for me. Thanks Vào Th 4, 20 thg 3, 2024 vào lúc 09:27 windy_z @.> đã viết: which file you want? ---原始邮件--- 发件人: @.> 发送时间: 2024年3月20日(周三) 上午10:25 收件人: @.>; 抄送: @*.**@*.>; 主题: Re: [lyuwenyu/RT-DETR] 训练时 AP AR 一直为0 (Issue #232) @WjzZwd Can you provide your new config — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> — Reply to this email directly, view it on GitHub <#232 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVJNOIOM6DU3AVVMDIY3X7TYZDXXZAVCNFSM6AAAAABE2EABKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBYGU3TINRXGE . You are receiving this because you commented.Message ID: @.***>

image 我只修改了这里 但我认为这个文件被是否被修改都没关系,因为我在下图中 将remap_mscoco_category:设置为了False image

minh132 commented 5 months ago

why num_classes=3 and category2name only have 2 class @WjzZwd

WjzZwd commented 5 months ago

@minh132 because 0 is backgroud and didn't written in the file

minh132 commented 5 months ago

Can you provide your email. I want ask you something

WjzZwd commented 5 months ago

@minh132 zxz7463yx@163.com

minh132 commented 5 months ago

Can I ask you something. I use aquarium dataset from roboflow(https://public.roboflow.com/object-detection/aquarium) . Config I capture in image attached. I train many epoch but ap is very low and loss is very high(approximately 20). Can you provide your config and data you use. @WjzZwd @lyuwenyu Screenshot from 2024-04-08 23-06-21 Screenshot from 2024-04-08 23-05-30 ![Uploading Screenshot from 2024-04-08 23-04-44.png…]()

WjzZwd commented 5 months ago

image image

below is part of file "annotations": [ { "id": 1, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 507.4649428747899, "bbox": [ 626.001225, 336.593144, 15.554194000000052, 32.625602000000015 ] }, { "id": 2, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 454.49715203815197, "bbox": [ 635.480478, 259.430917, 14.563128000000006, 31.208758999999986 ] }, { "id": 3, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 539.1054014736708, "bbox": [ 1040.808555, 50.681948, 20.009428999999955, 26.942568 ] }, { "id": 4, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 729.635269491221, "bbox": [ 1005.685953, 251.969635, 23.48572499999989, 31.067180999999977 ] }, { "id": 5, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 357.6577425163594, "bbox": [ 569.194116, 59.548848, 13.17986899999994, 27.136669000000005 ] }, { "id": 6, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 317.45542948531806, "bbox": [ 659.241073, 29.226642, 11.993859999999927, 26.468162 ] }, { "id": 7, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 371.71030207648755, "bbox": [ 779.401501, 17.402781, 14.185329999999908, 26.203853 ] }, { "id": 8, "image_id": 1, "category_id": 1, "iscrowd": 0, "area": 425.3477583848202, "bbox": [ 445.691356, 60.188679, 15.66622000000001, 27.150630999999997 ] }, { "id": 9, "image_id": 1, "category_id": 2, "iscrowd": 0, "area": 3331.425140328181, "bbox": [ 706.041467, 658.750551, 55.29386899999997, 60.24944900000003 ] }, "images": [ { "id": 1, "width": 1280, "height": 720, "file_name": "0_000000.png" }, { "id": 2, "width": 1280, "height": 720, "file_name": "0_000001.png" }, { "id": 3, "width": 1280, "height": 720, "file_name": "0_000003.png" }, { "id": 4, "width": 1280, "height": 720, "file_name": "0_000004.png" }, { "id": 5, "width": 1280, "height": 720, "file_name": "0_000005.png" }, { "id": 6, "width": 1280, "height": 720, "file_name": "0_000006.png" }, { "id": 7, "width": 1280, "height": 720, "file_name": "0_000008.png" }, { "id": 8, "width": 1280, "height": 720, "file_name": "0_000012.png" }, { "id": 9, "width": 1280, "height": 720, "file_name": "0_000013.png" }, { "id": 10, "width": 1280, "height": 720, "file_name": "0_000015.png" }, { "id": 11, "width": 1280, "height": 720, "file_name": "0_000016.png" }, { "id": 12, "width": 1280, "height": 720, "file_name": "0_000018.png" }, { "id": 13, "width": 1280, "height": 720, "file_name": "0_000021.png" }, { "id": 14, "width": 1280, "height": 720, "file_name": "0_000022.png" }, { "id": 15, "width": 1280, "height": 720, "file_name": "0_000023.png" }, { "id": 16, "width": 1280, "height": 720, "file_name": "0_000024.png" }, { "id": 17, "width": 1280, "height": 720, "file_name": "0_000025.png" }, { "id": 18, "width": 1280, "height": 720, "file_name": "0_000026.png" },

minh132 commented 4 months ago

@WjzZwd

Cross090525 commented 3 months ago

我的问题解决了,这是因为我在制作COCO数据集时,annotations中的每一个元素的id,我都会在下一个图片中重新从1初始化开始,实际上,这个id应该是贯彻了整个annotations的,不应该在每个新的图片来到时初始化

能详细说说吗,我遇到了相似的问题,几个简化版的coco数据集在DAB-DETR Achors-detr都出现了ap一直为0的问题 我已为此困扰多天,希望您能帮帮我

WjzZwd commented 3 months ago

收到

WjzZwd commented 2 months ago

我的问题解决了,这是因为我在制作COCO数据集时,annotations中的每一个元素的id,我都会在下一个图片中重新从1初始化开始,实际上,这个id应该是贯彻了整个annotations的,不应该在每个新的图片来到时初始化

能详细说说吗,我遇到了相似的问题,几个简化版的coco数据集在DAB-DETR Achors-detr都出现了ap一直为0的问题 我已为此困扰多天,希望您能帮帮我

我的问题在于我的COCO数据集制作出错了 标注格式不太对 因为我在制作COCO数据集时,annotations中的每一个元素的id,我都会在下一个图片中重新从1初始化开始,实际上,这个id应该是贯彻了整个annotations的,不应该在每个新的图片来到时初始化 但这个错误只是导致ap为0的原因之一 !! 我建议仔细检查您的转COCO数据集的代码!! 并且把转出的注释文件和coco标准格式进行对比 或者您可以直接把转COCO数据集的代码送给gpt 让他来判断是否存在潜在的错误!!!