Skip to main content
OKN
Associate III
July 7, 2026
Solved

Error when converting from .tflite to .nb with the --target option

  • July 7, 2026
  • 7 replies
  • 120 views

Hello

ST Edge AI: Guide for STM32MPU 、 Section 3.2.1. Referring to “Generate NBG from TensorFlow™ Lite or ONNX,”

I converted the .tflite file downloaded from ModelZoo to .nb, but I’m getting an error.

$ /opt/ST/STEdgeAI/4.0/Utilities/linux/stedgeai generate -m ./yolov8n_256_quant_pc_uf_od_coco-person-st.tflite --target stm32mp25
ST Edge AI Core v4.0.1-20581 7ed50de05
E102(CliArgumentError): stm32mp25 not recognized as target. Supported targets are
ispu --device DEVICE
mlc
stm32f4
stm32l4
stm32l4p
stm32g4
stm32f3
stm32wb
stm32n6 [--st-neural-art]
stm32f0
stm32l0
stm32g0
stm32c0
stm32wl
stm32v8
stm32u3 [--hsp]
stm32h7
stm32f7
stm32u5
stm32l5
stm32h5
stm32c5
stm32mp157c

If you change the target name slightly, you'll get the following error:

 $ /opt/ST/STEdgeAI/4.0/Utilities/linux/stedgeai generate -m ./yolov8n_256_quant_pc_uf_od_coco-person-st.tflite --target stm32mp2
ST Edge AI Core v4.0.1-20581 7ed50de05
E102(CliArgumentError): stm32mp2 is not available

Could you tell me how to convert a .tflite file to a .nb file that can be used on the STM32MP255?

ST EdgeAI is using the latest version, 4.1.

--

Best Regards

Best answer by Julian E.

Hi ​@OKN,

 

The default location is /opt, which requires root privileges. However, during installation, you can change the path to a non-root directory to solve this issue.

In my opinion, it is better to install the ST Edge AI tool in another location that does not require root rights.

No, you did not miss a preparation step; you may have missed the installation path.

 

Have a good day,

Julian

7 replies

OKN
OKNAuthor
Associate III
July 8, 2026

Hello

I uninstalled ST EdgeAI 4.0 and reinstalled version 2.2.
For now, the issue with --target stm32mp2 has been resolved,
but an error occurred immediately after the conversion started.
 

$ /opt/ST/STEdgeAI/2.2/Utilities/linux/stedgeai generate -m ./yolov8n_256_quant_pc_uf_od_coco-person-st.tflite --target stm32mp2
ST Edge AI Core v2.2.0-20266 2adc00962

LOAD ERROR: [Errno 2] No such file or directory: '/opt/ST/STEdgeAI/2.2/Utilities/linux/lib/python3.9/site-packages/ac_ruler_db.json'

I checked the installation directory for ST EdgeAI, but ac_ruler_db.json does not exist.

When installing ST EdgeAI, I selected version 2.2 and checked all the related components before proceeding with the installation.


Do I need to install some other package?

Best Regards,
--
okn

OKN
OKNAuthor
Associate III
July 9, 2026

Hello 

Could you tell me how to convert a TFLite (.tflite) model into an NBG (.nb) format that can be used on an STM32MP255?

 

I followed the instructions in “3.2.1. Generate NBG from TensorFlow™ Lite or ONNX” in the  ST Edge AI: Guide for STM32MPU  , but stedgeai terminated with an error and the conversion failed.

 

$ /opt/ST/STEdgeAI/2.2/Utilities/linux/stedgeai generate -m ./yolov8n_256_quant_pc_uf_od_coco-person-st.tflite --target stm32mp2
ST Edge AI Core v2.2.0-20266 2adc00962

LOAD ERROR: [Errno 2] No such file or directory: '/opt/ST/STEdgeAI/2.2/Utilities/linux/lib/python3.9/site-packages/ac_ruler_db.json'

 

I'm evaluating an AI using the STM32MP255's NPU, but I'm stuck and can't seem to make any progress...


Best Regards
--
okn
 

OKN
OKNAuthor
Associate III
August 4, 2026

Hello 

