cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6570-DK Object detection python run error for deployment

ASR
Associate II

i followed the instructions or steps listed out in below ticket 

Which software do I need to install to start with STM32N6570-DK?

Currently I am struck at this error please help me.

ASR_0-1750784388187.png

Regards,

ASR

8 REPLIES 8
Julian E.
ST Employee

Hello @ASR,

 

Can you share the yaml file used.

The error message suggests that the part about the hardware in the yaml is wrong.

 

Have a good day,

Julian

​
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks Julian.

I did some changes in the deployment section in yaml file. I am also attaching my file that I modified.

I commented out  #build_conf : "UVCL" now i see some progress but no luck yet. Here is my log.

*******************************************************************************************************

\stm32ai-modelzoo-services\object_detection> python stm32ai_main.py --config-path ./src/config_file_examples/ --config-name deployment_n6_ssd_mobilenet_v2_fpnlite_config.yaml 2025-06-25 10:01:31.852196: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2025-06-25 10:01:31.852441: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. [INFO] : Running `deployment` operation mode [INFO] : Using provided class names from dataset.class_names [INFO] : ClearML config check [INFO] : The random seed for this simulation is 123 INFO: Created TensorFlow Lite XNNPACK delegate for CPU. [INFO] : Generating C header file for Getting Started... [INFO] : This TFLITE model doesnt contain a post-processing layer loading model.. model_path="../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite" loading conf file.. "../application_code/object_detection/STM32N6\stmaic_STM32N6570-DK.conf" config="None" "n6 release" configuration is used [INFO] : Selected board : "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6) [INFO] : Compiling the model and generating optimized C code + Lib/Inc files: ../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite setting STM.AI tools.. root_dir="", req_version="" Cube AI Path: "..\..\..\..\STEdgeAI\2.0\Utilities\windows\stedgeai.exe". [INFO] : Offline CubeAI used; Selected tools: 10.0.0 (x-cube-ai pack) loading conf file.. "../application_code/object_detection/STM32N6\stmaic_STM32N6570-DK.conf" config="None" "n6 release" configuration is used compiling... "ssd_mobilenet_v2_fpnlite_035_192_int8_tflite" session model_path : ../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite tools : 10.0.0 (x-cube-ai pack) target : "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6) options : --st-neural-art default@../application_code/object_detection/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast [returned code = 4294967295 - FAILED] $ cwd: None $ args: ..\..\..\..\STEdgeAI\2.0\Utilities\windows\stedgeai.exe generate --target stm32n6 -m ../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite --output D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\object_detection\src\experiments_outputs\2025_06_25_10_01_35 --workspace D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\object_detection\src\experiments_outputs\2025_06_25_10_01_35 --st-neural-art default@../application_code/object_detection/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast ST Edge AI Core v2.0.0-20049 PASS: 0%| | 0/82 [00:00<?, ?it/s] E011(ConfigurationError): Neural-Art configuration: Cannot find the Neural-Art compiler Add it to your PATH Specify a path to a Neural-Art compiler in the json file (NA_binary key in Globals) From a pack, it should come embedded with the pack $ cwd: None $ args: ..\..\..\..\STEdgeAI\2.0\Utilities\windows\stedgeai.exe generate --target stm32n6 -m ../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite --output D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\object_detection\src\experiments_outputs\2025_06_25_10_01_35 --workspace D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\object_detection\src\experiments_outputs\2025_06_25_10_01_35 --st-neural-art default@../application_code/object_detection/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast ST Edge AI Core v2.0.0-20049 PASS: 0%| | 0/82 [00:00<?, ?it/s] E011(ConfigurationError): Neural-Art configuration: Cannot find the Neural-Art compiler Add it to your PATH Specify a path to a Neural-Art compiler in the json file (NA_binary key in Globals) From a pack, it should come embedded with the pack Error executing job with overrides: [] Traceback (most recent call last):
View more

 

Hello @ASR,

 

I did not reproduce your issue.

The model zoo was recently updated to make a use of the st edge ai 2.1 and the application are also made with the stedge ai core 2.1.

 

In your yaml you use the version 10.0.0 (2.0).

Could you try to install the stedgeai core 2.1 and change the path and version in the yaml.

 

If it does not help, I would suggest to do a clean install as I don't know what version of model zoo you are using. And conflicts may happen.

 

Have a good day,

Julian

​
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
ASR
Associate II

Dear Julian,

I updated the path and version in the yaml file. I noticed that build got struck as per the log. Here is the screenshot of the log. I am not seeing any error, seems got hung.

