Skip to content

Comments

Upgrade PySide6 multi-camera GUI#38

Open
C-Achard wants to merge 185 commits intomasterfrom
cy/pre-release-fixes-2.0
Open

Upgrade PySide6 multi-camera GUI#38
C-Achard wants to merge 185 commits intomasterfrom
cy/pre-release-fixes-2.0

Conversation

@C-Achard
Copy link

@C-Achard C-Achard commented Jan 30, 2026

Finalizing the PySide6+multi-camera GUI

Further refinement of GUI added in #35 by @arturoptophys

Features

  • Full project file tree refactor for more granularity and ease of use
  • Typed configs
  • Improved settings UX/UI Works as is, delayed
  • Theme/UI alignment with DLC, icons, colors, etc
  • Improved camera loading UX and validation
  • Many fixes to OpenCV backend
  • Finish config refactor
  • Fixes all issues in Pre-release fixes & improvements checklist #37
  • Fixes all issues in Feedback thread for PySide6 GUI #40
  • Figure out a proper multi-platform, multi-device OpenCV backend design
  • Make processor socket design a bit safer by default
    • Added proper warnings about executing custom code, leaving this up to user responsibiity

Also tweaks error handling, UI and UX.

Additional TODOs

Related

arturoptophys and others added 30 commits October 21, 2025 11:22
…modern-python-and-pyqt6

Add Basler and GenTL camera backends for modular capture
…camera-functionality

Rework layout and camera handling controls
…r integration

- Implemented `get_device_count` method in `GenTLCameraBackend` to retrieve the number of GenTL devices detected.
- Added `max_devices` configuration option in `CameraSettings` to limit device probing.
- Introduced `BoundingBoxSettings` for bounding box visualization, integrated into the main GUI.
- Enhanced `DLCLiveProcessor` to accept a processor instance during configuration.
- Updated GUI to support processor selection and auto-recording based on processor commands.
- Refactored camera properties handling and removed deprecated advanced properties editor.
- Improved error handling and logging for processor connections and recording states.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Introduce a new color_dropdowns module to provide colormap and bbox-color QComboBox helpers (gradient swatches, matplotlib registry integration, and enum-based BGR swatches). Refactor layouts.make_two_field_row (renamed and enhanced) to support flexible key/value pairs, styling, and optional spacing, and add enable_combo_shrink_to_current to size combos to their current item. Integrate these into the main window: wire a Visualization group with colormap and bbox color controls, use the new helpers to populate and manage combo state, add _on_colormap_changed, and update bbox color handling. Also update ui_blocks to use make_two_field_row, tweak several UI labels/rows, comment out the PYLON emulation env var, and change several CameraConfigDialog log statements from INFO to DEBUG for less noisy logging.
Introduce a ShrinkCurrentWidePopupComboBox and ComboSizing to make combobox controls shrink to the current selection while the popup widens to fit the longest item. Add factory helpers (make_colormap_combo, make_bbox_color_combo) that create/populate colormap and bbox-color combos with sizing, icons, tooltips and safer Matplotlib handling. Rename/refactor colormap helpers (list_colormap_names, _safe_mpl_colormaps_registry), improve gradient icon creation, and preserve editable behavior if Matplotlib is unavailable. Update main_window to use the new factories, pass sizing and icon options, and adjust key widths for layout consistency.
Add graceful SIGINT handling for the Qt app by installing a signal handler that closes the main window and starting a small QTimer keepalive so Python can process signals while the event loop runs. The timer is stored on QApplication as _sig_timer and cleaned up on aboutToQuit. In the GUI, replace plain QComboBox instances with color_ui.ShrinkCurrentWidePopupComboBox for processor and camera controls, and layout them together using lyts.make_two_field_row to produce a compact, stable row and avoid shifting.
Import the logging module and emit an informational log when a keyboard interrupt triggers _request_quit inside _maybe_allow_keyboard_interrupt. This adds visibility for debugging application shutdowns without changing existing close behavior.
Replace the previous side-panel layout with a QDockWidget-based controls panel to allow docking/undocking and prevent UI shifting. Extract stats layout into _build_stats_layout and enable selectable stats text. Add sizing/shrink options and placeholder for processor and camera combo boxes and call update_shrink_width at key points so combo widths adapt. Add controls toggle to the View menu, set dock features/options, and give the dock a stable objectName for state saving. Also stop the display timer on shutdown and perform minor UI/layout cleanups and refactors (imports and button/preview layout adjustments).
Allow the left controls dock to be closed independently by adding QDockWidget.DockWidgetClosable to its features. Hide the docked title bar by applying a transparent stylesheet to the controls dock to improve visual integration. Also add a separator in the View menu before the Appearance submenu
Prevent the Controls dock from being closed by the user (keep it movable/floatable) and replace the previous toggleViewAction with an explicit, checkable "Show controls" QAction in the View menu. The new action is synchronized with the dock's visibility (action toggled -> dock visibility; dock visibilityChanged -> action checked). Also minor reordering/cleanup of Appearance menu setup and comments.
Improve camera config loading UX and improve Basler backend
…-backend"

This reverts commit 03af146, reversing
changes made to fe62907.
@C-Achard C-Achard linked an issue Feb 16, 2026 that may be closed by this pull request
17 tasks
Major rewrite of README to reflect the new PySide6-based DeepLabCut-Live-GUI. Updates include renamed project header and badges, updated license badge, new system requirements, detailed installation instructions (uv and conda/mamba workflows), run instructions, and a concise typical workflow (multi-camera preview, inference, and recording). Notes added about current limitations, references/citation, and contribution/feedback guidance; legacy tkinter-focused guidance and some older UI walkthrough text were removed or replaced with modernized guidance.
Rework and clarify installation steps in README.md: add a top-level "Clone the repository" step, consolidate and renumber environment/setup steps, and remove duplicated clone instructions. Move and clarify Windows activation commands, ensure guidance for running the app references conda/uv usage, and add TIP/IMPORTANT/NOTE callouts for GPU/CUDA compatibility and environment activation. Minor formatting and ordering fixes to make the installation flow easier to follow.
Add default_stages and explicitly assign stages to hooks, separating local mutating hooks from CI-only checks. Configure check-* hooks (check-added-large-files, check-yaml, check-toml, check-merge-conflict) to run in pre-commit and manual where appropriate; mark end-of-file-fixer, trailing-whitespace and pyproject-fmt as local-only. Add validate-pyproject to pre-commit/manual. Rework ruff hooks into distinct local autofix entries (ruff-check with --fix/--unsafe-fixes and ruff-format write) and CI check-only entries (named ruff-check (ci) and ruff-format (ci) with non-writing args). Remove the prior name-tests-test entry and add clarifying comments and names for maintainability.
Switch workflow to run pre-commit only for pull requests and only on files changed in the PR. Adds a detect_changes job to fetch the base ref and output changed file list, then a conditional precommit job that runs only when there are changed files. Updates checkout and setup actions (actions/checkout@v4, setup-python@v5), bumps Python to 3.12, installs pre-commit, and runs pre-commit in a CI check-only mode on the changed files to speed up CI and avoid running on the whole repo.
Add standardized linting workflow and config
Update .github/workflows/ci.yml to also trigger CI on the 'master' branch for both push and pull_request events. This ensures CI runs for repositories or workflows that still use 'master' alongside 'main'.
@C-Achard
Copy link
Author

Note : tests are expected to fail in CI for no; fixed in #48 (due to non-updated DLC-live dep)

Upgrade GitHub Action usages in workflows: actions/checkout bumped to v6 and actions/setup-python to v6 in format.yml. Simplify testing-ci.yml triggers by replacing branch filters with pull_request types (opened, synchronize, reopened) and remove the explicit push/branches section. Also remove the Codecov token entry (relying on tokenless or other auth), and keep codecov action configuration intact. These changes modernize action versions and streamline CI trigger/auth configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pre-release checklist

4 participants