4

I am having trouble processing a satellite image using the RF (Random Forest) classification, that is a machine learning algorithm in the Orfeo Toolbox of QGis 2.18.1.

When I run the Tool, the processing takes less than a second but I do not have any result. So, I have neither an error nor a result. I have tried changing parameters and inputs but nothing is showing up at the end of the process.

Please can anyone shed light on this problem for me?

A- Algorithm Compute Images second order statistics

C:\OTB\bin\otbcli_ComputeImagesStatistics 
-il
"D:\documents\GIS\Formation QGis\Donnees\Raster\Imagerie.tif "
-bv
0
-ram
512
-out
"C:/Users/Yannick.Doungmo/Desktop/GDBQC/sec_stats.xml"
2019-02-17 18:08:28 (INFO): Default RAM limit for OTB is 128 MB 
2019-02-17 18:08:28 (INFO): GDAL maximum cache size is 811 MB 
2019-02-17 18:08:28 (INFO): OTB will use at most 4 threads 
2019-02-17 18:08:28 (INFO): No kwl metadata found in file D:\documents\GIS\Formation QGis\Donnees\Raster\Imagerie.tif 
2019-02-17 18:08:28 (INFO): Estimated memory for full processing: 3433.11MB (avail.: 512 MB), optimal image partitioning: 7 blocks 
2019-02-17 18:08:28 (INFO): Estimation will be performed in 8 blocks of 10000x1251 pixels 

Processing Image (1/1): 0% [ ] 
Converting outputs
Loading resulting layers
Algorithm Compute Images second order statistics finished

B- Attributes of my classification Layer

enter image description here

C- Algorithm TrainImagesClassifier (rf)

C:\OTB\bin\otbcli_TrainImagesClassifier

-io.il

"D:\documents\GIS\Formation QGis\Donnees\Raster\Imagerie.tif "

-io.vd

"C:\Users\Yannick.Doungmo\Desktop\GDBQC\test\class_layer.shp "

-io.imstat

C:/Users/Yannick.Doungmo/Desktop/GDBQC/sec_stats.xml

-elev.default

0

-sample.mt

1000

-sample.mv

1000

-sample.bm

1

-sample.edg

true

-sample.vtr

0.5

-sample.vfn

Class

-classifier

rf

-classifier.rf.max

5

-classifier.rf.min

10

-classifier.rf.ra

0

-classifier.rf.cat

10

-classifier.rf.var

0

-classifier.rf.nbtrees

100

-classifier.rf.acc

0.01

-rand

0

-io.confmatout

"C:/Users/Yannick.Doungmo/Desktop/GDBQC/conf_mat.csv"

-io.out

"C:/Users/Yannick.Doungmo/Desktop/GDBQC/my_model.model"

ERROR: Parameter -sample.edg does not exist in the application. 

Converting outputs

Loading resulting layers

Algorithm TrainImagesClassifier (rf) finished

I Tried the same algorithm with QGIS 3.4 but i still not have any result.

here is the log file :

