Chapter 27: Computer Vision and Video Analysis - Exercises
Section A: Tracking Fundamentals (Questions 1-10)
Exercise 1: Tracking Data Structure
Design a data schema for storing player tracking data: a) What fields are essential? b) How would you handle frame-by-frame data? c) What sampling rate is appropriate? d) How would you handle missing data points?
Exercise 2: Coordinate Systems
A tracking system reports positions in court coordinates (0,0 at corner): - Player A: (35, 22) at frame 1000, (37, 23) at frame 1025 - Court dimensions: 94x50 feet - Frame rate: 25 fps
Calculate: a) Player's velocity b) Distance from basket (located at 5.25, 25) c) Court zone classification
Exercise 3: Object Detection
Compare the following object detection approaches for basketball: a) YOLO b) Faster R-CNN c) SSD Which is most appropriate for real-time tracking and why?
Exercise 4: Player Identification
Describe three methods for identifying individual players in tracking systems: a) Jersey number recognition b) Physical characteristics c) Motion patterns What are the strengths and weaknesses of each?
Exercise 5: Ball Tracking Challenges
List five specific challenges for tracking the basketball: a) How is each challenge addressed? b) What accuracy can be achieved? c) When is ball tracking most unreliable?
Exercise 6: Occlusion Handling
A player is occluded for 15 frames (0.6 seconds): a) How would you interpolate position? b) What assumptions are necessary? c) How would you flag uncertainty?
Exercise 7: Multi-Camera Fusion
A system uses 6 cameras around the court: a) How are camera views combined? b) What is triangulation? c) How do you handle disagreement between cameras?
Exercise 8: Tracking Accuracy Assessment
Design an experiment to measure tracking accuracy: a) What ground truth would you use? b) What metrics should be calculated? c) How would you report results?
Exercise 9: Real-Time vs Batch Processing
Compare real-time and batch processing for tracking: a) What latency is acceptable for each use case? b) How does accuracy differ? c) When would you use each?
Exercise 10: Data Volume Calculations
For one NBA game with 25 fps tracking: a) Calculate total data points for player positions b) Estimate storage requirements c) Discuss compression strategies
Section B: Pose Estimation (Questions 11-18)
Exercise 11: Keypoint Detection
For shooting form analysis, identify: a) Which keypoints are most important? b) What angles should be calculated? c) How would you handle partial visibility?
Exercise 12: OpenPose vs MediaPipe
Compare OpenPose and MediaPipe for basketball analysis: a) Accuracy considerations b) Speed requirements c) Deployment options
Exercise 13: Shooting Form Analysis
Design a system to analyze shooting form: a) What features would you extract? b) How would you compare to "ideal" form? c) What feedback would you provide?
Exercise 14: Jump Mechanics
Using pose estimation, analyze a player's jump: a) What keypoints are needed? b) How would you calculate jump height? c) What correlates with injury risk?
Exercise 15: Defensive Stance Assessment
Define metrics for evaluating defensive stance: a) What body positions indicate good stance? b) How would you measure these? c) What is the accuracy limitation?
Exercise 16: 3D Pose Reconstruction
Explain 3D pose estimation from 2D video: a) What additional information is needed? b) What are the main approaches? c) What accuracy can be achieved?
Exercise 17: Pose Sequence Analysis
For analyzing a dribble move: a) How would you represent the pose sequence? b) What temporal features matter? c) How would you classify different moves?
Exercise 18: Injury Risk Assessment
Design a pose-based injury risk assessment: a) What movement patterns indicate risk? b) How would you validate the system? c) What ethical considerations exist?
Section C: Action Recognition (Questions 19-26)
Exercise 19: Play Classification
Design a system to classify offensive plays: a) What input representation would you use? b) What model architecture? c) How many play types can be distinguished?
Exercise 20: Event Detection
Create a pipeline for detecting: a) Shot attempts b) Passes c) Turnovers What features and models would you use for each?
Exercise 21: Temporal Modeling
Compare approaches for modeling play sequences: a) RNNs/LSTMs b) Transformers c) Temporal CNNs When is each appropriate?
Exercise 22: Transfer Learning
Apply transfer learning for action recognition: a) What pre-trained models are available? b) What modifications are needed for basketball? c) How much basketball data is required?
Exercise 23: Real-Time Play Recognition
Design a real-time play recognition system: a) Latency requirements b) Architecture choices c) Accuracy-speed tradeoffs
Exercise 24: Multi-Agent Modeling
How would you model interactions between multiple players? a) Graph neural networks b) Attention mechanisms c) Relational reasoning Describe one approach in detail.
Exercise 25: Anomaly Detection in Plays
Identify unusual plays or patterns: a) What defines "unusual"? b) What method would you use? c) What are the applications?
Exercise 26: Play Similarity Search
Build a play similarity search system: a) How would you embed plays? b) What distance metric would you use? c) How would you handle variations?
Section D: Applied Projects (Questions 27-35)
Exercise 27: Shot Quality Model
Build a shot quality model using tracking data: a) Features from shooter position b) Features from defender positions c) Features from shot context d) Model architecture
Exercise 28: Spacing Analysis
Quantify offensive spacing using tracking: a) Define spacing metrics b) Calculate from position data c) Relate to offensive efficiency
Exercise 29: Defensive Coverage Assessment
Evaluate defensive coverage using computer vision: a) Define coverage zones b) Calculate coverage quality c) Identify weaknesses
Exercise 30: Pass Network Analysis
Build a pass network from tracking data: a) Extract passing events b) Build the network graph c) Analyze network properties
Exercise 31: Screen Detection
Design a system to detect screens: a) What visual/tracking features indicate screens? b) How would you classify screen types? c) How would you evaluate screen effectiveness?
Exercise 32: Transition Analysis
Analyze transition offense using tracking: a) Define transition vs half-court b) Measure transition speed c) Evaluate transition efficiency
Exercise 33: Player Movement Visualization
Create an interactive visualization of player movement: a) Design choices b) Implementation approach c) User interaction features
Exercise 34: Automated Highlight Generation
Build a system to generate game highlights: a) What events should be included? b) How would you detect these events? c) How would you rank importance?
Exercise 35: End-to-End Pipeline
Design a complete video analysis pipeline: a) Video ingestion b) Player/ball tracking c) Event detection d) Metric calculation e) Visualization/reporting
Section E: Advanced Topics (Questions 36-40)
Exercise 36: Self-Supervised Learning
Apply self-supervised learning to basketball video: a) What pretext tasks make sense? b) What representations should be learned? c) How would you evaluate?
Exercise 37: Few-Shot Learning
Train play recognition with limited examples: a) Why is few-shot learning needed? b) What approach would you use? c) What accuracy is achievable?
Exercise 38: Synthetic Data Generation
Generate synthetic training data: a) What could be simulated? b) How realistic must it be? c) What are the benefits?
Exercise 39: Edge Computing
Deploy tracking on edge devices: a) Hardware requirements b) Model optimization c) Latency considerations
Exercise 40: Future Directions
Identify three emerging technologies that will impact basketball video analysis: a) Describe each technology b) Explain potential applications c) Discuss timeline to adoption
Answer Key Guidelines
Technical exercises should demonstrate understanding of algorithms and their limitations. Design exercises should include practical considerations for deployment. Research exercises should reference relevant literature.