mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-06 00:05:02 -05:00
3 lines
12 KiB
HTML
3 lines
12 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//ENhttp://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"></style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"><p align="center" style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:x-large; font-weight:600;"><span style=" font-size:x-large;">Train SVM classifier from multiple image</span></p><p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;"><span style=" font-size:large;">Brief Description</span></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Train a SVM classifier from multiple pairs of images and training vector data.</p><p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;"><span style=" font-size:large;">Tags</span></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Learning</p><p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;"><span style=" font-size:large;">Long Description</span></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This application performs SVM classifier training from multiple pairs of input images and training vector data.Samples are composed of pixel values in each band optionally centered and reduced using XML statistics file produce by the ComputeImagesStatistics application.
|
|
The training vector data must contain polygons with a positive integer field representing the class label. Name of the field can be set using the "Class label field" parameter. Training and validation sample lists are built such that each class is equally represented in the two lists. One parameter allows to control the ratio between the number of samples in training and validation sets. Two parameters allow to manage the size of the training and validation sets per class and per image.
|
|
Several SVM classifier parameters cas be set. The kernel function which defined the feature space (for example if the kernel is a Gaussian radial basis function kernel the corresponding feature space of infinite dimensions). To allow some flexibility in separating the classes, SVM models have a cost parameter, C, that controls the trade off between allowing training errors and forcing rigid margins. It creates a soft margin that permits some misclassifications. Increasing the value of C increases the cost of misclassifying points and forces the creation of a more accurate model that may not generalize well. Classifier parameters can also be optimize.</p><p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;"><span style=" font-size:large;">Parameters</span></p><ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[group] Input and output data (-io): </span>This group of parameters allows to set input and output data.</p><ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] Input Image List (-il): </span>A list of input images.</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] Vector Data List (-vd): </span>A list of vector data sample used to train the estimator.</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] DEM repository (-dem): </span>Path to SRTM repository</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] XML image statistics file (-imstat): </span>Filename of an XML file containing mean and standard deviation of input images.</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] Output SVM model (-out): </span>Output SVM model</p></li></ul></li><br /><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[group] Training and validation samples parameters (-sample): </span>This group of parameters allows to set training and validation sample lists parameters.</p><ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] Maximum training sample size (-mt): </span>Maximum size of the training sample (default = -1).</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] Maximum validation sample size (-mv): </span>Maximum size of the validation sample (default = -1)</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] training and validation sample ratio (-vtr): </span>Ratio between training and validation sample (0.0 = all training, 1.0 = all validation) default = 0.5.</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] Name of the discrimination field (-vfn): </span>Name of the field using to discriminate class in the vector data files.</p></li></ul></li><br /><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[group] SVM classifier parameters (-svm): </span>This group of parameters allows to set SVM classifier parameters.</p><ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[choice] SVM Kernel Type (-k): </span>SVM Kernel Type.</p><ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[group] Linear: </span></p><ul></ul></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[group] Gaussian radial basis function: </span></p><ul></ul></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[group] Polynomial: </span></p><ul></ul></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[group] Sigmoid: </span></p><ul></ul></li></ul></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] Control trade off between training errors and forcing rigid margins. (-c): </span>SVM models have a cost parameter C.(1 by default).</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New, courier'; font-weight:600;"; >[param] parameters optimization (-opt): </span>SVM parameters optimization</p></li></ul></li><br /></ul><p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;"><span style=" font-size:large;">Limitations</span></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">None</p><p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;"><span style=" font-size:large;">Authors</span></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OTB-Team</p><p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;"><span style=" font-size:large;">See also</span></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p><p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:large; font-weight:600;"><span style=" font-size:large;">Example of use</span></p><ul><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><li>Parameters to set value:</li></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Input Image List: QB_1_ortho.tif</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vector Data List: VectorData_QB1.shp</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">XML image statistics file: clImageStatisticsQB1.xml</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Output SVM model: svmModelQB1_allOpt.svm</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Maximum validation sample size: 100</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">training and validation sample ratio: 0.5</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">parameters optimization: true</p></li></ul></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><li>Command line to execute:</li></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New, courier';">otbcli_TrainSVMImagesClassifier -io.il QB_1_ortho.tif -io.vd VectorData_QB1.shp -io.imstat clImageStatisticsQB1.xml -io.out svmModelQB1_allOpt.svm -sample.mv 100 -sample.vtr 0.5 -svm.opt true</p></ul></body></html> |