From ac5b3cfcd2246e66f0bee86537e2719a5f7b29bc Mon Sep 17 00:00:00 2001 From: Maxim Zhiltsov Date: Wed, 8 Apr 2020 15:07:38 +0300 Subject: [PATCH] Save full image paths in coco --- datumaro/datumaro/plugins/coco_format/converter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datumaro/datumaro/plugins/coco_format/converter.py b/datumaro/datumaro/plugins/coco_format/converter.py index b5766d046c29..a618c2279bd3 100644 --- a/datumaro/datumaro/plugins/coco_format/converter.py +++ b/datumaro/datumaro/plugins/coco_format/converter.py @@ -514,7 +514,7 @@ def _save_image(self, item): filename += CocoPath.IMAGE_EXT path = osp.join(self._images_dir, filename) save_image(path, image) - return filename + return path def convert(self): self._make_dirs() @@ -536,7 +536,7 @@ def convert(self): for item in subset: filename = '' if item.has_image: - filename = item.image.filename + filename = item.image.path if self._save_images: if item.has_image: filename = self._save_image(item)