Giter Site home page Giter Site logo

deepconvnet-master's Introduction

DeepConvNet-master

This repo contains the code and the pre-trained models used in the paper:"Shallow and Deep Convolutional Networks for Saliency Prediction".

Train a model

Our training code is based on the SALICON dataset, we assume you already download and unzip the images and groundtruths under your workspace.

SaliconDataset
└───train
│     │   *.jpg
|     |
└───val
|     |  *.jpg
|     |
└───maps
      └───train
      │     │   *.png
      |     |
      └───val
      │     │   *.png      

After making sure that the path of the SALICON dataset is correct, please save the path files "trainList.txt" and "valList.txt" under folder "SaliconDataset/".

SaliconDataset
└───trainList.txt
└───valList.txt

Our training code "main.py" contains a pre-trained model VGG-16. Please save the model under folder "Models/".

The trained models will be saved under folder "Models/Model_Save_new/"

Make a prediction

Note that our pre-trained model "DeepConvNet.pth" (google drive) and the VGG-16 pre-trained model are not included.

Our prediction code "test.py" assumes that the test set is SALICON test set. You are supposed to download and unzip the images under the folder "SaliconDataset/test/".

SaliconDataset
└───test
│     │   *.jpg

Besides, please save the path file "testList.txt" under the folder "SaliconDataset/".

Before running our code, make sure the pre-trained model is saved under folder "Models/Model_Save_new/". Please check if the pre-trained model loaded in the code "test.py" exists.

It will save the prediction under folder "result/test/", you might want to change the path and the prediction file name.


Our prediction code "test_mit.py" assumes that the test set is MIT300 test set. You are supposed to download and unzip the images under the folder "SaliconDataset/MITtest/".

SaliconDataset
└───MITtest
│     │   *.jpg

Besides, please save the path file "testMIT.txt" under the folder "SaliconDataset/" and check if the pre-trained model loaded in the code "test_mit.py" exists.

It will save the prediction under folder "result/mit/", you might want to change the path and the prediction file name.

deepconvnet-master's People

Contributors

cony-atalas avatar

Stargazers

 avatar

Watchers

 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.