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
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T [email protected] | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
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
%%timeit | |
torch_nms(bboxes + labels[..., None], scores, .45) |
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
%%timeit | |
nms(bboxes + labels[..., None], scores, .45) |
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 torchvision.ops.boxes import nms as torch_nms | |
nms_indices = torch_nms(bboxes + labels[..., None], scores, .45) | |
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]] | |
) |
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]] | |
) |
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
!jupyter nbextension enable --py widgetsnbextension --sys-prefix |
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
nms_indices = nms(bboxes + labels[..., None], scores, .45) | |
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]] | |
) |
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
nms_indices = nms(bboxes, scores, .45) | |
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]] | |
) |
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
keep[overlapped + i + 1] = 0 |
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
overlapped = torch.nonzero(iou > iou_threshold) |
NewerOlder