Skip to main content

Modular media quality metrics toolkit

Project description

Ayase

Modular media quality metrics for video, image, and audio datasets.

Work in progress - APIs and module interfaces may change before 1.0.

What It Does

Ayase runs quality assessment modules over a dataset and writes structured per-sample metrics. 327 modules produce 368 metrics across 21 categories (NR-IQA, FR-IQA, NR-VQA, temporal, motion, audio, face, safety, aesthetics, text-video alignment, and more). Modules are independent - pick only what you need.

Full metric catalog: METRICS.md. Pretrained model catalog: MODELS.md.

Install

pip install ayase

Ayase is distributed as a single install. Runtime dependencies are managed by the project itself, and model weights are downloaded and cached on first use.

CLI

ayase scan ./dataset                                    # default balanced pipeline
ayase scan ./dataset --deep                             # run every discovered module
ayase scan ./dataset --modules metadata,basic_quality   # selected modules
ayase modules list                                      # show all 327 modules
ayase modules check                                     # import/dependency readiness
ayase filter ./dataset --min-score 70 --output ./good   # filter by quality
ayase stats ./dataset                                   # dataset statistics for images/video
ayase tui                                               # terminal UI

Python API

from ayase import AyasePipeline

pipeline = AyasePipeline(modules=["basic", "metadata", "motion"])
results = pipeline.run("./my_dataset")

for path, sample in results.items():
    qm = sample.quality_metrics
    if qm:
        print(f"{sample.path.name}: technical={qm.technical_score} blur={qm.blur_score}")

pipeline.export("report.json")   # also: report.csv, report.html

Configuration

ayase.toml in project root:

[general]
parallel_jobs = 8  # concurrency hint passed to capable modules/backends

[pipeline]
modules = ["metadata", "basic_quality", "motion"]

[output]
default_format = "json"
artifacts_dir = "reports"

Custom Modules

from ayase.models import QualityMetrics, Sample, ValidationIssue, ValidationSeverity
from ayase.pipeline import PipelineModule
import cv2

class BlurCheck(PipelineModule):
    name = "blur_check"
    description = "Flag blurry frames via Laplacian variance"
    default_config = {"threshold": 100.0}

    def process(self, sample: Sample) -> Sample:
        img = cv2.imread(str(sample.path), cv2.IMREAD_GRAYSCALE)
        if img is None:
            return sample
        score = float(cv2.Laplacian(img, cv2.CV_64F).var())
        if sample.quality_metrics is None:
            sample.quality_metrics = QualityMetrics()
        sample.quality_metrics.blur_score = score
        if score < self.config.get("threshold", 100.0):
            sample.validation_issues.append(
                ValidationIssue(
                    severity=ValidationSeverity.WARNING,
                    message=f"Blurry ({score:.0f})",
                )
            )
        return sample

Modules auto-register via __init_subclass__. Config is available as self.config.

Development

git clone <repo-url> && cd ayase
pip install -e ".[dev]"
pytest                    # 8000+ tests, ~4 min
pytest tests/ --full      # with ML model loading

License

MIT. Model weights downloaded at runtime carry their own licenses - see MODELS.md.

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

ayase-0.1.30.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

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

ayase-0.1.30-py3-none-any.whl (6.7 MB view details)

Uploaded Python 3

File details

Details for the file ayase-0.1.30.tar.gz.

File metadata

  • Download URL: ayase-0.1.30.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for ayase-0.1.30.tar.gz
Algorithm Hash digest
SHA256 fd200d95c2a9cd35d5736f44bb142e3c3301b4b74ae3e70897695e35f19b6367
MD5 6228c05a4598607fbfec7549a0aa1871
BLAKE2b-256 4624a8dea578635eafc3532cc023f8e3cfc4674a6a78d4b325c5b2b39f9a7d89

See more details on using hashes here.

File details

Details for the file ayase-0.1.30-py3-none-any.whl.

File metadata

  • Download URL: ayase-0.1.30-py3-none-any.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for ayase-0.1.30-py3-none-any.whl
Algorithm Hash digest
SHA256 1dbcf52d0fe27c5444f623ddf51487f2bd89acfedbca94c3d5b28cee0bb1d95a
MD5 8d4042b554cce25822d60531db92e3df
BLAKE2b-256 78fc184d69dc58bbd1e29a6e5c3b517a2b632af615da9e13b30b13509a276f74

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