SlideShare a Scribd company logo
1 of 37
Chance detection in football broadcasts
Feature extraction and classification in football
streams using vision and deep learning
Auke vanderSchaar – Stratagem Technologies – London Machine Learning Meetup – 11 December 2017
Chance detection - Stratagem Technologies 2
Stratagem Technologies
● Stratagem Technologies is a machine learning financial technology
company focused on sports betting
– Sports prediction as an alternative financial asset class
● Predictive modeling requires historical data
● Trading based on in-play predictions requires online (real-time) data
● Fortunately, sport broadcast videos are ubiquitous and a rich source
of both historical and real-time information at a reasonable cost
● Challenge: how to exploit this information to improve trading?
– Chance detection (Focus is on detection, not on anticipating chances!)
Chance detection - Stratagem Technologies 3
Why chance detection?
● Chance: shot (attempt) on goal
● Chances occur more frequently than goals
– a more meaningful statistic and can signify momentum in football games.
● Human analysts annotate chances in football matches in more than
20 leagues.
– A football match has approx 20 chances per game
– Chances are divided in 6 categories. From “poor” to “superb”
– Goal conversion rate for each category is known (next slide)
– Annotations are used as input to prediction models for trading
– However, they are not precise enough for training a computer vision model
● Precision of tagging is approx. 1 second => very poor
Chance detection - Stratagem Technologies 4
Chance types
What is the conversion rate of each chance type to a goal?
● Known and exploited for trading
● E.g. for ‘superb’ (unmissable) chances such as clear open nets, rate ~
0.8 (8 out 10 superb chances result in a goal)
Chance detection - Stratagem Technologies 5
Detecting Chances – Challenges for Computer
Vision
● Small Field of View (FOV), short scenes, replays and close-ups prevent building up a
consistent view over time and space.
● Unbalanced
– The duration of a chance is approx 1-2 seconds and thus only 1% of a game is part of a chance.
– One season of one league of approx 300 games has (only) 6000 chances and results in 450 hours (40M
frames) of video.
● Difference between “a chance” and “not a chance” is subtle
– Touched by an attacking player or not makes the difference.
● Noisy labels
– Sometimes a replay is tagged
– Some chances are missed
– Chances close to each other are collapsed into one
Chance detection - Stratagem Technologies 6
Chances – “negative” samples
Chance detection - Stratagem Technologies 7
Chance - “positive” samples
Chance detection - Stratagem Technologies 8
Datasets
The dataset grows by approx 300 matches (450 hours) per week!
– 600 fixtures accurately annotated, used for training and validation/testing (and
increasing). Images from one fixture can only be in one (training/test) set.
– 40 fixtures holdout set.These are never used for training or validation by any of the
systems.
– 1100 fixtures from last season from four major leagues processed for downstream
evaluation
Chance detection - Stratagem Technologies 9
Unique challenges
● Not only unbalanced but difference between positive and negative sample
set is small
– A limited amount of positive samples
● The mapping of the ground truth (annotations) to video frames is not 1:1
– Complicates a data driven approach but rule based approaches are brittle
● 1000s hours of video limits the amount of processing possible and rules out
more sophisticated methods
– Any promising method must be evaluated on numerous videos.
● Only then the impact upon the precision will be become clear
→ exploit the video!
● Raise the signal from the noise
Chance detection - Stratagem Technologies 10
What is the aim of the Computer Vision
systems?
Each system takes a video as input and produces a list of chances, at which side of the field
(attacking team) and the game time at which they occurred as output
3 alternatives: why?
● Football vision
– Object detection and camera view to birds’ eye view conversion
– A high level feature extractor that can be used as input to an ML algorithm trained to detect chances
● ConvNet feature extractor
– Off the shelf deep state of the art single model neural network (CNN) with the classification layer removed.
– Train a ML algorithm using the features of the extractor as input
● ConvNet End to End
– Neural net trained end-to-end to do chance detection
Chance detection - Stratagem Technologies 11
System requirements
Processing (large number of) videos and training models is very
resource intensive
– Best fast method (best speed/quality trade off)
– A system should process approx 20 to 30 fixtures per day
Must generalize to all leagues
• Robust to different viewing conditions
Chance detection - Stratagem Technologies 12
Examples viewing conditions
Chance detection - Stratagem Technologies 13
Football vision
Performs object detection and converts the position of each object
(player) to a 2D field position
Chance detection - Stratagem Technologies 14
Vision – object detection
●
RCNN1
– Two stage detector
– Region proposals: more precise but slower
– Quoted: ~5 fps @ 600x400
● Football vision Python
– Detector for players based on Resnet50
– Detector for ball and goalpost corner based
onVGG16
– 1 fps
●
SSD2
– Single phase detector
– Quoted: ~ 45 fps @ 300x300
– 600x600 @ 15 fps
● Ball is small
– Faster but less precise
● Football vision C++
– VGG16
– 15 fps
1
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
2
SSD: Single Shot MultiBox Detector
3
Speed/accuracy trade-offs for modern convolutional object detectors
Chance detection - Stratagem Technologies 15
Vision - Homography
● A 2D plane (e.g. a football field) viewed from different viewpoints are related by a
homographic transform.
● The transform matrix H can be calculated by finding at least four corresponding
points in the two views.
1
Multiple View Geometry in Computer Vision, Zisserman et al
2
OpenCV tutorial
3
Chess board image credit: 2D projective transformations (homographies) Christiano Gava
Chance detection - Stratagem Technologies 16
Vision – Homography – pitch line detection
● With a broadcast there is only one camera view (monocular)
– Follows the action by panning, zooming and sometimes from different view points.
– Pitch line can serve as reference point
– Use pitch line detection to find key markers the camera view
– The position of the pitch line is known in the 2D field (birds eye) view
● There exist no ground truth data-set for pitch line detection
– Excludes a ML (data driven) approach.
● use rule based pitch line detection
– Which can be used to generate data for training a neural net (experimental)
Chance detection - Stratagem Technologies 17
Vision – pitch line detection -Hough transform
Chance detection - Stratagem Technologies 18
Vision – Homography – pitch line detection
Chance detection - Stratagem Technologies 19
Vision – Homography – pitch line detection
Chance detection - Stratagem Technologies 20
Vision - System
Chance detection - Stratagem Technologies 21
Vision – Homography – DL (experimental)
●
Deep Image Homography1
– A neural net can learn the relative homographic parameters given two images related by
a homography
● Can it also learn when only one image is given together with the
homographic parameters?
– The transform parameters are produced by “football vision”.
1
Deep Image Homography Estimation (archive)
Chance detection - Stratagem Technologies 22
Vision – Homography – DL - visualization
2
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
● .
What does the DNN use to find the homographic transform parameters?
- visualize with GRAD-CAM
Chance detection - Stratagem Technologies 23
Vision – Homography – DL - visualization
Chance detection - Stratagem Technologies 24
Why CNN?
● Data driven
● Fast (faster than real-time, framerate > 25 fps)
● Development is also faster
● Training scales easily to large number of
fixtures
● From a system point of view simple
● Can combine multiple detectors
Chance detection - Stratagem Technologies 25
Deep Learning - CNN feature extractor
● Take a state-of-the-art single model CNN architecture, with weights
trained on ImageNet (ILSVRC), remove the last layer and use it as a
feature extractor.
– InceptionV3 (GoogLeNet) @ 299x299
– Features learned for classification on ImageNet useful for other related domains.
ILSVRC: Imagenet Large Scale Visual Recognition Challenge
2
Inception: Rethinking the Inception Architecture for Computer Vision
3
Feature extraction: CNN Features off-the-shelf: an Astounding Baseline for Recognition
Chance detection - Stratagem Technologies 26
Deep Learning - CNN feature extractor – cont
– Feature extraction takes approx 4 hours per football game
● Results in 500MB of compressed data per football match
– Once extracted training and classification is relative fast.
● Facilitates experimentation
● Single frame classifier
● Multi frame classifier: combine multiple frames (order not relevant) per prediction.
● Sequence classifier (order frames relevant)
– Loading all features of the training set (400 fixtures) is large.
● PCA reduces the accuracy
● Averaging features over frames seem to have little impact
– Aggregate features per second (25 frames)
● Large number of samples excludes many ML algorithms
– LDA performed best.
Chance detection - Stratagem Technologies 27
Deep Learning - CNN feature extractor – cont
Chance detection - Stratagem Technologies 28
CNN feature extractor – chance classifier
Chance detection - Stratagem Technologies 29
CNN end-to-end
● Use a state-of-the-art single model CNN (VGG, Resnet, InceptionVx)
remove the classification layer and add your own classifier layer on
top
Allows choice in
– parameters (resolution, image style (flow), …)
– number of targets
● left/right detector
– finetuning
– Domain specific visualization
but requires often training from scratch
Chance detection - Stratagem Technologies 30
CNN end-to-end
● Required number of pictures for training
– 400 (fixtures) * 20 (chances) * 4 second window * 2 images/second * 2 (lbl 0/1)= ~ 50 - 200K
● Hyper-parameter search space is large
– Early pruning
● Training and evaluation takes time and early feedback is required to make
progress and avoiding wasting a scarce resource
● Start with a small numbers of images
– All models are evaluated against a fixed set of images while training is ongoing.
– Only the top performers are allowed to the next stage (while optionally keeping the trained weights)
– Likewise the evaluation of the top performers while the training is ongoing is being evaluated against
the ground truth (human analyst annotations).
Chance detection - Stratagem Technologies 31
CNN end to end - cont
Chance detection - Stratagem Technologies 32
Metric – Precision Recall F1-score
● Performance of minority class
● Precision: fraction of true positives of all detected positives (predicted
chances)
● Recall: fraction of true detected positives out of all positives
● F1 score: harmonic mean of precision and recall
● Not averaged but calculated after taking all detections from all fixtures
into account
● Example: Fixture with 20 chances Chance detector detects 30
chances of which 10 are correct
● Precision = 10/30 = 0.3
● Recall = 10/20 = 0.5
● F1 = 0.375
Chance detection - Stratagem Technologies 33
Results
Chance detection - Stratagem Technologies 34
Results
● Noisy labels
-Train with the largest amount of images, for the longest
amount of time with a decaying learning rate schedule with
SGD + momentum
● Promising results are achieved with resnet50 @ 600x400 using
ball positions as extra regression target
● Ball positions are generated by football vision
● Only 200 fixtures with ball positions are available
Chance detection - Stratagem Technologies 35
Discussion
● There is now a chance detector with high recall which detects
chances or chance like situations reasonable precise in time.
– A chance is not a (long) sequence
– A chance is a very short event where the attacking player purposely pushes the ball
towards the goal
● With this detector we can thus create a dataset with only (known)
chances and chance like situations and further refine this
Chance detection - Stratagem Technologies 36
Conclusion
● Classical CV methods produce very general, high level, easy to
interpret features that can be used as input to many different types of
ML models
– Not a good chance detector!
– Very useful to generate labels which are used to improve the CNN
● CNN feature extractor is flexible, facilities experimentation and has
initially the upper hand.
● CNN end to end results in the best (sharpest), fastest and from a
system POV simplest classifier
● Chance detection results in a useful signal for trading
Chance detection - Stratagem Technologies 37
The end