python stm32ai_main.py --config-path ./src/config_file_examples/ --config-name deployment_n6_ssd_mobilenet_v2_fpnlite_config.yaml

2025-06-27 12:03:05.087769: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2025-06-27 12:03:05.087845: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
[INFO] : Running `deployment` operation mode
[INFO] : Using provided class names from dataset.class_names
[INFO] : ClearML config check
[INFO] : The random seed for this simulation is 123
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[INFO] : Generating C header file for Getting Started...
[INFO] : This TFLITE model doesnt contain a post-processing layer
loading model.. model_path="../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite"
loading conf file.. "../application_code/object_detection/STM32N6/stmaic_STM32N6570-DK.conf" config="None"
"n6 release" configuration is used
[INFO] : Selected board : "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
[INFO] : Compiling the model and generating optimized C code + Lib/Inc files: ../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite
setting STM.AI tools.. root_dir="", req_version=""
Cube AI Path: "..\..\..\..\STEdgeAI\2.1\Utilities\windows\stedgeai.exe".
[INFO] : Offline CubeAI used; Selected tools: 10.1.0 (x-cube-ai pack)
loading conf file.. "../application_code/object_detection/STM32N6/stmaic_STM32N6570-DK.conf" config="None"
"n6 release" configuration is used
compiling... "ssd_mobilenet_v2_fpnlite_035_192_int8_tflite" session
model_path : ../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite
tools : 10.1.0 (x-cube-ai pack)
target : "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
options : --st-neural-art default@../application_code/object_detection/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast

ASR
Associate II

As it got hung, I gave keyboardInterrupt here is the log. Need your help to resolve this.

python stm32ai_main.py --config-path ./src/config_file_examples/ --config-name deployment_n6_ssd_mobilenet_v2_fpnlite_config.yaml
2025-06-27 12:41:12.686717: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2025-06-27 12:41:12.687402: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
[INFO] : Main entry point of the script
[INFO] : Running `deployment` operation mode
[INFO] : Using provided class names from dataset.class_names
[INFO] : ClearML config check
[INFO] : The random seed for this simulation is 123
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[INFO] : Generating C header file for Getting Started...
[INFO] : This TFLITE model doesnt contain a post-processing layer
loading model.. model_path="../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite"
loading conf file.. "../application_code/object_detection/STM32N6/stmaic_STM32N6570-DK.conf" config="None"
"n6 release" configuration is used
[INFO] : Selected board : "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
[INFO] : Compiling the model and generating optimized C code + Lib/Inc files: ../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite
setting STM.AI tools.. root_dir="", req_version=""
Cube AI Path: "..\..\..\..\STEdgeAI\2.1\Utilities\windows\stedgeai.exe".
[INFO] : Offline CubeAI used; Selected tools: 10.1.0 (x-cube-ai pack)
loading conf file.. "../application_code/object_detection/STM32N6/stmaic_STM32N6570-DK.conf" config="None"
"n6 release" configuration is used
compiling... "ssd_mobilenet_v2_fpnlite_035_192_int8_tflite" session
model_path : ../../stm32ai-modelzoo/object_detection/ssd_mobilenet_v2_fpnlite/ST_pretrainedmodel_public_dataset/coco_2017_person/ssd_mobilenet_v2_fpnlite_035_192/ssd_mobilenet_v2_fpnlite_035_192_int8.tflite
tools : 10.1.0 (x-cube-ai pack)
target : "STM32N6570-DK Getting Started Object Detection (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
options : --st-neural-art default@../application_code/object_detection/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast

