Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seungjaeryanlee/baseball-action-recognition
https://github.com/seungjaeryanlee/baseball-action-recognition
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/seungjaeryanlee/baseball-action-recognition
- Owner: seungjaeryanlee
- Created: 2020-01-02T11:43:22.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T19:51:53.000Z (9 months ago)
- Last Synced: 2024-05-03T21:02:21.523Z (9 months ago)
- Language: Python
- Size: 182 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# baseball-action-recognition
## Prerequisites
This repository was tested in Ubuntu 18.04 LTS with Python 3.7.4.
The Python requirements are written in `requirements.txt`. Additionally, to download the Baseball Database (BBDB), you need `aria2`.
## Prepare the Dataset
This repository has two script files to
1. Download full videos from BBDB, and
2. Extract segments from full videosRun the two lines below in order:
```bash
python scripts/download_bbdb.py -i bbdb.selected.v0.9.min.json
python scripts/extract_segments_from_videos.py
```This should download 45 videos and extract 14826 segments. The segments are divided into train-valid-test split with 60% (8896), 20% (2965), 20% (2965) each. The exact split can be seen at `data_split.min.json`.
## Train I3D
The I3D has two streams: RGB and Flow. Currently this repository only contains code for training the RGB stream. Check the `CONFIG` dictionary for the hyperparameters.
```
python train.py
```## Evaluate I3D
After the training has completed, you can evaluate the model by specifying the model with `CONFIG["RGB_I3D_LOAD_MODEL_PATH"]` or `CONFIG["FLOW_I3D_LOAD_MODEL_PATH"]`. Check the `CONFIG` dictionary for additional hyperparameters.
```
python evaluate.py
```