More Related Content

What's hot

What's hot (20)

Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Pattern recognition
Pattern recognitionPattern recognition
Pattern recognition
 
Informática na logística
Informática na logísticaInformática na logística
Informática na logística
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
NLP Bootcamp
NLP BootcampNLP Bootcamp
NLP Bootcamp
 
KNN
KNNKNN
KNN
 
Matrix Factorization
Matrix FactorizationMatrix Factorization
Matrix Factorization
 
Relational knowledge distillation
Relational knowledge distillationRelational knowledge distillation
Relational knowledge distillation
 
Textual & Sentiment Analysis of Movie Reviews
Textual & Sentiment Analysis of Movie ReviewsTextual & Sentiment Analysis of Movie Reviews
Textual & Sentiment Analysis of Movie Reviews
 
Variable neighborhood search
Variable neighborhood searchVariable neighborhood search
Variable neighborhood search
 
Semi-Supervised Learning
Semi-Supervised LearningSemi-Supervised Learning
Semi-Supervised Learning
 
Csc446: Pattern Recognition
Csc446: Pattern Recognition Csc446: Pattern Recognition
Csc446: Pattern Recognition
 
BERT
BERTBERT
BERT
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Movies Recommendation System
Movies Recommendation SystemMovies Recommendation System
Movies Recommendation System
 
