Update functions description (#18050)

pull/18052/head
Muhammad Rizwan Munawar 1 week ago committed by GitHub
parent 28f116682f
commit 1618c69d13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      ultralytics/solutions/heatmap.py
  2. 11
      ultralytics/solutions/queue_management.py

@ -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):

@ -27,10 +27,13 @@ class QueueManager(BaseSolution):
display_output: Displays the processed output.
Examples:
>>> queue_manager = QueueManager(source="video.mp4", region=[100, 100, 200, 200, 300, 300])
>>> for frame in video_stream:
... processed_frame = queue_manager.process_queue(frame)
... cv2.imshow("Queue Management", processed_frame)
>>> cap = cv2.VideoCapture("Path/to/video/file.mp4")
>>> queue_manager = QueueManager(region=[100, 100, 200, 200, 300, 300])
>>> while cap.isOpened():
>>> success, im0 = cap.read()
>>> if not success:
>>> break
>>> out = queue.process_queue(im0)
"""
def __init__(self, **kwargs):

Loading…
Cancel
Save