biomedisa 24.8.11__py3-none-any.whl → 25.7.1__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.
- biomedisa/deeplearning.py +27 -8
- biomedisa/features/DataGenerator.py +93 -144
- biomedisa/features/PredictDataGenerator.py +7 -5
- biomedisa/features/biomedisa_helper.py +67 -25
- biomedisa/features/crop_helper.py +7 -7
- biomedisa/features/keras_helper.py +276 -151
- biomedisa/features/random_walk/pyopencl_large.py +1 -1
- biomedisa/features/random_walk/pyopencl_small.py +3 -3
- biomedisa/features/random_walk/rw_large.py +6 -2
- biomedisa/features/random_walk/rw_small.py +7 -3
- biomedisa/interpolation.py +3 -1
- {biomedisa-24.8.11.dist-info → biomedisa-25.7.1.dist-info}/METADATA +6 -4
- {biomedisa-24.8.11.dist-info → biomedisa-25.7.1.dist-info}/RECORD +16 -16
- {biomedisa-24.8.11.dist-info → biomedisa-25.7.1.dist-info}/WHEEL +1 -1
- {biomedisa-24.8.11.dist-info → biomedisa-25.7.1.dist-info/licenses}/LICENSE +0 -0
- {biomedisa-24.8.11.dist-info → biomedisa-25.7.1.dist-info}/top_level.txt +0 -0
@@ -259,7 +259,7 @@ def walk(comm, raw, slices, indices, nbrw, sorw, blockmin, blockmax,
|
|
259
259
|
# allocate device memory or use subdomains
|
260
260
|
memory_error = False
|
261
261
|
subdomains = False
|
262
|
-
if zsh * ysh * xsh > 42e8 or platform.split('_')[-1] == 'GPU':
|
262
|
+
if zsh * ysh * xsh > 42e8:# or platform.split('_')[-1] == 'GPU':
|
263
263
|
if zsh * ysh * xsh > 42e8:
|
264
264
|
print('Warning: Volume indexes exceed unsigned long int range. The volume is splitted into subdomains.')
|
265
265
|
else:
|
@@ -98,9 +98,9 @@ def _walk_on_current_gpu(raw, slices, allLabels, indices, nbrw, sorw, name, ctx,
|
|
98
98
|
segment_cl = cl.Buffer(ctx, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=np.int32(0))
|
99
99
|
|
100
100
|
# block and grid size
|
101
|
-
#block = (1,
|
102
|
-
#x_grid = ((xsh //
|
103
|
-
#y_grid = ((ysh //
|
101
|
+
#block = (1, 16, 16)
|
102
|
+
#x_grid = ((xsh // 16) + 1)*16
|
103
|
+
#y_grid = ((ysh // 16) + 1)*16
|
104
104
|
#grid = (slshape, y_grid, x_grid)
|
105
105
|
|
106
106
|
block = None
|
@@ -1,6 +1,6 @@
|
|
1
1
|
##########################################################################
|
2
2
|
## ##
|
3
|
-
## Copyright (c) 2019-
|
3
|
+
## Copyright (c) 2019-2025 Philipp Lösel. All rights reserved. ##
|
4
4
|
## ##
|
5
5
|
## This file is part of the open source project biomedisa. ##
|
6
6
|
## ##
|
@@ -176,7 +176,11 @@ def _diffusion_child(comm, bm=None):
|
|
176
176
|
mask = bm.labelData>0
|
177
177
|
dice = Dice_score(bm.labelData, final*mask)
|
178
178
|
if dice < 0.3:
|
179
|
-
|
179
|
+
if bm.slicer:
|
180
|
+
message = 'Bad result! If you label outside the red (axial) window, enable "All axes" and ensure that at least one slice is empty between pre-segmented slices in each view.'
|
181
|
+
_error_(bm, message, level=0)
|
182
|
+
else:
|
183
|
+
print('Warning: Bad result! Use "--allaxis" if you labeled axes other than the xy-plane.')
|
180
184
|
|
181
185
|
# regular result
|
182
186
|
final_result = np.zeros((bm.zsh, bm.ysh, bm.xsh), dtype=np.uint8)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
##########################################################################
|
2
2
|
## ##
|
3
|
-
## Copyright (c) 2019-
|
3
|
+
## Copyright (c) 2019-2025 Philipp Lösel. All rights reserved. ##
|
4
4
|
## ##
|
5
5
|
## This file is part of the open source project biomedisa. ##
|
6
6
|
## ##
|
@@ -29,7 +29,7 @@
|
|
29
29
|
from biomedisa.features.remove_outlier import clean, fill
|
30
30
|
from biomedisa.features.active_contour import activeContour
|
31
31
|
from biomedisa.features.biomedisa_helper import (_get_device, save_data, unique_file_path,
|
32
|
-
sendToChild, _split_indices, get_labels, Dice_score)
|
32
|
+
sendToChild, _split_indices, get_labels, Dice_score, _error_)
|
33
33
|
from mpi4py import MPI
|
34
34
|
import numpy as np
|
35
35
|
import time
|
@@ -179,7 +179,11 @@ def _diffusion_child(comm, bm=None):
|
|
179
179
|
mask = bm.labelData>0
|
180
180
|
dice = Dice_score(bm.labelData, final_zero*mask)
|
181
181
|
if dice < 0.3:
|
182
|
-
|
182
|
+
if bm.slicer:
|
183
|
+
message = 'Bad result! If you label outside the red (axial) window, enable "All axes" and ensure that at least one slice is empty between pre-segmented slices in each view.'
|
184
|
+
_error_(bm, message, level=0)
|
185
|
+
else:
|
186
|
+
print('Warning: Bad result! Use "--allaxis" if you labeled axes other than the xy-plane.')
|
183
187
|
|
184
188
|
# regular result
|
185
189
|
final_result = np.zeros((bm.zsh, bm.ysh, bm.xsh), dtype=np.uint8)
|
biomedisa/interpolation.py
CHANGED
@@ -43,7 +43,7 @@ class Biomedisa(object):
|
|
43
43
|
def smart_interpolation(data, labelData, nbrw=10, sorw=4000, acwe=False, acwe_alpha=1.0, acwe_smooth=1, acwe_steps=3,
|
44
44
|
path_to_data=None, path_to_labels=None, denoise=False, uncertainty=False, platform=None,
|
45
45
|
allaxis=False, ignore='none', only='all', smooth=0, compression=True, return_hits=False,
|
46
|
-
img_id=None, label_id=None, remote=False, queue=0, clean=None, fill=None):
|
46
|
+
img_id=None, label_id=None, remote=False, queue=0, clean=None, fill=None, slicer=False):
|
47
47
|
|
48
48
|
freeze_support()
|
49
49
|
|
@@ -351,6 +351,8 @@ if __name__ == '__main__':
|
|
351
351
|
help='The interpolation is carried out on a remote server. Must be set up in config.py')
|
352
352
|
parser.add_argument('-q','--queue', type=int, default=0,
|
353
353
|
help='Processing queue when using a remote server')
|
354
|
+
parser.add_argument('--slicer', action='store_true', default=False,
|
355
|
+
help='Required for starting Biomedisa from 3D Slicer')
|
354
356
|
kwargs = vars(parser.parse_args())
|
355
357
|
|
356
358
|
# run interpolation
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: biomedisa
|
3
|
-
Version:
|
3
|
+
Version: 25.7.1
|
4
4
|
Summary: Segmentation of 3D volumetric image data
|
5
5
|
Author: Philipp Lösel
|
6
6
|
Author-email: philipp.loesel@anu.edu.au
|
@@ -13,6 +13,7 @@ Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Python: >=3.9
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
License-File: LICENSE
|
16
|
+
Dynamic: license-file
|
16
17
|
|
17
18
|
[](https://biomedisa.info)
|
18
19
|
-----------
|
@@ -36,13 +37,14 @@ License-File: LICENSE
|
|
36
37
|
Biomedisa (https://biomedisa.info) is a free and easy-to-use open-source application for segmenting large 3D volumetric images such as CT and MRI scans, developed at [The Australian National University CTLab](https://ctlab.anu.edu.au/). Biomedisa's smart interpolation of sparsely pre-segmented slices enables accurate semi-automated segmentation by considering the complete underlying image data. Additionally, Biomedisa enables deep learning for fully automated segmentation across similar samples and structures. It is compatible with segmentation tools like Amira/Avizo, ImageJ/Fiji, and 3D Slicer. If you are using Biomedisa or the data for your research please cite: Lösel, P.D. et al. [Introducing Biomedisa as an open-source online platform for biomedical image segmentation.](https://www.nature.com/articles/s41467-020-19303-w) *Nat. Commun.* **11**, 5577 (2020).
|
37
38
|
|
38
39
|
## Hardware Requirements
|
39
|
-
+ One or more NVIDIA GPUs
|
40
|
+
+ One or more NVIDIA, AMD, or Intel GPUs
|
40
41
|
|
41
42
|
## Installation (command-line based)
|
42
43
|
+ [Ubuntu 22/24 + Smart Interpolation](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu_interpolation_cli.md)
|
43
44
|
+ [Ubuntu 22/24 + Deep Learning](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu_deeplearning_cli.md)
|
44
45
|
+ [Ubuntu 22/24 + Smart Interpolation + Deep Learning](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu_cli.md)
|
45
|
-
+ [Windows
|
46
|
+
+ [Windows (WSL) + Smart Interpolation + Deep Learning ("advanced")](https://github.com/biomedisa/biomedisa/blob/master/README/windows_wsl.md)
|
47
|
+
+ [Windows 10/11 + Smart Interpolation (NVIDIA, AMD, Intel) ("simple")](https://github.com/biomedisa/biomedisa/blob/master/README/windows_interpolation.md)
|
46
48
|
|
47
49
|
## Installation (3D Slicer extension)
|
48
50
|
+ [Ubuntu 22/24](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu_slicer.md)
|
@@ -1,21 +1,21 @@
|
|
1
1
|
biomedisa/__init__.py,sha256=hw4mzEjGFXm-vxus2DBfKFW0nKoG0ibL5SH6ShfchrY,1526
|
2
2
|
biomedisa/__main__.py,sha256=a1--8vhtztWEloHVtbM43FZLCfrFo4BELgdsgtWE8ls,536
|
3
|
-
biomedisa/deeplearning.py,sha256=
|
4
|
-
biomedisa/interpolation.py,sha256=
|
3
|
+
biomedisa/deeplearning.py,sha256=7psQOP-pdRplxCGDFyfRFrRpz50VDYBhRvqVhHVGJO4,30126
|
4
|
+
biomedisa/interpolation.py,sha256=wiauUPPsklAi3aJpsXI6RjKzy00Iezvfba-ixtPfJAo,17239
|
5
5
|
biomedisa/mesh.py,sha256=ArBsKtf2m-KlWNUFMFRJgoiMcKJnHuUMtHI5NvQd4kQ,16067
|
6
|
-
biomedisa/features/DataGenerator.py,sha256=
|
6
|
+
biomedisa/features/DataGenerator.py,sha256=xgejeY7CpPbSHbxTBwyTFmTvSey1mb_mWhmhim-YVQ0,17734
|
7
7
|
biomedisa/features/DataGeneratorCrop.py,sha256=KtGqNadghOd59wIU9hATM_5YgSks95rS1kJ2lsSSX7w,6612
|
8
|
-
biomedisa/features/PredictDataGenerator.py,sha256=
|
8
|
+
biomedisa/features/PredictDataGenerator.py,sha256=r-iWdw4LP9Oqc2h8imvNVQkdu1vRTfKLhT2QbR5FSuM,4170
|
9
9
|
biomedisa/features/PredictDataGeneratorCrop.py,sha256=HF5tJbGtlJMHr7lMT9IiIdLG2CTjXstbKoOjlZJ93Is,3431
|
10
10
|
biomedisa/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
biomedisa/features/active_contour.py,sha256=FnPuvYck_KL4xYRFqwzm4Grdm288EdlcLFt88E0OtqA,17938
|
12
12
|
biomedisa/features/assd.py,sha256=q9NUQXEoA4Pi3d8b5fmys615CWu06Sm0N9-OGwJOFnw,6537
|
13
|
-
biomedisa/features/biomedisa_helper.py,sha256=
|
13
|
+
biomedisa/features/biomedisa_helper.py,sha256=6VP45eaI0q2t6rmU4mF6tsvZVB0VU0lZfs96j7GZQSQ,35184
|
14
14
|
biomedisa/features/create_slices.py,sha256=uSDH1OcEYc5BFPZHSy3UpS4P2DuoVnxOZ-l7wmyT_Po,13108
|
15
|
-
biomedisa/features/crop_helper.py,sha256=
|
15
|
+
biomedisa/features/crop_helper.py,sha256=6OmLSK8rH-lT8OaU3zTndnp0rpciWd1r37jKhEgyD_I,24255
|
16
16
|
biomedisa/features/curvop_numba.py,sha256=AjKQJcUBoURTB8pq1HmugQYpBwBELthhcEu51_r_xPI,7049
|
17
17
|
biomedisa/features/django_env.py,sha256=LNrZ6rBHZ5I0FaWa5xN8K-ASPgq0r5dGDEUI56HzJxE,8615
|
18
|
-
biomedisa/features/keras_helper.py,sha256=
|
18
|
+
biomedisa/features/keras_helper.py,sha256=1-UXcIECeBpPOQZneqlH9q5w75q5BANQCe01yITk7ls,74651
|
19
19
|
biomedisa/features/nc_reader.py,sha256=RoRMwu3ELSNfoV3qZtaT2OWACnXb2EhNFu_DAF1T93o,7406
|
20
20
|
biomedisa/features/pid.py,sha256=Jmn1VIp0fBlgBrqZ-yUIQVVb5-NAxNBdibXALVr2PPI,2545
|
21
21
|
biomedisa/features/process_image.py,sha256=VtS3fGDvglqJiiJLPK1toe76J58j914NJ8XQKg3CRwo,11091
|
@@ -33,12 +33,12 @@ biomedisa/features/random_walk/pycuda_large.py,sha256=Vfvd0uFRB-qLReDFKIyAAhdWDL
|
|
33
33
|
biomedisa/features/random_walk/pycuda_large_allx.py,sha256=zjy1Ai8D-foXjaT-6G33vGMANS1i00BBbLCTAMUfP5c,30677
|
34
34
|
biomedisa/features/random_walk/pycuda_small.py,sha256=rSwjq2DdtGyNGH1_EfiRQGSgEsCZqvVUrh1UN64AEc8,15786
|
35
35
|
biomedisa/features/random_walk/pycuda_small_allx.py,sha256=z4koEQNWqy3EYOhHbMkO8sP6mpl6R7i8mM6OEQQ4kUQ,18225
|
36
|
-
biomedisa/features/random_walk/pyopencl_large.py,sha256=
|
37
|
-
biomedisa/features/random_walk/pyopencl_small.py,sha256=
|
38
|
-
biomedisa/features/random_walk/rw_large.py,sha256=
|
39
|
-
biomedisa/features/random_walk/rw_small.py,sha256=
|
40
|
-
biomedisa-
|
41
|
-
biomedisa-
|
42
|
-
biomedisa-
|
43
|
-
biomedisa-
|
44
|
-
biomedisa-
|
36
|
+
biomedisa/features/random_walk/pyopencl_large.py,sha256=fBUellvpE2rOuT_ksZWwrqq_KFlqHx2o3mMLnUzGYp8,31017
|
37
|
+
biomedisa/features/random_walk/pyopencl_small.py,sha256=V4afT0kJRNQmfD7FEf8oBQ8warn0OaDIngkpmJhpfK0,17068
|
38
|
+
biomedisa/features/random_walk/rw_large.py,sha256=LtBffUEmNBU6OmcjkKUbISf2ZPTTnzXzbDlinspSm8g,20105
|
39
|
+
biomedisa/features/random_walk/rw_small.py,sha256=BudR1LVCcEPOYK45N-2400CK__MX3aVbunDwhEVvseY,15174
|
40
|
+
biomedisa-25.7.1.dist-info/licenses/LICENSE,sha256=sehayP6UhydNnmstfL4yFR3genMRdpuUh6uZVWJN1H0,14152
|
41
|
+
biomedisa-25.7.1.dist-info/METADATA,sha256=zRhrraJQzojxLxELMMUAH7InMOs0REkrv9r9Xbkioic,10138
|
42
|
+
biomedisa-25.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
43
|
+
biomedisa-25.7.1.dist-info/top_level.txt,sha256=opsf1Eb4vCguPSxev4HHSeiUKCccT_C_RcUCdAYbHWQ,10
|
44
|
+
biomedisa-25.7.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|