Update README.md
Browse files
README.md
CHANGED
|
@@ -10,138 +10,38 @@ tags:
|
|
| 10 |
- video
|
| 11 |
- video-summarization
|
| 12 |
- highlight-detection
|
| 13 |
-
- temporal-annotations
|
| 14 |
homepage: https://ipcv.github.io/SoccerHigh/
|
| 15 |
repository: https://github.com/IPCV/SoccerHigh
|
| 16 |
---
|
| 17 |
|
| 18 |
# β½ SoccerHigh
|
| 19 |
|
| 20 |
-
This
|
| 21 |
|
| 22 |
[**SoccerHigh: A Benchmark Dataset for Automatic Soccer Video Summarization**](https://dl.acm.org/doi/pdf/10.1145/3728423.3759410)
|
| 23 |
Artur DΓaz-Juan, Coloma Ballester, Gloria Haro
|
| 24 |
ACM MMSports 2025
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
## π Code Structure
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
βββ configs/ # Hydra configuration files
|
| 37 |
-
| βββ datamodules/
|
| 38 |
-
β | βββ default.yaml
|
| 39 |
-
| βββ datasets/
|
| 40 |
-
β | βββ default.yaml
|
| 41 |
-
| βββ models/
|
| 42 |
-
β | βββ default.yaml
|
| 43 |
-
| βββ scripts/
|
| 44 |
-
β | βββ trim_summary.yaml
|
| 45 |
-
| βββ trainer/
|
| 46 |
-
β | βββ default.yaml
|
| 47 |
-
| βββ predict.yaml
|
| 48 |
-
| βββ test.yaml
|
| 49 |
-
β βββ train.yaml
|
| 50 |
-
βββ datamodules/
|
| 51 |
-
β βββ datamodule.py # Data module handling datasets and dataloaders
|
| 52 |
-
βββ datasets/
|
| 53 |
-
β βββ soccernet_games.py # Handles SoccerNet game-level data
|
| 54 |
-
β βββ soccernet_summarization.py # Handles video summarization data
|
| 55 |
-
β βββ utils.py # Utility functions for dataset processing
|
| 56 |
-
βββ evaluation/
|
| 57 |
-
β βββ evaluate.py # Compute metrics and summarize model performance
|
| 58 |
-
βββ inference/
|
| 59 |
-
β βββ inference.py # Key shot selection for inference
|
| 60 |
-
β βββ utils.py # Helper functions for inference
|
| 61 |
-
βββ models/
|
| 62 |
-
β βββ classifier.py # Baseline model implementation
|
| 63 |
-
β βββ dino.py # DINO implementation
|
| 64 |
-
β βββ heads.py # Model heads definitions
|
| 65 |
-
β βββ transnetv2.py # TransNetv2 implementation
|
| 66 |
-
βββ scripts/
|
| 67 |
-
β βββ trimm_summary.py # Script to compute new summary annotations
|
| 68 |
-
βββ weights/
|
| 69 |
-
β βββ Baseline_VideoMAEv2-Giant.ckpt # Baseline checkpoint using the VideoMAEv2 giant backbone
|
| 70 |
-
β βββ Baseline_VideoMAEv2-Small.ckpt # Baseline checkpoint using the VideoMAEv2 small backbone
|
| 71 |
-
βββ predict.py # Inference script
|
| 72 |
-
βββ test.py # Testing script
|
| 73 |
-
βββ train.py # Training script
|
| 74 |
-
```
|
| 75 |
|
| 76 |
---
|
| 77 |
|
| 78 |
-
## βοΈ
|
| 79 |
-
|
| 80 |
-
Before running the code, set up the environment and the dataset path.
|
| 81 |
-
|
| 82 |
-
**1. Create the Conda environment**:
|
| 83 |
-
|
| 84 |
-
We provide an `environment.yml` file to install all dependencies:
|
| 85 |
-
|
| 86 |
-
```bash
|
| 87 |
-
conda env create -f environment.yml
|
| 88 |
-
conda activate soccerhigh
|
| 89 |
-
```
|
| 90 |
-
|
| 91 |
-
**2. Create a symbolic link to the dataset**:
|
| 92 |
-
|
| 93 |
-
The code requires a folder named `data` (either a symbolic link or the dataset itself), containing the files from [**SoccerHigh**](https://github.com/IPCV/SoccerHigh/tree/main/dataset).
|
| 94 |
|
| 95 |
```bash
|
| 96 |
-
|
|
|
|
| 97 |
```
|
| 98 |
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
---
|
| 102 |
-
|
| 103 |
-
## π Usage
|
| 104 |
-
|
| 105 |
-
The code is designed using [PyTorch Lightning](https://lightning.ai/) for cleaner training loops and easier scaling.
|
| 106 |
-
All configurations are managed using a [Hydra](https://hydra.cc/), making it easy to modify parameters.
|
| 107 |
-
|
| 108 |
-
### 1. Training
|
| 109 |
-
|
| 110 |
-
Train the model using the default configuration:
|
| 111 |
-
|
| 112 |
-
```bash
|
| 113 |
-
python3 train.py
|
| 114 |
-
```
|
| 115 |
-
|
| 116 |
-
### 2. Testing/Evaluation
|
| 117 |
-
|
| 118 |
-
Evaluate a trained model checkpoint:
|
| 119 |
-
|
| 120 |
-
```bash
|
| 121 |
-
python3 test.py checkpoint='weights/checkpoint.ckpt'
|
| 122 |
-
```
|
| 123 |
-
|
| 124 |
-
Replace `checkpoint.ckpt` with the actual checkpoint name. Default: [`Baseline_VideoMAEv2-Giant.ckpt`](https://github.com/IPCV/SoccerHigh/blob/main/code/weights/Baseline_VideoMAEv2-Giant.ckpt)
|
| 125 |
-
|
| 126 |
-
### 3. Inference
|
| 127 |
-
|
| 128 |
-
Run inference on new games:
|
| 129 |
-
|
| 130 |
-
```bash
|
| 131 |
-
python3 predict.py checkpoint='weights/checkpoint.ckpt' output_path='file.json' datamodule.predict.dataset.game_list='/data/games.txt'
|
| 132 |
-
```
|
| 133 |
-
|
| 134 |
-
Replace `checkpoint.ckpt`, `file.json` and `games.txt` with the actual file names. Default: [`Baseline_VideoMAEv2-Giant.ckpt`](https://github.com/IPCV/SoccerHigh/blob/main/code/weights/Baseline_VideoMAEv2-Giant.ckpt), `output.json` and `test.txt`
|
| 135 |
-
|
| 136 |
-
---
|
| 137 |
-
|
| 138 |
-
## π Notes
|
| 139 |
-
|
| 140 |
-
- Make sure the symbolic link `data` points correctly to your dataset.
|
| 141 |
-
|
| 142 |
-
- All configuration files are in `configs/` for easy experiment management.
|
| 143 |
-
|
| 144 |
-
- Logs and checkpoints will be saved in the default generated directory `lightning_logs/`.
|
| 145 |
|
| 146 |
---
|
| 147 |
|
|
|
|
| 10 |
- video
|
| 11 |
- video-summarization
|
| 12 |
- highlight-detection
|
|
|
|
| 13 |
homepage: https://ipcv.github.io/SoccerHigh/
|
| 14 |
repository: https://github.com/IPCV/SoccerHigh
|
| 15 |
---
|
| 16 |
|
| 17 |
# β½ SoccerHigh
|
| 18 |
|
| 19 |
+
This model card provides the checkpoints for the **Baseline Model** introduced in:
|
| 20 |
|
| 21 |
[**SoccerHigh: A Benchmark Dataset for Automatic Soccer Video Summarization**](https://dl.acm.org/doi/pdf/10.1145/3728423.3759410)
|
| 22 |
Artur DΓaz-Juan, Coloma Ballester, Gloria Haro
|
| 23 |
ACM MMSports 2025
|
| 24 |
|
| 25 |
+
## π Model Checkpoints
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
| Name | Description |
|
| 28 |
+
|------|-------------|
|
| 29 |
+
| Baseline_VideoMAEv2-Giant | Baseline model trained with a VideoMAEv2 encoder for feature extraction using [*vit_g_hybrid_pt_1200e_k710_ft*](https://huggingface.co/OpenGVLab/VideoMAE2/resolve/main/distill/vit_s_k710_dl_from_giant.pth) weights |
|
| 30 |
+
| Baseline_VideoMAEv2-Small | Baseline model trained with a VideoMAEv2 encoder for feature extraction using [*vit_g_hybrid_pt_1200e_k710_ft*](https://github.com/OpenGVLab/VideoMAEv2/blob/master/docs/MODEL_ZOO.md) weights |
|
| 31 |
+
| Baseline_CLIP | Baseline model trained with a CLIP encoder for feature extraction using [*CLIP ViT-B-32 256Γ256 trained on DataComp-1B*](https://huggingface.co/laion/CLIP-ViT-B-32-256x256-DataComp-s34B-b86K) weights |
|
| 32 |
+
| Baseline_ResNet | Baseline model trained with a ResNet-152 encoder for feature extraction using [*IMAGENET1K_V2*](https://docs.pytorch.org/vision/main/models/generated/torchvision.models.resnet152.html#torchvision.models.ResNet152_Weights) weights |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
---
|
| 35 |
|
| 36 |
+
## βοΈ Installation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
```bash
|
| 39 |
+
git clone https://github.com/IPCV/SoccerHigh.git
|
| 40 |
+
cd SoccerHigh/code
|
| 41 |
```
|
| 42 |
|
| 43 |
+
For more details, please visit the original repository:
|
| 44 |
+
[https://github.com/IPCV/SoccerHigh](https://github.com/IPCV/SoccerHigh)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
---
|
| 47 |
|