|
#!/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 |
|
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 |
|
|