neuro-sam 0.1.8__py3-none-any.whl → 0.1.10__py3-none-any.whl
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.
- neuro_sam/napari_utils/segmentation_module.py +2 -34
- {neuro_sam-0.1.8.dist-info → neuro_sam-0.1.10.dist-info}/METADATA +1 -1
- {neuro_sam-0.1.8.dist-info → neuro_sam-0.1.10.dist-info}/RECORD +7 -7
- {neuro_sam-0.1.8.dist-info → neuro_sam-0.1.10.dist-info}/WHEEL +0 -0
- {neuro_sam-0.1.8.dist-info → neuro_sam-0.1.10.dist-info}/entry_points.txt +0 -0
- {neuro_sam-0.1.8.dist-info → neuro_sam-0.1.10.dist-info}/licenses/LICENSE +0 -0
- {neuro_sam-0.1.8.dist-info → neuro_sam-0.1.10.dist-info}/top_level.txt +0 -0
|
@@ -172,18 +172,6 @@ class SegmentationWidget(QWidget):
|
|
|
172
172
|
patch_size_layout.addWidget(self.patch_size_spin)
|
|
173
173
|
params_layout.addLayout(patch_size_layout)
|
|
174
174
|
|
|
175
|
-
# Enable boundary cleanup for dendrites
|
|
176
|
-
self.enable_boundary_smoothing_cb = QCheckBox("Enable Light Boundary Cleanup")
|
|
177
|
-
self.enable_boundary_smoothing_cb.setChecked(False) # Disabled by default for speed
|
|
178
|
-
self.enable_boundary_smoothing_cb.setToolTip("Apply light morphological cleanup (hole filling, small object removal)")
|
|
179
|
-
params_layout.addWidget(self.enable_boundary_smoothing_cb)
|
|
180
|
-
|
|
181
|
-
# Dendrite structure enhancement
|
|
182
|
-
self.enhance_dendrite_cb = QCheckBox("Enhance Tubular Dendrite Structure")
|
|
183
|
-
self.enhance_dendrite_cb.setChecked(True)
|
|
184
|
-
self.enhance_dendrite_cb.setToolTip("Apply morphological operations to connect dendrite segments and make tubular structure")
|
|
185
|
-
params_layout.addWidget(self.enhance_dendrite_cb)
|
|
186
|
-
|
|
187
175
|
# # Minimum dendrite size for noise removal
|
|
188
176
|
# min_size_layout = QHBoxLayout()
|
|
189
177
|
# min_size_layout.addWidget(QLabel("Min Dendrite Size (pixels):"))
|
|
@@ -404,20 +392,9 @@ class SegmentationWidget(QWidget):
|
|
|
404
392
|
|
|
405
393
|
# Get segmentation parameters
|
|
406
394
|
patch_size = self.patch_size_spin.value()
|
|
407
|
-
enable_boundary_smoothing = self.enable_boundary_smoothing_cb.isChecked()
|
|
408
|
-
enhance_dendrite = self.enhance_dendrite_cb.isChecked()
|
|
409
395
|
use_full_volume = False
|
|
410
396
|
|
|
411
|
-
|
|
412
|
-
enhancement_info = [f"{patch_size}x{patch_size} overlapping patches (50%)"]
|
|
413
|
-
if enable_boundary_smoothing:
|
|
414
|
-
enhancement_info.append("light cleanup")
|
|
415
|
-
if enhance_dendrite:
|
|
416
|
-
enhancement_info.append("tubular structure enhancement")
|
|
417
|
-
|
|
418
|
-
enhancement_str = " + ".join(enhancement_info)
|
|
419
|
-
|
|
420
|
-
self.status_label.setText(f"Status: Running dendrite segmentation on {path_name} with {enhancement_str}...")
|
|
397
|
+
self.status_label.setText(f"Status: Running dendrite segmentation on {path_name}...")
|
|
421
398
|
self.segmentation_progress.setValue(0)
|
|
422
399
|
self.run_segmentation_btn.setEnabled(False)
|
|
423
400
|
|
|
@@ -434,15 +411,11 @@ class SegmentationWidget(QWidget):
|
|
|
434
411
|
print(f"Segmenting dendrite path '{path_name}' from frame {start_frame} to {end_frame}")
|
|
435
412
|
print(f"Path has {len(brightest_path)} points")
|
|
436
413
|
print(f"Parameters: patch_size={patch_size}x{patch_size}, overlap=50% (stride={patch_size//2})")
|
|
437
|
-
print(f"Light boundary cleanup: {enable_boundary_smoothing}")
|
|
438
414
|
# print(f"Dendrite enhancement: {enhance_dendrite}, Min dendrite size: {min_dendrite_size} pixels")
|
|
439
415
|
|
|
440
416
|
# Progress callback function
|
|
441
417
|
def update_progress(current, total):
|
|
442
|
-
|
|
443
|
-
progress = int((current / total) * 80) # 0-80%
|
|
444
|
-
else:
|
|
445
|
-
progress = int((current / total) * 90) # 0-90%
|
|
418
|
+
progress = int((current / total) * 90) # 0-90%
|
|
446
419
|
self.segmentation_progress.setValue(progress)
|
|
447
420
|
|
|
448
421
|
# Try to run the segmentation with overlapping patches
|
|
@@ -542,11 +515,6 @@ class SegmentationWidget(QWidget):
|
|
|
542
515
|
total_pixels = np.sum(binary_masks)
|
|
543
516
|
|
|
544
517
|
result_text = f"Results: Dendrite segmentation completed - {total_pixels} pixels segmented"
|
|
545
|
-
result_text += f"\nMethod: {enhancement_str}"
|
|
546
|
-
result_text += f"\nOverlap: 50% (stride={patch_size//2})"
|
|
547
|
-
# result_text += f"\nMin dendrite size: {min_dendrite_size} pixels"
|
|
548
|
-
if enable_boundary_smoothing:
|
|
549
|
-
result_text += f"\nLight boundary cleanup applied"
|
|
550
518
|
|
|
551
519
|
self.status_label.setText(result_text)
|
|
552
520
|
|
|
@@ -33,7 +33,7 @@ neuro_sam/napari_utils/main_widget.py,sha256=yahfPLwmhBt_hImpRykIObzfMwbVZvVJTEK
|
|
|
33
33
|
neuro_sam/napari_utils/path_tracing_module.py,sha256=bDhSawWNMfY-Vs-Zdt8XTb90pLkD9jUBRqpbC2_6li0,44070
|
|
34
34
|
neuro_sam/napari_utils/punet_widget.py,sha256=WCAND8YLn4CA_20YW4quwcuJ_xEqPAc7GHrSBk4Anw0,16928
|
|
35
35
|
neuro_sam/napari_utils/segmentation_model.py,sha256=mHXVjksqEcxHRH5KWp5-hXLEnRHgGhwPUxyUkV8eJGM,34141
|
|
36
|
-
neuro_sam/napari_utils/segmentation_module.py,sha256=
|
|
36
|
+
neuro_sam/napari_utils/segmentation_module.py,sha256=pp2WoWO6mfYQ4CLduiEC-_o3oQhqs7Vcz4i2B6ATnIc,26796
|
|
37
37
|
neuro_sam/napari_utils/visualization_module.py,sha256=JtZlBoKlfIwVLa2Sqg7b2KTr07fNlAcwR0M7fHsn2oM,24723
|
|
38
38
|
neuro_sam/punet/deepd3_model.py,sha256=nGVEqzCPz_E4cFA6QmknW2CffDcjxH7VsdYAyTdAtY0,7509
|
|
39
39
|
neuro_sam/punet/prob_unet_deepd3.py,sha256=syXNleUVrfYtmVveN9G461oAhumxsijsavps8in4VRw,14698
|
|
@@ -47,7 +47,7 @@ neuro_sam/training/train_dendrites.py,sha256=TMG4YrrQV0Q784omMziXsB71tNICEmGLYSH
|
|
|
47
47
|
neuro_sam/training/utils/__init__.py,sha256=4hbcx57NtRu8nryvXQYqmXK4hyUgUYNDz97kCw3Efs8,31
|
|
48
48
|
neuro_sam/training/utils/prompt_generation_dendrites.py,sha256=_ntzXNV1lXPrpInRKaZ5CPpq3akF2IuD1naOXbTC8TU,3201
|
|
49
49
|
neuro_sam/training/utils/stream_dendrites.py,sha256=qS_ZWrhJdW1Sg3RBjoRUJFlCV0u5X1Ns_tjYgJUjWJw,11024
|
|
50
|
-
neuro_sam-0.1.
|
|
50
|
+
neuro_sam-0.1.10.dist-info/licenses/LICENSE,sha256=akmTIN8IuZn3Y7UK_8qVQnyKDWSDcVUwB8RPGNXCojw,1068
|
|
51
51
|
sam2/__init__.py,sha256=uHyh6VzVS4F2box0rPDpN5UmOVKeQNK0CIaTKG9JQZ4,395
|
|
52
52
|
sam2/automatic_mask_generator.py,sha256=Zt8mbb4UQSMFrjOY8OwbshswOpMhaxAtdn5sTuXUw9c,18461
|
|
53
53
|
sam2/benchmark.py,sha256=m3o1BriIQuwJAx-3zQ_B0_7YLhN84G28oQSV5sGA3ak,2811
|
|
@@ -91,8 +91,8 @@ sam2/utils/__init__.py,sha256=NL2AacVHZOe41zp4kF2-ZGcUCi9zFwh1Eo9spNjN0Ko,197
|
|
|
91
91
|
sam2/utils/amg.py,sha256=t7MwkOKvcuBNu4FcjzKv9BpO0av5Zo9itZ8b3WQMpdg,12842
|
|
92
92
|
sam2/utils/misc.py,sha256=AWAMAcFhzQedcQb7HU2oRc-RqjGrK87K-MsVG21tIKI,13090
|
|
93
93
|
sam2/utils/transforms.py,sha256=ujpk9GAMYvIJIGpt87QOP88TPtrjL61liDG7DCptEUY,4885
|
|
94
|
-
neuro_sam-0.1.
|
|
95
|
-
neuro_sam-0.1.
|
|
96
|
-
neuro_sam-0.1.
|
|
97
|
-
neuro_sam-0.1.
|
|
98
|
-
neuro_sam-0.1.
|
|
94
|
+
neuro_sam-0.1.10.dist-info/METADATA,sha256=Hrn823PdxJxnip5w28nz7ZXZhwpzwznikmQ2eqops7M,9747
|
|
95
|
+
neuro_sam-0.1.10.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
96
|
+
neuro_sam-0.1.10.dist-info/entry_points.txt,sha256=EQg0SmFbnbGGcchHq5ROmhO9pkgby72Y5G5w90WyLZI,220
|
|
97
|
+
neuro_sam-0.1.10.dist-info/top_level.txt,sha256=yPbWxFcw79sErTk8zohihUHMK9LL31i3bXir2MrS4OQ,15
|
|
98
|
+
neuro_sam-0.1.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|