Run inference Cube.MX CMSIS-PACK : Tutorial test not working

Question/Issue:
Inference result is aways all zeros for all classes. Tested with 2 project and got the same result. Tested with various raw features.

Project ID:
626049
(Also tested with Project ID: 630489, same problem)

Context/Use case:
The project is for an LPR (License Plate Recognition) using an SMT32H743 ( RAM=1MB and Flash=2MB - the board have external 4MB flash).

Summary:
The model runs the inference, print the features and the result, but do not detec any classes, testing with the highest classification features copied from the platform.

Steps to Reproduce:

  1. [Step 1] Download the whole firmware project form the link: https://www.dropbox.com/scl/fi/zqnfvgr9mfe3er6tcufaf/MG3000_LPR_3_PROJETCT_240225.rar?rlkey=7k8j4d4g2ksrqmdrtw5b01sbs&st=8akyf20n&dl=0

  2. [Step 2] Flash a board with STM32H743 (can be the NUCLEO-H743ZI)

  3. [Step 3] Connect a serial to uart2 ( PA3=USART2_RX, PD5=USART2_TX) and check the inference result.

Expected Results:
[Describe what you expected to happen]

Actual Results:

Predictions (time: 522 ms.):
run_classifier returned: 0
Predictions (DSP: 2 ms., Classification: 522 ms., Anomaly: 0 ms.):
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Reproducibility:

  • [ x] Always
  • [ ] Sometimes
  • [ ] Rarely

Environment:

  • Platform: Custom board with STM32H743 ( can be the NUCLEO-H743ZI)

  • Build Environment Details: STM32CubeIDE version: 1.17.0

  • OS Version: Windows 10

  • Edge Impulse Version (Firmware):
    #define EI_STUDIO_VERSION_MAJOR 1
    #define EI_STUDIO_VERSION_MINOR 69
    #define EI_STUDIO_VERSION_PATCH 15

  • Edge Impulse CLI Version:

  • Project Version:
    #define EI_CLASSIFIER_PROJECT_DEPLOY_VERSION 3

  • Custom Blocks / Impulse Configuration:
    Image data:
    Image width=96
    Image height=96
    Resize mode= Fit shortest

Image:
Name=image
Input axes(1)=image

Object Detection(images):
Name=Object detection

Input features:
[x] Image

Output features:
36 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, P, Q, R, S, T, U, V, W, X, Y, Z, i)

Output features:
36 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, P, Q, R, S, T, U, V, W, X, Y, Z, i)

Logs/Attachments:
Image attached showing the result, the raw feature copied and used.
not_working

Additional Information:
Would be great if there is an Cube.MX CMSIS-PACK of an STM32 object detection project working example with or/and an video tutorial teaching how to export and test. The raw feature format and byte order (how to extract from a .BMP image, RGB or grayscale) required by the model generate many doubts.

Thanks for filling the template @amiltonrsilva !

Let me check with the embedded team about support for CubeMX for CMSIS, it may not be in place @Arjan @ei_francesco do we have an example of object detection for CubeMX in open CMSIS?

Best

Eoin

1 Like