Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yaoyuping
nnDetection
Commits
e6ffde5a
Commit
e6ffde5a
authored
May 01, 2021
by
mibaumgartner
Browse files
remove seg cast when unpacking
parent
1235f737
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
nndet/io/load.py
nndet/io/load.py
+1
-1
No files found.
nndet/io/load.py
View file @
e6ffde5a
...
@@ -206,7 +206,7 @@ def npz2npy(npz_file: str, delete_npz: bool = False):
...
@@ -206,7 +206,7 @@ def npz2npy(npz_file: str, delete_npz: bool = False):
a
=
load_npz_looped
(
npz_file
,
keys
=
[
"data"
,
"seg"
],
num_tries
=
3
)
a
=
load_npz_looped
(
npz_file
,
keys
=
[
"data"
,
"seg"
],
num_tries
=
3
)
if
a
is
not
None
:
if
a
is
not
None
:
np
.
save
(
npz_file
[:
-
3
]
+
"npy"
,
a
[
"data"
])
np
.
save
(
npz_file
[:
-
3
]
+
"npy"
,
a
[
"data"
])
np
.
save
(
npz_file
[:
-
4
]
+
"_seg.npy"
,
a
[
"seg"
]
.
astype
(
np
.
int16
)
)
np
.
save
(
npz_file
[:
-
4
]
+
"_seg.npy"
,
a
[
"seg"
])
if
delete_npz
:
if
delete_npz
:
os
.
remove
(
npz_file
)
os
.
remove
(
npz_file
)
...
...
Write
Preview
Markdown
is supported
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