Update README.md
Browse files
README.md
CHANGED
|
@@ -1,51 +1,50 @@
|
|
| 1 |
# CrossLing-OCR-Mini
|
| 2 |
|
| 3 |
-
🚀 **CrossLing-OCR-Mini** is a lightweight
|
| 4 |
-
The model
|
| 5 |
|
| 6 |
---
|
| 7 |
|
| 8 |
-
##
|
| 9 |
|
| 10 |
-
CrossLing-OCR-Mini
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
- Lightweight (~580MB) and
|
| 16 |
-
- Designed for research and benchmarking
|
| 17 |
|
| 18 |
-
### Supported
|
| 19 |
-
- High-resource
|
| 20 |
-
- Low-resource (specially optimized)
|
| 21 |
**Tibetan, Mongolian, Kazakh, Kyrgyz, Zhuang**
|
| 22 |
-
|
| 23 |
-
Experimental results show that CrossLing-OCR-Mini **outperforms or matches mainstream OCR systems** on multiple low-resource languages.
|
| 24 |
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
You can easily perform inference with CrossLing-OCR-Mini using the 🤗 Transformers library.
|
| 29 |
-
The following example demonstrates a simple OCR inference pipeline on a single image.
|
| 30 |
-
|
| 31 |
-
🔧 Requirements
|
| 32 |
|
| 33 |
-
|
| 34 |
|
| 35 |
-
|
|
|
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
```
|
| 40 |
pip install -U transformers accelerate
|
| 41 |
-
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
|
|
|
| 45 |
from transformers import AutoModel, AutoTokenizer
|
| 46 |
-
import os
|
| 47 |
|
| 48 |
-
#
|
| 49 |
model_id = "NCUTNLP/CrossLing-OCR-Mini"
|
| 50 |
|
| 51 |
# Load tokenizer and model
|
|
@@ -65,7 +64,7 @@ model = AutoModel.from_pretrained(
|
|
| 65 |
|
| 66 |
model = model.eval().cuda()
|
| 67 |
|
| 68 |
-
# Input image
|
| 69 |
image_file = "test.png"
|
| 70 |
|
| 71 |
# Perform plain text OCR
|
|
@@ -79,67 +78,94 @@ print("Predicted OCR result:\n")
|
|
| 79 |
print(result)
|
| 80 |
```
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
---
|
| 83 |
|
| 84 |
-
##
|
|
|
|
|
|
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
- Performance may degrade in extremely noisy, handwritten, or out-of-distribution scenarios
|
| 89 |
|
| 90 |
-
These
|
| 91 |
|
| 92 |
---
|
| 93 |
|
| 94 |
-
##
|
| 95 |
|
| 96 |
-
| Version
|
| 97 |
-
|
| 98 |
-
| **CrossLing-OCR-Mini**
|
| 99 |
| **CrossLing-OCR-Pro-Preview** | Commercial / production use | ���� Contact required |
|
| 100 |
|
| 101 |
-
📩 For access to **CrossLing-OCR-Pro-Preview**, please contact:
|
| 102 |
-
**zhumx@ncut.edu.cn
|
| 103 |
|
|
|
|
| 104 |
|
| 105 |
-
**
|
| 110 |
|
| 111 |
+
The performance differences between the Mini and Pro-Preview versions are illustrated below.
|
| 112 |
|
| 113 |
+

|
| 114 |
|
| 115 |
---
|
| 116 |
|
| 117 |
+
## 5. Intended Use
|
| 118 |
|
| 119 |
+
This model is **strictly intended for**:
|
| 120 |
+
|
| 121 |
+
* Academic research
|
| 122 |
+
* Scientific experimentation
|
| 123 |
+
* OCR benchmarking and method comparison
|
| 124 |
+
* Low-resource language OCR studies
|
| 125 |
|
| 126 |
---
|
| 127 |
|
| 128 |
+
## 6. Prohibited Use & Disclaimer
|
| 129 |
|
| 130 |
This model **must not be used** for:
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
+
* Any illegal or unlawful activities
|
| 133 |
+
* Applications violating social ethics, public order, or applicable laws
|
| 134 |
+
* Surveillance, discrimination, or harmful automated decision-making
|
| 135 |
+
|
| 136 |
+
**Disclaimer**:
|
| 137 |
+
|
| 138 |
+
* Any misuse of this model is **solely the responsibility of the user**
|
| 139 |
+
* The authors and maintainers **do not endorse** and **are not liable for** any consequences arising from improper or malicious use
|
| 140 |
+
* Outputs generated by this model **do not represent the views or positions of the authors**
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
## 7. Ethical Considerations & Bias
|
| 145 |
+
|
| 146 |
+
CrossLing-OCR-Mini is developed to support research on **low-resource and underrepresented languages**.
|
| 147 |
+
However, like all OCR systems, the model may reflect biases present in its training data, including:
|
| 148 |
+
|
| 149 |
+
* Uneven performance across languages and scripts
|
| 150 |
+
* Sensitivity to document quality, typography, and layout styles
|
| 151 |
+
|
| 152 |
+
Users are encouraged to:
|
| 153 |
+
|
| 154 |
+
* Carefully evaluate outputs before downstream use
|
| 155 |
+
* Avoid deploying the model in high-risk or sensitive decision-making scenarios
|
| 156 |
|
| 157 |
---
|
| 158 |
|
| 159 |
+
## 8. License
|
| 160 |
|
| 161 |
+
This model is released **for research purposes only**.
|
| 162 |
Commercial use is **not permitted** without explicit authorization.
|
| 163 |
|
| 164 |
+
For commercial licensing or extended usage, please contact the authors.
|
| 165 |
|
| 166 |
---
|
| 167 |
|
| 168 |
+
## 9. Citation
|
| 169 |
|
| 170 |
If you use CrossLing-OCR-Mini in your research, please cite:
|
| 171 |
|
|
|
|
| 176 |
year = {2025},
|
| 177 |
note = {Research-only OCR model}
|
| 178 |
}
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
---
|
| 182 |
+
|
| 183 |
+
## 10. Contact
|
| 184 |
+
|
| 185 |
+
For questions, collaboration, or commercial inquiries:
|
| 186 |
+
|
| 187 |
+
📧 **[zhumx@ncut.edu.cn](mailto:zhumx@ncut.edu.cn)**
|
| 188 |
+
|
| 189 |
+
---
|
| 190 |
+
|
| 191 |
+
## 11. Acknowledgement
|
| 192 |
+
|
| 193 |
+
This project aims to advance **low-resource multilingual OCR research** and contribute to the accessibility of underrepresented languages in the global AI ecosystem.
|
| 194 |
+
|
| 195 |
+
```
|