How abhi-0703/whatchanged works
What Changed? watches camera, stream, video, or image-folder frames; filters changes with a pixel-diff gate and settle/budget controls; asks a vision backend to describe meaningful changes and evaluate user rules; then records events for a live timeline, alerts, and Markdown export. The dashboard and headless CLI are separate entry points. The README documents these capabilities; sampled source excerpts show the main orchestration and backend behavior, while some UI, CLI, and detection details are supported only by documentation or the source index.
Main entry points: engine.py Watcher loop · app.py Dashboard · gemini_backend.py Gemini backend · ollama_backend.py Ollama backend
Components 17
User interfaces
- Dashboard
app.py - Headless CLI
whatchanged/cli.py
Watching pipeline
- Settings
whatchanged/config.py - Frame sources
whatchanged/sources.py - Watcher loop
whatchanged/engine.py - Pixel change gate
whatchanged/detect.py
Inference and reports
- Backend registry
whatchanged/backends/__init__.py - Backend interface
whatchanged/backends/base.py - Gemini backend
whatchanged/backends/gemini_backend.py - Ollama backend
whatchanged/backends/ollama_backend.py - Rule prompts
whatchanged/prompts.py - Image preparation
whatchanged/imaging.py - Report parsing
whatchanged/report.py - Replay response cache
whatchanged/cache.py
Events and history
- Event store
whatchanged/store.py
Other components
- Operator
- Model service
Connections 27
- Operator → Dashboard: configures watch
README.md - Operator → Headless CLI: runs watch
README.md - Dashboard → Watcher loop: starts and stops
app.py - Dashboard → Frame sources: opens source
app.py - Dashboard → Backend registry: selects backend
app.py - Dashboard → Event store: loads events
app.py - Headless CLI → Watcher loop: runs loop
whatchanged/cli.py - Headless CLI → Frame sources: opens source
whatchanged/cli.py - Headless CLI → Backend registry: selects backend
whatchanged/cli.py - Watcher loop → Frame sources: reads frames
whatchanged/engine.py - Watcher loop → Pixel change gate: scores changes
whatchanged/engine.py - Watcher loop → Settings: uses thresholds
whatchanged/engine.py - Watcher loop → Replay response cache: checks and saves
whatchanged/engine.py - Watcher loop → Backend interface: requests analysis
whatchanged/engine.py - Watcher loop → Event store: persists events
README.md - Backend registry → Gemini backend: creates backend
whatchanged/backends/__init__.py - Backend registry → Ollama backend: creates backend
whatchanged/backends/__init__.py - Gemini backend → Model service: sends inference
whatchanged/backends/gemini_backend.py - Ollama backend → Model service: sends inference
whatchanged/backends/ollama_backend.py - Gemini backend → Rule prompts: builds prompt
whatchanged/backends/gemini_backend.py - Gemini backend → Image preparation: encodes frames
whatchanged/backends/gemini_backend.py - Gemini backend → Report parsing: parses response
whatchanged/backends/gemini_backend.py - Ollama backend → Rule prompts: builds prompt
whatchanged/backends/ollama_backend.py - Ollama backend → Image preparation: encodes frames
whatchanged/backends/ollama_backend.py - Ollama backend → Report parsing: parses response
whatchanged/backends/ollama_backend.py - Dashboard → Settings: configures options
app.py - Dashboard → Event store: exports timeline
README.md