tinyengine icon indicating copy to clipboard operation
tinyengine copied to clipboard

mcunet face detection model and code

Open kumarchaitanyab opened this issue 2 years ago • 10 comments

Hi Team, I would like to run the mcunet timyengine face detection model on M7 board and looking to find the source code but I see that there is only VWW code captured here. Is there a way to find the face detection code ? Also it would be helpful if you can add face detection benchmarking numbers for detection timings.

Thanks in advance.

kumarchaitanyab avatar Jan 25 '23 08:01 kumarchaitanyab

Hi @kumarchaitanyab, we have an example for person detection: https://github.com/mit-han-lab/tinyengine/blob/master/examples/detection_fpn.py. Feel free to check it out.

meenchen avatar Jan 27 '23 18:01 meenchen

Thanks for your response. Actually I am looking for C/C++ source code for face detection based application which runs on M7 based microcontroller. Can you please point me to that?

kumarchaitanyab avatar Jan 29 '23 02:01 kumarchaitanyab

Hi @kumarchaitanyab,

Sorry for the late reply. We are preparing to release the source code and tutorial for the face mask detection demo, so please stay tuned.

meenchen avatar Feb 09 '23 20:02 meenchen

Hi @kumarchaitanyab,

We have released the source code for face mask detection. Feel free to check it out and let us know any issues or questions.

Tutorial on openmv cam: https://github.com/mit-han-lab/tinyengine/tree/master/examples/openmv_face_mask_detection Generated code for the model: https://github.com/mit-han-lab/tinyengine/tree/master/examples/openmv_face_mask_detection/codegen

meenchen avatar Feb 10 '23 17:02 meenchen

Sure, will try and let you know. However, can you share your benchmarking numbers for various boards, more specifically am looking for detection timings. I have an M7 (STM32F746G-DISCO) board and hope this code can run on this board.

kumarchaitanyab avatar Feb 15 '23 04:02 kumarchaitanyab

Hi @meenchen @RaymondWang0

I have arducam, not sure if this code supports this camera interface. Can you please confirm and let me know along with benchmarking numbers for face detection and specially for STM32F746G-DISCO board.

kumarchaitanyab avatar Feb 15 '23 04:02 kumarchaitanyab

Hi @kumarchaitanyab,

The generated code for Tinyengine is able to run on the STM32F746G-DISCO board, but the application-specific code will need to be edited (refer to tutorial). For face mask detection, the latency is about 140ms on the openmv cam running at 480MHz. On the STM32F746G-DISCO board, the latency will be around 311ms at 216MHz.

meenchen avatar Feb 21 '23 17:02 meenchen

Hi @meenchen Thanks for the input. Just wanted to know that this time (140ms or 311ms) is only for inference or does it includes camera capture and pre, post processing involved?

kumarchaitanyab avatar Feb 23 '23 08:02 kumarchaitanyab

Hi @meenchen Thanks for the input. Just wanted to know that this time (140ms or 311ms) is only for inference or does it includes camera capture and pre, post processing involved?

That includes post processing as well.

meenchen avatar Feb 23 '23 17:02 meenchen

Hi @meenchen, thanks a lot. It will be very useful for us if you can provide timing breakdown for camera capture, pre-processing, inference and post-processing.

kumarchaitanyab avatar Feb 24 '23 05:02 kumarchaitanyab