dongbo811 / AFFormer

119 stars 12 forks source link

你好,我在使用您的模型在ADE20K上进行训练时,发现达不到您在论文中的mIoU指标,发现有10个点的下降 #16

Closed InMyDreammer closed 1 year ago

InMyDreammer commented 1 year ago

这是我的日志,mIoU只有31.31,但在您的论文的Table1中mIoU却是41.8 20231028_132107.log

dongbo811 commented 1 year ago

Thank you very much for trying AFFormer. From your log, I find that it is mainly caused by the mismatch between the model and the pre-trained weights. Please check the version network and pre-trained weights. If you have any questions, please feel free to contact~

在 2023-10-28 17:28:05,"InMyDreammer" @.***> 写道:

这是我的日志,mIoU只有31.31,但在您的论文的Table1中mIoU却是41.8 20231028_132107.log

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

InMyDreammer commented 1 year ago

我使用您的Imagenet1k作为预训练权重,是否应该使用在ade20k上的预训练权重呢?发自我的 iPhone在 2023年10月28日,17:35,TimZ @.***> 写道: Thank you very much for trying AFFormer. From your log, I find that it is mainly caused by the mismatch between the model and the pre-trained weights. Please check the version network and pre-trained weights. If you have any questions, please feel free to contact~

在 2023-10-28 17:28:05,"InMyDreammer" @.***> 写道:

这是我的日志,mIoU只有31.31,但在您的论文的Table1中mIoU却是41.8 20231028_132107.log

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

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

InMyDreammer commented 1 year ago

Thank you very much for trying AFFormer. From your log, I find that it is mainly caused by the mismatch between the model and the pre-trained weights. Please check the version network and pre-trained weights. If you have any questions, please feel free to contact~ 在 2023-10-28 17:28:05,"InMyDreammer" @.> 写道: 这是我的日志,mIoU只有31.31,但在您的论文的Table1中mIoU却是41.8 20231028_132107.log — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>

我仔细核对了一下,我发现我使用的是base版本的AFFormer,加载的权重也是base版本的AFFormer

InMyDreammer commented 1 year ago

您可以再看一下吗?因为我核对了很多遍版本是没有问题的,使用的是base版本的AFFormer,预训练文件也是base版本的Imagenet1K

dongbo1998 commented 1 year ago

Sorry, I have re-updated the pre-training weights. Please download and try again. If you have more questions, please contact me.

InMyDreammer commented 1 year ago

Sorry, I have re-updated the pre-training weights. Please download and try again. If you have more questions, please contact me.

我尝试了您新的预训练权重,但是mIoU结果只有39.12,距离您41.8还有差距,我查看了日志发现仍然有一部分参数不匹配:unexpected key in source state_dict: cls_head.cls.weight, cls_head.cls.bias,您确定您上传的预训练权重没有问题吗? 这是我的训练日志 20231029_115047.log

dongbo1998 commented 1 year ago

First of all, it is normal for cls-related parameters not to match. The pre-training weights are obtained by training on imagenet-1k. There will be a classification layer and there is no need to load it when doing segmentation.

Secondly, there are two reasons why the training did not achieve the results of the paper:

  1. Environmental issues. According to previous experience, segmentation tasks are sensitive to different environment versions, GPU and CUDA versions, etc., which will introduce certain uncertainties;
  2. Parameter randomization problem. The initial parameters of each training are different, and the training effect will be different;

Since the experiment has been going on for a long time, there are currently not enough resources to reproduce it again, but I have saved the experiment log at that time. If you are interested, please add my WeChat (15316357479) and I will send it to you privately.