def run_roi(self): # Just runs the latest ROI for now rbc_seg.segmentation(self.roi_list[len(self.roi_list)-1][1])
labels_smeared = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3] #labels1 = [2,2,3,0,1,2,2,2,1,1,1,3,0,2,0,2,3,0,1,1, 0,0,1,1,0,1,0,1,3,3] labels1 = [2,2,3,0,1,2,2,1,1,0,0,2,0,2,3,0,1,1,0,0,1,1,0,1,0,1,0,3,2,1] labels_1_hard = [2,1,0,0,1,0,2,2,1,2,1,3,2,2,1,1,1,2,2,0,0,2,0,2,0,2,2,2,0,0] labels_crap_1 = [3 for i in range(73)] print "alla:", len(labels_crap_1) + len(labels1) + len(labels_1_hard) + len(labels2) + len(labels_smeared) #labels_others_1 = [3 for i in range(len(cell_list_others_1))] all_labels = [labels1, labels2, labels_1_hard, labels_smeared, labels_crap_1] labels = [] for i,filename in enumerate(training_files): testimg = cv2.imread("../npyimages/" + filename) testimg = cv2.cvtColor(testimg, cv2.COLOR_BGR2RGB) if filename == "only_whites_clean.png": cell_list = rbc_seg.segmentation(testimg) del cell_list[11] del cell_list[7] print "len clean:", len(cell_list) elif filename == "only_whites_1_hard.png": cell_list_1_hard_ = rbc_seg.segmentation(testimg) cell_list = [] cell_list.append(cell_list_1_hard_[8]) cell_list.append(cell_list_1_hard_[10]) cell_list.append(cell_list_1_hard_[16]) cell_list.append(cell_list_1_hard_[23]) cell_list.append(cell_list_1_hard_[32]) cell_list.append(cell_list_1_hard_[47]) cell_list.append(cell_list_1_hard_[59]) cell_list.append(cell_list_1_hard_[62])