Skip to content

Commit 841402d

Browse files
committed
black
1 parent c1fdbad commit 841402d

File tree

16 files changed

+293
-194
lines changed

16 files changed

+293
-194
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# DeepLabCut-live SDK<img src="https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/1572296495650-Y4ZTJ2XP2Z9XF1AD74VW/ke17ZwdGBToddI8pDm48kMulEJPOrz9Y8HeI7oJuXxR7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z5QPOohDIaIeljMHgDF5CVlOqpeNLcJ80NK65_fV7S1UZiU3J6AN9rgO1lHw9nGbkYQrCLTag1XBHRgOrY8YAdXW07ycm2Trb21kYhaLJjddA/DLC_logo_blk-01.png?format=1000w" width="350" title="DLC-live" alt="DLC LIVE!" align="right" vspace = "50">
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>
34
![PyPI - Python Version](https://img.shields.io/pypi/v/deeplabcut-live)
4-
[![License](https://img.shields.io/pypi/l/deeplabcutcore.svg)](https://github.com/DeepLabCut/deeplabcutlive/raw/master/LICENSE)
55
![PyPI - Downloads](https://img.shields.io/pypi/dm/deeplabcut-live?color=purple)
66
![Python package](https://github.com/DeepLabCut/DeepLabCut-live/workflows/Python%20package/badge.svg)
7+
[![GitHub stars](https://img.shields.io/github/stars/DeepLabCut/DeepLabCut-live.svg?style=social&label=Star)](https://github.com/DeepLabCut/DeepLabCut-live)
8+
[![GitHub forks](https://img.shields.io/github/forks/DeepLabCut/DeepLabCut-live.svg?style=social&label=Fork)](https://github.com/DeepLabCut/DeepLabCut-live)
9+
10+
[![License](https://img.shields.io/pypi/l/deeplabcutcore.svg)](https://github.com/DeepLabCut/deeplabcutlive/raw/master/LICENSE)
11+
[![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)
12+
[![Gitter](https://badges.gitter.im/DeepLabCut/community.svg)](https://gitter.im/DeepLabCut/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
13+
[![Twitter Follow](https://img.shields.io/twitter/follow/DeepLabCut.svg?label=DeepLabCut&style=social)](https://twitter.com/DeepLabCut)
714

815
This package contains a [DeepLabCut](http://www.mousemotorlab.org/deeplabcut) inference pipeline for real-time applications that has minimal (software) dependencies. Thus, it is as easy to install as possible (in particular, on atypical systems like [NVIDIA Jetson boards](https://developer.nvidia.com/buy-jetson)).
916

@@ -31,7 +38,7 @@ Note, you can test your installation by running:
3138

3239
`python /check_install/check_install.py`
3340

34-
This will download
41+
If installed properly, this script will i) create a temporary folder ii) download the full_dog model from the [DeepLabCut Model Zoo](http://www.mousemotorlab.org/dlc-modelzoo), iii) download a short video clip of a dog, and iv) run inference while displaying keypoints. v) remove the temporary folder.
3542

3643
### Quick Start: instructions for use:
3744

benchmarking/run.py

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,35 @@
1313
from dlclive import benchmark_model_by_size
1414

1515
# Update the datafolder to where the data is:
16-
datafolder='/your/path/to/data/here'
16+
datafolder = "/your/path/to/data/here"
1717

18-
n_frames = 1000 #change to 10000 for testing on a GPU!
18+
n_frames = 1000 # change to 10000 for testing on a GPU!
1919
pixels = [2500, 10000, 40000, 160000, 320000, 640000]
2020

21-
dog_models = glob.glob(datafolder + '/dog/*[!avi]')
22-
dog_video = glob.glob(datafolder + '/dog/*.avi')[0]
23-
mouse_models = glob.glob(datafolder + '/mouse_lick/*[!avi]')
24-
mouse_video = glob.glob(datafolder + '/mouse_lick/*.avi')[0]
21+
dog_models = glob.glob(datafolder + "/dog/*[!avi]")
22+
dog_video = glob.glob(datafolder + "/dog/*.avi")[0]
23+
mouse_models = glob.glob(datafolder + "/mouse_lick/*[!avi]")
24+
mouse_video = glob.glob(datafolder + "/mouse_lick/*.avi")[0]
2525

2626
this_dir = os.path.dirname(os.path.realpath(__file__))
27-
#storing results in /benchmarking/results: (for your PR)
28-
out_dir = os.path.normpath(this_dir + '/results')
27+
# storing results in /benchmarking/results: (for your PR)
28+
out_dir = os.path.normpath(this_dir + "/results")
2929

3030
for ind_m, m in enumerate(dog_models):
3131
print("\n\nMODEL {:d} / 8".format(ind_m))
32-
benchmark_model_by_size(m, dog_video, ind_m, out_dir=out_dir, n_frames=n_frames, pixels=pixels)
32+
benchmark_model_by_size(
33+
m, dog_video, ind_m, out_dir=out_dir, n_frames=n_frames, pixels=pixels
34+
)
3335

34-
offset=ind_m+1
36+
offset = ind_m + 1
3537

3638
for ind_m, m in enumerate(mouse_models):
3739
print("\n\nMODEL {:d} / 8".format(ind_m))
38-
benchmark_model_by_size(m, mouse_video, ind_m + offset, out_dir=out_dir, n_frames=n_frames, pixels=pixels)
40+
benchmark_model_by_size(
41+
m,
42+
mouse_video,
43+
ind_m + offset,
44+
out_dir=out_dir,
45+
n_frames=n_frames,
46+
pixels=pixels,
47+
)

check_install/check_install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def main():
2727

2828
# download dog video clip from github
2929
print("\nDownloading dog video clip...\n")
30-
#video_url = "https://github.com/DeepLabCut/DeepLabCut-live/raw/master/check_install/dog_clip.avi"
30+
# video_url = "https://github.com/DeepLabCut/DeepLabCut-live/raw/master/check_install/dog_clip.avi"
3131
video_url = '"https://docs.google.com/uc?export=download&id=1W_5AOl1SewXR2q5QC1K5Chm71I9LAmld"'
3232
os.system(f"curl -L {video_url} -o dog_clip.avi")
3333

@@ -45,4 +45,4 @@ def main():
4545

4646

4747
if __name__ == "__main__":
48-
main()
48+
main()

0 commit comments

Comments
 (0)