Skip to content

Commit

Permalink
Update gen_12net_data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AITTSMD authored Dec 7, 2017
1 parent 9f7aea5 commit acd8e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prepare_data/gen_12net_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@
delta_x = npr.randint(-w * 0.2, w * 0.2)
delta_y = npr.randint(-h * 0.2, h * 0.2)
#show this way: nx1 = max(x1+w/2-size/2+delta_x)
nx1 = max(x1 + w / 2 + delta_x - size / 2, 0)
nx1 = int(max(x1 + w / 2 + delta_x - size / 2, 0))
#show this way: ny1 = max(y1+h/2-size/2+delta_y)
ny1 = max(y1 + h / 2 + delta_y - size / 2, 0)
ny1 = int(max(y1 + h / 2 + delta_y - size / 2, 0))
nx2 = nx1 + size
ny2 = ny1 + size

Expand Down

0 comments on commit acd8e0b

Please sign in to comment.