Wendy-Fly commited on
Commit
8b05886
·
verified ·
1 Parent(s): 38a2c2d

Upload infer_qwen2_vl.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. infer_qwen2_vl.py +2 -5
infer_qwen2_vl.py CHANGED
@@ -36,10 +36,7 @@ import argparse
36
 
37
  folder = "/inspire/hdd/ws-ba572160-47f8-4ca1-984e-d6bcdeb95dbb/a100-maybe/albus/ICCV_2025/qvq/dataset"
38
 
39
- images = []
40
- for img_path in glob.glob(f"{folder}/*.jpe"):
41
- img = Image.open(img_path)
42
- images.append(img)
43
 
44
  num_image = len(images)
45
 
@@ -69,7 +66,7 @@ from tqdm import tqdm
69
  ans = []
70
  counter = 0
71
  for batch_idx in tqdm(range(begin, end, batch_size)):
72
- batch = images[batch_idx: min(batch_idx + batch_size, end)]
73
  print(f"data index range : {batch_idx} ~ {min(batch_idx + batch_size, end)}")
74
  image_inputs_batch, video_inputs_batch = [], []
75
  for idx,i in enumerate(batch):
 
36
 
37
  folder = "/inspire/hdd/ws-ba572160-47f8-4ca1-984e-d6bcdeb95dbb/a100-maybe/albus/ICCV_2025/qvq/dataset"
38
 
39
+ file_names = os.listdir(folder)
 
 
 
40
 
41
  num_image = len(images)
42
 
 
66
  ans = []
67
  counter = 0
68
  for batch_idx in tqdm(range(begin, end, batch_size)):
69
+ batch = file_names[batch_idx: min(batch_idx + batch_size, end)]
70
  print(f"data index range : {batch_idx} ~ {min(batch_idx + batch_size, end)}")
71
  image_inputs_batch, video_inputs_batch = [], []
72
  for idx,i in enumerate(batch):