GithubHelp home page GithubHelp logo

xianfengeryue / transalnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ljovo/transalnet

0.0 1.0 0.0 3.15 MB

TranSalNet: Towards perceptually relevant visual saliency prediction. Neurocomputing (2022)

Home Page: https://doi.org/10.1016/j.neucom.2022.04.080

License: MIT License

Python 81.22% Jupyter Notebook 18.78%

transalnet's Introduction

TranSalNet: Towards perceptually relevant visual saliency prediction

This repository provides the Pytorch implementation of TranSalNet: Towards perceptually relevant visual saliency prediction published in the Neurocomputing paper.

Overview:

arch

Requirements

  • Python 3.8
  • Pytorch 1.7.1
  • Torchvision 0.8.2
  • OpenCV-Python 4.5.1
  • SciPy 1.6.0
  • tqdm 4.56.0

Pretrained Models

TranSalNet has been implemented in two variants: TranSalNet_Res with the CNN backbone of ResNet-50 and TranSalNet_Dense with the CNN backbone of DenseNet-161.
Pre-trained models on SALICON training set for the above two variants can be download at:

It is also necessary to download ResNet-50 (for TranSalNet_Res) and DenseNet-161 (TranSalNet_Dense) pre-trained models on ImageNet. These models can be download at:

Quick Start

The pre-trained models should be downloaded and put in the folder named pretrained_models in the code folder first, then the following example codes can be used smoothly.
We have prepared two Jupyter Notebook files (.ipynb) for usage of TranSalNet.

  • Testing: testing.ipynb. It can be used to compute and obtain the visual saliency maps of input images.
    By default, the test image and the corresponding output are in the folder named testing, and the models are loaded with parameters pre-trained on the SALCON training set.
  • Fine-tuning or Training from scratch: training&fine-tuning.ipynb
    Data prepare for fine-tuning and training:
    │ dataset/
    ├── train_ids.csv
    ├── val_ids.csv
    ├── train/
    │   ├── train_stimuli/
    │   │   ├── ......
    │   ├── train_saliency/
    │   │   ├── ......
    │   ├── train_fixation/
    │   │   ├── ......
    ├── val/
    │   ├── val_stimuli/
    │   │   ├── ......
    │   ├── val_saliency/
    │   │   ├── ......
    │   ├── val_fixation/
    │   │   ├── ......
    

In the above two .ipynb files, it is possible to choose whether TranSalNet_Res or TranSalNet_Dense is used, depending on the needs and preferences.

Please note: The spatial size of inputs should be 384×288 (width×height).

Citation

If this work is helpful, please consider citing:

@article{TranSalNet,
title = {TranSalNet: Towards perceptually relevant visual saliency prediction},
journal = {Neurocomputing},
year = {2022},
issn = {0925-2312},
doi = {https://doi.org/10.1016/j.neucom.2022.04.080},
author = {Jianxun Lou and Hanhe Lin and David Marshall and Dietmar Saupe and Hantao Liu},
}

transalnet's People

Contributors

ljovo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.