How roboflow/supervision works
Supervision is a model-agnostic computer-vision toolkit. Its principal workflow accepts model results as standardized detections, then supports visualization; dataset loading and format conversion are a parallel workflow. The package also provides detection processing, depth and keypoint representations, classification, and evaluation. The graph follows documented workflows and relationships shown in the source index; unsampled subsystems are included where the tree and README identify capabilities, but their internal call paths are not inferred.
Main entry points: detection/core.py Detections · dataset/core.py Detection Dataset · annotators/core.py Annotators · metrics/core.py Evaluation Metrics
Components 21
Detection Data
- Detections
src/supervision/detection/core.py - Compact Masks
src/supervision/detection/compact_mask.py - Detection Geometry
src/supervision/detection/utils/iou_and_nms.py - Detection Tools
src/supervision/detection/tools - Detection Converters
src/supervision/detection/utils/converters.py
Visualization
- Annotators
src/supervision/annotators/core.py - Color System
src/supervision/draw/color.py - OpenCV Compatibility
src/supervision/_cv2
Dataset Workflows
- Detection Dataset
src/supervision/dataset/core.py - Dataset Formats
src/supervision/dataset/formats
Vision Analysis
- Classification Data
src/supervision/classification/core.py - Depth Processing
src/supervision/depth/core.py - Keypoints
src/supervision/key_points/core.py - Evaluation Metrics
src/supervision/metrics/core.py - Geometry Primitives
src/supervision/geometry/core.py - Shared Data Fields
src/supervision/config.py
Image Utilities
- Image Utilities
src/supervision/utils/image.py - Video Utilities
src/supervision/utils/video.py - Array Conversion
src/supervision/utils/conversion.py
Other components
- Toolkit User
- Vision Model
Connections 22
- Vision Model → Detections: yields results
README.md - Toolkit User → Annotators: annotates with
README.md - Detections → Annotators: visualizes
README.md - Toolkit User → Detection Dataset: loads or saves
README.md - Detection Dataset → Dataset Formats: reads and writes
src/supervision/dataset/core.py - Detections → Compact Masks: uses
src/supervision/detection/core.py - Detections → Detection Geometry: uses overlap ops
src/supervision/detection/core.py - Detections → Detection Converters: converts geometry
src/supervision/detection/core.py - Detections → Detection Tools: supports processing
src/supervision/detection/core.py - Annotators → OpenCV Compatibility: draws through
src/supervision/annotators/core.py - Annotators → Color System: uses colors
src/supervision/annotators/core.py - Detection Dataset → Detections: stores annotations
src/supervision/dataset/core.py - Detection Dataset → Classification Data: supports classification data
src/supervision/dataset/core.py - Depth Processing → Detections: uses detections
src/supervision/depth/core.py - Keypoints → Detections: uses detection utilities
src/supervision/key_points/core.py - Evaluation Metrics → Detections: evaluates detections
src/supervision/metrics/mean_average_precision.py - Evaluation Metrics → Keypoints: evaluates keypoints
src/supervision/metrics/keypoint_mean_average_precision.py - Detections → Geometry Primitives: uses geometry
src/supervision/detection/core.py - Detections → Shared Data Fields: uses shared fields
src/supervision/detection/core.py - Detection Dataset → Shared Data Fields: uses shared fields
src/supervision/dataset/core.py - Image Utilities → Array Conversion: converts images
src/supervision/utils/image.py - Video Utilities → OpenCV Compatibility: uses video backend
src/supervision/utils/video.py