Evaluate image quality metrics (SSIM, MAE, LPIPS, PSNR) for NIfTI images
Project description
NiiMetric
A Python CLI tool for evaluating image quality metrics between NIfTI (.nii/.nii.gz) images.
Features
- SSIM - Structural Similarity Index
- PSNR - Peak Signal-to-Noise Ratio
- MAE - Mean Absolute Error
- LPIPS - Learned Perceptual Image Patch Similarity
- Auto-cropping - Automatically crops to brain region based on reference image
- CSV output - Save results to CSV file
Installation
pip install niimetric
Usage
# Single metric
niimetric -a reference.nii.gz -b image1.nii.gz --ssim -o output.csv
niimetric -a reference.nii.gz -b image1.nii.gz --psnr -o output.csv
niimetric -a reference.nii.gz -b image1.nii.gz --mae -o output.csv
niimetric -a reference.nii.gz -b image1.nii.gz --lpips -o output.csv
# All metrics
niimetric -a reference.nii.gz -b image1.nii.gz --all -o output.csv
Arguments
| Argument | Description |
|---|---|
-a, --reference |
Reference NIfTI image (used for cropping boundaries) |
-b, --image |
Comparison NIfTI image |
-o, --output |
Output CSV file path |
--ssim |
Calculate SSIM |
--psnr |
Calculate PSNR |
--mae |
Calculate MAE |
--lpips |
Calculate LPIPS |
--all |
Calculate all metrics |
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
niimetric-0.1.0.tar.gz
(8.5 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 niimetric-0.1.0.tar.gz.
File metadata
- Download URL: niimetric-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd92a961647c7500dabae36091e83d92d3145cc952176ed1458ba40dac9d5fec
|
|
| MD5 |
3cbacfca0c8d8586b138f40151f1dcb4
|
|
| BLAKE2b-256 |
fa43d0b62a0307ed4243ce96f7aecd140540885344329e36accac1cde5f75b04
|
File details
Details for the file niimetric-0.1.0-py3-none-any.whl.
File metadata
- Download URL: niimetric-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
375bc14cde43df64f9e21d617085e05409b961fc424d72c531edf31bcc1d9840
|
|
| MD5 |
7165ef430aee4cdec251335dd208f0ac
|
|
| BLAKE2b-256 |
7a5b8d3a474f0216d2b1e86f759e6a6ce74adbda9a6e4db67f0a0406eeb0fd7c
|