Open jun214384468 opened 4 years ago
def draw_bbox(bboxs,img): bboxs_res = [] for bbox in bboxs: bbox = np.reshape(bbox,(4,2)) cv2.drawContours(img, [bbox],-1, (0, 255, 0), 2) bboxs_res.append(bbox) return bboxs_res, img
box = self.detector.predict(img_path) #作者模型的输出 img = cv2.imread(img_path) bboxs_res, box_img = draw_bbox(box['bboxes'], img)
def draw_bbox(bboxs,img): bboxs_res = [] for bbox in bboxs: bbox = np.reshape(bbox,(4,2)) cv2.drawContours(img, [bbox],-1, (0, 255, 0), 2) bboxs_res.append(bbox) return bboxs_res, img
box = self.detector.predict(img_path) #作者模型的输出 img = cv2.imread(img_path) bboxs_res, box_img = draw_bbox(box['bboxes'], img)
您好,请问这一段代码要加到哪一段去运行嘞 谢谢您
根据标签,怎么样对初始图进行可视化呢?求指教谢谢