A production-ready No-Reference Image Quality Assessment (NR-IQA) library.
Project description
DIQA: No-Reference Image Quality Assessment Library
DIQA is a library for No-Reference Image Quality Assessment (NR-IQA). It provides a unified interface for predicting image quality using multiple state-of-the-art methods and includes a routing mechanism to select the best method for a given image.
Features
- Unified Inference: Simple API to get MOS (Mean Opinion Score) estimates.
- Smart Routing: Uses an XGBoost-based router to dynamically select the most accurate IQA method for each image.
- Training Support: Built-in
DIQATrainerto train the router and mapping coefficients on your own datasets. - Extensible: Easily integrates with
pyiqafor underlying feature extraction.
Installation
pip install diqa
Usage
1. Basic Inference
Predict the quality score of an image:
from diqa import DIQA
# Initialize the engine
diqa = DIQA()
# Predict
result = diqa.predict("path/to/image.jpg")
print(f"MOS Estimate: {result['MOS_estimate']}")
print(f"Method Used: {result['selected_method']}")
2. Training on Custom Data
Train the routing model on your own dataset (requires a CSV with image_name and MOS columns):
from diqa import DIQATrainer
trainer = DIQATrainer(
image_dir="path/to/images",
mos_csv="path/to/scores.csv",
output_dir="my_custom_models"
)
# Prepare data (extract features and compute base scores)
trainer.prepare_data()
# Train the router
trainer.train()
License
MIT
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 diqa-0.1.5.tar.gz.
File metadata
- Download URL: diqa-0.1.5.tar.gz
- Upload date:
- Size: 74.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7573de153becca9a1567824124b5482ec707ccb81c099a1f608b7d3ee2ec1f1
|
|
| MD5 |
936d8ba57b9788f7df00617d78a3b938
|
|
| BLAKE2b-256 |
fe08ca0fc3b94dbd2a4276ee4b34ec1f367d336dfd1c084848c45a80bb8a08e7
|
File details
Details for the file diqa-0.1.5-py3-none-any.whl.
File metadata
- Download URL: diqa-0.1.5-py3-none-any.whl
- Upload date:
- Size: 74.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f221040b5c418948bb5733e2911e66e9ba0c7478591c5343f7b5414f38fa11e1
|
|
| MD5 |
a452d851cd3e49bfa866e8da287e2765
|
|
| BLAKE2b-256 |
55fd2fd265232a8bb2cb9761c38aeabfb9fb56eb097f668721328e3ed73736df
|