enthought / blusky

BluSky
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Scat transform - Downsampling scatnet compatibility. #17

Open blasscoc opened 5 years ago

blasscoc commented 5 years ago

Following successive convolutions within the scattering transform there is the option to downsample.

Provide a downsampling method that replicates the scatnet implementation.

Scatnet "downsamples" by periodization (averaging) in the Fourier domain, this is exactly equivalent to decimating with a stride in the spatial domain.

Decimation is done by 2(J-j1) at first order (end-point with gabor filter), each convolution (where j1 is the scale of the wavelet), 2 (j2-j1) at second order and 2 ** (J-j2) at the end-point with the gabor filter.

Convolutions with the gabor filters should be designed to automatically attach themselves to the model created within the Cascade2D object, decimation within the Cascade will need to be provided by configuration of the Cascade object.

Decimation can be efficiently implemented by applying a "stride" in the Conv2d.