Model evaluation - machine learning
Model evaluation - machine learningModel evaluation - machine learning
Model evaluation - machine learning
 
Natural language processing
Natural language processingNatural language processing
Natural language processing
 
Ontology Learning
Ontology LearningOntology Learning
Ontology Learning
 
Ant Colony Optimization: Routing
Ant Colony Optimization: RoutingAnt Colony Optimization: Routing
Ant Colony Optimization: Routing
 
What is pattern recognition (lecture 4 of 6)
What is pattern recognition (lecture 4 of 6)What is pattern recognition (lecture 4 of 6)
What is pattern recognition (lecture 4 of 6)
 

Similar to Chance detection in football broadcasts

Decision Review System
Decision Review SystemDecision Review System
Decision Review SystemIRJET Journal
 
A-Eye: Automating the role of third umpire in the game of cricket
A-Eye: Automating the role of third umpire in the game of cricketA-Eye: Automating the role of third umpire in the game of cricket
A-Eye: Automating the role of third umpire in the game of cricketAneesh Tg
 
A Semantic content detection for soccer video based on finite state machine -...
A Semantic content detection for soccer video based on finite state machine -...A Semantic content detection for soccer video based on finite state machine -...
A Semantic content detection for soccer video based on finite state machine -...Anan Atila
 