Processing algorithm…
Algorithm 'TrainImagesClassifier' starting…
Input parameters:
{ 'io.il' : ['D:/documents/GIS/Formation QGis/Donnees/Raster/Imagerie.tif'], 'io.vd' : ['C:/Users/Yannick.Doungmo/Desktop/GDBQC/test/class_layer.shp'], 'io.valid' : '', 'io.imstat' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/sec_stats.xml', 'io.out' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mod.model', 'io.confmatout' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mat.csv', 'cleanup' : True, 'sample.mt' : 1000, 'sample.mv' : 1000, 'sample.bm' : 1, 'sample.vtr' : 0.5, 'sample.vfn' : 'class', 'elev.dem' : '', 'elev.geoid' : '', 'elev.default' : 0, 'classifier' : 'libsvm', 'classifier.libsvm.k' : 'linear', 'classifier.libsvm.m' : 'csvc', 'classifier.libsvm.c' : 1, 'classifier.libsvm.nu' : 0.5, 'classifier.libsvm.opt' : False, 'classifier.libsvm.prob' : False, 'rand' : 0 }

The filename, directory name, or volume label syntax is incorrect.
Execution completed in 0.73 seconds
Results:
{'io.confmatout': 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mat.csv',
'io.out': 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mod.model'}

Loading resulting layers
Algorithm 'TrainImagesClassifier' finished
Processing algorithm…
Algorithm 'TrainImagesClassifier' starting…
Input parameters:
{ 'io.il' : ['D:/documents/GIS/Formation QGis/Donnees/Raster/Imagerie.tif'], 'io.vd' : ['C:/Users/Yannick.Doungmo/Desktop/GDBQC/test/class_layer.shp'], 'io.valid' : '', 'io.imstat' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/sec_stats.xml', 'io.out' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mod.model', 'io.confmatout' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mat.csv', 'cleanup' : True, 'sample.mt' : 1000, 'sample.mv' : 1000, 'sample.bm' : 1, 'sample.vtr' : 0.5, 'sample.vfn' : 'class', 'elev.dem' : '', 'elev.geoid' : '', 'elev.default' : 0, 'classifier' : 'libsvm', 'classifier.libsvm.k' : 'linear', 'classifier.libsvm.m' : 'csvc', 'classifier.libsvm.c' : 1, 'classifier.libsvm.nu' : 0.5, 'classifier.libsvm.opt' : False, 'classifier.libsvm.prob' : False, 'rand' : 0 }

The filename, directory name, or volume label syntax is incorrect.
Execution completed in 0.11 seconds
Results:
{'io.confmatout': 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mat.csv',
'io.out': 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mod.model'}

Loading resulting layers
Algorithm 'TrainImagesClassifier' finished
Processing algorithm…
Algorithm 'TrainImagesClassifier' starting…
Input parameters:
{ 'io.il' : ['D:/documents/GIS/Formation QGis/Donnees/Raster/Imagerie.tif'], 'io.vd' : ['C:/Users/Yannick.Doungmo/Desktop/GDBQC/test/class_layer.shp'], 'io.valid' : '', 'io.imstat' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/sec_stats.xml', 'io.out' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mod.model', 'io.confmatout' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mat.csv', 'cleanup' : True, 'sample.mt' : 1000, 'sample.mv' : 1000, 'sample.bm' : 1, 'sample.vtr' : 0.5, 'sample.vfn' : 'class', 'elev.dem' : '', 'elev.geoid' : '', 'elev.default' : 0, 'classifier' : 'libsvm', 'classifier.libsvm.k' : 'linear', 'classifier.libsvm.m' : 'csvc', 'classifier.libsvm.c' : 1, 'classifier.libsvm.nu' : 0.5, 'classifier.libsvm.opt' : False, 'classifier.libsvm.prob' : False, 'rand' : 0 }

The filename, directory name, or volume label syntax is incorrect.
Execution completed in 0.11 seconds
Results:
{'io.confmatout': 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mat.csv',
'io.out': 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mod.model'}

Loading resulting layers
Algorithm 'TrainImagesClassifier' finished
Processing algorithm…
Algorithm 'TrainImagesClassifier' starting…
Input parameters:
{ 'io.il' : ['D:/documents/GIS/Formation QGis/Donnees/Raster/Imagerie.tif'], 'io.vd' : ['C:/Users/Yannick.Doungmo/Desktop/GDBQC/test/class_layer.shp'], 'io.valid' : '', 'io.imstat' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/sec_stats.xml', 'io.out' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mod.model', 'io.confmatout' : 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mat.csv', 'cleanup' : True, 'sample.mt' : 1000, 'sample.mv' : 1000, 'sample.bm' : 1, 'sample.vtr' : 0.5, 'sample.vfn' : 'class', 'elev.dem' : '', 'elev.geoid' : '', 'elev.default' : 0, 'classifier' : 'libsvm', 'classifier.libsvm.k' : 'linear', 'classifier.libsvm.m' : 'csvc', 'classifier.libsvm.c' : 1, 'classifier.libsvm.nu' : 0.5, 'classifier.libsvm.opt' : False, 'classifier.libsvm.prob' : False, 'rand' : 0 }

The filename, directory name, or volume label syntax is incorrect.
Execution completed in 0.11 seconds
Results:
{'io.confmatout': 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mat.csv',
'io.out': 'C:/Users/Yannick.Doungmo/Desktop/GDBQC/mod.model'}

Loading resulting layers
Algorithm 'TrainImagesClassifier' finished
  • 1
    If i remember correctly all the 'TrainImages...' tools create a model file which needs to be used in the 'Image Classification' tool. This will give you a raster file. – Carlos Feb 16 at 20:42
  • 1
    menu Processing -> Options (or Ctrl + Alt + C by default) -> General, and tick on Keep dialog open after running an algorithm. Then Edit your question to include the content of the Log tab as preformatted (code sample {}) text. – Gabriel De Luca Feb 16 at 20:49
  • 1
    I would first try to remove spaces and dots in the path to your files. This is sometimes a source of errors. – radouxju Feb 22 at 9:32
  • if issue still persists, please include version of otb plugin if QGIS < 3.6. For QGIS 3.8 or higher plugin has no effect – rkm Aug 28 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.