jiawei151 / SGIEL_VIReID

Official PyTorch Implementation of "Shape-Erased Feature Learning for Visible-Infrared Person Re-Identification" (CVPR'23)
MIT License
38 stars 3 forks source link

关于baseline中使用EMA的问题 #1

Closed lilslsls closed 1 year ago

lilslsls commented 1 year ago

您好!感谢您精彩的工作。我看到本文的baseline,Rank-1精度大约到了70左右。我去掉您的所有项,训练出来精度为67.99。但是,每个step更新参数后,也执行了EMA更新,但是ema模型最终精度为1%,而且整个训练过程中测试也没啥变化,不知道什么情况。还有就是不加ema 67.99的精度是正常的吗?

lilslsls commented 1 year ago

All Average: FC: Rank-1: 67.99% | Rank-5: 90.01% | Rank-10: 95.61%| Rank-20: 98.58%| mAP: 64.63%| mINP: 50.55% POOL: Rank-1: 61.67% | Rank-5: 88.36% | Rank-10: 95.22%| Rank-20: 98.75%| mAP: 61.67%| mINP: 49.73% Extracting Query Feature... Extracting Time: 3.206 Extracting Gallery Feature... All Average by ema: FC: Rank-1: 1.05% | Rank-5: 5.26% | Rank-10: 10.57%| Rank-20: 21.03%| mAP: 2.97%| mINP: 1.58% POOL: Rank-1: 1.05% | Rank-5: 5.26% | Rank-10: 10.52%| Rank-20: 20.80%| mAP: 3.03%| mINP: 1.66% Time: 2023-04-07 15:13:07; Best Epoch: 66;

jiawei151 commented 1 year ago

个step更新参数后,也执行了EMA更新,

Hi, @lilslsls ! Thanks for your interest in our work. I'm wondering whether the BN running buffers has been updated in your implementation. In our baseline implementation, Line 353-354 in train.py is required to make all BN running buffers up-to-date.

with torch.no_grad():
    outputs_ema = net_ema(x1, x2, x1_shape, x2_shape, y=y)
lilslsls commented 1 year ago

Thank you very much for your help. The test results during the training phase are now normal.