Code for paper "MPI: Multi-receptive and Parallel Integration for Salient Object Detection", by Han Sun, Jun Cen , Ningzhong Liu, Dong Liang, and Huiyu Zhou.
- python-3.5
- pytorch-1.4.0
- torchvision
- numpy
- apex
- cv2
- Clone this repo into your workstation
git clone https://github.com/NuaaCJ/MPI.git
-
Set your dataset format as follows:
ECSSD\
--Image\ *.jpg
--Mask\ *.png
DUTS\
--Image\ *.jpg
--Mask\ *.png
...
-
Download the pre-trained model for
resnet50
resnet50-19c8e357.pth (passwd: resi) -
Generate edge maps for the training set, or download the file we provide DUT_TR_edges (passwd: edge)
-
Modify
MPI\train_mpi.py
to change both the dataset path and the file save path to your own real path -
run
train_mpi.py
python3.5 train_mpi.py
-
Download our trained model MPI_model (passwd: mpim) and put it into folder
MPI\models
-
Modify the dataset path and file save path in the
MPI\test.py
andMPI\main_function.m
to your own real paths -
run
test.py
, then the saliency maps will be generated under the corresponding path, and the evaluation scores for the model on the test dataset will be stored inresult.txt
python3.5 test.py
Here are saliency maps of our model on five different datasets (DUTS, ECSSD, DUT-OMRON, HKU-IS, PASCAL-S) The result saliency maps (passwd: maps)
The evaluation codes (MPI\*.m)
we used are provided by F3net