This repository contains the original PyTorch implementation of "Progressive Adapting and Pruning: Domain-Incremental Learning for Saliency Prediction", a new approach aims to design saliency prediction models that can imitate the incremental learning ability of human beings on multiple image domains.
To run this code set up python environment as follows:
https://github.com/KaIi-github/DIL4SAP.git
cd DIL4SAP
conda create -n DIL4SAP python=3.8
source activate DIL4SAP
pip install -r requirements.txt
We tested our code with Python 3.8
and Cuda 11
.
Below are the main directories in the repository:
checkpoints/
: training checkpoints.datasets/
: dataset repositories.logs/
: records of results.models/
: model definition and primary code.model_hub/
: pretrained models.scripts/
: scripts for train , inference and calculation of metrics.
Below are the main executable scripts in the repository:
train_new_task_step1.py
: script of pre-training for the first step.train_salicon_1.py
: main training, pruning, and fine-tuningscript on salicon dataset.train_art_2.py
: main training, pruning, and fine-tuning script on art dataset.train_websal_3.py
: main training, pruning, and fine-tuning script on websal dataset.predict_rap.py
: main inference script.eval_command_rap.py
:main metric calculation script.run_ours_sequence.sh
: bash script to run trainingrun_predict_rap.sh
: bash script to run inference and metric calculation.
The dataset tree folder references
├── Salicon
│ ├── trainSet
│ │ ├── Annotations
│ │ └── images
│ ├── testSet
│ │ ├── Annotations
│ │ └── images
| |
├── MIT1003
│ ├── trainSet
│ │ ├── FIXATIONMAPS
│ │ └── STIMULI
│ ├── testSet
│ │ ├── FIXATIONMAPS
│ │ └── STIMULI
| |
├── CAT2000
│ ├── trainSet
│ │ ├── FIXATIONMAPS
│ │ │ └── Art
│ │ └── STIMULI
│ │ └── Art
│ └── testSet
│ ├── FIXATIONMAPS
│ │ └── Art
│ └── STIMULI
│ └── Art
└── WebSal
├── trainSet
│ ├── Annotations
│ └── images
└── testSet
├── Annotations
└── images
/bin/bash {Your Project Path}/run_ours_sequence.sh
/bin/bash {Your Project Path}/run_predict_rap.sh
To use pre-trained ERFNet download weights here.
This work is currently accepted by Transactions on Multimedia Computing, Communications, and Applications (TOMM).
@article{10.1145/3661312,
author = {Yang, Kaihui and Han, Junwei and Guo, Guangyu and Fang, Chaowei and Fan, Yingzi and Cheng, Lechao and Zhang, Dingwen},
title = {Progressive Adapting and Pruning: Domain-Incremental Learning for Saliency Prediction},
journal = {ACM Trans. Multimedia Comput. Commun. Appl.},
year = {2024}
}
Thanks to Yingzi for her contribution to this work.