Skip to content

Instantly share code, notes, and snippets.

View FrancescoSaverioZuppichini's full-sized avatar
🧸
Focusing

Francesco Saverio Zuppichini FrancescoSaverioZuppichini

🧸
Focusing
  • roboflow
  • Lugano, Switzerland
View GitHub Profile
What did one pirate say to the other when he beat him at chess?<>Checkmatey.
I burned 2000 calories today<>I left my food in the oven for too long.
I startled my next-door neighbor with my new electric power tool. <>I had to calm him down by saying “Don’t worry, this is just a drill!”
I broke my arm in two places. <>My doctor told me to stop going to those places.
I quit my job at the coffee shop the other day. <>It was just the same old grind over and over.
I never buy anything that has Velcro with it...<>it’s a total rip-off.
I used to work at a soft drink can crushing company...<>it was soda pressing.
I wondered why the frisbee kept on getting bigger. <>Then it hit me.
I was going to tell you a fighting joke...<>but I forgot the punch line.
What is the most groundbreaking invention of all time? <>The shovel.
@FrancescoSaverioZuppichini
FrancescoSaverioZuppichini / git-ssh-error-fix.sh
Created June 12, 2023 14:24 — forked from Tamal/git-ssh-error-fix.sh
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ 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
%%timeit
torch_nms(bboxes + labels[..., None], scores, .45)
%%timeit
nms(bboxes + labels[..., None], scores, .45)
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]]
)
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]]
)
!jupyter nbextension enable --py widgetsnbextension --sys-prefix
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]]
)
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]]
)