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

做的很棒。不过MTCNN太重,抠脸花几秒?2s? #3

Open
aguang1201 opened this issue Jul 20, 2018 · 5 comments
Open

做的很棒。不过MTCNN太重,抠脸花几秒?2s? #3

aguang1201 opened this issue Jul 20, 2018 · 5 comments

Comments

@aguang1201
Copy link

No description provided.

@vcvycy
Copy link
Owner

vcvycy commented Jul 21, 2018

检测速度和minFaceSize和图片中的人脸个数相关。minFaceSize这个参数就是要检测的最小人脸,论文中的是40 pixels,具体应用具体设置。
比如一张普通1000像素左右的图片,人脸小于5个,将minFace设置为1000/6,差不多160 pixels,可以比40 快5倍左右,处理速度100ms以下。

@aguang1201
Copy link
Author

aguang1201 commented Jul 21, 2018 via email

@dl8207531
Copy link

1000像素,6张人脸,minface1000/6,能做到100ms以下不大可能吧,这是实测出来的值吗?

@vcvycy
Copy link
Owner

vcvycy commented Nov 3, 2018

@dl8207531
100ms没什么难度吧。耗时的地方:
1、图片缩放:主要取决于人脸个数和图片大小。可以认为和人脸数线性关系。
2、神经网络运行(PNET/RNET/ONET 网络深度也就6层上下,跑起来很快的)
(1) PNet
假设minFaceSize=160 , 由于factor 设置为0.709 , 160/(0.709^5) <1000 < 160/(0.709^6)
所以PNet + 图片缩放会执行6次。
(2) RNet
取决于PNet给出的候选框个数,有多少个候选框,就要crop+resize图片,然后喂给神经网络
(3) ONet
取决于RNet给的候选框个数。其他同(2)。
这一步,明显会比(2) 中的少很多。

之前的回复,是我在一个很普通平板测试的(看抖音都热得烫手)。

@dl8207531
Copy link

我试了下确实能做到100ms以内,是我搞错了

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

3 participants