From 796188072ad6386417ebb4d9ce6958f47308cbec Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 11 Sep 2015 13:30:05 +0100 Subject: [PATCH] Set default exposure settings for grc training --- training/language-specific.sh | 6 +++++- training/tesstrain_utils.sh | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/training/language-specific.sh b/training/language-specific.sh index f895fcaa..bc16fe50 100755 --- a/training/language-specific.sh +++ b/training/language-specific.sh @@ -1068,6 +1068,7 @@ set_lang_specific_parameters() { WORD_DAWG_FACTOR=0.08 test -z "$FONTS" && FONTS=( "${GREEK_FONTS[@]}" ) ;; grc ) + test -z "$EXPOSURES" && EXPOSURES="-3 -2 -1 0 1 2 3" test -z "$FONTS" && FONTS=( "${ANCIENT_GREEK_FONTS[@]}" ) ;; hye ) test -z "$FONTS" && FONTS=( "${ARMENIAN_FONTS[@]}" ) ;; iku ) test -z "$FONTS" && FONTS=( "${NORTH_AMERICAN_ABORIGINAL_FONTS[@]}" ) ;; @@ -1087,7 +1088,10 @@ set_lang_specific_parameters() { TRAINING_DATA_ARGUMENTS+=" --mean_count=${MEAN_COUNT}" fi # Default to Latin fonts if none have been set - test -z "$FONTS" && test -z "$FONTS" && FONTS=( "${LATIN_FONTS[@]}" ) + test -z "$FONTS" && FONTS=( "${LATIN_FONTS[@]}" ) + + # Default to 0 exposure if it hasn't been set + test -z "$EXPOSURES" && EXPOSURES=0 } #============================================================================= diff --git a/training/tesstrain_utils.sh b/training/tesstrain_utils.sh index 30006bc1..6246a488 100755 --- a/training/tesstrain_utils.sh +++ b/training/tesstrain_utils.sh @@ -26,7 +26,6 @@ OVERWRITE=0 RUN_SHAPE_CLUSTERING=0 EXTRACT_FONT_PROPERTIES=1 WORKSPACE_DIR=`mktemp -d` -EXPOSURES=0 # Logging helper functions. tlog() {