How myatthukyaw/ego-vision works
Ego Vision predicts driving actions from dashcam video: it reads frames, detects and tracks road objects, estimates their distances and motion, evaluates the scene against ordered driving rules, and renders the result. The graph preserves documented capabilities including traffic-light color classification, bird’s-eye visualization, and the status HUD. The README documents the high-level workflow; several links below reflect that documentation because the pipeline and some modules were not excerpted.
Main entry points: pipeline.py Frame pipeline · scene_state.py Scene assembly · distance.py Distance sampling · ego_zone.py Ego-zone geometry
Components 20
Video and perception
- Frame pipeline
ego_vision/pipeline.py - Video reader
ego_vision/ingest/video_reader.py - YOLO tracker
ego_vision/perception/detector.py - Light classifier
ego_vision/perception/light_classifier.py - Depth estimator
ego_vision/perception/depth_estimator.py - Inference resizer
ego_vision/perception/inference_resizer.py - Lane detector
ego_vision/perception/lane_detector.py - Runtime settings
ego_vision/config/settings.py
Scene reasoning
- Distance sampling
ego_vision/reasoning/distance.py - Ego-zone geometry
ego_vision/reasoning/ego_zone.py - Time to collision
ego_vision/reasoning/ttc.py - Speed estimator
ego_vision/reasoning/speed.py - Scene assembly
ego_vision/reasoning/scene_state.py
Action decision
- Driving rules
ego_vision/decision/rule_engine.py
Visualization
- Detection overlay
ego_vision/viz/overlay.py - Action and status HUD
ego_vision/viz/hud.py - Bird’s-eye map
ego_vision/viz/bev_map.py - Visualization helpers
ego_vision/viz/common.py
Other components
- Video user
- Live or saved video
Connections 24
- Video user → Frame pipeline: provides video
README.md - Frame pipeline → Video reader: reads frames
README.md - Frame pipeline → YOLO tracker: detects and tracks
README.md - YOLO tracker → Light classifier: classifies lights
README.md - Frame pipeline → Depth estimator: estimates depth
README.md - Frame pipeline → Distance sampling: samples distances
README.md - Depth estimator → Distance sampling: provides depth map
README.md - Distance sampling → Scene assembly: supplies distances
- Frame pipeline → Ego-zone geometry: builds path zone
README.md - Scene assembly → Ego-zone geometry: tests object zones
ego_vision/reasoning/scene_state.py - Frame pipeline → Time to collision: estimates impact time
README.md - Frame pipeline → Scene assembly: assembles scene
README.md - Time to collision → Scene assembly: supplies TTC
- Scene assembly → Driving rules: provides scene state
README.md - Driving rules → Frame pipeline: returns action
- Frame pipeline → Speed estimator: may estimate speed
README.md - Frame pipeline → Detection overlay: draws detections
README.md - Frame pipeline → Action and status HUD: renders action
README.md - Frame pipeline → Bird’s-eye map: plots detections
README.md - Detection overlay → Visualization helpers: uses scaling
ego_vision/viz/overlay.py - Action and status HUD → Visualization helpers: uses panels
ego_vision/viz/hud.py - Bird’s-eye map → Visualization helpers: uses panels
ego_vision/viz/bev_map.py - Frame pipeline → Live or saved video: shows or saves
README.md - Lane detector → Ego-zone geometry: could refine zone