Git Product home page Git Product logo

sportsreid's Introduction

PWC

PyTorch

True match is shown with blue border True match is shown with blue border

Sportsreid

Sportsreid is useful for re-identifying the same player in different frames of a broadcast video of a match. This repo is built on top of SoccerNet Re-Identification and the popular Torchreid. It is currently ranked #2 on the test split leaderboard for the SoccerNet 2022 ReIdentification challenge.

A detailed discussion of our approach can be found on arXiv.

Citation

If you use this repository and/or models in your research, please cite

@misc{https://doi.org/10.48550/arxiv.2206.02373,
  doi = {10.48550/ARXIV.2206.02373},
  url = {https://arxiv.org/abs/2206.02373},
  author = {Comandur, Bharath},
  title = {Sports Re-ID: Improving Re-Identification Of Players In Broadcast Videos Of Team Sports},

Metrics, Pretrained Models and Config Files

We provide trained models and config files for different network architectures in the table below. These models were pretrained on ImageNet and then trained on the train split of the SoccerNet Re-Identification dataset.

name #params Resolution mAP rank-1 chkpt config
ResNet50-fc512 24.6M 256x128 81.8 76.1 model config
OSNet_x1_0 2.2M 256x128 83.4 78.0 model config
DeiT-Tiny/16 5.5M 224x224 82.2 76.2 model config
DeiT-S/16 21.7M 224x224 84.3 79.4 model config
ViT-B/16 57.7M 224x224 86.0 81.5 model config
ViT-L/16* 303.6M 224x224 89.8 86.7 model config

The ViT-L/16* model is trained with 5 different random seeds for initialization and then the weights are averaged across these seeds to further increase mAP. This is inspired by this paper.

Installation

# cd to your preferred directory and clone this repo
git clone https://github.com/sportsreid/sportsreid.git

# create environment
cd sportsreid/
conda create --name sportsreid python=3.7
conda activate sportsreid

# install dependencies
# make sure `which python` and `which pip` point to the correct path
pip install -r requirements.txt

# install torch and torchvision (select the proper cuda version to suit your machine)
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

# install sportsreid (don't need to re-build it if you modify the source code)
python setup.py develop

Training

python benchmarks/baseline/main.py --config-file <path to config yaml file>

This will automatically download the SoccerNet data as well. If you want to download data separately, please look at the SoccerNet github page

Inference

python benchmarks/baseline/main.py --config-file <path to config yaml file> test.evaluate True model.resume <path to model checkpoint>

sportsreid's People

Contributors

kaiyangzhou avatar vlsomers avatar sportsreid avatar shallowlearn avatar layumi avatar cioppaanthony avatar avn3r-dn avatar bhosalems avatar sramakrishnan247 avatar xuanmeng-zhang avatar luyao777 avatar yu-wu avatar rick-hao avatar

Stargazers

 avatar meisa233 avatar  avatar YuYung.K avatar  avatar Jeff Carpenter avatar 何峰 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.