-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add Bbox visualizer #744
Add Bbox visualizer #744
Conversation
Can you add the short summary and link instead of "related ticket no. 94410"? |
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.
visualizer.py is a newly created file in components. Please add it in changelog. And please consider to add Dataset visualization category at "How to use Datumaro" in user manual. It's not urgent, so you can update it all at once when other tasks are completed.
datumaro/components/visualizer.py
Outdated
ncols: int, | ||
subset: Optional[str] = None, | ||
) -> Figure: | ||
assert nrows > 0, "nrows should be a positive integer." |
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.
I think that halting the program is not a good idea since the visualizer is 'only for showing' not a core functional logic.
How about just printing error messages and showing empty images when something goes wrong instead of assertion?
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.
My thought is that this API is mainly target for Jupyter Notebook users. So, if there is a problem, their executions will be failed only at a cell scope. I think it will be okay and giving exception can make users more cautious than printing messages. If this API will be used in Python programs, I believe those intermediate users can sufficiently use try-catch clauses to capture exceptions.
if ann.type == AnnotationType.bbox: | ||
self._draw_bbox(ann, label_categories, ax) | ||
else: | ||
raise NotImplementedError(f"{ann.type} is not implemented yet.") |
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.
An exception will stop the program like an assertion.
How about just printing messages in the visualizer?
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.
Please refer to my above comment.
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
23a166f
to
f4cfe37
Compare
Documentation is planned for the next work in the future. |
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.
LGTM
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.
LGTM
Signed-off-by: Kim, Vinnam vinnam.kim@intel.com
Summary
How to test
Unit tests are updated.
Checklist
develop
branchLicense
Feel free to contact the maintainers if that's a concern.