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
Metadata
Release files for diqa 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diqa-0.1.5.tar.gz | 74.0 kB | Without provenance | Details for diqa-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diqa-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for diqa-0.1.5-py3-none-any.whl |
Total release size: 148.3 kB
Release files / diqa-0.1.5.tar.gz
| Download URL | diqa-0.1.5.tar.gz |
|---|---|
| Size | 74.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7573de153becca9a1567824124b5482ec707ccb81c099a1f608b7d3ee2ec1f1
|
|
BLAKE2b-256 checksum How to use checksums |
fe08ca0fc3b94dbd2a4276ee4b34ec1f367d336dfd1c084848c45a80bb8a08e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / diqa-0.1.5-py3-none-any.whl
| Download URL | diqa-0.1.5-py3-none-any.whl |
|---|---|
| Size | 74.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f221040b5c418948bb5733e2911e66e9ba0c7478591c5343f7b5414f38fa11e1
|
|
BLAKE2b-256 checksum How to use checksums |
55fd2fd265232a8bb2cb9761c38aeabfb9fb56eb097f668721328e3ed73736df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for diqa 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.