Hi there! I’m currently finding methods to conduct object-based image classification on QGIS. Before I used the TrainVectorClassifier Tool, I used the OTB segmentation tool, then the OTB zonal statistics tool, and then the QGIS join layer tool to eventually get my vector shapefile consisting of the objects and the sample points. When I tried to use the TrainVectorClassifier tool, after selecting the options as shown in the screenshot, I got the following error
(FATAL) TrainVectorClassifier: itk::ERROR: FieldParameter(000002657ADEBCE0): Single selection mode is on, but there are 2 selected items
My configuration and log panel is as follows:
Windows 10
OTB 8.0.1 (installed directly from website)
QGIS version: 3.22.6-Białowieża
QGIS code revision: b6f33b1a
Qt version: 5.15.2
Python version: 3.9.5
GDAL version: 3.4.2
GEOS version: 3.10.2-CAPI-1.16.0
PROJ version: Rel. 9.0.0, March 1st, 2022
PDAL version: 2.3.0 (git-version: 1c17a7)
Input parameters:
{ ‘io.vd’ : [‘C:/Users/adiba/Documents/local_GIS_exploration/Supervised_classification_local/joined_OTB_segmentation_stats_samples.gpkg’], ‘io.stats’ : ‘’, ‘io.out’ : ‘C:/Users/adiba/Documents/local_GIS_exploration/Supervised_classification_local/OTB_OBIA_MLC_trainedmodel.model’, ‘io.confmatout’ : ‘C:/Users/adiba/Documents/local_GIS_exploration/Supervised_classification_local/OTB_OBIA_MLC_trainedCM.csv’, ‘layer’ : 0, ‘feat’ : [‘mean_0’,‘stdev_0’,‘mean_1’,‘stdev_1’,‘mean_2’,‘stdev_2’,‘mean_3’,‘stdev_3’,‘mean_4’,‘stdev_4’,‘mean_5’,‘stdev_5’,‘mean_6’,‘stdev_6’,‘mean_7’,‘stdev_7’,‘mean_8’,‘stdev_8’,‘mean_9’,‘stdev_9’,‘mean_10’,‘stdev_10’,‘mean_11’,‘stdev_11’], ‘valid.vd’ : None, ‘valid.layer’ : 0, ‘cfield’ : ‘class id’, ‘v’ : True, ‘classifier’ : ‘bayes’, ‘rand’ : 0 }
2022-06-13 14:56:53 (FATAL) TrainVectorClassifier: itk::ERROR: FieldParameter(000002657ADEBCE0): Single selection mode is on, but there are 2 selected items
Execution completed in 0.31 seconds
When I searched online, it turned out that this was a syntax issue where the “Field Names for Training Features” option was not filled up properly in the textbox (ie in the bolded text above, the correct syntax is that there’s supposed to be no commas in between the parameters, according to this previous forum post Correct format for 'field names for training features' using TrainVectorClassifier - #15 by joaonaime ). However, after OTB 8, this textbox has been replaced by a multi-select window, hence there is no way for me to ‘edit’ my syntax to address the error. What should I do in this situation?