Skip to content

Commit 1530e27

Browse files
authored
Merge pull request #17 from DeepLabCut/check_install
fix check_install
2 parents c7ede4c + 053b5f6 commit 1530e27

File tree

8 files changed

+20
-17
lines changed

8 files changed

+20
-17
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include dlclive/check_install/*

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Please see our instruction manual to install on a [Windows or Linux machine](doc
3434

3535
- available on pypi as: `pip install deeplabcut-live`
3636

37-
Note, you can test your installation by running:
37+
Note, you can then test your installation by running:
3838

39-
`python /check_install/check_install.py`
39+
`dlc-live-test`
4040

4141
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.
4242

@@ -112,7 +112,7 @@ dlclive.benchmark_videos('/path/to/exported/model', '/path/to/video', resize=[1.
112112
dlc-live-benchmark /path/to/exported/model /path/to/video -r 0.5 --pcutoff 0.5 --display-radius 4 --cmap bmy --save-poses --save-video
113113
```
114114

115-
### Citation:
115+
### Reference:
116116

117117
If you utilize our tool, please cite our [paper](https://www.biorxiv.org/content/10.1101/2020.08.04.236422v1):
118118

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import os
1010
import shutil
1111
from dlclive import benchmark_videos
12+
import urllib.request
1213

1314

1415
def main():
@@ -20,21 +21,20 @@ def main():
2021
os.makedirs(tmp_dir, exist_ok=True)
2122
os.chdir(tmp_dir)
2223

24+
# download dog test video from github:
25+
url_link = 'https://github.com/DeepLabCut/DeepLabCut-live/blob/master/check_install/dog_clip.avi?raw=True'
26+
urllib.request.urlretrieve(url_link,"dog_clip.avi")
27+
video_file=os.path.join(url_link,"dog_clip.avi")
28+
2329
# download exported dog model from DeepLabCut Model Zoo
2430
print("Downloading full_dog model from the DeepLabCut Model Zoo...")
2531
model_url = "http://deeplabcut.rowland.harvard.edu/models/DLC_Dog_resnet_50_iteration-0_shuffle-0.tar.gz"
2632
os.system(f"curl {model_url} | tar xvz")
2733

28-
# download dog video clip from github
29-
print("\nDownloading dog video clip...\n")
30-
# video_url = "https://github.com/DeepLabCut/DeepLabCut-live/raw/master/check_install/dog_clip.avi"
31-
video_url = '"https://docs.google.com/uc?export=download&id=1W_5AOl1SewXR2q5QC1K5Chm71I9LAmld"'
32-
os.system(f"curl -L {video_url} -o dog_clip.avi")
33-
3434
# run benchmark videos
3535
print("\n Running inference...\n")
3636
model_dir = "DLC_Dog_resnet_50_iteration-0_shuffle-0"
37-
video_file = "dog_clip.avi"
37+
print(video_file)
3838
benchmark_videos(model_dir, video_file, display=True, resize=0.5, pcutoff=0.25)
3939

4040
# deleting temporary files

dlclive/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"""
88

99

10-
__version__ = "0.0.1"
10+
__version__ = "0.0.2"
1111
VERSION = __version__

docs/install_desktop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pip install deeplabcut-live
2020
dlc-live-test
2121
```
2222

23-
Note, you can test your installation by running:
23+
Note, you can also just run the test:
2424

25-
`python /check_install/check_install.py`
25+
`dlc-live-test`
2626

2727
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.

docs/install_jetson.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ sudo apt-get install libhdf5-serial-dev \
2626
gfortran \
2727
python3-pip \
2828
python3-venv \
29-
python3-tk
29+
python3-tk \
30+
curl
3031
```
3132

3233
#### Create a virtual environment

reinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pip uninstall deeplabcut-live
22
python3 setup.py sdist bdist_wheel
3-
pip install dist/deeplabcut_live-0.0.1-py3-none-any.whl
3+
pip install dist/deeplabcut_live-0.0.2-py3-none-any.whl

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
setuptools.setup(
3939
name="deeplabcut-live",
40-
version="0.0.1",
40+
version="0.0.2",
4141
author="A. & M. Mathis Labs",
4242
author_email="[email protected]",
4343
description="Class to load exported DeepLabCut networks and perform pose estimation on single frames (from a camera feed)",
@@ -47,6 +47,7 @@
4747
python_requires=">=3.5, <3.8",
4848
install_requires=install_requires,
4949
packages=setuptools.find_packages(),
50+
package_data={'dlclive': ['check_install/*']},
5051
include_package_data=True,
5152
classifiers=(
5253
"Programming Language :: Python :: 3",
@@ -55,7 +56,7 @@
5556
),
5657
entry_points={
5758
"console_scripts": [
58-
"dlc-live-test=check_install.check_install:main",
59+
"dlc-live-test=dlclive.check_install.check_install:main",
5960
"dlc-live-bench=dlclive.bench:main",
6061
"dlc-live-benchmark=dlclive.benchmark:main",
6162
]

0 commit comments

Comments
 (0)