supervision
supervision copied to clipboard
Refactor: Optimize annotate method in BoxAnnotator for performance and scalability
trafficstars
- Precomputed colors for detections to eliminate redundant function calls.
- Leveraged NumPy for batch processing of bounding box coordinates.
- Simplified annotation loop to reduce computational overhead.
- Improved code clarity by minimizing repetitive checks and type assertions.
- Enhanced scalability for handling large-scale image annotation tasks.
@suyashw thanks a lot for your interest in supervision. @suyashw / @soumik12345 have any of you measured annotator performance before and after that change?