monai
medical
katielink's picture
complete the model package
15e1e77
raw
history blame
476 Bytes
import json
class CreateImageLabelList:
def __init__(self, filename):
self.filename = filename
fid = open(self.filename, "r")
self.json_dict = json.load(fid)
def create_dataset(self, grp):
image_list = []
label_list = []
image_label_list = self.json_dict[grp]
for _ in image_label_list:
image_list.append(_["image"])
label_list.append(_["label"])
return image_list, label_list