forked from sthanhng/yoloface
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update script to get pre-trained models
- Loading branch information
Showing
2 changed files
with
24 additions
and
13 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
wget https://pjreddie.com/media/files/yolov3.weights | ||
wget https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg?raw=true -O ./yolov3.cfg | ||
wget https://github.com/pjreddie/darknet/blob/master/data/coco.names?raw=true -O ./coco.names | ||
|
||
# for face detection using the YOLOv3 algorithm, you navigate to the below link: | ||
# https://drive.google.com/file/d/1xYasjU52whXMLT5MtF7RCPQkV66993oR/view?usp=sharing | ||
# to download the weights of the trained model | ||
# put then it into the model-weights/ folder | ||
W_FILENAME=yolov3-wider_16000.weights.zip | ||
H5_FILENAME=YOLO_Face.h5.zip | ||
|
||
if [ ! -d "./model-weights" ]; then | ||
mkdir -p ./model-weights; | ||
fi | ||
|
||
cd model-weights | ||
|
||
# Download yoloface models | ||
echo "*** Downloading the trained models..." | ||
|
||
wget --load-cookies /tmp/cookies.txt -r "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=13gFDLFhhBqwMw6gf8jVUvNDH2UrgCCrX' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=13gFDLFhhBqwMw6gf8jVUvNDH2UrgCCrX" -O $W_FILENAME && rm -rf /tmp/cookies.txt | ||
|
||
wget --load-cookies /tmp/cookies.txt -r "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1a_pbXPYNj7_Gi6OxUqNo_T23Dt_9CzOV' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1a_pbXPYNj7_Gi6OxUqNo_T23Dt_9CzOV" -O $H5_FILENAME && rm -rf /tmp/cookies.txt | ||
|
||
# Unzip | ||
unzip -q $W_FILENAME | ||
unzip -q $H5_FILENAME | ||
|
||
# Delete .zip files | ||
rm -rf $W_FILENAME $H5_FILENAME | ||
|
||
echo "*** All done!!!" |