salarymakage commited on
Commit Β·
b7254f3
1
Parent(s): a0e8b0d
Train with 90k images
Browse files- README.md +12 -12
- best.pt +0 -3
- model.onnx +1 -1
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
# Model
|
| 2 |
|
| 3 |
-
This directory contains a **lightweight** version of the **ThaoNet** recognition model, trained on approximately **
|
| 4 |
|
| 5 |
## Model Architecture (`model-small`)
|
| 6 |
|
|
@@ -15,7 +15,7 @@ This model uses the **ThaoNet-Small** architecture, optimized for speed and low
|
|
| 15 |
|
| 16 |
## File Structure
|
| 17 |
```
|
| 18 |
-
|
| 19 |
βββ model.safetensors # PyTorch weights (SafeTensors format)
|
| 20 |
βββ model.onnx # Exported ONNX model
|
| 21 |
βββ config.yml # Model configuration
|
|
@@ -30,8 +30,8 @@ model9k/
|
|
| 30 |
|
| 31 |
```bash
|
| 32 |
python tools/export/predict.py \
|
| 33 |
-
--onnx
|
| 34 |
-
--vocab
|
| 35 |
--image path/to/image.png \
|
| 36 |
--height 32
|
| 37 |
```
|
|
@@ -41,13 +41,13 @@ python tools/export/predict.py \
|
|
| 41 |
|
| 42 |
```python
|
| 43 |
from safetensors.torch import load_file
|
| 44 |
-
state_dict = load_file("
|
| 45 |
# load into model...
|
| 46 |
```
|
| 47 |
|
| 48 |
-
### 3. Performance &
|
| 49 |
-
* **Training Data**:
|
| 50 |
-
* **CER (Character Error Rate)**: ~
|
| 51 |
-
* **WER (Word Error Rate)**: ~
|
| 52 |
-
* **
|
| 53 |
-
* **
|
|
|
|
| 1 |
+
# Model 90k (Small-90k)
|
| 2 |
|
| 3 |
+
This directory contains a **lightweight** version of the **ThaoNet** recognition model, trained on approximately **90,000** samples (Khmer script).
|
| 4 |
|
| 5 |
## Model Architecture (`model-small`)
|
| 6 |
|
|
|
|
| 15 |
|
| 16 |
## File Structure
|
| 17 |
```
|
| 18 |
+
model90k/
|
| 19 |
βββ model.safetensors # PyTorch weights (SafeTensors format)
|
| 20 |
βββ model.onnx # Exported ONNX model
|
| 21 |
βββ config.yml # Model configuration
|
|
|
|
| 30 |
|
| 31 |
```bash
|
| 32 |
python tools/export/predict.py \
|
| 33 |
+
--onnx model90k/model.onnx \
|
| 34 |
+
--vocab model90k/model_vocab.json \
|
| 35 |
--image path/to/image.png \
|
| 36 |
--height 32
|
| 37 |
```
|
|
|
|
| 41 |
|
| 42 |
```python
|
| 43 |
from safetensors.torch import load_file
|
| 44 |
+
state_dict = load_file("model90k/model.safetensors")
|
| 45 |
# load into model...
|
| 46 |
```
|
| 47 |
|
| 48 |
+
### 3. Performance & Metrics
|
| 49 |
+
* **Training Data**: 90,000 (90k) synthetic Khmer text line images.
|
| 50 |
+
* **CER (Character Error Rate)**: ~5-8% (Estimated on diverse data).
|
| 51 |
+
* **WER (Word Error Rate)**: ~15-20%.
|
| 52 |
+
* **Accuracy**: Significantly better generalization than `model9k` (trained on 10x more data).
|
| 53 |
+
* **Speed**: Same as model9k (~2-3x faster than base).
|
best.pt
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9f2b226a987bc6beb747481cfdb53ea6c654b8704dc8ffac72d9c29b7c9f0598
|
| 3 |
-
size 17638533
|
|
|
|
|
|
|
|
|
|
|
|
model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6596604
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b4c290885613e08eedb1b39425b6027d7d7377bdf70fe2c5c0202fb971a6eb9
|
| 3 |
size 6596604
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6550612
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5910c9abe0059f19157aafe6b76111d9bd110fed1a6dbdbe14ac05c424d0c535
|
| 3 |
size 6550612
|