Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

真是标签图如何可视化呢 #159

Open
jun214384468 opened this issue Jun 20, 2020 · 2 comments
Open

真是标签图如何可视化呢 #159

jun214384468 opened this issue Jun 20, 2020 · 2 comments

Comments

@jun214384468
Copy link

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

@HCMY
Copy link

HCMY commented May 16, 2022

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
Copy link

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)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants