Visualize model detections and manage datasets in one workflow
While models for finding objects in images or videos exist, the code to visually verify results or process them into data often requires rewriting from scratch. supervision is a tool that takes the location and type of objects found by a model, displays them on screen, and handles tasks like splitting datasets or changing formats. It leaves model training to other libraries, allowing you to tidy up the post-processing steps cleanly.
Model-agnostic design
The tool is built to avoid being tied to specific models. You can use any classification, detection, or segmentation model by converting its results into supervision's data structures. Integrations with popular libraries like Ultralytics, Transformers, and MMDetection are already prepared, making it easy to fit into existing code. Some libraries return supervision's data format directly, which simplifies the conversion process.
Visualization and dataset management
Drawing detection results on screen is handled by the annotator module. You can combine various visualization elements such as boxes, labels, and points to display them as desired. Dataset management is also supported. It allows you to load data in COCO, YOLO, and Pascal VOC formats, split it for training and testing, or merge multiple datasets. Additionally, it converts data from one format to another, facilitating data transfer between projects.
Installation and getting started
Install it in a Python 3.10+ environment using the pip install supervision command. If you need additional model libraries, install those packages as well. For example, to use the rfdetr model, run pip install pillow rfdetr.
When to choose this tool
It is suitable for situations where you already have a model for finding objects in images or videos and need to display those results in an app or process them as data. It fits developers who want to focus on post-processing model inference results and data preprocessing, rather than solving everything from training to inference with a single framework. However, supervision does not take responsibility for the model's performance or training process, so model selection and tuning must be handled separately. While documentation and tutorials are abundant, the README lacks explicit guidelines for specific industry standards or security requirements, so additional verification is needed before applying it in those fields.