Commit 445d587e authored by zhiyang.zhou's avatar zhiyang.zhou

fix a bug of preprocess_data

parent 96e31bcc
......@@ -89,16 +89,17 @@ def preprocess_data():
if os.path.isdir(path):
# take image dir and xlsx file
sub_paths = os.listdir(path)
img_path = None
img_paths = []
xlsx_path = None
for j in range(0, len(sub_paths)):
sub_path = os.path.join(path, sub_paths[j])
if os.path.isdir(sub_path):
img_path = sub_path
img_paths.append(sub_path)
elif os.path.isfile(sub_path):
xlsx_path = sub_path
# take patient info
# take images
for img_path in img_paths:
processed_dir = './processed-data'
if not os.path.exists(processed_dir):
os.makedirs(processed_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment