-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimage_eval.sh
More file actions
33 lines (27 loc) · 1.07 KB
/
image_eval.sh
File metadata and controls
33 lines (27 loc) · 1.07 KB
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
#!/bin/bash
tokenizer_name="resize"
recon_result="image_reconstruction_results"
resolution=256
dataset_names=("ic13" "ic15" "tt" "textocr" "cord" "sroie" "infograph" "docvqa")
for dataset_name in "${dataset_names[@]}"
do
CUDA_VISIBLE_DEVICES=6 python eval_text.py \
--img_folder "${recon_result}/${tokenizer_name}/text_data/${dataset_name}_${resolution}/" \
--gt_path "TokBench/annotations/text_${dataset_name}.json" \
--dataset "${dataset_name}" \
--data_type "image" \
--batch_size 64 \
--method_name $tokenizer_name \
--setting $resolution \
--save_dir image_outputs &\
done
# wait
CUDA_VISIBLE_DEVICES=7 python eval_face.py \
--original_image_path TokBench/images/face_data/wflw \
--reconstruction_image_path "${recon_result}/${tokenizer_name}/face_data/wflw_${resolution}/" \
--tokenizer $tokenizer_name \
--data_type "image" \
--meta_path TokBench/annotations/face_meta.json \
--setting $resolution \
--save_dir image_outputs
python compute_all_metrics.py --setting $resolution --data_type image --output_path image_outputs