biomedisa 2024.5.21__py3-none-any.whl → 2024.5.22__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 +16 -2
- {biomedisa-2024.5.21.dist-info → biomedisa-2024.5.22.dist-info}/METADATA +9 -2
- {biomedisa-2024.5.21.dist-info → biomedisa-2024.5.22.dist-info}/RECORD +6 -6
- {biomedisa-2024.5.21.dist-info → biomedisa-2024.5.22.dist-info}/LICENSE +0 -0
- {biomedisa-2024.5.21.dist-info → biomedisa-2024.5.22.dist-info}/WHEEL +0 -0
- {biomedisa-2024.5.21.dist-info → biomedisa-2024.5.22.dist-info}/top_level.txt +0 -0
biomedisa/deeplearning.py
CHANGED
@@ -42,6 +42,7 @@ import time
|
|
42
42
|
import subprocess
|
43
43
|
import glob
|
44
44
|
import tempfile
|
45
|
+
import tifffile
|
45
46
|
|
46
47
|
class Biomedisa(object):
|
47
48
|
pass
|
@@ -55,6 +56,11 @@ def get_gpu_memory():
|
|
55
56
|
except:
|
56
57
|
return None
|
57
58
|
|
59
|
+
def number_of_slices(file_path):
|
60
|
+
with tifffile.TiffFile(file_path) as tiff:
|
61
|
+
z_dim = len(tiff.pages)
|
62
|
+
return z_dim
|
63
|
+
|
58
64
|
def deep_learning(img_data, label_data=None, val_img_data=None, val_label_data=None,
|
59
65
|
path_to_images=None, path_to_labels=None, val_images=None, val_labels=None,
|
60
66
|
path_to_model=None, predict=False, train=False, header_file=None,
|
@@ -248,8 +254,16 @@ def deep_learning(img_data, label_data=None, val_img_data=None, val_label_data=N
|
|
248
254
|
# list of images
|
249
255
|
path_to_finals = []
|
250
256
|
if bm.path_to_images is not None and os.path.isdir(bm.path_to_images):
|
251
|
-
|
252
|
-
|
257
|
+
# load list of volumetric image files
|
258
|
+
files = []
|
259
|
+
for data_type in ['.am','.hdr','.mhd','.mha','.nrrd','.nii','.nii.gz','.zip','.mrc']:
|
260
|
+
files += [file for file in glob.glob(bm.path_to_images+'/**/*'+data_type, recursive=True) if not os.path.basename(file).startswith('.')]
|
261
|
+
for data_type in ['.tif','.tiff']:
|
262
|
+
files += [file for file in glob.glob(bm.path_to_images+'/**/*'+data_type, recursive=True) if not os.path.basename(file).startswith('.') and number_of_slices(file)>1]
|
263
|
+
if len(files)==0: # assume directory of 2D slices
|
264
|
+
bm.path_to_images = [bm.path_to_images]
|
265
|
+
else:
|
266
|
+
bm.path_to_images = files
|
253
267
|
else:
|
254
268
|
bm.path_to_images = [bm.path_to_images]
|
255
269
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: biomedisa
|
3
|
-
Version: 2024.5.
|
3
|
+
Version: 2024.5.22
|
4
4
|
Summary: Segmentation of 3D volumetric image data
|
5
5
|
Author: Philipp Lösel
|
6
6
|
Author-email: philipp.loesel@anu.edu.au
|
@@ -50,11 +50,18 @@ Biomedisa (https://biomedisa.info) is a free and easy-to-use open-source applica
|
|
50
50
|
+ Download the data from our [gallery](https://biomedisa.info/gallery/)
|
51
51
|
|
52
52
|
## Revisions
|
53
|
-
2024.05.
|
53
|
+
2024.05.22
|
54
54
|
+ Pip is the preferred installation method
|
55
55
|
+ Commands, module names and imports have been changed to conform to the Pip standard
|
56
56
|
+ For versions <=2023.09.1 please check [README](https://github.com/biomedisa/biomedisa/blob/master/README/deprecated/README_2023.09.1.md)
|
57
57
|
|
58
|
+
## Quickstart
|
59
|
+
Install the Biomedisa package from the [Python Package Index](https://pypi.org/project/biomedisa/):
|
60
|
+
```
|
61
|
+
python -m pip install -U biomedisa
|
62
|
+
```
|
63
|
+
For smart interpolation and deep Learning modules, follow the [installation instructions](https://github.com/biomedisa/biomedisa#installation-command-line-based).
|
64
|
+
|
58
65
|
## Smart Interpolation
|
59
66
|
+ [Parameters and Examples](https://github.com/biomedisa/biomedisa/blob/master/README/smart_interpolation.md)
|
60
67
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
biomedisa/__init__.py,sha256=hw4mzEjGFXm-vxus2DBfKFW0nKoG0ibL5SH6ShfchrY,1526
|
2
2
|
biomedisa/__main__.py,sha256=a1--8vhtztWEloHVtbM43FZLCfrFo4BELgdsgtWE8ls,536
|
3
|
-
biomedisa/deeplearning.py,sha256=
|
3
|
+
biomedisa/deeplearning.py,sha256=UG5baX58CrO8YXe9pU6_Bp2OOvbC74LQw4S33HqM2iA,27828
|
4
4
|
biomedisa/interpolation.py,sha256=R8UbBWt7vOuiQCPSeNIpEY0_yfQUg1oBfhAjXi91Hl4,17253
|
5
5
|
biomedisa/mesh.py,sha256=glvpTN0PPByb5j2IbLCdWQtc5O4VT-Pwu3en8EaYyTo,15819
|
6
6
|
biomedisa/features/DataGenerator.py,sha256=bGys6UZ0bnKb_k1Y3Spo6MNPk_goSAmptdZnI39smaw,12770
|
@@ -37,8 +37,8 @@ biomedisa/features/random_walk/pyopencl_large.py,sha256=q79AxG3p3qFjxfiAZfUK9I5B
|
|
37
37
|
biomedisa/features/random_walk/pyopencl_small.py,sha256=opNlS-qzOa9qWafBNJdvf6r1aRAFf7_JXf6ISDnkdXE,17068
|
38
38
|
biomedisa/features/random_walk/rw_large.py,sha256=ZnITvk00Y11ZZlGuBRaJO1EwU0wYBdEwdpj9vvXCqF4,19805
|
39
39
|
biomedisa/features/random_walk/rw_small.py,sha256=RPzZe24YrEwYelJukDjvqaoD_SyhgdriEi7uV3kZGXI,14881
|
40
|
-
biomedisa-2024.5.
|
41
|
-
biomedisa-2024.5.
|
42
|
-
biomedisa-2024.5.
|
43
|
-
biomedisa-2024.5.
|
44
|
-
biomedisa-2024.5.
|
40
|
+
biomedisa-2024.5.22.dist-info/LICENSE,sha256=sehayP6UhydNnmstfL4yFR3genMRdpuUh6uZVWJN1H0,14152
|
41
|
+
biomedisa-2024.5.22.dist-info/METADATA,sha256=jKMlVJyzFHJ37MREWXc9UbUuDoxVA36hYr-1egUfnhY,10786
|
42
|
+
biomedisa-2024.5.22.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
43
|
+
biomedisa-2024.5.22.dist-info/top_level.txt,sha256=opsf1Eb4vCguPSxev4HHSeiUKCccT_C_RcUCdAYbHWQ,10
|
44
|
+
biomedisa-2024.5.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|