biomedisa 2024.5.20__tar.gz → 2024.5.22__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.
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/PKG-INFO +32 -42
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/README.md +31 -41
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/pyproject.toml +1 -1
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/__init__.py +1 -1
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/deeplearning.py +16 -2
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/split_volume.py +1 -1
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa.egg-info/PKG-INFO +32 -42
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/LICENSE +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/setup.cfg +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/__main__.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/DataGenerator.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/DataGeneratorCrop.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/PredictDataGenerator.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/PredictDataGeneratorCrop.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/__init__.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/active_contour.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/__init__.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/amira_data_stream.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/amira_grammar.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/amira_header.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/amira_helper.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/assd.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/biomedisa_helper.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/create_slices.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/crop_helper.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/curvop_numba.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/django_env.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/keras_helper.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/nc_reader.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/pid.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/process_image.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/pycuda_test.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/__init__.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/gpu_kernels.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pycuda_large.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pycuda_large_allx.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pycuda_small.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pycuda_small_allx.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pyopencl_large.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pyopencl_small.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/rw_large.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/rw_small.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/remove_outlier.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/interpolation.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/mesh.py +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa.egg-info/SOURCES.txt +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa.egg-info/dependency_links.txt +0 -0
- {biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa.egg-info/top_level.txt +0 -0
@@ -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
|
@@ -21,36 +21,48 @@ License-File: LICENSE
|
|
21
21
|
- [Installation (command-line based)](#installation-command-line-based)
|
22
22
|
- [Installation (browser based)](#installation-browser-based)
|
23
23
|
- [Download Data](#download-data)
|
24
|
+
- [Revisions](#revisions)
|
24
25
|
- [Smart Interpolation](#smart-interpolation)
|
25
26
|
- [Deep Learning](#deep-learning)
|
26
27
|
- [Biomedisa Features](#biomedisa-features)
|
27
|
-
- [Update Biomedisa](#update-biomedisa)
|
28
|
-
- [Releases](#releases)
|
29
28
|
- [Authors](#authors)
|
30
29
|
- [FAQ](#faq)
|
31
30
|
- [Citation](#citation)
|
32
31
|
- [License](#license)
|
33
32
|
|
34
|
-
|
33
|
+
## Overview
|
35
34
|
Biomedisa (https://biomedisa.info) is a free and easy-to-use open-source application for segmenting large volumetric images, e.g. CT and MRI scans, developed at [The Australian National University CTLab](https://ctlab.anu.edu.au/). Biomedisa's semi-automated segmentation is based on a smart interpolation of sparsely pre-segmented slices, taking into account the complete underlying image data. In addition, Biomedisa enables deep learning for the fully automated segmentation of series of similar samples. It can be used in combination with segmentation tools such as 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).
|
36
35
|
|
37
|
-
|
36
|
+
## Hardware Requirements
|
38
37
|
+ One or more NVIDIA GPUs with compute capability 3.0 or higher or an Intel CPU.
|
39
38
|
|
40
|
-
|
39
|
+
## Installation (command-line based)
|
41
40
|
+ [Ubuntu 22.04 + CUDA + GPU (recommended)](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_cuda11.8_gpu_cli.md)
|
42
41
|
+ [Ubuntu 22.04 + OpenCL + CPU (smart interpolation only and very slow)](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_opencl_cpu_cli.md)
|
43
42
|
+ [Windows 10 + CUDA + GPU (recommended)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_cuda_gpu_cli.md)
|
44
43
|
+ [Windows 10 + OpenCL + GPU (easy to install but lacks features like allaxis, smoothing, uncertainty, optimized GPU memory usage)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_opencl_gpu_cli.md)
|
45
44
|
+ [Windows 10 + OpenCL + CPU (very slow)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_opencl_cpu_cli.md)
|
46
45
|
|
47
|
-
|
46
|
+
## Installation (browser based)
|
48
47
|
+ [Ubuntu 22.04](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_cuda11.8.md)
|
49
48
|
|
50
|
-
|
49
|
+
## Download Data
|
51
50
|
+ Download the data from our [gallery](https://biomedisa.info/gallery/)
|
52
51
|
|
53
|
-
|
52
|
+
## Revisions
|
53
|
+
2024.05.22
|
54
|
+
+ Pip is the preferred installation method
|
55
|
+
+ Commands, module names and imports have been changed to conform to the Pip standard
|
56
|
+
+ For versions <=2023.09.1 please check [README](https://github.com/biomedisa/biomedisa/blob/master/README/deprecated/README_2023.09.1.md)
|
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
|
+
|
65
|
+
## Smart Interpolation
|
54
66
|
+ [Parameters and Examples](https://github.com/biomedisa/biomedisa/blob/master/README/smart_interpolation.md)
|
55
67
|
|
56
68
|
#### Python example
|
@@ -77,9 +89,12 @@ save_data('Downloads/final.trigonopterus.smooth.am', smooth_result, header=heade
|
|
77
89
|
#### Command-line based
|
78
90
|
```
|
79
91
|
python -m biomedisa.interpolation C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif
|
92
|
+
|
93
|
+
# if pre-segmentation is not exclusively in the XY plane
|
94
|
+
python -m biomedisa.interpolation C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif --allaxis
|
80
95
|
```
|
81
96
|
|
82
|
-
|
97
|
+
## Deep Learning
|
83
98
|
+ [Parameters and Examples](https://github.com/biomedisa/biomedisa/blob/master/README/deep_learning.md)
|
84
99
|
|
85
100
|
#### Python example (training)
|
@@ -115,10 +130,10 @@ deep_learning(img_data, label_data, train=True, batch_size=12,
|
|
115
130
|
#### Command-line based (training)
|
116
131
|
```
|
117
132
|
# start training with a batch size of 12
|
118
|
-
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs
|
133
|
+
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs=12
|
119
134
|
|
120
135
|
# validation (optional)
|
121
|
-
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -vi
|
136
|
+
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -vi=C:\Users\%USERNAME%\Downloads\val_img -vl=C:\Users\%USERNAME%\Downloads\val_labels
|
122
137
|
```
|
123
138
|
If running into ResourceExhaustedError due to out of memory (OOM), try to use smaller batch size.
|
124
139
|
|
@@ -143,7 +158,7 @@ save_data('final.Head5.am', results['regular'], results['header'])
|
|
143
158
|
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\testing_axial_crop_pat13.nii.gz C:\Users\%USERNAME%\Downloads\heart.h5 -p
|
144
159
|
```
|
145
160
|
|
146
|
-
|
161
|
+
## Biomedisa Features
|
147
162
|
|
148
163
|
#### Load and save data (such as Amira Mesh, TIFF, NRRD, NIfTI or DICOM)
|
149
164
|
```python
|
@@ -222,41 +237,16 @@ dice = Dice_score(ground_truth, result)
|
|
222
237
|
assd = ASSD(ground_truth, result)
|
223
238
|
```
|
224
239
|
|
225
|
-
|
226
|
-
If you installed Biomedisa via Pip
|
227
|
-
```
|
228
|
-
pip install --upgrade biomedisa
|
229
|
-
```
|
230
|
-
If you used `git clone`, change to the Biomedisa directory and make a pull request
|
231
|
-
```
|
232
|
-
cd git/biomedisa
|
233
|
-
git pull
|
234
|
-
```
|
235
|
-
|
236
|
-
If you installed the browser based version of Biomedisa (including MySQL database), you also need to update the database
|
237
|
-
```
|
238
|
-
python manage.py migrate
|
239
|
-
```
|
240
|
-
|
241
|
-
If you installed an [Apache Server](https://github.com/biomedisa/biomedisa/blob/master/README/APACHE_SERVER.md), you need to restart the server
|
242
|
-
```
|
243
|
-
sudo service apache2 restart
|
244
|
-
```
|
245
|
-
|
246
|
-
# Releases
|
247
|
-
|
248
|
-
For the versions available, see the [list of releases](https://github.com/biomedisa/biomedisa/releases).
|
249
|
-
|
250
|
-
# Authors
|
240
|
+
## Authors
|
251
241
|
|
252
242
|
* **Philipp D. Lösel**
|
253
243
|
|
254
244
|
See also the list of [contributors](https://github.com/biomedisa/biomedisa/blob/master/credits.md) who participated in this project.
|
255
245
|
|
256
|
-
|
246
|
+
## FAQ
|
257
247
|
Frequently asked questions can be found at: https://biomedisa.info/faq/.
|
258
248
|
|
259
|
-
|
249
|
+
## Citation
|
260
250
|
|
261
251
|
If you use Biomedisa or the data, please cite the following paper:
|
262
252
|
|
@@ -270,7 +260,7 @@ If you use Biomedisa's Smart Interpolation, you can also cite the initial descri
|
|
270
260
|
|
271
261
|
`Lösel, P. & Heuveline, V. Enhancing a diffusion algorithm for 4D image segmentation using local information. Proc. SPIE 9784, 97842L (2016).` https://doi.org/10.1117/12.2216202
|
272
262
|
|
273
|
-
|
263
|
+
## License
|
274
264
|
|
275
265
|
This project is covered under the **EUROPEAN UNION PUBLIC LICENCE v. 1.2 (EUPL)**.
|
276
266
|
|
@@ -5,36 +5,48 @@
|
|
5
5
|
- [Installation (command-line based)](#installation-command-line-based)
|
6
6
|
- [Installation (browser based)](#installation-browser-based)
|
7
7
|
- [Download Data](#download-data)
|
8
|
+
- [Revisions](#revisions)
|
8
9
|
- [Smart Interpolation](#smart-interpolation)
|
9
10
|
- [Deep Learning](#deep-learning)
|
10
11
|
- [Biomedisa Features](#biomedisa-features)
|
11
|
-
- [Update Biomedisa](#update-biomedisa)
|
12
|
-
- [Releases](#releases)
|
13
12
|
- [Authors](#authors)
|
14
13
|
- [FAQ](#faq)
|
15
14
|
- [Citation](#citation)
|
16
15
|
- [License](#license)
|
17
16
|
|
18
|
-
|
17
|
+
## Overview
|
19
18
|
Biomedisa (https://biomedisa.info) is a free and easy-to-use open-source application for segmenting large volumetric images, e.g. CT and MRI scans, developed at [The Australian National University CTLab](https://ctlab.anu.edu.au/). Biomedisa's semi-automated segmentation is based on a smart interpolation of sparsely pre-segmented slices, taking into account the complete underlying image data. In addition, Biomedisa enables deep learning for the fully automated segmentation of series of similar samples. It can be used in combination with segmentation tools such as 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).
|
20
19
|
|
21
|
-
|
20
|
+
## Hardware Requirements
|
22
21
|
+ One or more NVIDIA GPUs with compute capability 3.0 or higher or an Intel CPU.
|
23
22
|
|
24
|
-
|
23
|
+
## Installation (command-line based)
|
25
24
|
+ [Ubuntu 22.04 + CUDA + GPU (recommended)](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_cuda11.8_gpu_cli.md)
|
26
25
|
+ [Ubuntu 22.04 + OpenCL + CPU (smart interpolation only and very slow)](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_opencl_cpu_cli.md)
|
27
26
|
+ [Windows 10 + CUDA + GPU (recommended)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_cuda_gpu_cli.md)
|
28
27
|
+ [Windows 10 + OpenCL + GPU (easy to install but lacks features like allaxis, smoothing, uncertainty, optimized GPU memory usage)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_opencl_gpu_cli.md)
|
29
28
|
+ [Windows 10 + OpenCL + CPU (very slow)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_opencl_cpu_cli.md)
|
30
29
|
|
31
|
-
|
30
|
+
## Installation (browser based)
|
32
31
|
+ [Ubuntu 22.04](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_cuda11.8.md)
|
33
32
|
|
34
|
-
|
33
|
+
## Download Data
|
35
34
|
+ Download the data from our [gallery](https://biomedisa.info/gallery/)
|
36
35
|
|
37
|
-
|
36
|
+
## Revisions
|
37
|
+
2024.05.22
|
38
|
+
+ Pip is the preferred installation method
|
39
|
+
+ Commands, module names and imports have been changed to conform to the Pip standard
|
40
|
+
+ For versions <=2023.09.1 please check [README](https://github.com/biomedisa/biomedisa/blob/master/README/deprecated/README_2023.09.1.md)
|
41
|
+
|
42
|
+
## Quickstart
|
43
|
+
Install the Biomedisa package from the [Python Package Index](https://pypi.org/project/biomedisa/):
|
44
|
+
```
|
45
|
+
python -m pip install -U biomedisa
|
46
|
+
```
|
47
|
+
For smart interpolation and deep Learning modules, follow the [installation instructions](https://github.com/biomedisa/biomedisa#installation-command-line-based).
|
48
|
+
|
49
|
+
## Smart Interpolation
|
38
50
|
+ [Parameters and Examples](https://github.com/biomedisa/biomedisa/blob/master/README/smart_interpolation.md)
|
39
51
|
|
40
52
|
#### Python example
|
@@ -61,9 +73,12 @@ save_data('Downloads/final.trigonopterus.smooth.am', smooth_result, header=heade
|
|
61
73
|
#### Command-line based
|
62
74
|
```
|
63
75
|
python -m biomedisa.interpolation C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif
|
76
|
+
|
77
|
+
# if pre-segmentation is not exclusively in the XY plane
|
78
|
+
python -m biomedisa.interpolation C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif --allaxis
|
64
79
|
```
|
65
80
|
|
66
|
-
|
81
|
+
## Deep Learning
|
67
82
|
+ [Parameters and Examples](https://github.com/biomedisa/biomedisa/blob/master/README/deep_learning.md)
|
68
83
|
|
69
84
|
#### Python example (training)
|
@@ -99,10 +114,10 @@ deep_learning(img_data, label_data, train=True, batch_size=12,
|
|
99
114
|
#### Command-line based (training)
|
100
115
|
```
|
101
116
|
# start training with a batch size of 12
|
102
|
-
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs
|
117
|
+
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs=12
|
103
118
|
|
104
119
|
# validation (optional)
|
105
|
-
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -vi
|
120
|
+
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -vi=C:\Users\%USERNAME%\Downloads\val_img -vl=C:\Users\%USERNAME%\Downloads\val_labels
|
106
121
|
```
|
107
122
|
If running into ResourceExhaustedError due to out of memory (OOM), try to use smaller batch size.
|
108
123
|
|
@@ -127,7 +142,7 @@ save_data('final.Head5.am', results['regular'], results['header'])
|
|
127
142
|
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\testing_axial_crop_pat13.nii.gz C:\Users\%USERNAME%\Downloads\heart.h5 -p
|
128
143
|
```
|
129
144
|
|
130
|
-
|
145
|
+
## Biomedisa Features
|
131
146
|
|
132
147
|
#### Load and save data (such as Amira Mesh, TIFF, NRRD, NIfTI or DICOM)
|
133
148
|
```python
|
@@ -206,41 +221,16 @@ dice = Dice_score(ground_truth, result)
|
|
206
221
|
assd = ASSD(ground_truth, result)
|
207
222
|
```
|
208
223
|
|
209
|
-
|
210
|
-
If you installed Biomedisa via Pip
|
211
|
-
```
|
212
|
-
pip install --upgrade biomedisa
|
213
|
-
```
|
214
|
-
If you used `git clone`, change to the Biomedisa directory and make a pull request
|
215
|
-
```
|
216
|
-
cd git/biomedisa
|
217
|
-
git pull
|
218
|
-
```
|
219
|
-
|
220
|
-
If you installed the browser based version of Biomedisa (including MySQL database), you also need to update the database
|
221
|
-
```
|
222
|
-
python manage.py migrate
|
223
|
-
```
|
224
|
-
|
225
|
-
If you installed an [Apache Server](https://github.com/biomedisa/biomedisa/blob/master/README/APACHE_SERVER.md), you need to restart the server
|
226
|
-
```
|
227
|
-
sudo service apache2 restart
|
228
|
-
```
|
229
|
-
|
230
|
-
# Releases
|
231
|
-
|
232
|
-
For the versions available, see the [list of releases](https://github.com/biomedisa/biomedisa/releases).
|
233
|
-
|
234
|
-
# Authors
|
224
|
+
## Authors
|
235
225
|
|
236
226
|
* **Philipp D. Lösel**
|
237
227
|
|
238
228
|
See also the list of [contributors](https://github.com/biomedisa/biomedisa/blob/master/credits.md) who participated in this project.
|
239
229
|
|
240
|
-
|
230
|
+
## FAQ
|
241
231
|
Frequently asked questions can be found at: https://biomedisa.info/faq/.
|
242
232
|
|
243
|
-
|
233
|
+
## Citation
|
244
234
|
|
245
235
|
If you use Biomedisa or the data, please cite the following paper:
|
246
236
|
|
@@ -254,7 +244,7 @@ If you use Biomedisa's Smart Interpolation, you can also cite the initial descri
|
|
254
244
|
|
255
245
|
`Lösel, P. & Heuveline, V. Enhancing a diffusion algorithm for 4D image segmentation using local information. Proc. SPIE 9784, 97842L (2016).` https://doi.org/10.1117/12.2216202
|
256
246
|
|
257
|
-
|
247
|
+
## License
|
258
248
|
|
259
249
|
This project is covered under the **EUROPEAN UNION PUBLIC LICENCE v. 1.2 (EUPL)**.
|
260
250
|
|
@@ -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
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
import os
|
30
30
|
from biomedisa.features.biomedisa_helper import load_data, save_data
|
31
|
-
from biomedisa.
|
31
|
+
from biomedisa.interpolation import smart_interpolation
|
32
32
|
from tifffile import imread, imwrite, TiffFile
|
33
33
|
import numpy as np
|
34
34
|
import argparse
|
@@ -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
|
@@ -21,36 +21,48 @@ License-File: LICENSE
|
|
21
21
|
- [Installation (command-line based)](#installation-command-line-based)
|
22
22
|
- [Installation (browser based)](#installation-browser-based)
|
23
23
|
- [Download Data](#download-data)
|
24
|
+
- [Revisions](#revisions)
|
24
25
|
- [Smart Interpolation](#smart-interpolation)
|
25
26
|
- [Deep Learning](#deep-learning)
|
26
27
|
- [Biomedisa Features](#biomedisa-features)
|
27
|
-
- [Update Biomedisa](#update-biomedisa)
|
28
|
-
- [Releases](#releases)
|
29
28
|
- [Authors](#authors)
|
30
29
|
- [FAQ](#faq)
|
31
30
|
- [Citation](#citation)
|
32
31
|
- [License](#license)
|
33
32
|
|
34
|
-
|
33
|
+
## Overview
|
35
34
|
Biomedisa (https://biomedisa.info) is a free and easy-to-use open-source application for segmenting large volumetric images, e.g. CT and MRI scans, developed at [The Australian National University CTLab](https://ctlab.anu.edu.au/). Biomedisa's semi-automated segmentation is based on a smart interpolation of sparsely pre-segmented slices, taking into account the complete underlying image data. In addition, Biomedisa enables deep learning for the fully automated segmentation of series of similar samples. It can be used in combination with segmentation tools such as 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).
|
36
35
|
|
37
|
-
|
36
|
+
## Hardware Requirements
|
38
37
|
+ One or more NVIDIA GPUs with compute capability 3.0 or higher or an Intel CPU.
|
39
38
|
|
40
|
-
|
39
|
+
## Installation (command-line based)
|
41
40
|
+ [Ubuntu 22.04 + CUDA + GPU (recommended)](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_cuda11.8_gpu_cli.md)
|
42
41
|
+ [Ubuntu 22.04 + OpenCL + CPU (smart interpolation only and very slow)](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_opencl_cpu_cli.md)
|
43
42
|
+ [Windows 10 + CUDA + GPU (recommended)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_cuda_gpu_cli.md)
|
44
43
|
+ [Windows 10 + OpenCL + GPU (easy to install but lacks features like allaxis, smoothing, uncertainty, optimized GPU memory usage)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_opencl_gpu_cli.md)
|
45
44
|
+ [Windows 10 + OpenCL + CPU (very slow)](https://github.com/biomedisa/biomedisa/blob/master/README/windows10_opencl_cpu_cli.md)
|
46
45
|
|
47
|
-
|
46
|
+
## Installation (browser based)
|
48
47
|
+ [Ubuntu 22.04](https://github.com/biomedisa/biomedisa/blob/master/README/ubuntu2204_cuda11.8.md)
|
49
48
|
|
50
|
-
|
49
|
+
## Download Data
|
51
50
|
+ Download the data from our [gallery](https://biomedisa.info/gallery/)
|
52
51
|
|
53
|
-
|
52
|
+
## Revisions
|
53
|
+
2024.05.22
|
54
|
+
+ Pip is the preferred installation method
|
55
|
+
+ Commands, module names and imports have been changed to conform to the Pip standard
|
56
|
+
+ For versions <=2023.09.1 please check [README](https://github.com/biomedisa/biomedisa/blob/master/README/deprecated/README_2023.09.1.md)
|
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
|
+
|
65
|
+
## Smart Interpolation
|
54
66
|
+ [Parameters and Examples](https://github.com/biomedisa/biomedisa/blob/master/README/smart_interpolation.md)
|
55
67
|
|
56
68
|
#### Python example
|
@@ -77,9 +89,12 @@ save_data('Downloads/final.trigonopterus.smooth.am', smooth_result, header=heade
|
|
77
89
|
#### Command-line based
|
78
90
|
```
|
79
91
|
python -m biomedisa.interpolation C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif
|
92
|
+
|
93
|
+
# if pre-segmentation is not exclusively in the XY plane
|
94
|
+
python -m biomedisa.interpolation C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif --allaxis
|
80
95
|
```
|
81
96
|
|
82
|
-
|
97
|
+
## Deep Learning
|
83
98
|
+ [Parameters and Examples](https://github.com/biomedisa/biomedisa/blob/master/README/deep_learning.md)
|
84
99
|
|
85
100
|
#### Python example (training)
|
@@ -115,10 +130,10 @@ deep_learning(img_data, label_data, train=True, batch_size=12,
|
|
115
130
|
#### Command-line based (training)
|
116
131
|
```
|
117
132
|
# start training with a batch size of 12
|
118
|
-
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs
|
133
|
+
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs=12
|
119
134
|
|
120
135
|
# validation (optional)
|
121
|
-
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -vi
|
136
|
+
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -vi=C:\Users\%USERNAME%\Downloads\val_img -vl=C:\Users\%USERNAME%\Downloads\val_labels
|
122
137
|
```
|
123
138
|
If running into ResourceExhaustedError due to out of memory (OOM), try to use smaller batch size.
|
124
139
|
|
@@ -143,7 +158,7 @@ save_data('final.Head5.am', results['regular'], results['header'])
|
|
143
158
|
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\testing_axial_crop_pat13.nii.gz C:\Users\%USERNAME%\Downloads\heart.h5 -p
|
144
159
|
```
|
145
160
|
|
146
|
-
|
161
|
+
## Biomedisa Features
|
147
162
|
|
148
163
|
#### Load and save data (such as Amira Mesh, TIFF, NRRD, NIfTI or DICOM)
|
149
164
|
```python
|
@@ -222,41 +237,16 @@ dice = Dice_score(ground_truth, result)
|
|
222
237
|
assd = ASSD(ground_truth, result)
|
223
238
|
```
|
224
239
|
|
225
|
-
|
226
|
-
If you installed Biomedisa via Pip
|
227
|
-
```
|
228
|
-
pip install --upgrade biomedisa
|
229
|
-
```
|
230
|
-
If you used `git clone`, change to the Biomedisa directory and make a pull request
|
231
|
-
```
|
232
|
-
cd git/biomedisa
|
233
|
-
git pull
|
234
|
-
```
|
235
|
-
|
236
|
-
If you installed the browser based version of Biomedisa (including MySQL database), you also need to update the database
|
237
|
-
```
|
238
|
-
python manage.py migrate
|
239
|
-
```
|
240
|
-
|
241
|
-
If you installed an [Apache Server](https://github.com/biomedisa/biomedisa/blob/master/README/APACHE_SERVER.md), you need to restart the server
|
242
|
-
```
|
243
|
-
sudo service apache2 restart
|
244
|
-
```
|
245
|
-
|
246
|
-
# Releases
|
247
|
-
|
248
|
-
For the versions available, see the [list of releases](https://github.com/biomedisa/biomedisa/releases).
|
249
|
-
|
250
|
-
# Authors
|
240
|
+
## Authors
|
251
241
|
|
252
242
|
* **Philipp D. Lösel**
|
253
243
|
|
254
244
|
See also the list of [contributors](https://github.com/biomedisa/biomedisa/blob/master/credits.md) who participated in this project.
|
255
245
|
|
256
|
-
|
246
|
+
## FAQ
|
257
247
|
Frequently asked questions can be found at: https://biomedisa.info/faq/.
|
258
248
|
|
259
|
-
|
249
|
+
## Citation
|
260
250
|
|
261
251
|
If you use Biomedisa or the data, please cite the following paper:
|
262
252
|
|
@@ -270,7 +260,7 @@ If you use Biomedisa's Smart Interpolation, you can also cite the initial descri
|
|
270
260
|
|
271
261
|
`Lösel, P. & Heuveline, V. Enhancing a diffusion algorithm for 4D image segmentation using local information. Proc. SPIE 9784, 97842L (2016).` https://doi.org/10.1117/12.2216202
|
272
262
|
|
273
|
-
|
263
|
+
## License
|
274
264
|
|
275
265
|
This project is covered under the **EUROPEAN UNION PUBLIC LICENCE v. 1.2 (EUPL)**.
|
276
266
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/PredictDataGeneratorCrop.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/amira_data_stream.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/amira_grammar.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/amira_header.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/amira_to_np/amira_helper.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
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/gpu_kernels.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pycuda_large.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pycuda_large_allx.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pycuda_small.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pycuda_small_allx.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pyopencl_large.py
RENAMED
File without changes
|
{biomedisa-2024.5.20 → biomedisa-2024.5.22}/src/biomedisa/features/random_walk/pyopencl_small.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
|