Created
October 26, 2022 07:57
-
-
Save FrancescoSaverioZuppichini/7d09ce471d7211bdbb2534892a75400b to your computer and use it in GitHub Desktop.
Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ipywidgets import interact | |
def _interact(threshold: float): | |
print(threshold) | |
nms_indices = nms(bboxes + labels[..., None], scores, threshold) | |
plot_bboxes(img, | |
bboxes[nms_indices], | |
colors=["yellow" if el.item() == 0 else "blue" for el in labels[nms_indices]], | |
labels=["head" if el.item() == 0 else "mic" for el in labels[nms_indices]] | |
) | |
interact(_interact, threshold = .1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment