nnInteractive 1.1.2__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nninteractive-1.1.2 → nninteractive-1.1.3}/PKG-INFO +19 -8
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/inference/inference_session.py +3 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive.egg-info/PKG-INFO +19 -8
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive.egg-info/requires.txt +1 -1
- {nninteractive-1.1.2 → nninteractive-1.1.3}/pyproject.toml +2 -2
- {nninteractive-1.1.2 → nninteractive-1.1.3}/readme.md +17 -6
- {nninteractive-1.1.2 → nninteractive-1.1.3}/LICENSE +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/inference/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/inference/cvpr2025_challenge_baseline/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/inference/cvpr2025_challenge_baseline/predict.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/interaction/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/interaction/point.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/setup.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/metadata.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/reader.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/run.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/automatic_mask_generator.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/benchmark.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/build_sam.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/backbones/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/backbones/hieradet.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/backbones/image_encoder.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/backbones/utils.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/memory_attention.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/memory_encoder.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/position_encoding.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam/mask_decoder.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam/prompt_encoder.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam/transformer.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam2_base.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam2_utils.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/sam2_image_predictor.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/sam2_video_predictor.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/sam2_video_predictor_legacy.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/utils/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/utils/amg.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/utils/misc.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/utils/transforms.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/setup.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/dataset/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/dataset/sam2_datasets.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/dataset/transforms.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/dataset/utils.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/dataset/vos_dataset.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/dataset/vos_raw_dataset.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/dataset/vos_sampler.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/dataset/vos_segment_loader.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/loss_fns.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/model/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/model/sam2.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/optimizer.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/scripts/sav_frame_extraction_submitit.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/train.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/trainer.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/utils/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/utils/checkpoint_utils.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/utils/data_utils.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/utils/distributed.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/utils/logger.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/utils/train_utils.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/supervoxel.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/trainer/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/trainer/nnInteractiveTrainer.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/utils/__init__.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/utils/bboxes.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/utils/checkpoint_cleansing.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/utils/crop.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/utils/erosion_dilation.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/utils/os_shennanigans.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/utils/rounding.py +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive.egg-info/SOURCES.txt +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive.egg-info/dependency_links.txt +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive.egg-info/top_level.txt +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/setup.cfg +0 -0
- {nninteractive-1.1.2 → nninteractive-1.1.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nnInteractive
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Inference code for nnInteractive
|
|
5
5
|
Author: Helmholtz Imaging Applied Computer Vision Lab
|
|
6
6
|
Author-email: Fabian Isensee <f.isensee@dkfz-heidelberg.de>
|
|
@@ -220,7 +220,7 @@ Requires-Python: >=3.10
|
|
|
220
220
|
Description-Content-Type: text/markdown
|
|
221
221
|
License-File: LICENSE
|
|
222
222
|
Requires-Dist: nnunetv2>=2.6
|
|
223
|
-
Requires-Dist: torch
|
|
223
|
+
Requires-Dist: torch<2.9.0,>=2.6
|
|
224
224
|
Requires-Dist: acvl-utils<0.3,>=0.2.3
|
|
225
225
|
Requires-Dist: batchgenerators>=0.25.1
|
|
226
226
|
Provides-Extra: dev
|
|
@@ -231,29 +231,36 @@ Dynamic: license-file
|
|
|
231
231
|
|
|
232
232
|
<img src="imgs/nnInteractive_header_white.png">
|
|
233
233
|
|
|
234
|
+
|
|
234
235
|
# Python backend for `nnInteractive: Redefining 3D Promptable Segmentation`
|
|
235
236
|
|
|
236
237
|
This repository provides the official Python backend for `nnInteractive`, a state-of-the-art framework for 3D promptable segmentation. It is designed for seamless integration into Python-based workflows—ideal for researchers, developers, and power users working directly with code.
|
|
237
238
|
|
|
239
|
+
> ⚠️ **Temporary Compatibility Warning**
|
|
240
|
+
> There is a known issue with **PyTorch 2.9.0** causing **OOM errors during inference** in `nnInteractive` (related to 3D convolutions — see the PyTorch issue [here](https://github.com/pytorch/pytorch/issues/166122)).
|
|
241
|
+
> **Until this is resolved, please use PyTorch 2.8.0 or earlier.**
|
|
242
|
+
|
|
243
|
+
|
|
238
244
|
`nnInteractive` is also available through graphical viewers (GUI) for those who prefer a visual workflow. The napari and MITK integrations are developed and maintained by our team. Thanks to the community for contributing the 3D Slicer extension!
|
|
239
245
|
|
|
240
246
|
|
|
241
247
|
<div align="center">
|
|
242
248
|
|
|
243
|
-
| **<div align="center">[napari plugin](https://github.com/MIC-DKFZ/napari-nninteractive)</div>** | **<div align="center">[MITK integration](https://www.mitk.org/wiki/MITK-nnInteractive)</div>** | **<div align="center">[3D Slicer extension](https://github.com/coendevente/SlicerNNInteractive)</div>** | **<div align="center">[ITK-SNAP extension](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)</div>** |
|
|
244
|
-
|
|
245
|
-
| [<img src="imgs/Logos/napari.jpg" height="200">](https://github.com/MIC-DKFZ/napari-nninteractive) | [<img src="imgs/Logos/mitk.jpg" height="200">](https://www.mitk.org/wiki/MITK-nnInteractive) | [<img src="imgs/Logos/3DSlicer.png" height="200">](https://github.com/coendevente/SlicerNNInteractive) | [<img src="imgs/Logos/snaplogo_sq.png" height="200">](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html) |
|
|
249
|
+
| **<div align="center">[napari plugin](https://github.com/MIC-DKFZ/napari-nninteractive)</div>** | **<div align="center">[MITK integration](https://www.mitk.org/wiki/MITK-nnInteractive)</div>** | **<div align="center">[3D Slicer extension](https://github.com/coendevente/SlicerNNInteractive)</div>** | **<div align="center">[ITK-SNAP extension](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)</div>** | **<div align="center">[OHIF integration](https://github.com/CCI-Bonn/OHIF-AI)</div>** |
|
|
250
|
+
|-------------------|----------------------|-------------------------|-------------------------|-------------------------|
|
|
251
|
+
| [<img src="imgs/Logos/napari.jpg" height="200">](https://github.com/MIC-DKFZ/napari-nninteractive) | [<img src="imgs/Logos/mitk.jpg" height="200">](https://www.mitk.org/wiki/MITK-nnInteractive) | [<img src="imgs/Logos/3DSlicer.png" height="200">](https://github.com/coendevente/SlicerNNInteractive) | [<img src="imgs/Logos/snaplogo_sq.png" height="200">](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html) | [<img src="imgs/Logos/ohif.png" height="200">](https://github.com/CCI-Bonn/OHIF-AI) |
|
|
246
252
|
|
|
247
253
|
</div>
|
|
248
254
|
|
|
249
255
|
|
|
250
256
|
## 📰 News
|
|
251
257
|
|
|
258
|
+
- **11/2025**: 🌐 New community driven **OHIF integration** released by our colleagues at [CCI Bonn](https://ccibonn.ai/). Try nnInteractive directly in OHIF 👉 [OHIF-AI](https://github.com/CCI-Bonn/OHIF-AI)
|
|
252
259
|
- **07/2025**: 🧩 New ITK-SNAP extension released! Try nnInteractive directly in ITK-SNAP 👉 [Quick Start](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)
|
|
253
260
|
- **06/2025**: 🏆 We’re thrilled to announce that `nnInteractive` **won the 1st place** in the [CVPR 2025 Challenge on Interactive 3D Segmentation](https://www.codabench.org/competitions/5263/). Huge shoutout to the organizers and all contributors!
|
|
254
|
-
- **05/2025**: `nnInteractive` presents an
|
|
255
|
-
- **04/2025**: 🎉 The
|
|
256
|
-
- **03/2025**: 🚀 `nnInteractive`
|
|
261
|
+
- **05/2025**: `nnInteractive` presents an official baseline at CVPR 2025 in the _Foundation Models for Interactive 3D Biomedical Image Segmentation Challenge_ ([Codabench link](https://www.codabench.org/competitions/5263/)) → see [`nnInteractive/inference/cvpr2025_challenge_baseline`](nnInteractive/inference/cvpr2025_challenge_baseline)
|
|
262
|
+
- **04/2025**: 🎉 The community contributed a 3D Slicer integration – thank you! 👉 [SlicerNNInteractive](https://github.com/coendevente/SlicerNNInteractive)
|
|
263
|
+
- **03/2025**: 🚀 `nnInteractive` launched with native support for napari and MITK
|
|
257
264
|
|
|
258
265
|
---
|
|
259
266
|
|
|
@@ -361,6 +368,10 @@ model_path = os.path.join(DOWNLOAD_DIR, MODEL_NAME)
|
|
|
361
368
|
session.initialize_from_trained_model_folder(model_path)
|
|
362
369
|
|
|
363
370
|
# --- Load Input Image (Example with SimpleITK) ---
|
|
371
|
+
# DO NOT preprocess the image in any way. Give it to nnInteractive as it is! DO NOT apply level window, DO NOT normalize
|
|
372
|
+
# intensities and never ever convert an image with higher precision (float32, uint16, etc) to uint8!
|
|
373
|
+
# The ONLY instance where some preprocesing makes sense is if your original image is too large to be reasonably used.
|
|
374
|
+
# This may be the case, for example, for some microCT images. In this case you can consider downsampling.
|
|
364
375
|
input_image = sitk.ReadImage("FILENAME")
|
|
365
376
|
img = sitk.GetArrayFromImage(input_image)[None] # Ensure shape (1, x, y, z)
|
|
366
377
|
|
|
@@ -363,6 +363,9 @@ class nnInteractiveInferenceSession():
|
|
|
363
363
|
"""
|
|
364
364
|
assert self.pad_mode_data == 'constant', 'pad modes other than constant are not implemented here'
|
|
365
365
|
assert len(self.new_interaction_centers) == len(self.new_interaction_zoom_out_factors)
|
|
366
|
+
if len(self.new_interaction_centers) == 0:
|
|
367
|
+
print('No patch queued for prediction. Nothing to do.')
|
|
368
|
+
return
|
|
366
369
|
|
|
367
370
|
if len(self.new_interaction_centers) > 1:
|
|
368
371
|
print('It seems like more than one interaction was added since the last prediction. This is not '
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nnInteractive
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Inference code for nnInteractive
|
|
5
5
|
Author: Helmholtz Imaging Applied Computer Vision Lab
|
|
6
6
|
Author-email: Fabian Isensee <f.isensee@dkfz-heidelberg.de>
|
|
@@ -220,7 +220,7 @@ Requires-Python: >=3.10
|
|
|
220
220
|
Description-Content-Type: text/markdown
|
|
221
221
|
License-File: LICENSE
|
|
222
222
|
Requires-Dist: nnunetv2>=2.6
|
|
223
|
-
Requires-Dist: torch
|
|
223
|
+
Requires-Dist: torch<2.9.0,>=2.6
|
|
224
224
|
Requires-Dist: acvl-utils<0.3,>=0.2.3
|
|
225
225
|
Requires-Dist: batchgenerators>=0.25.1
|
|
226
226
|
Provides-Extra: dev
|
|
@@ -231,29 +231,36 @@ Dynamic: license-file
|
|
|
231
231
|
|
|
232
232
|
<img src="imgs/nnInteractive_header_white.png">
|
|
233
233
|
|
|
234
|
+
|
|
234
235
|
# Python backend for `nnInteractive: Redefining 3D Promptable Segmentation`
|
|
235
236
|
|
|
236
237
|
This repository provides the official Python backend for `nnInteractive`, a state-of-the-art framework for 3D promptable segmentation. It is designed for seamless integration into Python-based workflows—ideal for researchers, developers, and power users working directly with code.
|
|
237
238
|
|
|
239
|
+
> ⚠️ **Temporary Compatibility Warning**
|
|
240
|
+
> There is a known issue with **PyTorch 2.9.0** causing **OOM errors during inference** in `nnInteractive` (related to 3D convolutions — see the PyTorch issue [here](https://github.com/pytorch/pytorch/issues/166122)).
|
|
241
|
+
> **Until this is resolved, please use PyTorch 2.8.0 or earlier.**
|
|
242
|
+
|
|
243
|
+
|
|
238
244
|
`nnInteractive` is also available through graphical viewers (GUI) for those who prefer a visual workflow. The napari and MITK integrations are developed and maintained by our team. Thanks to the community for contributing the 3D Slicer extension!
|
|
239
245
|
|
|
240
246
|
|
|
241
247
|
<div align="center">
|
|
242
248
|
|
|
243
|
-
| **<div align="center">[napari plugin](https://github.com/MIC-DKFZ/napari-nninteractive)</div>** | **<div align="center">[MITK integration](https://www.mitk.org/wiki/MITK-nnInteractive)</div>** | **<div align="center">[3D Slicer extension](https://github.com/coendevente/SlicerNNInteractive)</div>** | **<div align="center">[ITK-SNAP extension](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)</div>** |
|
|
244
|
-
|
|
245
|
-
| [<img src="imgs/Logos/napari.jpg" height="200">](https://github.com/MIC-DKFZ/napari-nninteractive) | [<img src="imgs/Logos/mitk.jpg" height="200">](https://www.mitk.org/wiki/MITK-nnInteractive) | [<img src="imgs/Logos/3DSlicer.png" height="200">](https://github.com/coendevente/SlicerNNInteractive) | [<img src="imgs/Logos/snaplogo_sq.png" height="200">](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html) |
|
|
249
|
+
| **<div align="center">[napari plugin](https://github.com/MIC-DKFZ/napari-nninteractive)</div>** | **<div align="center">[MITK integration](https://www.mitk.org/wiki/MITK-nnInteractive)</div>** | **<div align="center">[3D Slicer extension](https://github.com/coendevente/SlicerNNInteractive)</div>** | **<div align="center">[ITK-SNAP extension](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)</div>** | **<div align="center">[OHIF integration](https://github.com/CCI-Bonn/OHIF-AI)</div>** |
|
|
250
|
+
|-------------------|----------------------|-------------------------|-------------------------|-------------------------|
|
|
251
|
+
| [<img src="imgs/Logos/napari.jpg" height="200">](https://github.com/MIC-DKFZ/napari-nninteractive) | [<img src="imgs/Logos/mitk.jpg" height="200">](https://www.mitk.org/wiki/MITK-nnInteractive) | [<img src="imgs/Logos/3DSlicer.png" height="200">](https://github.com/coendevente/SlicerNNInteractive) | [<img src="imgs/Logos/snaplogo_sq.png" height="200">](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html) | [<img src="imgs/Logos/ohif.png" height="200">](https://github.com/CCI-Bonn/OHIF-AI) |
|
|
246
252
|
|
|
247
253
|
</div>
|
|
248
254
|
|
|
249
255
|
|
|
250
256
|
## 📰 News
|
|
251
257
|
|
|
258
|
+
- **11/2025**: 🌐 New community driven **OHIF integration** released by our colleagues at [CCI Bonn](https://ccibonn.ai/). Try nnInteractive directly in OHIF 👉 [OHIF-AI](https://github.com/CCI-Bonn/OHIF-AI)
|
|
252
259
|
- **07/2025**: 🧩 New ITK-SNAP extension released! Try nnInteractive directly in ITK-SNAP 👉 [Quick Start](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)
|
|
253
260
|
- **06/2025**: 🏆 We’re thrilled to announce that `nnInteractive` **won the 1st place** in the [CVPR 2025 Challenge on Interactive 3D Segmentation](https://www.codabench.org/competitions/5263/). Huge shoutout to the organizers and all contributors!
|
|
254
|
-
- **05/2025**: `nnInteractive` presents an
|
|
255
|
-
- **04/2025**: 🎉 The
|
|
256
|
-
- **03/2025**: 🚀 `nnInteractive`
|
|
261
|
+
- **05/2025**: `nnInteractive` presents an official baseline at CVPR 2025 in the _Foundation Models for Interactive 3D Biomedical Image Segmentation Challenge_ ([Codabench link](https://www.codabench.org/competitions/5263/)) → see [`nnInteractive/inference/cvpr2025_challenge_baseline`](nnInteractive/inference/cvpr2025_challenge_baseline)
|
|
262
|
+
- **04/2025**: 🎉 The community contributed a 3D Slicer integration – thank you! 👉 [SlicerNNInteractive](https://github.com/coendevente/SlicerNNInteractive)
|
|
263
|
+
- **03/2025**: 🚀 `nnInteractive` launched with native support for napari and MITK
|
|
257
264
|
|
|
258
265
|
---
|
|
259
266
|
|
|
@@ -361,6 +368,10 @@ model_path = os.path.join(DOWNLOAD_DIR, MODEL_NAME)
|
|
|
361
368
|
session.initialize_from_trained_model_folder(model_path)
|
|
362
369
|
|
|
363
370
|
# --- Load Input Image (Example with SimpleITK) ---
|
|
371
|
+
# DO NOT preprocess the image in any way. Give it to nnInteractive as it is! DO NOT apply level window, DO NOT normalize
|
|
372
|
+
# intensities and never ever convert an image with higher precision (float32, uint16, etc) to uint8!
|
|
373
|
+
# The ONLY instance where some preprocesing makes sense is if your original image is too large to be reasonably used.
|
|
374
|
+
# This may be the case, for example, for some microCT images. In this case you can consider downsampling.
|
|
364
375
|
input_image = sitk.ReadImage("FILENAME")
|
|
365
376
|
img = sitk.GetArrayFromImage(input_image)[None] # Ensure shape (1, x, y, z)
|
|
366
377
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "nnInteractive"
|
|
3
|
-
version = "1.1.
|
|
3
|
+
version = "1.1.3"
|
|
4
4
|
requires-python = ">=3.10"
|
|
5
5
|
description = "Inference code for nnInteractive"
|
|
6
6
|
readme = "readme.md"
|
|
@@ -31,7 +31,7 @@ keywords = [
|
|
|
31
31
|
]
|
|
32
32
|
dependencies = [
|
|
33
33
|
"nnunetv2>=2.6",
|
|
34
|
-
"torch>=2.6",
|
|
34
|
+
"torch>=2.6,<2.9.0",
|
|
35
35
|
"acvl-utils>=0.2.3,<0.3", # 0.3 may bring breaking changes. Careful!
|
|
36
36
|
"batchgenerators>=0.25.1",
|
|
37
37
|
]
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
<img src="imgs/nnInteractive_header_white.png">
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
# Python backend for `nnInteractive: Redefining 3D Promptable Segmentation`
|
|
4
5
|
|
|
5
6
|
This repository provides the official Python backend for `nnInteractive`, a state-of-the-art framework for 3D promptable segmentation. It is designed for seamless integration into Python-based workflows—ideal for researchers, developers, and power users working directly with code.
|
|
6
7
|
|
|
8
|
+
> ⚠️ **Temporary Compatibility Warning**
|
|
9
|
+
> There is a known issue with **PyTorch 2.9.0** causing **OOM errors during inference** in `nnInteractive` (related to 3D convolutions — see the PyTorch issue [here](https://github.com/pytorch/pytorch/issues/166122)).
|
|
10
|
+
> **Until this is resolved, please use PyTorch 2.8.0 or earlier.**
|
|
11
|
+
|
|
12
|
+
|
|
7
13
|
`nnInteractive` is also available through graphical viewers (GUI) for those who prefer a visual workflow. The napari and MITK integrations are developed and maintained by our team. Thanks to the community for contributing the 3D Slicer extension!
|
|
8
14
|
|
|
9
15
|
|
|
10
16
|
<div align="center">
|
|
11
17
|
|
|
12
|
-
| **<div align="center">[napari plugin](https://github.com/MIC-DKFZ/napari-nninteractive)</div>** | **<div align="center">[MITK integration](https://www.mitk.org/wiki/MITK-nnInteractive)</div>** | **<div align="center">[3D Slicer extension](https://github.com/coendevente/SlicerNNInteractive)</div>** | **<div align="center">[ITK-SNAP extension](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)</div>** |
|
|
13
|
-
|
|
14
|
-
| [<img src="imgs/Logos/napari.jpg" height="200">](https://github.com/MIC-DKFZ/napari-nninteractive) | [<img src="imgs/Logos/mitk.jpg" height="200">](https://www.mitk.org/wiki/MITK-nnInteractive) | [<img src="imgs/Logos/3DSlicer.png" height="200">](https://github.com/coendevente/SlicerNNInteractive) | [<img src="imgs/Logos/snaplogo_sq.png" height="200">](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html) |
|
|
18
|
+
| **<div align="center">[napari plugin](https://github.com/MIC-DKFZ/napari-nninteractive)</div>** | **<div align="center">[MITK integration](https://www.mitk.org/wiki/MITK-nnInteractive)</div>** | **<div align="center">[3D Slicer extension](https://github.com/coendevente/SlicerNNInteractive)</div>** | **<div align="center">[ITK-SNAP extension](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)</div>** | **<div align="center">[OHIF integration](https://github.com/CCI-Bonn/OHIF-AI)</div>** |
|
|
19
|
+
|-------------------|----------------------|-------------------------|-------------------------|-------------------------|
|
|
20
|
+
| [<img src="imgs/Logos/napari.jpg" height="200">](https://github.com/MIC-DKFZ/napari-nninteractive) | [<img src="imgs/Logos/mitk.jpg" height="200">](https://www.mitk.org/wiki/MITK-nnInteractive) | [<img src="imgs/Logos/3DSlicer.png" height="200">](https://github.com/coendevente/SlicerNNInteractive) | [<img src="imgs/Logos/snaplogo_sq.png" height="200">](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html) | [<img src="imgs/Logos/ohif.png" height="200">](https://github.com/CCI-Bonn/OHIF-AI) |
|
|
15
21
|
|
|
16
22
|
</div>
|
|
17
23
|
|
|
18
24
|
|
|
19
25
|
## 📰 News
|
|
20
26
|
|
|
27
|
+
- **11/2025**: 🌐 New community driven **OHIF integration** released by our colleagues at [CCI Bonn](https://ccibonn.ai/). Try nnInteractive directly in OHIF 👉 [OHIF-AI](https://github.com/CCI-Bonn/OHIF-AI)
|
|
21
28
|
- **07/2025**: 🧩 New ITK-SNAP extension released! Try nnInteractive directly in ITK-SNAP 👉 [Quick Start](https://itksnap-dls.readthedocs.io/en/latest/quick_start.html)
|
|
22
29
|
- **06/2025**: 🏆 We’re thrilled to announce that `nnInteractive` **won the 1st place** in the [CVPR 2025 Challenge on Interactive 3D Segmentation](https://www.codabench.org/competitions/5263/). Huge shoutout to the organizers and all contributors!
|
|
23
|
-
- **05/2025**: `nnInteractive` presents an
|
|
24
|
-
- **04/2025**: 🎉 The
|
|
25
|
-
- **03/2025**: 🚀 `nnInteractive`
|
|
30
|
+
- **05/2025**: `nnInteractive` presents an official baseline at CVPR 2025 in the _Foundation Models for Interactive 3D Biomedical Image Segmentation Challenge_ ([Codabench link](https://www.codabench.org/competitions/5263/)) → see [`nnInteractive/inference/cvpr2025_challenge_baseline`](nnInteractive/inference/cvpr2025_challenge_baseline)
|
|
31
|
+
- **04/2025**: 🎉 The community contributed a 3D Slicer integration – thank you! 👉 [SlicerNNInteractive](https://github.com/coendevente/SlicerNNInteractive)
|
|
32
|
+
- **03/2025**: 🚀 `nnInteractive` launched with native support for napari and MITK
|
|
26
33
|
|
|
27
34
|
---
|
|
28
35
|
|
|
@@ -130,6 +137,10 @@ model_path = os.path.join(DOWNLOAD_DIR, MODEL_NAME)
|
|
|
130
137
|
session.initialize_from_trained_model_folder(model_path)
|
|
131
138
|
|
|
132
139
|
# --- Load Input Image (Example with SimpleITK) ---
|
|
140
|
+
# DO NOT preprocess the image in any way. Give it to nnInteractive as it is! DO NOT apply level window, DO NOT normalize
|
|
141
|
+
# intensities and never ever convert an image with higher precision (float32, uint16, etc) to uint8!
|
|
142
|
+
# The ONLY instance where some preprocesing makes sense is if your original image is too large to be reasonably used.
|
|
143
|
+
# This may be the case, for example, for some microCT images. In this case you can consider downsampling.
|
|
133
144
|
input_image = sitk.ReadImage("FILENAME")
|
|
134
145
|
img = sitk.GetArrayFromImage(input_image)[None] # Ensure shape (1, x, y, z)
|
|
135
146
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/benchmark.py
RENAMED
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/build_sam.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/utils/__init__.py
RENAMED
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/utils/amg.py
RENAMED
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/sam2/utils/misc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/loss_fns.py
RENAMED
|
File without changes
|
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/model/sam2.py
RENAMED
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/optimizer.py
RENAMED
|
File without changes
|
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/train.py
RENAMED
|
File without changes
|
{nninteractive-1.1.2 → nninteractive-1.1.3}/nnInteractive/supervoxel/src/sam2/training/trainer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|