You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR replaces callback-driven eye detection with a Python-orchestrated eye movement screening workflow, adds iris and gaze analysis, updates browser rendering and payloads, and adjusts the web UI to select and describe the screening module.
Changes
Eye movement screening
Layer / File(s)
Summary
Gaze analysis contracts and heuristics services/ws-modules/pyeye1/pyeye1/gaze_analysis.py, services/ws-modules/pyeye1/pyeye1/__init__.py, services/ws-modules/pyeye1/tests/test_gaze_analysis.py
Adds gaze sample schemas and computes eyelid validity, eye misalignment, oscillation metrics, and combined window analysis with unit coverage.
Screening workflow and result payloads services/ws-modules/pyeye1/pyeye1/eye_detection.py, services/ws-modules/pyeye1/tests/test_eye_detection.py, services/ws-modules/pyeye1/tests/test_run_workflow.py, services/ws-modules/pyeye1/pyproject.toml
Reworks the asynchronous workflow around a platform interface, adds iris decoding and smoothed eye crops, includes analysis in status/event payloads, and tests success and cleanup failure paths.
Browser platform bridge and rendering services/ws-modules/pyeye1/pkg/et_ws_pyeye1.js
Moves browser operations behind a Python platform bridge and renders cropped eye regions, iris circles, and analysis overlays.
Module selection and screening presentation services/ws-server/static/app.js, services/ws-server/static/index.html, services/ws-server/static/style.css
Defaults module selection to et-ws-pyeye1 when available and adds disclaimer, log-note, status markup, and corresponding styles.
sequenceDiagram
participant BrowserAdapter
participant PythonWorkflow
participant Camera
participant FaceLandmarker
participant WebSocketAgent
participant Canvas
BrowserAdapter->>PythonWorkflow: provide platformFor(state)
PythonWorkflow->>WebSocketAgent: connect and send status
PythonWorkflow->>Camera: acquire and start video
PythonWorkflow->>FaceLandmarker: infer video frame
PythonWorkflow->>WebSocketAgent: send analysis event
PythonWorkflow->>BrowserAdapter: render result payload
BrowserAdapter->>Canvas: draw crop, irises, and analysis overlay
Loading
Possibly related PRs
edge-toolkit/core#91: Modifies the same pyeye1 workflow and eye_detection.py APIs.
We reviewed changes in 30f92d3...0d59ade on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The reason will be displayed to describe this comment to others. Learn more.
Method doesn't use the class instance and could be converted into a static method
The method doesn't use its bound instance. Decorate this method with @staticmethod decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.
The reason will be displayed to describe this comment to others. Learn more.
Method doesn't use the class instance and could be converted into a static method
The method doesn't use its bound instance. Decorate this method with @staticmethod decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.
The reason will be displayed to describe this comment to others. Learn more.
Method doesn't use the class instance and could be converted into a static method
The method doesn't use its bound instance. Decorate this method with @staticmethod decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
New Features
Documentation
Style