Skip to content

Commit

Permalink
Save full image paths in coco (#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max authored Apr 8, 2020
1 parent e84f482 commit afeab69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datumaro/datumaro/plugins/coco_format/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit afeab69

Please sign in to comment.