Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tongue-diagnosis
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhiyang.zhou
tongue-diagnosis
Commits
445d587e
Commit
445d587e
authored
Jul 09, 2021
by
zhiyang.zhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a bug of preprocess_data
parent
96e31bcc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
img_dataset.py
img_dataset.py
+20
-19
No files found.
img_dataset.py
View file @
445d587e
...
@@ -89,16 +89,17 @@ def preprocess_data():
...
@@ -89,16 +89,17 @@ def preprocess_data():
if
os
.
path
.
isdir
(
path
):
if
os
.
path
.
isdir
(
path
):
# take image dir and xlsx file
# take image dir and xlsx file
sub_paths
=
os
.
listdir
(
path
)
sub_paths
=
os
.
listdir
(
path
)
img_path
=
None
img_path
s
=
[]
xlsx_path
=
None
xlsx_path
=
None
for
j
in
range
(
0
,
len
(
sub_paths
)):
for
j
in
range
(
0
,
len
(
sub_paths
)):
sub_path
=
os
.
path
.
join
(
path
,
sub_paths
[
j
])
sub_path
=
os
.
path
.
join
(
path
,
sub_paths
[
j
])
if
os
.
path
.
isdir
(
sub_path
):
if
os
.
path
.
isdir
(
sub_path
):
img_path
=
sub_path
img_path
s
.
append
(
sub_path
)
elif
os
.
path
.
isfile
(
sub_path
):
elif
os
.
path
.
isfile
(
sub_path
):
xlsx_path
=
sub_path
xlsx_path
=
sub_path
# take patient info
# take images
# take images
for
img_path
in
img_paths
:
processed_dir
=
'./processed-data'
processed_dir
=
'./processed-data'
if
not
os
.
path
.
exists
(
processed_dir
):
if
not
os
.
path
.
exists
(
processed_dir
):
os
.
makedirs
(
processed_dir
)
os
.
makedirs
(
processed_dir
)
...
...
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