nathansut1 commited on
Commit
8dfebfa
·
verified ·
1 Parent(s): 1b5db69

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +13 -2
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  # SBB Binarization — ONNX Model
2
 
3
  ONNX conversion of [SBB/sbb_binarization](https://huggingface.co/SBB/sbb_binarization) by the Berlin State Library (Staatsbibliothek zu Berlin), developed as part of the [QURATOR](https://qurator.ai/) project.
@@ -23,8 +34,8 @@ python3 sample_workflow.py input.jpg output.tif
23
  The original TF model doesn't convert cleanly to ONNX for TensorRT. Three things needed fixing:
24
 
25
  1. **Reshape batch dimension** — tf2onnx hardcoded -2048 instead of -1 for dynamic batching
26
- 2. **Resize node attributes** — TF-specific modes (`tf_half_pixel_for_nn`, `floor`) that TensorRT doesn't support, swapped to standard ONNX equivalents
27
- 3. **Resize → ConvTranspose** — replaced nearest-neighbor upsampling with equivalent depthwise ConvTranspose ops so TensorRT can compile the model as a single subgraph instead of splitting it into 8+ pieces
28
 
29
  All of this is in `fix_onnx.py`. To reproduce from scratch:
30
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: SBB/sbb_binarization
4
+ tags:
5
+ - document-binarization
6
+ - onnx
7
+ - tensorrt
8
+ - ocr
9
+ library_name: onnxruntime
10
+ ---
11
+
12
  # SBB Binarization — ONNX Model
13
 
14
  ONNX conversion of [SBB/sbb_binarization](https://huggingface.co/SBB/sbb_binarization) by the Berlin State Library (Staatsbibliothek zu Berlin), developed as part of the [QURATOR](https://qurator.ai/) project.
 
34
  The original TF model doesn't convert cleanly to ONNX for TensorRT. Three things needed fixing:
35
 
36
  1. **Reshape batch dimension** — tf2onnx hardcoded -2048 instead of -1 for dynamic batching
37
+ 2. **Resize node attributes** — TF-specific modes that TensorRT doesn't support, swapped to standard ONNX equivalents
38
+ 3. **Resize to ConvTranspose** — replaced nearest-neighbor upsampling with equivalent depthwise ConvTranspose ops so TensorRT can compile the model as a single subgraph instead of splitting it into 8+ pieces
39
 
40
  All of this is in `fix_onnx.py`. To reproduce from scratch:
41