Giter Site home page Giter Site logo

vaxmancloudinary / pysaliency Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matthias-k/pysaliency

0.0 0.0 0.0 81.87 MB

Python Framework for Saliency Modeling and Evaluation

License: MIT License

Makefile 0.01% Jupyter Notebook 55.41% Python 43.89% MATLAB 0.69%

pysaliency's Introduction

Pysaliency

Pysaliency is a python package for saliency modelling. It aims at providing a unified interface to both the traditional saliency maps used in saliency modeling as well as probabilistic saliency models. Pysaliency has a range of influential models prepackaged and ready for use, as well as some public available datasets. These models are using the original code which is often matlab. Therefore, a matlab licence is required to make use of these models, although quite some of them work with octave, too (see below).

Installation

Make sure all packages from requirements.txt are installed. Then as usual, the package is installed by

python setup.py install

If you want to use the SALICON dataset you have to install the salicon python api.

Quickstart

import pysaliency

dataset_location = 'datasets'
model_location = 'models'

mit_stimuli, mit_fixations = pysaliency.external_datasets.get_mit1003(location=dataset_location)
aim = pysaliency.AIM(location=model_locations)
saliency_map = aim.saliency_map(mit_stimuli.stimuli[0])

plt.imshow(saliency_map)


auc = aim.AUC(mit_stimuli, mit_fixations)

If you already have saliency maps for some dataset, you can import them into pysaliency easily:

my_model = pysaliency.SaliencyMapModelFromDirectory(mit_stimuli, '/path/to/my/saliency_maps')
auc = my_model.AUC(mit_stimuli, mit_fixations)

Using Octave

pysaliency will fall back to octave if no matlab is installed. Some models might work with octave, e.g. AIM and GBVSIttiKoch. In Debian/Ubuntu you need to install octave, octave-image, octave-statistics, liboctave-dev.

These models and dataset seem to work with octave:

  • models
    • AIM
    • GBVSIttiKoch
  • datasets
    • Toronto
    • MIT1003
    • MIT300
    • SALICON

pysaliency's People

Contributors

matthias-k 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.