-
Notifications
You must be signed in to change notification settings - Fork 11
[Launch] Add a utility for users to test their Launch+Nucleus bundles locally #362
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
[Launch] Add a utility for users to test their Launch+Nucleus bundles locally #362
Conversation
nucleus/test_launch_integration.py
Outdated
| # From scaleapi/server/src/lib/select/api/types.ts | ||
| _TOP_LEVEL_REQUIRED_KEYS = {"geometry", "type"} | ||
| _TOP_LEVEL_OPTIONAL_KEYS = {"label", "confidence", "classPdf", "metadata"} | ||
| # TODO idk which ones are right for nucleus |
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.
TODO: I'm not sure which keys make sense to include, I've semi-arbitrarily included these 4 for now
| class BoxAnnotationModel(BaseModel, extra=Extra.forbid): | ||
| geometry: BoxGeometryModel | ||
| type: str | ||
| label: Optional[str] = None |
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.
TODO these keys aren't complete, I'm not entirely sure which ones it makes sense to include
syandroo
left a comment
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.
amazin
If
show_image=True, pops up a new window with the image. Also just returns the image with the boxes/lines/polygons drawn on top.If we want we can use matplotlib.pyplot.imshow to display the image, although it looks uglier inside of the jupyter notebook (and I'd assume uglier as well from a python script)
Jupyter nb: vvv
Previous version: vvv
