feat: RapidOCR default OCR engine, office-only ocr_engine, drop operator toggle
ci / smoke (push) Canceled after 0s
ci / smoke (push) Canceled after 0s
This commit is contained in:
1 parent
080237ad3b
commit
fbba169507
16 files changed
+137
-112
No files matched your search
+18
-9
@@ -44,27 +44,37 @@ loads `.engine` only — see `models/modelREADME.md` for which weights each mode
|
||||
`batch_history_folder/batch_<ts>.json` + `hasil_perhitungan.json` (per-batch reports).
|
||||
- Live frame: `/dev/shm/jetson-counter/live_frame.jpg` (written every 2nd frame,
|
||||
consumed by `/api/live-video` MJPEG).
|
||||
- Helpers: `scripts/check_jetson_db.py`; retired ops scripts in `archive/`
|
||||
- Helpers: `check_jetson_db.py` (root); retired ops scripts in `archive/`
|
||||
(`backup.py`, `dump_db.py`, `migrate_jetson_db.py`, `merge_batches_*.py`,
|
||||
`update_batches.py`, `diagnose_truck_jetson.py`).
|
||||
|
||||
## DO OCR packages (optional Paddle)
|
||||
Primary path is system Tesseract (CPU):
|
||||
## DO OCR packages
|
||||
Default engine is **RapidOCR** (PP-OCR via onnxruntime, bundled models —
|
||||
offline-friendly; installed with `requirements.txt`):
|
||||
|
||||
```bash
|
||||
pip install rapidocr_onnxruntime
|
||||
```
|
||||
|
||||
Backups (`ocr_engine` — office monitoring UI toggle, no restart):
|
||||
`Tesseract (Backup, Light)`:
|
||||
|
||||
```bash
|
||||
# lighter; system package + Indonesian traineddata
|
||||
sudo apt install tesseract-ocr tesseract-ocr-ind
|
||||
pip install pytesseract
|
||||
```
|
||||
|
||||
Backup engine (`ocr_engine: paddle` via office/operator UI toggle — no restart):
|
||||
`PaddleOCR (Accuracy, Heavy to run)`:
|
||||
|
||||
```bash
|
||||
# optional; heavier — see paddleocr docs for Jetson wheels
|
||||
pip install paddleocr
|
||||
```
|
||||
|
||||
Missing paddle deps → upload returns explicit error; flip engine back to
|
||||
`tesseract` from either dashboard. Operator page: `http://<jetson>:5000/operator`
|
||||
Missing deps → upload returns explicit error (never silent fallback); flip
|
||||
engine back to `RapidOCR`/`Tesseract` from the office dashboard
|
||||
(`:5721`). Operator page: `http://<jetson>:5000/operator`
|
||||
(smartphone camera capture for DO photos). Photo dir under `output.dir` with
|
||||
7-day retention (hourly purge in dashboard process).
|
||||
|
||||
@@ -79,6 +89,5 @@ Pages: `/` + `/monitoring`, `/operator` (manual start/stop; DO panel in
|
||||
`/api/day-detail/<date>`, `/api/recent-batches`, `/api/available-dates`,
|
||||
`/api/export-daily-csv`, `/api/export-day-csv/<date>` (Excel via openpyxl).
|
||||
|
||||
Port split: mode / model_mode / require_plate / require_do POSTs → **office
|
||||
5721 only** (403 on 5000). `ocr_engine` POST allowed on both ports (synced via
|
||||
settings GET). Smartphones open `http://<host>:5000/operator` for camera capture.
|
||||
Port split: mode / model_mode / require_plate / require_do / ocr_engine POSTs →
|
||||
**office 5721 only** (403 on 5000). Smartphones open `http://<host>:5000/operator` for camera capture.
|
||||
Reference in new issue
Block a user