bin_list = []
for i in result:
bin_list.append(make_dict(i))
with open(sample_file+ '/nccpatient.pkl','wb') as f:
pickle.dump(bin_list,f)
`
this code can make your pkl file.
Anyway, I have a question,
in your resposirtory, image_prediction.csv,
left_benign,right_benign,left_malignant,right_malignant
0.0580,0.0754,0.0091,0.0179
0.0646,0.9536,0.0012,0.7258
0.4388,0.3526,0.2325,0.1061
0.3765,0.6483,0.0909,0.2597
Are these results written in the order of patient number in the pklfile?
Thank you for providing this helper!
In the sample pickle file, we provide a list of exams and the predictions are in the same order with the order of exams.
thank you for your contributions.
using another dataset to this respository. this code can be useful.
`def divide_list(l, n):
리스트 l의 길이가 n이면 계속 반복
def make_dict(file_list):
print(file_list)
import natsort
sample_file_path = 'your folder path' sample_file_list = natsort.natsorted(os.listdir(sample_file)) n=4 result = list(divide_list(sample_file_list,n))
bin_list = [] for i in result: bin_list.append(make_dict(i)) with open(sample_file+ '/nccpatient.pkl','wb') as f: pickle.dump(bin_list,f) ` this code can make your pkl file.
Anyway, I have a question,
in your resposirtory, image_prediction.csv, left_benign,right_benign,left_malignant,right_malignant 0.0580,0.0754,0.0091,0.0179 0.0646,0.9536,0.0012,0.7258 0.4388,0.3526,0.2325,0.1061 0.3765,0.6483,0.0909,0.2597
Are these results written in the order of patient number in the pklfile?