ImageClassifier: confidence map warning and running error

#1

Hey there, I’m new to using OTB and trying to classify and segment a (200 MB tif high resolution) image in QGIS 3.6. for my thesis, but I’m running into a problem when using the ‘ImageClassifier’ application.

Short description of my workflow: ‘ComputeImageStatistics’ > ‘TrainImageClassifier’ default setting using tif file Input and shp file Vector data > (unsuccesfull) ‘ImageClassifier’. The output model from the ‘TrainImageClassifier’ seems to be fine but when I try to run the ‘ImageClassifier’ I get the following message log and warning after which the application holds and freezes on 0%:


Uitvoeren van algoritme…

Algoritme ‘ImageClassifier’ starten…

Parameters invoer:

{ ‘in’ : ‘C:/Users/Woute/OneDrive/Documenten/Thesis/map/Chagambat.tif’, ‘mask’ : None, ‘model’ : ‘C:\Users\Woute\OneDrive\Documenten\Thesis\exposure\Seg_Class\QGIS3\model.model’, ‘imstat’ : ‘C:\Users\Woute\OneDrive\Documenten\Thesis\exposure\Seg_Class\QGIS3\chagambat_stats.xml’, ‘nodatalabel’ : None, ‘out’ : ‘C:/Users/Woute/OneDrive/Documenten/Thesis/exposure/Seg_Class/QGIS3/classified_largePixel.tif’, ‘confmap’ : ‘C:/Users/Woute/OneDrive/Documenten/Thesis/exposure/Seg_Class/QGIS3/Confidence_map.tif’, ‘outputpixeltype’ : 5 }

2019-04-10 15:46:30 (INFO): Default RAM limit for OTB is 128 MB

2019-04-10 15:46:30 (INFO): GDAL maximum cache size is 403 MB

2019-04-10 15:46:30 (INFO): OTB will use at most 8 threads

2019-04-10 15:46:30 (INFO): No kwl metadata found in file C:/Users/Woute/OneDrive/Documenten/Thesis/map/Chagambat.tif

2019-04-10 15:46:30 (INFO): Loading model

2019-04-10 15:46:30 (INFO): Model loaded

2019-04-10 15:46:30 (INFO): Input image normalization activated.

2019-04-10 15:46:30 (INFO): mean used: [194.452, 181.348, 164.022, 255]

2019-04-10 15:46:30 (INFO): standard deviation used: [31.206, 25.0084, 29.1366, 0]

2019-04-10 15:46:30 (WARNING): Confidence map requested but the classifier doesn’t support it!

2019-04-10 15:46:30 (INFO): Estimated memory for full processing: 2610.67MB (avail.: 128 MB), optimal image partitioning: 21 blocks

2019-04-10 15:46:30 (INFO): File C:/Users/Woute/OneDrive/Documenten/Thesis/exposure/Seg_Class/QGIS3/classified.tif will be written in 22 blocks of 7850x345 pixels


The same problem seems to occur when using the monterverdi module. A possible explanation could be the size of the image and the resolution but any help/experience is appreciated! thank you in advance.

0 Likes

#2

Hi Lucas,
Two ideas that you can explore:

  • Otb segmentation, I am not sure that it is your case but you should still have a look.
  • make sure you have the correct packages. As you are on windows there are two packages (x32 and x64) you need to make sure that it corresponds to you PC architecture.

Which version of OTB are you using?
Antoine

0 Likes

#3

Thanks for the reply Antoine!

I managed to get some results from te classification in the meantime. Setting the path names properly seemed to fix it, although it still takes a while to run. It seems that it is better to take these full paths rather than the available layers in the dropdown menu in the tool interface.
I’m using OTB 6.6 btw.

0 Likes

#4

I confirm this is a right way to fix it
Error i got was different (that’s why i update)
2019-04-14 22:00:29 (FATAL): itk::ERROR: Failed to open GDALDataset file D:/BFTemp/Alliance_20M_ROI_20N_V3_1404.shp|layername=Alliance_20M_ROI_20N_V3_1404 :

0 Likes