-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_all.sh
53 lines (47 loc) · 2.83 KB
/
test_all.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
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
# USER PARAMETERS (put your device configuration params here)
DEVICE=0
SGD_DIR=../data/spliced_images/sgd # path to SGD dataset (YOUR PATH MAY BE DIFFERENT IF YOU SAVED THE SPLITS IN ANOTHER FOLDER, CHECK IT)
HEGD_DIR=../data/spliced_images/hegd # path to HEGD dataset (YOUR PATH MAY BE DIFFERENT IF YOU SAVED THE SPLITS IN ANOTHER FOLDER, CHECK IT)
RESULTS_DIR=../results/spliced_images # path to save the results (YOUR PATH MAY BE DIFFERENT IF YOU SAVED THE SPLITS IN ANOTHER FOLDER, CHECK IT)
PREPROCESSING_DIR=../data/pristine_images/patches # path to the folder with the original patches (needed for retrieving the MinPMax scaler. YOUR PATH MAY BE DIFFERENT IF YOU SAVED THE SPLITS IN ANOTHER FOLDER, CHECK IT)
echo ""
echo "-------------------------------------------------"
echo "| Test with MinPMax 99th percentile threshold |"
echo "-------------------------------------------------"
echo "| SGD dataset |"
python ../test_with_AUCs.py --gpu $DEVICE --fe_path ..models/MinPMax_99/model_weights.h5 \
--root_dir $SGD_DIR --results_dir $RESULTS_DIR --preprocessing_dir $PREPROCESSING_DIR
echo "| HEGD dataset |"
python ../test_with_AUCs.py --gpu $DEVICE --fe_path ..models/MinPMax_99/model_weights.h5 \
--root_dir $HEGD_DIR --results_dir $RESULTS_DIR --preprocessing_dir $PREPROCESSING_DIR
echo ""
echo "-------------------------------------------------"
echo "| Test with MinPMax 95th percentile threshold |"
echo "-------------------------------------------------"
echo "| SGD dataset |"
python ../test_with_AUCs.py --gpu $DEVICE --fe_path ..models/MinPMax_95/model_weights.h5 \
--root_dir $SGD_DIR --results_dir $RESULTS_DIR --preprocessing_dir $PREPROCESSING_DIR
echo "| HEGD dataset |"
python ../test_with_AUCs.py --gpu $DEVICE --fe_path ..models/MinPMax_95/model_weights.h5 \
--root_dir $HEGD_DIR --results_dir $RESULTS_DIR --preprocessing_dir $PREPROCESSING_DIR
echo ""
echo "-------------------------------------------------"
echo "| Test with MaxAbs scaling |"
echo "-------------------------------------------------"
echo "| SGD dataset |"
python ../test_with_AUCs.py --gpu $DEVICE --fe_path ..models/MaxScaling/model_weights.h5 \
--root_dir $SGD_DIR --results_dir $RESULTS_DIR
echo "| HEGD dataset |"
python ../test_with_AUCs.py --gpu $DEVICE --fe_path ..models/MaxScaling/model_weights.h5 \
--root_dir $HEGD_DIR --results_dir $RESULTS_DIR
echo ""
echo "-------------------------------------------------"
echo "| Test with HistogramEqualization scaling |"
echo "-------------------------------------------------"
echo "| SGD dataset |"
python ../test_with_AUCs.py --gpu $DEVICE --fe_path ..models/HistogramEqualization/model_weights.h5 \
--root_dir $SGD_DIR --results_dir $RESULTS_DIR
echo "| HEGD dataset |"
python ../test_with_AUCs.py --gpu $DEVICE --fe_path ..models/HistogramEqualization/model_weights.h5 \
--root_dir $HEGD_DIR --results_dir $RESULTS_DIR