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.73k stars 184 forks source link

rt-detr训练问题 #215

Open changzipeng opened 4 months ago

changzipeng commented 4 months ago

作者姐姐/哥哥,想问下,我在rt-detr中增加了一部分损失,刚开始可能我加的那部分损失比较大,训练1个epoch之后map只有一点多,之后我把我增加的那部分损失设置了0.1的权重,就是主要还是以rt-detr原本的损失为主,但是训练1个epoch之后,map还是只有一点多,请问用pytorch版本训练的话,训练1个epoch之后,map确实是1点多嘛?请作者姐姐/哥哥帮忙解答一下,谢谢。

lyuwenyu commented 4 months ago

首先你不加新loss的时候跑出来的是多少,如果没问题的话 那就要考虑你加的loss对不对了

changzipeng commented 4 months ago

我刚重新跑了下您的代码,没有修改loss的情况下,第一个epoch跑出来的结果也是只有1.1,请问这是怎么回事呢,配置文件选择的是50vd。

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年02月27日 19:28 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [lyuwenyu/RT-DETR] rt-detr训练问题 (Issue #215) |

首先你不加新loss的时候跑出来的是多少,如果没问题的话 那就要考虑你加的loss对不对了

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

changzipeng commented 4 months ago

我刚找到了您之前发的训练日志,我环境都配置好了,然后也没有修改损失,但是训练1个epoch之后得到的map确实只有1点多,请问是为什么呀

changzipeng commented 4 months ago

{"train_lr": 1.0000000000000546e-05, "train_loss": 25.97210826716403, "train_loss_bbox": 0.30569040876884157, "train_loss_bbox_aux_0": 0.3396616235454012, "train_loss_bbox_aux_1": 0.31699833980145836, "train_loss_bbox_aux_2": 0.31059300172184634, "train_loss_bbox_aux_3": 0.30857639564872674, "train_loss_bbox_aux_4": 0.307290489057372, "train_loss_bbox_aux_5": 0.4207990294309522, "train_loss_bbox_dn_0": 0.5608065604284782, "train_loss_bbox_dn_1": 0.49003252485608534, "train_loss_bbox_dn_2": 0.46907700469444524, "train_loss_bbox_dn_3": 0.46368390229619694, "train_loss_bbox_dn_4": 0.46267121204879375, "train_loss_bbox_dn_5": 0.46264188827478914, "train_loss_giou": 0.7457063499619928, "train_loss_giou_aux_0": 0.800900873220549, "train_loss_giou_aux_1": 0.7672768843386826, "train_loss_giou_aux_2": 0.7555094527106606, "train_loss_giou_aux_3": 0.7504715433861492, "train_loss_giou_aux_4": 0.7480922440956559, "train_loss_giou_aux_5": 0.9134355154199367, "train_loss_giou_dn_0": 0.995198975932561, "train_loss_giou_dn_1": 0.8864389821235985, "train_loss_giou_dn_2": 0.8489941978557788, "train_loss_giou_dn_3": 0.8374191019268363, "train_loss_giou_dn_4": 0.8348556490876783, "train_loss_giou_dn_5": 0.8351960645167992, "train_loss_vfl": 0.9873572789766494, "train_loss_vfl_aux_0": 1.0104085504545115, "train_loss_vfl_aux_1": 1.0097336226188167, "train_loss_vfl_aux_2": 0.9911793962586608, "train_loss_vfl_aux_3": 0.9779896216368008, "train_loss_vfl_aux_4": 0.9787965806640244, "train_loss_vfl_aux_5": 1.006335208529825, "train_loss_vfl_dn_0": 0.49366175690604114, "train_loss_vfl_dn_1": 0.5023080106478461, "train_loss_vfl_dn_2": 0.5067669196467784, "train_loss_vfl_dn_3": 0.5150966057834808, "train_loss_vfl_dn_4": 0.5231417504196059, "train_loss_vfl_dn_5": 0.5313146874907213, "test_coco_eval_bbox": [0.01057645191398459, 0.04182697358541972, 0.0019154687104784044, 0.000603006109174136, 0.004053798896020085, 0.032881137587167555, 0.03176936181668719, 0.05751170897709681, 0.07675709781304439, 0.0059367203716092195, 0.049166921920529044, 0.1880438751072363], "epoch": 0, "n_parameters": 42862860}

changzipeng commented 4 months ago

上面这个是训练的日志

lyuwenyu commented 4 months ago

那个模型,什么数据呢

changzipeng commented 4 months ago

我找到问题在哪了,我在训练的时候加了pad,验证的时候没有加pad哭唧唧

hzy-del commented 1 month ago

我找到问题在哪了,我在训练的时候加了pad,验证的时候没有加pad哭唧唧

你好,我训练也是只有1.多,可以问一下你具体是怎么解决的吗?

changzipeng commented 1 month ago

可以检查下配置文件里面是否多加了pad,我记得我之前好像训练加了pad,验证没加训练效果就很差

@.***

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年05月26日 13:55 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [lyuwenyu/RT-DETR] rt-detr训练问题 (Issue #215) |

我找到问题在哪了,我在训练的时候加了pad,验证的时候没有加pad哭唧唧

你好,我训练也是只有1.多,可以问一下你具体是怎么解决的吗?

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