Date of Award
6-2026
Document Type
Thesis - SCU Access Only
Publisher
Santa Clara : Santa Clara University, 2026
Department
Electrical and Computer Engineering
First Advisor
Radhika Grover
Abstract
Real-time sports analytics has long been the exclusive domain of professional organizations with access to expensive, cloud-dependent infrastructure. High school programs, recreational leagues, and community coaches-who stand to benefit most from immediate, data-driven feedback-lack access to the systems that could improve player development and game strategy. This project addresses that gap by designing, implementing, and validating a complete real-time basketball video detection pipeline running on a single $200 Xilinx PYNQ-Z2 field-programmable gate array (FPGA) development board. The system detects and classifies three object classes-basketball, player, and hoop-from prerecorded game footage, annotates output video with bounding boxes, and overlays live game statistics, all without transmitting a single frame to a remote server.
The system uses a LeNet-5 convolutional neural network trained to detect and classify basketballs, players, and hoops. A dataset of 3,929 labeled images was created by combining three Roboflow datasets, and 32×32 pixel image crops were extracted from the annotated bounding boxes. The images were normalized using a dataset mean of 0.4285 and a standard deviation of 0.3210 before training. The model was trained on Google Colab with a learning rate of 0.001 and a batch size of 32, achieving 93.4% training accuracy and 92.1% validation accuracy. After training, the model weights were exported to a C++ header file and implemented as a hardware accelerator using Vitis High-Level Synthesis (HLS) on the PYNQ-Z2 FPGA. Several HLS optimizations, including pipelining, loop unrolling, array partitioning, dataflow, and BRAM/AXI-Lite interfaces, were used to improve performance. These optimizations reduced inference latency from 1.95×10⁷ clock cycles to 5.58×10⁴ clock cycles. Testing over 100 inference runs showed an average latency of 8.76 ms and a throughput of 86.09 frames per second. The FPGA implementation achieved an average inference latency of 8.76 ms and demonstrated real-time performance on the PYNQ-Z2 platform. The final system successfully detects and classifies basketball objects, generates annotated video output, and demonstrates that real-time basketball analytics can be performed on a low-cost FPGA platform without relying on cloud-based processing.
Recommended Citation
Gnanamani, Blessy; Ganga, Sreepriya; and Choudhry, Armon, "Real-Time Basketball Video Detection using FPGA Hardware Acceleration" (2026). Electrical and Computer Engineering Senior Theses. 121.
https://scholarcommons.scu.edu/elec_senior/121
