Skip to content

Commit c6a1f69

Browse files
committed
improved readme
1 parent 40005ae commit c6a1f69

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

README.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,41 @@ dlc_live.get_pose(<your image>)
112112

113113
`DLCLive` **parameters:**
114114

115-
- `path` = string; full path to the exported DLC model directory
116-
- `model_type` = string; the type of model to use for inference. Types include:
117-
- `base` = the base DeepLabCut model
118-
- `tensorrt` = apply [tensor-rt](https://developer.nvidia.com/tensorrt) optimizations to model
119-
- `tflite` = use [tensorflow lite](https://www.tensorflow.org/lite) inference (in progress...)
120-
- `cropping` = list of int, optional; cropping parameters in pixel number: [x1, x2, y1, y2]
121-
- `dynamic` = tuple, optional; defines parameters for dynamic cropping of images
122-
- `index 0` = use dynamic cropping, bool
123-
- `index 1` = detection threshold, float
124-
- `index 2` = margin (in pixels) around identified points, int
125-
- `resize` = float, optional; factor by which to resize image (resize=0.5 downsizes both width and height of image by half). Can be used to downsize large images for faster inference
126-
- `processor` = dlc pose processor object, optional
127-
- `display` = bool, optional; display processed image with DeepLabCut points? Can be used to troubleshoot cropping and resizing parameters, but is very slow
115+
- `path` = string; full path to the exported DLC model directory
116+
- `model_type` = string; the type of model to use for inference. Types include:
117+
- `pytorch` = the base PyTorch DeepLabCut model
118+
- `base` = the base TensorFlow DeepLabCut model
119+
- `tensorrt` = apply [tensor-rt](https://developer.nvidia.com/tensorrt) optimizations to model
120+
- `tflite` = use [tensorflow lite](https://www.tensorflow.org/lite) inference (in progress...)
121+
- `cropping` = list of int, optional; cropping parameters in pixel number: [x1, x2, y1, y2]
122+
- `dynamic` = tuple, optional; defines parameters for dynamic cropping of images
123+
- `index 0` = use dynamic cropping, bool
124+
- `index 1` = detection threshold, float
125+
- `index 2` = margin (in pixels) around identified points, int
126+
- `resize` = float, optional; factor by which to resize image (resize=0.5 downsizes
127+
both width and height of image by half). Can be used to downsize large images for
128+
faster inference
129+
- `processor` = dlc pose processor object, optional
130+
- `display` = bool, optional; display processed image with DeepLabCut points? Can be
131+
used to troubleshoot cropping and resizing parameters, but is very slow
128132

129133
`DLCLive` **inputs:**
130134

131-
- `<path to exported model directory>` = path to the folder that has the `.pb` files that you acquire after running `deeplabcut.export_model`
132-
- `<your image>` = is a numpy array of each frame
135+
- `<path to exported model>` =
136+
- For TensorFlow models: path to the folder that has the `.pb` files that you
137+
acquire after running `deeplabcut.export_model`
138+
- For PyTorch models: path to the `.pt` file that is generated after running
139+
`deeplabcut.export_model`
140+
- `<your image>` = is a numpy array of each frame
141+
142+
#### DLCLive - PyTorch Specific Guide
143+
144+
This guide is for users who trained a model with the PyTorch engine with
145+
`DeepLabCut 3.0`.
146+
147+
Once you've trained your model in [DeepLabCut](https://github.com/DeepLabCut/DeepLabCut)
148+
and you are happy with its performance, you can export the model to be used for live
149+
inference with DLCLive!
133150

134151
### Switching from TensorFlow to PyTorch
135152

0 commit comments

Comments
 (0)