Skip to content

Library allows to automatically selects the necessary frequencies from the frequency domain, and transmits the inverse-transform image to the main convolutional neural network.

Notifications You must be signed in to change notification settings

YaroslavBespalov/freqlearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Frequency learning

This library allows to work with images in frequency domain and after that return to the spatial domain.

Available conversions in the frequency spectrum:

  • LinearFourier2d
  • GeneralFourier2d

Usage

Example:

import torch
import torch.nn as nn

from freqlearning import LinearFourier2d
from freqlearning import GeneralFourier2d


input_image = torch.randn(1, 256, 256) # input shape (1, 256, 256)

model = MyModel()
#gafl_layer = LinearFourier2d((1, 256, 256))
gafl_layer = GeneralFourier2d((1, 256, 256))

gafl_model = nn.Sequential(
    gafl_layer,
    model
)

PyPI version:

$ pip install freqlearning

Latest version from source:

$ pip install git+https://github.com/YaroslavBespalov/freqlearning/freqlearning

Requirements

Installing requirements by pip:

pip3 install --upgrade -r ./requirements.txt

Contributors

  • Yaroslav Bespalov & Viktor Shipitsin.

About

Library allows to automatically selects the necessary frequencies from the frequency domain, and transmits the inverse-transform image to the main convolutional neural network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages