Spaces:
Sleeping
Sleeping
Commit History
-
Rework binarization methods: real tunable params, no silent fallbacks
The neural methods were thin wrappers over transformers pipeline("image-to-image") pointed at three nonexistent repos (WARAJA/Tzefa-Binarization, opensuh/DocumentBinarization, WARAJA/DocRes). Each load failed and silently fell back to Sauvola/Otsu, so the app ran classical thresholding under fake neural labels and exposed no tunable params for any model. - Classical suite with real params: Sauvola (window/k/r), Niblack (window/k), Otsu (+pre-blur), Adaptive Gaussian (block/C). - Tzefa b5: load WARAJA/b5_model directly via its HighResMAnet (smp MAnet + mit_b5), 640px tiled sigmoid -> threshold slider. Gated, needs HF_TOKEN. - SBB: SBB/sbb_binarization tf-keras SavedModel, patch-tiled prob map, threshold + invert. - No fallback: any load/run failure surfaces as gr.Error in the UI; never substitutes another method (the point is to see each model's real result). - Remove dead pipeline wrappers and fake model IDs. - requirements: drop transformers/torchaudio/pytesseract/einops; a…13c1c10