Skip to content

Commit 181724e

Browse files
authored
Merge pull request #775 from roboflow/feature/supervision-0-18-0-changelog
`supervision-0.18.0` change log update
2 parents 6fa4f25 + 205b2d2 commit 181724e

File tree

3 files changed

+80
-3
lines changed

3 files changed

+80
-3
lines changed

docs/changelog.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,75 @@
1+
### 0.18.0 <small>January 25, 2024</small>
2+
3+
- Added [#633](https://github.com/roboflow/supervision/pull/720): [`sv.PercentageBarAnnotator`](https://supervision.roboflow.com/annotators/#percentagebarannotator) allowing to annotate images and videos with percentage values representing confidence or other custom property.
4+
5+
```python
6+
>>> import supervision as sv
7+
8+
>>> image = ...
9+
>>> detections = sv.Detections(...)
10+
11+
>>> percentage_bar_annotator = sv.PercentageBarAnnotator()
12+
>>> annotated_frame = percentage_bar_annotator.annotate(
13+
... scene=image.copy(),
14+
... detections=detections
15+
... )
16+
```
17+
18+
- Added [#702](https://github.com/roboflow/supervision/pull/702): [`sv.RoundBoxAnnotator`](https://supervision.roboflow.com/annotators/#roundboxannotator) allowing to annotate images and videos with rounded corners bounding boxes.
19+
20+
- Added [#770](https://github.com/roboflow/supervision/pull/770): [`sv.OrientedBoxAnnotator`](https://supervision.roboflow.com/annotators/#orientedboxannotator) allowing to annotate images and videos with OBB (Oriented Bounding Boxes).
21+
22+
```python
23+
import cv2
24+
import supervision as sv
25+
from ultralytics import YOLO
26+
27+
image = cv2.imread(<SOURCE_IMAGE_PATH>)
28+
model = YOLO("yolov8n-obb.pt")
29+
30+
result = model(image)[0]
31+
detections = sv.Detections.from_ultralytics(result)
32+
33+
oriented_box_annotator = sv.OrientedBoxAnnotator()
34+
annotated_frame = oriented_box_annotator.annotate(
35+
scene=image.copy(),
36+
detections=detections
37+
)
38+
```
39+
40+
- Added [#696](https://github.com/roboflow/supervision/pull/696): [`sv.DetectionsSmoother`](https://supervision.roboflow.com/detection/tools/smoother/#detection-smoother) allowing for smoothing detections over multiple frames in video tracking.
41+
42+
- Added [#769](https://github.com/roboflow/supervision/pull/769): [`sv.ColorPalette.from_matplotlib`](https://supervision.roboflow.com/draw/color/#supervision.draw.color.ColorPalette.from_matplotlib) allowing users to create a `sv.ColorPalette` instance from a Matplotlib color palette.
43+
44+
```python
45+
>>> import supervision as sv
46+
47+
>>> sv.ColorPalette.from_matplotlib('viridis', 5)
48+
ColorPalette(colors=[Color(r=68, g=1, b=84), Color(r=59, g=82, b=139), ...])
49+
```
50+
51+
- Changed [#770](https://github.com/roboflow/supervision/pull/770): [`sv.Detections.from_ultralytics`](https://supervision.roboflow.com/detection/core/#supervision.detection.core.Detections.from_ultralytics) adding support for OBB (Oriented Bounding Boxes).
52+
53+
- Changed [#735](https://github.com/roboflow/supervision/pull/735): [`sv.LineZone`](https://supervision.roboflow.com/detection/tools/line_zone/#linezone) to now accept a list of specific box anchors that must cross the line for a detection to be counted. This update marks a significant improvement from the previous requirement, where all four box corners were necessary. Users can now specify a single anchor, such as `sv.Position.BOTTOM_CENTER`, or any other combination of anchors defined as `List[sv.Position]`.
54+
55+
- Changed [#756](https://github.com/roboflow/supervision/pull/756): [`sv.Color`](https://supervision.roboflow.com/draw/color/#color)'s and [`sv.ColorPalette`](https://supervision.roboflow.com/draw/color/#colorpalette)'s method of accessing predefined colors, transitioning from a function-based approach (`sv.Color.red()`) to a more intuitive and conventional property-based method (`sv.Color.RED`).
56+
57+
!!! warning
58+
59+
`sv.ColorPalette.default()` is deprecated and will be removed in `supervision-0.21.0`. Use `sv.ColorPalette.DEFAULT` instead.
60+
61+
62+
- Changed [#769](https://github.com/roboflow/supervision/pull/769): [`sv.ColorPalette.DEFAULT`](https://supervision.roboflow.com/draw/color/#colorpalette) value, giving users a more extensive set of annotation colors.
63+
64+
- Changed [#677](https://github.com/roboflow/supervision/pull/677): `sv.Detections.from_roboflow` to [`sv.Detections.from_inference`](https://supervision.roboflow.com/detection/core/#supervision.detection.core.Detections.from_inference) streamlining its functionality to be compatible with both the both [inference](https://github.com/roboflow/inference) pip package and the Robloflow [hosted API](https://docs.roboflow.com/deploy/hosted-api).
65+
66+
!!! warning
67+
68+
`Detections.from_roboflow()` is deprecated and will be removed in `supervision-0.21.0`. Use `Detections.from_inference` instead.
69+
70+
71+
- Fixed [#735](https://github.com/roboflow/supervision/pull/735): [`sv.LineZone`](https://supervision.roboflow.com/detection/tools/line_zone/#linezone) functionality to accurately update the counter when an object crosses a line from any direction, including from the side. This enhancement enables more precise tracking and analytics, such as calculating individual in/out counts for each lane on the road.
72+
173
### 0.17.0 <small>December 06, 2023</small>
274

375
- Added [#633](https://github.com/roboflow/supervision/pull/633): [`sv.PixelateAnnotator`](https://supervision.roboflow.com/annotators/#supervision.annotators.core.PixelateAnnotator) allowing to pixelate objects on images and videos.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "supervision"
3-
version = "0.18.0rc4"
3+
version = "0.18.0"
44
description = "A set of easy-to-use utils that will come in handy in any Computer Vision project"
55
authors = ["Piotr Skalski <[email protected]>"]
66
maintainers = ["Piotr Skalski <[email protected]>"]

supervision/annotators/core.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,15 @@ def annotate(
135135
136136
Example:
137137
```python
138+
import cv2
138139
import supervision as sv
140+
from ultralytics import YOLO
139141
140-
image = ...
141-
detections = sv.Detections(...)
142+
image = cv2.imread(<SOURCE_IMAGE_PATH>)
143+
model = YOLO("yolov8n-obb.pt")
144+
145+
result = model(image)[0]
146+
detections = sv.Detections.from_ultralytics(result)
142147
143148
oriented_box_annotator = sv.OrientedBoxAnnotator()
144149
annotated_frame = oriented_box_annotator.annotate(

0 commit comments

Comments
 (0)