nnInteractive 1.1.0__tar.gz → 1.1.2__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.
Files changed (82) hide show
  1. {nninteractive-1.1.0 → nninteractive-1.1.2}/PKG-INFO +13 -2
  2. nninteractive-1.1.2/nnInteractive/__init__.py +3 -0
  3. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/inference/inference_session.py +5 -2
  4. nninteractive-1.1.2/nnInteractive/utils/os_shennanigans.py +15 -0
  5. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive.egg-info/PKG-INFO +13 -2
  6. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive.egg-info/SOURCES.txt +1 -0
  7. {nninteractive-1.1.0 → nninteractive-1.1.2}/pyproject.toml +1 -1
  8. {nninteractive-1.1.0 → nninteractive-1.1.2}/readme.md +10 -0
  9. nninteractive-1.1.0/nnInteractive/__init__.py +0 -1
  10. {nninteractive-1.1.0 → nninteractive-1.1.2}/LICENSE +0 -0
  11. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/inference/__init__.py +0 -0
  12. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/inference/cvpr2025_challenge_baseline/__init__.py +0 -0
  13. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/inference/cvpr2025_challenge_baseline/predict.py +0 -0
  14. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/interaction/__init__.py +0 -0
  15. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/interaction/point.py +0 -0
  16. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/setup.py +0 -0
  17. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/metadata.py +0 -0
  18. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/reader.py +0 -0
  19. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/run.py +0 -0
  20. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/__init__.py +0 -0
  21. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/__init__.py +0 -0
  22. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/automatic_mask_generator.py +0 -0
  23. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/benchmark.py +0 -0
  24. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/build_sam.py +0 -0
  25. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/__init__.py +0 -0
  26. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/backbones/__init__.py +0 -0
  27. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/backbones/hieradet.py +0 -0
  28. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/backbones/image_encoder.py +0 -0
  29. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/backbones/utils.py +0 -0
  30. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/memory_attention.py +0 -0
  31. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/memory_encoder.py +0 -0
  32. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/position_encoding.py +0 -0
  33. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam/__init__.py +0 -0
  34. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam/mask_decoder.py +0 -0
  35. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam/prompt_encoder.py +0 -0
  36. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam/transformer.py +0 -0
  37. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam2_base.py +0 -0
  38. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/modeling/sam2_utils.py +0 -0
  39. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/sam2_image_predictor.py +0 -0
  40. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/sam2_video_predictor.py +0 -0
  41. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/sam2_video_predictor_legacy.py +0 -0
  42. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/utils/__init__.py +0 -0
  43. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/utils/amg.py +0 -0
  44. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/utils/misc.py +0 -0
  45. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/sam2/utils/transforms.py +0 -0
  46. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/setup.py +0 -0
  47. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/__init__.py +0 -0
  48. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/dataset/__init__.py +0 -0
  49. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/dataset/sam2_datasets.py +0 -0
  50. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/dataset/transforms.py +0 -0
  51. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/dataset/utils.py +0 -0
  52. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/dataset/vos_dataset.py +0 -0
  53. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/dataset/vos_raw_dataset.py +0 -0
  54. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/dataset/vos_sampler.py +0 -0
  55. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/dataset/vos_segment_loader.py +0 -0
  56. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/loss_fns.py +0 -0
  57. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/model/__init__.py +0 -0
  58. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/model/sam2.py +0 -0
  59. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/optimizer.py +0 -0
  60. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/scripts/sav_frame_extraction_submitit.py +0 -0
  61. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/train.py +0 -0
  62. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/trainer.py +0 -0
  63. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/utils/__init__.py +0 -0
  64. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/utils/checkpoint_utils.py +0 -0
  65. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/utils/data_utils.py +0 -0
  66. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/utils/distributed.py +0 -0
  67. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/utils/logger.py +0 -0
  68. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/sam2/training/utils/train_utils.py +0 -0
  69. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/supervoxel/src/supervoxel.py +0 -0
  70. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/trainer/__init__.py +0 -0
  71. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/trainer/nnInteractiveTrainer.py +0 -0
  72. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/utils/__init__.py +0 -0
  73. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/utils/bboxes.py +0 -0
  74. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/utils/checkpoint_cleansing.py +0 -0
  75. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/utils/crop.py +0 -0
  76. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/utils/erosion_dilation.py +0 -0
  77. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive/utils/rounding.py +0 -0
  78. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive.egg-info/dependency_links.txt +0 -0
  79. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive.egg-info/requires.txt +0 -0
  80. {nninteractive-1.1.0 → nninteractive-1.1.2}/nnInteractive.egg-info/top_level.txt +0 -0
  81. {nninteractive-1.1.0 → nninteractive-1.1.2}/setup.cfg +0 -0
  82. {nninteractive-1.1.0 → nninteractive-1.1.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: nnInteractive
3
- Version: 1.1.0
3
+ Version: 1.1.2
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>
@@ -227,6 +227,7 @@ Provides-Extra: dev
227
227
  Requires-Dist: black; extra == "dev"
228
228
  Requires-Dist: ruff; extra == "dev"
229
229
  Requires-Dist: pre-commit; extra == "dev"
230
+ Dynamic: license-file
230
231
 
231
232
  <img src="imgs/nnInteractive_header_white.png">
232
233
 
@@ -460,6 +461,16 @@ Note that while this repository is available under Apache-2.0 license (see [LICE
460
461
 
461
462
  # Changelog
462
463
 
464
+ ### 1.1.2 - 2025-08-02
465
+
466
+ - Fixed a bug where `pin_memory` was set to `True` even though no CUDA devices were present (this broke CPU support)
467
+ - ✅ API compatible all the way back to 1.0.1
468
+
469
+ ### 1.1.1 - 2025-08-01
470
+
471
+ - We now detect whether linux kernel 6.11 is used and disable pin_memory in that case. See also [here](https://github.com/MIC-DKFZ/nnInteractive/issues/18)
472
+ - ✅ API compatible with 1.0.1 and 1.1.0
473
+
463
474
  ### 1.1.0 - 2025-08-01
464
475
 
465
476
  - Reworked inference code. It's now well-structured and easier to follow.
@@ -0,0 +1,3 @@
1
+ from importlib.metadata import version as _version
2
+
3
+ __version__ = _version("nnInteractive")
@@ -21,6 +21,7 @@ from nnInteractive.trainer.nnInteractiveTrainer import nnInteractiveTrainer_stub
21
21
  from nnInteractive.utils.bboxes import generate_bounding_boxes
22
22
  from nnInteractive.utils.crop import crop_and_pad_into_buffer, paste_tensor, pad_cropped, crop_to_valid
23
23
  from nnInteractive.utils.erosion_dilation import iterative_3x3_same_padding_pool3d
24
+ from nnInteractive.utils.os_shennanigans import is_linux_kernel_6_11
24
25
  from nnInteractive.utils.rounding import round_to_nearest_odd
25
26
 
26
27
 
@@ -134,14 +135,16 @@ class nnInteractiveInferenceSession():
134
135
  self.has_positive_bbox = False
135
136
 
136
137
  def _initialize_interactions(self, image_torch: torch.Tensor):
138
+ # there is a bug in 6.11 that doesn't allow pinning large tensors
139
+ use_pinned = not is_linux_kernel_6_11() and self.use_pinned_memory and self.device.type == 'cuda'
137
140
  if self.verbose:
138
- print(f'Initialize interactions. Pinned: {self.use_pinned_memory}')
141
+ print(f'Initialize interactions. Pinned: {use_pinned}')
139
142
  # Create the interaction tensor based on the target shape.
140
143
  self.interactions = torch.zeros(
141
144
  (7, *image_torch.shape[1:]),
142
145
  device='cpu',
143
146
  dtype=torch.float16,
144
- pin_memory=False
147
+ pin_memory=use_pinned
145
148
  )
146
149
 
147
150
  def _background_set_image(self, image: np.ndarray, image_properties: dict):
@@ -0,0 +1,15 @@
1
+ import platform
2
+ import sys
3
+
4
+ def is_linux_kernel_6_11():
5
+ if sys.platform != "linux":
6
+ return False
7
+
8
+ kernel_version = platform.release() # e.g., '6.11.0-24-generic'
9
+ version_parts = kernel_version.split(".")
10
+ try:
11
+ major = int(version_parts[0])
12
+ minor = int(version_parts[1])
13
+ return major == 6 and minor == 11
14
+ except (IndexError, ValueError):
15
+ return False
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: nnInteractive
3
- Version: 1.1.0
3
+ Version: 1.1.2
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>
@@ -227,6 +227,7 @@ Provides-Extra: dev
227
227
  Requires-Dist: black; extra == "dev"
228
228
  Requires-Dist: ruff; extra == "dev"
229
229
  Requires-Dist: pre-commit; extra == "dev"
230
+ Dynamic: license-file
230
231
 
231
232
  <img src="imgs/nnInteractive_header_white.png">
232
233
 
@@ -460,6 +461,16 @@ Note that while this repository is available under Apache-2.0 license (see [LICE
460
461
 
461
462
  # Changelog
462
463
 
464
+ ### 1.1.2 - 2025-08-02
465
+
466
+ - Fixed a bug where `pin_memory` was set to `True` even though no CUDA devices were present (this broke CPU support)
467
+ - ✅ API compatible all the way back to 1.0.1
468
+
469
+ ### 1.1.1 - 2025-08-01
470
+
471
+ - We now detect whether linux kernel 6.11 is used and disable pin_memory in that case. See also [here](https://github.com/MIC-DKFZ/nnInteractive/issues/18)
472
+ - ✅ API compatible with 1.0.1 and 1.1.0
473
+
463
474
  ### 1.1.0 - 2025-08-01
464
475
 
465
476
  - Reworked inference code. It's now well-structured and easier to follow.
@@ -75,4 +75,5 @@ nnInteractive/utils/bboxes.py
75
75
  nnInteractive/utils/checkpoint_cleansing.py
76
76
  nnInteractive/utils/crop.py
77
77
  nnInteractive/utils/erosion_dilation.py
78
+ nnInteractive/utils/os_shennanigans.py
78
79
  nnInteractive/utils/rounding.py
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nnInteractive"
3
- version = "1.1.0"
3
+ version = "1.1.2"
4
4
  requires-python = ">=3.10"
5
5
  description = "Inference code for nnInteractive"
6
6
  readme = "readme.md"
@@ -230,6 +230,16 @@ Note that while this repository is available under Apache-2.0 license (see [LICE
230
230
 
231
231
  # Changelog
232
232
 
233
+ ### 1.1.2 - 2025-08-02
234
+
235
+ - Fixed a bug where `pin_memory` was set to `True` even though no CUDA devices were present (this broke CPU support)
236
+ - ✅ API compatible all the way back to 1.0.1
237
+
238
+ ### 1.1.1 - 2025-08-01
239
+
240
+ - We now detect whether linux kernel 6.11 is used and disable pin_memory in that case. See also [here](https://github.com/MIC-DKFZ/nnInteractive/issues/18)
241
+ - ✅ API compatible with 1.0.1 and 1.1.0
242
+
233
243
  ### 1.1.0 - 2025-08-01
234
244
 
235
245
  - Reworked inference code. It's now well-structured and easier to follow.
@@ -1 +0,0 @@
1
- __version__ = "1.1.0"
File without changes
File without changes
File without changes