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

你好,这两个地方可能导致错误 #10

Open
liuqunzhong opened this issue Jul 31, 2017 · 3 comments
Open

你好,这两个地方可能导致错误 #10

liuqunzhong opened this issue Jul 31, 2017 · 3 comments

Comments

@liuqunzhong
Copy link

1、mtcnn::mtcnn(int row, int col)
float minl = row>col?row:col;
可能会导致最后一个尺度的图像的宽或高小于12,进而导致后面this->conv3_matrix的height或width小于0,导致feature2MatrixInit函数里报错。
按你的意思是不是应该row<col?row:col;

2、maxPooling
if ((pbox->width - kernelSize) % stride == 0)
有时候会报错,if(maxNum<(ptemp+i+kernelRowpbox->width))这里指针越界,我发现此时是(pbox->width - kernelSize) % stride == 0但是(pbox->height - kernelSize) % stride != 0。
是否应该加上heigth的限制即,
if ((pbox->width - kernelSize) % stride == 0 && (pbox->height - kernelSize) % stride == 0)

谢谢你的开源!
我用原来的训练的模型,检测近红图像效果不理想。是不是应该在近红外上再训练下呢?

@ghgggg
Copy link

ghgggg commented Aug 28, 2017

@liuqunzhong 你好,我也遇到了这种错误,但是不知道为什么,多次执行后就会在feature2MatrixInit这里报错,改了 row<col?row:col 还是会报错,不清楚还要改正什么?不知道你后面改好了没有啊?谢谢了

@AlphaQi
Copy link
Owner

AlphaQi commented Oct 1, 2017

不好意思哈,最近忙于校招,没什么时间管理,我会尽快更新code,并发布更新的版本。不便之处,烦请见谅。

@peterlau123
Copy link

image
在图示划线处是不是也出现了错误,觉得应该为diffw = col*stride-pbox->width+1;
赞同@liuqunzhong的做法,If条件判断应修改为if ((pbox->width - kernelSize) % stride == 0 && (pbox->height - kernelSize) % stride == 0)

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

4 participants