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

why an data blob be reshapeed to 1,3,ws,hs #22

Open
B-one opened this issue Aug 11, 2017 · 2 comments
Open

why an data blob be reshapeed to 1,3,ws,hs #22

B-one opened this issue Aug 11, 2017 · 2 comments

Comments

@B-one
Copy link

B-one commented Aug 11, 2017

你好。首先很感谢你把MTCNN python化。但我在阅读你的代码的时候,我发现有句代码是PNet.blobs['data'].reshape(1,3,ws,hs); 正常来讲,不应该是reshape(1,3, hs, ws),请问这是什么原因导致??

@hust-kevin
Copy link

@B-one
你知道为什么下面这个函数中需要进行转置吗?
def generateBoundingBox(map, reg, scale, t):
stride = 2
cellsize = 12

'''为什么需要转置 ?? '''
map = map.T
dx1 = reg[0,:,:].T
dy1 = reg[1,:,:].T
dx2 = reg[2,:,:].T
dy2 = reg[3,:,:].T

@hust-kevin
Copy link

@B-one 我知道为什么要转置了,就是因为之前reshape(channels,w,h),所以画图的时候要转置过来;但是我尝试着直接reshape(channels,h,w)将图片送进网络的话,虽然还能够识别,但对于某些图片,准确率没有reshape(channels,w,h)高,你知道原因吗

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