biomedisa 2024.5.16__py3-none-any.whl → 2024.5.18__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-2024.5.16.dist-info → biomedisa-2024.5.18.dist-info}/METADATA +25 -54
- {biomedisa-2024.5.16.dist-info → biomedisa-2024.5.18.dist-info}/RECORD +5 -5
- {biomedisa-2024.5.16.dist-info → biomedisa-2024.5.18.dist-info}/LICENSE +0 -0
- {biomedisa-2024.5.16.dist-info → biomedisa-2024.5.18.dist-info}/WHEEL +0 -0
- {biomedisa-2024.5.16.dist-info → biomedisa-2024.5.18.dist-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.18
|
4
4
|
Summary: Segmentation of 3D volumetric image data
|
5
5
|
Author: Philipp Lösel
|
6
6
|
Author-email: philipp.loesel@anu.edu.au
|
@@ -55,13 +55,8 @@ Biomedisa (https://biomedisa.info) is a free and easy-to-use open-source applica
|
|
55
55
|
|
56
56
|
#### Python example
|
57
57
|
```python
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
import sys
|
62
|
-
sys.path.append(path_to_biomedisa)
|
63
|
-
from biomedisa_features.biomedisa_helper import load_data, save_data
|
64
|
-
from biomedisa_features.biomedisa_interpolation import smart_interpolation
|
58
|
+
from biomedisa.biomedisa_features.biomedisa_helper import load_data, save_data
|
59
|
+
from biomedisa.interpolation import smart_interpolation
|
65
60
|
|
66
61
|
# load data
|
67
62
|
img, _ = load_data('Downloads/trigonopterus.tif')
|
@@ -81,11 +76,7 @@ save_data('Downloads/final.trigonopterus.smooth.am', smooth_result, header=heade
|
|
81
76
|
|
82
77
|
#### Command-line based
|
83
78
|
```
|
84
|
-
|
85
|
-
cd git/biomedisa/biomedisa_features/
|
86
|
-
|
87
|
-
# start smart interpolation
|
88
|
-
python biomedisa_interpolation.py C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif
|
79
|
+
python -m biomedisa.interpolation C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif
|
89
80
|
```
|
90
81
|
|
91
82
|
# Deep Learning
|
@@ -93,14 +84,8 @@ python biomedisa_interpolation.py C:\Users\%USERNAME%\Downloads\tumor.tif C:\Use
|
|
93
84
|
|
94
85
|
#### Python example (training)
|
95
86
|
```python
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
# load libraries
|
100
|
-
import sys
|
101
|
-
sys.path.append(path_to_biomedisa)
|
102
|
-
from biomedisa_features.biomedisa_helper import load_data
|
103
|
-
from biomedisa_features.biomedisa_deeplearning import deep_learning
|
87
|
+
from biomedisa.biomedisa_features.biomedisa_helper import load_data
|
88
|
+
from biomedisa.deeplearning import deep_learning
|
104
89
|
|
105
90
|
# load image data
|
106
91
|
img1, _ = load_data('Head1.am')
|
@@ -129,27 +114,18 @@ deep_learning(img_data, label_data, train=True, batch_size=12,
|
|
129
114
|
|
130
115
|
#### Command-line based (training)
|
131
116
|
```
|
132
|
-
# change to the features directory
|
133
|
-
cd git/biomedisa/biomedisa_features/
|
134
|
-
|
135
117
|
# start training with a batch size of 12
|
136
|
-
python
|
118
|
+
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs 12
|
137
119
|
|
138
120
|
# validation (optional)
|
139
|
-
python
|
121
|
+
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
|
140
122
|
```
|
141
123
|
If running into ResourceExhaustedError due to out of memory (OOM), try to use smaller batch size.
|
142
124
|
|
143
125
|
#### Python example (prediction)
|
144
126
|
```python
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
# load libraries
|
149
|
-
import sys
|
150
|
-
sys.path.append(path_to_biomedisa)
|
151
|
-
from biomedisa_features.biomedisa_helper import load_data, save_data
|
152
|
-
from biomedisa_features.biomedisa_deeplearning import deep_learning
|
127
|
+
from biomedisa.biomedisa_features.biomedisa_helper import load_data, save_data
|
128
|
+
from biomedisa.deeplearning import deep_learning
|
153
129
|
|
154
130
|
# load data
|
155
131
|
img, _ = load_data('Head5.am')
|
@@ -164,20 +140,15 @@ save_data('final.Head5.am', results['regular'], results['header'])
|
|
164
140
|
|
165
141
|
#### Command-line based (prediction)
|
166
142
|
```
|
167
|
-
# change to the features directory
|
168
|
-
cd git/biomedisa/biomedisa_features/
|
169
|
-
|
170
143
|
# start prediction with a batch size of 6
|
171
|
-
python
|
144
|
+
python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\testing_axial_crop_pat13.nii.gz C:\Users\%USERNAME%\Downloads\heart.h5 -p -bs 6
|
172
145
|
```
|
173
146
|
|
174
147
|
# Biomedisa Features
|
175
148
|
|
176
149
|
#### Load and save data (such as Amira Mesh, TIFF, NRRD, NIfTI or DICOM)
|
177
150
|
```python
|
178
|
-
import
|
179
|
-
sys.path.append(path_to_biomedisa) # e.g. '/home/<user>/git/biomedisa'
|
180
|
-
from biomedisa_features.biomedisa_helper import load_data, save_data
|
151
|
+
from biomedisa.biomedisa_features.biomedisa_helper import load_data, save_data
|
181
152
|
|
182
153
|
# load data as numpy array
|
183
154
|
# for DICOM, PNG files, or similar formats, 'path_to_data' must reference
|
@@ -190,10 +161,8 @@ save_data(path_to_data, data, header)
|
|
190
161
|
|
191
162
|
#### Create STL mesh from segmentation (label values are saved as attributes)
|
192
163
|
```python
|
193
|
-
import
|
194
|
-
|
195
|
-
from biomedisa_features.biomedisa_helper import load_data, save_data
|
196
|
-
from biomedisa_features.create_mesh import get_voxel_spacing, save_mesh
|
164
|
+
from biomedisa.biomedisa_features.biomedisa_helper import load_data, save_data
|
165
|
+
from biomedisa.mesh import get_voxel_spacing, save_mesh
|
197
166
|
|
198
167
|
# load segmentation
|
199
168
|
data, header, extension = load_data(path_to_data, return_extension=True)
|
@@ -209,7 +178,7 @@ save_mesh(path_to_data, data, x_res, y_res, z_res, poly_reduction=0.9, smoothing
|
|
209
178
|
|
210
179
|
#### Create mesh directly
|
211
180
|
```
|
212
|
-
python
|
181
|
+
python -m biomedisa.mesh <path_to_data>
|
213
182
|
```
|
214
183
|
|
215
184
|
#### Options
|
@@ -225,9 +194,7 @@ python git/biomedisa/biomedisa_features/create_mesh.py <path_to_data>
|
|
225
194
|
|
226
195
|
#### Resize data
|
227
196
|
```python
|
228
|
-
import
|
229
|
-
sys.path.append(path_to_biomedisa) # e.g. '/home/<user>/git/biomedisa'
|
230
|
-
from biomedisa_features.biomedisa_helper import img_resize
|
197
|
+
from biomedisa.biomedisa_features.biomedisa_helper import img_resize
|
231
198
|
|
232
199
|
# resize image data
|
233
200
|
zsh, ysh, xsh = data.shape
|
@@ -240,7 +207,7 @@ label_data = img_resize(label_data, new_zsh, new_ysh, new_xsh, labels=True)
|
|
240
207
|
|
241
208
|
#### Remove outliers and fill holes
|
242
209
|
```python
|
243
|
-
from biomedisa_features.biomedisa_helper import clean, fill
|
210
|
+
from biomedisa.biomedisa_features.biomedisa_helper import clean, fill
|
244
211
|
|
245
212
|
# delete outliers smaller than 90% of the segment
|
246
213
|
label_data = clean(label_data, 0.9)
|
@@ -251,24 +218,28 @@ label_data = fill(label_data, 0.9)
|
|
251
218
|
|
252
219
|
#### Accuracy assessment
|
253
220
|
```python
|
254
|
-
from biomedisa_features.biomedisa_helper import Dice_score, ASSD
|
221
|
+
from biomedisa.biomedisa_features.biomedisa_helper import Dice_score, ASSD
|
255
222
|
dice = Dice_score(ground_truth, result)
|
256
223
|
assd = ASSD(ground_truth, result)
|
257
224
|
```
|
258
225
|
|
259
226
|
# Update Biomedisa
|
260
|
-
If you
|
227
|
+
If you installed Biomedisa via Pip.
|
228
|
+
```
|
229
|
+
pip install --upgrade biomedisa
|
230
|
+
```
|
231
|
+
If you used `git clone`, change to the Biomedisa directory and make a pull request.
|
261
232
|
```
|
262
233
|
cd git/biomedisa
|
263
234
|
git pull
|
264
235
|
```
|
265
236
|
|
266
|
-
If you
|
237
|
+
If you installed the browser based version of Biomedisa (including MySQL database), you also need to update the database.
|
267
238
|
```
|
268
239
|
python manage.py migrate
|
269
240
|
```
|
270
241
|
|
271
|
-
If you
|
242
|
+
If you installed an [Apache Server](https://github.com/biomedisa/biomedisa/blob/master/README/APACHE_SERVER.md), you need to restart the server.
|
272
243
|
```
|
273
244
|
sudo service apache2 restart
|
274
245
|
```
|
@@ -37,8 +37,8 @@ biomedisa/biomedisa_features/random_walk/pyopencl_large.py,sha256=cOBhvxrdKCkbr6
|
|
37
37
|
biomedisa/biomedisa_features/random_walk/pyopencl_small.py,sha256=2XALYNNv9D8Gb1u2lcjR1O4W9UM0Xxjj0r4nr-NiEkk,17068
|
38
38
|
biomedisa/biomedisa_features/random_walk/rw_large.py,sha256=FERIsTXmqZprGCTShRR75PesIX5MMVtptk-SqI-4abo,19805
|
39
39
|
biomedisa/biomedisa_features/random_walk/rw_small.py,sha256=0YFL0Ovb_400Ikbxv5yOXWskl3vAyfQ_0_Gz5EXzvVQ,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.18.dist-info/LICENSE,sha256=sehayP6UhydNnmstfL4yFR3genMRdpuUh6uZVWJN1H0,14152
|
41
|
+
biomedisa-2024.5.18.dist-info/METADATA,sha256=Ck2qVtPA2ayKHrT0Rq7MUKl9wSWlvp9XNKxQ5HsTsHU,10748
|
42
|
+
biomedisa-2024.5.18.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
43
|
+
biomedisa-2024.5.18.dist-info/top_level.txt,sha256=opsf1Eb4vCguPSxev4HHSeiUKCccT_C_RcUCdAYbHWQ,10
|
44
|
+
biomedisa-2024.5.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|