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-imagesprovides metric processors only — no CLI or job orchestration. Use directly via Python or withdqm-ml-jobfor 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_luminositym_contrastm_blur_levelm_entropy
Requirements
opencv-pythonpillownumpy
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
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 dqm_ml_images-2.0.0rc0.tar.gz.
File metadata
- Download URL: dqm_ml_images-2.0.0rc0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
156a92e0bf157acd6f134ca01cf8d8e87f4a5f20b929854356f8b3699a1bac07
|
|
| MD5 |
4245c5588d593c1cf669302039121c14
|
|
| BLAKE2b-256 |
06914a00b0bd14b6cc4d265cb36adba33fb42e776b835b140d4638c22f6914da
|
File details
Details for the file dqm_ml_images-2.0.0rc0-py3-none-any.whl.
File metadata
- Download URL: dqm_ml_images-2.0.0rc0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d6a9deb45cd8db51026c8e700c1554a4ee2b61093c1151f806adb49f8c73efc
|
|
| MD5 |
63f7e43deb3d51e3f66f138a57625718
|
|
| BLAKE2b-256 |
ae0b06ac48f08cd0b8e0950ced958225039b5b110a9673b23ff954aa23411274
|