Skip to content

Commit 7229093

Browse files
committed
updated to better trained model with correct handling of 8bit images, updating documentation, fixing figures
1 parent b6e0ba9 commit 7229093

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

CTBoneSegmenter.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"docker":
1212
{
1313
"dockerhub_repository": "4quant/bone-segmenter-cpu",
14-
"digest": "sha256:41020bcd68cc5854aa1757b452defc52e9035d39ed19edc1b33439d327dd99b5",
14+
"digest": "sha256:f1c96761b6a068db89411abbb720b44e5df035c59370ceda0e7c15b3cb3307ac",
1515
"size": "3.6 GB"
1616
}
1717
,

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Bone Segmenter
22
A modification of the Prostate Segmenter library using our bone segmentation routines with CT images
33

4+
## Slicer Integration
5+
6+
Using the DeepInfer plugin the image can be called interactively on a image loaded in Slicer. Here we show the results using the Chest CT image from the Sample Data
7+
8+
![Slicer](figures/BoneSegGui.png)
9+
410
# Docker Image
511

612
## CPU
@@ -12,7 +18,7 @@ docker pull 4Quant/bone-segmenter-cpu
1218

1319
##### Building the docker
1420
```
15-
docker build -t bone-segmenter-cpu -f Dockerfile.cpu .
21+
docker build -t 4quant/bone-segmenter-cpu -f Dockerfile.cpu .
1622
```
1723

1824
##### Running the docker

boneseg/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def predict_test(self, input_test_slices_arr):
1717
print("Preprocessing data.")
1818
test_slices_arr = self.preprocess(input_test_slices_arr, self.mean_val, self.max_val)
1919
print("Predicting the labelmap.")
20-
test_slices_prediction = self.model.predict(test_slices_arr, verbose=1)
20+
test_slices_prediction = self.model.predict(test_slices_arr, verbose=1, batch_size = 4) # reduce memory
2121
return test_slices_prediction
2222

2323
def train(self, input_train_slices, input_train_segmentations, **kw_args):

figures/BoneSegGui.png

893 KB
Loading

figures/boneseg_predictions.png

366 KB
Loading

fit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def main(argv):
4141
if os.path.isfile(InputVolume) and os.path.isdir(os.path.dirname(OutputLabel)):
4242
print("Building the model.")
4343
model = unet1.model(weights=True, summary=False)
44-
cnn = CNNModel(model=model, mean_val = 0, max_val = 300)
44+
cnn = CNNModel(model=model, mean_val = 127, max_val = 127)
4545
rows = 128
4646
cols = 128
4747
#

0 commit comments

Comments
 (0)