def predict(image_path, sess, sr): print image_path seg = Segmentation(image_path) d = seg.get_labels() mst = MinimumSpanningTree(d).get_mst() pa = Partition(mst, seg, sess, sr) l = pa.getList() c = Classify() result = c.classify(l) img_prediction = ImgPred(basename(image_path), l, result[1]) return img_prediction
def predict(image_path, sess, sr): """ Add your code here """ """ # Don't forget to store your prediction into ImgPred img_prediction = ImgPred(...) """ print image_path seg = Segmentation(image_path) d = seg.get_labels() mst = MinimumSpanningTree(d).get_mst() pa = Partition(mst, seg, sess, sr) l = pa.getList() c = Classify() result = c.classify(l) img_prediction = ImgPred(basename(image_path), l, result[1]) return img_prediction