Building an Offside Detection System With Vision AI

Roboflow
3,377 views •

In this video, we walk through how to build an offside VAR (video assistant referee) system that runs on a single camera. The semi-automated offside systems used at the top of professional soccer are impressive engineering, but they can cost over $1 million to install, rely on a rig of synchronized cameras around the stadium, and need a team of operators in a control room. We show how to reproduce that same analysis from a single camera view, using open computer vision tools, for under $2 a match. We explain the full pipeline, from finding the goal lines with HSV color detection (no GPU and no training data) to detecting players with RF-DETR and reconstructing selected players in 3D with Meta's SAM 3D Body. We then demonstrate the finished tool live, scrubbing to the offside frame and generating a 3D scene with a verdict in seconds, on both 2026 World Cup footage and an amateur game. A side-by-side with FIFA's official VAR image shows how close a single-camera system can get. = Chapters = 0:00 Introduction: The Offside Problem 1:06 The Pipeline: From Clip to Verdict 1:27 Finding Goal Lines With HSV Detection 2:53 Detecting Players With RF-DETR 3:23 Building the Workflow 4:53 3D Reconstruction With SAM 3D Body 6:23 Live Demo: Testing on Professional and Amateur Matches 10:51 Duplicating the Project and Comparing with Official Systems = Resources = Duplicate the Hugging Face Space: https://huggingface.co/spaces/mirrash7/VAR Fork the Roboflow Workflow: https://app.roboflow.com/workflows/embed/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3b3JrZmxvd0lkIjoiVHR1ZVZBckpzc3h1dXlRRW9tU1kiLCJ3b3Jrc3BhY2VJZCI6InhRb2tXemt2ajJPWDNVVmRFRE5GWktBTTVYdTEiLCJ1c2VySWQiOiJ4UW9rV3prdmoyT1gzVVZkRURORlpLQU01WHUxIiwiaWF0IjoxNzg0MzAwMTI1fQ.b9vV66sNLbMj6_BDMsJyCjyqYtzdABjkGgYf_uI5Hts RF-DETR (open source): https://github.com/roboflow/rf-detr SAM 3D Body, code and weights (Meta): https://github.com/facebookresearch/sam-3d-body Try SAM 3D Body in your browser (Meta playground): https://aidemos.meta.com/segment-anything/editor/convert-body-to-3d Join a future live session: https://roboflow.com/webinar

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close