A powerful real-time football player tracking application using YOLOv8 AI and PyQt5, featuring GPU acceleration and advanced tracking algorithms.
- AI-Powered Detection: YOLOv8-based player detection with GPU acceleration
- Consistent Player IDs: Improved tracking algorithm prevents ID switching
- Smart Trail Visualization: Dot-based movement trails with fade effects
- Position Smoothing: Reduces jitter for natural player movement
- Modern Interface: Clean PyQt5-based user interface
- Real-time Controls: Play, pause, seek through video timeline
- Customizable Overlays: Adjust colors, sizes, and visibility
- Live Settings: Change detection confidence in real-time
- GPU Acceleration: CUDA support for faster inference (~5-8ms per frame)
- Efficient Processing: Optimized for real-time video processing
- Memory Management: Clean frame handling prevents memory leaks
- Dot Trail System: Beautiful movement visualization
- Dynamic Sizing: Trail dots fade and shrink over time
- Clean Overlays: Frame-only bounding boxes and IDs
- Professional Look: Black backgrounds for better text visibility
- Python 3.8+
- NVIDIA GPU (optional, for acceleration)
- CUDA Toolkit (for GPU support)
- Clone the repository:
git clone https://github.com/mertbarutt/Trackar.git
cd Trackar- Install dependencies:
# Windows
install.bat
# Or manually
pip install -r requirements.txt- Run the application:
# Using batch file (Windows)
start_football_tracker.bat
# Or directly
python football_tracker.py- Load Video: Click "Load Video" to select your football video
- Play/Pause: Control playback with the play button
- Timeline Navigation: Use the slider to jump to specific frames
- Export: Save your tracked video with overlays
- Confidence Threshold: Adjust detection sensitivity (10-95%)
- Trail Length: Control how long movement trails persist
- Trail Dot Size: Customize the size of trail dots
- Bounding Boxes: Toggle player detection boxes
- Player IDs: Show/hide player identification numbers
- Movement Trails: Display dot-based movement paths
- Confidence Scores: Show detection confidence values
- Overlay Colors: Choose your preferred color scheme
- Line Thickness: Adjust the thickness of boxes and trails
- Real-time Updates: Changes apply immediately
- Detection Engine: YOLOv8n for person detection
- Tracking Algorithm: Enhanced Hungarian-like assignment with position smoothing
- GUI Framework: PyQt5 with custom video widget
- Acceleration: CUDA-enabled PyTorch for GPU inference
- Inference Speed: 5-8ms per frame (GPU) / 20-50ms (CPU)
- Detection Range: 14-18 players per frame typical
- Resolution: Optimized for 384x640 input
- Frame Rate: Real-time processing at 30fps
- ID Consistency: Reduced player ID switching by 80%
- Smoother Tracking: Position smoothing eliminates jitter
- Better Matching: Size-aware detection matching
- Memory Efficient: Clean frame management prevents accumulation
Trackar/
├── football_tracker.py # Main application
├── enhanced_tracker.py # Enhanced version
├── demo.py # Command-line demo
├── requirements.txt # Python dependencies
├── install.bat # Windows installer
├── run_tracker.bat # Multi-version launcher
├── start_football_tracker.bat # Improved launcher
├── shape_overlay.py # Shape overlay utilities
└── README.md # This file
| Action | Control |
|---|---|
| Play/Pause | Play button or Spacebar |
| Frame Navigation | Timeline slider |
| Settings | Right panel controls |
| Color Picker | Click color button |
| Export | Export button |
GUI doesn't appear:
- Use
start_football_tracker.batinstead of direct Python - Check if Windows is blocking the application
- Try Alt+Tab to find the window
Slow performance:
- Install CUDA toolkit for GPU acceleration
- Lower confidence threshold
- Reduce video resolution
ID switching:
- Increase confidence threshold
- Adjust trail length settings
- Ensure good video quality
- Install NVIDIA CUDA Toolkit
- Install GPU-enabled PyTorch:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Ultralytics for the amazing YOLOv8 model
- PyQt5 team for the GUI framework
- OpenCV community for computer vision tools
Mert Barut - @mertbarutt
Project Link: https://github.com/mertbarutt/Trackar
⭐ Star this repository if it helped you!