How wangwilly/gaze-correction-cam works
The repository implements a Python webcam gaze-correction workflow: capture frames, detect eye landmarks, estimate and correct gaze, then display the result. The README also describes a macOS virtual-camera output and app controls, but the visible runtime code is the single-window Python CLI; the virtual-camera connection is documented but not shown in source. Model internals are decomposed into network layers and spatial warping. Relationships among sampled modules follow source excerpts and the SOURCE INDEX; no native macOS implementation is present in the tree.
Main entry points: dis_single_window.py Single-window runner · gaze_corrector_v1.py Gaze correction · gaze_warp_model.py Gaze warp network · bin_single_window.py Python entry point
Components 12
Capture and display
- Python entry point
bin_single_window.py - Single-window runner
displayers/dis_single_window.py
Face and gaze
- Face predictor backends
displayers/face_predictor.py - Gaze correction
model_managers/gaze_corrector_v1.py
Warping model
- Gaze warp network
tf_models/gaze_corrector_v1/gaze_warp_model.py - Neural network layers
tf_models/gaze_corrector_v1/layers.py - Spatial transforms
tf_models/gaze_corrector_v1/spatial_transform.py
Settings and support
- User settings store
model_managers/user_settings_db.py - Logger
utils/logger.py
Other components
- Camera user
- Webcam
- Virtual camera
Connections 12
- Camera user → Python entry point: starts
README.md - Python entry point → Single-window runner: creates runner
bin_single_window.py - Webcam → Single-window runner: provides frames
README.md - Single-window runner → Face predictor backends: detects eyes
displayers/dis_single_window.py - Single-window runner → Gaze correction: corrects frames
displayers/dis_single_window.py - Gaze correction → Gaze warp network: runs inference
model_managers/gaze_corrector_v1.py - Gaze warp network → Neural network layers: uses blocks
tf_models/gaze_corrector_v1/gaze_warp_model.py - Gaze warp network → Spatial transforms: uses transforms
tf_models/gaze_corrector_v1/gaze_warp_model.py - Gaze correction → User settings store: loads and saves
model_managers/gaze_corrector_v1.py - Single-window runner → Logger: logs events
displayers/dis_single_window.py - Gaze correction → Logger: logs model events
model_managers/gaze_corrector_v1.py - Single-window runner → Virtual camera: outputs corrected video
README.md