Merge branch 'develop' into add-center-point-crossed-condition-to-line-counter

This commit is contained in:
Piotr Skalski authored and GitHub committed 2024-01-18 17:06:01 +01:00
commit cda5016a5a
33 files changed
+188 -10

No files matched your search

+1 -1
View File
@@ -237,7 +237,7 @@ https://user-images.githubusercontent.com/26109316/207858600-ee862b22-0353-440b-
https://github.com/roboflow/supervision/assets/26109316/c9436828-9fbf-4c25-ae8c-60e9c81b3900
https://github.com/roboflow/supervision/assets/26109316/f84db7b5-79e2-4142-a1da-64daa43ce667
https://github.com/roboflow/supervision/assets/26109316/3ac6982f-4943-4108-9b7f-51787ef1a69f
## 📚 documentation
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
=== "BoundingBox"
```python
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
Supervision offers an assets download utility that allows you to download video files
that you can use in your demos.
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## Classifications
:::supervision.classification.core.Classifications
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
!!! warning
Dataset API is still fluid and may change. If you use Dataset API in your project until further notice, freeze the
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## Detections
:::supervision.detection.core.Detections
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## InferenceSlicer
:::supervision.detection.tools.inference_slicer.InferenceSlicer
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## LineZone
:::supervision.detection.line_counter.LineZone
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## PolygonZone
:::supervision.detection.tools.polygon_zone.PolygonZone
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## box_iou_batch
:::supervision.detection.utils.box_iou_batch
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## Color
:::supervision.draw.color.Color
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## draw_line
:::supervision.draw.utils.draw_line
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## Position
:::supervision.geometry.core.Position
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
Supervision offers a streamlined solution to effortlessly annotate predictions from a
range of object detection and segmentation models. This guide demonstrates how to
execute inference using the YOLOv8 model with either the
+4
View File
@@ -1 +1,5 @@
---
comments: true
---
🚧 Page under construction.
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
The advanced filtering capabilities of the `Detections` class offer users a versatile and efficient way to narrow down
and refine object detections. This section outlines various filtering methods, including filtering by specific class
or a set of classes, confidence, object area, bounding box area, relative area, box dimensions, and designated zones.
+4
View File
@@ -1 +1,5 @@
---
comments: true
---
🚧 Page under construction.
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
Leverage Supervision's advanced capabilities for enhancing your video analysis by
seamlessly [tracking](https://supervision.roboflow.com/trackers/) objects recognized by
a multitude of object detection and segmentation models. This comprehensive guide will
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
<div align="center">
<p>
<a align="center" href="" target="_blank">
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
!!! warning
Evaluation API is still fluid and may change. If you use Evaluation API in your project until further notice, freeze the
+51
View File
@@ -0,0 +1,51 @@
{% if page.meta.comments %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<!-- Insert Giscus code snippet from https://giscus.app/ here -->
<script src="https://giscus.app/client.js"
data-repo="roboflow/supervision"
data-repo-id="R_kgDOIhIiww"
data-category="Docs"
data-category-id="DIC_kwDOIhIiw84Ccet_"
data-mapping="pathname"
data-strict="0"
data-reactions-enabled="1"
data-emit-metadata="1"
data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="en"
data-loading="lazy"
crossorigin="anonymous"
async>
</script>
<!-- Synchronize Giscus theme with palette -->
<script>
var giscus = document.querySelector("script[src*=giscus]")
/* Set palette on initial load */
var palette = __md_get("__palette")
if (palette && typeof palette.color === "object") {
var theme = palette.color.scheme === "slate" ? "dark" : "light"
giscus.setAttribute("data-theme", theme)
}
/* Register event handlers after documented loaded */
document.addEventListener("DOMContentLoaded", function() {
var ref = document.querySelector("[data-md-component=palette]")
ref.addEventListener("change", function() {
var palette = __md_get("__palette")
if (palette && typeof palette.color === "object") {
var theme = palette.color.scheme === "slate" ? "dark" : "light"
/* Instruct Giscus to change theme */
var frame = document.querySelector(".giscus-frame")
frame.contentWindow.postMessage(
{ giscus: { setConfig: { theme } } },
"https://giscus.app"
)
}
})
})
</script>
{% endif %}
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## ByteTrack
:::supervision.tracker.byte_tracker.core.ByteTrack
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## list_files_with_extensions
:::supervision.utils.file.list_files_with_extensions
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## ImageSink
:::supervision.utils.image.ImageSink
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## plot_image
:::supervision.utils.notebook.plot_image
+4
View File
@@ -1,3 +1,7 @@
---
comments: true
---
## VideoInfo
:::supervision.utils.video.VideoInfo
+8
View File
@@ -3,3 +3,11 @@ data/*
# But re-include all .json files
!data/*.json
*.pt
*.pth
*.mp4
*.mov
*.png
*.jpg
*.jpeg
+7
View File
@@ -1,2 +1,9 @@
data/
venv*/
*.pt
*.pth
*.mp4
*.mov
*.png
*.jpg
*.jpeg
+10 -4
View File
@@ -1,18 +1,24 @@
# speed estimation
[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-estimate-vehicle-speed-with-computer-vision.ipynb)
[![YouTube](https://badges.aleen42.com/src/youtube.svg)](https://youtu.be/uWP6UjDeZvY)
## 👋 hello
This example performs speed estimation analysis using various object-detection models
and ByteTrack - a simple yet effective online multi-object tracking method. It uses the
supervision package for multiple tasks such as tracking, annotations, etc.
https://github.com/roboflow/supervision/assets/26109316/0542fd3c-bb5f-475e-b96c-793560abeb18
https://github.com/roboflow/supervision/assets/26109316/d50118c1-2ae4-458d-915a-5d860fd36f71
> [!IMPORTANT]
> Adjust the [`SOURCE`](https://github.com/roboflow/supervision/blob/e32b05a636dab2ea1f39299e529c4b22b8baa8da/examples/speed_estimation/ultralytics_example.py#L10)
> and [`TARGET`](https://github.com/roboflow/supervision/blob/e32b05a636dab2ea1f39299e529c4b22b8baa8da/examples/speed_estimation/ultralytics_example.py#L15)
> configuration if you plan to run a speed estimation script on your video file. Those must be adjusted separately for each camera view. You can learn more
> from our YouTube [tutorial](https://youtu.be/uWP6UjDeZvY).
## 💻 install
> [!NOTE]
> YOLO-NAS is compatible with Python versions up to and including Python 3.10.
- clone repository and navigate to example directory
```bash
+4 -4
View File
@@ -1,6 +1,6 @@
supervision==0.18.0rc1
tqdm
tqdm==4.66.1
requests
ultralytics
super-gradients
inference
ultralytics==8.0.237
super-gradients==3.5.0
inference==0.9.8
@@ -29,6 +29,9 @@ class ViewTransformer:
self.m = cv2.getPerspectiveTransform(source, target)
def transform_points(self, points: np.ndarray) -> np.ndarray:
if points.size == 0:
return points
reshaped_points = points.reshape(-1, 1, 2).astype(np.float32)
transformed_points = cv2.perspectiveTransform(reshaped_points, self.m)
return transformed_points.reshape(-1, 2)
+7
View File
@@ -1,2 +1,9 @@
data/
venv/
*.pt
*.pth
*.mp4
*.mov
*.png
*.jpg
*.jpeg
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "supervision"
version = "0.18.0rc1"
version = "0.18.0rc2"
description = "A set of easy-to-use utils that will come in handy in any Computer Vision project"
authors = ["Piotr Skalski <piotr.skalski92@gmail.com>"]
maintainers = ["Piotr Skalski <piotr.skalski92@gmail.com>"]