Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9b62a9e
dlclive: add tf_config as parameter
gkane26 Jun 9, 2020
bd2d3cd
graph: add tfconfig, new full load graph function
gkane26 Jun 9, 2020
eab4370
bench + display: add display to benchmarking, fix bugs in display
gkane26 Jun 9, 2020
c8ca18d
fix bugs in display
gkane26 Jun 9, 2020
d33b5f2
add kwargs to processors
gkane26 Jun 15, 2020
a818b6d
clean up load graph, color conversions
gkane26 Jun 15, 2020
65c0cfe
dlclive: add kwargs to get_pose and init_inference
gkane26 Jun 19, 2020
f8d35a5
add kalman filter processor
gkane26 Jun 30, 2020
3647550
kalmanfilter processor: update delta time
gkane26 Jul 9, 2020
cca80d8
dlclive: destroy display on close
gkane26 Jul 9, 2020
5f4ef09
new analyze tools: speed bench, display, analyze pose and labeled video
gkane26 Jul 9, 2020
3407376
dlclive and graph: clean up/benign bug fix
gkane26 Jul 9, 2020
95cedd9
fix colormaps for display
gkane26 Jul 9, 2020
01a7bbe
update readme: add benchmark info
gkane26 Jul 9, 2020
9b0ef34
setup: add pandas and tables, needed for analyze_videos
gkane26 Jul 9, 2020
4436266
Update kalmanfilter.py
MMathisLab Jul 9, 2020
8ea6b97
change display_lik to pcutoff
gkane26 Jul 9, 2020
6a6a0d5
resolve setup and readme conflicts
gkane26 Jul 9, 2020
bbabf80
Merge branch 'master' into gk-dev
gkane26 Jul 9, 2020
de06ad2
Update README.md
MMathisLab Jul 9, 2020
2aa7dc8
fixed resize in python, check cmd
MMathisLab Jul 9, 2020
2fff10f
Update README.md
MMathisLab Jul 9, 2020
faade24
analyze: allow pixels/resize to be scalar or list
gkane26 Jul 10, 2020
54fed1d
fix TF warnings
MMathisLab Jul 10, 2020
a739cf6
changed name to benchmark_videos
MMathisLab Jul 10, 2020
a7c50e7
Update README.md
MMathisLab Jul 10, 2020
84aa1a6
dlclive: tfgpu flip x and y
gkane26 Jul 10, 2020
dd25669
Merge branch 'gk-dev' of https://github.com/AlexEMG/DeepLabCut-live i…
gkane26 Jul 10, 2020
768b8fe
name update
MMathisLab Jul 10, 2020
ab35d11
complete convert analyze to benchmarking
gkane26 Jul 13, 2020
4cb299c
merge master into gk-dev; keep most of master bench.py
gkane26 Jul 13, 2020
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
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,34 @@ dlc_live.get_pose(<your image>)
- `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
- `processor` = dlc pose processor object, optional
- `display` = bool, optional; display processed image with DeepLabCut points? Can be used to troubleshoot cropping and resizing parameters, but is very slow


### Benchmarking/Analyzing Exported DeepLabCut Models

DeepLabCut-live offers some analysis tools that allow users to peform the following operations on videos, from python or from the command line:
1. Test inference speed across a range of image sizes, downsizing images by specifying the `resize` or `pixels` parameter. Using the `pixels` parameter will resize images to the desired number of `pixels`, without changing the aspect ratio. Results will be saved (along with system info) to a pickle file if you specify an output directory.
```
# python
dlclive.analyze_videos('/path/to/exported/model', ['/path/to/video1', '/path/to/video2'], output='/path/to/output', resize=[1.0, 0.75, '0.5'])

# command line
dlc-live-analyze /path/to/exported/model /path/to/video1 /path/to/video2 -o /path/to/output -r 1.0 0.75 0.5
```

2. Display keypoints to visually inspect the accuracy of exported models on different image sizes:
```
# python
dlclive.analyze_videos('/path/to/exported/model', '/path/to/video', resize=0.5, display=True, display_lik=0.5, display_radius=4, cmap='bmy')

# command line
dlc-live-analyze /path/to/exported/model /path/to/video -r 0.5 --display --display-lik 0.5 --display-radius 4 --cmap bmy
```

3. Analyze and create a labeled video using the exported model and desired resize parameters. This option functions similar to `deeplabcut.analyze_videos` and `deeplabcut.create_labeled_video`.
```
# python
dlclive.analyze_videos('/path/to/exported/model', '/path/to/video', resize=[1.0, 0.75, '0.5'], display_lik=0.5, display_radius=4, cmap='bmy', save_poses=True, save_video=True)

# command line
dlc-live-analyze /path/to/exported/model /path/to/video -r 0.5 --display-lik 0.5 --display-radius 4 --cmap bmy --save_poses --save_video
```
1 change: 1 addition & 0 deletions dlclive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
from dlclive.dlclive import DLCLive
from dlclive.processor import Processor
from dlclive.bench import benchmark_model_by_size
from dlclive.analyze import analyze, analyze_videos
Loading