diff --git a/README.md b/README.md index f6832b3d..1fd46c2c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/annotators.md b/docs/annotators.md index 3dc0dc14..316f37e0 100644 --- a/docs/annotators.md +++ b/docs/annotators.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + === "BoundingBox" ```python diff --git a/docs/assets.md b/docs/assets.md index 13e3cbfb..311815b4 100644 --- a/docs/assets.md +++ b/docs/assets.md @@ -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. diff --git a/docs/classification/core.md b/docs/classification/core.md index 55ae57ea..7307ae04 100644 --- a/docs/classification/core.md +++ b/docs/classification/core.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## Classifications :::supervision.classification.core.Classifications diff --git a/docs/datasets.md b/docs/datasets.md index 9efc9e56..ae9c8ed7 100644 --- a/docs/datasets.md +++ b/docs/datasets.md @@ -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 diff --git a/docs/detection/core.md b/docs/detection/core.md index fc3814fa..e966d60b 100644 --- a/docs/detection/core.md +++ b/docs/detection/core.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## Detections :::supervision.detection.core.Detections diff --git a/docs/detection/tools/inference_slicer.md b/docs/detection/tools/inference_slicer.md index 003ed83b..ad93801f 100644 --- a/docs/detection/tools/inference_slicer.md +++ b/docs/detection/tools/inference_slicer.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## InferenceSlicer :::supervision.detection.tools.inference_slicer.InferenceSlicer diff --git a/docs/detection/tools/line_zone.md b/docs/detection/tools/line_zone.md index cbecdaa9..0c310267 100644 --- a/docs/detection/tools/line_zone.md +++ b/docs/detection/tools/line_zone.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## LineZone :::supervision.detection.line_counter.LineZone diff --git a/docs/detection/tools/polygon_zone.md b/docs/detection/tools/polygon_zone.md index 6679299e..f674707c 100644 --- a/docs/detection/tools/polygon_zone.md +++ b/docs/detection/tools/polygon_zone.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## PolygonZone :::supervision.detection.tools.polygon_zone.PolygonZone diff --git a/docs/detection/utils.md b/docs/detection/utils.md index 32d48c70..965f2055 100644 --- a/docs/detection/utils.md +++ b/docs/detection/utils.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## box_iou_batch :::supervision.detection.utils.box_iou_batch diff --git a/docs/draw/color.md b/docs/draw/color.md index 5114f4ba..1e4e2a10 100644 --- a/docs/draw/color.md +++ b/docs/draw/color.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## Color :::supervision.draw.color.Color diff --git a/docs/draw/utils.md b/docs/draw/utils.md index ee415b81..86ee0a89 100644 --- a/docs/draw/utils.md +++ b/docs/draw/utils.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## draw_line :::supervision.draw.utils.draw_line diff --git a/docs/geometry/core.md b/docs/geometry/core.md index 978ad2cf..6a740706 100644 --- a/docs/geometry/core.md +++ b/docs/geometry/core.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## Position :::supervision.geometry.core.Position diff --git a/docs/how_to/detect_and_annotate.md b/docs/how_to/detect_and_annotate.md index 087c93bf..2537f47c 100644 --- a/docs/how_to/detect_and_annotate.md +++ b/docs/how_to/detect_and_annotate.md @@ -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 diff --git a/docs/how_to/evaluate_model.md b/docs/how_to/evaluate_model.md index c9497945..7adab821 100644 --- a/docs/how_to/evaluate_model.md +++ b/docs/how_to/evaluate_model.md @@ -1 +1,5 @@ +--- +comments: true +--- + 🚧 Page under construction. diff --git a/docs/how_to/filter_detections.md b/docs/how_to/filter_detections.md index 1b829d81..63be7d10 100644 --- a/docs/how_to/filter_detections.md +++ b/docs/how_to/filter_detections.md @@ -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. diff --git a/docs/how_to/process_video.md b/docs/how_to/process_video.md index c9497945..7adab821 100644 --- a/docs/how_to/process_video.md +++ b/docs/how_to/process_video.md @@ -1 +1,5 @@ +--- +comments: true +--- + 🚧 Page under construction. diff --git a/docs/how_to/track_objects.md b/docs/how_to/track_objects.md index 85492db9..80d14e37 100644 --- a/docs/how_to/track_objects.md +++ b/docs/how_to/track_objects.md @@ -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 diff --git a/docs/index.md b/docs/index.md index 1d3b4a98..d3c48e20 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,7 @@ +--- +comments: true +--- +

diff --git a/docs/metrics/detection.md b/docs/metrics/detection.md index 0c083460..b98498fa 100644 --- a/docs/metrics/detection.md +++ b/docs/metrics/detection.md @@ -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 diff --git a/docs/theme/partials/comments.html b/docs/theme/partials/comments.html new file mode 100644 index 00000000..d95dd6b7 --- /dev/null +++ b/docs/theme/partials/comments.html @@ -0,0 +1,51 @@ +{% if page.meta.comments %} +

{{ lang.t("meta.comments") }}

+ + + + + + +{% endif %} diff --git a/docs/trackers.md b/docs/trackers.md index 10c3a01c..6f3c8918 100644 --- a/docs/trackers.md +++ b/docs/trackers.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## ByteTrack :::supervision.tracker.byte_tracker.core.ByteTrack diff --git a/docs/utils/file.md b/docs/utils/file.md index f7c785a0..c3fcd6b2 100644 --- a/docs/utils/file.md +++ b/docs/utils/file.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## list_files_with_extensions :::supervision.utils.file.list_files_with_extensions diff --git a/docs/utils/image.md b/docs/utils/image.md index 36a833da..cbe36f08 100644 --- a/docs/utils/image.md +++ b/docs/utils/image.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## ImageSink :::supervision.utils.image.ImageSink diff --git a/docs/utils/notebook.md b/docs/utils/notebook.md index 76bddc87..98b64801 100644 --- a/docs/utils/notebook.md +++ b/docs/utils/notebook.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## plot_image :::supervision.utils.notebook.plot_image diff --git a/docs/utils/video.md b/docs/utils/video.md index a059c87c..e81c9121 100644 --- a/docs/utils/video.md +++ b/docs/utils/video.md @@ -1,3 +1,7 @@ +--- +comments: true +--- + ## VideoInfo :::supervision.utils.video.VideoInfo diff --git a/examples/count_people_in_zone/.gitignore b/examples/count_people_in_zone/.gitignore index f9e2cd53..1104aa29 100644 --- a/examples/count_people_in_zone/.gitignore +++ b/examples/count_people_in_zone/.gitignore @@ -3,3 +3,11 @@ data/* # But re-include all .json files !data/*.json + +*.pt +*.pth +*.mp4 +*.mov +*.png +*.jpg +*.jpeg diff --git a/examples/speed_estimation/.gitignore b/examples/speed_estimation/.gitignore index 5b855697..34efd9e0 100644 --- a/examples/speed_estimation/.gitignore +++ b/examples/speed_estimation/.gitignore @@ -1,2 +1,9 @@ data/ venv*/ +*.pt +*.pth +*.mp4 +*.mov +*.png +*.jpg +*.jpeg diff --git a/examples/speed_estimation/README.md b/examples/speed_estimation/README.md index 35685938..956020e4 100644 --- a/examples/speed_estimation/README.md +++ b/examples/speed_estimation/README.md @@ -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 diff --git a/examples/speed_estimation/requirements.txt b/examples/speed_estimation/requirements.txt index 63f20432..59ca45cb 100644 --- a/examples/speed_estimation/requirements.txt +++ b/examples/speed_estimation/requirements.txt @@ -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 diff --git a/examples/speed_estimation/ultralytics_example.py b/examples/speed_estimation/ultralytics_example.py index 6bb2b2f6..4b0436a0 100644 --- a/examples/speed_estimation/ultralytics_example.py +++ b/examples/speed_estimation/ultralytics_example.py @@ -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) diff --git a/examples/traffic_analysis/.gitignore b/examples/traffic_analysis/.gitignore index cea2fc37..a0aa5253 100644 --- a/examples/traffic_analysis/.gitignore +++ b/examples/traffic_analysis/.gitignore @@ -1,2 +1,9 @@ data/ venv/ +*.pt +*.pth +*.mp4 +*.mov +*.png +*.jpg +*.jpeg diff --git a/pyproject.toml b/pyproject.toml index ee765557..c8bffe01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] maintainers = ["Piotr Skalski "]