Add optional pose/segmentation overlay copy to frame export#400
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the GUI’s File → Export Frame flow to optionally save a second “overlay” copy of the exported frame, rendered at native video resolution with pose skeleton/keypoints and (v6+) segmentation contours, while refactoring pose drawing into a shared helper used by both live overlay rendering and export.
Changes:
- Added shared
pose_drawing.pyhelper and updated the livePoseOverlayto use it. - Added
PlayerWidget.get_overlay_frame()to render pose + segmentation overlays at native resolution for frame export. - Updated the export-frame save dialog to a non-native
QFileDialogwith a persistent “also save overlay copy” checkbox; updated tests and user guide docs accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/ui/test_pose_drawing.py | Adds unit tests for the shared pose-drawing helper sizing and draw behavior. |
| tests/ui/test_menu_handlers.py | Updates export-frame tests for the new non-native dialog + checkbox and adds overlay-export test coverage. |
| src/jabs/ui/player_widget/pose_drawing.py | Introduces shared draw_identity_pose + native-resolution sizing helper. |
| src/jabs/ui/player_widget/player_widget.py | Adds get_overlay_frame() for native-res overlay rendering and exports. |
| src/jabs/ui/player_widget/overlays/pose_overlay.py | Refactors live overlay drawing to use the shared pose-drawing helper. |
| src/jabs/ui/main_window/menu_handlers.py | Adds checkbox-enabled export path for optional “-overlay.png” copy and persists checkbox state. |
| src/jabs/resources/docs/user_guide/gui.md | Updates in-app user guide text for the new export option. |
| docs/user-guide/gui.md | Updates online user guide text for the new export option. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Extends File → Export Frame with an option to also save an annotated copy of the frame.
Use case is to provide additional context when saving frames with pose or segmentation failures -- the raw frame can be used for labeling; the frame-with-overlay shows the failure.
What it does
<name>.pngit writes<name>-overlay.png.v6+); a no-op otherwise.QSettings.Implementation notes
pose_drawing.pyfactors the skeleton/keypoint drawing into a shared, coordinate-transform-parameterized helper.PoseOverlay(the live, display-resolution overlay) now uses it too, so the on-screen overlay and the export share one code path. Segmentation reuses the existingoverlay_segmentationfromjabs.video_reader.PlayerWidget.get_overlay_frame()mirrorsget_raw_frame()but bakes segmentation and paints the pose at native resolution.Tests & docs
pose_drawinghelper and the export handler's overlay path; the existing export-frame tests were updated for the new dialog.docs/and in-app help).