-
Notifications
You must be signed in to change notification settings - Fork 24
Updating DLCLive!-GUI to pyQt6 as well as DLC3/pytorch models #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…modern-python-and-pyqt6 Add Basler and GenTL camera backends for modular capture
…era-functionality
…camera-functionality Rework layout and camera handling controls
…' into artur/test_update
…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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the DeepLabCut-live-GUI by migrating from Tkinter to PyQt6 and adding support for DLC3/PyTorch models. The update includes hardware-accelerated video encoding (NVENC), a new processor selection system with on-the-fly changes, remote control capabilities via processor sockets, and user-definable bounding box visualization.
Key Changes:
- Complete UI rewrite from Tkinter to PyQt6
- Added support for PyTorch-based DLC models
- Implemented hardware-accelerated video recording with NVENC
- Added processor plugin system with remote control capabilities
- Introduced multiple camera backends (OpenCV, GenTL, Aravis, Basler)
Reviewed changes
Copilot reviewed 48 out of 49 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Updated version to 2.0, Python requirement to >=3.10, replaced dependencies for PyQt6 |
| pyproject.toml | Added modern Python packaging configuration with comprehensive test setup |
| docs/user_guide.md | New comprehensive user guide for camera setup, DLC configuration, and recording |
| docs/timestamp_format.md | Documents JSON timestamp format for frame synchronization |
| docs/features.md | Detailed feature documentation including camera backends and processor system |
| docs/camera_support.md | Camera backend comparison and installation guides |
| docs/aravis_backend.md | Aravis backend documentation for GenICam cameras |
| docs/README.md | Documentation index with navigation by use case and topic |
| dlclivegui/video_recorder.py | New video recording module using vidgear with hardware acceleration |
| dlclivegui/gui.py | Complete PyQt6-based GUI implementation replacing Tkinter |
| dlclivegui/dlc_processor.py | DLCLive integration with threading and performance profiling |
| dlclivegui/config.py | Configuration management with dataclasses |
| dlclivegui/cameras/opencv_backend.py | OpenCV camera backend implementation |
| dlclivegui/cameras/gentl_backend.py | GenTL/Harvesters camera backend |
| dlclivegui/cameras/factory.py | Camera backend factory and detection |
| dlclivegui/cameras/base.py | Abstract camera backend base class |
| dlclivegui/processors/processor_utils.py | Processor plugin loading utilities |
| dlclivegui/processors/dlc_processor_socket.py | Socket-based processor with remote control |
| dlclivegui/processors/PLUGIN_SYSTEM.md | Processor plugin system documentation |
Comments suppressed due to low confidence (1)
dlclivegui/processors/processor_utils.py:1
- The docstring 'Returns:' section contains what appears to be an absolute file path rather than a description of the return value. This should describe the returned dictionary structure instead.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from dlclivegui.processors.processor_utils import instantiate_from_scan, scan_processor_folder | ||
| from dlclivegui.video_recorder import RecorderStats, VideoRecorder | ||
|
|
||
| os.environ["CUDA_VISIBLE_DEVICES"] = "1" |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded environment variable and absolute path should not be in production code. These appear to be development-specific settings that should be removed or made configurable through the configuration system.
| os.environ["CUDA_VISIBLE_DEVICES"] = "1" | |
| # If you need to restrict CUDA devices, set CUDA_VISIBLE_DEVICES externally or via configuration. |
|
|
||
| logging.basicConfig(level=logging.INFO) | ||
|
|
||
| PATH2MODELS = "C:\\Users\\User\\Repos\\DeepLabCut-live-GUI\\dlc_training\\dlclive" |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded environment variable and absolute path should not be in production code. These appear to be development-specific settings that should be removed or made configurable through the configuration system.
| PATH2MODELS = "C:\\Users\\User\\Repos\\DeepLabCut-live-GUI\\dlc_training\\dlclive" | |
| # Use environment variable DLC_PATH2MODELS if set, otherwise default to a relative path | |
| PATH2MODELS = os.environ.get("DLC_PATH2MODELS", str(Path(__file__).parent.parent / "dlc_training" / "dlclive")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arturoptophys see copilot suggestions; please let me know if you would like assistance!
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| return True | ||
|
|
||
| def stop(self) -> None: | ||
| """Request a graceful stop.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
This updates the GUI to pyQt6.
New features: