-
-
Save arunm8489/d04763f1c8650bbe330a14d569cb6952 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#perform NMS | |
#get the detections with one particular class | |
cls_mask = image_pred_*(image_pred_[:,-1] == cls).float().unsqueeze(1) | |
# taking the non zero indexes | |
class_mask_ind = torch.nonzero(cls_mask[:,-2]).squeeze() | |
image_pred_class = image_pred_[class_mask_ind] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment