Skip to content

Instantly share code, notes, and snippets.

@arunm8489
Created June 4, 2020 04:41
Show Gist options
  • Save arunm8489/aff76547e06fb7cb23d279fa093fe87c to your computer and use it in GitHub Desktop.
Save arunm8489/aff76547e06fb7cb23d279fa093fe87c to your computer and use it in GitHub Desktop.
# the dimension of anchors is wrt original image.We will make it corresponding to feature map
anchors = [(a[0]/stride, a[1]/stride) for a in anchors]
#Sigmoid the centre_X, centre_Y. and object confidencce
prediction[:,:,0] = torch.sigmoid(prediction[:,:,0])
prediction[:,:,1] = torch.sigmoid(prediction[:,:,1])
prediction[:,:,4] = torch.sigmoid(prediction[:,:,4])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment