How namanhvu29/football-player-analysis works
This is a football-video analytics application. Its main workflow reads footage, detects and tracks players, referees, and the ball, then enriches tracks with camera compensation, pitch coordinates, team identity, possession, and movement statistics before rendering and saving an annotated video. The graph emphasizes the orchestration in main.py and the README’s major capabilities. Some subsystems, including model inference details beyond the sampled tracker source, are represented only where supported by the README or repository tree.
Main entry points: main.py Analysis orchestration · tracker.py Detection and tracking · video_utils.py Video I/O · input_videos Input footage
Components 17
Video workflow
- Analysis orchestration
main.py - Video I/O
utils/video_utils.py - Detection and tracking
trackers/tracker.py - YOLO weights
models/best.pt - Track cache
stubs/track_stubs.pkl
Track analysis
- Camera motion
camera_movement_estimator/camera_movement_estimator.py - Pitch transformation
view_transformer/view_transformer.py - Speed and distance
speed_and_distance_estimator/speed_and_distance_estimator.py - Team assignment
team_assigment/team_assign.py - Ball possession
player_ball_assigner/player_ball_assigner.py - Bounding-box utilities
utils/bbox_utils.py
Output rendering
- Track annotations
trackers/tracker.py - Camera overlay
camera_movement_estimator/camera_movement_estimator.py - Statistics overlay
speed_and_distance_estimator/speed_and_distance_estimator.py
Other components
- Analyst
- Input footage
input_videos - Annotated video
output_videos
Connections 17
- Analyst → Analysis orchestration: runs analysis
- Analysis orchestration → Video I/O: calls read
- Input footage → Video I/O: provides frames
- Analysis orchestration → Detection and tracking: requests tracks
- Detection and tracking → YOLO weights: loads weights
- Detection and tracking → Track cache: reads or writes
- Detection and tracking → Bounding-box utilities: uses geometry
- Analysis orchestration → Camera motion: estimates motion
- Analysis orchestration → Pitch transformation: transforms positions
- Analysis orchestration → Speed and distance: calculates statistics
- Analysis orchestration → Team assignment: assigns teams
- Analysis orchestration → Ball possession: assigns possession
- Analysis orchestration → Track annotations: draws tracks
- Analysis orchestration → Camera overlay: draws motion
- Analysis orchestration → Statistics overlay: draws statistics
- Analysis orchestration → Video I/O: calls save
- Video I/O → Annotated video: writes video