A library to perform image quality and classification assessment.
Project description
Metrics Library
This library provides utilities for calculating various metrics in image quality assessment and classification.
Features
- Image Quality Metrics: PSNR, SSIM, MSE, FID, NIQE
- Classification Metrics: Confusion Matrix, Accuracy, Precision, Recall, F1 Score
Installation
pip install mmetrics
Usage
'''Image Quality Assessment'''
from metrics.image_quality import psnr, ssim, mse, niqe, fid
#Load your images to compare using any tool to have them as numpy arrays
psnr(img1, img2)
ssim(img1, img2)
mse(img1, img2)
niqe(img1)
#Put the path of your images
fid(real_images_path, fake_images_path)
'''Classification Assessment'''
from metrics.classification import confusion_matrix, accuracy, precision, recall, f1_score, jaccard_index
#Load your ground truth (y_true) and your predictions (y_pred) as numpy arrays
confusion_matrix(y_true, y_pred)
accuracy(y_true, y_pred)
precision(y_true, y_pred)
recall(y_true, y_pred)
f1_score(y_true, y_pred)
jaccard_index(y_true, y_pred)
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
mmetrics-1.1.0.tar.gz
(4.8 kB
view details)
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 mmetrics-1.1.0.tar.gz.
File metadata
- Download URL: mmetrics-1.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5baea9c647d784e227abea861655c82e2ff8a20369c2c6b335e586d134cbfb09
|
|
| MD5 |
d17e3269c3ba45702232bffb54057409
|
|
| BLAKE2b-256 |
46bd1abd7db6c56f31c3c085bc568d5608d4b1f1a20843dd8cbd99f27154334a
|
File details
Details for the file mmetrics-1.1.0-py3-none-any.whl.
File metadata
- Download URL: mmetrics-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca5845b6864aa95ab15d970a1ca67e25e1b39d75d4ba7d1a499a64530eca3cf4
|
|
| MD5 |
84a684fa8f5a5aa52f399138ce42bb85
|
|
| BLAKE2b-256 |
a84f993c75a814682c0fcae7842d2fe9ae4bca483bf0943536ab821e825dda9b
|