Closed sunshinelike closed 1 year ago
yes. sorry for leading the misunderstanding. the difference between part1 and 3b is that part1 is only for segmentation, and 3b is for segmentation and diagnosis. I switch it from 3b to 1 in version 2, but both will work fine. you can download part1 data and use this csv anyway.
OK, thank you very much, got, if you could update the readme and file name, that would be better for understanding. And could you share the csv maker script?
sure
`import os import pandas as pd
path = '../../data/isic/isic2016' train_data_dir = 'ISBI2016_ISIC_Part1_Training_Data' train_gt_dir = 'ISBI2016_ISIC_Part1_Training_GroundTruth' csv_path_train = '../ISBI2016_ISIC_Part3B_Training_GroundTruth.csv'
col_names = ['img','seg'] df = pd.DataFrame()
for (root,dirs,files) in os.walk(os.path.join(path,train_data_dir), topdown=True): for name in files: preind = name.split('.')[0] segname = preind + '_Segmentation.png' segpath = os.path.join( train_gt_dir, segname) imgpath = os.path.join( train_data_dir, name) data = pd.DataFrame([[imgpath,segpath]], columns = col_names) df = df.append(data, ignore_index=True) df.to_csv(csv_path_train)`
Thank you very much. But when I download part1 data, it has no corresponding segmentation image, the index is also wrong. If I use your script
sure
`import os import pandas as pd
path = '../../data/isic/isic2016' train_data_dir = 'ISBI2016_ISIC_Part1_Training_Data' train_gt_dir = 'ISBI2016_ISIC_Part1_Training_GroundTruth' csv_path_train = '../ISBI2016_ISIC_Part3B_Training_GroundTruth.csv'
col_names = ['img','seg'] df = pd.DataFrame()
for (root,dirs,files) in os.walk(os.path.join(path,train_data_dir), topdown=True): for name in files: preind = name.split('.')[0] segname = preind + '_Segmentation.png' segpath = os.path.join( train_gt_dir, segname) imgpath = os.path.join( train_data_dir, name) data = pd.DataFrame([[imgpath,segpath]], columns = col_names) df = df.append(data, ignore_index=True) df.to_csv(csv_path_train)`
download training ground truth, which is the segmentation
download training ground truth, which is the segmentation Oh, I see. Thank you very much, best wishes.