Discussion:
[otb-users] automate classification
DIOUCK ABDOU
2018-08-12 18:35:08 UTC
Permalink
Do you already work on the automation of a classification of several files in a bach file? For example with boucle for.
--
--
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.
DIOUCK ABDOU
2018-08-20 08:26:23 UTC
Permalink
I have a batch script it works with a file but if I have several files it
stops

@ECHO off
SETLOCAL EnableDelayedExpansion

SET datajp2=D:\nantes\poststraitements\outif\test\
SET outjp2=D:\nantes\poststraitements\outif\classification\
SET otbcli=C:\OTB-6.4.0-Win64\bin\

FOR /F %%i IN ('DIR /B %datajp2%*.tif') DO (

SET infile=%%i
SET outfile=!infile:.tif=.tif!
%otbcli%otbcli_ImageClassifier.bat -in
D:\nantes\poststraitements\outif\test\%%i -model
D:/nantes/stats/svmModelQB1.txt -imstat
D:/nantes/stats/EstimateImageStatisticsQB1.xml -out
D:\nantes\poststraitements\outif\classification\!outfile! uint8 -ram 128



)



pause
pause
Post by DIOUCK ABDOU
Do you already work on the automation of a classification of several files
in a bach file? For example with boucle for.
--
--
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-08-21 14:54:51 UTC
Permalink
Hi,

what is the error message that you get when you launch the script on
multiple images? What is the error message
?
Looking at your script, it seems that you're using the same stats file
EstimateImageStatisticsQB1.xml
on all images. If you want to train a different SVM classifier on each
image you'll have to compute the stats on each images and train
An other option is to compute the stats on all images (the
ComputeImagesStatistics can take a list as input) and then train one model
using all the images and the output of ComputeImagesStatistics.

Manuel
Post by DIOUCK ABDOU
I have a batch script it works with a file but if I have several files it
stops
@ECHO off
SETLOCAL EnableDelayedExpansion
SET datajp2=D:\nantes\poststraitements\outif\test\
SET outjp2=D:\nantes\poststraitements\outif\classification\
SET otbcli=C:\OTB-6.4.0-Win64\bin\
FOR /F %%i IN ('DIR /B %datajp2%*.tif') DO (
SET infile=%%i
SET outfile=!infile:.tif=.tif!
%otbcli%otbcli_ImageClassifier.bat -in
D:\nantes\poststraitements\outif\test\%%i -model
D:/nantes/stats/svmModelQB1.txt -imstat
D:/nantes/stats/EstimateImageStatisticsQB1.xml -out
D:\nantes\poststraitements\outif\classification\!outfile! uint8 -ram 128
)
pause
pause
Post by DIOUCK ABDOU
Do you already work on the automation of a classification of several
files in a bach file? For example with boucle for.
--
--
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.
DIOUCK ABDOU
2018-08-22 14:46:58 UTC
Permalink
Hello, The problem is solved. Otherwise the file
EstimateImageStatisticsQB1.xml groups all the pixels of all the images.
Thank you
Post by DIOUCK ABDOU
Do you already work on the automation of a classification of several files
in a bach file? For example with boucle for.
--
--
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...