610265158 / Peppa_Pig_Face_Landmark

A simple face detect and alignment method, which is easy and stable.
Apache License 2.0
525 stars 116 forks source link

The TFLite model is unable to run on GPU #25

Closed yxchng closed 1 year ago

610265158 commented 4 years ago

Why do you want to run the tflite model on gpu?

yxchng commented 4 years ago

@610265158 Because it is not fast enough on mobile phone. I am currently testing on Qualcomm 730 and it is running at about 20ms per face on CPU. It is problematic when there are many faces. Hopefully it can run faster on GPU. Ideally, <5 ms will be good.

610265158 commented 4 years ago

Tflite is not fast, bro.

It is an engineering problem, please modify the model and then try MNN or NCNN.

yxchng commented 4 years ago

Are MNN and NCNN fast on GPU? Or just faster on CPU?

610265158 commented 4 years ago

The model structure is not designed so fast. The best way is to tune the model structure based on your device and your inference frame work. If you want to work with tflite , mobilenet is a better structure.

image

There is a mnn model runtime analysis, as it shows, the pack op in the shuffle operator cost the most time. Anybody who wants to deploy the model , please tunning the model( it is very easy), and then deploy it.

And later i will train a mbv3 model, then upload it.