Context
Hello, I am trying to train a classifier using the TrainImagesClassifier to be able to classify trees in an orthophoto. But when I run the training algorithm I don’t get any feedback. It would be nice to know the number of learning cycles it has done and its current performance. With this information I would know that something is happening and I am not wasting a few days running a script that is stuck on something.
My question: Is there a way to get the feedback I need - current and goal classifier performance and learning cycle?
Maybe by running the algorithm using Python API, and not from the QGIS GUI?
Configuration setup
My system: Windows10
Version of the OTB: 9.1.0
I installed the OTB with: QGIS
Description of my issue
I am running the algorithm TrainImagesClassifier through QGIS GUI with these params:
{
"io.il": [
"D:/path/to/project/ai_orthophoto_tree_localization/cropped_orthophoto.tif"
],
"io.vd": [
"D:/path/to/project/ai_orthophoto_tree_localization/classification_training.shp"
],
"io.valid": [
"D:/path/to/project/ai_orthophoto_tree_localization/validation_shape.shp"
],
"io.imstat": "D:\\path\\to\\project\\ai_orthophoto_tree_localization\\ai\\statistics.xml",
"io.out": "D:/path/to/project/ai_orthophoto_tree_localization/ai/output/model.model",
"io.confmatout": "D:/path/to/project/ai_orthophoto_tree_localization/ai/output/conf_mat.csv",
"cleanup": True,
"sample.mt": 1000,
"sample.mv": 1000,
"sample.bm": 1,
"sample.vtr": 0.5,
"sample.vfn": "id",
"elev.dem": "",
"elev.geoid": "",
"elev.default": 0,
"classifier": "libsvm",
"classifier.libsvm.k": "linear",
"classifier.libsvm.m": "csvc",
"classifier.libsvm.c": 1,
"classifier.libsvm.gamma": 1,
"classifier.libsvm.coef0": 0,
"classifier.libsvm.degree": 3,
"classifier.libsvm.nu": 0.5,
"classifier.libsvm.opt": False,
"classifier.libsvm.prob": False,
"rand": 0,
}
I have let the training run for two days without it finishing. The CPU usage was just 30%, and RAM around 350 MB the whole time - except for the beginning when I am guessing it was preparing the inputs.
I know the the TrainImagesClassifier is working when I gave it a black and white image, and made it classify white as 0, and black as 1 (I used the same params as shown above), it finished faster and it gave me the model.
Thank you for your time and help!