Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sjromuel
Masterarbeit
Commits
a41ea9fc
Commit
a41ea9fc
authored
Nov 26, 2020
by
sjromuel
Browse files
d
parent
6c76b537
Changes
2
Hide whitespace changes
Inline
Side-by-side
RobinNet/rerunModels.py
View file @
a41ea9fc
...
...
@@ -210,12 +210,18 @@ def main():
hausdorff_distance_filter2
.
Execute
(
sitk
.
GetImageFromArray
(
pred_np
),
sitk
.
GetImageFromArray
(
y_true_np
))
test_loss_hdd2
.
append
(
hausdorff_distance_filter2
.
GetHausdorffDistance
())
if
y_pred3d
==
[]:
'''
if y_pred3d ==[]:
y_pred3d = pred_np
y_true3d = y_true_np
else:
y_pred3d = np.append(pred_np, y_pred3d, axis=0)
y_true3d
=
np
.
append
(
y_true_np
,
y_true3d
,
axis
=
0
)
y_true3d = np.append(y_true_np, y_true3d, axis=0)'''
if
y_pred3d
==
[]:
y_pred3d
=
np
.
reshape
(
pred_np
,
newshape
=
(
1
,
512
,
512
))
y_true3d
=
np
.
reshape
(
y_true_np
,
newshape
=
(
1
,
512
,
512
))
else
:
y_pred3d
=
np
.
append
(
np
.
reshape
(
pred_np
,
newshape
=
(
1
,
512
,
512
)),
y_pred3d
,
axis
=
0
)
y_true3d
=
np
.
append
(
np
.
reshape
(
y_true_np
,
newshape
=
(
1
,
512
,
512
)),
y_true3d
,
axis
=
0
)
except
:
...
...
RobinNet/tryOut.py
View file @
a41ea9fc
...
...
@@ -13,6 +13,9 @@ predseg = np.load("finalResults/3dnpys/ctfgt2/unet_cv_ctfgt2/P01_pred3D.npy")
print
(
np
.
shape
(
predseg
))
plt
.
imshow
(
predseg
[
5
,
:,
:],
cmap
=
plt
.
cm
.
bone
)
plt
.
show
()
'''pat = "06"
inputimg = np.load("data/npy_thresh/P"+pat+"_mr_T1.gipl.npy")
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment