The Python SDK for Local Computer Vision & Signal Processing
Project description
photo-quality-analyzer
Intelligent technical assessment for digital photography.
photo-quality-analyzer is a local-first Python SDK and CLI tool that uses signal processing and computer vision to objectively score photographic quality. It normalizes metrics against a database of 147+ camera models to account for sensor-specific physics like diffraction limits and dynamic range baselines.
From PyPI
pip install photo-quality-analyzer-core
From GitHub (Source)
For developers or users who want the latest changes directly from the source:
pip install git+https://github.com/prasadabhishek/photo-quality-analyzer.git
What This Library Is (And Isn't)
This library is a Technical Quality Filter ("Janitor"), not an artistic evaluator ("Curator").
✅ What it WILL do:
- Identify out-of-focus, underexposed, or noisy images
- Filter out broken shots from large photo libraries (10,000+ images)
- Provide objective technical metrics (sharpness, noise, dynamic range)
- Normalize scores against known camera sensor physics
❌ What it WON'T do:
- Judge artistic merit or emotional impact
- Understand intentional creative choices (low-key lighting, film grain, etc.)
- Replace human curation for portfolio selection
- Prefer "interesting" photos over "boring but technically perfect" ones
Use Case: Wedding photographers culling 5,000 shots to eliminate camera-shake blurs and exposure failures—not fine art curation.
Metrics
The engine evaluates technical quality through a multi-dimensional lens:
-
Sharpness: FFT-based acutance, invariant to rotation and noise.
-
Exposure: Ansel Adams Zone System analysis for clipping detection.
-
Focus: ROI-specific sharpness on the main subject (auto-detected).
-
Noise: Statistical variance estimation for ISO-related grain.
-
Dynamic Range: Tonal entropy and sensor-aware potential.
-
Color Balance: Neutral pixel selection for finding color casts.
-
Color Balance: Neutral pixel selection for finding color casts.
For more information, see our documentation:
- 📖 USAGE.md: Practical examples and CLI guides.
- ⚙️ API.md: Technical reference for Python developers.
- 🔬 SCIENCE.md: Deep dive into the underlying physics and algorithms.
Usage
CLI
Analyze an entire folder and optionally move files based on quality:
python analyzer.py --folder_path /path/to/photos --move
SDK
from photo_quality_analyzer_core.analyzer import evaluate_photo_quality
# Works with JPEGs and RAW files
result = evaluate_photo_quality("photo.arw")
print(result['judgement']) # "Excellent", "Good", etc.
See USAGE.md for more advanced examples (AI toggling, metric filtering, etc).
How it works
The engine uses a hybrid approach to distinguish between artistic intent and technical failure:
- FFT Anisotropy: Measures purely optical acutance, invariant to rotation. Adjusted for Aperture-aware diffraction.
- Zone System Histogram: Analyzes luminance using Ansel Adams' Zone System to detect destructive clipping.
- Neural ROI (YOLO26): Leverages the latest YOLO26 (January 2026 release) via ONNX Runtime to identify main subjects, ensuring metrics are calculated on the subject rather than the background.
- Sensor Normalization: Benchmarks images against the known limits of the specific camera sensor (Full Frame vs APS-C vs 1-inch).
Technology Stack
- ONNX Runtime: Optimized, lightweight inference engine (replaced PyTorch).
- YOLO26: Transformer-based subject detection (43% faster on CPUs).
- OpenCV (Headless): Efficient image processing without GUI overhead.
evaluate_photo_quality(file_path, ...)
The primary entry point. It returns a dictionary containing scores, qualitative labels, and AI-generated scene descriptions.
See API.md for full function signatures and return types.
Contributing
Contributions are welcome! Please run the test suite before submitting:
PYTHONPATH=. python3 -m unittest discover tests
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file photo_quality_analyzer_core-0.8.4.tar.gz.
File metadata
- Download URL: photo_quality_analyzer_core-0.8.4.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5b144876de3f4743a7884d5ea330d7af1525fe7154a34b032716798047f743c
|
|
| MD5 |
1f846553e00fc2c95db125bbf1cdabec
|
|
| BLAKE2b-256 |
8f379abb88fb6532241f31024f5d717fa1baa0aceed14bf74e621c3a6cbba128
|
Provenance
The following attestation bundles were made for photo_quality_analyzer_core-0.8.4.tar.gz:
Publisher:
publish.yml on prasadabhishek/photo-quality-analyzer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
photo_quality_analyzer_core-0.8.4.tar.gz -
Subject digest:
b5b144876de3f4743a7884d5ea330d7af1525fe7154a34b032716798047f743c - Sigstore transparency entry: 953650772
- Sigstore integration time:
-
Permalink:
prasadabhishek/photo-quality-analyzer@cf94bbdb46e989328debfba2d172282a89c01b1b -
Branch / Tag:
refs/tags/v0.8.4 - Owner: https://github.com/prasadabhishek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf94bbdb46e989328debfba2d172282a89c01b1b -
Trigger Event:
push
-
Statement type:
File details
Details for the file photo_quality_analyzer_core-0.8.4-py3-none-any.whl.
File metadata
- Download URL: photo_quality_analyzer_core-0.8.4-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bc2a4179a56fd20d669de1e42ac58ae92ef3850828dd0100ce26598d026dd65
|
|
| MD5 |
d7827e760db8db97a3c3e56ccce55f71
|
|
| BLAKE2b-256 |
b6f3d284125ea58ba1e2451f599a4629df9b39ac3afab281a7c9be51c6e2e6a2
|
Provenance
The following attestation bundles were made for photo_quality_analyzer_core-0.8.4-py3-none-any.whl:
Publisher:
publish.yml on prasadabhishek/photo-quality-analyzer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
photo_quality_analyzer_core-0.8.4-py3-none-any.whl -
Subject digest:
1bc2a4179a56fd20d669de1e42ac58ae92ef3850828dd0100ce26598d026dd65 - Sigstore transparency entry: 953650775
- Sigstore integration time:
-
Permalink:
prasadabhishek/photo-quality-analyzer@cf94bbdb46e989328debfba2d172282a89c01b1b -
Branch / Tag:
refs/tags/v0.8.4 - Owner: https://github.com/prasadabhishek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf94bbdb46e989328debfba2d172282a89c01b1b -
Trigger Event:
push
-
Statement type: