2025-07-03 2:49 AM - last edited on 2025-07-03 2:55 AM by Andrew Neil
I used stm32-h747 to train image classification, I used the image classification routine, but the actual effect is very biased, my quantized_model_confusion_matrix_validation_set is as shown below, is there something wrong with my configuration?
Solved! Go to Solution.
2025-07-24 1:02 AM
I have solved the problem, it is that my python version is wrong, and I need to install the environment strictly according to the version requirements given by ST, otherwise there will be an unknown error.
2025-07-03 6:25 AM - edited 2025-07-03 6:25 AM
Hello @fanronghua0123456,
You mean that you trained a model with model zoo and deployed it on the stm32h747 disco?
In your case, I think you did provide images of only your label 1.
Your model predicted class 1 for almost all images, giving a good accuracy.
But you don't have any examples for the other labels, so you don't have metrics.
Please make sure to have a folder per class in your dataset folder if you are using model zoo.
Like:
datasets/
MyDataset/
label1/
img1.png
img2.png
....
Label2/
img1.png
img2.png
....
Have a good day,
Julian
2025-07-03 5:57 PM
2025-07-04 1:18 AM - edited 2025-07-07 2:33 AM
Hello @fanronghua0123456,
Thank you, I think your configuration is correct.
In your first message, it seems that it is the quantization matrix that has an issue.
Can you tell me if your training and validation matrixes also have issues or are they correct?
Could you try to use your training path for the quantization?
dataset:
name: handers
class_names: [hander1, hander2, hander3, hander4, hander5, hander6, hander7] # Or, classes_file_path, one of it is mandatory for deployment and prediction.
training_path: ./datasets/hander_photos # Mandatory
validation_path: # Optional
validation_split: 0.2 # Optional, default value is 0.2
test_path: # Optional
quantization_path: ./datasets/hander_photos # Mandatory
quantization_split: # Optional
check_image_files: False # Optional, set it to True if you want to check that all the image files can be read successfully
seed: 127 # Optional, there is a default seed
When you don't provide a path for validation, it uses random data. It is always recommended to use real data to quantize. You can also use quantization_split to use less data if you want.
For test you need to use different data, but for quantization, you can use the training data.
Have a good day,
Julian
2025-07-08 5:49 PM
Julinan,
thanks for your reply, i changed
quantization_path: ./datasets/hander_photos # Mandatory
But I still don't get such a graph like example.
2025-07-08 5:52 PM
and this is my picture dataset.
通过网盘分享的文件:HandWashDataset.zip
链接: https://pan.baidu.com/s/1wvfgoTCo70FJ2ajLzK36aQ 提取码: 5vx2
--来自百度网盘超级会员v6的分享
2025-07-08 8:57 PM
2025-07-18 1:20 AM
can anyone help me ?
2025-07-21 12:35 AM
Hello @fanronghua0123456,
I can't get the dataset you linked.
Could you please try with this one that I tested and tell me if you have the same issue:
Have a good day,
Julian
2025-07-21 8:53 PM - edited 2025-07-21 8:54 PM
the dataset is the flower dataset ,follow this link.
But I don't get the Confusion matrix on the link.