Spaces:
Sleeping

sirimiri commited on
Commit
96d1eae
·
1 Parent(s): dd132e1

det: fix the orientation scorer so rotated pages actually get flipped

Browse files

The score used the space-fixer vocab, which accepts junk syllables, so rec v11
garbage matched at rate 1.000 and the score collapsed to text length; a
180-flipped read is only ~17% shorter and never cleared the 1.25x margin.
Score with ViLM.lm_score instead (syllable bigrams put correct reads at -1.4
and flipped ones at -4.5), and let the fast-path gate measure the same joined
string it scores. 15/15 rotated cases now read like upright ones (90 deg:
91-100% -> 2.4-5.6% CER); 0 of 15 upright images change. On by default.

4 files changed +159 -25
Files changed (4)
api.py+17-7
docs/PIPELINE.md+48
tests/bench/run_bench.py+46-6
vocr_pipeline.py+48-12