forked from OneIG-Bench/OneIG-Benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_alignment.sh
More file actions
39 lines (27 loc) · 737 Bytes
/
run_alignment.sh
File metadata and controls
39 lines (27 loc) · 737 Bytes
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
#!/bin/bash
# start_time
start_time=$(date +%s)
# mode (EN/ZH)
MODE=EN
# image_root_dir
IMAGE_DIR=""
# model list
MODEL_NAMES=("gpt-4o" "imagen4")
# model_names=("gpt-4o" "imagen4")
# image grid
IMAGE_GRID=(2 2)
pip install transformers==4.50.0
# Alignment Score
echo "It's alignment time."
python -m scripts.alignment.alignment_score \
--mode "$MODE" \
--image_dirname "$IMAGE_DIR" \
--model_names "${MODEL_NAMES[@]}" \
--image_grid "${IMAGE_GRID[@]}" \
--class_items "anime" "human" "object" \
# In ZH mode, the class_items list can be extended to include "multilingualism".
rm -rf tmp_*
# end_time
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "✅ All evaluations finished in $duration seconds."