CoolFace
Apppublic

mulil/water-meter-reader

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

Water Meter Reader API

REST API 2-stage YOLO pipeline untuk membaca angka water meter secara otomatis.

StageModelOutput
1YOLOv11n-SegCrop area meteran (warp perspective)
2YOLOv11m-SegDeteksi + klasifikasi digit (20 kelas)

Endpoints

MethodPathDeskripsi
GET/api/healthStatus server & model
POST/api/inferUpload gambar → baca angka meter

POST /api/infer

  • —Content-Type: multipart/form-data
  • —Field: image (jpg, png, webp, bmp — maks 10 MB)
  • —Query params opsional: ?conf=0.3, ?iou=0.5

Response sukses:

json
{
  "success": true,
  "reading": "1234.56",
  "stage1Score": 0.94,
  "digitCount": 6,
  "hasDecimal": true,
  "digitScores": [0.91, 0.88, 0.94, 0.87, 0.92, 0.95],
  "processingTimeMs": 280,
  "stage1_raw": { "num_detections": 1, "detections": [...] },
  "stage2_raw": { "crop_width": 624, "crop_height": 156, "num_detections": 6, "detections": [...] }
}

Environment Variables

VariableDefaultKeterangan
HF_MODEL_REPOmulil/water-meter-modelsHF Hub repo model ONNX
STAGE1_MODEL_FILENAMEstage1.onnxNama file model Stage 1
STAGE2_MODEL_FILENAMEstage2.onnxNama file model Stage 2
CONF_THRESHOLD0.25Min confidence score
IOU_THRESHOLD0.45NMS IoU threshold
ENABLE_UItrueAktifkan UI web
MAX_FILE_SIZE_MB10Batas ukuran upload