Kairos water detector v2 (RT-DETRv2-R18, 1 class: water)
Finds standing water, puddles and spills in robot camera frames and returns boxes. Built for Kairos, a weather and water plugin idea for Boston Dynamics Spot fleets (Knight Hacks 2026). Advisory only. "No box" never means the floor is dry. An operator confirms every route.
- Base:
PekingU/rtdetr_v2_r18vd(Apache-2.0), new 1-class head, fine-tuned on HF Jobs (1x L4, 18 epochs, 65 min). - Files:
model.safetensors(PyTorch),onnx/model.onnx(fp32, 80.7 MB),onnx/model_quantized.onnx(int8 dynamic, 21.5 MB). - Input 640x640, outputs
logits[1, 300, 1] andpred_boxes[1, 300, 4] (cx, cy, w, h, normalized). - Threshold 0.49, picked on a separate calibration split (dry false alarms <= 5 per 100), never on test.
Results (held-out test, q8 as shipped)
Calib and test come from sources or scenes never trained on. 95% Wilson CIs.
| Metric | Value | n |
|---|---|---|
| Water boxes found, IoU >= 0.5 | 48.3% (44.9-51.6) | 864 boxes |
| Tiny boxes (< 1% of frame) found, IoU >= 0.5 | 7.0% (2.8-16.7) | 57 boxes |
| Box precision, IoU >= 0.5 | 62.7% (59.0-66.3) | 665 detections |
| Wet frames flagged, unseen-source puddle photos | 84.9% (81.6-87.7) | 543 frames, 58 scenes |
| False alarms per 100 real Spot frames (SCAND, dry, glossy indoor floors) | 2.3 (0.9-5.8) | 172 frames, 2 bags |
| False alarms per 100 Kaggle dry street frames | 2.9 (1.8-4.7) | 579 frames, 15 scenes |
Honest reading:
- Tiny water is the weak spot. Do not rely on this model for small spills.
- The earlier classifier
builtbyd3v/spot-wetfloor-convnext-tinyis about as good at "is there water in this frame" (88.2% vs 84.9% on the same 543 unseen frames). This model adds where the water is and how big. - No plant or NextEra frames were available. Indoor industrial floors are untested.
- q8 vs fp32: 36 of 1,351 test frames change alarm state.
Full tables, splits and method: docs/model/water-v2/RESULTS.md in the Kairos repo; scripts in training/ here.
Use (transformers.js)
The object-detection pipeline drops every box of a 1-class model (softmax, then it skips the last class). Load with AutoModel + AutoProcessor and decode yourself: sigmoid per query, keep score >= 0.49, NMS at IoU 0.5.
import { AutoModel, AutoProcessor, RawImage } from "@huggingface/transformers";
const id = "builtbyd3v/kairos-water-rtdetr";
const processor = await AutoProcessor.from_pretrained(id);
const model = await AutoModel.from_pretrained(id, { dtype: "q8" });
const { pixel_values } = await processor(await RawImage.read(url));
const { logits, pred_boxes } = await model({ pixel_values });
Training data and credits
| Dataset | License | Use |
|---|---|---|
| Bhutad, S. and Patil, K. (2021). Dataset of Stagnant Water and Wet Surface with Annotations. Mendeley Data V4. doi:10.17632/y6zyrnxbfm.4 | CC BY 4.0 | train / val |
Roboflow Universe slipp/spill_detection v4 (class water only) | CC BY 4.0 | train / val |
Roboflow Universe hk-hsse/puddle-qrpyh v1 | CC BY 4.0 | train / val |
Roboflow Universe projects-pwwbs/water-puddle-joyj6 v1 | CC BY 4.0 | calibration / test only |
| Mahesa, M. R. Obstacles in Public Spaces for Dist-YOLO (Kaggle) | CC0 1.0 | all splits, by 40-frame block |
| Karnan, H. et al. (2022). Socially CompliAnt Navigation Dataset (SCAND). Texas Data Repository. doi:10.18738/T8/0PRYRH | CC0 1.0 | dry Spot frames, whole bags per split |
Base model: RT-DETRv2 (Lv et al. 2024), weights PekingU/rtdetr_v2_r18vd, Apache-2.0.