yun-liu / RCF

Richer Convolutional Features for Edge Detection
Other
758 stars 260 forks source link

使用pytorch版本的RCF无法复现相同的结果 #107

Closed aobannong closed 3 years ago

aobannong commented 4 years ago

您好,我使用了您在项目中提到的pytorch版本的RCF进行复现。在不修改代码的情况下,我得到的结果远低于pytorch版本RCF中的结果,并且从可视化的效果中可以看到很多纹理信息都被保留了下来。我尝试过pytorch1.2和pytorch0.4,也换过硬件环境,但总是遇到相同的问题:损失已经不下降了,但结果还差很多,有很多纹理信息。请问您遇见过这样的问题吗?

yun-liu commented 4 years ago

这个我也不清楚,因为pytorch代码不是我写的,是一个师弟写的。我看他的环境是pytorch 0.4.1, python 3.6, ubuntu16.04。另外你评测的时候做NMS了吗?

aobannong commented 4 years ago

嗯嗯,做了NMS,我也在0.4.1的环境下测试了,如果把stepsize改大会有提升,但在只用BSDS500的条件下使用NMS后的ODS也只有0.760,现在完全没有进一步的头绪,不知道您的师弟有没有遇到过这样的情况

yun-liu commented 4 years ago

我看过他的结果,他能稳定80+. 你说的这个情况好奇怪。对了,你的数据有做data augmentation吗?

aobannong commented 4 years ago

我用了您这里提供的数据,但之前我只用了BSDS500的数据,不知道这个影响是否很大。我再次做实验加上了pascal的数据,结果是0.788,但这是基于将stepsize调整后才有的结果。 ps:这里的结果是单尺度的结果,不知道和您师弟在单尺度上测试的结果差距是否较大

yun-liu commented 4 years ago

他单尺度大概是0.803左右。我提供的数据用了和HED一样的数据增强,效果会好一些。你的显卡是什么呀?我们是用Titan Xp、1080Ti和Titan X这些显卡跑的,没用最近新的显卡跑

aobannong commented 4 years ago

我用的是2080ti,不知道这个会不会有影响?

yun-liu commented 4 years ago

不清楚。。你试试cuda 9.2 + pytorch 0.4.1 + python 3.6

aobannong commented 4 years ago

我在Tesla上试了一下您说的配置,还是一样的情况,如果按照pytorch原代码训练,那ODS就只有0.76的样子,把stepsize调高后才会达到0.78,但还是无法达到0.79以上。

aobannong commented 4 years ago

如果不介意,请问可以上传一下您师弟的训练log吗?我想对比一下收敛的情况

yun-liu commented 4 years ago

要不你用邮箱发我一下你的微信,我把他的微信推给你?

AlbertTJU commented 4 years ago

要不你用邮箱发我一下你的微信,我把他的微信推给你?

您好,我用了pytorch版本的代码,出现全黑的图,请问一下这个该怎么解决啊?我之前咨询过您的师弟,然后他问我是否更换过数据集,我并没有更换数据集,也没有修改代码,然后可能您的师弟比较忙就没有回复过我了

AlbertTJU commented 4 years ago

如果不介意,请问可以上传一下您师弟的训练log吗?我想对比一下收敛的情况

您好,请问您的eval是怎么做的呢?我没有找到教程。。。

sunshine-ssl commented 4 years ago

@aobannong 请问您的问题解决了吗,我用pytorch版本的代码在BSDS500上只跑到0.778,加上PASCAL数据集的时候训练出来的是灰色的图,请问您是直接把这两个数据集放一起做训练的吗

AlbertTJU commented 4 years ago

@aobannong 请问您的问题解决了吗,我用pytorch版本的代码在BSDS500上只跑到0.778,加上PASCAL数据集的时候训练出来的是灰色的图,请问您是直接把这两个数据集放一起做训练的吗

不出图是不是环境的原因呢?我之前也不出图,然后换了环境可以了,昨天刚跑完

sunshine-ssl commented 4 years ago

