feat(zyra-eyes): add calibrated gaze-to-pointer control - #67
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5d011a439
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| x_coefficients, *_ = np.linalg.lstsq(design, target_x, rcond=None) | ||
| y_coefficients, *_ = np.linalg.lstsq(design, target_y, rcond=None) |
There was a problem hiding this comment.
Reject degenerate calibration fits
When pupil extraction yields nearly identical or collinear features across the nine targets, lstsq still returns coefficients and the calibration is saved as successful because its rank, condition, and residuals are discarded. The resulting pointer can remain near the center or jump between clamped screen edges, so reject rank-deficient or high-error fits and ask the user to recalibrate.
Useful? React with 👍 / 👎.
|
|
||
| def run_gaze(camera_index: int, camera_width: int, camera_height: int, native: bool, approve: bool, smoothing: float, deadzone: float, preview: bool) -> None: | ||
| require_native_authorization(native, approve) | ||
| model = load_calibration() |
There was a problem hiding this comment.
Validate the active display against the calibration
When the display resolution changes after calibration, --run loads the old screen dimensions without comparing them with pyautogui.size(). Since CalibrationModel.predict clamps to those stored dimensions, a larger display becomes partly unreachable and a smaller display receives out-of-range pointer coordinates; require recalibration or transform the predictions for the active display before starting the session.
Useful? React with 👍 / 👎.
ZYRA Eyes gaze augmentation
Adds a local webcam gaze runtime so ZYRA Eyes can map an authorized operator's eye movement to screen coordinates and optionally move the local pointer.
Implemented
--native --approveScope
This is an accessibility/control experiment and local operator interface, not a medical device, remote-control implant, credential tool, or authorization bypass. No webcam frame is written to disk and native mode only moves the pointer.