|
1 | | -### 0.9.0 <small>June 7, 2023</small> |
| 1 | +### 0.10.0 <small>June 14, 2023</small> |
2 | 2 |
|
3 | | -- Added [[#118](https://github.com/roboflow/supervision/pull/118)]: ability to select [`sv.Detections`](https://roboflow.github.io/supervision/detection/core/#supervision.detection.core.Detections.__getitem__) by index, list of indexes or slice. Here is an example illustrating the new selection methods. |
| 3 | +- Added [[#125](https://github.com/roboflow/supervision/pull/125)]: ability to load and save [`sv.ClassificationDataset`](https://roboflow.github.io/supervision/dataset/core/#classificationdataset) in a folder structure format. |
4 | 4 |
|
5 | 5 | ```python |
6 | 6 | >>> import supervision as sv |
7 | 7 |
|
8 | | ->>> detections = sv.Detections(...) |
9 | | ->>> len(detections[0]) |
10 | | -1 |
11 | | ->>> len(detections[[0, 1]]) |
12 | | -2 |
13 | | ->>> len(detections[0:2]) |
14 | | -2 |
| 8 | +>>> cs = sv.ClassificationDataset.from_folder_structure( |
| 9 | +... root_directory_path='...' |
| 10 | +... ) |
| 11 | + |
| 12 | +>>> cs.as_folder_structure( |
| 13 | +... root_directory_path='...' |
| 14 | +... ) |
15 | 15 | ``` |
16 | 16 |
|
17 | | -- Added [[#101](https://github.com/roboflow/supervision/pull/101)]: ability to extract masks from YOLOv8 result using [`sv.Detections.from_yolov8`](https://roboflow.github.io/supervision/detection/core/#supervision.detection.core.Detections.from_yolov8). Here is an example illustrating how to extract boolean masks from the result of the YOLOv8 model inference. |
| 17 | +- Added [[#125](https://github.com/roboflow/supervision/pull/125)]: support for [`sv.ClassificationDataset.split`](https://roboflow.github.io/supervision/dataset/core/#supervision.dataset.core.ClassificationDataset.split) allowing to divide `sv.ClassificationDataset` into two parts. |
18 | 18 |
|
19 | | -```python |
20 | | ->>> import cv2 |
21 | | ->>> from ultralytics import YOLO |
22 | | ->>> import supervision as sv |
| 19 | +- Added [[#110](https://github.com/roboflow/supervision/pull/110)]: ability to extract masks from Roboflow API results using [`sv.Detections.from_roboflow`](https://roboflow.github.io/supervision/detection/core/#supervision.detection.core.Detections.from_roboflow). |
23 | 20 |
|
24 | | ->>> image = cv2.imread(...) |
25 | | ->>> image.shape |
26 | | -(640, 640, 3) |
| 21 | +- Added [[commit hash](https://github.com/roboflow/supervision/commit/d000292eb2f2342544e0947b65528082e60fb8d6)]: Supervision Quickstart [notebook](https://colab.research.google.com/github/roboflow/supervision/blob/main/demo.ipynb) where you can learn more about Detection, Dataset and Video APIs. |
27 | 22 |
|
28 | | ->>> model = YOLO('yolov8s-seg.pt') |
29 | | ->>> result = model(image)[0] |
30 | | ->>> detections = sv.Detections.from_yolov8(result) |
31 | | ->>> detections.mask.shape |
32 | | -(2, 640, 640) |
33 | | -``` |
| 23 | +- Changed [[#135](https://github.com/roboflow/supervision/pull/135)]: `sv.get_video_frames_generator` documentation to better describe actual behavior. |
34 | 24 |
|
35 | | -- Added [[#122](https://github.com/roboflow/supervision/pull/122)]: ability to crop image using [`sv.crop`](https://roboflow.github.io/supervision/utils/image/#crop). Here is an example showing how to get a separate crop for each detection in `sv.Detections`. |
| 25 | +### 0.9.0 <small>June 7, 2023</small> |
| 26 | + |
| 27 | +- Added [[#118](https://github.com/roboflow/supervision/pull/118)]: ability to select [`sv.Detections`](https://roboflow.github.io/supervision/detection/core/#supervision.detection.core.Detections.__getitem__) by index, list of indexes or slice. Here is an example illustrating the new selection methods. |
36 | 28 |
|
37 | 29 | ```python |
38 | | ->>> import cv2 |
39 | 30 | >>> import supervision as sv |
40 | 31 |
|
41 | | ->>> image = cv2.imread(...) |
42 | 32 | >>> detections = sv.Detections(...) |
43 | | ->>> len(detections) |
| 33 | +>>> len(detections[0]) |
| 34 | +1 |
| 35 | +>>> len(detections[[0, 1]]) |
44 | 36 | 2 |
45 | | ->>> crops = [ |
46 | | -... sv.crop(image=image, xyxy=xyxy) |
47 | | -... for xyxy |
48 | | -... in detections.xyxy |
49 | | -... ] |
50 | | ->>> len(crops) |
| 37 | +>>> len(detections[0:2]) |
51 | 38 | 2 |
52 | 39 | ``` |
53 | 40 |
|
| 41 | +- Added [[#101](https://github.com/roboflow/supervision/pull/101)]: ability to extract masks from YOLOv8 result using [`sv.Detections.from_yolov8`](https://roboflow.github.io/supervision/detection/core/#supervision.detection.core.Detections.from_yolov8). Here is an example illustrating how to extract boolean masks from the result of the YOLOv8 model inference. |
| 42 | + |
| 43 | +- Added [[#122](https://github.com/roboflow/supervision/pull/122)]: ability to crop image using [`sv.crop`](https://roboflow.github.io/supervision/utils/image/#crop). Here is an example showing how to get a separate crop for each detection in `sv.Detections`. |
| 44 | + |
54 | 45 | - Added [[#120](https://github.com/roboflow/supervision/pull/120)]: ability to conveniently save multiple images into directory using [`sv.ImageSink`](https://roboflow.github.io/supervision/utils/image/#imagesink). Here is an example showing how to save every tenth video frame as a separate image. |
55 | 46 |
|
56 | 47 | ```python |
|
0 commit comments