Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draw bounding box in infer.py coordinates? #1

Open
machanic opened this issue May 6, 2017 · 1 comment
Open

draw bounding box in infer.py coordinates? #1

machanic opened this issue May 6, 2017 · 1 comment

Comments

@machanic
Copy link

machanic commented May 6, 2017

in infer.py in line 138:

xy = np.array([locs[t,1],locs[t,0],locs[t,1],locs[t,0]])
wh = np.array([-g_size//2, -g_size//2, g_size//2, g_size//2])
xys = [xy + np.power(2,s)*wh for s in range(n_scales)]
for xy in xys:
     draw.rectangle(xy=list(xy), outline=color)

draw.rectangle parameter xy is from [x0,y0,x1,y1], is there error in xy = np.array([locs[t,1],locs[t,0],locs[t,1],locs[t,0]])????
shouldn't it be x coordinate first?

@amasky
Copy link
Owner

amasky commented May 8, 2017

I think it may be confusing but still needed. Chainer, numpy, and matplotlib use image matrices whose shape is (row, column), in other words, (y, x). I will get these lines more clear or add some comments later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants