Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 83 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@

**We write your reusable computer vision tools.** Whether you need to load your dataset from your hard drive, draw detections on an image or video, or count how many detections are in a zone. You can count on us! 🤝

## 🌟 Key Features
- 🚀 **Model Agnostic**: Connectors for Ultralytics YOLO, Transformers, MMDetection, Roboflow Inference & more ([docs](https://supervision.roboflow.com/latest/detection/core/#detections))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's alweays put Roboflow Inference as #1 when we list frameworks and libraries like this.

- 🎨 **25+ Annotators**: Box, Label, Mask, Trace, HeatMap, Icon, Blur, Pixelate, Halo & many others ([docs](https://supervision.roboflow.com/latest/detection/annotators/))
- 🏃‍♂️ **Object Tracking**: ByteTracker & more for multi-object tracking ([docs](https://supervision.roboflow.com/latest/trackers/byte_tracker/))
- 📏 **Line & Polygon Zones**: Count/filter objects crossing lines or in polygons
- 📊 **Metrics**: mAP, Precision, Recall, F1 Score ([docs](https://supervision.roboflow.com/latest/metrics/mean_average_precision/))
- 🗂️ **Datasets**: Load, split, convert (COCO, YOLO, Pascal VOC, etc.) ([docs](https://supervision.roboflow.com/latest/datasets/core/))
- 🔧 **Utils**: NMS/IoU filters, geometry primitives, drawing helpers

## 🚀 Why Supervision?
- ⏱️ **Accelerate Development**: Ready-to-use utilities for annotations, tracking, zones, metrics – skip boilerplate code.
- 🤖 **Model Agnostic**: Integrates seamlessly with YOLO, Transformers, MMDetection, Roboflow Inference & more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's alweays put Roboflow Inference as #1 when we list frameworks and libraries like this.

- ⚡ **Lightweight**: Minimal deps (numpy, opencv), no ML frameworks needed, optimized for speed.
- 🏗️ **Production-Ready**: Robust, battle-tested tools used in Roboflow products.
- 📚 **Rich Ecosystem**: 25+ annotators, full docs, tutorials, notebooks, active Discord ([join here](https://discord.gg/GbfgXGJ8Bk)).
Comment on lines +37 to +51

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels very AI generated. Let's remove all the emojis other than ones in headers. All headers were lower case, so lets keep things consistant.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put all emojis there on purpose; it makes the reading nicer
but fine to make it boring text again :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is fine to write it just once


## 💻 install

Pip install the supervision package in a
Expand Down Expand Up @@ -220,25 +236,74 @@ for path, image, annotation in ds:

</details>

### 🏃‍♂️ tracking
Track objects across frames with state-of-the-art trackers like ByteTrack.

```python
import supervision as sv

byte_tracker = sv.ByteTracker()
tracks = byte_tracker.update_with_detections(detections=detections)
```
Use `sv.IdAnnotator()` to visualize track `id`.

### 📏 line zone
Count objects crossing a line.

```python
line_zone = sv.LineZone(start=sv.Point(0, 0), end=sv.Point(640, 640))
line_zone_annotator = sv.LineZoneAnnotator()

line_zone.trigger(detections=detections)
annotated_frame = line_zone_annotator.annotate(scene=image, line_counter=line_zone)
```
Comment on lines +239 to +259

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking is still here, but with next release of trackers that will add ByteTracker, we plan to deprecate ByteTracker from supervision.


### 🔶 polygon zone

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not go to hard on emojis + keep things consistant ### headers don't have emojis

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is fine to write it just once

Count/filter objects in polygon zone.

```python
import numpy as np
polygon = np.array([
[0, 0],
[100, 0],
[100, 100],
[0, 100]
])
polygon_zone = sv.PolygonZone(polygon=polygon)
polygon_zone_annotator = sv.PolygonZoneAnnotator()

polygon_zone.trigger(detections=detections)
annotated_frame = polygon_zone_annotator.annotate(scene=image, polygon_zone=polygon_zone)
```

### 📊 metrics

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not go to hard on emojis + keep things consistant ### headers don't have emojis

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is fine to write it just once

Evaluate detection performance (mAP, etc.).

```python
from supervision.metrics import MeanAveragePrecision

metric = MeanAveragePrecision(class_names=["class1", "class2"])
metric.update(predictions=predictions, ground_truths=ground_truths)
print(metric.result())
```

## 🎬 tutorials

Want to learn how to use Supervision? Explore our [how-to guides](https://supervision.roboflow.com/develop/how_to/detect_and_annotate/), [end-to-end examples](https://github.com/roboflow/supervision/tree/develop/examples), [cheatsheet](https://roboflow.github.io/cheatsheet-supervision/), and [cookbooks](https://supervision.roboflow.com/develop/cookbooks/)!

<br/>

<p align="left">
<div>
<a href="https://youtu.be/hAWpsIuem10" title="Dwell Time Analysis with Computer Vision | Real-Time Stream Processing"><img src="https://github.com/SkalskiP/SkalskiP/assets/26109316/a742823d-c158-407d-b30f-063a5d11b4e1" alt="Dwell Time Analysis with Computer Vision | Real-Time Stream Processing" width="300px" align="left" /></a>
<a href="https://youtu.be/hAWpsIuem10" title="Dwell Time Analysis with Computer Vision | Real-Time Stream Processing"><strong>Dwell Time Analysis with Computer Vision | Real-Time Stream Processing</strong></a>
<div><strong>Created: 5 Apr 2024</strong></div>
<br/>Learn how to use computer vision to analyze wait times and optimize processes. This tutorial covers object detection, tracking, and calculating time spent in designated zones. Use these techniques to improve customer experience in retail, traffic management, or other scenarios.</p>

<br/>
<br>
Learn how to use computer vision to analyze wait times and optimize processes. This tutorial covers object detection, tracking, and calculating time spent in designated zones. Use these techniques to improve customer experience in retail, traffic management, or other scenarios.
</div>

<p align="left">
<div>
<a href="https://youtu.be/uWP6UjDeZvY" title="Speed Estimation & Vehicle Tracking | Computer Vision | Open Source"><img src="https://github.com/SkalskiP/SkalskiP/assets/26109316/61a444c8-b135-48ce-b979-2a5ab47c5a91" alt="Speed Estimation & Vehicle Tracking | Computer Vision | Open Source" width="300px" align="left" /></a>
<a href="https://youtu.be/uWP6UjDeZvY" title="Speed Estimation & Vehicle Tracking | Computer Vision | Open Source"><strong>Speed Estimation & Vehicle Tracking | Computer Vision | Open Source</strong></a>
<div><strong>Created: 11 Jan 2024</strong></div>
<br/>Learn how to track and estimate the speed of vehicles using YOLO, ByteTrack, and Roboflow Inference. This comprehensive tutorial covers object detection, multi-object tracking, filtering detections, perspective transformation, speed estimation, visualization improvements, and more.</p>
<br>
Learn how to track and estimate the speed of vehicles using YOLO, ByteTrack, and Roboflow Inference. This comprehensive tutorial covers object detection, multi-object tracking, filtering detections, perspective transformation, speed estimation, visualization improvements, and more.
</div>

## 💜 built with supervision

Expand Down Expand Up @@ -270,45 +335,28 @@ We love your input! Please see our [contributing guide](https://github.com/robof

<div align="center">
<a href="https://youtube.com/roboflow">
<img
src="https://media.roboflow.com/notebooks/template/icons/purple/youtube.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949634652"
width="3%"
/>
<img src="https://media.roboflow.com/notebooks/template/icons/purple/youtube.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949634652" width="3%" />
</a>
<img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
<a href="https://roboflow.com">
<img
src="https://media.roboflow.com/notebooks/template/icons/purple/roboflow-app.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949746649"
width="3%"
/>
<img src="https://media.roboflow.com/notebooks/template/icons/purple/roboflow-app.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949746649" width="3%" />
</a>
<img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
<a href="https://www.linkedin.com/company/roboflow-ai/">
<img
src="https://media.roboflow.com/notebooks/template/icons/purple/linkedin.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633691"
width="3%"
/>
<img src="https://media.roboflow.com/notebooks/template/icons/purple/linkedin.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633691" width="3%" />
</a>
<img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
<a href="https://docs.roboflow.com">
<img
src="https://media.roboflow.com/notebooks/template/icons/purple/knowledge.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949634511"
width="3%"
/>
<img src="https://media.roboflow.com/notebooks/template/icons/purple/knowledge.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949634511" width="3%" />
</a>
<img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
<a href="https://discuss.roboflow.com">
<img
src="https://media.roboflow.com/notebooks/template/icons/purple/forum.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633584"
width="3%"
/>
<img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
<img src="https://media.roboflow.com/notebooks/template/icons/purple/forum.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633584" width="3%" />
<img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%"/>
</a>
Comment thread
Borda marked this conversation as resolved.
<a href="https://blog.roboflow.com">
<img
src="https://media.roboflow.com/notebooks/template/icons/purple/blog.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633605"
width="3%"
/>
</a>
src="https://media.roboflow.com/notebooks/template/icons/purple/blog.png?ik-sdk-version=javascript-1.4.3&updatedAt=1672949633605" width="3%" />
</a>
</div>
</div>