Skip to content

Commit

Permalink
supervision-0.13.0 release
Browse files Browse the repository at this point in the history
`supervision-0.13.0` release
  • Loading branch information
SkalskiP committed Aug 8, 2023
2 parents 800e39d + d866236 commit 4f79d29
Show file tree
Hide file tree
Showing 26 changed files with 1,784 additions and 177 deletions.
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ Before you contribute a new feature, consider submitting an Issue to discuss the

## How to Contribute Changes

First, fork this repository to your own GitHub account. Create a new branch that describes your changes (i.e. `line-counter-docs`). Push your changes to the branch on your fork and then submit a pull request to this repository.
First, fork this repository to your own GitHub account. Create a new branch that describes your changes (i.e. `line-counter-docs`). Push your changes to the branch on your fork and then submit a pull request to `develop` branch of this repository.

When creating new functions, please ensure you have the following:

1. Docstrings for the function and all parameters.
2. Unit tests for the function.
3. Examples in the documentation for the function.
4. Created an entry in our docs to autogenerate the documentation for the function.
5. Please share google colab with minimal code to test new feature or reproduce PR whenever it is possible. Please ensure that google colab can be accessed without any issue.

All pull requests will be reviewed by the maintainers of the project. We will provide feedback and ask for changes if necessary.

Expand All @@ -48,4 +49,4 @@ So far, **there is no types checking with mypy**. See [issue](https://github.com

## 🧪 tests

[`pytests`](https://docs.pytest.org/en/7.1.x/) is used to run our tests.
[`pytests`](https://docs.pytest.org/en/7.1.x/) is used to run our tests.
40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Pip install the supervision package in a
pip install supervision[desktop]
```

Read more about desktop, headless and local installation in our [guide](https://roboflow.github.io/supervision/).
Read more about desktop, headless, and local installation in our [guide](https://roboflow.github.io/supervision/).

## 🔥 quickstart

Expand All @@ -52,7 +52,7 @@ Read more about desktop, headless and local installation in our [guide](https://
<details close>
<summary>👉 more detections utils</summary>

- Easily switch inference pipeline between supported object detection / instance segmentation models
- Easily switch inference pipeline between supported object detection/instance segmentation models

```python
>>> import supervision as sv
Expand Down Expand Up @@ -107,7 +107,7 @@ Read more about desktop, headless and local installation in our [guide](https://
<details close>
<summary>👉 more dataset utils</summary>

- Load object detection / instance segmentation datasets in one of supported formats
- Load object detection/instance segmentation datasets in one of the supported formats

```python
>>> dataset = sv.DetectionDataset.from_yolo(
Expand Down Expand Up @@ -138,7 +138,7 @@ Read more about desktop, headless and local installation in our [guide](https://
[ 20.154999, 347.825 , 416.125 , 915.895 ]], dtype=float32)
```

- Split dataset for training, testing and validation
- Split dataset for training, testing, and validation

```python
>>> train_dataset, test_dataset = dataset.split(split_ratio=0.7)
Expand All @@ -148,7 +148,7 @@ Read more about desktop, headless and local installation in our [guide](https://
(700, 150, 150)
```

- Merge multiple datasets together
- Merge multiple datasets

```python
>>> ds_1 = sv.DetectionDataset(...)
Expand All @@ -170,7 +170,7 @@ Read more about desktop, headless and local installation in our [guide](https://
['cat', 'dog', 'person']
```

- Save object detection / instance segmentation datasets in one of supported formats
- Save object detection/instance segmentation datasets in one of the supported formats

```python
>>> dataset.as_yolo(
Expand Down Expand Up @@ -203,15 +203,15 @@ Read more about desktop, headless and local installation in our [guide](https://
... )
```

- Load classification datasets in one of supported formats
- Load classification datasets in one of the supported formats

```python
>>> cs = sv.ClassificationDataset.from_folder_structure(
... root_directory_path='...'
... )
```

- Save classification datasets in one of supported formats
- Save classification datasets in one of the supported formats

```python
>>> cs.as_folder_structure(
Expand Down Expand Up @@ -245,6 +245,30 @@ array([
])
```

<details close>
<summary>👉 more metrics</summary>

- Mean average precision (mAP) for object detection tasks.

```python
>>> import supervision as sv

>>> dataset = sv.DetectionDataset.from_yolo(...)

>>> def callback(image: np.ndarray) -> sv.Detections:
... ...

>>> mean_average_precision = sv.MeanAveragePrecision.benchmark(
... dataset = dataset,
... callback = callback
... )

>>> mean_average_precision.map50_95
0.433
```

</details>

## 🎬 tutorials

<p align="left">
Expand Down
36 changes: 36 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
### 0.13.0 <small>August 8, 2023</small>

- Added [#236](https://github.com/roboflow/supervision/pull/236): support for mean average precision (mAP) for object detection models with [`sv.MeanAveragePrecision`](https://roboflow.github.io/supervision/metrics/detection/#meanaverageprecision).

```python
>>> import supervision as sv
>>> from ultralytics import YOLO

>>> dataset = sv.DetectionDataset.from_yolo(...)

>>> model = YOLO(...)
>>> def callback(image: np.ndarray) -> sv.Detections:
... result = model(image)[0]
... return sv.Detections.from_yolov8(result)

>>> mean_average_precision = sv.MeanAveragePrecision.benchmark(
... dataset = dataset,
... callback = callback
... )

>>> mean_average_precision.map50_95
0.433
```

- Added [#256](https://github.com/roboflow/supervision/pull/256): support for ByteTrack for object tracking with [`sv.ByteTrack`](https://roboflow.github.io/supervision/tracker/core/#bytetrack).

- Added [#222](https://github.com/roboflow/supervision/pull/222): [`sv.Detections.from_ultralytics`](https://roboflow.github.io/supervision/detection/core/#supervision.detection.core.Detections.from_ultralytics) to enable seamless integration with [Ultralytics](https://github.com/ultralytics/ultralytics) framework. This will enable you to use `supervision` with all [models](https://docs.ultralytics.com/models/) that Ultralytics supports.

!!! warning

[`sv.Detections.from_yolov8`](https://roboflow.github.io/supervision/detection/core/#supervision.detection.core.Detections.from_yolov8) is now deprecated and will be removed with `supervision-0.15.0` release.

- Added [#191](https://github.com/roboflow/supervision/pull/191): [`sv.Detections.from_paddledet`](https://roboflow.github.io/supervision/detection/core/#supervision.detection.core.Detections.from_paddledet) to enable seamless integration with [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection) framework.

- Added [#245](https://github.com/roboflow/supervision/pull/245): support for loading PASCAL VOC segmentation datasets with [`sv.DetectionDataset.`](https://roboflow.github.io/supervision/dataset/core/#supervision.dataset.core.DetectionDataset.from_pascal_voc).

### 0.12.0 <small>July 24, 2023</small>

!!! warning
Expand Down
4 changes: 4 additions & 0 deletions docs/metrics/detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
## ConfusionMatrix

:::supervision.metrics.detection.ConfusionMatrix

## MeanAveragePrecision

:::supervision.metrics.detection.MeanAveragePrecision
4 changes: 4 additions & 0 deletions docs/tracker/core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## ByteTrack

:::supervision.tracker.byte_tracker.core.ByteTrack

2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ nav:
- Utils: detection/utils.md
- Tools:
- Polygon Zone: detection/tools/polygon_zone.md
- Trackers:
- Core: tracker/core.md
- Dataset:
- Core: dataset/core.md
- Metrics:
Expand Down

0 comments on commit 4f79d29

Please sign in to comment.