Skip to main content

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


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.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

niimetric-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file niimetric-0.1.1.tar.gz.

File metadata

  • Download URL: niimetric-0.1.1.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

Hashes for niimetric-0.1.1.tar.gz
Algorithm Hash digest
SHA256 357aa77816a2dcc79273a85b957e70a4437e9eb8f390be199185facc29e154d0
MD5 59987ae05f47ed52723e5f47f18e57a8
BLAKE2b-256 eae7ea53ffd573e46e3e107102cbf734db7cb39800ce1de96a5f5a4bbe707fed

See more details on using hashes here.

File details

Details for the file niimetric-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: niimetric-0.1.1-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

Hashes for niimetric-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29070bddb5af0d215a59634adc74b5dc94a252409335c5003ff7db36d21302c8
MD5 33f335c48f27078eb74120db70a861db
BLAKE2b-256 8cd011fab2c0888c6ea055450f3217a850dd1faa746f3b72b24622afc48368c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page