Discussion:
[otb-users] otbcli_TrainImagesClassifier
d***@gmail.com
2018-09-12 12:37:35 UTC
Permalink
Hi,

I have a problem with otbcli_TrainImagesClassifier.

I have 2 version of OTB installed :

- one is 5.10.1 delivered in binary package for ScientificLinux 7.2
- the other is the 6.7.0 build from source (Superbuild) yesterday

I launch this command to use a random forest classifier on my dataset :
numactl --cpunodebind=1 --membind=1 otbcli_TrainImagesClassifier -io.il ./9
_bands_2020200_ATTRIBUTES.tif -io.vd ./INPUT/9_bands_2020200_SAMPLES.shp -
sample.mv 10000 -sample.mt 10000 -sample.bm 0 -sample.vtr 0.5 -sample.vfn
class -classifier rf -rand 1 -io.out ./rfModel.txt -io.confmatout ./
rfConfusionMatrix.csv
(forget about numactl: not relevant here)


- when I use the 5.10.1 version, I got this error message :

2018 Sep 12 13:36:54 : Application.logger (INFO) Sampling rates...
2018 Sep 12 13:36:54 : Application.logger (FATAL)
2018 Sep 12 13:36:54 : Application.logger (FATAL) Missing arguments in
strategy.constant.nb to process sampling rates
2018 Sep 12 13:36:54 : Application.logger (FATAL) The following error
occurred during application execution :
/home/otbval/Dashboard/src/OTB/Modules/Applications/AppClassification/app/otbMultiIm
ageSamplingRate.cxx:250:
itk::ERROR: Fatal error caught. Aborting..

And when I try to pass the -strategy.constant.nb parameter, I get that :
ERROR: option -strategy.constant.nb does not exist in the application.


- when I use the 6.7.0 version, I got this message :

2018-09-12 13:49:36 (FATAL): itk::ERROR: ChoiceParameter(0x7e9980): Invalid
parameter value 'rf'
given for parameter '-classifier'

Did you remove the random forest algorithm from the classifier ?


I implement on a large computing facilities a code that have been tested
and implemented with the 5.2 version of OTB. But for example, the
otbcli_Segmentation function was not working properly with the 5.10.1
version, that is why I have compiled the last version from sources.

But I wonder how can I now which function works or not for different
versions as several working functions seems to be broken in further
versions ...

Have you something like a dashboard online where I could check
functionnalities and unit testes for each function of OTB for each version ?

Best regards,
David
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Manuel Grizonnet
2018-09-25 09:13:31 UTC
Permalink
Hi David,

let's try to debug the error with OTB 6.7. Indeed to use random forests
classifier the correct way to set it is with '-classifier rf' option. And
Random forests has not been removed in the last version and the way it is
set from the TrainImagesClassifier did not change neither. In this case the
random forests algorithm from opencv is used internally.

Can you run otbcli_TrainImagesClassifier without arguments to display the
application documentation and tell me what classifier are listed as
available in the documentation?

It can also be related to a configuration issue with the superbuild. Can
you check that you compile and install OpenCV with the superbuild?

