Leyo commited on
Commit
8eb3b9d
·
1 Parent(s): 83a693c

fix identifiers

Browse files
Files changed (1) hide show
  1. NLVR2.py +2 -2
NLVR2.py CHANGED
@@ -121,8 +121,8 @@ class NLVR2Dataset(datasets.GeneratorBasedBuilder):
121
  for line in open(path).readlines():
122
  ex = json.loads(line)
123
  common_img_identifier = ex["identifier"].split("-")
124
- left_img_identifier = f"{split_name-common_img_identifier[1]}-{common_img_identifier[2]}-img0.png"
125
- right_img_identifier = f"{split_name-common_img_identifier[1]}-{common_img_identifier[2]}-img1.png"
126
  left_image_path = str(os.path.join(images_path, left_img_identifier))
127
  right_image_path = str(os.path.join(images_path, right_img_identifier))
128
  record = {
 
121
  for line in open(path).readlines():
122
  ex = json.loads(line)
123
  common_img_identifier = ex["identifier"].split("-")
124
+ left_img_identifier = f"{split_name}-{common_img_identifier[1]}-{common_img_identifier[2]}-img0.png"
125
+ right_img_identifier = f"{split_name}-{common_img_identifier[1]}-{common_img_identifier[2]}-img1.png"
126
  left_image_path = str(os.path.join(images_path, left_img_identifier))
127
  right_image_path = str(os.path.join(images_path, right_img_identifier))
128
  record = {