get_images.py 1.81 KB
Newer Older
wanglch's avatar
wanglch committed
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
import os
from tqdm import tqdm

os.system('rm -rf images')
os.system('mkdir images')

os.system('cp -r ../MME_Benchmark_release/OCR images/')

os.system('mkdir images/artwork')
os.system('cp ../MME_Benchmark_release/artwork/questions_answers_YN/* images/artwork/')
with open('LaVIN/artwork.txt') as fin:
    paths = [ line.strip().split('\t', 1)[0] for line in fin ]
    paths = list(set(paths))
    for path in tqdm(paths):
        os.system(f'cp ../MME_Benchmark_release/artwork/images/toy_dataset/{path} images/artwork/{path}')

os.system('mkdir images/celebrity')
os.system('cp ../MME_Benchmark_release/celebrity/images/* images/celebrity/')
os.system('cp ../MME_Benchmark_release/celebrity/questions_answers_YN/* images/celebrity/')

os.system('cp -r ../MME_Benchmark_release/code_reasoning images/')

os.system('cp -r ../MME_Benchmark_release/color images/')

os.system('cp -r ../MME_Benchmark_release/commonsense_reasoning images/')

os.system('cp -r ../MME_Benchmark_release/count images/')

os.system('cp -r ../MME_Benchmark_release/existence images/')

os.system('mkdir images/landmark')
os.system('cp ../MME_Benchmark_release/landmark/images/* images/landmark/')
os.system('cp ../MME_Benchmark_release/landmark/questions_answers_YN/* images/landmark/')

os.system('cp -r ../MME_Benchmark_release/numerical_calculation images/')

os.system('cp -r ../MME_Benchmark_release/position images/')

os.system('mkdir images/posters')
os.system('cp ../MME_Benchmark_release/posters/images/* images/posters/')
os.system('cp ../MME_Benchmark_release/posters/questions_answers_YN/* images/posters/')

os.system('mkdir images/scene')
os.system('cp ../MME_Benchmark_release/scene/images/* images/scene/')
os.system('cp ../MME_Benchmark_release/scene/questions_answers_YN/* images/scene/')

os.system('cp -r ../MME_Benchmark_release/text_translation images/')