Image-to-Text
Transformers
Safetensors
falcon_ocr
text-generation
falcon
ocr
vision-language
document-understanding
custom_code
Eval Results
Instructions to use tiiuae/Falcon-OCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiiuae/Falcon-OCR with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="tiiuae/Falcon-OCR", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("tiiuae/Falcon-OCR", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add updated images
#4
by wamreyaz - opened
README.md
CHANGED
|
@@ -42,6 +42,9 @@ print(texts[0])
|
|
| 42 |
|
| 43 |
> The first `generate()` call is slower due to `torch.compile` building optimized kernels. Subsequent calls are much faster.
|
| 44 |
|
|
|
|
|
|
|
|
|
|
| 45 |
## Categories
|
| 46 |
|
| 47 |
By default, category is `"plain"` (general text extraction). You can specify a category to use a task-specific prompt:
|
|
@@ -97,21 +100,34 @@ for det in results[0]:
|
|
| 97 |
```
|
| 98 |
|
| 99 |
## Capabilities
|
| 100 |
-
### Handwriting
|
| 101 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/62fe441427c98b09b503a4e3/zX9GbTqZ2Jbazey4AOBGH.png" width="600" />
|
| 102 |
|
| 103 |
-
### Real
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
### Tables
|
| 107 |
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
|
| 110 |
### Complex Layout
|
| 111 |
|
| 112 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/62fe441427c98b09b503a4e3/iGCYI2y1eaCj1wMHrmNds.png" width="600" />
|
| 113 |
|
| 114 |
-
<!--  -->
|
| 107 |
+
|
| 108 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/62fe441427c98b09b503a4e3/ySAuT6k3_0s5fJ29FaQYe.png" width="600" />
|
| 109 |
+
|
| 110 |
|
| 111 |
### Tables
|
| 112 |
|
| 113 |
+
|
| 114 |
+
<!--  -->
|
| 115 |
+
|
| 116 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/62fe441427c98b09b503a4e3/2yZjZJAEHVVpd_jfyyDcQ.png" width="600" />
|
| 117 |
+
|
| 118 |
+
### Formulas
|
| 119 |
+
|
| 120 |
+
<!--  -->
|
| 121 |
+
|
| 122 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/62fe441427c98b09b503a4e3/__XMb0GyGO02IPKlQsPQx.png" width="600" />
|
| 123 |
|
| 124 |
### Complex Layout
|
| 125 |
|
|
|
|
| 126 |
|
| 127 |
+
<!--  -->
|
| 128 |
+
|
| 129 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/62fe441427c98b09b503a4e3/kTR7nI7ogEqdI1SQtXpTu.png" width="600" />
|
| 130 |
+
|
| 131 |
|
| 132 |
## Citation
|
| 133 |
|