Commit fb6e611a authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 355637402
parent 47f8d4df
...@@ -283,11 +283,11 @@ def generate_annotations(images, image_dir, ...@@ -283,11 +283,11 @@ def generate_annotations(images, image_dir,
"""Generator for COCO annotations.""" """Generator for COCO annotations."""
for image in images: for image in images:
if img_to_obj_annotation: object_annotation = (img_to_obj_annotation.get(image['id'], None) if
object_annotation = img_to_obj_annotation.get(image['id'], None) img_to_obj_annotation else None)
if img_to_caption_annotation: caption_annotaion = (img_to_caption_annotation.get(image['id'], None) if
caption_annotaion = img_to_caption_annotation.get(image['id'], None) img_to_caption_annotation else None)
yield (image, image_dir, object_annotation, id_to_name_map, yield (image, image_dir, object_annotation, id_to_name_map,
caption_annotaion, include_masks) caption_annotaion, include_masks)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment