cstr commited on
Commit
ba808dd
·
verified ·
1 Parent(s): c0b8c45

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +68 -0
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - gguf
5
+ - ocr
6
+ - scene-text
7
+ - parseq
8
+ - crispembed
9
+ base_model: baudm/parseq
10
+ ---
11
+
12
+ # PARSeq — Scene Text Recognition (GGUF)
13
+
14
+ GGUF conversions of [PARSeq](https://github.com/baudm/parseq) (ECCV 2022) for use with [CrispEmbed](https://github.com/CrispStrobe/CrispEmbed).
15
+
16
+ PARSeq is a scene text recognition model that reads text from natural images (signs, labels, documents). It recognizes 94 printable ASCII characters (digits, letters, punctuation).
17
+
18
+ ## Architecture
19
+
20
+ - **Encoder**: 12-layer pre-LN ViT (patch 4×8, input 32×128 RGB, 128 tokens, GELU FFN)
21
+ - **Decoder**: 1-layer two-stream Transformer (XLNet-style position queries + context self-attention, then cross-attention to encoder memory)
22
+ - **Head**: Linear → 95 classes (94 printable ASCII chars + EOS)
23
+ - **Inference**: Autoregressive greedy decode (max 25 characters)
24
+
25
+ ## Variants
26
+
27
+ | File | Variant | Params | Size | Notes |
28
+ |------|---------|--------|------|-------|
29
+ | `parseq-f32.gguf` | Base | 24M | 91 MB | Full precision |
30
+ | `parseq-q8_0.gguf` | Base | 24M | 24 MB | Best quantized |
31
+ | `parseq-q4_k.gguf` | Base | 24M | 13 MB | Smallest base |
32
+ | `parseq-tiny-f16.gguf` | Tiny | 6M | 12 MB | Half precision |
33
+ | `parseq-tiny-q8_0.gguf` | Tiny | 6M | 6 MB | Smallest overall |
34
+
35
+ All quantization levels produce identical output on test images.
36
+
37
+ ## Usage
38
+
39
+ ```bash
40
+ # CLI
41
+ crispembed -m parseq-q8_0.gguf --ocr image.png
42
+
43
+ # Auto-download
44
+ crispembed -m parseq --auto-download --ocr image.png
45
+ ```
46
+
47
+ ```python
48
+ from crispembed import CrispMathOcr
49
+ ocr = CrispMathOcr("parseq-q8_0.gguf")
50
+ text = ocr.recognize("sign.png")
51
+ ```
52
+
53
+ ## Benchmark (94-char, PARSeq-base)
54
+
55
+ | Dataset | Accuracy |
56
+ |---------|----------|
57
+ | IIIT5k | 99.1% |
58
+ | SVT | 97.9% |
59
+ | IC13-1015 | 98.1% |
60
+ | IC15-2077 | 89.2% |
61
+ | SVTP | 96.9% |
62
+ | CUTE80 | 98.6% |
63
+
64
+ ## Source
65
+
66
+ - Paper: [Scene Text Recognition with Permuted Autoregressive Sequence Models](https://arxiv.org/abs/2207.06966) (ECCV 2022)
67
+ - Code: [baudm/parseq](https://github.com/baudm/parseq) (Apache-2.0)
68
+ - Converted with `models/convert-parseq-to-gguf.py` from CrispEmbed