How alfayath17/tracknet-deep-learning-network works
TrackNet is a video-based object-localization and tracking project, with a separate bounce-detection branch. The main workflow prepares labeled frame data and heatmaps, trains/evaluates a neural network, then runs video inference to produce coordinates and a tracked video. The README documents trajectory analysis and bounce detection as capabilities; source excerpts directly support the core training and inference links. Some testing and bounce-analysis implementation is unsampled, so those links are shown only where documented.
Main entry points: main.py Training workflow · infer_on_video.py Video inference · gt_gen.py Ground truth generation · bounce_train.py Bounce training
Components 18
Data preparation
- Labeled frames
Dataset - Ground truth generation
gt_gen.py - Ground truth outputs
GT_Output - Training data loader
datasets.py
TrackNet workflow
- Training workflow
main.py - TrackNet model
model.py - Train and validate
general.py - Model checkpoint
exps/default/model_last.pt - Model testing
test.py - Video inference
infer_on_video.py - Object coordinates
- Coordinate postprocessing
general.py - Trajectory tracking
infer_on_video.py - Tracked video
tracked_output.mp4
Bounce analysis
- Bounce training
bounce_train.py - Bounce model artifact
ctb_regr_bounce.cbm
Other components
- Researcher
- Input video
Connections 22
- Researcher → Ground truth generation: generates labels
README.md - Labeled frames → Ground truth generation: reads labels
gt_gen.py - Ground truth generation → Ground truth outputs: writes targets
README.md - Ground truth outputs → Training data loader: supplies targets
datasets.py - Researcher → Training workflow: starts training
README.md - Training data loader → Training workflow: provides batches
main.py - Training workflow → TrackNet model: constructs model
main.py - Training workflow → Train and validate: calls training
main.py - Train and validate → TrackNet model: runs forward pass
general.py - Training workflow → Model checkpoint: saves checkpoint
README.md - Researcher → Model testing: runs evaluation
README.md - Model checkpoint → Model testing: loads model
- Input video → Video inference: supplies frames
README.md - Researcher → Video inference: runs inference
README.md - Video inference → TrackNet model: runs prediction
infer_on_video.py - Video inference → Coordinate postprocessing: decodes heatmap
infer_on_video.py - Coordinate postprocessing → Object coordinates: returns coordinates
general.py - Video inference → Trajectory tracking: filters and interpolates
infer_on_video.py - Trajectory tracking → Tracked video: renders tracking
README.md - Researcher → Bounce training: starts analysis
README.md - Labeled frames → Bounce training: reads labeled data
- Bounce training → Bounce model artifact: trains model