I still haven't been able to get stedgeai to work…

 

Could you tell me how to convert a TFLite (.tflite) model into an NBG (.nb) format that can be used on an STM32MP255?

 

I followed the instructions in “3.2.1. Generate NBG from TensorFlow™ Lite or ONNX” in the  ST Edge AI: Guide for STM32MPU  , but stedgeai terminated with an error and the conversion faile

 

$ /opt/ST/STEdgeAI/2.2/Utilities/linux/stedgeai generate -m ./yolov8n_256_quant_pc_uf_od_coco-person-st.tflite --target stm32mp2
ST Edge AI Core v2.2.0-20266 2adc00962

LOAD ERROR: [Errno 2] No such file or directory: '/opt/ST/STEdgeAI/2.2/Utilities/linux/lib/python3.9/site-packages/ac_ruler_db.json'

You can also perform conversions using the st edge ai developer cloud, but it's very inconvenient because it doesn't provide detailed error logs when an error occurs.

 

Does anyone have any information that might help resolve this issue? I would appreciate your assistance.

 

Julian E.
ST Technical Moderator
August 7, 2026

Hi ​@OKN,

 

You indeed need the ST Edge AI Core 2.2 to use the MPU.

I just installed it on a linux machine.

 

I had no issue using:

stedgeai generate -m ./yolov8n_256_quant_pc_uf_od_coco-person-st.tflite --target stm32mp2

Maybe something wrong happened during the install.

Could you look at /opt/ST/STEdgeAI/2.2/Utilities/linux/lib/python3.9/site-packages/ to see if you indeed not have ac_ruler_db.json

I have this file in my install.

 

My MP2 colleague are on vacations, but I will send them a message to look here when they come back

 

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.
OKN
OKNAuthor
Associate III
August 21, 2026

Hello, ​@Julian E. 

# I apologize for missing your reply after returning from my summer vacation.

Today, I tried the workaround that the distributor informed me about.
 

$ cd /opt/ST/STEdgeAI/2.2/Utilities 
$ sudo chmod -R o+w linux

 

Then I executed stedgeai generate.

$ /opt/ST/STEdgeAI/2.2/Utilities/linux/stedgeai generate -m ./yolov8n_256_quant_pc_uf_od_coco-person-st.tflite --target stm32mp2 ST Edge AI Core v2.2.0-20266 2adc00962

Model successfully compiled to NBG: /home/okuno/OpenSTLinux/Distribution-Package/ddl_ai/stai_sample/other_model/stm32ai_output/yolov8n_256_quant_pc_uf_od_coco-person-st.nb PASS: 100% elapsed time (generate): 69.898s

The command completed successfully and the .nb file was generated.

Using this .nb file, I was able to run object detection on the STM32MP255F NPU.

It also appears that ac_ruler_db.json, which I could not find after installation, was generated when stedgeai generate was executed.

However, I consider this workaround to be somewhat forceful.

To summarize the situation:

The ST Edge AI tool was installed in the default location specified by the installer, namely /opt/ST/STEdgeAI/..., and the installation was performed after switching to the root user.

I reinstalled the tool three times. Each time, /opt/ST/STEdgeAI/2.2/Utilities/linux/lib/python3.9/site-packages/ac_ruler_db.json was not present after installation.

After granting write permission to other users under /opt/ST/STEdgeAI/2.2/Utilities/linux and then running stedgeai generate, the command completed successfully. At that time, ac_ruler_db.json was generated.

Based on these observations, I have the following questions:

- Is there any problem with the installation location?
- Would it be better to install the tool in a user directory instead of /opt/...?
- Is there some preparation step that I missed, other than running chmod -R o+w?

From the above behavior, I suspect that there may have been an issue with the installation process itself.
 

Best Regards,

--

okn

Julian E.
Julian E.Best answer
ST Technical Moderator
August 24, 2026

Hi ​@OKN,

 

The default location is /opt, which requires root privileges. However, during installation, you can change the path to a non-root directory to solve this issue.

In my opinion, it is better to install the ST Edge AI tool in another location that does not require root rights.

No, you did not miss a preparation step; you may have missed the installation path.

 

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.