nyuuzyou commited on
Commit
c63764d
·
1 Parent(s): b501fe0

I hope at least this time the preview generation works fine

Browse files
Files changed (1) hide show
  1. AnimeHeadsv3.py +2 -2
AnimeHeadsv3.py CHANGED
@@ -44,8 +44,8 @@ class AHv3(datasets.GeneratorBasedBuilder):
44
  filepath = os.path.join(folder_dir, filename)
45
  if filename in filename_to_image:
46
  image = filename_to_image[filename]
47
- objects = [process_annot(annot, category_id_to_category) for annot in image_id_to_annotations[image["id"]]]
48
  with open(filepath, "rb") as f:
49
  image_bytes = f.read()
50
- yield idx, {"image_id": image["id"], "image": filepath, "height": image["height"], "width": image["width"], "objects": objects}
 
51
  idx += 1
 
44
  filepath = os.path.join(folder_dir, filename)
45
  if filename in filename_to_image:
46
  image = filename_to_image[filename]
 
47
  with open(filepath, "rb") as f:
48
  image_bytes = f.read()
49
+ objects = [process_annot(annot, category_id_to_category) for annot in image_id_to_annotations[image["id"]]]
50
+ yield idx, {"image_id": image["id"], "image": {"path": filepath, "bytes": image_bytes}, "height": image["height"], "width": image["width"], "objects": objects}
51
  idx += 1