Skip to content

Commit 687cce5

Browse files
committed
Fix broken model fetch link
As stated at issue #1602 currently model link has been broken. This commit addresses the problem by suggesting alternative model link that maintainer provided. So, in here, we used the supplementary package 'gdown' to download google drive files.
1 parent ab97f5b commit 687cce5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

models/getModels.sh

+25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# ------------------------- Downlaod MODELS -------------------------
2+
# (ISSUE #1602) Maintainer has provided alternative model link with google drive.
3+
# https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/1602#issuecomment-641653411
4+
MODEL_URL="https://drive.google.com/uc?id=1QCSxJZpnWvM00hx49CJ2zky7PWGzpcEh"
5+
FILENAME='models.zip'
6+
7+
# Supplementary package 'gdown' to download google drive
8+
if ! [ -x "$(command -v gdown)" ]; then
9+
echo "Please install gdown package with pip"
10+
exit
11+
fi
12+
13+
gdown ${MODEL_URL} -O ${FILENAME}
14+
unzip ${FILENAME}
15+
16+
RESULT=$?
17+
if [ $RESULT -eq 0 ]; then
18+
echo "Model download success"
19+
mv models/* .
20+
exit
21+
else
22+
echo "Model download failure"
23+
echo "Fallback to original approach"
24+
fi
25+
126
# ------------------------- BODY, FOOT, FACE, AND HAND MODELS -------------------------
227
# Downloading body pose (COCO and MPI), face and hand models
328
OPENPOSE_URL="http://posefs1.perception.cs.cmu.edu/OpenPose/models/"

0 commit comments

Comments
 (0)