Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch_faster_rcnn_models.sh now with continue download (wget -c check… #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 15 additions & 20 deletions data/scripts/fetch_faster_rcnn_models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,23 @@ FILE=faster_rcnn_models.tgz
URL=http://www.cs.berkeley.edu/~rbg/faster-rcnn-data/$FILE
CHECKSUM=ac116844f66aefe29587214272054668

if [ -f $FILE ]; then
echo "File already exists. Checking md5..."
os=`uname -s`
if [ "$os" = "Linux" ]; then
checksum=`md5sum $FILE | awk '{ print $1 }'`
elif [ "$os" = "Darwin" ]; then
checksum=`cat $FILE | md5`
fi
if [ "$checksum" = "$CHECKSUM" ]; then
echo "Checksum is correct. No need to download."
exit 0
else
echo "Checksum is incorrect. Need to download again."
fi
fi

echo "Downloading Faster R-CNN demo models (695M)..."

wget $URL -O $FILE
wget -c $URL && echo "Unzipping..." && tar zxvf $FILE

echo "Unzipping..."
echo "Done."

os=`uname -s`
if [ "$os" = "Linux" ]; then
checksum=`md5sum $FILE | awk '{ print $1 }'`
elif [ "$os" = "Darwin" ]; then
checksum=`cat $FILE | md5`
fi

tar zxvf $FILE
if [ "$checksum" = "$CHECKSUM" ]; then
echo "Checksum is correct. No need to download again."
exit 0
else
echo "Checksum is incorrect. Need to download again."
fi

echo "Done. Please run this command again to verify that checksum = $CHECKSUM."