This commit introduces the necessary infrastructure for integrating pupil segmentation into the mono camera pipelines.
Key changes include:
- Modifying `gstreamer_pipeline.py` to add a tee element to split mono camera streams, creating a dedicated branch for segmentation output with a placeholder `videoconvert` element and `appsink`. This also includes new callbacks and data structures to handle the segmentation frames.
- Adding a new Flask route `/segmentation_feed/<int:stream_id>` to `app.py` to serve the segmentation video stream to the frontend.
- Updating `index.html` to display the new segmentation feed and implementing cache-busting for all video streams.
- Introducing `test_segmentation.py` to verify the functionality of the new segmentation feed.
- Refine existing UI and visual tests by updating locators and fixing indentation errors to accommodate the new segmentation feature and maintain test stability.
Addressed the persistent "tiny bit" of viewport overflow reported by the user.
- **Removed `h1` margins:** Set `margin: 0;` on the `h1` element to prevent its
margins from contributing to unexpected layout shifts.
- **Centralized vertical spacing on `body`:** Managed overall top/bottom spacing
with `padding-top: 20px; padding-bottom: 20px;` on the `body`.
- **Introduced flex `gap` for vertical separation:** Used `gap: 20px;` on the `body`
(as a flex container) to precisely control the spacing between the `h1` and
`.main-container`.
- **Ensured correct box-sizing for `body`:** Explicitly set `box-sizing: border-box;`
on `body` to include its padding within the `100vh` height calculation,
guaranteeing exact fit.
These adjustments collectively ensure the entire interface fits perfectly within
the `100vh` viewport without any overflow.
Addressed user feedback to prevent the camera feed section and its internal
streams from overflowing the viewport.
- **Explicitly constrained camera-view height:** Ensured `.camera-view` utilizes
`height: 100%` and `overflow-y: auto` to fit within its parent (`.main-container`)
and allow internal scrolling if content is too tall.
- **Refined individual stream container sizing:** Removed fixed `height: 100%`
from `.camera-container-individual` and re-enabled `max-width: 100%`. This,
combined with `aspect-ratio` and `max-height: 100%`, allows individual camera
streams to scale correctly within their allocated grid cells without causing
overflow.
- **Ensured grid row containment:** Applied `height: 100%` and `overflow: hidden`
to `.camera-color-row` and `.camera-mono-row` to tightly constrain content
within grid rows.
Addressed user feedback regarding precise layout adjustments for the Lamp
Matrix Control (LMC) interface.
- **Removed all explicit padding:** Removed `padding` from `.main-container`
and `padding-right` from `.lamp-view` to make content flush with browser edges
as per new instructions.
- **Unified Control Widths:** Explicitly set `width: 470px` for `.region-control`,
`.control-panel`, and `.center-lamp-control` to ensure they precisely match
the calculated 470px width of the `.matrix-grid`. This creates visual
consistency and horizontal alignment across all LMC components.
- **Centered LMC Components:** Ensured all LMC components are horizontally
centered within the `.lamp-view` by setting `align-items: center` on
`.lamp-view .main-content`.
Resolved issues with the Lamp Matrix control being cropped and distorting,
and not maintaining a fixed 5x5 layout.
- **Fixed 5x5 Matrix:** Reverted `.matrix-grid` to `grid-template-columns: repeat(5, 70px)`
to enforce a consistent 5x5 lamp layout.
- **Prevented Warping:** Removed `width: 100%` from `.matrix-grid` to allow its
width to be intrinsically determined by its content, preventing distortion.
- **Ensured Adequate Space:** Set `.lamp-view` to `flex: 0 0 auto` with a
`min-width: 480px` to guarantee sufficient space for the fixed matrix and
controls without cropping.
- **Responsive Control Panels:** Applied `max-width: 470px` to `.control-panel`
and `.center-lamp-control` to align their size with the matrix grid while
maintaining responsiveness in smaller viewports.
- **Full Screen Utilization:** Ensured the overall application expands to fill
the browser window by removing `max-width` from `.main-container`.
This commit introduces a refined layout and styling for the camera streams
in the unified web UI. Key changes include:
- **Responsive Grid Layout:** Implemented a CSS Grid-based layout for camera feeds,
ensuring the color camera occupies 1/3 height and mono cameras 2/3 height.
- **Improved Stream Fit:** Adjusted CSS to ensure individual camera streams
(visual containers) perfectly fit within their designated borders without
cropping, distortion, or excessive transparent space, addressing user feedback
regarding "zoomed out" or ill-fitting streams.
- **Aesthetic Enhancements:** Removed black backgrounds from stream containers
and applied corner radii for a modern look.
- **Padding Adjustments:** Optimized padding to prevent UI elements from appearing
cramped while maintaining visual separation.
- **New Tests:** Added robust visual tests () to programmatically
verify layout correctness and ensure tight fitting of camera feeds within
their containers.
- **Dependency Updates:** Updated to reflect any new or
changed Python dependencies.
- **Test Runner & Gitignore:** Included script and updated
to properly ignore virtual environment artifacts.
- Add a new section to the web UI to display pupil detection data and a live camera stream with YOLO segmentation.
- Add a /video_feed endpoint to stream the annotated camera feed.
- Update the VisionSystem to support onnxruntime-gpu with a fallback to CPU.
- Add logging to indicate which backend is being used.
- Refactor the test suite to accommodate the new features and fix existing tests.