Your Game, Quantified
Alternative link: tobio-rosy.vercel.app
demo.mp4
Demo footage
COMP3106 Final Project | Group 68: Daniel Lu - 101304181
Tobio is a full-stack platform for automated volleyball analytics, combining a React + TypeScript frontend with a FastAPI backend powered by state-of-the-art machine learning models. It enables coaches and players to upload game footage and receive instant, actionable insights.
- Court Detection & Mapping: Automatic identification and 3D mapping of volleyball courts.
- Ball Tracking: Frame-by-frame trajectory analysis with interpolation for smooth tracking.
- Player Tracking: Multi-player detection and tracking using YOLOv11.
- Serve & Action Recognition: ML-powered event classification for serves and volleyball actions.
- Real-Time Web Interface: Upload videos and view analytics instantly in your browser.
- AI Chat Agent: Gemini 2.5 Flash-powered agent for CSV/game data analysis (API key required).
- Statistical Visualization: Interactive dashboards and overlays for game metrics.
- Frontend: React 19, TypeScript, Vite, Framer Motion, Lucide React, react-markdown
- Backend: FastAPI, Python 3.x, YOLOv11, OpenCV, AWS S3 (for model storage)
- ML Training: Jupyter notebooks, Ultralytics YOLO, TensorBoard
- Dev Tools: pnpm, ESLint, TypeScript
├── app/
│ ├── frontend/ # React + TypeScript web application
│ └── backend/ # FastAPI service with ML models
├── training/ # Model training pipelines
└── reports/ # Project documentation and research
Frontend
- React 19 with TypeScript
- Vite build system
- Canvas-based video overlay rendering
Backend
- FastAPI with Python 3.x
- YOLOv11 for object detection and segmentation
- OpenCV for video processing
- AWS S3 integration for model storage
Machine Learning
- Ultralytics YOLO for court and ball detection
- Custom interpolation algorithms for smooth tracking
- TensorBoard integration for training visualization
- Python 3.8+
- Node.js 18+
- pnpm package manager
- Install Python dependencies
pip install --index-url https://download.pytorch.org/whl/cu118 -r torch.txt pip install -r requirements.txt
- NOTE: These dependencies are tailored towards CUDA v11.8 (3060), please adjust the package versions to your system
-
Install frontend dependencies
cd app/frontend/tobio pnpm install -
Configure environment
- Backend AWS S3 Access Keys: The current backend pulls my trained models from my AWS S3 bucket, but you may just pull from local. If you are using your own S3 bucket, you will need to define up your AWS access keys.
- Create the fie
app/backend/.env - Add the following lines:
AWS_ACCESS_KEY_ID="your_key" AWS_SECRET_ACCESS_KEY="your_secret"
- Frontend Gemini API Key: To enable the AI chat agent (Gemini 2.5 Flash) in the frontend, you must add your Gemini API key to the environment:
- Create or edit the file
app/frontend/tobio/.env - Add the following line:
VITE_GEMENI_API_KEY="your-gemini-api-key-here"
Start backend service
cd app/backend
uvicorn api:app --reload --host 0.0.0.0 --port 8000Start frontend development server
cd app/frontend/tobio
pnpm run devAccess the training notebooks for model development:
cd training
jupyter notebookAvailable stages:
1_court_tracking.ipynb- Court boundary detection2_ball_tracking.ipynb- Volleyball trajectory analysis3_player_tracking.ipynb- Player identification and tracking4_serve_recognition.ipynb- Serve recognition5_action_classification.ipynb- Action recognition
POST /process-video— Full video analysisPOST /track-court— Court detectionPOST /track-ball— Ball trackingPOST /track-players— Player tracking
- Open to PRs for new features, bug fixes, and documentation.
- See
reports/for research and technical documentation.
MIT