-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_style_transfer.sh
executable file
·39 lines (33 loc) · 1.01 KB
/
setup_style_transfer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
# Tell the user we're starting
echo "Setting up fast style transfer...";
# Ask if they want to download vgg16 weights
read -r -p "Download vgg16 weights? Needed if training. [y/N] " input;
downloadVGG16Weights=false;
case $input in
[yY][eE][sS]|[yY]) downloadVGG16Weights=true;;
esac
# Create a folder for holding dependencies
localFolder="./deps";
mkdir -p "$localFolder";
cd "$localFolder";
# Clone faststyle repository if needed
faststyleDir="./faststyle";
if [ -d "$faststyleDir" ]; then
echo "The repository already exists. Not cloning.";
else
echo "Cloning the faststyle repository...";
repository="[email protected]:ghwatson/faststyle.git";
git clone "$repository";
fi
# Check if the clone worked
if [ ! -d "$faststyleDir" ]; then
echo "Could not clone the repository. Exiting now.";
exit 1;
fi
# Check if need to download the training data
if [ "$downloadVGG16Weights" = true ]; then
echo "Downloading vgg16 weights...";
cd faststyle/libs;
./get_vgg16_weights.sh;
fi