Skip to main content

GIST Image descriptor for scene recognition

Project description

Author:

<olivier.grisel@ensta.org>

Library to compute GIST global image descriptors to be used to compare pictures based on their content (to be used global scene recognition and categorization).

The GIST image descriptor theoritical definition can be found on A. Torralba’s page: http://people.csail.mit.edu/torralba/code/spatialenvelope/

The source code of the C implementation is included in the lear_gist subfolder. See http://lear.inrialpes.fr/software for the original project information.

pyleargist is licensed under the GPL, the same license as the original C project.

Install

Install libfftw3 with development headers (http://www.fftw.org), python dev headers, gcc, the Python Imaging Library (PIL) and numpy.

Build locally for testing:

% python setup.py buid_ext -i
% export PYTHONPATH=`pwd`/src

Build and install system wide:

% python setup.py build
% sudo python setup.py install

Usage

Here is a sample session in a python shell once the library is installed:

>>> from PIL import Image
>>> import leargist

>>> im = Image.open('lear_gist/ar.ppm')
>>> descriptors = leargist.color_gist(im)

>>> descriptors.shape
(960,)

>>> descriptors.dtype
dtype('float32')

>>> descriptors[:4]
array([ 0.05786307,  0.19255637,  0.09331483,  0.06622448], dtype=float32)

The GIST descriptors (fixed size, 960 by default) can then be used as an euclidian space to cluster images based on their content.

This dimension can then be reduced to a 32 or 64 bits semantic hash by using Locality Sensitive Hashing, Spectral Hashing or Stacked Denoising Autoencoders.

A sample implementation of picture semantic hashing with SDAs is showcased in the libsgd library: http://code.oliviergrisel.name/libsgd

Changes

  • 1.0.1: 2009/10/10 - added missing missing MANIFEST

  • 1.0.0: 2009/10/10 - initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

pyleargist-1.0.1.zip (28.4 kB view details)

Uploaded Source

pyleargist-1.0.1.tar.gz (25.5 kB view details)

Uploaded Source

File details

Details for the file pyleargist-1.0.1.zip.

File metadata

  • Download URL: pyleargist-1.0.1.zip
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyleargist-1.0.1.zip
Algorithm Hash digest
SHA256 00c719468b3102599ce6430fbaa7517a51c26a41c76e8c785c862961de4a3a7f
MD5 a33714367a20b96ea0dc086d8629cf8b
BLAKE2b-256 36d54abef7434b4dfaa1a979f35ba2accd889ea6db3b57eae2575ff444358a50

See more details on using hashes here.

File details

Details for the file pyleargist-1.0.1.tar.gz.

File metadata

  • Download URL: pyleargist-1.0.1.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyleargist-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dd30c4c842cac502b8eb875a3d30108f07d5ea9494e6db89d85bcb39b13d1dac
MD5 5beff6a1d9fa43ed25f4d527d65c81d2
BLAKE2b-256 3996c2eebd9319eb6f10f8829a59ce4bddf71ceaa9fbb4981ee01abe90474ab6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page