ultralytics 8.2.57 new Solutions Tests and Docs (#14408)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Muhammad Rizwan Munawar 2024-07-14 23:00:14 +05:00 committed by GitHub
parent 100a73b6e9
commit c67a3039c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 143 additions and 50 deletions

View file

@ -64,7 +64,9 @@ There are two types of instance segmentation tracking available in the Ultralyti
clss = results[0].boxes.cls.cpu().tolist()
masks = results[0].masks.xy
for mask, cls in zip(masks, clss):
annotator.seg_bbox(mask=mask, mask_color=colors(int(cls), True), det_label=names[int(cls)])
color = colors(int(cls), True)
txt_color = annotator.get_txt_color(color)
annotator.seg_bbox(mask=mask, mask_color=color, label=names[int(cls)], txt_color=txt_color)
out.write(im0)
cv2.imshow("instance-segmentation", im0)
@ -110,7 +112,9 @@ There are two types of instance segmentation tracking available in the Ultralyti
track_ids = results[0].boxes.id.int().cpu().tolist()
for mask, track_id in zip(masks, track_ids):
annotator.seg_bbox(mask=mask, mask_color=colors(track_id, True), track_label=str(track_id))
color = colors(int(track_id), True)
txt_color = annotator.get_txt_color(color)
annotator.seg_bbox(mask=mask, mask_color=color, label=str(track_id), txt_color=txt_color)
out.write(im0)
cv2.imshow("instance-segmentation-object-tracking", im0)
@ -125,12 +129,12 @@ There are two types of instance segmentation tracking available in the Ultralyti
### `seg_bbox` Arguments
| Name | Type | Default | Description |
| ------------- | ------- | --------------- | -------------------------------------- |
| `mask` | `array` | `None` | Segmentation mask coordinates |
| `mask_color` | `tuple` | `(255, 0, 255)` | Mask color for every segmented box |
| `det_label` | `str` | `None` | Label for segmented object |
| `track_label` | `str` | `None` | Label for segmented and tracked object |
| Name | Type | Default | Description |
| ------------ | ------- | --------------- | -------------------------------------------- |
| `mask` | `array` | `None` | Segmentation mask coordinates |
| `mask_color` | `RGB` | `(255, 0, 255)` | Mask color for every segmented box |
| `label` | `str` | `None` | Label for segmented object |
| `txt_color` | `RGB` | `None` | Label color for segmented and tracked object |
## Note