File size: 823 Bytes
47c46ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
set -x

# Example command
# ```
# ./scripts/run.sh b  "dataset/Abraham Lincoln_01.png" 0.75
# ```

spectral_sensitivity="$1"
path="$2"
blur_radius="$3"


list="$(dirname "${path}")"
list="$(basename "${list}")"

if [ "${spectral_sensitivity}" == "b" ]; then
  FLAGS=(--spectral_sensitivity b --encoder_ckpt checkpoint/encoder/checkpoint_b.pt);
elif [ "${spectral_sensitivity}" == "gb" ]; then
  FLAGS=(--spectral_sensitivity "gb" --encoder_ckpt checkpoint/encoder/checkpoint_gb.pt);
else
  FLAGS=(--spectral_sensitivity "g" --encoder_ckpt checkpoint/encoder/checkpoint_g.pt);
fi

name="${path%.*}"
name="${name##*/}"
echo "${name}"

# TODO: I did l2 or cos for contextual
time python projector.py \
    "${path}"  \
    --gaussian "${blur_radius}" \
    --log_dir "log/"  \
    --results_dir "results/" \
    "${FLAGS[@]}"