-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.sh
executable file
·78 lines (70 loc) · 3.15 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
device=1
obj_list=("cookie" "carrot" "dowel")
# obj_list=("carrot" "dowel")
cls_ids=(0 1 2)
for cls_id in "${!cls_ids[@]}";do
LOG=${save_dir}"res.log"
echo ${LOG}
echo ${cls_id}
depth=(9)
n_ctx=(12)
t_n_ctx=(4)
for i in "${!depth[@]}";do
for j in "${!n_ctx[@]}";do
## train on the VisA dataset
base_dir=${depth[i]}_${n_ctx[j]}_${t_n_ctx[0]}_mv9_mvtec_3d
save_dir=./exps_${base_dir}_336_4/${obj_list[cls_id]}/
CUDA_VISIBLE_DEVICES=${device} python test.py --dataset mvtec_pc_3d_rgb \
--data_path /remote-home/iot_zhouqihang/data/mvtec_3d_mv/mvtec_3d_9_views --save_path ./results/mvtec_${base_dir}_pc_336_4_all/with_color_max_scor${obj_list[cls_id]}/zero_shot_1 \
--checkpoint_path /remote-home/iot_zhouqihang/root/zqh/AnomalyPointCLIP/AnomalyPoint/exps_object_no_surgery_text_token_test_token_length/9_12_4_multiscale_visa_no_adapter_rendering_class_re_mean_no_color_mv9_336_4/mvtecvit_large_14_518/cookie/epoch_15.pth \
--features_list 6 12 18 24 --image_size 336 --depth ${depth[i]} --n_ctx ${n_ctx[j]} --t_n_ctx ${t_n_ctx[0]} --train_class ${obj_list[cls_id]}
wait
done
done
done
obj_list=('PeppermintCandy' 'LicoriceSandwich' 'Confetto')
# obj_list=("carrot" "dowel")
cls_ids=(0 1 2)
for cls_id in "${!cls_ids[@]}";do
LOG=${save_dir}"res.log"
echo ${LOG}
echo ${cls_id}
depth=(9)
n_ctx=(12)
t_n_ctx=(4)
for i in "${!depth[@]}";do
for j in "${!n_ctx[@]}";do
## train on the VisA dataset
base_dir=${depth[i]}_${n_ctx[j]}_${t_n_ctx[0]}_mv9_eye_3d
save_dir=./exps_${base_dir}_336_4/${obj_list[cls_id]}/
CUDA_VISIBLE_DEVICES=${device} python test.py --dataset eye_pc_3d_rgb \
--data_path /remote-home/iot_zhouqihang/data/Eyecandies_processed --save_path ./results/mvtec_${base_dir}_pc_336_4_all/with_color_max_scor${obj_list[cls_id]}/zero_shot \
--checkpoint_path ${save_dir}epoch_15.pth \
--features_list 6 12 18 24 --image_size 336 --depth ${depth[i]} --n_ctx ${n_ctx[j]} --t_n_ctx ${t_n_ctx[0]} --train_class ${obj_list[cls_id]}
wait
done
done
done
obj_list=('shell' 'starfish' 'seahorse')
obj_list=('seahorse')
cls_ids=(0 1 2)
for cls_id in "${!cls_ids[@]}";do
LOG=${save_dir}"res.log"
echo ${LOG}
echo ${cls_id}
depth=(9)
n_ctx=(12)
t_n_ctx=(4)
for i in "${!depth[@]}";do
for j in "${!n_ctx[@]}";do
## train on the VisA dataset
base_dir=${depth[i]}_${n_ctx[j]}_${t_n_ctx[0]}_mv9_real_3d
save_dir=./exps_${base_dir}_336_4/${obj_list[cls_id]}/
CUDA_VISIBLE_DEVICES=${device} python test_only_point.py --dataset real_pc_3d_rgb \
--data_path /remote-home/iot_zhouqihang/data/Real3D-AD --save_path ./results/mvtec_${base_dir}_pc_336_4_all/with_color_max_scor${obj_list[cls_id]}/zero_shot \
--checkpoint_path ${save_dir}epoch_15.pth \
--features_list 6 12 18 24 --image_size 336 --depth ${depth[i]} --n_ctx ${n_ctx[j]} --t_n_ctx ${t_n_ctx[0]} --train_class ${obj_list[cls_id]}
wait
done
done
done