roboflow /supervision

We write your reusable computer vision tools. 💜

★ 51,575⑂ 4,938👁 290⑃ 2,029● 584▤ 55◈ 272
PythonMITCreated 2022-11-28supervision.roboflow.com
51,575
stars
+12+109+448
4,938
forks
290
watchers
2,029
prs
584
issues
55
releases
272
discussions

README

notebooks | inference | autodistill | maestro



    

   


    
  




📑 Table of Contents

- 👋 Hello
- 💻 Install
- 🔥 Quickstart
  - Models
  - Annotators
  - Datasets
- 🎬 Tutorials
- 💜 Built with Supervision
- 📚 Documentation
- 🏆 Contribution



 👋 Hello

We are your essential toolkit for computer vision. From data loading to real-time zone counting, we provide the building blocks so you can focus on building applications around your models. 🤝

 💻 Install

Pip install the supervision package in a Python=3.10 environment.

bash
pip install supervision


Read more about conda, mamba, and installing from source in our guide.

 🔥 Quickstart

 Models

Supervision was designed to be model agnostic. Just plug in any classification, detection, or segmentation model. For your convenience, we have created connectors for the most popular libraries like Ultralytics, Transformers, MMDetection, or Inference. Other integrations, like rfdetr, already return sv.Detections directly.

Install the optional dependencies for this example with pip install pillow rfdetr.

python
import supervision as sv
from PIL import Image
from rfdetr import RFDETRSmall

image = Image.open("path/to/image.jpg")
model = RFDETRSmall()
detections = model.predict(image, threshold=0.5)

len(detections)
 5



👉 more model connectors

- inference

  Running with Inference requires a Roboflow API KEY.

  python
  import supervision as sv
  from PIL import Image
  from inference import get_model

  image = Image.open("path/to/image.jpg")
  model = get_model(model_id="rfdetr-small", api_key="ROBOFLOW_API_KEY")
  result = model.infer(image)[0]
  detections = sv.Detections.from_inference(result)

  len(detections)
   5
  



 Annotators

Supervision offers a wide range of highly customizable annotators, allowing you to compose the perfect visualization for your use case.

python
import cv2
import supervision as sv

image = cv2.imread("path/to/image.jpg")
 Assuming detections are obtained from a model
detections = sv.Detections(...)

box_annotator = sv.BoxAnnotator()
annotated_frame = box_annotator.annotate(scene=image.copy(), detections=detections)


https://github.com/roboflow/supervision/assets/26109316/691e219c-0565-4403-9218-ab5644f39bce

 Datasets

Supervision provides a set of utils that allow you to load, split, merge, and save datasets in one of the supported formats.

python
import supervision as sv
from roboflow import Roboflow

project = Roboflow().workspace("WORKSPACE_ID").project("PROJECT_ID")
dataset = project.version("PROJECT_VERSION").download("coco")

ds = sv.DetectionDataset.from_coco(
    images_directory_path=f"{dataset.location}/train",
    annotations_path=f"{dataset.location}/train/_annotations.coco.json",
)

path, image, annotation = ds[0]
 loads image on demand

for path, image, annotation in ds:
     loads image on demand
    pass



👉 more dataset utils

- load

  python
  dataset = sv.DetectionDataset.from_yolo(
      images_directory_path=...,
      annotations_dire

Top issues

Discussions

Latest release

supervision-0.31.5 0.31.5 2026-11-05
v0.31.5: Line counts through occlusion, the exact clipper for oriented boxes, and right-to-left labels

Right-to-left labels, line counting that survives occlusion, and a batch of edge-case fixes across annotators, exports and the NumPy fallback.

- LineZone counts objects that are hidden for a few frames while they cross the line.
- Arabic and Hebrew labels render correctly with the new rtl extra.
- Oriented-box IoU, NMS and metrics now use the exact clipper on OpenCV installs.
- Annotating a Pillow image keeps its transparency and untouched pixels.
- Heat maps and ellipse halos now w

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON