Skip to content

Commit df40496

Browse files
committed
Revise README: modern GUI, install, and usage
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.
1 parent 37116b1 commit df40496

File tree

1 file changed

+142
-34
lines changed

1 file changed

+142
-34
lines changed

README.md

Lines changed: 142 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,177 @@
1-
# DeepLabCut-Live! GUI <img src="https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1596193544929-NHMVMXPVEYZ6R4I45DSR/ke17ZwdGBToddI8pDm48kOHwsIwndRGCkvek0XAcW4ZZw-zPPgdn4jUwVcJE1ZvWEtT5uBSRWt4vQZAgTJucoTqqXjS3CfNDSuuf31e0tVH0wqgmu6zkAOZ3crWCtkmLcPIuzHaxU8QRzZwtrVtHupu3E9Ef3XsXP1C_826c-iU/DLCLIVEGUI_LOGO.png?format=750w" width="350" title="DLC-live GUI" alt="DLC LIVE! GUI" align="right" vspace = "100">
1+
# DeepLabCut-Live-GUI <img src="https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1596193544929-NHMVMXPVEYZ6R4I45DSR/ke17ZwdGBToddI8pDm48kOHwsIwndRGCkvek0XAcW4ZZw-zPPgdn4jUwVcJE1ZvWEtT5uBSRWt4vQZAgTJucoTqqXjS3CfNDSuuf31e0tVH0wqgmu6zkAOZ3crWCtkmLcPIuzHaxU8QRzZwtrVtHupu3E9Ef3XsXP1C_826c-iU/DLCLIVEGUI_LOGO.png?format=750w" width="350" title="DLC-live GUI" alt="DLC LIVE! GUI" align="right" vspace="100"/>
22

3-
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
3+
4+
[![Code style:Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
45
![PyPI - Python Version](https://img.shields.io/pypi/v/deeplabcut-live-gui)
56
![PyPI - Downloads](https://img.shields.io/pypi/dm/deeplabcut-live-gui?color=purple)
6-
![Python package](https://github.com/DeepLabCut/DeepLabCut-live/workflows/Python%20package/badge.svg)
7+
![Python versions](https://img.shields.io/pypi/pyversions/deeplabcut-live-gui)
8+
<!-- ![Python package](https://github.com/DeepLabCut/DeepLabCut-live/workflows/Python%20package/badge.svg) -->
79

8-
[![License](https://img.shields.io/pypi/l/deeplabcutcore.svg)](https://github.com/DeepLabCut/deeplabcutlive/raw/master/LICENSE)
9-
[![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&amp;url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fdeeplabcut.json&amp;query=%24.topic_list.tags.0.topic_count&amp;colorB=brightgreen&amp;&amp;suffix=%20topics&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tags/deeplabcut)
10+
[![License](https://img.shields.io/github/license/DeepLabCut/DeepLabCut-live-GUI?label=license)](https://github.com/DeepLabCut/DeepLabCut-live-GUI/blob/main/LICENSE)
11+
[![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fdeeplabcut.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tags/deeplabcut)
1012
[![Gitter](https://badges.gitter.im/DeepLabCut/community.svg)](https://gitter.im/DeepLabCut/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
1113
[![Twitter Follow](https://img.shields.io/twitter/follow/DeepLabCut.svg?label=DeepLabCut&style=social)](https://twitter.com/DeepLabCut)
1214

13-
GUI to run [DeepLabCut-live](https://github.com/DeepLabCut/DeepLabCut-live) on a video feed, record videos, and record external timestamps.
15+
GUI to run [DeepLabCut-Live](https://github.com/DeepLabCut/DeepLabCut-live) on a video feed, **preview and record from one or multiple cameras**, and optionally record external timestamps and processor outputs.
16+
17+
## Update
18+
19+
> The GUI has been modernized and is now built with **PySide6 (Qt)** (replacing tkinter). The new interface supports **multi-camera preview** with a **tiled display**, PyTorch models, and features improved interactive workflows for experimental use.
20+
21+
---
22+
23+
## Documentation
24+
25+
> Full documentations is a work in progress and will be posted to DeepLabCut's official docs site when ready.
26+
27+
---
28+
29+
## System requirements (quick summary)
30+
31+
- **Python 3.10, 3.11 or 3.12**
32+
- One inference backend (choose at least one):
33+
- **PyTorch** *(recommended for best performance & compatibility)*
34+
- **TensorFlow** *(for backwards compatibility with existing models; Windows limitation applies for Python > 3.10)*
35+
- A supported camera backend (OpenCV webcams by default; additional backends supported)
36+
37+
---
1438

15-
## [Installation Instructions](docs/install.md)
39+
## Installation
1640

17-
## Getting Started
41+
This project is currently installed **from source** (editable install).
42+
The newest GUI and features may not yet be available on PyPI.
1843

19-
#### Open DeepLabCut-live-GUI
44+
### Option A — Install with `uv`
2045

21-
In a terminal, activate the conda or virtual environment where DeepLabCut-live-GUI is installed, then run:
46+
#### 1) Create & activate a new virtual environment
2247

48+
```bash
49+
uv venv dlclivegui
50+
# Linux/macOS:
51+
source dlclivegui/bin/activate
52+
# Windows (Command Prompt):
53+
# .\dlclivegui\Scripts\activate.bat
54+
# Windows (PowerShell):
55+
# .\dlclivegui\Scripts\Activate.ps1
2356
```
24-
dlclivegui
57+
58+
#### 2) Clone the repository
59+
60+
```bash
61+
git clone https://github.com/DeepLabCut/DeepLabCut-live-GUI.git
62+
cd DeepLabCut-live-GUI
63+
```
64+
65+
#### 3) Choose inference backend and install
66+
67+
You may install **PyTorch** or **TensorFlow** extras (or both), but you must choose at least one to run inference.
68+
69+
- **PyTorch (recommended):**
70+
71+
```bash
72+
uv pip install -e .[pytorch]
73+
```
74+
75+
- **TensorFlow (backwards compatibility):**
76+
77+
```bash
78+
uv pip install -e .[tf]
2579
```
2680

81+
> For GPU/CUDA specifics and framework compatibility, please follow the official PyTorch/TensorFlow install guidance for your OS.
2782
28-
#### Configurations
83+
---
84+
85+
### Option B — Install with `mamba` / `conda`
86+
87+
#### 1) Create & activate a new conda environment
88+
89+
```bash
90+
conda create -n dlclivegui python=3.12
91+
conda activate dlclivegui
92+
```
93+
94+
#### 2) Clone the repository
95+
96+
```bash
97+
git clone https://github.com/DeepLabCut/DeepLabCut-live-GUI.git
98+
cd DeepLabCut-live-GUI
99+
```
100+
101+
#### 3) Install with your inference backend
102+
103+
- **PyTorch (recommended):**
104+
105+
```bash
106+
pip install -e .[pytorch]
107+
```
108+
109+
- **TensorFlow:**
110+
111+
```bash
112+
pip install -e .[tf]
113+
```
114+
115+
---
116+
117+
## Run the application
118+
119+
After installation, start the application with:
120+
121+
```bash
122+
dlclivegui # in conda/mamba or after activating your venv
123+
# OR:
124+
uv run dlclivegui
125+
```
29126

127+
> **Important:** Activate your venv/conda environment before launching so the GUI can access installed dependencies.
30128
31-
First, create a configuration file: select the drop down menu labeled `Config`, and click `Create New Config`. All settings, such as details about cameras, DLC networks, and DLC-live Processors, will be saved into configuration files so that you can close and reopen the GUI without losing all of these details. You can create multiple configuration files on the same system, so that different users can save different camera options, etc on the same computer. To load previous settings from a configuration file, please just select the file from the drop-down menu. Configuration files are stored at `$HOME/Documents/DeepLabCut-live-GUI/config`. These files do not need to be edited manually, they can be entirely created and edited automatically within the GUI.
129+
---
32130

33-
#### Set Up Cameras <img src= https://imagizer.imageshack.com/img924/626/acJhWD.png align="right">
131+
## Typical workflow
34132

35-
To setup a new camera, select `Add Camera` from the dropdown menu, and then click `Init Cam`. This will be bring up a new window where you need to select the type of camera (see [Camera Support](docs/camera_support.md)), input a name for the camera, and click `Add Camera`. This will initialize a new `Camera` entry in the drop down menu. Now, select your camera from the dropdown menu and click`Edit Camera Settings` to setup your camera settings (i.e. set the serial number, exposure, cropping parameters, etc; the exact settings depend on the specific type of camera). Once you have set the camera settings, click `Init Cam` to start streaming. To stop streaming data, click `Close Camera`, and to remove a camera from the dropdown menu, click `Remove Camera`.
133+
The new GUI supports **one or more cameras**.
36134

37-
#### Processor (optional)
135+
Typical workflow:
38136

39-
To write custom `Processors`, please see [here](https://github.com/DeepLabCut/DeepLabCut-live/tree/master/dlclive/processor). The directory that contains your custom `Processor` should be a python module -- this directory must contain an `__init__.py` file that imports your custom `Processor`. For examples of how to structure a custom `Processor` directory, please see [here](https://github.com/DeepLabCut/DeepLabCut-live/tree/master/example_processors).
137+
1. **Configure Cameras** (choose backend and devices)
138+
- Adjust camera settings (serial, exposure, ROI/cropping, etc.)
139+
2. **Start Preview**
140+
- Adjust visualization settings (keypoint color map, bounding boxes, etc.)
141+
3. **Start inference**
142+
- Choose a DeepLabCut Live model
143+
- Choose which camera to run inference on (currently one at a time)
144+
4. **Start recording**
145+
- Adjust recording settings (codec, output format, etc.)
146+
- Record video and timestamps to organized session folders
40147

41-
To use your processor in the GUI, you must first add your custom `Processor` directory to the dropdown menu: next to the `Processor Dir` label, click `Browse`, and select your custom `Processor` directory. Next, select the desired directory from the `Processor Dir` dropdown menu, then select the `Processor` you would like to use from the `Processor` menu. If you would like to edit the arguments for your processor, please select `Edit Proc Settings`, and finally, to use the processor, click `Set Proc`. If you have previously set a `Processor` and would like to clear it, click `Clear Proc`.
148+
> **Note:** OpenCV-compatible cameras (USB webcams, OBS virtual camera) work out of the box.
149+
> For additional camera ecosystems (Basler, GenTL, Aravis, etc.), see the camera backend docs.
42150
43-
#### Configure DeepLabCut Network
44151

45-
<img src= https://imagizer.imageshack.com/img923/9730/MNzr1J.png align="right">
152+
---
46153

47-
Select the `DeepLabCut` dropdown menu, and click `Add DLC`. This will bring up a new window to choose a name for the DeepLabCut configuration, choose the path to the exported DeepLabCut model, and set DeepLabCut-live settings, such as the cropping or resize parameters. Once configured, click `Update` to add this DeepLabCut configuration to the dropdown menu. You can edit the settings at any time by clicking `Edit DLC Settings`. Once configured, you can load the network and start performing inference by clicking `Start DLC`. If you would like to view the DeepLabCut pose estimation in real-time, select `Display DLC Keypoints`. You can edit the keypoint display settings (the color scheme, size of points, and the likelihood threshold for display) by selecting `Edit DLC Display Settings`.
154+
## Current limitations
48155

49-
If you want to stop performing inference at any time, just click `Stop DLC`, and if you want to remove a DeepLabCut configuration from the dropdown menu, click `Remove DLC`.
156+
- Pose inference runs on **one selected camera at a time** (even in multi-camera mode)
157+
- Camera features support and availability depends on backend capabilities and hardware
158+
- OpenCV controls for resolution/FPS are best-effort and device-driver dependent
159+
- DeepLabCut-Live models must be exported and compatible with the chosen backend
160+
- Performance depends on resolution, frame rate, GPU availability, and codec choice
50161

51-
#### Set Up Session
162+
---
52163

53-
Sessions are defined by the subject name, the date, and an attempt number. Within the GUI, select a `Subject` from the dropdown menu, or to add a new subject, type the new subject name in to the entry box and click `Add Subject`. Next, select an `Attempt` from the dropdown menu. Then, select the directory that you would like to save data to from the `Directory` dropdown menu. To add a new directory to the dropdown menu, click `Browse`. Finally, click `Set Up Session` to initiate a new recording. This will prepare the GUI to save data. Once you click `Set Up Session`, the `Ready` button should turn blue, indicating a session is ready to record.
164+
## References
54165

55-
#### Controlling Recording
166+
If you use this code we kindly ask you to please cite:
56167

57-
If the `Ready` button is selected, you can now start a recording by clicking `On`. The `On` button will then turn green indicating a recording is active. To stop a recording, click `Off`. This will cause the `Ready` button to be selected again, as the GUI is prepared to restart the recording and to save the data to the same file. If you're session is complete, click `Save Video` to save all files: the video recording (as .avi file), a numpy file with timestamps for each recorded frame, the DeepLabCut poses as a pandas data frame (hdf5 file) that includes the time of each frame used for pose estimation and the time that each pose was obtained, and if applicable, files saved by the `Processor` in use. These files will be saved into a new directory at `{YOUR_SAVE_DIRECTORY}/{CAMERA NAME}_{SUBJECT}_{DATE}_{ATTEMPT}`
168+
- **[Kane et al., eLife 2020](https://elifesciences.org/articles/61909)**
169+
- If preferred, see the **[Preprint](https://www.biorxiv.org/content/10.1101/2020.08.04.236422v2)**
58170

59-
- YOUR_SAVE_DIRECTORY : the directory chosen from the `Directory` dropdown menu.
60-
- CAMERA NAME : the name of selected camera (from the `Camera` dropdown menu).
61-
- SUBJECT : the subject chosen from the `Subject` drowdown menu.
62-
- DATE : the current date of the experiment.
63-
- ATTEMPT : the attempt number chosen from the `Attempt` dropdown.
171+
---
64172

65-
If you would not like to save the data from the session, please click `Delete Video`, and all data will be discarded. After you click `Save Video` or `Delete Video`, the `Off` button will be selected, indicating you can now set up a new session.
173+
## Contributing / Feedback
66174

67-
#### References:
175+
This project is under active development — feedback from real experimental use is highly valued.
68176

69-
If you use this code we kindly ask you to you please [cite Kane et al, eLife 2020](https://elifesciences.org/articles/61909). The preprint is available here: https://www.biorxiv.org/content/10.1101/2020.08.04.236422v2
177+
Please report issues, suggest features, or contribute on [GitHub](https://github.com/DeepLabCut/DeepLabCut-live-GUI).

0 commit comments

Comments
 (0)