-
Notifications
You must be signed in to change notification settings - Fork 68
coco converter #274
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
coco converter #274
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
segmentation.extend([ | ||
box.start.x, box.start.y, box.end.x, box.start.y, box.end.x, | ||
box.end.y, box.start.x, box.end.y | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: does the orientation matter for coco?
def rle_to_common(class_annotations, class_name): | ||
mask = rle_decoding(class_annotations.segmentation.counts, | ||
*class_annotations.segmentation.size[::-1]) | ||
return ObjectAnnotation(name=class_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not I was going to leave a comment "I don't see name
in ObjectAnnotation
but then realized that BaseAnnotation
inherits from FeatureSchema
. Imho it's quite confusing, it should be a composition rather than inheritance.
futures = [] | ||
coco_categories = {} | ||
|
||
with ProcessPoolExecutor(max_workers=8) as exc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make executor an optional argument of from_common
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See question below for same comment on panoptic dataset.
coco_categories = {} | ||
coco_things = {} | ||
images = [] | ||
with ProcessPoolExecutor(max_workers=8) as exc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about executor as arg. Not being able to specify concurrency would be pretty annoying to me as user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if I just let the number of workers be an arg? My thinking is that most users are going to want the same amount of parallelism - the max that the backend can handle. Also this script is unlikely to run within the context of another executor - users are going to either convert an entire dataset or not. So asking users to pass in the execturor is an extra step that will always be necessary.
I changed everything to use Pathlib - including the public interfaces. I am a little bit hesitant to keep it that way because we don't support that in other interfaces. Let's chat about this. |
…labelbox-python into ms/custom-metric-tutorial
…labelbox-python into ms/custom-metric-tutorial
…labelbox-python into ms/custom-metric-tutorial
No description provided.