Skip to content

Commit aab5609

Browse files
authored
Update README.md
1 parent 786708e commit aab5609

File tree

1 file changed

+22
-53
lines changed

1 file changed

+22
-53
lines changed

README.md

+22-53
Original file line numberDiff line numberDiff line change
@@ -21,75 +21,44 @@ dlclivegui
2121

2222
## Getting Started
2323

24+
<img src= https://imagizer.imageshack.com/img923/2419/QQKyMH.png align="right">
25+
2426
#### Configurations
2527

2628
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.
2729

28-
#### Set up cameras
29-
30+
#### Set Up Cameras <img src= https://imagizer.imageshack.com/img924/626/acJhWD.png align="right">
31+
3032
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`.
3133

32-
#### Processor
3334

34-
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).
3535

36-
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`.
36+
#### Processor (optional)
3737

38+
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).
3839

40+
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`.
3941

40-
## Configure GUI
42+
#### Configure DeepLabCut Network
4143

42-
- **Config**: scroll down menu: Create new config
43-
- **Camera**: scroll down menu: Add new camera or video from browser
44-
- **Edit Camera Settings**:
45-
- Select the camera by picking its **serial number**.
46-
- Rotate/Crop the desired portion of the image
47-
- **display_resize**: to use less resources while displaying
48-
- **Init Camera**
44+
<img src= https://imagizer.imageshack.com/img923/9730/MNzr1J.png align="right">
4945

50-
<p align="center">
51-
<img src= https://imagizer.imageshack.com/img923/2419/QQKyMH.png>
52-
<img src= https://imagizer.imageshack.com/img924/626/acJhWD.png>
53-
</p>
46+
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`.
5447

55-
- **Processor settings**:
56-
- Chose your processor directory using **Processor Dir**
57-
- Pick the processor class your wrote (see [appendix 1](#Appendices))
58-
- **Edit** or **Set Proc**
48+
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`.
5949

60-
- **DeepLabCut**:
61-
- From scroll down menu: **Add DLC** or chose your model, these settings can be modified using **Edit DLC Settings**
62-
- Specify Name, browse to extracted DLC model folder
63-
- Specify resizing similar to display_resize to make the inference quicker.
64-
- **Init DLC**
65-
- **Display DLC Keypoints**, keypoints can be edited but need to be 'undisplayed' first to have an effect.
50+
#### Set Up Session
6651

67-
<p align="center">
68-
<img src= https://imagizer.imageshack.com/img923/9730/MNzr1J.png>
69-
</p>
52+
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.
7053

71-
## Record Session
54+
#### Controlling Recording
7255

73-
- **Record**:
74-
- **Set Up Session -> Ready -> On -> Off -> Save Video**
56+
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}`
57+
- YOUR_SAVE_DIRECTORY : the directory chosen from the `Directory` dropdown menu.
58+
- CAMERA NAME : the name of selected camera (from the `Camera` dropdown menu).
59+
- SUBJECT : the subject chosen from the `Subject` drowdown menu.
60+
- DATE : the current date of the experiment.
61+
- ATTEMPT : the attempt number chosen from the `Attempt` dropdown.
62+
63+
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.
7564

76-
# Appendices
77-
1. **Processor**:
78-
Use the processor folder as a template to create your own processor
79-
The default processor should contain:
80-
- init
81-
- process: takes in a pose, performs operations, and returns a pose
82-
- save: saves any internal data generated by the processor (such as timestamps for commands to external hardware)
83-
84-
```python
85-
class Processor(object):
86-
87-
def __init__(self, **kwargs):
88-
pass
89-
90-
def process(self, pose, **kwargs):
91-
return pose
92-
93-
def save(self, file=''):
94-
return 0
95-
```

0 commit comments

Comments
 (0)