STMicroelectronics / stm32ai-modelzoo

AI Model Zoo for STM32 devices
Other
276 stars 68 forks source link

Object Detection Demo Can Handle Multi-class? #13

Closed cowbaz closed 1 year ago

cowbaz commented 1 year ago

I am successfully to deploy demo single person class. Then I have trained multi class model using training scripts provided and it can be verified itself, i.e. it can have fair mAP meaning the inferencing is going right. Then I compare the architecture of the demo STM pretrained mobilenet and it is sightly different from the mobilenet created by train.py. I have also tried to upload the .h5 file in AI development cloud for anaylsis of the model. It returns the following exception.

/*

stm32ai validate --model best_model.h5 --allocate-inputs --allocate-outputs --relocatable --compression none --optimization balanced --name network --workspace workspace --output output Neural Network Tools for STM32 family v1.7.0 (stm.ai v8.1.0-19520) E010(InvalidModelError): Couldn't load Keras model best_model.h5, error: Exception encountered when calling layer "lambda_5" (type CustomLambda).

name 'gen_anchors' is not defined

Call arguments received by layer "lambda_5" (type CustomLambda): • inputs=tf.Tensor(shape=(None, 32, 32, 32), dtype=float32) • mask=None • training=None */

As the network can be loaded to the board, except nothing can be detected. I am wondering anything else I should config or I need to deal with the model architecture?

Many thanks.

MDUSTM commented 1 year ago

Hello We have indeed identified an issue with multiclass model deployment and we are investigating. We will come back to you very soon.

MCHSTM commented 1 year ago

Hello, The issue was solved with the latest updates, the deployment should work now for multi class models.