Skip to content

Commit

Permalink
reasonable box gen
Browse files Browse the repository at this point in the history
#23 mentioned this issue and will solve the problem.
  • Loading branch information
jeong-tae committed Dec 26, 2019
1 parent 35716d5 commit 084bd9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/RACNN.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ def forward(self, images, locs):
ret = []
for i in range(images.size(0)):
tx, ty, tl = locs[i][0], locs[i][1], locs[i][2]
tx = tx if tx > (in_size/3) else in_size/3
tx = tx if (in_size/3*2) < tx else (in_size/3*2)
ty = ty if ty > (in_size/3) else in_size/3
ty = ty if (in_size/3*2) < ty else (in_size/3*2)
tl = tl if tl > (in_size/3) else in_size/3
tx = tx if tx > tl else tl
tx = tx if tx < in_size-tl else in_size-tl
ty = ty if ty > tl else tl
ty = ty if ty < in_size-tl else in_size-tl

w_off = int(tx-tl) if (tx-tl) > 0 else 0
h_off = int(ty-tl) if (ty-tl) > 0 else 0
Expand Down

0 comments on commit 084bd9a

Please sign in to comment.