Skip to content

Creates peripheral metamer images that match pooled image statistics of a target image.

License

Notifications You must be signed in to change notification settings

ProgramofComputerGraphics/PooledStatisticsMetamers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PooledStatisticsMetamers

Code for generating and exploring peripheral metamers generated by matching pooled image statistics

More details about how our method works can be found our paper: "Efficient Dataflow Modeling of Peripheral Encoding in the Human Visual System" by Rachel Brown, Vasha Dutell, Bruce Walter, Ruth Rosenholtz, Peter Shirley, Morgan McGuire, and David Luebke, in Transactions on Applied Perception, January 2023, https://dl.acm.org/doi/10.1145/3564605

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Prequisites

  • Python 3.8+
  • Pytorch 1.5+ (eg, via anaconda)
  • ffmpeg (optional, only needed for movie output, might need to also install libx264x if not already included)

Structure

  • poolstatmetamer - Core code for this project. Includes classes and functions for computing the various image statistics, pooling such statistics, and optimizing images (via gradient descent) to match a desired set of pooled image statistics (typically those of a chosen target image).
    It also includes a variety of utility routines to compute steerable pyramids, manipulate images, and configure the statistics and solution process. You can run metamersolver.py to generate a quick unconverged metamer example as a test of the installed code.
  • samplescripts - Some sample scripts demonstrating ways to use the psmcode to generate images.
    • make_ps_metamer.py - Generates Portilla&Simoncelli-style texture synthesis "metamers". The statistics used try to match those from Portilla&Simoncelli's paper as closely as we can and the entire image is a single pooling region.
    • make_uniform_metamer.py - Generates a metamers with uniform sized pooling regions (ie same shape and size everywhere in the image) which are intended to be viewed in your periphery. By default it uses our modified statistics from the paper but can be configured to use other statistics and to create parametric sequences with varying parameters such as pooling size, statistics, etc.
    • make_gaze_metamer.py - Generate gaze-centric metamers where the pooling regions increase in size depending on distance from a specified gaze point. Internally this is accomplished by warping the image to make the pooling regions uniform, generating a uniform metmamer, and then unwarping back to the original image space.
  • sampleimages - A few images used by the sample scripts

About

Creates peripheral metamer images that match pooled image statistics of a target image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages