-
-
Save arunm8489/b48a0d0a1ec553f1d351b33b4d68db66 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
#(center x, center y, height, width) attributes of our boxes, | |
#to (top-left corner x, top-left corner y, right-bottom corner x, right-bottom corner y) | |
box_corner = prediction.new(prediction.shape) | |
box_corner[:,:,0] = (prediction[:,:,0] - prediction[:,:,2]/2) | |
box_corner[:,:,1] = (prediction[:,:,1] - prediction[:,:,3]/2) | |
box_corner[:,:,2] = (prediction[:,:,0] + prediction[:,:,2]/2) | |
box_corner[:,:,3] = (prediction[:,:,1] + prediction[:,:,3]/2) | |
prediction[:,:,:4] = box_corner[:,:,:4] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment