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
cc215
Cardiac_Multi_view_segmentation
Commits
295b870b
Commit
295b870b
authored
Mar 15, 2021
by
cc215
💬
Browse files
ukbb
parent
acb63c26
Changes
1
Hide whitespace changes
Inline
Side-by-side
dataset_loader/cardiac_dataset.py
View file @
295b870b
...
...
@@ -149,7 +149,10 @@ class CARDIAC_Predict_DATASET(data.Dataset):
if
self
.
if_z_score
:
new_img_slice
-=
new_input_mean
new_std
=
np
.
std
(
new_img_slice
,
axis
=
(
1
,
2
),
keepdims
=
True
)
# if abs(new_std-0)<1e-3: new_std=1
if
new_img_slice
.
shape
[
0
]
>
1
:
new_std
[
abs
(
new_std
-
0.
)
<
1e-6
]
=
1
else
:
if
abs
(
new_std
-
0
)
<
1e-3
:
new_std
=
1
new_img_slice
/=
(
new_std
)
else
:
print
(
'0-1 rescaling'
)
...
...
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