Skip to content

Visual perception

The perception module of odak focuses on visual perception, and in particular on gaze-contingent perceptual loss functions.

It contains an implementation of a metameric loss function. When used in optimisation tasks, this loss function enforces the optimised image to be a ventral metamer to the ground truth image.

This loss function is based on previous work on fast metamer generation. It uses the same statistical model and many of the same acceleration techniques (e.g. MIP map sampling) to enable the metameric loss to run efficiently.

Engineering notes

Note Description
Using metameric loss in Odak This engineering note will give you an idea about how to use the metameric perceptual loss in Odak.

odak.learn.perception

Function Description
odak.learn.perception.MetamericLoss() Metameric loss function
odak.learn.perception.MetamericLossUniform() Metameric loss function (uniform, not foveated variant)
odak.learn.perception.MetamerMSELoss() Metamer MSE loss function
odak.learn.perception.BlurLoss() Blur function
odak.learn.perception.RadiallyVaryingBlur() Radially varying blur
odak.learn.perception.SpatialSteerablePyramid() Spatial implementation of the real-valued steerable pyramid
odak.learn.perception.make_3d_location_map() Foveation method: make a map of 3D locations for each pixel
odak.learn.perception.make_eccentricity_distance_maps() Foveation method: make maps of eccentricity and distance to the image plane for each pixel
odak.learn.perception.make_pooling_size_map_pixels() Foveation method: make a map of pooling sizes (in pixels)
odak.learn.perception.make_pooling_size_map_lod() Foveation method: make a map of pooling sizes (in LoD levels)
odak.learn.perception.make_radial_map() Foveation method: make a map of distances from a gaze point in pixels
odak.learn.perception.ycrcb_2_rgb() Colorspace conversion from YCrCb to RGB
odak.learn.perception.rgb_2_ycrcb() Colorspace conversion from RGB to YCrCb