Skip to content

Commit

Permalink
chore: provide shell to download models
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxsen committed Jul 4, 2024
1 parent fc0078d commit 947c8df
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
test_data*
__debug_bin*
.vscode
.vscode
models/
23 changes: 23 additions & 0 deletions download_models.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e

SAVEDIR="./models"

if [ "$#" != "0" ]; then
SAVEDIR="$1"
fi

echo "downloading model files to dir:$SAVEDIR..."

if [ -d "$SAVEDIR" ]; then
echo "DIR: $SAVEDIR exist, remove it first!"
exit 0
fi

mkdir "$SAVEDIR" -p
curl https://github.com/Kagami/go-face-testdata/raw/master/models/shape_predictor_5_face_landmarks.dat -L -o "$SAVEDIR/shape_predictor_5_face_landmarks.dat"
curl https://github.com/Kagami/go-face-testdata/raw/master/models/dlib_face_recognition_resnet_model_v1.dat -L -o "$SAVEDIR/dlib_face_recognition_resnet_model_v1.dat"
curl https://github.com/Kagami/go-face-testdata/raw/master/models/mmod_human_face_detector.dat -L -o "$SAVEDIR/mmod_human_face_detector.dat"

echo "model file download succ"

0 comments on commit 947c8df

Please sign in to comment.