| Crates.io | mikan-rs |
| lib.rs | mikan-rs |
| version | 0.1.4 |
| created_at | 2025-02-13 15:13:33.021364+00 |
| updated_at | 2025-02-25 12:51:50.848941+00 |
| description | A medical image kit for segmentation metrics evaluation, native Rust support, and Python bindings for cross-language performance. |
| homepage | |
| repository | https://github.com/Plasma-Blue/mikan-rs |
| max_upload_size | |
| id | 1554356 |
| size | 226,876 |
A medical image kit for segmentation metrics evaluation, native Rust support, and Python bindings for cross-language performance.
🚀 Blazingly Fast: Written in Rust with high parallelization; speeds are 10-100x faster than medpy (depends on the number of cores in your CPU), especially for Hausdorff distance calculations.
🎯 Simple: The API is so intuitive that you can start using it immediately while reading the documentation in just one minute!
🧮 Comprehensive Metrics: Easily to compute almost all of segmentation metrics, results are consistent with medpy:
Confusion Matrix Based:
Distance Based:
For Rust projects, add the following to your Cargo.toml:
[dependencies]
mikan-rs = "*"
For Python, install via pip:
pip install mikan-rs
maturin dev
import mikan
import SimpleITK as sitk
gt = sitk.ReadImage("gt.nii.gz", sitk.sitkUInt8)
pred = sitk.ReadImage("pred.nii.gz", sitk.sitkUInt8)
e = mikan.Evaluator(gt, pred)
e.labels([1, 2, 3]).metrics(["dice", "hd", "hd95", "assd"])
For details, please refer to the python examples and rust examples.
If you use this software, we would appreciate it if you could include an mikan emoji 🍊 in your paper.
Q: Why are my results different from seg_metrics/miseval/MetricsReloaded?
A: They are wrong. Of course, we might be wrong too. PRs to fix issues are welcome!
Licensed under either of the following licenses, at your choice:
Apache License, Version 2.0 (See LICENSE-APACHE or visit http://www.apache.org/licenses/LICENSE-2.0)
MIT License (See LICENSE-MIT or visit http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project, as defined by the Apache License 2.0, will be dual-licensed under the above licenses without any additional terms or conditions.