Skip to content

pcsl-epfl/diffeomorphism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diffeomorphism

arXiv preprint and reference: Relative stability toward diffeomorphisms in deep nets indicates performance (NeurIPS 2021)

Apply a maximum-entropy diffeomorphism to an image img ~ [ch, n, n], in PyTorch.

Usage:

   img_diffeo = deform(img, T, cut)

where T is the temperature at which the corresponding displacement fields are drawn and cut is the high-frequency cutoff.

diffeo_grid_example

An animated example can be found here.

The range of temperatures corresponding to natural diffeomorphisms - for given n, cut - can be computed by

  Tmin, Tmax = temperature_range(n, cut)

To have an idea of how much distortion one gets for given (T, cut), the typical displacement at the center of the image can be computed by

  delta = typical_displacement(T, cut)

Diffeo Phase Space

Samples of max-entropy diffeomorphisms in the (T, c) phase space for an ImageNet sample.

The region [Tmin, Tmax] is colored in green.

diffeo_grid_example

About

Apply maximum-entropy diffeomorphisms to images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages