Skip to content

Commit 1bddf26

Browse files
authored
Merge pull request #404 from roboflow/develop
`supervision-0.15.0` release
2 parents f82f0fa + 73ed3f5 commit 1bddf26

35 files changed

Lines changed: 1948 additions & 264 deletions

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,5 @@ jobs:
2222
python -m pip install --upgrade pip
2323
pip install -e .
2424
pip install pytest
25-
pip install isort
26-
pip install flake8
27-
pip install "black==22.3.0"
2825
- name: 🧪 Test
2926
run: "python -m pytest ./test"

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ repos:
6969

7070

7171
- repo: https://github.com/psf/black
72-
rev: 23.7.0
72+
rev: 23.9.1
7373
hooks:
7474
- id: black
7575

7676
- repo: https://github.com/astral-sh/ruff-pre-commit
77-
rev: v0.0.286
77+
rev: v0.0.292
7878
hooks:
7979
- id: ruff
8080
args: [--fix, --exit-non-zero-on-fix]

CODE_OF_CONDUCT.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
community-reports@roboflow.com.
65+
66+
All complaints will be reviewed and investigated promptly and fairly.
67+
68+
All community leaders are obligated to respect the privacy and security of the
69+
reporter of any incident.
70+
71+
## Enforcement Guidelines
72+
73+
Community leaders will follow these Community Impact Guidelines in determining
74+
the consequences for any action they deem in violation of this Code of Conduct:
75+
76+
### 1. Correction
77+
78+
**Community Impact**: Use of inappropriate language or other behavior deemed
79+
unprofessional or unwelcome in the community.
80+
81+
**Consequence**: A private, written warning from community leaders, providing
82+
clarity around the nature of the violation and an explanation of why the
83+
behavior was inappropriate. A public apology may be requested.
84+
85+
### 2. Warning
86+
87+
**Community Impact**: A violation through a single incident or series of
88+
actions.
89+
90+
**Consequence**: A warning with consequences for continued behavior. No
91+
interaction with the people involved, including unsolicited interaction with
92+
those enforcing the Code of Conduct, for a specified period of time. This
93+
includes avoiding interactions in community spaces as well as external channels
94+
like social media. Violating these terms may lead to a temporary or permanent
95+
ban.
96+
97+
### 3. Temporary Ban
98+
99+
**Community Impact**: A serious violation of community standards, including
100+
sustained inappropriate behavior.
101+
102+
**Consequence**: A temporary ban from any sort of interaction or public
103+
communication with the community for a specified period of time. No public or
104+
private interaction with the people involved, including unsolicited interaction
105+
with those enforcing the Code of Conduct, is allowed during this period.
106+
Violating these terms may lead to a permanent ban.
107+
108+
### 4. Permanent Ban
109+
110+
**Community Impact**: Demonstrating a pattern of violation of community
111+
standards, including sustained inappropriate behavior, harassment of an
112+
individual, or aggression toward or disparagement of classes of individuals.
113+
114+
**Consequence**: A permanent ban from any sort of public interaction within the
115+
community.
116+
117+
## Attribution
118+
119+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
120+
version 2.1, available at
121+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
122+
123+
Community Impact Guidelines were inspired by
124+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
128+
[https://www.contributor-covenant.org/translations][translations].
129+
130+
[homepage]: https://www.contributor-covenant.org
131+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
132+
[Mozilla CoC]: https://github.com/mozilla/diversity
133+
[FAQ]: https://www.contributor-covenant.org/faq
134+
[translations]: https://www.contributor-covenant.org/translations

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -273,19 +273,13 @@ array([
273273

274274
</details>
275275

276-
## 🛠️ built with supervision
277-
278-
Did you build something cool using supervision? [Let us know!](https://github.com/roboflow/supervision/discussions/categories/built-with-supervision)
279-
280-
https://user-images.githubusercontent.com/26109316/207858600-ee862b22-0353-440b-ad85-caa0c4777904.mp4
281-
282276
## 🎬 tutorials
283277

284278
<p align="left">
285-
<a href="https://youtu.be/oEQYStnF2l8" title="Accelerate Image Annotation with SAM and Grounding DINO"><img src="https://github.com/SkalskiP/SkalskiP/assets/26109316/ae1ca38e-40b7-4b35-8582-e8ea5de3806e" alt="Accelerate Image Annotation with SAM and Grounding DINO" width="300px" align="left" /></a>
286-
<a href="https://youtu.be/oEQYStnF2l8" title="Accelerate Image Annotation with SAM and Grounding DINO"><strong>Accelerate Image Annotation with SAM and Grounding DINO</strong></a>
287-
<div><strong>Created: 20 Apr 2023</strong> | <strong>Updated: 20 Apr 2023</strong></div>
288-
<br/> Discover how to speed up your image annotation process using Grounding DINO and Segment Anything Model (SAM). Learn how to convert object detection datasets into instance segmentation datasets, and see the potential of using these models to automatically annotate your datasets for real-time detectors like YOLOv8... </p>
279+
<a href="https://youtu.be/4Q3ut7vqD5o" title="Traffic Analysis with YOLOv8 and ByteTrack - Vehicle Detection and Tracking"><img src="https://github.com/roboflow/supervision/assets/26109316/54afdf1c-218c-4451-8f12-627fb85f1682" alt="Traffic Analysis with YOLOv8 and ByteTrack - Vehicle Detection and Tracking" width="300px" align="left" /></a>
280+
<a href="https://youtu.be/4Q3ut7vqD5o" title="Traffic Analysis with YOLOv8 and ByteTrack - Vehicle Detection and Tracking"><strong>Traffic Analysis with YOLOv8 and ByteTrack - Vehicle Detection and Tracking</strong></a>
281+
<div><strong>Created: 6 Sep 2023</strong> | <strong>Updated: 6 Sep 2023</strong></div>
282+
<br/> In this video, we explore real-time traffic analysis using YOLOv8 and ByteTrack to detect and track vehicles on aerial images. Harnessing the power of Python and Supervision, we delve deep into assigning cars to specific entry zones and understanding their direction of movement. By visualizing their paths, we gain insights into traffic flow across bustling roundabouts... </p>
289283

290284
<br/>
291285

@@ -295,6 +289,14 @@ https://user-images.githubusercontent.com/26109316/207858600-ee862b22-0353-440b-
295289
<div><strong>Created: 11 Apr 2023</strong> | <strong>Updated: 11 Apr 2023</strong></div>
296290
<br/> Discover the incredible potential of Meta AI's Segment Anything Model (SAM)! We dive into SAM, an efficient and promptable model for image segmentation, which has revolutionized computer vision tasks. With over 1 billion masks on 11M licensed and privacy-respecting images, SAM's zero-shot performance is often competitive with or even superior to prior fully supervised results... </p>
297291

292+
## 💜 built with supervision
293+
294+
Did you build something cool using supervision? [Let us know!](https://github.com/roboflow/supervision/discussions/categories/built-with-supervision)
295+
296+
https://user-images.githubusercontent.com/26109316/207858600-ee862b22-0353-440b-ad85-caa0c4777904.mp4
297+
298+
https://github.com/roboflow/supervision/assets/26109316/c9436828-9fbf-4c25-ae8c-60e9c81b3900
299+
298300
## 📚 documentation
299301

300302
Visit our [documentation](https://roboflow.github.io/supervision) page to learn how supervision can help you build computer vision applications faster and more reliably.

docs/annotators.md

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
=== "BoundingBox"
2+
3+
```python
4+
>>> import supervision as sv
5+
6+
>>> image = ...
7+
>>> detections = sv.Detections(...)
8+
9+
>>> bounding_box_annotator = sv.BoundingBoxAnnotator()
10+
>>> annotated_frame = bounding_box_annotator.annotate(
11+
... scene=image.copy(),
12+
... detections=detections
13+
... )
14+
```
15+
16+
<div class="result" markdown>
17+
18+
![bounding-box-annotator-example](https://media.roboflow.com/supervision-annotator-examples/bounding-box-annotator-example.png){ align=center width="800" }
19+
20+
</div>
21+
22+
=== "Mask"
23+
24+
```python
25+
>>> import supervision as sv
26+
27+
>>> image = ...
28+
>>> detections = sv.Detections(...)
29+
30+
>>> mask_annotator = sv.MaskAnnotator()
31+
>>> annotated_frame = mask_annotator.annotate(
32+
... scene=image.copy(),
33+
... detections=detections
34+
... )
35+
```
36+
37+
<div class="result" markdown>
38+
39+
![mask-annotator-example](https://media.roboflow.com/supervision-annotator-examples/mask-annotator-example.png){ align=center width="800" }
40+
41+
</div>
42+
43+
=== "Ellipse"
44+
45+
```python
46+
>>> import supervision as sv
47+
48+
>>> image = ...
49+
>>> detections = sv.Detections(...)
50+
51+
>>> ellipse_annotator = sv.EllipseAnnotator()
52+
>>> annotated_frame = ellipse_annotator.annotate(
53+
... scene=image.copy(),
54+
... detections=detections
55+
... )
56+
```
57+
58+
<div class="result" markdown>
59+
60+
![ellipse-annotator-example](https://media.roboflow.com/supervision-annotator-examples/ellipse-annotator-example.png){ align=center width="800" }
61+
62+
</div>
63+
64+
=== "BoxCorner"
65+
66+
```python
67+
>>> import supervision as sv
68+
69+
>>> image = ...
70+
>>> detections = sv.Detections(...)
71+
72+
>>> corner_annotator = sv.BoxCornerAnnotator()
73+
>>> annotated_frame = corner_annotator.annotate(
74+
... scene=image.copy(),
75+
... detections=detections
76+
... )
77+
```
78+
79+
<div class="result" markdown>
80+
81+
![box-corner-annotator-example](https://media.roboflow.com/supervision-annotator-examples/box-corner-annotator-example.png){ align=center width="800" }
82+
83+
</div>
84+
85+
=== "Circle"
86+
87+
```python
88+
>>> import supervision as sv
89+
90+
>>> image = ...
91+
>>> detections = sv.Detections(...)
92+
93+
>>> circle_annotator = sv.CircleAnnotator()
94+
>>> annotated_frame = circle_annotator.annotate(
95+
... scene=image.copy(),
96+
... detections=detections
97+
... )
98+
```
99+
100+
<div class="result" markdown>
101+
102+
![circle-annotator-example](https://media.roboflow.com/supervision-annotator-examples/circle-annotator-example.png){ align=center width="800" }
103+
104+
</div>
105+
106+
=== "Label"
107+
108+
```python
109+
>>> import supervision as sv
110+
111+
>>> image = ...
112+
>>> detections = sv.Detections(...)
113+
114+
>>> label_annotator = sv.LabelAnnotator(text_position=sv.Position.CENTER)
115+
>>> annotated_frame = label_annotator.annotate(
116+
... scene=image.copy(),
117+
... detections=detections
118+
... )
119+
```
120+
121+
<div class="result" markdown>
122+
123+
![label-annotator-example](https://media.roboflow.com/supervision-annotator-examples/label-annotator-example-2.png){ align=center width="800" }
124+
125+
</div>
126+
127+
=== "Blur"
128+
129+
```python
130+
>>> import supervision as sv
131+
132+
>>> image = ...
133+
>>> detections = sv.Detections(...)
134+
135+
>>> blur_annotator = sv.BlurAnnotator()
136+
>>> annotated_frame = blur_annotator.annotate(
137+
... scene=image.copy(),
138+
... detections=detections
139+
... )
140+
```
141+
142+
<div class="result" markdown>
143+
144+
![blur-annotator-example](https://media.roboflow.com/supervision-annotator-examples/blur-annotator-example-2.png){ align=center width="800" }
145+
146+
</div>
147+
148+
=== "Trace"
149+
150+
```python
151+
>>> import supervision as sv
152+
153+
>>> image = ...
154+
>>> detections = sv.Detections(...)
155+
156+
>>> trace_annotator = sv.TraceAnnotator()
157+
>>> annotated_frame = trace_annotator.annotate(
158+
... scene=image.copy(),
159+
... detections=detections
160+
... )
161+
```
162+
163+
<div class="result" markdown>
164+
165+
![trace-annotator-example](https://media.roboflow.com/supervision-annotator-examples/trace-annotator-example.png){ align=center width="800" }
166+
167+
</div>
168+
169+
## BoundingBoxAnnotator
170+
171+
:::supervision.annotators.core.BoundingBoxAnnotator
172+
173+
## MaskAnnotator
174+
175+
:::supervision.annotators.core.MaskAnnotator
176+
177+
## EllipseAnnotator
178+
179+
:::supervision.annotators.core.EllipseAnnotator
180+
181+
## BoxCornerAnnotator
182+
183+
:::supervision.annotators.core.BoxCornerAnnotator
184+
185+
## CircleAnnotator
186+
187+
:::supervision.annotators.core.CircleAnnotator
188+
189+
## LabelAnnotator
190+
191+
:::supervision.annotators.core.LabelAnnotator
192+
193+
## TraceAnnotator
194+
195+
:::supervision.annotators.core.TraceAnnotator
196+
197+
## BlurAnnotator
198+
199+
:::supervision.annotators.core.BlurAnnotator

0 commit comments

Comments
 (0)