Detect NBA 3 Second Violations with AI
Blog post from Roboflow
Advancements in computer vision have enabled the development of a system to automatically detect 3-second rule violations in basketball, a challenge for referees due to the game's fast pace. This system, detailed in a blog post by Alexander Dylan Bodner and Piotr Skalski, utilizes multiple AI models including Meta's Segment Anything Model (SAM) for player tracking, YOLOv11 for object and pose detection, and Supervision tools for time counting and zone occupancy detection. The process begins with player detection and tracking across video frames, followed by court keypoint detection to map the painted zone. Pose estimation identifies player body keypoints, particularly ankles, to determine zone entry and exit. The system counts the time a player remains in the paint and flags violations exceeding three seconds, though it currently simplifies the rule by not distinguishing between offensive and defensive roles. This foundational work paves the way for future improvements, such as team classification and active defense detection.