PSENet icon indicating copy to clipboard operation
PSENet copied to clipboard

真是标签图如何可视化呢

Open jun214384468 opened this issue 4 years ago • 2 comments

根据标签,怎么样对初始图进行可视化呢?求指教谢谢

jun214384468 avatar Jun 20 '20 02:06 jun214384468

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)

HCMY avatar May 16 '22 15:05 HCMY

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)

您好,请问这一段代码要加到哪一段去运行嘞 谢谢您

Captainlululu avatar Sep 21 '22 14:09 Captainlululu