Can you post your CMakeCache.txt file? and also the output of the OTB
configuration (you can find it in
superbuild_build_dir/OTB/src/OTB-stamp/OTB-configure-*.log?

Regarding OTB unit test, OTB is test on a nightly basis on Win/Linux/Mac.
The log from the tests are available publicly:

https://dash.orfeo-toolbox.org/index.php?project=OTB

I don't see currently issues with the TrainImagesClassifier but I perhaps
miss something (I've tested on my platform that the test related to random
forests currently passed).

Let's check your configuration and see
Post by d***@gmail.com
Hi,
I have a problem with otbcli_TrainImagesClassifier.
- one is 5.10.1 delivered in binary package for ScientificLinux 7.2
- the other is the 6.7.0 build from source (Superbuild) yesterday
numactl --cpunodebind=1 --membind=1 otbcli_TrainImagesClassifier -io.il ./
9_bands_2020200_ATTRIBUTES.tif -io.vd ./INPUT/9_bands_2020200_SAMPLES.shp
-sample.mv 10000 -sample.mt 10000 -sample.bm 0 -sample.vtr 0.5 -sample.vfn
class -classifier rf -rand 1 -io.out ./rfModel.txt -io.confmatout ./
rfConfusionMatrix.csv
(forget about numactl: not relevant here)
2018 Sep 12 13:36:54 : Application.logger (INFO) Sampling rates...
2018 Sep 12 13:36:54 : Application.logger (FATAL)
2018 Sep 12 13:36:54 : Application.logger (FATAL) Missing arguments in
strategy.constant.nb to process sampling rates
2018 Sep 12 13:36:54 : Application.logger (FATAL) The following error
/home/otbval/Dashboard/src/OTB/Modules/Applications/AppClassification/app/otbMultiIm
itk::ERROR: Fatal error caught. Aborting..
ERROR: option -strategy.constant.nb does not exist in the application.
Invalid parameter value 'rf'
given for parameter '-classifier'
Did you remove the random forest algorithm from the classifier ?
I implement on a large computing facilities a code that have been tested
and implemented with the 5.2 version of OTB. But for example, the
otbcli_Segmentation function was not working properly with the 5.10.1
version, that is why I have compiled the last version from sources.
But I wonder how can I now which function works or not for different
versions as several working functions seems to be broken in further
versions ...
Have you something like a dashboard online where I could check
functionnalities and unit testes for each function of OTB for each version ?
Best regards,
David
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
Manuel Grizonnet
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Manuel Grizonnet
2018-09-25 09:22:38 UTC
Permalink
Other idea,

can you test to add double quote around the class parameter -> -sample.vfn
"class" ?
Post by Manuel Grizonnet
Hi David,
let's try to debug the error with OTB 6.7. Indeed to use random forests
classifier the correct way to set it is with '-classifier rf' option. And
Random forests has not been removed in the last version and the way it is
set from the TrainImagesClassifier did not change neither. In this case the
random forests algorithm from opencv is used internally.
Can you run otbcli_TrainImagesClassifier without arguments to display the
application documentation and tell me what classifier are listed as
available in the documentation?
It can also be related to a configuration issue with the superbuild. Can
you check that you compile and install OpenCV with the superbuild?
Can you post your CMakeCache.txt file? and also the output of the OTB
configuration (you can find it in
superbuild_build_dir/OTB/src/OTB-stamp/OTB-configure-*.log?
Regarding OTB unit test, OTB is test on a nightly basis on Win/Linux/Mac.
https://dash.orfeo-toolbox.org/index.php?project=OTB
I don't see currently issues with the TrainImagesClassifier but I perhaps
miss something (I've tested on my platform that the test related to random
forests currently passed).
Let's check your configuration and see
Post by d***@gmail.com
Hi,
I have a problem with otbcli_TrainImagesClassifier.
- one is 5.10.1 delivered in binary package for ScientificLinux 7.2
- the other is the 6.7.0 build from source (Superbuild) yesterday
numactl --cpunodebind=1 --membind=1 otbcli_TrainImagesClassifier -io.il
./9_bands_2020200_ATTRIBUTES.tif -io.vd ./INPUT/9_bands_2020200_SAMPLES.shp
-sample.mv 10000 -sample.mt 10000 -sample.bm 0 -sample.vtr 0.5 -sample.vfn
class -classifier rf -rand 1 -io.out ./rfModel.txt -io.confmatout ./
rfConfusionMatrix.csv
(forget about numactl: not relevant here)
2018 Sep 12 13:36:54 : Application.logger (INFO) Sampling rates...
2018 Sep 12 13:36:54 : Application.logger (FATAL)
2018 Sep 12 13:36:54 : Application.logger (FATAL) Missing arguments in
strategy.constant.nb to process sampling rates
2018 Sep 12 13:36:54 : Application.logger (FATAL) The following error
/home/otbval/Dashboard/src/OTB/Modules/Applications/AppClassification/app/otbMultiIm
itk::ERROR: Fatal error caught. Aborting..
ERROR: option -strategy.constant.nb does not exist in the application.
Invalid parameter value 'rf'
given for parameter '-classifier'
Did you remove the random forest algorithm from the classifier ?
I implement on a large computing facilities a code that have been tested
and implemented with the 5.2 version of OTB. But for example, the
otbcli_Segmentation function was not working properly with the 5.10.1
version, that is why I have compiled the last version from sources.
But I wonder how can I now which function works or not for different
versions as several working functions seems to be broken in further
versions ...
Have you something like a dashboard online where I could check
functionnalities and unit testes for each function of OTB for each version ?
Best regards,
David
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
Manuel Grizonnet
--
Manuel Grizonnet
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...