Traceback (most recent call last):
File "D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\object_detection\stm32ai_main.py", line 234, in <module>
main()
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\hydra\main.py", line 94, in decorated_main
_run_hydra(
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\hydra\_internal\utils.py", line 394, in _run_hydra
_run_app(
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\hydra\_internal\utils.py", line 457, in _run_app
run_and_report(
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\hydra\_internal\utils.py", line 220, in run_and_report
return func()
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\hydra\_internal\utils.py", line 458, in <lambda>
lambda: hydra.run(
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\clearml\binding\hydra_bind.py", line 91, in _patched_hydra_run
return PatchHydra._original_hydra_run(self, config_name, task_function, overrides, *args, **kwargs)
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\hydra\_internal\hydra.py", line 119, in run
ret = run_job(
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\clearml\binding\hydra_bind.py", line 195, in _patched_run_job
result = PatchHydra._original_run_job(*args, **kwargs)
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\hydra\core\utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\site-packages\clearml\binding\hydra_bind.py", line 230, in _patched_task_function
return task_function(a_config, *a_args, **a_kwargs)
File "D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\object_detection\stm32ai_main.py", line 220, in main
process_mode(cfg)
File "D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\object_detection\stm32ai_main.py", line 93, in process_mode
deploy(cfg)
File "D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\object_detection\deployment\deploy.py", line 118, in deploy
stm32ai_deploy_stm32n6(target=board,
File "D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\common\deployment\common_deploy.py", line 493, in stm32ai_deploy_stm32n6
_stmaic_local_call(session)
File "D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\common\deployment\common_deploy.py", line 442, in _stmaic_local_call
stmaic.compile(session=session, options=opt, target=session._board_config)
File "D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\common\stm32ai_local\compile.py", line 206, in cmd_compile
err, errorList = run_shell_cmd(cmd_line, logger=logger)
File "D:\Sumanth_pjr\stm32n6-dk\stm32ai-modelzoo-services\common\stm32ai_local\utils.py", line 278, in run_shell_cmd
line = process.stdout.readline() if process.stdout is not None else ''
File "C:\Users\z003y3ka\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 22, in decode
def decode(self, input, final=False):
KeyboardInterrupt

Hello @ASR,

 

Could you try to locate the st edge ai core 2.1 .exe. It should be in C/ST/stedgeai/2.1/utilities/windows.

Then open a terminal and run a basic command like:

stedgeai.exe analyze --model <path to any model> --target stm32n6 --st-neural-art.

 

On first use, it may ask if you agree to share information and press Y/N and this may block the model zoo.

 

After that, please try to run the deployement in model zoo again.

 

Let me know if it helped.

 

Have a good day,

Julian

​
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Dear Julian,

 

If I ran the stedgeai command for mobilenet model. Here is the part of the log.

stedgeai.exe analyze --model ..\..\stm32ai-modelzoo\object_detection\ssd_mobilenet_v2_fpnlite\ST_pretrainedmodel_public_dataset\coco_2017_person\ssd_mobilenet_v2_fpnlite_035_192\ssd_mobilenet_v2_fpnlite_035_192_int8.tflite --target stm32n6 --st-neural-art
ST Edge AI Core v2.1.0-20194 329b0e98d
>>>> EXECUTING NEURAL ART COMPILER
D:/STEdgeAI/2.1/Utilities/windows/atonn.exe -i "D:/Sumanth_pjr/stm32n6-dk/stm32ai-modelzoo-services/object_detection/st_ai_output/ssd_mobilenet_v2_fpnlite_035_192_int8_OE_3_2_0.onnx" --json-quant-file "D:/Sumanth_pjr/stm32n6-dk/stm32ai-modelzoo-services/object_detection/st_ai_output/ssd_mobilenet_v2_fpnlite_035_192_int8_OE_3_2_0_Q.json" -g "network.c" --load-mdesc "D:/STEdgeAI/2.1/Utilities/configs/stm32n6.mdesc" --load-mpool "D:/STEdgeAI/2.1/Utilities/windows/targets/stm32/resources/mpools/stm32n6.mpool" --save-mpool-file "D:/Sumanth_pjr/stm32n6-dk/stm32ai-modelzoo-services/object_detection/st_ai_ws/neural_art__network/stm32n6.mpool" --out-dir-prefix "D:/Sumanth_pjr/stm32n6-dk/stm32ai-modelzoo-services/object_detection/st_ai_ws/neural_art__network/" --native-float --mvei --cache-maintenance --Ocache-opt --enable-virtual-mem-pools --Os --Oauto-sched --output-info-file "c_info.json"
<<<< DONE EXECUTING NEURAL ART COMPILER

Questions:

-> Why the stedgeai command is not triggering automatically as part of the "python stm32ai_main.py. --config-path ./src/config_file_examples/........"

-> I am attaching report. 

-> Now after the model conversion from the tflite to .c file. I ran this command "python stm32ai_main.py. --config-path ./src/config_file_examples/........" 

I am getting this error LCD_FG_WIDTH, LCD_FG_HEIGHT, LCD_FG_FRAMEBUFFER_SIZE all are undefined

Hello @ASR,

 

Thank you for the update.

So we confirmed that the st edge ai core works.

 

I think your issue is linked to mixed versions of model zoo and the application example being used.

Please clone the repository again starting from zero, this should fix all your issue.

 

Have a good day,

Julian

​
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.