Object Detection
Keras
Indonesian
ocr
receipt
yolov8
tensorflow
text-recognition
expense-classification
Instructions to use NeoCode77/notepay-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use NeoCode77/notepay-models with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://NeoCode77/notepay-models") - Notebooks
- Google Colab
- Kaggle
docs: update model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- ocr
|
| 5 |
+
- receipt
|
| 6 |
+
- object-detection
|
| 7 |
+
- yolov8
|
| 8 |
+
- tensorflow
|
| 9 |
+
- keras
|
| 10 |
+
- text-recognition
|
| 11 |
+
- expense-classification
|
| 12 |
+
language:
|
| 13 |
+
- id
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# NotePay — Receipt OCR Models
|
| 17 |
+
|
| 18 |
+
Model AI untuk pipeline OCR struk belanja otomatis.
|
| 19 |
+
Bagian dari project **NotePay** (Coding Camp 2026 — DBS Foundation).
|
| 20 |
+
|
| 21 |
+
## Pipeline
|
| 22 |
+
|
| 23 |
+
```
|
| 24 |
+
Foto Struk
|
| 25 |
+
→ [1] YOLOv8n-OBB : deteksi 4 region (nama_toko, line_item, tanggal_waktu, total_belanja)
|
| 26 |
+
→ [2] CRNN + CTC : text recognition per crop (TensorFlow/Keras)
|
| 27 |
+
→ [3] Classifier : klasifikasi kategori pengeluaran tiap line item
|
| 28 |
+
→ JSON terstruktur
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
## Model Files
|
| 32 |
+
|
| 33 |
+
| File | Deskripsi |
|
| 34 |
+
|---|---|
|
| 35 |
+
| `yolo/best.pt` | YOLOv8n-OBB — deteksi region struk |
|
| 36 |
+
| `crnn/inference_model.keras` | CRNN+CTC — baca teks dari crop |
|
| 37 |
+
| `classifier/classifier_model.keras` | Text classifier — kategori pengeluaran |
|
| 38 |
+
|
| 39 |
+
## Expense Categories (Classifier)
|
| 40 |
+
|
| 41 |
+
| ID | Kategori |
|
| 42 |
+
|---|---|
|
| 43 |
+
| 0 | Makanan & Minuman |
|
| 44 |
+
| 1 | Kebersihan & Perawatan |
|
| 45 |
+
| 2 | Rumah Tangga |
|
| 46 |
+
| 3 | Kesehatan & Farmasi |
|
| 47 |
+
| 4 | Elektronik & Pulsa |
|
| 48 |
+
| 5 | Pakaian & Aksesori |
|
| 49 |
+
| 6 | Lain-lain |
|
| 50 |
+
|
| 51 |
+
## Usage
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
from huggingface_hub import hf_hub_download
|
| 55 |
+
|
| 56 |
+
# Download semua model
|
| 57 |
+
yolo_path = hf_hub_download("NeoCode77/notepay-models", "yolo/best.pt")
|
| 58 |
+
crnn_path = hf_hub_download("NeoCode77/notepay-models", "crnn/inference_model.keras")
|
| 59 |
+
classifier_path = hf_hub_download("NeoCode77/notepay-models", "classifier/classifier_model.keras")
|
| 60 |
+
|
| 61 |
+
# Load
|
| 62 |
+
from ultralytics import YOLO
|
| 63 |
+
import keras
|
| 64 |
+
|
| 65 |
+
yolo = YOLO(yolo_path)
|
| 66 |
+
crnn = keras.models.load_model(crnn_path, compile=False, safe_mode=False)
|
| 67 |
+
classifier = keras.models.load_model(classifier_path, compile=False)
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
Atau gunakan `ai/model_loader.py` dari repo ini yang sudah handle caching & GPU setup.
|