From 2db1e3af349aca5fc0c2d3bdb241c5bedfaa6efa Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:39:22 +0200 Subject: [PATCH] docs: improve SEO and GEO docs publishing (#2232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: improve SEO and GEO docs publishing * docs: refine language for model compatibility and package features * fix: correct spelling "Underestand" → "Understand" in notebook title * fix: derive JSON-LD SearchAction URL from config.site_url * lint: reformat notebook JSON (indent 1→4, pretty-format-json) * docs: refine description for `supervision.assets` video addition --------- Co-authored-by: Codex Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Claude Code --- .github/workflows/publish-docs.yml | 51 ++++- docs/_headers | 6 + docs/about.md | 27 +++ docs/changelog.md | 2 +- docs/contact.md | 29 +++ docs/faq.md | 58 ++++++ docs/how_to/detect_small_objects.md | 2 +- docs/how_to/track_objects.md | 8 +- docs/index.md | 4 +- docs/llms-100k.txt | 192 ++++++++++++++++++ docs/llms.full.txt | 14 +- docs/llms.txt | 14 +- ...underestand-visitors-with-yolo-world.ipynb | 2 +- docs/robots.txt | 15 +- docs/theme/cookbooks.html | 26 +-- docs/theme/main.html | 135 +++++++++++- mkdocs.yml | 5 +- 17 files changed, 525 insertions(+), 65 deletions(-) create mode 100644 docs/_headers create mode 100644 docs/about.md create mode 100644 docs/contact.md create mode 100644 docs/faq.md create mode 100644 docs/llms-100k.txt diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index a96bf1ac..676ff69a 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -1,9 +1,15 @@ name: Docs/Build and Publish +# Deploy matrix: +# push develop -> mike deploy develop +# push release/latest -> mike deploy latest +# release published -> mike deploy only; does not move /latest/ + on: push: branches: - develop + - release/latest workflow_dispatch: release: types: [published] @@ -51,13 +57,20 @@ jobs: run: | mike deploy --push develop + - name: 🚀 Deploy Latest Docs + if: github.event_name == 'push' && github.ref == 'refs/heads/release/latest' + env: + MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }} + run: | + mike deploy --push latest + - name: 🚀 Deploy Release Docs if: github.event_name == 'release' && github.event.action == 'published' env: MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }} run: | - latest_tag=$(git tag --sort=-v:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -1) - mike deploy --push --update-aliases $latest_tag latest + release_tag="${GITHUB_REF_NAME#v}" + mike deploy --push "$release_tag" # IndexNow key: 0d5d9799b1cc4a39825146388c6781eb # This key must stay in sync across three files: @@ -70,27 +83,55 @@ jobs: if: > (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' || + (github.event_name == 'push' && github.ref == 'refs/heads/release/latest') || (github.event_name == 'release' && github.event.action == 'published') run: | cp docs/robots.txt /tmp/robots.txt cp docs/llms.txt /tmp/llms.txt cp docs/llms.full.txt /tmp/llms.full.txt + cp docs/llms-100k.txt /tmp/llms-100k.txt + cp docs/_headers /tmp/headers.txt cp docs/0d5d9799b1cc4a39825146388c6781eb.txt /tmp/indexnow.txt + if [[ "$GITHUB_REF" == "refs/heads/release/latest" ]]; then + version_dir="latest" + else + version_dir="" + fi git fetch origin gh-pages git checkout gh-pages cp /tmp/robots.txt robots.txt cp /tmp/llms.txt llms.txt cp /tmp/llms.full.txt llms.full.txt + cp /tmp/llms-100k.txt llms-100k.txt + cp /tmp/headers.txt _headers cp /tmp/indexnow.txt 0d5d9799b1cc4a39825146388c6781eb.txt - git add robots.txt llms.txt llms.full.txt 0d5d9799b1cc4a39825146388c6781eb.txt - git diff --cached --quiet || git commit -m "chore: update GEO root files (robots.txt, llms.txt, llms.full.txt, indexnow)" + if [[ -n "$version_dir" && -f "$version_dir/sitemap.xml" ]]; then + cp "$version_dir/sitemap.xml" sitemap.xml + gzip -9 -c sitemap.xml > sitemap.xml.gz + fi + files_to_add=( + robots.txt + llms.txt + llms.full.txt + llms-100k.txt + _headers + 0d5d9799b1cc4a39825146388c6781eb.txt + ) + if [[ -f "sitemap.xml" ]]; then + files_to_add+=(sitemap.xml) + fi + if [[ -f "sitemap.xml.gz" ]]; then + files_to_add+=(sitemap.xml.gz) + fi + git add "${files_to_add[@]}" + git diff --cached --quiet || git commit -m "chore: update GEO root files" git push origin gh-pages - name: 📡 Notify IndexNow if: > (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch' || - (github.event_name == 'release' && github.event.action == 'published') + (github.event_name == 'push' && github.ref == 'refs/heads/release/latest') run: | curl -s -o /dev/null -w "%{http_code}" -X POST "https://api.indexnow.org/IndexNow" \ -H "Content-Type: application/json; charset=utf-8" \ diff --git a/docs/_headers b/docs/_headers new file mode 100644 index 00000000..01595189 --- /dev/null +++ b/docs/_headers @@ -0,0 +1,6 @@ +/* + Strict-Transport-Security: max-age=31536000; includeSubDomains; preload + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() + Content-Security-Policy: default-src 'self'; base-uri 'self'; object-src 'none'; frame-ancestors 'none'; img-src 'self' https: data:; media-src 'self' https: data:; font-src 'self' https: data:; style-src 'self'; script-src 'self'; connect-src 'self' https:; diff --git a/docs/about.md b/docs/about.md new file mode 100644 index 00000000..e5d00c12 --- /dev/null +++ b/docs/about.md @@ -0,0 +1,27 @@ +--- +comments: true +description: About Supervision, Roboflow's open-source Python library for building reusable computer vision workflows. +--- + +# About Supervision + +Supervision is an open-source Python library by Roboflow for building computer vision applications. It gives developers a model-agnostic toolkit for loading predictions, annotating images and video, tracking objects, counting detections in zones, processing datasets, and evaluating model performance. + +The project centers on a unified `Detections` API with converters for supported outputs from Ultralytics, Roboflow Inference, Hugging Face Transformers, SAM, Detectron2, MMDetection, YOLO-NAS, PaddleDet, NCNN, Azure AI Vision, and VLM parsers such as Florence-2, PaliGemma, Qwen VL, Gemini, DeepSeek VL 2, and Moondream. That common representation lets teams change models without rewriting annotation, filtering, tracking, dataset, or metrics code. + +Supervision is maintained by Roboflow and an open-source contributor community. The library is MIT licensed, developed in public on GitHub, and published on PyPI. + +## Project Links + +- Source code: [github.com/roboflow/supervision](https://github.com/roboflow/supervision) +- Package: [pypi.org/project/supervision](https://pypi.org/project/supervision/) +- Community: [Roboflow Discord](https://discord.gg/GbfgXGJ8Bk) +- Roboflow: [roboflow.com](https://roboflow.com/) + +## Maintainers and Contributors + +Supervision has been shaped by Roboflow engineers and community contributors, including Piotr Skalski, Borda, onuralpszr, Soumik Mandal, and many others. The complete contributor history is available in the GitHub repository. + +## Citation + +If Supervision helps your research or production system, cite the project using the citation block in [llms.txt](https://supervision.roboflow.com/llms.txt) or link to the GitHub repository. diff --git a/docs/changelog.md b/docs/changelog.md index f3c31f4d..6dd9097e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -308,7 +308,7 @@ sv.process_video( - Added `as_detections` method to [`KeyPoints`](https://supervision.roboflow.com/0.25.0/keypoint/core/#supervision.keypoint.core.KeyPoints) that converts `KeyPoints` to `Detections`. ([#1658](https://github.com/roboflow/supervision/pull/1658)) -- Added a new video to `supervision[assets]`. ([#1657](https://github.com/roboflow/supervision/pull/1657)) +- Added a new video to the `supervision.assets` download catalog. ([#1657](https://github.com/roboflow/supervision/pull/1657)) ```python from supervision.assets import download_assets, VideoAssets diff --git a/docs/contact.md b/docs/contact.md new file mode 100644 index 00000000..6b6e5206 --- /dev/null +++ b/docs/contact.md @@ -0,0 +1,29 @@ +--- +comments: true +description: Contact and support channels for Supervision documentation, bugs, feature requests, security reports, and community help. +--- + +# Contact + +Use the channel that matches the kind of request you have. + +## Bugs and Feature Requests + +Open a GitHub issue for reproducible bugs, API requests, documentation fixes, and feature proposals: + +[github.com/roboflow/supervision/issues](https://github.com/roboflow/supervision/issues) + +## Community Support + +Join the Roboflow Discord for community questions, examples, and implementation discussion: + +[discord.gg/GbfgXGJ8Bk](https://discord.gg/GbfgXGJ8Bk) + +## Package and Source + +- PyPI package: [pypi.org/project/supervision](https://pypi.org/project/supervision/) +- GitHub repository: [github.com/roboflow/supervision](https://github.com/roboflow/supervision) + +## Security Reports + +For security-sensitive reports, avoid posting public exploit details in an issue. Use GitHub's private vulnerability reporting flow for the repository when available, or contact Roboflow through the security and support channels listed on [roboflow.com](https://roboflow.com/). diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 00000000..36555b8f --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,58 @@ +--- +comments: true +description: Frequently asked questions about installing Supervision, supported computer vision models, datasets, tracking, metrics, and licensing. +--- + +# Frequently Asked Questions + +## What is Supervision? + +Supervision is an open-source Python library by Roboflow for computer vision workflows. It provides a unified `Detections` class with converters for supported object detection, segmentation, and VLM outputs. + +## How do I install Supervision? + +Install the base package with: + +```bash +pip install supervision +``` + +Use the `metrics` extra when you need optional metric dependencies: + +```bash +pip install "supervision[metrics]" +``` + +Sample asset utilities are part of the base package under `supervision.assets`. + +## Which object detection models work with Supervision? + +Supervision is model agnostic. `sv.Detections` includes converters for Ultralytics YOLO, Roboflow Inference, Hugging Face Transformers outputs, SAM, Detectron2, MMDetection, YOLO-NAS, PaddleDet, NCNN, Azure AI Vision, and VLM parsers including Florence-2, PaliGemma, Qwen VL, Gemini, DeepSeek VL 2, and Moondream. Keypoint outputs have separate `sv.KeyPoints` converters, including MediaPipe. + +## What can I do with Supervision? + +You can annotate images and video, filter detections, track objects, count objects in zones or across lines, load and convert datasets, evaluate models with detection metrics, and export predictions for downstream analysis. + +## How do I track objects across video frames? + +Assign persistent tracker IDs before visualization. The built-in `sv.ByteTrack` wrapper accepts `Detections` through `update_with_detections()`. After tracking, combine the output with annotators such as `sv.TraceAnnotator`, `sv.BoxAnnotator`, and `sv.LabelAnnotator`. + +## What dataset formats does Supervision support? + +For detection datasets, Supervision supports YOLO, COCO JSON, and Pascal VOC. Use `DetectionDataset.from_yolo()`, `DetectionDataset.from_coco()`, or `DetectionDataset.from_pascal_voc()` to load datasets, and the matching `as_*` methods to export them. + +## How do I count objects in a zone? + +Use `sv.PolygonZone` for arbitrary polygon regions and `sv.LineZone` for line-crossing counts. Line crossing requires `detections.tracker_id`, so run a tracker before calling the line zone trigger. + +## How do I benchmark a model? + +Use `supervision.metrics.mean_average_precision.MeanAveragePrecision` for mAP and `sv.ConfusionMatrix` for confusion matrices. Accumulate predictions and ground-truth `Detections`, then call `compute()` to calculate metrics. + +## Is Supervision free to use? + +Yes. Supervision is free and open source under the MIT license. + +## Where is the source code? + +The source code is available at [github.com/roboflow/supervision](https://github.com/roboflow/supervision). diff --git a/docs/how_to/detect_small_objects.md b/docs/how_to/detect_small_objects.md index 2e204bb8..32f76489 100644 --- a/docs/how_to/detect_small_objects.md +++ b/docs/how_to/detect_small_objects.md @@ -349,7 +349,7 @@ Use `sv.InferenceSlicer` to split a high-resolution image into overlapping tiles ### Can I use InferenceSlicer with any detection model? -Yes. Wrap any model that can produce `sv.Detections` (from YOLO, SAM, Grounding DINO, Transformers, etc.) in a callback, pass that callback to `sv.InferenceSlicer(callback=...)`, and then call the slicer with your image. +Yes. Wrap any model or converter path that can produce `sv.Detections` in a callback, pass that callback to `sv.InferenceSlicer(callback=...)`, and then call the slicer with your image. ## Author diff --git a/docs/how_to/track_objects.md b/docs/how_to/track_objects.md index f2bec977..3f269dcf 100644 --- a/docs/how_to/track_objects.md +++ b/docs/how_to/track_objects.md @@ -25,8 +25,8 @@ for a deeper analysis. ## Object Detection & Segmentation To make it easier for you to follow our tutorial download the video we will use as an -example. You can do this using -[`supervision[assets]`](https://supervision.roboflow.com/latest/assets/) extension. +example. You can do this using the +[`supervision.assets`](https://supervision.roboflow.com/latest/assets/) module included in the base package. This section demonstrates how to detect and segment objects in video frames using YOLOv8 with either the Inference or Ultralytics package. You will download a sample video, define a per-frame callback function that runs model prediction, and process the entire video to produce an annotated output file. @@ -336,7 +336,7 @@ movement patterns and interactions between objects in the video. Models aren't limited to object detection and segmentation. Keypoint detection allows for detailed analysis of body joints and connections, especially valuable for applications like human pose estimation. This section introduces keypoint tracking. We'll walk through the steps of annotating keypoints, converting them into bounding box detections compatible with `ByteTrack`, and applying detection smoothing for enhanced stability. To make it easier for you to follow our tutorial, let's download the video we will use as an -example. You can do this using [`supervision[assets]`](https://supervision.roboflow.com/latest/assets/) extension. +example. You can do this using the [`supervision.assets`](https://supervision.roboflow.com/latest/assets/) module included in the base package. ```python from supervision.assets import download_assets, VideoAssets @@ -681,7 +681,7 @@ Yes. ByteTrack tracks bounding boxes. For instance masks, use `sv.MaskAnnotator` ### Does ByteTrack work with any detection model? -Yes. ByteTrack is model-agnostic — it accepts any `Detections` object with bounding boxes, regardless of source (YOLO, SAM, Grounding DINO, Transformers, etc.). +Yes. ByteTrack is model-agnostic - it accepts any `Detections` object with bounding boxes, regardless of the supported converter or model output that produced it. ## Authors diff --git a/docs/index.md b/docs/index.md index e3f9c0ea..94804510 100644 --- a/docs/index.md +++ b/docs/index.md @@ -26,11 +26,11 @@ description: Open-source Python library providing computer vision tools for anno ## What is Supervision? -Supervision is an open-source Python library by Roboflow for building computer vision applications. It provides a unified `Detections` object that works with YOLO, SAM, Grounding DINO, Transformers, and 20+ model frameworks — use any detector, get the same composable API. +Supervision is an open-source Python library by Roboflow for building computer vision applications. It provides a unified `Detections` object with converters for supported outputs from Ultralytics, Roboflow Inference, Transformers, SAM, Detectron2, MMDetection, YOLO-NAS, PaddleDet, NCNN, Azure AI Vision, and VLM parsers. With Supervision you can annotate images and video with bounding boxes, masks, and labels; track objects across frames with persistent IDs; count and filter detections inside polygon zones; load and convert datasets between YOLO, COCO, and Pascal VOC formats; and benchmark model performance with mAP and confusion matrices. -Trusted by researchers (cited in 4,000+ papers) and practitioners (38,000+ GitHub stars, 1M+ monthly PyPI downloads), Supervision is the standard toolkit for production computer vision workflows. +Supervision is MIT licensed, published on PyPI, and developed in public on GitHub for production computer vision workflows. ## 👋 Hello diff --git a/docs/llms-100k.txt b/docs/llms-100k.txt new file mode 100644 index 00000000..0362778e --- /dev/null +++ b/docs/llms-100k.txt @@ -0,0 +1,192 @@ +# supervision + +> Large-context AI crawler summary for Supervision documentation. + +Supervision is an open-source Python library by Roboflow for computer vision workflows. It provides a model-agnostic `Detections` class and composable tools for object detection, instance segmentation, keypoint detection, annotation, tracking, zone counting, dataset conversion, and model evaluation. + +Supervision is MIT licensed, published on PyPI, developed on GitHub, and used by researchers and practitioners in production computer vision systems. The library includes converters for supported outputs from Ultralytics, Roboflow Inference, Hugging Face Transformers, SAM, Detectron2, MMDetection, YOLO-NAS, PaddleDet, NCNN, Azure AI Vision, and VLM parsers. + +## Primary Links + +- Latest stable docs: https://supervision.roboflow.com/latest/ +- Development docs: https://supervision.roboflow.com/develop/ +- Source code: https://github.com/roboflow/supervision +- PyPI package: https://pypi.org/project/supervision/ +- Changelog: https://supervision.roboflow.com/latest/changelog/ +- Sitemap: https://supervision.roboflow.com/sitemap.xml +- Standard LLM summary: https://supervision.roboflow.com/llms.txt +- Full LLM summary: https://supervision.roboflow.com/llms.full.txt + +## AI Access + +The documentation is static HTML and is open for AI crawler consumption. `robots.txt` explicitly allows general crawlers plus GPTBot, ClaudeBot, PerplexityBot, Bytespider, CCBot, GoogleOther, and Applebot. + +## Install + +```bash +pip install supervision +``` + +Optional extras: + +```bash +pip install "supervision[metrics]" +``` + +Sample asset utilities are included in the base package under `supervision.assets`. + +## Core Concepts + +### `sv.Detections` + +`sv.Detections` is the central data structure in Supervision. It stores bounding boxes, segmentation masks, confidence scores, class IDs, tracker IDs, and arbitrary per-detection metadata in a `data` dictionary. It supports NumPy-style indexing for filtering by confidence, class, area, and spatial constraints. + +Most connectors, annotators, trackers, dataset tools, and metrics either accept or return `Detections`, which makes it possible to change the upstream model while keeping downstream processing code stable. + +### Model Connectors + +Supervision normalizes outputs from multiple computer vision frameworks into the same `Detections` API. Common constructors include: + +- `sv.Detections.from_ultralytics(...)` +- `sv.Detections.from_inference(...)` +- `sv.Detections.from_transformers(...)` +- `sv.Detections.from_vlm(...)` +- `sv.Detections.from_sam(...)` +- `sv.Detections.from_detectron2(...)` +- `sv.Detections.from_mmdetection(...)` + +### Annotation + +Supervision includes annotators for drawing boxes, masks, labels, traces, zones, vertices, edges, and other overlays on images and video frames. Common annotators include: + +- `sv.BoxAnnotator` +- `sv.MaskAnnotator` +- `sv.LabelAnnotator` +- `sv.TraceAnnotator` +- `sv.PolygonZoneAnnotator` +- `sv.LineZoneAnnotator` + +### Tracking + +The built-in `sv.ByteTrack` wrapper assigns persistent IDs across video frames through `update_with_detections()`. The docs also note the migration path toward `ByteTrackTracker` from the external `trackers` package. Tracked detections can be passed to label, trace, zone, and line-counting annotators. + +### Zones and Counting + +`sv.PolygonZone` checks whether detections are inside an arbitrary polygon. `sv.LineZone` counts line crossings and requires `detections.tracker_id` so objects can be matched across frames. These tools are typically used with video callbacks and annotators to build traffic, occupancy, queue, and throughput analytics. + +### Datasets + +`sv.DetectionDataset` loads, merges, splits, and converts object detection datasets. Supported formats include YOLO, COCO JSON, and Pascal VOC. `sv.ClassificationDataset` supports folder-structured classification datasets. + +### Metrics + +Supervision includes detection metrics including mean average precision, mean average recall, precision, recall, F1 score, and confusion matrices. The current mAP workflow uses `supervision.metrics.mean_average_precision.MeanAveragePrecision` with `update(...)` and `compute()`. + +## How-To Guides + +- Detect and annotate: https://supervision.roboflow.com/latest/how_to/detect_and_annotate/ +- Track objects: https://supervision.roboflow.com/latest/how_to/track_objects/ +- Detect small objects: https://supervision.roboflow.com/latest/how_to/detect_small_objects/ +- Filter detections: https://supervision.roboflow.com/latest/how_to/filter_detections/ +- Save detections: https://supervision.roboflow.com/latest/how_to/save_detections/ +- Count in zone: https://supervision.roboflow.com/latest/how_to/count_in_zone/ +- Benchmark a model: https://supervision.roboflow.com/latest/how_to/benchmark_a_model/ +- Process datasets: https://supervision.roboflow.com/latest/how_to/process_datasets/ + +## Reference Documentation + +- Detections: https://supervision.roboflow.com/latest/detection/core/ +- Detection annotators: https://supervision.roboflow.com/latest/detection/annotators/ +- Compact masks: https://supervision.roboflow.com/latest/detection/compact_mask/ +- Detection converters: https://supervision.roboflow.com/latest/detection/utils/converters/ +- IoU and NMS: https://supervision.roboflow.com/latest/detection/utils/iou_and_nms/ +- Boxes: https://supervision.roboflow.com/latest/detection/utils/boxes/ +- Masks: https://supervision.roboflow.com/latest/detection/utils/masks/ +- Polygons: https://supervision.roboflow.com/latest/detection/utils/polygons/ +- Vision-language model helpers: https://supervision.roboflow.com/latest/detection/utils/vlms/ +- Keypoint core: https://supervision.roboflow.com/latest/keypoint/core/ +- Keypoint annotators: https://supervision.roboflow.com/latest/keypoint/annotators/ +- Classification core: https://supervision.roboflow.com/latest/classification/core/ +- Trackers: https://supervision.roboflow.com/latest/trackers/ +- Dataset core: https://supervision.roboflow.com/latest/datasets/core/ +- Mean average precision: https://supervision.roboflow.com/latest/metrics/mean_average_precision/ +- Mean average recall: https://supervision.roboflow.com/latest/metrics/mean_average_recall/ +- Precision: https://supervision.roboflow.com/latest/metrics/precision/ +- Recall: https://supervision.roboflow.com/latest/metrics/recall/ +- F1 score: https://supervision.roboflow.com/latest/metrics/f1_score/ +- Common metric values: https://supervision.roboflow.com/latest/metrics/common_values/ +- Line zone: https://supervision.roboflow.com/latest/detection/tools/line_zone/ +- Polygon zone: https://supervision.roboflow.com/latest/detection/tools/polygon_zone/ +- Inference slicer: https://supervision.roboflow.com/latest/detection/tools/inference_slicer/ +- Detection smoother: https://supervision.roboflow.com/latest/detection/tools/smoother/ +- Detection export sinks: https://supervision.roboflow.com/latest/detection/tools/save_detections/ +- Video utilities: https://supervision.roboflow.com/latest/utils/video/ +- Image utilities: https://supervision.roboflow.com/latest/utils/image/ +- Iterable utilities: https://supervision.roboflow.com/latest/utils/iterables/ +- Notebook utilities: https://supervision.roboflow.com/latest/utils/notebook/ +- File utilities: https://supervision.roboflow.com/latest/utils/file/ +- Draw utilities: https://supervision.roboflow.com/latest/utils/draw/ +- Geometry utilities: https://supervision.roboflow.com/latest/utils/geometry/ +- Assets: https://supervision.roboflow.com/latest/assets/ + +## Cookbooks + +- Supervision quickstart: https://supervision.roboflow.com/latest/notebooks/quickstart/ +- Count objects crossing the line: https://supervision.roboflow.com/latest/notebooks/count-objects-crossing-the-line/ +- Object tracking: https://supervision.roboflow.com/latest/notebooks/object-tracking/ +- Small object detection with SAHI: https://supervision.roboflow.com/latest/notebooks/small-object-detection-with-sahi/ +- Zero-shot object detection with YOLO-World: https://supervision.roboflow.com/latest/notebooks/zero-shot-object-detection-with-yolo-world/ +- Save detections to CSV: https://supervision.roboflow.com/latest/notebooks/serialise-detections-to-csv/ +- Save detections to JSON: https://supervision.roboflow.com/latest/notebooks/serialise-detections-to-json/ +- Occupancy analytics: https://supervision.roboflow.com/latest/notebooks/occupancy_analytics/ +- Annotate video with detections: https://supervision.roboflow.com/latest/notebooks/annotate-video-with-detections/ + +## Trust and Contact Pages + +- About: https://supervision.roboflow.com/latest/about/ +- Contact: https://supervision.roboflow.com/latest/contact/ +- FAQ: https://supervision.roboflow.com/latest/faq/ +- License: https://github.com/roboflow/supervision/blob/develop/LICENSE.md +- Issues: https://github.com/roboflow/supervision/issues +- Community: https://discord.gg/GbfgXGJ8Bk + +## Frequently Asked Questions + +### What is Supervision? + +Supervision is an open-source Python library by Roboflow for computer vision workflows. It provides a unified `Detections` class with converters for supported detection, segmentation, and VLM outputs. + +### Is Supervision tied to one model provider? + +No. Supervision is model agnostic. It is designed to normalize model outputs into a common API so downstream annotation, filtering, tracking, metrics, and dataset code can be reused. + +### What dataset formats are supported? + +For object detection datasets, Supervision supports YOLO, COCO JSON, and Pascal VOC import and export. For classification datasets, it supports folder-structure import and export. + +### How do I detect small objects? + +Use `sv.InferenceSlicer` to split large images into overlapping tiles, run inference on each tile, and merge the resulting detections with non-maximum suppression or non-maximum merge. + +### How do I count objects crossing a line? + +Run a tracker first to assign `detections.tracker_id`, then use `sv.LineZone.trigger(detections)` to calculate crossing events. Use `sv.LineZoneAnnotator` for visualization. + +### How do I benchmark a model? + +Load predictions and ground truth as `Detections`, update a `MeanAveragePrecision` metric object, and call `compute()`. Use `sv.ConfusionMatrix` when class-level confusion analysis is needed. + +## Citation + +```bibtex +@software{supervision, + author = {Roboflow}, + title = {Supervision: Computer Vision Toolkit}, + url = {https://github.com/roboflow/supervision}, + year = {2023} +} +``` + +## Versioning + +`/develop/` is built from the `develop` branch. `/latest/` is built from the `release/latest` branch. Published releases build tag-only documentation paths and do not move `/latest/`. diff --git a/docs/llms.full.txt b/docs/llms.full.txt index 71b22b41..24b6fb30 100644 --- a/docs/llms.full.txt +++ b/docs/llms.full.txt @@ -2,13 +2,13 @@ > Open-source Python library for computer vision — annotate, track, count, filter, and convert. -Supervision is a Python library by Roboflow that provides a model-agnostic `Detections` class and composable tools for object detection and segmentation workflows. Works with YOLO, SAM, Grounding DINO, Transformers, Inference, and 20+ other model frameworks. +Supervision is a Python library by Roboflow that provides a model-agnostic `Detections` class and composable tools for object detection and segmentation workflows. It includes converters for supported outputs from Ultralytics, Roboflow Inference, Hugging Face Transformers, SAM, Detectron2, MMDetection, YOLO-NAS, PaddleDet, NCNN, Azure AI Vision, and VLM parsers. -Trusted by researchers in 4,000+ papers and 38,000+ developers. MIT licensed. +Supervision is MIT licensed, published on PyPI, and developed in public on GitHub. ## AI Access -All major AI crawlers are explicitly allowed. Full documentation is open for AI consumption. +The documentation is static HTML and open for AI consumption. `robots.txt` explicitly allows general crawlers plus selected AI crawlers. - GPTBot: allowed - ClaudeBot: allowed @@ -22,7 +22,7 @@ All major AI crawlers are explicitly allowed. Full documentation is open for AI pip install supervision ``` -Extras: `pip install supervision[metrics]` for mAP/confusion matrix. `pip install supervision[assets]` for sample video/image assets. +Extra: `pip install supervision[metrics]` for optional metric dependencies. Sample asset utilities are included in the base package under `supervision.assets`. ## Links @@ -125,11 +125,11 @@ Export detection results to structured files. Use `CSVSink` and `JSONSink` as co ### What is supervision? -Supervision is an open-source Python library by Roboflow for computer vision workflows. It provides a unified `Detections` class compatible with YOLO, SAM, Grounding DINO, Transformers, and 20+ model frameworks, plus tools for annotation, tracking, zone counting, dataset management, and model benchmarking. +Supervision is an open-source Python library by Roboflow for computer vision workflows. It provides a unified `Detections` class with converters for supported detection, segmentation, and VLM outputs, plus tools for annotation, tracking, zone counting, dataset management, and model benchmarking. ### How do I install supervision? -Install with `pip install supervision`. For evaluation tools use `pip install supervision[metrics]`. For sample assets use `pip install supervision[assets]`. The current package metadata requires Python 3.9+. +Install with `pip install supervision`. For optional metric dependencies use `pip install supervision[metrics]`. Sample asset utilities are included in the base package under `supervision.assets`. The current package metadata requires Python 3.9+. ### What can I do with supervision? @@ -141,7 +141,7 @@ Yes. Supervision is free and open-source under the MIT license. Source code is a ### Which object detection models work with supervision? -Supervision is model-agnostic and works with Ultralytics YOLO, Roboflow Inference, Hugging Face Transformers, SAM, Grounding DINO, Florence-2, PaliGemma, MediaPipe, Detectron2, MMDetection, and 20+ other frameworks through built-in connectors such as `from_ultralytics()`, `from_transformers()`, and `from_vlm(...)`. +Supervision is model-agnostic and works with supported outputs from Ultralytics YOLO, Roboflow Inference, Hugging Face Transformers, SAM, Detectron2, MMDetection, YOLO-NAS, PaddleDet, NCNN, Azure AI Vision, and VLM parsers such as Florence-2, PaliGemma, Qwen VL, Gemini, DeepSeek VL 2, and Moondream. Keypoint outputs have separate converters, including MediaPipe. ### How do I benchmark a model with supervision? diff --git a/docs/llms.txt b/docs/llms.txt index 048209ea..b03208f2 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -2,13 +2,13 @@ > Open-source Python library for computer vision — annotate, track, count, filter, and convert. -Supervision is a Python library by Roboflow that provides a model-agnostic `Detections` class and composable tools for object detection and segmentation workflows. Works with YOLO, SAM, Grounding DINO, Transformers, Inference, and 20+ other model frameworks. +Supervision is a Python library by Roboflow that provides a model-agnostic `Detections` class and composable tools for object detection and segmentation workflows. It includes converters for supported outputs from Ultralytics, Roboflow Inference, Hugging Face Transformers, SAM, Detectron2, MMDetection, YOLO-NAS, PaddleDet, NCNN, Azure AI Vision, and VLM parsers. -Trusted by researchers in 4,000+ papers and 38,000+ developers. MIT licensed. +Supervision is MIT licensed, published on PyPI, and developed in public on GitHub. ## AI Access -All major AI crawlers are explicitly allowed. Full documentation is open for AI consumption. +The documentation is static HTML and open for AI consumption. `robots.txt` explicitly allows general crawlers plus selected AI crawlers. - GPTBot: allowed - ClaudeBot: allowed @@ -22,7 +22,7 @@ All major AI crawlers are explicitly allowed. Full documentation is open for AI pip install supervision ``` -Extras: `pip install supervision[metrics]` for mAP/confusion matrix. `pip install supervision[assets]` for sample video/image assets. +Extra: `pip install supervision[metrics]` for optional metric dependencies. Sample asset utilities are included in the base package under `supervision.assets`. ## Links @@ -116,11 +116,11 @@ Export detection results to structured files. Use `CSVSink` and `JSONSink` as co ### What is supervision? -Supervision is an open-source Python library by Roboflow for computer vision workflows. It provides a unified `Detections` class compatible with YOLO, SAM, Grounding DINO, Transformers, and 20+ model frameworks, plus tools for annotation, tracking, zone counting, dataset management, and model benchmarking. +Supervision is an open-source Python library by Roboflow for computer vision workflows. It provides a unified `Detections` class with converters for supported detection, segmentation, and VLM outputs, plus tools for annotation, tracking, zone counting, dataset management, and model benchmarking. ### How do I install supervision? -Install with `pip install supervision`. For evaluation tools use `pip install supervision[metrics]`. For sample assets use `pip install supervision[assets]`. The current package metadata requires Python 3.9+. +Install with `pip install supervision`. For optional metric dependencies use `pip install supervision[metrics]`. Sample asset utilities are included in the base package under `supervision.assets`. The current package metadata requires Python 3.9+. ### What can I do with supervision? @@ -132,7 +132,7 @@ Yes. Supervision is free and open-source under the MIT license. Source code is a ### Which object detection models work with supervision? -Supervision is model-agnostic and works with Ultralytics YOLO, Roboflow Inference, Hugging Face Transformers, SAM, Grounding DINO, Florence-2, PaliGemma, MediaPipe, Detectron2, MMDetection, and 20+ other frameworks through built-in connectors such as `from_ultralytics()`, `from_transformers()`, and `from_vlm(...)`. +Supervision is model-agnostic and works with supported outputs from Ultralytics YOLO, Roboflow Inference, Hugging Face Transformers, SAM, Detectron2, MMDetection, YOLO-NAS, PaddleDet, NCNN, Azure AI Vision, and VLM parsers such as Florence-2, PaliGemma, Qwen VL, Gemini, DeepSeek VL 2, and Moondream. Keypoint outputs have separate converters, including MediaPipe. ### How do I benchmark a model with supervision? diff --git a/docs/notebooks/underestand-visitors-with-yolo-world.ipynb b/docs/notebooks/underestand-visitors-with-yolo-world.ipynb index b0aa9ace..789b2550 100644 --- a/docs/notebooks/underestand-visitors-with-yolo-world.ipynb +++ b/docs/notebooks/underestand-visitors-with-yolo-world.ipynb @@ -6,7 +6,7 @@ "id": "kR-PyK7YXPVZ" }, "source": [ - "# Underestand Visitors with YOLO-World\n", + "# Understand Visitors with YOLO-World\n", "---\n", "[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/roboflow/supervision/blob/develop/docs/notebooks/zero-shot-object-detection-with-yolo-world.ipynb)\n", "[![Roboflow](https://raw.githubusercontent.com/roboflow-ai/notebooks/main/assets/badges/roboflow-blogpost.svg)](https://blog.roboflow.com/what-is-yolo-world/)\n", diff --git a/docs/robots.txt b/docs/robots.txt index a84519f7..f8f00e4e 100644 --- a/docs/robots.txt +++ b/docs/robots.txt @@ -1,17 +1,5 @@ User-agent: * Allow: / -# Block all numeric versioned paths (/0.28.0/, /1.0.0/, etc.) — canonical URL is /latest/ -# robots.txt has no character classes, so one Disallow per leading digit is required. -Disallow: /0.*/ -Disallow: /1.*/ -Disallow: /2.*/ -Disallow: /3.*/ -Disallow: /4.*/ -Disallow: /5.*/ -Disallow: /6.*/ -Disallow: /7.*/ -Disallow: /8.*/ -Disallow: /9.*/ User-agent: GPTBot Allow: / @@ -31,4 +19,7 @@ Allow: / User-agent: GoogleOther Allow: / +User-agent: Applebot +Allow: / + Sitemap: https://supervision.roboflow.com/sitemap.xml diff --git a/docs/theme/cookbooks.html b/docs/theme/cookbooks.html index 2423de34..f92716cd 100644 --- a/docs/theme/cookbooks.html +++ b/docs/theme/cookbooks.html @@ -11,51 +11,51 @@

Supervision Cookbooks

diff --git a/docs/theme/main.html b/docs/theme/main.html index 32577326..baa8e0e0 100644 --- a/docs/theme/main.html +++ b/docs/theme/main.html @@ -18,6 +18,7 @@ {% else %} {% set _meta = {} %} {% endif %} +{% set page_description = _meta.description | d(config.site_description) %} {# ── GEO: JSON-LD + OG tags (page context required — skip for theme templates like 404) #} {# ── GEO: JSON-LD structured data ──────────────────────────── #} @@ -38,7 +39,6 @@ } -{% for is_home in [page.is_homepage] %}{% if is_home %} + + + + +{% for is_home in [page.is_homepage] %}{% if is_home %} {% endif %}{% endfor %} +{% if page.url == 'faq/' %} + +{% endif %} + +{% if page.url == 'about/' or page.url == 'contact/' %} + +{% endif %} + {% if 'how_to' in page.url %} {% endif %} @@ -212,7 +316,7 @@ "name": "How do I {{ page.title | striptags | lower }} with supervision?", "acceptedAnswer": { "@type": "Answer", - "text": {{ _meta.description | d(config.site_description) | tojson }} + "text": {{ page_description | tojson }} } } ] @@ -247,23 +351,32 @@ - + + + + + - + + + + {# ── API reference schema (detection/ metrics/ datasets/ reference pages) ── #} {% for is_ref in [('reference' in page.url or 'detection/' in page.url or 'metrics/' in page.url or 'keypoint/' in page.url or 'classification/' in page.url) and 'how_to' not in page.url] %}{% if is_ref %}