How subbu6699/supervision works
Supervision is a model-agnostic Python computer-vision toolkit: users supply model outputs or datasets, normalize predictions into shared structures, then analyze, visualize, and evaluate them. The README documents model connectors, annotation, and dataset load/split/merge/save workflows; the tree adds zones, inference slicing, keypoints, and metrics. Sampled source confirms the shared detection representation, slicing callback, annotators, dataset core, and evaluation metrics. Other links reflect documented capabilities; unsampled implementation wiring is not inferred.
Main entry points: detection/core.py Detection structure · detection.py Detection metrics · inference_slicer.py Inference slicing · annotators/core.py Frame annotators
Components 22
Model Interop
- Image and video I/O
src/supervision/utils/image.py - Video capture
src/supervision/_cv2/_video.py - Detection structure
src/supervision/detection/core.py - Classification structure
src/supervision/classification/core.py - Keypoint structure
src/supervision/key_points/core.py
Vision Analysis
- Inference slicing
src/supervision/detection/tools/inference_slicer.py - Geometry operations
src/supervision/geometry/core.py - Zone analysis
src/supervision/detection/tools/polygon_zone.py - Line counting
src/supervision/detection/line_zone.py - Detection smoothing
src/supervision/detection/tools/smoother.py - Detection transforms
src/supervision/detection/tools/transformers.py
Visualization
- Frame annotators
src/supervision/annotators/core.py - Pose annotators
src/supervision/key_points/annotators.py - Drawing primitives
src/supervision/draw/base.py
Dataset Workflows
- Dataset operations
src/supervision/dataset/core.py - Dataset formats
src/supervision/dataset/formats - Detection exports
src/supervision/detection/tools/csv_sink.py
Evaluation
- Detection metrics
src/supervision/metrics/detection.py - Mean average precision
src/supervision/metrics/mean_average_precision.py - Mean average recall
src/supervision/metrics/mean_average_recall.py
Other components
- Application developer
- Vision model
Connections 25
- Application developer → Image and video I/O: loads media
- Application developer → Vision model: runs inference
- Vision model → Detection structure: normalizes output
- Vision model → Classification structure: provides results
- Vision model → Keypoint structure: provides poses
- Image and video I/O → Inference slicing: supplies image
- Inference slicing → Vision model: calls callback
- Detection structure → Inference slicing: slice results
- Application developer → Zone analysis: analyzes detections
- Application developer → Line counting: counts crossings
- Application developer → Detection smoothing: smooths detections
- Application developer → Detection transforms: transforms detections
- Application developer → Frame annotators: annotates frame
- Detection structure → Frame annotators: provides predictions
- Frame annotators → Drawing primitives: uses primitives
- Keypoint structure → Pose annotators: provides pose data
- Application developer → Dataset operations: loads or edits data
- Dataset formats → Dataset operations: reads and writes formats
- Detection structure → Dataset operations: supplies annotations
- Application developer → Detection metrics: evaluates predictions
- Detection metrics → Mean average precision: computes mAP
- Detection metrics → Mean average recall: computes mAR
- Detection structure → Detection metrics: provides predictions
- Application developer → Detection exports: exports results
- Detection exports → Detection structure: serializes detections