2025-05-05 7:21 PM
I used JPG photos for training. So, after integrating it into the STM32U5 using X-CUBE-AI, what kind of data should I use for verification?
Used RGB565?YUV?
2025-05-08 12:28 AM
Can anyone help me? If there's anything you don't understand, I can provide more descriptions.
2025-05-21 6:54 AM
Hello @Sunwaz,
Are talking about the way to use data in the main.c or in the GUI of X Cube AI.
You trained a model in python right? Being jpg or anything else don't matter. It was treated as a array of a certain size, which is your model input size (for example 124x124x3).
When providing data in your code, you need to fill a buffer of that size.
have a good day,
Julian
2025-05-22 11:01 PM
Hi @Julian E.
Thank you very much for your reply.
This is a schematic diagram of my model. From it, I can see that the input is a 96 * 96 * 3 array of S8. At this time, should I enter RGB888 or RGB565 in my code? When I trained, looking at the information of the JPG got a color depth of 24bits. My understanding is that an array in RGB888 format should be passed here. I don't know if my understanding is correct.
have a good day,
Sunwaz
2025-05-26 5:32 AM
Hello @Sunwaz,
You need to look at how your model was trained.
When you loaded your images for training, print the arrays to see the format used.
Then in the C application, you just need to create an array of size 3x96x96 of type INT8 (in your picture you see that your input is of type STAI_FORMAT_S8 3x96x96, the STAI format is an alias for INT8
You can start by testing with an array of random values.
Then you can enter the real image values and compare the input between the C application and your python model
Have a good day,
Julian