I am having a problem with an image classification.
The classifier training performes quite well but the image classification only classifies in 2 classes and the confusion matrix is very strange with much less pixels than it should have.
I put the Log results of classification and confusion matrix in this file:
Log_File.docx (14.4 KB)
I would really apreciate if someone has any clue of what might be happening.
Thanks in advance
It is hard to tell without seeing your data.
Can you provide the command you used to obtain these results ? or screens if you used a graphical interface.
How are you using the ComputeConfusionMatrix application ? With a reference raster or a reference vector ?
You used normalization in the classification part, are you sure you used the same statistics in
Thank you Cédric,
I repeated all the process in C:, just to check any problem with working in my One Drive and i made prt sc’s from all the steps so you can see everything i used during the process.
Below each prt sc you can find the results of the correspondent Log tab.
Sequence.docx (472.4 KB)
I hope this helps.
Thank you so much for your help.
I am not sure, but maybe the problem comes from the way the classification result is stored. By default,
ImageClassifier stores its output as a uint8 image, i.e. with grayscale levels between 0 and 256, but your classes go way above these values. Can you try to change the output pixel type of the output image :
for example to
I think Cédric is right : here your code cannot be encoded and the ImageClassifier app will only encode codes with values below 255.
There an other thing I think you should check : you’ve selected all samples in the sample selection step (the rate is 1). Usually, you should use a part of the samples for training, and keep samples for validation.
Hope you’ll get fine results.
Thank you so much!
That was the problem.
I repeated the ImageClassifier and ComputeConfusionMatrix steps and copied the results to this doc:
Results.docx (553.7 KB)
As you can see it worked and the evaluation with the independent validation set turns out to be quite good!
Thank you Yannick,
You were right. I repeated defining the uint as 32 and worked.
In respect to your second point, i was using an independent validation set but only in the ComputeConfusionMatrix step. This test areas were in another shp just for the final model evaluation step.