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.2.tar.gz
(9.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
niimetric-0.1.2-py3-none-any.whl
(10.5 kB
view details)
File details
Details for the file niimetric-0.1.2.tar.gz.
File metadata
- Download URL: niimetric-0.1.2.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c0c7cd63327f925abd55eaf663f3bb32fa0e766aa63b37583977c459bb00e6b
|
|
| MD5 |
17655afef4b349b910850409b4303013
|
|
| BLAKE2b-256 |
1a2d957963b1d3557d7e3afae8c6adc19c4943affbe70a80d0ea9243c5b18bbc
|
File details
Details for the file niimetric-0.1.2-py3-none-any.whl.
File metadata
- Download URL: niimetric-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.5 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 |
4da152a7be397c5c5decbc7052090e3cf3a3ea801076de6a0ff6293017180e7c
|
|
| MD5 |
ff5f7282d8c015d8adef23b4e6d81ee8
|
|
| BLAKE2b-256 |
ed7a9f1b3a72b3b85ad203b3b6e24f33e58cf3ecc7e49f7ac23f1ba7e07aa052
|