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

Allow relative pathnames for importing/exporting annotations #487

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

uwer
Copy link

@uwer uwer commented Jul 30, 2021

A new attribute has been added to the ImageModel to capture the relative path of an image at import time as well as scanning. if there are no sub-directories this variable will be equal to the file_name, however the search logic will use the relative pathname to discover the image. The relative path is defined as 'absolute image path' relative to 'dataset path'
When exporting the relative path will replace the 'file_name' entry in the 'image' dictionary, this behaviour can be switched off by setting the 'EXPORT_RELPATH' environment variable to false (in the compose file for the workers).
If the annotation only contains a bbox and no valid segmentation the segmentation is derived form the bbox. Previously this annotation would have been ignored. This behaviour relies on an empty segmentation (including a potentially empty element) and a valid bbox (workers/tasks/data.py:256).
This addresses implicitly also pull request #421 and #453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant