Page 1 of 1

ESP32-S3 , How can i track by minimal points model , What kindly of Model will work ?

Posted: Thu Sep 11, 2025 6:10 am
by arsheriff@2k3
Hello Espressif team,

I’m experimenting with ESP-WHO + ESP-DL on the ESP32-S3.
Right now, I have the default human_face_detect example running successfully with models like human_face_detect_msr_s8_v1.espdl.

Now, I want to use a custom lightweight landmark model with 22 pivot points (instead of full 468 Mediapipe points). My goal is to detect just key facial features (eyes, mouth, etc.) for distraction/yawn detection.

Questions:

What is the correct workflow to train and quantize such a model for ESP32-S3?

Should I use TensorFlow Lite → int8 quantization → convert with esp-dl tools?

Or is there an Espressif-specific flow?

Any example of how to prepare .espdl models from TensorFlow/PyTorch for deployment?

Are there constraints for input resolution / ops supported that I should consider when designing the model?

Would you recommend starting from the existing fpenet or landmark model in ESP-DL repo and retraining with fewer points?

I would appreciate any guidance or workflow references šŸ™

Re: ESP32-S3 , How can i track by minimal points model , What kindly of Model will work ?

Posted: Thu Sep 11, 2025 11:56 am
by ahsrabrifat
From PyTorch:

Code: Select all

# example export
dummy = torch.randn(1,3,80,80, device='cpu')
torch.onnx.export(model, dummy, "landmark22.onnx",
                  input_names=['input'], output_names=['output'],
                  opset_version=13)
From TensorFlow: convert to SavedModel ---> use tf2onnx or tf.saved_model.save then python -m tf2onnx.convert ... to produce ONNX.

Why ONNX? ESP-PPQ and many esp-dl example scripts expect ONNX and esp-ppq has good, battle-tested ONNX support. ESP-PPQ can also handle PyTorch/TF directly via helper scripts, but ONNX is the most straightforward intermediate format.