Skip to main content

Adaptive multi‑stage video quality audit pipeline

Project description

🎬 CineInfini – Video Quality Auditor

License: MIT Python 3.9+ Code style: black

CineInfini is an open‑source, modular pipeline for automatic, explainable video quality auditing. It goes beyond traditional fidelity metrics (PSNR, SSIM) by assessing temporal stability, identity consistency, semantic coherence, and narrative flow – all in a single GPU‑accelerated pipeline.

FeaturesInstallationQuick StartDocumentationContributing


✨ Features

  • Adaptive shot detection – HSV histogram with percentile‑based threshold
  • 7 intra‑shot metrics – motion peak (optical flow), 3D‑SSIM, flicker, identity drift (ArcFace), long‑range SSIM, high‑frequency flicker, CLIP temporal consistency
  • Inter‑shot coherence – structure (SSIM), style (histogram), semantic (CLIP)
  • Narrative coherence – DINOv2 cosine similarity between shots
  • Two‑stage audit – automatically optimises processing parameters and composite weights
  • GPU acceleration – CUDA for CLIP/DINOv2, parallel shot processing (4 workers)
  • Exhaustive reports – Markdown dashboards with bar charts, radar plots, improvement suggestions, and JSON exports
  • Benchmark mode – compare multiple videos (synthetic / real) with inter‑video dashboards

🛠 Installation

From PyPI (recommended)

pip install cineinfini-audit

From source

git clone https://github.com/CineInfini/Video_Quality_Auditor.git
cd Video_Quality_Auditor
pip install -e .

Dependencies

  • Python 3.9+
  • OpenCV, PyTorch, ONNX Runtime, transformers, open_clip_torch, scikit‑image, pandas, matplotlib, weasyprint, etc.
    (All are installed automatically with the package.)

🚀 Quick Start

1. Basic audit (first 60 seconds)

from cineinfini import audit_video

report_dir, metrics = audit_video("path/to/your_video.mp4")
print(f"Report saved to {report_dir}")

2. Adaptive audit (two‑stage optimisation)

from cineinfini import adaptive_multi_stage_audit

report_dir = adaptive_multi_stage_audit("video.mp4", force_full_video=False)

3. Command‑line interface (after installation)

cineinfini audit video.mp4 --output reports/
cineinfini compare --vids video1.mp4 video2.mp4 --benchmark

⚙️ Configuration

You can modify the global CONFIG dictionary before running an audit, or pass a custom parameter dict to audit_video:

custom_params = {
    "max_duration_s": 120,          # analyse 2 minutes
    "n_frames_per_shot": 8,         # faster, less precise
    "narrative_coherence": False,   # disable DINOv2 (CPU‑friendly)
    "thresholds": {"motion": 30.0, "ssim3d": 0.4}
}
audit_video("video.mp4", video_params=custom_params)

📊 Outputs

After an audit, the pipeline creates:

  • reports/intra/<video_name>/

    • data.json – raw per‑shot metrics
    • dashboard.md – Markdown report with bar charts, radar, alerts, improvement suggestions
    • figures/ – PNG bar charts and radar chart
  • reports/inter/<benchmark_name>/ (benchmark mode)

    • Inter‑video comparison dashboard with tables, bar charts, and radar

📖 Documentation

Full documentation (including API reference, tutorials, and parameter justifications) is available at https://cineinfini.readthedocs.io (coming soon).


🤝 Contributing

Contributions are welcome! Please read our CONTRIBUTING.md for guidelines.
Main areas:

  • Adding new metrics (e.g., TULIP, animal face detection)
  • Improving performance (GPU‑accelerated SSIM, lighter CLIP models)
  • Enhancing narrative coherence (object tracking over time)

📜 License

Distributed under the MIT License. See LICENSE for more information.


📄 Citation

If you use CineInfini in your research, please cite it as:

@software{cineinfini2025,
  author = {Salah-Eddine BENBRAHIM},
  title = {CineInfini: Adaptive Multi‑Stage Video Quality Audit Pipeline},
  year = {2025},
  url = {https://github.com/CineInfini/Video_Quality_Auditor},
  doi = {10.xxxx/xxxx}
}

🙏 Acknowledgments

  • Blender Foundation for open‑source movies (Big Buck Bunny, Sintel, Tears of Steel)
  • InsightFace (ArcFace), OpenAI (CLIP), Meta AI (DINOv2)
  • OpenCV, scikit‑image, ONNX Runtime, PyTorch, Hugging Face Transformers

Star ⭐ this repository if you find it useful!
For questions or suggestions, open an issue.

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

cineinfini_audit-0.1.0.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

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

cineinfini_audit-0.1.0-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file cineinfini_audit-0.1.0.tar.gz.

File metadata

  • Download URL: cineinfini_audit-0.1.0.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cineinfini_audit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6fbbcb4b43357dd3b6b916ea6fe9bef0b494a539126594817446ac831d8075c1
MD5 adb1ecb968fde6bee005a43beb78f1cc
BLAKE2b-256 7288bc082f9afd47c2a62fd59745e489e15f6c8031e7df526994a9385fcaca5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cineinfini_audit-0.1.0.tar.gz:

Publisher: publish.yml on CineInfini/Video_Quality_Auditor

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

File details

Details for the file cineinfini_audit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cineinfini_audit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cc4faeaa8df33b2641fbf8f378b621476a621ee5ad46f32d8f71fddf7aeb297
MD5 2cb9a1d5b3e76a5c8b97386be4314e44
BLAKE2b-256 74c9b7bb8569c4d56f8afd1eed0328cafd60b1b58f949b9a8ddc05a73c1ff99c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cineinfini_audit-0.1.0-py3-none-any.whl:

Publisher: publish.yml on CineInfini/Video_Quality_Auditor

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