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
d41b5c0d
Unverified
Commit
d41b5c0d
authored
Jun 08, 2024
by
Michael Baumgartner
Committed by
GitHub
Jun 08, 2024
Browse files
Merge pull request #251 from FrankTN/bugfix_248
Fix of issue 248
parents
8032b8d2
0d09f38a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
nndet/io/load.py
nndet/io/load.py
+3
-0
nndet/io/paths.py
nndet/io/paths.py
+1
-1
No files found.
nndet/io/load.py
View file @
d41b5c0d
...
...
@@ -180,6 +180,9 @@ def unpack_dataset(folder: Pathlike,
"""
logger
.
info
(
"Unpacking dataset"
)
npz_files
=
subfiles
(
Path
(
folder
),
identifier
=
"*.npz"
,
join
=
True
)
if
not
npz_files
:
logger
.
warning
(
f
'No paths found in
{
Path
(
folder
)
}
matching *.npz'
)
return
with
Pool
(
processes
)
as
p
:
p
.
starmap
(
npz2npy
,
zip
(
npz_files
,
repeat
(
delete_npz
)))
...
...
nndet/io/paths.py
View file @
d41b5c0d
...
...
@@ -34,7 +34,7 @@ def subfiles(dir_path: Path, identifier: str, join: bool) -> List[str]:
Returns:
List[str]: found paths/file names
"""
paths
=
list
(
map
(
str
,
list
(
Path
(
dir_path
).
glob
(
identifier
))))
paths
=
list
(
map
(
str
,
list
(
Path
(
os
.
path
.
expandvars
(
dir_path
)
)
.
glob
(
identifier
))))
if
not
join
:
paths
=
[
p
.
rsplit
(
os
.
path
.
sep
,
1
)[
-
1
]
for
p
in
paths
]
return
paths
...
...
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