Skip to main content

Python library designed provide core dqm-ml metrics without huge dependencies, as well as common API shared by metrics

Project description

DQM-ML Images

Image feature extraction package for DQM-ML V2. Provides metrics for assessing image dataset quality.

Installation

pip install dqm-ml-images

Note: dqm-ml-images provides metric processors only — no CLI or job orchestration. Use directly via Python or with dqm-ml-job for YAML config execution.

Usage

Using Python Directly

import numpy as np
from pathlib import Path
from dqm_ml_images import VisualFeaturesProcessor
from PIL import Image

# Load or generate sample images
images = [Image.open("path/to/image1.jpg"), Image.open("path/to/image2.jpg")]

# Create and configure the processor
processor = VisualFeaturesProcessor(
    name="image_quality",
    config={
        "input_columns": ["image_bytes"],
        "grayscale": True
    }
)

# Process images to extract features
batch = {"image_bytes": images}
features = processor.compute_features(batch)
print(f"Luminosity: {features['m_luminosity']}")
print(f"Contrast: {features['m_contrast']}")
print(f"Blur: {features['m_blur_level']}")
print(f"Entropy: {features['m_entropy']}")

With dqm-ml-job

For running from a YAML config, install together with dqm-ml-job:

pip install dqm-ml-job dqm-ml-images

Then use this config:

metrics_processor:
  image_quality:
    type: visual_metric
    input_columns: ["image_data"]
    grayscale: true

Features

Feature Description
Luminosity Mean gray level — measures overall brightness
Contrast RMS contrast — measures tonal range
Blur Variance of Laplacian — estimates sharpness/focus
Entropy Shannon entropy — measures information content

Output

The processor adds these columns to your data:

  • m_luminosity
  • m_contrast
  • m_blur_level
  • m_entropy

Requirements

  • opencv-python
  • pillow
  • numpy

Dependencies

DQM-ML is modular. For visual features:

# Minimal: use as library only
pip install dqm-ml-images

# For YAML config execution
pip install dqm-ml-job dqm-ml-images

# Full stack with all metrics
pip install dqm-ml-job dqm-ml-core dqm-ml-images dqm-ml-pytorch

See Also

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

dqm_ml_images-2.0.0rc1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

dqm_ml_images-2.0.0rc1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file dqm_ml_images-2.0.0rc1.tar.gz.

File metadata

  • Download URL: dqm_ml_images-2.0.0rc1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dqm_ml_images-2.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 48396e766e0af3000ada9029741f4275062c0e926590d41bd7c42b60e4bed9db
MD5 d02df4cae4040b52d8ed686d474f0231
BLAKE2b-256 9820d0c0a2dc678a6f7f8cbd12e0aac0d955d270a4d32fafca0c89d842fb2076

See more details on using hashes here.

File details

Details for the file dqm_ml_images-2.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: dqm_ml_images-2.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dqm_ml_images-2.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9d3299edcb239f550f0b9cd75a750df26aac14ed06866d15aea95c0a43db30a
MD5 83d11a64a92b72dfeab56a08a7ad2533
BLAKE2b-256 0f6b7668141da746e1a45c4c830e33f14dbcf26a354cd13043c68ce871c1e6b0

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