Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save full image paths in coco #1381

Merged
merged 1 commit into from
Apr 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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