How yastrebksv/tennisproject works
Project type and purpose
• This is a single‐language (Python) data processing/analysis pipeline, not a web app or microservices architecture.
• Purpose: take an input tennis match video (1280×720), detect and track the ball, detect court geometry, infer bounces, and produce analytics/annotated output.
File structure
• Top‐level Python scripts each encapsulate one stage of the pipeline:
• main.py – orchestrator
• tracknet.py & ball_detector.py – tennis ball detection using a TrackNet model
• court_detection_net.py & court_reference.py – court landmark detection/building perspective reference
• homography.py – compute perspective transforms
• person_detector.py – (optional) detect players
• bounce_detector.py – predict bounce events via a CatBoostRegressor
• postprocess.py – assemble results, annotate frames
• utils.py – shared helper functions
• pics/ – sample court images and demo GIFs
• requirements.txt declares dependencies (Deep Learning libs, CatBoost, OpenCV, etc.).
README for additional insights
• External pretrained weights are fetched from GitHub and Google Drive.
• Three major ML components: TrackNet for ball tracking, TennisCourtDetector for court points, CatBoost for bounce prediction.
Elements
• Clear labels: “Video Reader”, “Court Detector”, etc.
• Blue rectangles for Python modules