Solutions updates (#9548)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
207bba108f
commit
e597bed2f2
5 changed files with 98 additions and 115 deletions
|
|
@ -293,27 +293,26 @@ A heatmap generated with [Ultralytics YOLOv8](https://github.com/ultralytics/ult
|
|||
|
||||
### Arguments `set_args`
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|-----------------------|----------------|---------------------|-----------------------------------------------------------|
|
||||
| `view_img` | `bool` | `False` | Display the frame with heatmap |
|
||||
| `colormap` | `cv2.COLORMAP` | `None` | cv2.COLORMAP for heatmap |
|
||||
| `imw` | `int` | `None` | Width of Heatmap |
|
||||
| `imh` | `int` | `None` | Height of Heatmap |
|
||||
| `view_in_counts` | `bool` | `True` | Display in-counts only on video frame |
|
||||
| `view_out_counts` | `bool` | `True` | Display out-counts only on video frame |
|
||||
| `classes_names` | `dict` | `model.model.names` | Dictionary of Class Names |
|
||||
| `heatmap_alpha` | `float` | `0.5` | Heatmap alpha value |
|
||||
| `count_reg_pts` | `list` | `None` | Object counting region points |
|
||||
| `count_txt_thickness` | `int` | `2` | Count values text size |
|
||||
| `count_txt_color` | `RGB Color` | `(0, 0, 0)` | Foreground color for Object counts text |
|
||||
| `count_reg_color` | `RGB Color` | `(255, 0, 255)` | Counting region color |
|
||||
| `region_thickness` | `int` | `5` | Counting region thickness value |
|
||||
| `decay_factor` | `float` | `0.99` | Decay factor for heatmap area removal after specific time |
|
||||
| `shape` | `str` | `circle` | Heatmap shape for display "rect" or "circle" supported |
|
||||
| `line_dist_thresh` | `int` | `15` | Euclidean Distance threshold for line counter |
|
||||
| `fontsize` | `float` | `0.6` | Font size of counting text |
|
||||
| `line_color` | `RGB Color` | `(255, 255, 255)` | Count highlighter color |
|
||||
| `cls_txtdisplay_gap` | `int` | `50` | Display gap between each class count |
|
||||
| Name | Type | Default | Description |
|
||||
|----------------------|----------------|---------------------|-----------------------------------------------------------|
|
||||
| `view_img` | `bool` | `False` | Display the frame with heatmap |
|
||||
| `colormap` | `cv2.COLORMAP` | `None` | cv2.COLORMAP for heatmap |
|
||||
| `imw` | `int` | `None` | Width of Heatmap |
|
||||
| `imh` | `int` | `None` | Height of Heatmap |
|
||||
| `line_thickness` | `int` | `2` | Increase bounding boxes and count text thickness |
|
||||
| `view_in_counts` | `bool` | `True` | Display in-counts only on video frame |
|
||||
| `view_out_counts` | `bool` | `True` | Display out-counts only on video frame |
|
||||
| `classes_names` | `dict` | `model.model.names` | Dictionary of Class Names |
|
||||
| `heatmap_alpha` | `float` | `0.5` | Heatmap alpha value |
|
||||
| `count_reg_pts` | `list` | `None` | Object counting region points |
|
||||
| `count_txt_color` | `RGB Color` | `(0, 0, 0)` | Foreground color for Object counts text |
|
||||
| `count_reg_color` | `RGB Color` | `(255, 0, 255)` | Counting region color |
|
||||
| `region_thickness` | `int` | `5` | Counting region thickness value |
|
||||
| `decay_factor` | `float` | `0.99` | Decay factor for heatmap area removal after specific time |
|
||||
| `shape` | `str` | `circle` | Heatmap shape for display "rect" or "circle" supported |
|
||||
| `line_dist_thresh` | `int` | `15` | Euclidean Distance threshold for line counter |
|
||||
| `count_bg_color` | `RGB Color` | `(255, 255, 255)` | Count highlighter color |
|
||||
| `cls_txtdisplay_gap` | `int` | `50` | Display gap between each class count |
|
||||
|
||||
### Arguments `model.track`
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
counter.set_args(view_img=True,
|
||||
reg_pts=region_points,
|
||||
classes_names=model.names,
|
||||
draw_tracks=True)
|
||||
draw_tracks=True,
|
||||
line_thickness=2)
|
||||
|
||||
while cap.isOpened():
|
||||
success, im0 = cap.read()
|
||||
|
|
@ -105,7 +106,8 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
counter.set_args(view_img=True,
|
||||
reg_pts=region_points,
|
||||
classes_names=model.names,
|
||||
draw_tracks=True)
|
||||
draw_tracks=True,
|
||||
line_thickness=2)
|
||||
|
||||
while cap.isOpened():
|
||||
success, im0 = cap.read()
|
||||
|
|
@ -148,7 +150,8 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
counter.set_args(view_img=True,
|
||||
reg_pts=line_points,
|
||||
classes_names=model.names,
|
||||
draw_tracks=True)
|
||||
draw_tracks=True,
|
||||
line_thickness=2)
|
||||
|
||||
while cap.isOpened():
|
||||
success, im0 = cap.read()
|
||||
|
|
@ -191,7 +194,8 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
counter.set_args(view_img=True,
|
||||
reg_pts=line_points,
|
||||
classes_names=model.names,
|
||||
draw_tracks=True)
|
||||
draw_tracks=True,
|
||||
line_thickness=2)
|
||||
|
||||
while cap.isOpened():
|
||||
success, im0 = cap.read()
|
||||
|
|
@ -215,25 +219,22 @@ Object counting with [Ultralytics YOLOv8](https://github.com/ultralytics/ultraly
|
|||
|
||||
### Optional Arguments `set_args`
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
|-----------------------|-------------|----------------------------|-----------------------------------------------|
|
||||
| `view_img` | `bool` | `False` | Display frames with counts |
|
||||
| `view_in_counts` | `bool` | `True` | Display in-counts only on video frame |
|
||||
| `view_out_counts` | `bool` | `True` | Display out-counts only on video frame |
|
||||
| `line_thickness` | `int` | `2` | Increase bounding boxes thickness |
|
||||
| `reg_pts` | `list` | `[(20, 400), (1260, 400)]` | Points defining the Region Area |
|
||||
| `classes_names` | `dict` | `model.model.names` | Dictionary of Class Names |
|
||||
| `region_color` | `RGB Color` | `(255, 0, 255)` | Color of the Object counting Region or Line |
|
||||
| `track_thickness` | `int` | `2` | Thickness of Tracking Lines |
|
||||
| `draw_tracks` | `bool` | `False` | Enable drawing Track lines |
|
||||
| `track_color` | `RGB Color` | `(0, 255, 0)` | Color for each track line |
|
||||
| `line_dist_thresh` | `int` | `15` | Euclidean Distance threshold for line counter |
|
||||
| `count_txt_thickness` | `int` | `2` | Thickness of Object counts text |
|
||||
| `count_txt_color` | `RGB Color` | `(255, 255, 255)` | Foreground color for Object counts text |
|
||||
| `region_thickness` | `int` | `5` | Thickness for object counter region or line |
|
||||
| `fontsize` | `float` | `0.6` | Font size of counting text |
|
||||
| `line_color` | `RGB Color` | `(255, 255, 255)` | Count highlighter color |
|
||||
| `cls_txtdisplay_gap` | `int` | `50` | Display gap between each class count |
|
||||
| Name | Type | Default | Description |
|
||||
|-----------------------|-------------|----------------------------|--------------------------------------------------|
|
||||
| `view_img` | `bool` | `False` | Display frames with counts |
|
||||
| `view_in_counts` | `bool` | `True` | Display in-counts only on video frame |
|
||||
| `view_out_counts` | `bool` | `True` | Display out-counts only on video frame |
|
||||
| `line_thickness` | `int` | `2` | Increase bounding boxes and count text thickness |
|
||||
| `reg_pts` | `list` | `[(20, 400), (1260, 400)]` | Points defining the Region Area |
|
||||
| `classes_names` | `dict` | `model.model.names` | Dictionary of Class Names |
|
||||
| `count_reg_color` | `RGB Color` | `(255, 0, 255)` | Color of the Object counting Region or Line |
|
||||
| `track_thickness` | `int` | `2` | Thickness of Tracking Lines |
|
||||
| `draw_tracks` | `bool` | `False` | Enable drawing Track lines |
|
||||
| `track_color` | `RGB Color` | `(0, 255, 0)` | Color for each track line |
|
||||
| `line_dist_thresh` | `int` | `15` | Euclidean Distance threshold for line counter |
|
||||
| `count_txt_color` | `RGB Color` | `(255, 255, 255)` | Foreground color for Object counts text |
|
||||
| `region_thickness` | `int` | `5` | Thickness for object counter region or line |
|
||||
| `count_bg_color` | `RGB Color` | `(255, 255, 255)` | Count highlighter color |
|
||||
|
||||
### Arguments `model.track`
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue