Optimize speed estimation solution (#16254)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
684519fe52
commit
bf2b221d11
2 changed files with 57 additions and 122 deletions
|
|
@ -72,7 +72,7 @@ keywords: Ultralytics YOLOv8, speed estimation, object tracking, computer vision
|
|||
print("Video frame is empty or video processing has been successfully completed.")
|
||||
break
|
||||
|
||||
tracks = model.track(im0, persist=True, show=False)
|
||||
tracks = model.track(im0, persist=True)
|
||||
|
||||
im0 = speed_obj.estimate_speed(im0, tracks)
|
||||
video_writer.write(im0)
|
||||
|
|
@ -94,7 +94,6 @@ keywords: Ultralytics YOLOv8, speed estimation, object tracking, computer vision
|
|||
| `reg_pts` | `list` | `[(20, 400), (1260, 400)]` | List of region points for speed estimation. |
|
||||
| `view_img` | `bool` | `False` | Whether to display the image with annotations. |
|
||||
| `line_thickness` | `int` | `2` | Thickness of the lines for drawing boxes and tracks. |
|
||||
| `region_thickness` | `int` | `5` | Thickness of the region lines. |
|
||||
| `spdl_dist_thresh` | `int` | `10` | Distance threshold for speed calculation. |
|
||||
|
||||
### Arguments `model.track`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue