Visitar URL original
DeepLabCut-live-GUI PySide6/multicamera documentation ("2.0") by C-Achard · Pull Request #3206 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f3a0c4d
[WIP] Add DeepLabCut-live GUI documentation
C-Achard Feb 6, 2026
897ff8e
Revert indent changes
C-Achard Feb 6, 2026
a49939e
Update _toc.yml
C-Achard Feb 6, 2026
d3ebacc
Merge branch 'cy/fix-toc-jb1.0.4post1' into cy/dlclivegui2.0-docs
C-Achard Feb 6, 2026
a9b413e
Move dlc-live previous docs
C-Achard Feb 10, 2026
febcab8
Reorganize and update DLC-Live GUI docs
C-Achard Feb 10, 2026
bc1903c
Add conda install instructions and clarify env
C-Achard Feb 10, 2026
53dc969
Revise dlclivegui overview and UI guide
C-Achard Feb 10, 2026
b089715
Delete myst.yml
C-Achard Feb 10, 2026
d8f0cf2
Reorganize camera backend docs & update TOC
C-Achard Feb 10, 2026
9a8faaa
Update overview.md
C-Achard Feb 10, 2026
f0f6d33
Update camera backends docs and TOC
C-Achard Feb 10, 2026
139b508
Move timestamp_format into user_guide/misc
C-Achard Feb 10, 2026
60341fe
Remove dlc-live-gui README and features
C-Achard Feb 10, 2026
31b7efc
Fix camera docs link and add OpenCV note
C-Achard Feb 10, 2026
77f7dba
Docs: normalize DeepLabCut-live-GUI branding
C-Achard Feb 10, 2026
b1aad42
Merge branch 'main' into cy/dlclivegui2.0-docs
C-Achard Feb 10, 2026
b83bc3a
Docs: Aravis backend config & link updates
C-Achard Feb 11, 2026
2b6d8a4
docs: improve Aravis backend documentation
C-Achard Feb 11, 2026
dde2a84
Update camera backend docs and add install tabs
C-Achard Feb 11, 2026
4a8db74
docs: clarify video timestamps and recorder notes
C-Achard Feb 11, 2026
b77f8db
Update DeepLabCut-live-GUI install guide for DLClive 1.1.0 version
C-Achard Feb 16, 2026
e63bd17
Update install.md
C-Achard Feb 16, 2026
3f63d8d
Add Basler camera backend documentation
C-Achard Feb 17, 2026
932758e
Specify supported Python versions
C-Achard Feb 17, 2026
7a08b30
Create gentl_backend.md
C-Achard Feb 17, 2026
13f8b60
Update aravis_backend.md
C-Achard Feb 17, 2026
144c450
Add timestamp note; update visualization section
C-Achard Feb 17, 2026
fc2b7a7
Add recording path note and undock tip
C-Achard Feb 17, 2026
b90f4aa
Create opencv_backend.md
C-Achard Feb 17, 2026
ad4bad5
Tidy up camera docs
C-Achard Feb 17, 2026
0523771
Create modelzoo_downloads.md
C-Achard Feb 17, 2026
3656c89
Update opencv_backend.md
C-Achard Feb 17, 2026
5d7f554
Update modelzoo_downloads.md
C-Achard Feb 17, 2026
44182b5
Add misc landing page and update TOC & install
C-Achard Feb 17, 2026
d26b74e
Merge branch 'main' into cy/dlclivegui2.0-docs
C-Achard Feb 17, 2026
8ee492c
Fix typo
C-Achard Feb 17, 2026
fb280af
Merge branch 'cy/dlclivegui2.0-docs' of https://github.com/C-Achard/D…
C-Achard Feb 17, 2026
5c1defb
Update index.md
C-Achard Feb 20, 2026
da08158
docs(dlc-live-gui): update install quickstart
C-Achard Feb 20, 2026
7fa3488
Update main_window_100226.png
C-Achard Feb 20, 2026
a31b107
Add GPU install note and tidy backend install blocks
C-Achard Feb 20, 2026
d034450
docs(dlc-live-gui): refine docs and install quickstart
C-Achard Feb 26, 2026
f77bbf3
Add Sphinx cross-reference anchors for backends
C-Achard Feb 26, 2026
733f2bc
Docs: update camera backend guidance
C-Achard Feb 26, 2026
148e470
Improve OpenCV backend docs structure
C-Achard Feb 26, 2026
42d0d16
Refactor Aravis backend docs layout
C-Achard Feb 27, 2026
3b05b82
docs: restructure Basler backend user guide
C-Achard Feb 27, 2026
c3588a9
docs: improve GenTL backend user guide
C-Achard Feb 27, 2026
094176e
Relocate frame-size note to overview docs
C-Achard Feb 27, 2026
5cc5403
Add detector_name to modelzoo export example
C-Achard Feb 27, 2026
ebb7a55
Mention detectors and add detector_name
C-Achard Mar 2, 2026
1a9d788
Add model zoo download/export note
C-Achard Mar 3, 2026
0a0b68b
Clarify TensorFlow note in modelzoo docs
C-Achard Mar 3, 2026
a806ed9
Merge branch 'main' into cy/dlclivegui2.0-docs
deruyter92 Mar 9, 2026
968475f
Update install.md
C-Achard Mar 9, 2026
23b0275
Fix quickstart directory and package name
C-Achard Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Basler camera backend documentation
Add a new user guide page for the Basler backend (docs/dlc-live/dlc-live-gui/user_guide/cameras_backends/basler_backend.md). The document describes installation (pylon SDK and pypylon), features, camera selection (index or serial device_id), configuration options under properties.basler, shared camera settings (fps, exposure, gain, resolution), resolution handling, pixel format conversion to BGR8, device discovery, troubleshooting tips, an example configuration, and resource links for pypylon and Basler installation. This provides users guidance to set up and use Basler cameras with the DLC-Live GUI.
  • Loading branch information
C-Achard committed Feb 17, 2026
commit 3f63d8db7c04ed6e17c41201464da600d942271c
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
# Basler Backend

The Basler backend provides support for Basler cameras using the official **pylon SDK** through the **pypylon** Python bindings.

Download the official pylon SDK from Basler and install the `pypylon` Python package to use this backend.

```{note}
This backend requires the optional `pypylon` dependency. If `pypylon` is not installed, the backend will be unavailable.
```

---

## Features

- Native Basler camera support via **pypylon** (Pylon SDK bindings).
- Best-effort device discovery without opening cameras (enumerates `DeviceInfo` entries).
- Stable camera identity via **serial number** (`device_id`) with automatic index rebinding.
- Configurable exposure, gain, frame rate, and resolution.
- Frames are converted to **BGR (8-bit)** for consistency with other GUI backends.

---

## Installation

```{important}
For up to date installation instructions, please refer to the
[official pypylon documentation](https://github.com/basler/pypylon?tab=readme-ov-file#Installation)
and the [Basler pylon software installation guide](https://docs.baslerweb.com/camera-installation).
```

### 1) Install Basler pylon SDK

Basler recommends installing **pylon** first (strongly recommended even if you install `pypylon` via pip).

#### Linux

Basler provides pylon for Linux as **Debian packages** and **.tar.gz archives** (x86_64 and ARM variants).

- Download the matching pylon installer from Basler and follow the included `INSTALL` instructions.

#### Windows

- Install the Basler pylon Camera Software Suite (includes drivers and tooling).

#### macOS

- Install the Basler pylon package for macOS (Intel/ARM supported, depending on Basler release). Basler lists macOS as a supported system for pypylon usage.

### 2) Install `pypylon`

Install into the same Python environment as your GUI:

```bash
pip install pypylon
```

`pypylon` is the official Python wrapper for the Basler pylon Camera Software Suite

---

## Basic configuration

Select the Basler backend in the GUI or via configuration:

```json
{
"camera": {
"backend": "basler",
"index": 0,
"fps": 30.0,
"exposure": 8000,
"gain": 5.0
}
}
```

---

## Camera selection

### By index (default)

```json
{
"camera": {
"backend": "basler",
"index": 0
}
}
```

### By serial number (recommended for stability)

The backend supports a stable identity field `device_id` (serial number). When present, it is preferred over `index` and is also persisted automatically after a successful open.

```json
{
"camera": {
"backend": "basler",
"index": 0,
"properties": {
"basler": {
"device_id": "40312345"
}
}
}
}
```

How selection works:

1. If `properties.basler.device_id` is set, the backend selects the device with a matching serial number.
2. Otherwise, the backend uses `index`.

---

## Full properties and configuration

Basler-specific options live under the `properties.basler` namespace.

### Related camera settings (shared across backends)

These values are configurable in the GUI and are shared for all backends.

- `width` (int): requested image width. Use `0` for “Auto / keep device default”.
- `height` (int): requested image height. Use `0` for “Auto / keep device default”.
- `fps` (float): requested acquisition frame rate. Use `0.0` to not set.
- `exposure` (float): exposure time in microseconds. Use `<= 0` to not set.
- `gain` (float): camera gain value. Use `<= 0` to not set.

### Basler namespace options

These settings live under the `properties.basler` entry.

- `device_id` (string): preferred stable identity (camera serial number).
- `fast_start` (bool, default: false): probe-mode hint.
- When `true`, the backend will open the camera but **will not start grabbing** and will **not create the pixel format converter**.
- This is intended for fast capability probing; it is **not suitable for normal capture**.
- `resolution` ([w, h]): optional override resolution pair.
- Used only if `width`/`height` are not set.

### Auto-populated Basler metadata

After a successful open, the backend may populate the following read-only convenience fields in `properties.basler`:

- `device_name`: a friendly device name (if provided by the SDK).
- (Optionally) `device_path`: a full identifier string (depending on SDK/device).

These fields are managed automatically and are not required to configure the backend.

---

## Exposure and gain

Behavior:

- If `exposure > 0`, the backend attempts to disable `ExposureAuto` (if present) and sets `ExposureTime` in microseconds.
- If `gain > 0`, the backend attempts to disable `GainAuto` (if present) and sets `Gain`.
- If `exposure <= 0` or `gain <= 0`, the backend leaves the camera’s auto/manual mode unchanged.

Example:

```json
{
"camera": {
"backend": "basler",
"exposure": 10000,
"gain": 6.0
}
}
```

---

## Frame rate (FPS)

- FPS is only applied when `fps > 0`.
- The backend attempts to enable `AcquisitionFrameRateEnable` when available, then sets `AcquisitionFrameRate`.
- The backend reads back the **actual FPS** (if available) and exposes it via telemetry.

---

## Resolution handling

Resolution is only changed when explicitly requested.

Priority order for requesting a resolution:

1. `width` + `height` (GUI fields)
2. `properties.basler.resolution` (namespaced override)

If no resolution is provided (or if width/height are `0`), the backend preserves the camera’s default configuration.

Increment and range constraints:

- Many Basler cameras restrict `Width`/`Height` to specific increments.
- The backend snaps requested values down to the nearest valid increment (best-effort) and clamps to min/max.
- A warning is logged if the requested and applied resolutions differ.

---

## Pixel format and color conversion

To provide a consistent frame format across backends, the Basler backend converts frames to:

- **BGR8 packed** (8-bit BGR)

Internally, it uses a pypylon `ImageFormatConverter` configured for `PixelType_BGR8packed`.

---

## Device discovery

The backend can enumerate devices without opening them and returns (best-effort):

- `index`: current device list index
- `label`: human-readable label (vendor/model + serial if available)
- `device_id`: serial number (stable identity)
- `path`: full name string (if available)

Note that availability and richness of fields depend on camera transport and SDK support.

---

## Troubleshooting

### Backend not available / import error

- Ensure `pypylon` is installed:
```bash
python -c "import pypylon"
```
- Install it if missing:
```bash
pip install pypylon
```


### No cameras detected

- Verify the Basler pylon runtime is installed and your camera is visible in Basler tooling.
- On Linux, ensure you installed pylon using the Basler-provided packages/archives and followed the included `INSTALL` guide.

### Resolution mismatch warnings

If you request a resolution that violates camera constraints (min/max or increment), the backend will snap/clamp to valid values and log a warning.

---

## Example configuration

```json
{
"camera": {
"backend": "basler",
"index": 0,
"fps": 60.0,
"exposure": 8000,
"gain": 10.0,
"width": 1920,
"height": 1080,
"properties": {
"basler": {
"device_id": "40312345"
}
}
}
}
```

---

## Resources

- Basler pypylon (PyPI): [Open on PyPI](https://pypi.org/project/pypylon/)
- Basler pylon Software Installation (Linux): [See Basler documentation](https://docs.baslerweb.com/camera-installation)