From 57019e61506cf9c2f405b16e63b543f84107ff00 Mon Sep 17 00:00:00 2001 From: KWNahyun Date: Sat, 16 Mar 2024 22:00:32 +0900 Subject: [PATCH] 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. --- models/getModels.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/models/getModels.sh b/models/getModels.sh index 63aef4d55..6bbec5e33 100755 --- a/models/getModels.sh +++ b/models/getModels.sh @@ -1,3 +1,29 @@ +# ------------------------- Downlaod MODELS ------------------------- +# (ISSUE #1602) Maintainer has provided alternative model link with google drive. +# https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/1602#issuecomment-641653411 +MODEL_URL="https://drive.google.com/uc?id=1QCSxJZpnWvM00hx49CJ2zky7PWGzpcEh" +FILENAME='models.zip' + +# Supplementary package 'gdown' to download google drive +if ! [ -x "$(command -v gdown)" ]; then + echo "Please install gdown package with pip" + exit +fi + +cd .. +gdown ${MODEL_URL} -O ${FILENAME} +unzip ${FILENAME} +cd - + +RESULT=$? +if [ $RESULT -eq 0 ]; then + echo "Model download success" + exit +else + echo "Model download failure" + echo "Fallback to original approach" +fi + # ------------------------- BODY, FOOT, FACE, AND HAND MODELS ------------------------- # Downloading body pose (COCO and MPI), face and hand models OPENPOSE_URL="http://posefs1.perception.cs.cmu.edu/OpenPose/models/"