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

Show prediction labels #95

Closed
alemelis opened this issue Jul 27, 2021 · 5 comments
Closed

Show prediction labels #95

alemelis opened this issue Jul 27, 2021 · 5 comments
Assignees
Labels
feature request New feature or request

Comments

@alemelis
Copy link

Hey there, amazing tool, thanks for sharing!

I wonder if it is possible to draw the class label along with the bounding box for each prediction (possibly with the possibility of turning on/off the feature)

Actually, this bit of the code is supposed to do that, is that the case this works only for tf2 models?

cv2.putText(
img_arr,
"Class: {}, Score: {}".format(
str(category_index[str(classes[idx])]["name"]),
str(round(scores[idx], 2)),
),
(
int(each_bbox[1] * width),
int(each_bbox[2] * height + 10),
),
cv2.FONT_HERSHEY_SIMPLEX,
0.3,
(0, 0, 0),
1,
cv2.LINE_AA,
)

@gkeechin
Copy link
Contributor

Hey @alemelis, thank you for the feedback, you read our minds. That's an idea that we are currently working on! Currently, if you hover over the boxes or masks, it does show the labels. Since the frontend bounding boxes, masks, and images are rendered by leaflet, it will be more of an update of the leaflet / front-end side of things.

I believe that the cv2.putText was for there to run tests as well as save the inference results to an image (for a potential feature we are pushing out) - I'll be sure to update this issue as we roll out the label changes.

@gkeechin gkeechin added the feature request New feature or request label Jul 28, 2021
@gkeechin
Copy link
Contributor

gkeechin commented Aug 2, 2021

Hey @alemelis, we have some working prototype in one of our branches and I'd like to check with you pertaining to our implementation - are you looking for something like this?

image (13)

@alemelis
Copy link
Author

alemelis commented Aug 3, 2021

@gkeechin
that looks awesome!

will there be a toggle to turn on/off the labels?

@gkeechin
Copy link
Contributor

gkeechin commented Aug 6, 2021

@alemelis - Yes! It will be hotkey L. I have settled on the aesthetics and done the tests on various browsers. This feature will be bundled in our upcoming v0.55 update and Ill drop you a ping here when its in release. Should be done in the next few days.

Thank you for your patience and can't wait to hear your feedback

@gkeechin
Copy link
Contributor

Hey @alemelis - The changes are in the current releases branch. If you are using python3 portal.py to run the application, you should be able to press L to reveal all the tooltips.

Let me know if you have further suggestions or feature request - just open a new issue!

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

No branches or pull requests

3 participants