-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfeature_extraction.sh
41 lines (32 loc) · 1.18 KB
/
feature_extraction.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
40
41
#!/bin/bash
# iterate over datasets
for db in "live" "tid2013" "csiq"; do
if [[ "$db" == "live" ]]; then
path_csv="./data/liveiqa/liveiqa.csv"
fi
if [[ "$db" == "csiq" ]]; then
path_csv="./data/csiq/csiq.csv"
fi
if [[ "$db" == "tid2013" ]]; then
path_csv="./data/tid2013/tid2013.csv"
fi
if [[ "$model" == "cornia" ]]; then
path_zca="./codebooks/CSIQ_whitening_param.mat"
else
path_zca="None"
fi
# iterate over codebook models
for model in "cornia" "patches" "laplace" "normal" "uniform"; do
echo "Extracting features from $db with $model ."
python feature_extraction.py --path_csv "$path_csv" \
--path_codebook ./codebooks/codebook_"$model".npy \
--random_seed 123 \
--block_size 7 \
--max_blocks 10000 \
--name "$model" \
--path_zca "$path_zca" \
--use_pil_convert "False" \
--use_pytorch "True" \
--path_out "./features.pkl"
done
done