Source code of 'M3Net: Multilevel, Mixed and Multistage Attention Network for Salient Object Detection'. paper link
Python 3.9.13 and Pytorch 1.11.0. Details can be found in requirements.txt
.
All datasets used can be downloaded at here [arrr].
We use the training set of DUTS to train our M3Net.
We use the testing set of DUTS, ECSSD, HKU-IS, PASCAL-S, DUT-O, and SOD to test our M3Net. After Downloading, put them into /datasets
folder.
Your /datasets
folder should look like this:
-- datasets
|-- DUT-O
| |--imgs
| |--gt
|-- DUTS-TR
| |--imgs
| |--gt
|-- ECSSD
| |--imgs
| |--gt
...
-
Download the pretrained backbone weights and put it into
pretrained_model/
folder. ResNet [uxcz], SwinTransformer, T2T-ViT, EfficientNet are currently supported. -
Run
python train_test.py --train True --test True --record='record.txt'
for training and testing. The predictions will be inpreds/
folder and the training records will be inrecord.txt
file.
Pre-calculated saliency maps: M3Net-R [uqsr], M3Net-S [6jyh]
Pre-trained weights: M3Net-R [m789], M3Net-S [4wnw]
For PR curve and F curve, we use the code provided by this repo: [BASNet, CVPR-2019].
For MAE, Weighted F measure, E score and S score, we use the code provided by this repo: [PySODMetrics].
For more information about evaluation, please refer to Evaluation/Guidance.md
.
Our idea is inspired by VST and MiNet. Thanks for their excellent works. We also appreciate the data loading and enhancement code provided by plemeri, as well as the efficient evaluation tool provided by lartpang.
If you think our work is helpful, please cite
@misc{yuan2023m3net,
title={M$^3$Net: Multilevel, Mixed and Multistage Attention Network for Salient Object Detection},
author={Yao Yuan and Pan Gao and XiaoYang Tan},
year={2023},
eprint={2309.08365},
archivePrefix={arXiv},
primaryClass={cs.CV}
}