Reinforcement Learning for Self Driving Cars
Reinforcement Learning for Self Driving CarsReinforcement Learning for Self Driving Cars
Reinforcement Learning for Self Driving CarsSneha Ravikumar
 
Tales from the Optimization Trenches - Unite Copenhagen 2019
Tales from the Optimization Trenches - Unite Copenhagen 2019Tales from the Optimization Trenches - Unite Copenhagen 2019
Tales from the Optimization Trenches - Unite Copenhagen 2019Unity Technologies
 
Getting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsGetting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsIntel® Software
 
Rapid Laser Scanning the process
Rapid Laser Scanning the processRapid Laser Scanning the process
Rapid Laser Scanning the processSeeview Solutions
 
Presentation Object Recognition And Tracking Project
Presentation Object Recognition And Tracking ProjectPresentation Object Recognition And Tracking Project
Presentation Object Recognition And Tracking ProjectPrathamesh Joshi
 
“Computer Vision in Sports: Scalable Solutions for Downmarkets,” a Presentati...
“Computer Vision in Sports: Scalable Solutions for Downmarkets,” a Presentati...“Computer Vision in Sports: Scalable Solutions for Downmarkets,” a Presentati...
“Computer Vision in Sports: Scalable Solutions for Downmarkets,” a Presentati...Edge AI and Vision Alliance
 
MTG-INRPS final presentation
MTG-INRPS final presentationMTG-INRPS final presentation
MTG-INRPS final presentationpjjurado
 
A comparative study of hawk eye and goal line
A comparative study of hawk eye and goal lineA comparative study of hawk eye and goal line
A comparative study of hawk eye and goal lineGaurav Handa
 
Traffic Congestion using IOT
Traffic Congestion using IOTTraffic Congestion using IOT
Traffic Congestion using IOTSayantanGhosh58
 
Hawk Eye Technology by Amit Singh
Hawk Eye Technology by Amit SinghHawk Eye Technology by Amit Singh
Hawk Eye Technology by Amit SinghAmit Singh
 
SYM iSpectrum Business Cases
SYM iSpectrum Business CasesSYM iSpectrum Business Cases
SYM iSpectrum Business CasesTodd Masters
 
Real time-image-processing-applied-to-traffic-queue-detection-algorithm
Real time-image-processing-applied-to-traffic-queue-detection-algorithmReal time-image-processing-applied-to-traffic-queue-detection-algorithm
Real time-image-processing-applied-to-traffic-queue-detection-algorithmajayrampelli
 
Imaging automotive 2015 addfor v002
Imaging automotive 2015   addfor v002Imaging automotive 2015   addfor v002
Imaging automotive 2015 addfor v002Enrico Busto
 
