@@ -28,7 +28,15 @@ echo -e "USAGE: tesstrain.sh
28
28
--run_shape_clustering # Run shape clustering (use for Indic langs).
29
29
--maxpages # Specify maximum pages to output (default:0=all)
30
30
--save_box_tiff # Save box/tiff pairs along with lstmf files.
31
+ <<<<<<< HEAD
31
32
--x_size # Specify width of output image (default:3600)
33
+ =======
34
+ --xsize # Specify width of output image (default:3600)
35
+
36
+ OPTIONAL flag for specifying directory with user specified box/tiff pairs.
37
+ Files should be named similar to ${LANG_CODE} .${fontname} .exp${EXPOSURE} .box/tif
38
+ --my_boxtiff_dir MY_BOXTIFF_DIR # Location of user specified box/tiff files.
39
+ >>>>>>> c7cd112... allow box/tiff pairs for LSTM training
32
40
33
41
OPTIONAL flags for input data. If unspecified we will look for them in
34
42
the langdata_dir directory.
@@ -60,6 +68,14 @@ ARGV=("$@")
60
68
parse_flags
61
69
62
70
mkdir -p ${TRAINING_DIR}
71
+
72
+ if [[ ${MY_BOXTIFF_DIR} != " " ]]; then
73
+ tlog " \n=== Copy existing box/tiff pairs from '${MY_BOXTIFF_DIR} '"
74
+ cp ${MY_BOXTIFF_DIR} /* .box ${TRAINING_DIR} | true
75
+ cp ${MY_BOXTIFF_DIR} /* .tif ${TRAINING_DIR} | true
76
+ ls -l ${TRAINING_DIR}
77
+ fi
78
+
63
79
tlog " \n=== Starting training for language '${LANG_CODE} '"
64
80
65
81
source " $( dirname $0 ) /language-specific.sh"
@@ -72,8 +88,8 @@ phase_UP_generate_unicharset
72
88
if (( LINEDATA)) ; then
73
89
phase_E_extract_features " --psm 6 lstm.train " 8 " lstmf"
74
90
make__lstmdata
75
- tlog " \nCreated starter traineddata for language '${LANG_CODE} '\n"
76
- tlog " \nRun lstmtraining to do the LSTM training for language '${LANG_CODE} '\n"
91
+ tlog " \nCreated starter traineddata for LSTM training of language '${LANG_CODE} '\n"
92
+ tlog " \nRun ' lstmtraining' comman next to continue LSTM training for language '${LANG_CODE} '\n"
77
93
else
78
94
phase_D_generate_dawg
79
95
phase_E_extract_features " box.train" 8 " tr"
0 commit comments