Salient object detection aims to identify objects in natural images that most catch human attention. A common approach in this field involves integrating diverse features learned from multiple network branches. Intuitively, to enhance accuracy, the fusion process shall adapt to individual inputs with varying patterns. To improve such adaptability, this project develops a boundary-location information fusion framework. Specifically, we decompose the original problem into two simplified sub-tasks: object localization and boundary refinement, each tackled by a dedicated branch. To mitigate the negative impact of misleading attributions in the feature space, we further propose an adaptive feature augmentation technique, which dynamically pinpoints potential attributions causing incorrect predictions, thereby enhancing robustness. Additionally, an adaptive cross-attention module is devised with parameters that adjust dynamically to effectively aggregate boundary and location features.
If you run into any problems or feel any difficulties to run this code, do not hesitate to leave issues in this repository. We will release the training codes once the paper has been published.
My e-mail is: [email protected]
This repository contains:
- Full code, data for
training
andtesting
- Pretrained models based on P2T and MobileNetV2
- Fast preparation script (based on github release)
Our model is based on the following packages:
- python 3.6+
- pytorch >=1.6, torchvision, OpenCV-Python, tqdm
- Tested on pyTorch 1.7.1
They can be installed following the instructions of the official website: https://pytorch.org/
Or, you can install the packages using requirement.txt, through running:
pip install -r requirement.txt
You can choose to use our automatic preparation script, if you have good downloading speed on github:
bash scripts/prepare_data.sh
The script will prepare the training and testing datasets.
If you suffer from slow downloading rate and luckily you have a proxy, a powerful tool Proxychains4 can help you to execute the script through your own proxy by running the following command: proxychains4 bash scripts/prepare_data.sh
.
If you have a low downloading speed, please download the training data manually:
- Preprocessed data of 5 datasets: [Google Drive], [Baidu Pan, ew9i]
We have processed the data well so you can use them without any preprocessing steps.
After completion of downloading, extract the data and put them to ./data/
folder:
unzip SOD_datasets.zip -O ./data
We provide some examples for quick inference. You should download our trained model from:https://pan.quark.cn/s/ac3797f70207, and put it into the folder "checkpoints/".
Then, you can simply run:
python demo.py
The JPEG image files placed in the folder 'examples/' will be processed by our model, and the results will also be saved into the folder 'examples/' with the suffix '_Ours.png'.
Our code is based on https://github.com/yuhuan-wu/EDN/
- I encourage everyone to contact me via my e-mail. My e-mail is: [email protected]