weijun88 / f3net Goto Github PK
View Code? Open in Web Editor NEWCodes for the AAAI 2020 paper "F3Net: Fusion, Feedback and Focus for Salient Object Detection"
Home Page: https://arxiv.org/pdf/1911.11445.pdf
License: MIT License
Codes for the AAAI 2020 paper "F3Net: Fusion, Feedback and Focus for Salient Object Detection"
Home Page: https://arxiv.org/pdf/1911.11445.pdf
License: MIT License
weit = 1+5*torch.abs(F.avg_pool2d(mask, kernel_size=31, stride=1, padding=15)-mask)
你好,请问kernel_size=31是如何选择的。
MAE公式直接用numpy写是: np.mean ( np.abs ( predict-gt ) ) / len(pictures),结果和matlab结果不一样,会更低。
Hello,
thanks for your work!
however, when I download your pre-calculated map and use the matlab code given in eval/ folder
the results is different from paper.
I think there are some issue in the matlab code.
May I get your help to verify?
or do you mind to provide a python version of evaluation? especially for E-Measure and S-Measure
Thanks!
您好,我跑您的代码的时候,每一次训练完结果都不一样。对最终测试结果也有很大的影响。
我已经在代码开头固定了随机数种子,但是并没有起到任何作用。
观察训练的loss,每次重新运行还是不一样。请问这个问题是怎么回事呢?
请问在加权的BCE损失中,分子是(1+γα) 分母是γα,不一样?
代码中并没有这个加1 ,分子是否写错了?
Hi thanks for sharing your great work.
How do I run the code on my input images? where do I put my images for testing?
python3 test.py
returns the following error:
TypeError: 'NoneType' object is not subscriptable
Hello sir,
Thank you for your great work.
I want to re-train your existing model-32 with my custom data set . For that i am replacing
self.load_state_dict(torch.load('../res/resnet50-19c8e357.pth'), strict=False)
with
self.load_state_dict(torch.load('../res/model-32'), strict=False)
But for using that performance of the model is downgraded. Please guide me how to retrain model-32 with my custom data set.
Thanks.
Hi,
If I may, I think you have a small mistake in your paper:
Thanks for sharing your code and work with us!
In line 20 of train.py:
wbce = F.binary_cross_entropy_with_logits(pred, mask, reduce='none')
I believe that pred should be in (0,1), so we should add a sigmoid function. Is it missing here?
train.py 的第20行 pred 应该是(0,1)中的值,所以这里是否漏掉了一个sigmoid函数?
我根据您提供的model-32预训练模型进行了测试,得到了非常满意的效果,非常感谢你提供的源码。
但是我想知道model-32是在哪个数据集上预训练得到的?我看到train.py文件中为DUTS数据集,不知道是不是呢?
期待回答。
The apex dependency requires specific cuda versions to be installed (still haven't managed to install it) and makes the whole F3Net code extremely hard to install and experiment with.
pip install apex
fails and installation also fails when apex is installed via the github folder with either:
python setup.py install --cuda_ext --cpp_ext
or
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
thanks for your code!!!
i have a question about your code of train.py,
if epoch>cfg.epoch/3*2: torch.save(net.state_dict(), cfg.savepath+'/model-'+str(epoch+1))
it mean save all the checkpoint when epoch>cfg.epoch/3*2, but how to choose a better one for test?
你好,关于损失函数有两个地方不太理解,wbce = (weit*wbce).sum(dim=(2,3))/weit.sum(dim=(2,3)),这一句中,分母是权重的和,而论文中是ya的和。第二个就是计算iou时,分子分母都加了一个1,目的是避免0/0的情况吗?谢谢
您好,想用您这个模型对任意图片进行测试,然而是对应的图片肯定是无mask的,这样的话是不是就无法工作了呢?
Hello, thank you for you work. Would you mind share the code for drawing precision-recall curves & F-measure curves 😄
Hi Weijun,
in your Emeasure.m, there is an error:
https://github.com/weijun88/F3Net/blob/eecace3adf1e8946b571a4f4397681252f9dc1b8/eval/Emeasure.m#L22
no need to *2, and as a result, your Emeasure score is 0.02 lower than the correct value.
self.mean = np.array([[[124.55, 118.90, 102.94]]])
self.std = np.array([[[ 56.77, 55.97, 57.50]]])
请问这两个值是怎么来的?我发现用255乘以pytorch给的值和这个有差别
恭喜取得这么好的结果,阅读了你的论文后有两个问题。
1.CFM模块中将上一层特征和下一层特征做卷积等操作后,进行相乘操作,然后将结果做相应操作后分别相加至上下层中返回。 ------这里为什么进行相乘操作,您是怎么想到这样处理或是意义如何又或是参考了某篇论文。 比较疑惑,特征图相乘的想法点
2.在您的net.py代码中F3Net( )只调用了第一次decoder( )和第二次decoder( ),但您的论文中该解码调用了n次。------可能我看的不仔细,还没找到您的for循环定义n次decoder操作在哪?
I've searched for a long time, but I failed. Thanks,
good job!
I have a question about the model's performance
I can't not get same result when i load the model-32 to get predict maps or directly download predict maps.
the former situation which is evaluated in DUTS
Maxf :0.881 MeanF:0.829 MAE:0.036
the latter situation which is evaluated in DUTS
Maxf :0.891 MeanF:0.84 MAE:0.035
I clone your repo and download the model-32, want to use it output the mask of a photo from myself to compare the effect with other model.
However, I face some hard works with code debug , I want to get the advice with directly using the model-32
really thanks!!!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.