Preloading of the MTCNN model is very slow.
See original GitHub issueHello,
I’m using VueJS. When you open a Modal, these codes are working, which I created from your sample code. The value of “console.time” is quite high.
Code:
console.time("fullFaceDescriptions");
vm.yuz_degisken_objesi.fullFaceDescriptions = (await faceapi.allFacesMtcnn(vm.yuz_degisken_objesi.videoEl, vm.yuz_degisken_objesi.mtcnnParams))
.map(fd => fd.forSize(vm.yuz_degisken_objesi.hw.width, vm.yuz_degisken_objesi.hw.height));
console.timeEnd("fullFaceDescriptions");
console.log("*");
fullFaceDescriptions: 5500.3720703125ms * fullFaceDescriptions: 372.788818359375ms * fullFaceDescriptions: 257.229736328125ms * fullFaceDescriptions: 180.324951171875ms * fullFaceDescriptions: 222.89404296875ms * fullFaceDescriptions: 207.50927734375ms *
How can I make it more stable?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
GPUs Are Fast! Datasets Are Your Bottleneck | by William Falcon
This means that they are super slow. If your models allows you to, you could apply the same transforms to a batch of...
Read more >Edge Deployment Framework of GuardBot for Optimized Face ...
Our framework contains dual-stage architecture based on convolutional neural networks with three main modules that employ (1) MTCNN for face ...
Read more >MTCNN Face Detection Implementation for TensorFlow, As A ...
The model is adapted from the Facenet's MTCNN implementation, merged in a single file located inside the folder 'data' relative to the module's...
Read more >Fast MTCNN detector (~55 FPS at full resolution) - Kaggle
This notebook demonstrates how to achieve 45 frames per second speeds for loading frames and detecting faces on full resolution videos. Algorithm¶. Striding: ......
Read more >Computer Vision: 'seeing' people on a bus | Medium - Medium
A python implement of mtcnn by Ivan which I used can be found here. ... into a much denser and more robust network...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Before you are putting too much work into this, I will soon publish some new changes, including a new tiny face detector, which is much faster than ssd and mtcnn and produces much more stable detection results than mtcnn.
I think at that point there will be no real reason anymore to use the mtcnn, unless there is a way to fix the warmup issue.
Nothing really that I know of, seems like the first time a tensor of a certain shape is uploaded to the GPU there is an initial delay, which they refer to as “warmup” in the mobilenet example. The MTCNN uploads tensors of N + 2 different shapes (N in stage 1, can be adjusted by the
maxNumScales
forward parameter and 1 each in stages 2 and 3). This unfortunately causes the first forward pass of MTCNN to be much longer on certain machines.I am not sure where this inital delay comes from (maybe due to allocating textures of certain sizes on the GPU, just a wild guess, I am not that familar with WebGL for GPGPU). If it concerns you, maybe you could ask at tfjs for help.
PS: I would also be interested in the answer to that.