Add yolo_bbox2segment docs reference (#7751)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Muhammad Rizwan Munawar <chr043416@gmail.com>
This commit is contained in:
Glenn Jocher 2024-01-23 00:02:51 +01:00 committed by GitHub
parent cb72761a3b
commit 12a741c76f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 18 deletions

View file

@ -182,15 +182,15 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
model = YOLO("yolov8s.pt") # YOLOv8 custom/pretrained model
im0 = cv2.imread("path/to/image.png") # path to image file
h, w = im0.shape[:2] # image height and width
# Heatmap Init
heatmap_obj = heatmap.Heatmap()
heatmap_obj.set_args(colormap=cv2.COLORMAP_PARULA,
imw=im0.shape[0], # should same as im0 width
imh=im0.shape[1], # should same as im0 height
view_img=True,
shape="circle")
imw=w,
imh=h,
view_img=True,
shape="circle")
results = model.track(im0, persist=True)
im0 = heatmap_obj.generate_heatmap(im0, tracks=results)