Supervision

Latest version: v0.21.0

Safety actively analyzes 638437 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.6.0

🚀 Added

- Initial `Dataset` support and ability to save `Detections` in Pascal VOC XML format. (https://github.com/roboflow/supervision/pull/71)
- New `mask_to_polygons`, `filter_polygons_by_area`, `polygon_to_xyxy` and `approximate_polygon` utilities. (https://github.com/roboflow/supervision/pull/71)
- Ability to load Pascal VOC XML **object detections** dataset as `Dataset`. (https://github.com/roboflow/supervision/pull/72)

🌱 Changed

- order of `Detections` attributes to make it consistent with order of objects in `__iter__` tuple. (https://github.com/roboflow/supervision/pull/70)
- `generate_2d_mask` to `polygon_to_mask`. (https://github.com/roboflow/supervision/pull/71)

🏆 Contributors

- SkalskiP
- alexandercarruthers

0.5.2

🛠️ Fixed

- Fixed `LineZone.trigger` function expects 4 values instead of 5 (https://github.com/roboflow/supervision/pull/63)

🏆 Contributors

* SkalskiP ChaseDDevelopment

0.5.1

🛠️ Fixed

- Fixed `Detections.__getitem__` method did not return mask for selected item.
- Fixed `Detections.area` crashed for mask detections.

🏆 Contributors

* SkalskiP

0.5

- Improved integration with `YOLOv5` and `YOLOv8` models.

python
import torch
import supervision as sv

model = torch.hub.load('ultralytics/yolov5', 'yolov5x6')
results = model(frame, size=1280)
detections = sv.Detections.from_yolov5(results)


python
from ultralytics import YOLO
import supervision as sv

model = YOLO('yolov8s.pt')
results = model(frame, imgsz=1280)[0]
detections = sv.Detections.from_yolov8(results)


🚀 Added

- `supervision.get_polygon_center` function - takes in a polygon as a 2-dimensional `numpy.ndarray` and returns the center of the polygon as a Point object
- `supervision.draw_polygon` function - draw a polygon on a scene
- `supervision.draw_text` function - draw a text on a scene
- `supervision.ColorPalette.default()` - class method - to generate default `ColorPalette`
- `supervision.generate_2d_mask` function - generate a 2D mask from a polygon
- `supervision.PolygonZone` class - to define polygon zones and validate if `supervision.Detections` are in the zone
- `supervision.PolygonZoneAnnotator` class - to draw `supervision.PolygonZone` on scene

🌱 Changed

- `VideoInfo` API - change the property name `resolution` -> `resolution_wh` to make it more descriptive; convert `VideoInfo` to `dataclass`
- `process_frame` API - change argument name `frame` -> `scene` to make it consistent with other classes and methods
- `LineCounter` API - rename class `LineCounter` -> `LineZone` to make it consistent with `PolygonZone`
- `LineCounterAnnotator` API - rename class `LineCounterAnnotator` -> `LineZoneAnnotator`

🏆 Contributors

* SkalskiP
* capjamesg

0.5.0

🚀 Added

- `Detections.mask` to enable segmentation support. (https://github.com/roboflow/supervision/pull/58)
- `MaskAnnotator` to allow easy `Detections.mask` annotation. (https://github.com/roboflow/supervision/pull/58)
- `Detections.from_sam` to enable native Segment Anything Model (SAM) support. (https://github.com/roboflow/supervision/pull/58)

🌱 Changed

- `Detections.area` behaviour to work not only with boxes but also with masks. (https://github.com/roboflow/supervision/pull/58)

🏆 Contributors

- SkalskiP

0.4.0

🚀 Added

- `Detections.empty` to allow easy creation of empty `Detections` objects. (https://github.com/roboflow/supervision/discussions/48)
- `Detections.from_roboflow` to allow easy creation of `Detections` objects from Roboflow API inference results. (https://github.com/roboflow/supervision/pull/56)
- `plot_images_grid` to allow easy plotting of multiple images on single plot. (https://github.com/roboflow/supervision/pull/56)
- Initial support for Pascal VOC XML format with `detections_to_voc_xml` method. (https://github.com/roboflow/supervision/pull/56)

🌱 Changed

- `show_frame_in_notebook` refactored and renamed to `plot_image`. (https://github.com/roboflow/supervision/pull/56)

🏆 Contributors

- SkalskiP

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.