Update functions description (#18050)

This commit is contained in:
Muhammad Rizwan Munawar 2024-12-05 23:57:09 +05:00 committed by GitHub
parent 28f116682f
commit 1618c69d13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 10 deletions

View file

@ -27,12 +27,8 @@ class Heatmap(ObjectCounter):
Examples:
>>> from ultralytics.solutions import Heatmap
>>> heatmap = Heatmap(model="yolov8n.pt", colormap=cv2.COLORMAP_JET)
>>> results = heatmap("path/to/video.mp4")
>>> for result in results:
... print(result.speed) # Print inference speed
... cv2.imshow("Heatmap", result.plot())
... if cv2.waitKey(1) & 0xFF == ord("q"):
... break
>>> frame = cv2.imread("frame.jpg")
>>> processed_frame = heatmap.generate_heatmap(frame)
"""
def __init__(self, **kwargs):