Closed GoogleCodeExporter closed 9 years ago
There appears to be no documentation for classifier_tester, not even a minimal
man page in the doc directory. So your only recourse is to consult the source.
From classifier_tester.cpp:
// This program has complex setup requirements, so here is some help:
// Two different modes, tr files and serialized mastertrainer.
// From tr files:
// classifier_tester -U unicharset -F font_properties -X xheights
// -classifier x -lang lang [-output_trainer trainer] *.tr
// From a serialized trainer:
// classifier_tester -input_trainer trainer [-lang lang] -classifier x
//
// In the first case, the unicharset must be the unicharset from within
// the classifier under test, and the font_properties and xheights files must
// match the files used during training.
// In the second case, the trainer file must have been prepared from
// some previous run of shapeclustering, mftraining, or classifier_tester
// using the same conditions as above, ie matching unicharset/font_properties.
//
// Available values of classifier (x above) are:
// pruner : Tesseract class pruner only.
// full : Tesseract full classifier.
// cube : Cube classifier. (Not possible with an input trainer.)
// cubetess : Tesseract class pruner with rescoring by Cube. (Not possible
// with an input trainer.)
Original comment by tomp2...@gmail.com
on 20 Feb 2012 at 8:39
create config file e.g. "classifier.conf" and put there these lines:
FLAGS_classifier pruner
FLAGS_lang lang1
where "pruner" is desired classifier and lang1 is existing language (e.g. there
is file lang1.traineddata... You can skip FLAGS_lang part or also use
FLAGS_tessdata_dir for pointing to tessdata dir...
Than you can run:
classifier_tester.exe -S shapetable -F font_properties -U unicharset -c
classifier.conf eng.arial.eurotext.tr
Original comment by zde...@gmail.com
on 30 Jul 2012 at 9:49
[deleted comment]
Created config file and saved as "classifier.conf" contains as follow:
FLAGS_classifier pruner
FLAGS_lang lang1
Placed the above said config file in the folder where all exe
files/tessdata folder are existed.
Extract of cmd reproduced below:
M:\rao-files\chilume\test-3.02>classifier_tester.exe -S shapetable -F font_prope
rties -U unicharset -c classifier.conf eng.arial.eurotext.tr
read_params_file: *parameter not found:*
M:\rao-files\chilume\test-3.02>
From the classifier.conf file deleted 2nd line "FLAGS_lang lang1"
still same display occured in the cmd.exe.
Where I made a mistake?
Original comment by withbles...@gmail.com
on 1 Aug 2012 at 11:11
place classifier.conf to M:\rao-files\chilume\test-3.02> and run (in
M:\rao-files\chilume\test-3.02>):
classifier_tester.exe -c classifier.conf
Original comment by zde...@gmail.com
on 1 Aug 2012 at 2:36
If you get error "Invalid classifier name:pruner" make sure that you use UNIX
end of line...
Original comment by zde...@gmail.com
on 1 Aug 2012 at 2:41
noted.Again tested - extract of CMD is reproduced below -WinXP(sp3)
Copied "FLAGS_classifier pruner" and pasted in classifie.conf file (attached
file).
M:\rao-files\chilume\test-3.02>classifier_tester.exe -c classifier.conf
read_params_file: parameter not found:
M:\rao-files\chilume\test-3.02>
I did not get error "Invalid classifier name:pruner" instead "read_params_file:
parameter not found:" was displayed in the CMD.
Original comment by withbles...@gmail.com
on 1 Aug 2012 at 4:33
Attachments:
but your classifier.conf is wrong (DOS\windows end of line...)
Original comment by zde...@gmail.com
on 1 Aug 2012 at 6:15
Attachments:
using classifier.conf attached to comment 8 tested.
Extract of cmd is reproduced below for your information.
M:\rao-files\chilume\test-3.02>classifier_tester.exe -c classifier.conf eng.aria
l.eurotext.tr
Failed to load unicharset from file unicharset
Building unicharset for training from scratch...
Failed to load unicharset from file unicharset
Building unicharset for boosting from scratch...
Failed to load unicharset from file unicharset
Building unicharset for boosting from scratch...
Failed to load unicharset from file unicharset
Building unicharset for boosting from scratch...
Reading eng.arial.eurotext.tr ...
Moving 350 junk samples to master sample set.
Testing classifier pruner:
Iterator has charset size of 3519/3519, 3519 shapes, 0 samples
Testing NON-REPLICATED:
Errors computed in 0.00s at -1.$ ╬╝s/char
Iterator has charset size of 3519/3519, 3519 shapes, 0 samples
Testing REPLICATED:
Errors computed in 0.00s at -1.$ ╬╝s/char
M:\rao-files\chilume\test-3.02>
IInd test= In the classifier.conf file added "debug_file classifer.log
then saved again run in cmd. extract of cmd is reproduced below:
M:\rao-files\chilume\test-3.02>classifier_tester.exe -c classifier.conf eng.aria
l.eurotext.tr
M:\rao-files\chilume\test-3.02>
clssifier.log is attached for ready reference.
Original comment by withbles...@gmail.com
on 2 Aug 2012 at 7:47
Attachments:
Thanks for the attached file. Now understand my mistake.
Original comment by withbles...@gmail.com
on 2 Aug 2012 at 8:00
Original comment by zde...@gmail.com
on 2 Aug 2012 at 10:46
Original issue reported on code.google.com by
withbles...@gmail.com
on 18 Feb 2012 at 3:10