How yeonseong-lee/rallylens works
RallyLens analyzes badminton videos through two implementations: a working Python CLI and a browser-based technical preview. The CLI workflow downloads or accepts video, detects players and shuttle, calibrates the court, then produces visualizations and metrics or an optional Gemini report. The web app accepts local or direct video, runs analysis in a worker, supports corrections, and presents exportable results. The README documents these capabilities; several web and Python subsystem connections are therefore documented rather than verified from full source excerpts.
Main entry points: cli.py CLI commands · orchestrator.py Run orchestrator · App.tsx Analysis interface · Results.tsx Results and exports
Components 28
Python CLI
- CLI commands
src/rallylens/cli.py - Run orchestrator
src/rallylens/pipeline/orchestrator.py - Video downloader
src/rallylens/ingest/downloader.py - Video metadata
src/rallylens/domain/video.py - Artifact I/O
src/rallylens/pipeline/io.py
Video Analysis
- Player tracking
src/rallylens/vision/detect_track.py - Shuttle tracking
src/rallylens/vision/shuttle_tracker.py - Court calibration
src/rallylens/pipeline/court.py - Automatic court detector
src/rallylens/vision/court_detector.py - Manual court picker
src/rallylens/vision/court_picker.py
Metrics and Reports
- Video and court views
src/rallylens/viz/overlay.py - Visualization helpers
src/rallylens/viz/_utils.py - Match metrics
src/rallylens/analysis/metrics.py - LLM report generation
src/rallylens/llm/report.py
Browser App
- Analysis interface
web/src/App.tsx - Video input validation
web/src/services/video-source.ts - Worker client
web/src/services/worker-client.ts - Court and identity editors
web/src/components/CourtEditor.tsx - Results and exports
web/src/components/Results.tsx
Browser Analysis
- Analysis worker
web/src/worker/engine.worker.ts - Verified model cache
web/src/worker/model-cache.ts - Player inference and tracking
web/src/worker/vision.ts - Browser metrics
web/src/analysis/metrics.ts - Overlay rendering
web/src/services/render-overlay.ts - Optional report
web/src/services/report.ts
Other components
- CLI user
- Vertex AI Gemini
- Browser user
Connections 29
- CLI user → CLI commands: runs commands
README.md - CLI commands → Run orchestrator: starts run
src/rallylens/cli.py - CLI commands → Video downloader: downloads video
src/rallylens/cli.py - Video downloader → Vertex AI Gemini: fetches source
- Video downloader → Video metadata: returns metadata
src/rallylens/ingest/downloader.py - Run orchestrator → Video downloader: downloads input
src/rallylens/pipeline/orchestrator.py - Run orchestrator → Player tracking: tracks players
src/rallylens/pipeline/orchestrator.py - Run orchestrator → Shuttle tracking: tracks shuttle
src/rallylens/pipeline/orchestrator.py - Run orchestrator → Court calibration: calibrates court
src/rallylens/pipeline/orchestrator.py - Run orchestrator → Artifact I/O: uses artifacts
src/rallylens/pipeline/orchestrator.py - Court calibration → Automatic court detector: detects corners
src/rallylens/pipeline/court.py - Court calibration → Manual court picker: offers manual picking
src/rallylens/pipeline/court.py - CLI commands → Video and court views: creates visualizations
README.md - Video and court views → Visualization helpers: uses rendering helpers
src/rallylens/viz/overlay.py - CLI commands → Match metrics: computes metrics
README.md - CLI commands → LLM report generation: runs report command
README.md - LLM report generation → Vertex AI Gemini: requests analysis
README.md - Browser user → Analysis interface: uses app
README.md - Analysis interface → Video input validation: validates input
web/src/App.tsx - Analysis interface → Worker client: starts analysis
web/src/App.tsx - Worker client → Analysis worker: dispatches commands
web/src/services/worker-client.ts - Analysis interface → Court and identity editors: presents corrections
web/src/App.tsx - Analysis interface → Results and exports: shows results
web/src/App.tsx - Analysis worker → Verified model cache: loads verified models
web/src/worker/engine.worker.ts - Analysis worker → Player inference and tracking: runs player tracking
web/src/worker/engine.worker.ts - Analysis worker → Browser metrics: computes metrics
web/src/worker/engine.worker.ts - Results and exports → Browser metrics: recomputes metrics
web/src/components/Results.tsx - Results and exports → Overlay rendering: exports overlay
web/src/components/Results.tsx - Results and exports → Optional report: requests report
web/src/components/Results.tsx