All Projects → zh217 → Torch Dct

zh217 / Torch Dct

Licence: mit
DCT (discrete cosine transform) functions for pytorch

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Torch Dct

Toolsig
toolsigv3.1 (Instagram Tools)
Stars: ✭ 121 (-30.06%)
Mutual labels:  fft
Prediction Flow
Deep-Learning based CTR models implemented by PyTorch
Stars: ✭ 138 (-20.23%)
Mutual labels:  torch
Skip Thoughts.torch
Porting of Skip-Thoughts pretrained models from Theano to PyTorch & Torch7
Stars: ✭ 146 (-15.61%)
Mutual labels:  torch
Cyclegan
Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Stars: ✭ 10,933 (+6219.65%)
Mutual labels:  torch
Neural Style Audio Torch
Torch implementation for audio neural style.
Stars: ✭ 130 (-24.86%)
Mutual labels:  torch
Fft.js
The fastest JS Radix-4/Radix-2 FFT implementation
Stars: ✭ 141 (-18.5%)
Mutual labels:  fft
Deepnudecli
DeepNude Command Line Version With Watermark Removed
Stars: ✭ 112 (-35.26%)
Mutual labels:  torch
Hacksby
Description and unofficial implementation of Furby's audio protocol
Stars: ✭ 165 (-4.62%)
Mutual labels:  fft
Torchsample
High-Level Training, Data Augmentation, and Utilities for Pytorch
Stars: ✭ 1,731 (+900.58%)
Mutual labels:  torch
Samplernn torch
Torch implementation of SampleRNN: An Unconditional End-to-End Neural Audio Generation Model
Stars: ✭ 146 (-15.61%)
Mutual labels:  torch
Fftw.jl
Julia bindings to the FFTW library for fast Fourier transforms
Stars: ✭ 127 (-26.59%)
Mutual labels:  fft
Ganspapercollection
Stars: ✭ 130 (-24.86%)
Mutual labels:  torch
Pycroscopy
Scientific analysis of nanoscale materials imaging data
Stars: ✭ 144 (-16.76%)
Mutual labels:  fft
Guitar bro
Guitar Bro – browser game that helps you learn notes on guitar
Stars: ✭ 125 (-27.75%)
Mutual labels:  fft
Dockerfiles
Deep Learning Dockerfiles
Stars: ✭ 150 (-13.29%)
Mutual labels:  torch
Ti Pooling
TI-pooling: transformation-invariant pooling for feature learning in Convolutional Neural Networks
Stars: ✭ 119 (-31.21%)
Mutual labels:  torch
Synthesize3dviadepthorsil
[CVPR 2017] Generation and reconstruction of 3D shapes via modeling multi-view depth maps or silhouettes
Stars: ✭ 141 (-18.5%)
Mutual labels:  torch
Semantic3dnet
Point cloud semantic segmentation via Deep 3D Convolutional Neural Network
Stars: ✭ 170 (-1.73%)
Mutual labels:  torch
Rxaudio
本库是一款基于Rxjava实现的android音频设备通信库,主要用于手机和音频设备之间通信,支持录音、发送、供电、发送失败自动重试(可以指定重试次数),设置接收超时、自定义编解码,自定义配置参数等功能,使用本库只需要关注与业务相关的自定义编解码。
Stars: ✭ 160 (-7.51%)
Mutual labels:  fft
Gqrx
Software defined radio receiver powered by GNU Radio and Qt.
Stars: ✭ 1,934 (+1017.92%)
Mutual labels:  fft

DCT (Discrete Cosine Transform) for pytorch

Build Status codecov PyPI version PyPI version PyPI status GitHub license

This library implements DCT in terms of the built-in FFT operations in pytorch so that back propagation works through it, on both CPU and GPU. For more information on DCT and the algorithms used here, see Wikipedia and the paper by J. Makhoul. This StackExchange article might also be helpful.

The following are currently implemented:

  • 1-D DCT-I and its inverse (which is a scaled DCT-I)
  • 1-D DCT-II and its inverse (which is a scaled DCT-III)
  • 2-D DCT-II and its inverse (which is a scaled DCT-III)
  • 3-D DCT-II and its inverse (which is a scaled DCT-III)

Install

pip install torch-dct

Requires torch>=0.4.1 (lower versions are probably OK but I haven't tested them).

You can run test by getting the source and run pytest. To run the test you also need scipy installed.

Usage

import torch
import torch_dct as dct

x = torch.randn(200)
X = dct.dct(x)   # DCT-II done through the last dimension
y = dct.idct(X)  # scaled DCT-III done through the last dimension
assert (torch.abs(x - y)).sum() < 1e-10  # x == y within numerical tolerance

dct.dct1 and dct.idct1 are for DCT-I and its inverse. The usage is the same.

Just replace dct and idct by dct_2d, dct_3d, idct_2d, idct_3d, etc to get the multidimensional versions.

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].