files = os.listdir(anger_path) files.sort() for filename in files: I = skimage.io.imread(os.path.join(anger_path,filename)) image = cv2.imread(os.path.join(anger_path,filename)) res, flag = get_mask(image) data_x.append(I.tolist()) data_y.append(0)
if flag == True: res = res * 255 seg_image_data = res.tolist() data_z.append(seg_image_data) imageCount = imageCount + 1 print(imageCount)
files = os.listdir(anger_path) files.sort() for filename in files: I = skimage.io.imread(os.path.join(anger_path,filename)) image = cv2.imread(os.path.join(anger_path,filename)) res, flag = get_mask(image) if flag == True: data_x.append(I.tolist()) data_y.append(0) res = res * 255 seg_image_data = res.tolist() data_z.append(seg_image_data) imageCount = imageCount + 1 print(imageCount)