CNN for face recognition created for microcontroller?

Hello everyone,

I want to build CNN that can enable face recognition and deploy it on the microcontroller. I am using the board runs on MicroPython and based on that I will need to find a way how to convert CNN into some Python code that can be integrated into my MCU. Does anyone know how can I solve this issue? Any kind of help is welcome! Cheers :slightly_smiling_face:

Hi @Adnan_Sabovic, For building a CNN model and deploying it on the micro controller, first you have to define a keras model and train the model on your dataset. Please refer to this CNN tutorial for defining and training the model.

Once you have a trained model for deploying it on a micro controller you have to convert the trained keras model into a tflite file uisng the delow code.

tflite_model = converter.convert()

# Save the model.
with open('model.tflite', 'wb') as f:
  f.write(tflite_model)

After converting the model to tflite file you can apply quantization to reduce the model size because micro controllers have less memory. Please refer to this document for deploying and making inference using tflite on micro controller. Thank You.