@AlbertTJU 我用BSDS500数据集跑的时候是正常的,BSDS加PASCAL数据集结果是灰色的,你的也是这样吗

AlbertTJU commented 4 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

之前是,后来换了环境之后不是了

                            395494013

                                395494013@qq.com

    签名由
    网易邮箱大师
    定制

在2020年3月16日 17:14,sunshine-ssl<notifications@github.com> 写道: 

@AlbertTJU 我用BSDS500数据集跑的时候是正常的,BSDS加PASCAL数据集结果是灰色的,你的也是这样吗

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

sunshine-ssl commented 4 years ago

@AlbertTJU 那你后来换了什么环境呀

AlbertTJU commented 4 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

    torch 0.4.1 cuda9.0 显卡是泰坦xp,之前是torch以上的版本

                            395494013

                                395494013@qq.com

    签名由
    网易邮箱大师
    定制

在2020年3月16日 17:28,sunshine-ssl<notifications@github.com> 写道: 

@AlbertTJU 那你后来换了什么环境呀

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

AlbertTJU commented 4 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

    我想问一下,您是怎么eval的?我的报错

                            395494013

                                395494013@qq.com

    签名由
    网易邮箱大师
    定制

在2020年3月16日 17:29,神盾局特工TJU<395494013@qq.com> 写道: 

font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

    torch 0.4.1 cuda9.0 显卡是泰坦xp,之前是torch以上的版本

                            395494013

                                395494013@qq.com

    签名由
    网易邮箱大师
    定制

在2020年3月16日 17:28,sunshine-ssl<notifications@github.com> 写道: 

@AlbertTJU 那你后来换了什么环境呀

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

sunshine-ssl commented 4 years ago

@AlbertTJU train_RCF.py里面有一个test函数,我用的这段代码

AlbertTJU commented 4 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

    不是,我的意思是评价最后的OIS,ODS数值的这个,您是怎么做的?我没有找到相关资料

                            395494013

                                395494013@qq.com

    签名由
    网易邮箱大师
    定制

在2020年3月16日 21:34,sunshine-ssl<notifications@github.com> 写道: 

@AlbertTJU train_RCF.py里面有一个test函数,我用的这段代码

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

sunshine-ssl commented 4 years ago

@AlbertTJU 官网下载的BSDS500数据集里面有计算ODS和OIS的代码

AlbertTJU commented 4 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

    好的,多谢

                            395494013

                                395494013@qq.com

    签名由
    网易邮箱大师
    定制

在2020年3月16日 22:07,sunshine-ssl<notifications@github.com> 写道: 

@AlbertTJU 官网下载的BSDS500数据集里面有计算ODS和OIS的代码

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

hellozhuo commented 4 years ago

嗯嗯,做了NMS,我也在0.4.1的环境下测试了,如果把stepsize改大会有提升,但在只用BSDS500的条件下使用NMS后的ODS也只有0.760,现在完全没有进一步的头绪,不知道您的师弟有没有遇到过这样的情况

@aobannong Did you solve this question? I come across the same problem with ODS 0.755, it turns out that the reason was I set the value to [0, 255] when I was saving the result images to mat files, which were used for NMS, and the pr curve was just a single pot, not a long curve. I changed the value to (0, 1), then I got ODS 0.788, the pr curve became normal. While it's still hard to achieve the reported ODS 0.798.

The author did not provide the best ODS from only training the BSDS dataset and testing on single scale. So it's hard to say whether result like 0.788 would be the best that can be achieved with this repo without changing the code too much.

cainiaoqiuzhu commented 3 years ago

他单尺度大概是0.803左右。我提供的数据用了和HED一样的数据增强,效果会好一些。你的显卡是什么呀?我们是用Titan Xp、1080Ti和Titan X这些显卡跑的,没用最近新的显卡跑

我其实有个想法,pytorch版本的没法还原论文的实验结果是因为向上取样的时候裁剪函数写得不够严谨,您能也发一份您师弟的微信给我吗?我想请教一些问题。我的邮箱是1020431646@qq.com