Imaging automotive 2015 addfor v002
Imaging automotive 2015   addfor v002Imaging automotive 2015   addfor v002
Imaging automotive 2015 addfor v002Enrico Busto
 
Alpha go 16110226_김영우
Alpha go 16110226_김영우Alpha go 16110226_김영우
Alpha go 16110226_김영우영우 김
 
Anomaly Detection using Deep Auto-Encoders
Anomaly Detection using Deep Auto-EncodersAnomaly Detection using Deep Auto-Encoders
Anomaly Detection using Deep Auto-EncodersGianmario Spacagna
 
Streaming Analytics: It's Not the Same Game
Streaming Analytics: It's Not the Same GameStreaming Analytics: It's Not the Same Game
Streaming Analytics: It's Not the Same GameNumenta
 

Similar to Chance detection in football broadcasts (20)

Decision Review System
Decision Review SystemDecision Review System
Decision Review System
 
A-Eye: Automating the role of third umpire in the game of cricket
A-Eye: Automating the role of third umpire in the game of cricketA-Eye: Automating the role of third umpire in the game of cricket
A-Eye: Automating the role of third umpire in the game of cricket
 
A Semantic content detection for soccer video based on finite state machine -...
A Semantic content detection for soccer video based on finite state machine -...A Semantic content detection for soccer video based on finite state machine -...
A Semantic content detection for soccer video based on finite state machine -...
 
Reinforcement Learning for Self Driving Cars
Reinforcement Learning for Self Driving CarsReinforcement Learning for Self Driving Cars
Reinforcement Learning for Self Driving Cars
 
Tales from the Optimization Trenches - Unite Copenhagen 2019
Tales from the Optimization Trenches - Unite Copenhagen 2019Tales from the Optimization Trenches - Unite Copenhagen 2019
Tales from the Optimization Trenches - Unite Copenhagen 2019
 
Getting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsGetting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® Graphics
 
Rapid Laser Scanning the process
Rapid Laser Scanning the processRapid Laser Scanning the process
Rapid Laser Scanning the process
 
Presentation Object Recognition And Tracking Project
Presentation Object Recognition And Tracking ProjectPresentation Object Recognition And Tracking Project
Presentation Object Recognition And Tracking Project
 
“Computer Vision in Sports: Scalable Solutions for Downmarkets,” a Presentati...
“Computer Vision in Sports: Scalable Solutions for Downmarkets,” a Presentati...“Computer Vision in Sports: Scalable Solutions for Downmarkets,” a Presentati...
“Computer Vision in Sports: Scalable Solutions for Downmarkets,” a Presentati...
 
MTG-INRPS final presentation
MTG-INRPS final presentationMTG-INRPS final presentation
MTG-INRPS final presentation
 
A comparative study of hawk eye and goal line
A comparative study of hawk eye and goal lineA comparative study of hawk eye and goal line
A comparative study of hawk eye and goal line
 
Traffic Congestion using IOT
Traffic Congestion using IOTTraffic Congestion using IOT
Traffic Congestion using IOT
 
Hawk Eye Technology by Amit Singh
Hawk Eye Technology by Amit SinghHawk Eye Technology by Amit Singh
Hawk Eye Technology by Amit Singh
 
SYM iSpectrum Business Cases
SYM iSpectrum Business CasesSYM iSpectrum Business Cases
SYM iSpectrum Business Cases
 
Real time-image-processing-applied-to-traffic-queue-detection-algorithm
Real time-image-processing-applied-to-traffic-queue-detection-algorithmReal time-image-processing-applied-to-traffic-queue-detection-algorithm
Real time-image-processing-applied-to-traffic-queue-detection-algorithm
 
Imaging automotive 2015 addfor v002
Imaging automotive 2015   addfor v002Imaging automotive 2015   addfor v002
Imaging automotive 2015 addfor v002
 
Imaging automotive 2015 addfor v002
Imaging automotive 2015   addfor v002Imaging automotive 2015   addfor v002
Imaging automotive 2015 addfor v002
 
