Hi,

  • The -classifier.libsvm.m option should be supported, what OTB version do you use in OSGeo4W ?
  • The first error is a bit obscure, but the second one looks like a problem with the input statistics. Does the statistics file contain 3 components for average and standard deviation?
  • I think both extensions .svm and .txt should work.
Best,
Guillaume

On 07/05/2016 05:11 PM, [email protected] wrote:
Hello,

I would like to use orfeo for a libsvm oneclass classification. However, I get error messages that don't really help to see my mistake. Maybe someone encountered a similar error.

Before I list my questions, I will explain what I did:
  1. Generate training samples
    • I created a polygone shapefile layer in QGIS and manually drew polygons with class label 1 for the features, I would like to extract.
    • result: Train_Samples_1Class.shp
  2. Compute image second order statistics
    • otbcli_ComputeImagesStatistics -il namibia_orthoimage.tif -out namibia_orthoimage_statistics.xml
  3. Train SVM classifier
    • otbcli_TrainImagesClassifier -io.il namibia_orthoimage.tif -io.vd Train_Samples_1Class.shp -io.imstat namibia_orthoimage_statistics.xml -sample.mv 100 -sample.mt 100 -sample.vtr 0.5 -sample.vfn Class -classifier libsvm -classifier.libsvm.k linear -classifier.libsvm.c 1 -classifier.libsvm.m oneclass -classifier.libsvm.opt 1 -io.out SVM_Model.txt -io.confmatout SVM_ConfusionMatrix.csv

      • This gives the error "could not find paramter m" when run as a Pyhton script in the OSGeo4W Shell and "option -classifier.libsvm.m does not exist in the application" when run directly as the command-line listed above.
      • Therefore, I tried it without the oneclass option and created training samples with two classes (1: feature to be detected, 0 for all remaining polygons --> result: Train_Samples.shp) and changed the above code as follows:
      • otbcli_TrainImagesClassifier -io.il namibia_orthoimage.tif -io.vd Train_Samples.shp -io.imstat namibia_orthoimage_statistics.xml -sample.mv 100 -sample.mt 100 -sample.vtr 0.5 -sample.vfn Class -classifier libsvm -classifier.libsvm.k linear -classifier.libsvm.c 1 -classifier.libsvm.opt 1 -io.out SVM_Model.txt -io.confmatout SVM_ConfusionMatrix.csv
      • This gives the error "Input primary is required but not set" (ErrorI attached), when run as a Pyhton script in the OSGeo4W Shell and "Inconsistent measurement vector size: Input Sample List size 3 Scale measurement vector size 0 Shift measurement vector size 0" (Error II) when run directly as the command-line listed above.
      • I also attached the Python script, I refer to, to make it clearer.
      • When I alternatively try to do train the SVM classifier via the Orfeo GUI in QGIS, I don't get any output or error message.

Questions:


Thanks a lot!


Sophie

--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
 
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
Guillaume PASERO
Responsable technique
Business Unit E-SPACE & Geo Information - Département Image & Applications

CS Systèmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
+33 561 17 64 21 - [email protected]

--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
 
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to