Skip to main content
Associate III
June 19, 2025
Solved

.tfs labels needed for st_yolo training

  • June 19, 2025
  • 1 reply
  • 332 views

Hi,

 

I previously successfully trained an st_yolo model for the stm32h7 board using VSCode.

 

I now got the N6 disco board and cloned the new github page for modelzoo.

After running the stm32ai_mai.py program and having pointed the .yaml file to the correct training path, I get the following error: ValueError: Could not find any .tfs labels files in directory

My dataset is yolo formatted.

I did not get this error previously and am a bit confused by it. Am I in the right road at least and what should I do next?

thanks

Best answer by Julian E.

Hello @dogg,

 

You can use this script to convert your yolo data to tfs files:

stm32ai-modelzoo-services/object_detection/datasets/dataset_create_tfs at main · STMicroelectronics/stm32ai-modelzoo-services · GitHub

 

Then in your yaml, use the path to these data for the training, validation etc.

 

I didn't know it was required to use tfs and it is not written anywhere, I am gathering information, I'll let you know.

 

Have a good day,

Julian

 

 

 

 

 

1 reply

Julian E.
Julian E.Best answer
Technical Moderator
June 19, 2025

Hello @dogg,

 

You can use this script to convert your yolo data to tfs files:

stm32ai-modelzoo-services/object_detection/datasets/dataset_create_tfs at main · STMicroelectronics/stm32ai-modelzoo-services · GitHub

 

Then in your yaml, use the path to these data for the training, validation etc.

 

I didn't know it was required to use tfs and it is not written anywhere, I am gathering information, I'll let you know.

 

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.
doggAuthor
Associate III
June 19, 2025

Ok thanks  for that. I have trained a mock model to test and now I am trying to load the model onto the N6 but I get this error instead: 

File "c:\Users\dogg\Desktop\zooooo\stm32ai-modelzoo-services\common\stm32ai_local\board_config.py", line 208, in __init__
raise STMAICFileError(f'"{project_path}" is not a regular file')
common.stm32ai_local.utils.STMAICFileError: E300: "../application_code/image_classification/STM32N6/stmaic_STM32N6570-DK.conf" is not a regular file

 

The deployment structure was originally for the H7 board so I had to change it to: 

deployment:
   c_project_path: ../application_code/image_classification/STM32N6/
   IDE: GCC
   verbosity: 1
   hardware_setup:
      serie: STM32N6
      board: STM32N6570-DK #STM32H747I-DISCO, STM32N6570-DK
 
 
Never mind, I had to hardcode the file's dir like so:
if board == "STM32N6570-DK":
            stmaic_conf_filename = r"C:/Users/dogg/Desktop/zooooo/stm32ai-modelzoo-services/application_code/image_classification/STM32N6/stmaic_STM32N6570-DK.conf"
     
thanks