Alpha go 16110226_김영우
Alpha go 16110226_김영우Alpha go 16110226_김영우
Alpha go 16110226_김영우
 
Anomaly Detection using Deep Auto-Encoders
Anomaly Detection using Deep Auto-EncodersAnomaly Detection using Deep Auto-Encoders
Anomaly Detection using Deep Auto-Encoders
 
Streaming Analytics: It's Not the Same Game
Streaming Analytics: It's Not the Same GameStreaming Analytics: It's Not the Same Game
Streaming Analytics: It's Not the Same Game
 

Recently uploaded

Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPirithiRaju
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfmuntazimhurra
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)Areesha Ahmad
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfSumit Kumar yadav
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsSumit Kumar yadav
 
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisDiwakar Mishra
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 

Recently uploaded (20)

Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdf
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 

Chance detection in football broadcasts

  • 1. Chance detection in football broadcasts Feature extraction and classification in football streams using vision and deep learning Auke vanderSchaar – Stratagem Technologies – London Machine Learning Meetup – 11 December 2017
  • 2. Chance detection - Stratagem Technologies 2 Stratagem Technologies ● Stratagem Technologies is a machine learning financial technology company focused on sports betting – Sports prediction as an alternative financial asset class ● Predictive modeling requires historical data ● Trading based on in-play predictions requires online (real-time) data ● Fortunately, sport broadcast videos are ubiquitous and a rich source of both historical and real-time information at a reasonable cost ● Challenge: how to exploit this information to improve trading? – Chance detection (Focus is on detection, not on anticipating chances!)
  • 3. Chance detection - Stratagem Technologies 3 Why chance detection? ● Chance: shot (attempt) on goal ● Chances occur more frequently than goals – a more meaningful statistic and can signify momentum in football games. ● Human analysts annotate chances in football matches in more than 20 leagues. – A football match has approx 20 chances per game – Chances are divided in 6 categories. From “poor” to “superb” – Goal conversion rate for each category is known (next slide) – Annotations are used as input to prediction models for trading – However, they are not precise enough for training a computer vision model ● Precision of tagging is approx. 1 second => very poor
  • 4. Chance detection - Stratagem Technologies 4 Chance types What is the conversion rate of each chance type to a goal? ● Known and exploited for trading ● E.g. for ‘superb’ (unmissable) chances such as clear open nets, rate ~ 0.8 (8 out 10 superb chances result in a goal)
  • 5. Chance detection - Stratagem Technologies 5 Detecting Chances – Challenges for Computer Vision ● Small Field of View (FOV), short scenes, replays and close-ups prevent building up a consistent view over time and space. ● Unbalanced – The duration of a chance is approx 1-2 seconds and thus only 1% of a game is part of a chance. – One season of one league of approx 300 games has (only) 6000 chances and results in 450 hours (40M frames) of video. ● Difference between “a chance” and “not a chance” is subtle – Touched by an attacking player or not makes the difference. ● Noisy labels – Sometimes a replay is tagged – Some chances are missed – Chances close to each other are collapsed into one
  • 6. Chance detection - Stratagem Technologies 6 Chances – “negative” samples
  • 7. Chance detection - Stratagem Technologies 7 Chance - “positive” samples
  • 8. Chance detection - Stratagem Technologies 8 Datasets The dataset grows by approx 300 matches (450 hours) per week! – 600 fixtures accurately annotated, used for training and validation/testing (and increasing). Images from one fixture can only be in one (training/test) set. – 40 fixtures holdout set.These are never used for training or validation by any of the systems. – 1100 fixtures from last season from four major leagues processed for downstream evaluation
  • 9. Chance detection - Stratagem Technologies 9 Unique challenges ● Not only unbalanced but difference between positive and negative sample set is small – A limited amount of positive samples ● The mapping of the ground truth (annotations) to video frames is not 1:1 – Complicates a data driven approach but rule based approaches are brittle ● 1000s hours of video limits the amount of processing possible and rules out more sophisticated methods – Any promising method must be evaluated on numerous videos. ● Only then the impact upon the precision will be become clear → exploit the video! ● Raise the signal from the noise
  • 10. Chance detection - Stratagem Technologies 10 What is the aim of the Computer Vision systems? Each system takes a video as input and produces a list of chances, at which side of the field (attacking team) and the game time at which they occurred as output 3 alternatives: why? ● Football vision – Object detection and camera view to birds’ eye view conversion – A high level feature extractor that can be used as input to an ML algorithm trained to detect chances ● ConvNet feature extractor – Off the shelf deep state of the art single model neural network (CNN) with the classification layer removed. – Train a ML algorithm using the features of the extractor as input ● ConvNet End to End – Neural net trained end-to-end to do chance detection
  • 11. Chance detection - Stratagem Technologies 11 System requirements Processing (large number of) videos and training models is very resource intensive – Best fast method (best speed/quality trade off) – A system should process approx 20 to 30 fixtures per day Must generalize to all leagues • Robust to different viewing conditions
  • 12. Chance detection - Stratagem Technologies 12 Examples viewing conditions
  • 13. Chance detection - Stratagem Technologies 13 Football vision Performs object detection and converts the position of each object (player) to a 2D field position
  • 14. Chance detection - Stratagem Technologies 14 Vision – object detection ● RCNN1 – Two stage detector – Region proposals: more precise but slower – Quoted: ~5 fps @ 600x400 ● Football vision Python – Detector for players based on Resnet50 – Detector for ball and goalpost corner based onVGG16 – 1 fps ● SSD2 – Single phase detector – Quoted: ~ 45 fps @ 300x300 – 600x600 @ 15 fps ● Ball is small – Faster but less precise ● Football vision C++ – VGG16 – 15 fps 1 Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks 2 SSD: Single Shot MultiBox Detector 3 Speed/accuracy trade-offs for modern convolutional object detectors
  • 15. Chance detection - Stratagem Technologies 15 Vision - Homography ● A 2D plane (e.g. a football field) viewed from different viewpoints are related by a homographic transform. ● The transform matrix H can be calculated by finding at least four corresponding points in the two views. 1 Multiple View Geometry in Computer Vision, Zisserman et al 2 OpenCV tutorial 3 Chess board image credit: 2D projective transformations (homographies) Christiano Gava
  • 16. Chance detection - Stratagem Technologies 16 Vision – Homography – pitch line detection ● With a broadcast there is only one camera view (monocular) – Follows the action by panning, zooming and sometimes from different view points. – Pitch line can serve as reference point – Use pitch line detection to find key markers the camera view – The position of the pitch line is known in the 2D field (birds eye) view ● There exist no ground truth data-set for pitch line detection – Excludes a ML (data driven) approach. ● use rule based pitch line detection – Which can be used to generate data for training a neural net (experimental)
  • 17. Chance detection - Stratagem Technologies 17 Vision – pitch line detection -Hough transform
  • 18. Chance detection - Stratagem Technologies 18 Vision – Homography – pitch line detection
  • 19. Chance detection - Stratagem Technologies 19 Vision – Homography – pitch line detection
  • 20. Chance detection - Stratagem Technologies 20 Vision - System
  • 21. Chance detection - Stratagem Technologies 21 Vision – Homography – DL (experimental) ● Deep Image Homography1 – A neural net can learn the relative homographic parameters given two images related by a homography ● Can it also learn when only one image is given together with the homographic parameters? – The transform parameters are produced by “football vision”. 1 Deep Image Homography Estimation (archive)
  • 22. Chance detection - Stratagem Technologies 22 Vision – Homography – DL - visualization 2 Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization ● . What does the DNN use to find the homographic transform parameters? - visualize with GRAD-CAM
  • 23. Chance detection - Stratagem Technologies 23 Vision – Homography – DL - visualization
  • 24. Chance detection - Stratagem Technologies 24 Why CNN? ● Data driven ● Fast (faster than real-time, framerate > 25 fps) ● Development is also faster ● Training scales easily to large number of fixtures ● From a system point of view simple ● Can combine multiple detectors
  • 25. Chance detection - Stratagem Technologies 25 Deep Learning - CNN feature extractor ● Take a state-of-the-art single model CNN architecture, with weights trained on ImageNet (ILSVRC), remove the last layer and use it as a feature extractor. – InceptionV3 (GoogLeNet) @ 299x299 – Features learned for classification on ImageNet useful for other related domains. ILSVRC: Imagenet Large Scale Visual Recognition Challenge 2 Inception: Rethinking the Inception Architecture for Computer Vision 3 Feature extraction: CNN Features off-the-shelf: an Astounding Baseline for Recognition
  • 26. Chance detection - Stratagem Technologies 26 Deep Learning - CNN feature extractor – cont – Feature extraction takes approx 4 hours per football game ● Results in 500MB of compressed data per football match – Once extracted training and classification is relative fast. ● Facilitates experimentation ● Single frame classifier ● Multi frame classifier: combine multiple frames (order not relevant) per prediction. ● Sequence classifier (order frames relevant) – Loading all features of the training set (400 fixtures) is large. ● PCA reduces the accuracy ● Averaging features over frames seem to have little impact – Aggregate features per second (25 frames) ● Large number of samples excludes many ML algorithms – LDA performed best.
  • 27. Chance detection - Stratagem Technologies 27 Deep Learning - CNN feature extractor – cont
  • 28. Chance detection - Stratagem Technologies 28 CNN feature extractor – chance classifier
  • 29. Chance detection - Stratagem Technologies 29 CNN end-to-end ● Use a state-of-the-art single model CNN (VGG, Resnet, InceptionVx) remove the classification layer and add your own classifier layer on top Allows choice in – parameters (resolution, image style (flow), …) – number of targets ● left/right detector – finetuning – Domain specific visualization but requires often training from scratch
  • 30. Chance detection - Stratagem Technologies 30 CNN end-to-end ● Required number of pictures for training – 400 (fixtures) * 20 (chances) * 4 second window * 2 images/second * 2 (lbl 0/1)= ~ 50 - 200K ● Hyper-parameter search space is large – Early pruning ● Training and evaluation takes time and early feedback is required to make progress and avoiding wasting a scarce resource ● Start with a small numbers of images – All models are evaluated against a fixed set of images while training is ongoing. – Only the top performers are allowed to the next stage (while optionally keeping the trained weights) – Likewise the evaluation of the top performers while the training is ongoing is being evaluated against the ground truth (human analyst annotations).
  • 31. Chance detection - Stratagem Technologies 31 CNN end to end - cont
  • 32. Chance detection - Stratagem Technologies 32 Metric – Precision Recall F1-score ● Performance of minority class ● Precision: fraction of true positives of all detected positives (predicted chances) ● Recall: fraction of true detected positives out of all positives ● F1 score: harmonic mean of precision and recall ● Not averaged but calculated after taking all detections from all fixtures into account ● Example: Fixture with 20 chances Chance detector detects 30 chances of which 10 are correct ● Precision = 10/30 = 0.3 ● Recall = 10/20 = 0.5 ● F1 = 0.375
  • 33. Chance detection - Stratagem Technologies 33 Results
  • 34. Chance detection - Stratagem Technologies 34 Results ● Noisy labels -Train with the largest amount of images, for the longest amount of time with a decaying learning rate schedule with SGD + momentum ● Promising results are achieved with resnet50 @ 600x400 using ball positions as extra regression target ● Ball positions are generated by football vision ● Only 200 fixtures with ball positions are available
  • 35. Chance detection - Stratagem Technologies 35 Discussion ● There is now a chance detector with high recall which detects chances or chance like situations reasonable precise in time. – A chance is not a (long) sequence – A chance is a very short event where the attacking player purposely pushes the ball towards the goal ● With this detector we can thus create a dataset with only (known) chances and chance like situations and further refine this
  • 36. Chance detection - Stratagem Technologies 36 Conclusion ● Classical CV methods produce very general, high level, easy to interpret features that can be used as input to many different types of ML models – Not a good chance detector! – Very useful to generate labels which are used to improve the CNN ● CNN feature extractor is flexible, facilities experimentation and has initially the upper hand. ● CNN end to end results in the best (sharpest), fastest and from a system POV simplest classifier ● Chance detection results in a useful signal for trading
  • 37. Chance detection - Stratagem Technologies 37 The end

Editor's Notes

  1. Notes
  2. -hg -hggradcam -visionclip
  3. -hg -hggradcam -visionclip