Decouple display and recording/inference FPS - #80
Conversation
There was a problem hiding this comment.
Pull request overview
Decouples high-rate camera frame processing (recording/inference) from GUI display updates by introducing a separate, throttled display_ready signal capped at GUI_MAX_DISPLAY_FPS, and improves GenTL FPS configuration/telemetry with new node-reading helpers and debug logging.
Changes:
- Add
display_readysignal and_should_emit_display_ready()throttling inMultiCameraController; restructure_on_frame_capturedtiming sections. - Split
_on_multi_frame_readyinto_on_multi_frame_processing_ready(recording/inference) and_on_multi_frame_display_ready(GUI), and addGUI_MAX_DISPLAY_FPSplus debug-timing flags inconfig.py. - Improve GenTL backend: add
_node_value/_node_float/_node_strhelpers,_debug_frame_rate_nodes, expanded telemetry (resulting vs requested FPS, exposure, gain, throughput, pixel format), and richer FPS configuration logging.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dlclivegui/config.py | Adds GUI_MAX_DISPLAY_FPS and debug timing flags. |
| dlclivegui/services/multi_camera_controller.py | Adds throttled display_ready signal and refactors frame handling/timing. |
| dlclivegui/gui/main_window.py | Splits processing/display handlers and rewires multi-camera signal connections. |
| dlclivegui/cameras/backends/gentl_backend.py | Adds node-reading helpers, FPS debug logging, and broader telemetry readback. |
| tests/gui/test_pose_overlay.py | Updates test to use renamed _on_multi_frame_processing_ready handler. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0560d43 to
fb1b2ed
Compare
|
Caution
|
fb1b2ed to
b9f18a9
Compare
Introduce a separate, throttled UI/display path for multi-camera frames. Add GUI_MAX_DISPLAY_FPS config and a new display_ready signal that is emitted at most at that rate, while frame_ready remains full-rate for recording/inference. Implement _should_emit_display_ready, wire the MultiCameraController to emit both signals, and reset throttling state when starting. Update the main window to handle processing and display paths via _on_multi_frame_processing_ready and _on_multi_frame_display_ready, and adjust tests accordingly. Also add GUI/debug timing config keys and a temporary timing-only early path in SingleCameraWorker (marked as FIXME).
Fix signal hookup and disable main-window timing flag. Replace the second connection of multi_camera_controller.frame_ready to _on_multi_frame_display_ready with multi_camera_controller.display_ready to separate processing-ready and display-ready events. Also comment out MAIN_WINDOW_DO_LOG_TIMING in config.py to disable main-window timing logging.
20f0b98 to
a8a750f
Compare
deruyter92
left a comment
There was a problem hiding this comment.
Good PR, looks good to me!
(Don't forget to flip the log timing config setting back when done debugging, but you've put a reminder)
Motivation
This pull request introduces several improvements to multi-camera handling, frame rate configuration, and debugging/telemetry in the codebase.
The main changes include
Automated summary
Multi-camera frame handling and GUI update throttling:
frame_readysignal (used for recording and inference) from the newdisplay_readysignal (throttled toGUI_MAX_DISPLAY_FPSfor efficient GUI updates) inMultiCameraController, with corresponding handler changes inmain_window.py(_on_multi_frame_processing_readyand_on_multi_frame_display_ready). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]GUI_MAX_DISPLAY_FPSglobal setting and related debug flags inconfig.py.main_window.pyto reflect the separation of processing and display paths. [1] [2] [3]Camera frame rate configuration and telemetry improvements:
gentl_backend.pyto log before/after states, use more robust node selection, and set the actual FPS based on accepted values.Debugging and utility enhancements:
_debug_frame_rate_nodesfor detailed logging of relevant GenICam node values, aiding in debugging frame rate issues. [1] [2]_node_value,_node_float, and_node_strfor robust, best-effort extraction of node values, reducing boilerplate and error handling throughout the code.These changes collectively make the system more robust for high-performance multi-camera setups and improve the ability to debug and monitor camera settings and telemetry.