Skip to main content

Discrete Cosine Transform in PyTorch

Project description

DCT-Autoencoder

A PyTorch-based implementation of 2D Discrete Cosine Transform (DCT) autoencoder.

PyPI version

Overview

The dct-autoencoder package offers a PyTorch implementation of the 2D Discrete Cosine Transform (DCT), which is fully differentiable and can be integrated into deep learning models. It is particularly useful for reducing the spatial dimensions of images by transforming them into the frequency domain via DCT. Inspired by the JPEG algorithm, the package also includes a compression method using low-pass filtering, which reduces the number of frequency domain coefficients while retaining most of the image information.

Installation

Install the package via pip:

pip install dct-autoencoder

Usage

For detailed usage examples, refer to the Usage Notebook. It provides code snippets and demonstrations of the DCT autoencoder in action.

Visualizations

Computation Graph

The following figure illustrates the computation graph of the DCT autoencoder:

Computation Graph

DCT Basis Functions

DCT basis functions for a block size of 16:

DCT Basis Functions

TODO

  • Add support for color images
  • Improve documentation
  • Add unit tests
  • Distribute package on PyPI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dct_autoencoder-0.3.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dct_autoencoder-0.3.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file dct_autoencoder-0.3.0.tar.gz.

File metadata

  • Download URL: dct_autoencoder-0.3.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dct_autoencoder-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4b576fd3296ef29fff30c34907b08b54c10677fde1537b0522d5954d94a54ff1
MD5 4d1616cd240771e831555f635309232e
BLAKE2b-256 1f34629f913d6ec1109f4107e177499c11b94f537325a24161940fca9177c88d

See more details on using hashes here.

File details

Details for the file dct_autoencoder-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: dct_autoencoder-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dct_autoencoder-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75cc6c1b8d57e7cc76ab6bbf8b0b4358350e9c7bdbb08d2f3789a548c11f7cc7
MD5 e865c89a5e3422df3fbfef795ca8b869
BLAKE2b-256 59330a5e65b56b13417f95772a229c947441a29615d2218ff2c23921d9e7cb77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page