An open API service indexing awesome lists of open source software.

https://github.com/sharmaabhishekk/interactive-freeze-frames-xg

Interactive site to mess around with xG values
https://github.com/sharmaabhishekk/interactive-freeze-frames-xg

football html-css-javascript tensorflow

Last synced: 4 months ago
JSON representation

Interactive site to mess around with xG values

Awesome Lists containing this project

README

          

# xG Board

This site is meant as a demo to go along with this blog post [xG with CNNs]("https://www.opengoalapp.com/xg-with-cnns-full-study"). The Expected Goals (xG) model developed there is a CNN-based model trained on Statsbomb's freeze frames dataset. The features it takes into account are:

* shot location
* location of the goalkeeper
* location of the defenders

## Model details

To learn more about the model, it is strongly suggested you read the full write-up linked above. The important part is the model architecture and the inputs.
For each shot scenario, the model takes into account three things - the location of the ball, the location of defenders, and the location of the goalkeeper, and merges them to form a single input.

![Model Inputs](https://raw.githubusercontent.com/sharmaabhishekk/Interactive-freeze-frames-xg/main/public/images/model-input.png)

The model itself has 3 [Convolution + Max-pooling] layers, followed by a single dense layer to flatten out the outputs from the convolution layer. Finally, we predict a single value which is the the probability of the shot resulting in a goal (AKA, the xG value).

![Model Architecture](https://raw.githubusercontent.com/sharmaabhishekk/Interactive-freeze-frames-xg/main/public/images/final_arch.png)