-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.sh
32 lines (24 loc) · 1.52 KB
/
test.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
conda activate fsdet
dataset=coco
detection_folder=${dataset^^}-detection
arch=50 # 50
network=mask_rcnn
num_gpus=1
suffix='_sigmoid_classifier_box_iou_uncertainty' # '_sigmoid_classifier_box_iou_uncertainty' or '_sigmoid_classifier' or ''
suffix2='_bayesian' # '_bayesian' or ''
# #### evaluate the base classes
python3 -m tools.test_net --num-gpus $num_gpus \
--config-file configs/${detection_folder}/${network}/${network}_R_${arch}_FPN_base${suffix}.yaml \
--eval-only \
--opts MODEL.WEIGHTS checkpoints/${dataset}/${network}/${network}_R_${arch}_FPN_base${suffix}/model_final.pth #VISUALIZATION.SHOW True VISUALIZATION.FOLDER vis
#### evaluate the novel classes (finetuning)
shot=1
python3 -m tools.test_net --num-gpus $num_gpus \
--config-file configs/COCO-detection/${network}/${network}_R_${arch}_FPN_ft_novel_${shot}shot${suffix}${suffix2}.yaml \
--eval-only \
--opts MODEL.WEIGHTS checkpoints/coco/${network}/${network}_R_${arch}_FPN_ft_novel_${shot}shot${suffix}${suffix2}/model_final_official.pth VISUALIZATION.SHOW True VISUALIZATION.FOLDER vis_uncertainty2 VISUALIZATION.CONF_THRESH 0.15
#### evluate on both novel and base classes
python3 -m tools.test_net --num-gpus $num_gpus \
--config-file configs/${detection_folder}/${network}/${network}_R_${arch}_FPN_test_all_${shot}shot${suffix}${suffix2}.yaml \
--eval-only \
--opts MODEL.WEIGHTS checkpoints/${dataset}/${network}/${network}_R_${arch}_FPN_all_final_${shot}shot${suffix}${suffix2}/model_reset_combine.pth