Skip to content
luminariadevPublic

About

Visual quality and rate-distortion benchmark suite comparing HEVC reduction and color quantization.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Compary — Image Compression & Fidelity Benchmark Suite

CI Python scikit-image License: MIT

A modular multimedia compression evaluation platform featuring side-by-side visual analysis and objective distortion metrics (PSNR, SSIM, MSE, BPP, and Compression Ratio).


Metric Definitions

The evaluation engine evaluates fidelity across three primary standards:

  1. Peak Signal-to-Noise Ratio (PSNR): Logarithmic metric of maximum signal power relative to corrupting noise: $$\text{PSNR} = 10 \cdot \log_{10} \left( \frac{\text{MAX}_I^2}{\text{MSE}} \right)$$
  2. Structural Similarity Index (SSIM): Perceptual metric measuring luminance ($l$), contrast ($c$), and structural correlation ($s$): $$\text{SSIM}(x, y) = [l(x, y)]^\alpha \cdot [c(x, y)]^\beta \cdot [s(x, y)]^\gamma$$
  3. Bits Per Pixel (BPP): Information density of the encoded asset: $$\text{BPP} = \frac{\text{Compressed Size (Bytes)} \times 8}{\text{Width} \times \text{Height}}$$

Project Structure

compary/
├── .github/
│   └── workflows/
│       └── ci.yml              # GitHub Actions CI workflow
├── samples/                    # Sample test images
├── src/
│   ├── algorithms/             # Quantization & chroma subsampling routines
│   ├── gui/                    # Interactive desktop comparison window
│   ├── metrics/
│   │   ├── compression_metrics.py  # Size ratio & BPP calculations
│   │   └── quality_metrics.py      # PSNR, SSIM, MSE implementations
│   └── main.py                 # Application entry point
├── tests/
│   └── test_metrics.py         # Metrics verification test suite
├── requirements.txt
├── .gitignore
├── LICENSE
└── README.md

Quickstart

1. Clone Repository

git clone https://github.com/luminariadev/compary.git
cd compary

2. Set Up Virtual Environment

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

3. Generate Sample Assets & Run GUI

# Generate sample test patterns
python generate_samples.py

# Launch comparative desktop GUI
python run.py

Testing

Execute unit tests via pytest:

pytest tests/ -v

CI workflows test metric accuracy automatically via GitHub Actions.


License

Distributed under the MIT License.

About

Visual quality and rate-distortion benchmark suite comparing HEVC reduction and color quantization.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages