mrrtmob commited on
Commit
58eb328
·
verified ·
1 Parent(s): 52cfe14

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +42 -12
README.md CHANGED
@@ -6,34 +6,64 @@ tags:
6
  - ocr
7
  - pytorch
8
  - handwritten
9
- license: mit
10
  datasets:
11
  - mrrtmob/km_en_image_line
12
  ---
13
 
14
  # Kiri OCR Model
15
 
16
- This is a lightweight OCR model for Kiri OCR, capable of recognizing English and Khmer text.
17
- Trained on the [mrrtmob/km_en_image_line](https://huggingface.co/datasets/mrrtmob/km_en_image_line) dataset.
18
 
19
- ## Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  ```python
22
- from kiri_ocr.core import OCR
23
 
24
- # Load from Hugging Face
25
- ocr = OCR(model_path="mrrtmob/kiri-ocr")
26
 
27
  # Extract text
28
- text, results = ocr.extract_text("path/to/image.jpg")
29
  print(text)
30
  ```
31
 
 
 
 
 
 
 
32
  ## Model Details
33
- - Architecture: CRNN (CNN + LSTM + CTC)
34
- - Framework: PyTorch
35
- - Input Size: Height 32px (width variable)
 
 
 
 
36
 
37
- ## Benchmarks
38
  ![benchmark_table.png](benchmark_table.png)
 
39
  ![benchmark_graph.png](benchmark_graph.png)
 
 
6
  - ocr
7
  - pytorch
8
  - handwritten
9
+ license: apache-2.0
10
  datasets:
11
  - mrrtmob/km_en_image_line
12
  ---
13
 
14
  # Kiri OCR Model
15
 
16
+ **Kiri OCR** is a lightweight, OCR library for **English and Khmer** documents. It provides document-level text detection, recognition, and rendering capabilities in a compact package (~13MB model).
 
17
 
18
+ ## ✨ Key Features
19
+
20
+ - **Lightweight**: Only ~13MB model size (Lite version).
21
+ - **Bi-lingual**: Native support for English and Khmer (and mixed).
22
+ - **Document Processing**: Automatic text line and word detection.
23
+ - **Robust Detection**: Works on both light and dark backgrounds (Dark Mode support).
24
+ - **Visualizations**: Generate annotated images and HTML reports.
25
+
26
+ ## 📊 Dataset
27
+
28
+ The model is trained on the [mrrtmob/km_en_image_line](https://huggingface.co/datasets/mrrtmob/km_en_image_line) dataset, which contains **5 million** synthetic images of Khmer and English text lines.
29
+
30
+ ## 💻 Usage
31
+
32
+ ### Installation
33
+
34
+ ```bash
35
+ pip install kiri-ocr
36
+ ```
37
+
38
+ ### Python API
39
 
40
  ```python
41
+ from kiri_ocr import OCR
42
 
43
+ # Initialize (loads from Hugging Face automatically)
44
+ ocr = OCR()
45
 
46
  # Extract text
47
+ text, results = ocr.extract_text('document.jpg')
48
  print(text)
49
  ```
50
 
51
+ ### CLI Tool
52
+
53
+ ```bash
54
+ kiri-ocr predict path/to/document.jpg --output results/
55
+ ```
56
+
57
  ## Model Details
58
+ - **Architecture**: CRNN (CNN + LSTM + CTC)
59
+ - **Framework**: PyTorch
60
+ - **Input Size**: Height 32px (width variable)
61
+
62
+ ## 📈 Benchmarks
63
+
64
+ Results on synthetic test images (10 popular fonts):
65
 
 
66
  ![benchmark_table.png](benchmark_table.png)
67
+
68
  ![benchmark_graph.png](benchmark_graph.png)
69
+