Skip to main content

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

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:

  1. FFT Anisotropy: Measures purely optical acutance, invariant to rotation. Adjusted for Aperture-aware diffraction.
  2. Zone System Histogram: Analyzes luminance using Ansel Adams' Zone System to detect destructive clipping.
  3. Neural ROI: Leverages YOLOv11 to identify main subjects, ensuring metrics are calculated on the subject rather than the background.
  4. Sensor Normalization: Benchmarks images against the known limits of the specific camera sensor (Full Frame vs APS-C vs 1-inch).

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

MIT

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

photo_quality_analyzer_core-0.4.0.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

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

photo_quality_analyzer_core-0.4.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file photo_quality_analyzer_core-0.4.0.tar.gz.

File metadata

File hashes

Hashes for photo_quality_analyzer_core-0.4.0.tar.gz
Algorithm Hash digest
SHA256 e9299e4702706f3e81705db16773e868ee6dc783d3fa89ca09887e14a56f846a
MD5 0cfc2461f1c5ba60689b3a1089d9dcc5
BLAKE2b-256 11cb6bc02beddbe57b6cd61312617cbb3923591d723f232276607ce53b6f5e7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for photo_quality_analyzer_core-0.4.0.tar.gz:

Publisher: publish.yml on prasadabhishek/photo-quality-analyzer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file photo_quality_analyzer_core-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for photo_quality_analyzer_core-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2af2480d5d20691e6fd9da899137a16b64ad835e5313ceb4549d9d66f8165242
MD5 b93788259e2b9a40bd73486aff0aeba1
BLAKE2b-256 6ecb1a4d8a3b23fa10e7e668c1819b2448df42a249dce22b77ed5d3cf8e0201f

See more details on using hashes here.

Provenance

The following attestation bundles were made for photo_quality_analyzer_core-0.4.0-py3-none-any.whl:

Publisher: publish.yml on prasadabhishek/photo-quality-analyzer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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