How ashe206/videolog works
VideoLog turns uploaded or CLI-provided video into tracked identities, appearance and zone events, stored analytics, annotated playback, and natural-language answers. In the web workflow, the API accepts a video and starts serialized processing; tracking samples frames, then re-identification and event derivation feed persistence and rendering. Chat questions go through the reasoning layer to query stored data. The graph follows shown calls and documented capabilities; unsampled UI, SQL-agent internals, and some persistence wiring are represented only where the README or excerpts support them.
Main entry points: api/main.py Web API · main.py CLI entry · tracking.py Object tracking · agent.py SQL reasoning agent
Components 21
Video Processing
- Frame sampler
detection/sampler.py - Object tracking
detection/tracking.py
Identity And Events
- Track re-identification
reid/merge.py - Appearance embeddings
reid/embedder.py - Lost-track gallery
reid/gallery.py - Appearance events
db/events.py - Zone state analysis
zones/state_machine.py - Zone geometry
zones/geometry.py
Data And Queries
- Database schema
db/schema.py - Data writer
db/writer.py - SQLite analytics store
db/schema.py - SQL reasoning agent
reasoning/agent.py - SQL prompt rules
reasoning/prompts.py - DeepSeek client
reasoning/client.py
User Interfaces
- Web API
api/main.py - Web UI
frontend/index.html - CLI entry
main.py - Job status and lock
api/jobs.py
Video Playback
- Annotated renderer
detection/visualize.py
Other components
- Video analyst
- DeepSeek service
Connections 30
- Video analyst → Web API: uploads video
README.md - Video analyst → CLI entry: runs analysis
README.md - Web UI → Web API: uses endpoints
README.md - Web API → Frame sampler: reads video metadata
api/main.py - Web API → Object tracking: starts tracking
api/main.py - Object tracking → Frame sampler: samples frames
detection/tracking.py - Object tracking → Appearance embeddings: extracts embeddings
detection/tracking.py - Web API → Track re-identification: remaps identities
api/main.py - Track re-identification → Lost-track gallery: matches lost tracks
reid/merge.py - Web API → Appearance events: derives appearances
api/main.py - Web API → Zone state analysis: analyzes zone activity
api/main.py - Zone state analysis → Zone geometry: checks containment
zones/state_machine.py - Web API → Database schema: initializes tables
api/main.py - Web API → Data writer: writes detections and events
api/main.py - Data writer → SQLite analytics store: inserts records
db/writer.py - Database schema → SQLite analytics store: defines tables
db/schema.py - Web API → Annotated renderer: renders annotated video
api/main.py - Web API → Job status and lock: tracks processing status
api/main.py - Web API → DeepSeek client: creates query client
api/main.py - Web API → SQL reasoning agent: runs question analysis
api/main.py - SQL reasoning agent → SQL prompt rules: uses SQL examples
reasoning/agent.py - SQL reasoning agent → SQLite analytics store: queries stored analytics
README.md - DeepSeek client → DeepSeek service: calls model service
README.md - CLI entry → Frame sampler: reads video metadata
main.py - CLI entry → Object tracking: starts tracking
main.py - CLI entry → Track re-identification: remaps identities
main.py - CLI entry → Appearance events: derives appearances
main.py - CLI entry → Zone state analysis: analyzes zone activity
main.py - CLI entry → Database schema: initializes tables
main.py - CLI entry → Data writer: writes records
main.py