All Projects → fkodom → Fft Conv Pytorch

fkodom / Fft Conv Pytorch

Implementation of 1D, 2D, and 3D FFT convolutions in PyTorch. Much faster than direct convolutions for large kernel sizes.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Fft Conv Pytorch

Awesome Medical Imaging
Awesome list of software that I use to do research in medical imaging.
Stars: ✭ 87 (+33.85%)
Mutual labels:  neural-networks, image-processing
Image Js
Image processing and manipulation in JavaScript
Stars: ✭ 241 (+270.77%)
Mutual labels:  convolution, image-processing
Kaggle Rsna
Deep Learning for Automatic Pneumonia Detection, RSNA challenge
Stars: ✭ 74 (+13.85%)
Mutual labels:  neural-networks, image-processing
Gan Mri
Code repository for Frontiers article 'Generative Adversarial Networks for Image-to-Image Translation on Multi-Contrast MR Images - A Comparison of CycleGAN and UNIT'
Stars: ✭ 159 (+144.62%)
Mutual labels:  neural-networks, image-processing
Segmentation models.pytorch
Segmentation models with pretrained backbones. PyTorch.
Stars: ✭ 4,584 (+6952.31%)
Mutual labels:  neural-networks, image-processing
Deep learning projects
Stars: ✭ 28 (-56.92%)
Mutual labels:  neural-networks, image-processing
Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (+401.54%)
Mutual labels:  neural-networks, image-processing
Yann
This toolbox is support material for the book on CNN (http://www.convolution.network).
Stars: ✭ 41 (-36.92%)
Mutual labels:  neural-networks, convolution
Watchcarslearn
Self driving cars using NEAT
Stars: ✭ 59 (-9.23%)
Mutual labels:  neural-networks
Gosom
Self-organizing maps in Go
Stars: ✭ 60 (-7.69%)
Mutual labels:  neural-networks
Pywt
PyWavelets - Wavelet Transforms in Python
Stars: ✭ 1,098 (+1589.23%)
Mutual labels:  image-processing
Cyclegan Qp
Official PyTorch implementation of "Artist Style Transfer Via Quadratic Potential"
Stars: ✭ 59 (-9.23%)
Mutual labels:  neural-networks
Sanchez
False-colour geostationary satellite image compositor
Stars: ✭ 61 (-6.15%)
Mutual labels:  image-processing
Keras Gan
Keras implementations of Generative Adversarial Networks.
Stars: ✭ 8,494 (+12967.69%)
Mutual labels:  neural-networks
Jpg Glitch
glitch images with jpg encoding
Stars: ✭ 1,120 (+1623.08%)
Mutual labels:  image-processing
One Pixel Attack Keras
Keras implementation of "One pixel attack for fooling deep neural networks" using differential evolution on Cifar10 and ImageNet
Stars: ✭ 1,097 (+1587.69%)
Mutual labels:  image-processing
Deep Kernel Gp
Deep Kernel Learning. Gaussian Process Regression where the input is a neural network mapping of x that maximizes the marginal likelihood
Stars: ✭ 58 (-10.77%)
Mutual labels:  neural-networks
Legoizer
A tool to convert images to Lego bricks.
Stars: ✭ 63 (-3.08%)
Mutual labels:  image-processing
Aorun
Deep Learning over PyTorch
Stars: ✭ 61 (-6.15%)
Mutual labels:  neural-networks
Imagesoup
Python library designed for quick search and downloading images from Google Images.
Stars: ✭ 60 (-7.69%)
Mutual labels:  image-processing

FFT Conv PyTorch

Implementation of 1D, 2D, and 3D FFT convolutions in PyTorch.

  • Faster than direct convolution for large kernels.
  • Much slower than direct convolution for small kernels.
  • Typically, FFT convolution is faster when the kernel has >100 elements.
    • Dependent on machine and PyTorch version.

Example Usage

import torch
from fft_conv import fft_conv, FFTConv1d

# Create dummy data.  
#     Data shape: (batch, channels, length)
#     Kernel shape: (out_channels, in_channels, kernel_size)
#     Bias shape: (out channels, )
# For ordinary 1D convolution, simply set batch=1.
signal = torch.randn(3, 3, 1024 * 1024)
kernel = torch.randn(2, 3, 128)
bias = torch.randn(2)

# Functional execution.  (Easiest for generic use cases.)
out = fft_conv(signal, kernel, bias=bias)

# Object-oriented execution.  (Requires some extra work, since the 
# defined classes were designed for use in neural networks.)
fft_conv = FFTConv1d(3, 2, 128, bias=True)
fft_conv.weight = torch.nn.Parameter(kernel)
fft_conv.bias = torch.nn.Parameter(bias)
out = fft_conv(signal)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].