File size: 1,392 Bytes
f6eaab3 |
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
#!/bin/bash
function print_help() {
echo "Usage:
./install.sh [option]
This script installs all dependencies required for syntetic artifact generator.
-h --help Print this help."
}
function install_scdepthpl() {
pip3 install torch==1.13.1 networkx==3.0 torchvision==0.14.1 --index-url https://download.pytorch.org/whl/cu117
pip3 install torchmetrics==0.11.4
pip3 install git+https://gitlab.ridgerun.com/open/sc_depth_pl
mkdir -p sc_depth_pl/ckpts/ddad_scv3
cd sc_depth_pl/ckpts/ddad_scv3
gdown "https://drive.google.com/u/0/uc?id=1sATBbnZSDQbu_36F6js5y9ZWb1fo_uIh&confirm=t"
unzip ddad_scv3.zip
cd -
absolute_path=$(readlink -f "./")
models_dict='{"models_path": "'$absolute_path'"}' && models_path=~/.local/rrdehazing && \
mkdir -p $models_path && echo $models_dict > $models_path/models_path.json
}
set -e # exit if error
opts=$(getopt -o h --longoptions help,git-token: -- "$@")
parent_dir=$PWD
while [[ $opts ]]; do
case "$1" in
-h|--help)
print_help
exit 0
;;
--)
break
;;
*)
if [ ! -z "$1" ]; then
echo "Invalid option: $1" >&2
exit 1
fi
break
;;
esac
shift
done
echo "Installing model: sc depth pl"
install_scdepthpl
|