MIME + extension + size (≤5 MB) + decode check + dimension guards. Bad input never reaches a model.
TF.js loads MobileNet v1; top-5 ImageNet classes + raw softmax + latency, with the license shown next to it.
Larvae slot has no validated weights → returns unavailable + why each candidate was rejected.
Deterministic weighted sum over your five observations; rules override band edges for confirmed larvae / absent water.
Optional device-local save → dashboard aggregates counts, trends, habitats, consent-only map.
Public candidates were investigated before release. None passed all four gates: target classes (larvae vs other aquatic organisms), domain (phone photos of containers, not lab plates), license compatible with this site, runtime (browser-runnable or convertible without unverifiable re-training).
| Candidate | Task / classes | License | Verdict |
|---|---|---|---|
| culico-net-det-v1 (YOLO11n, Hugging Face) | 4 adult mosquito species detection | AGPL-3.0 | Rejected — copyleft license conflict for this site; also adult mosquitoes, not larvae-in-water |
| mosquito_larvae_counter_YOLOv8 (GitHub) | larvae + eggs counting, lab aliquot | not clearly licensed | Rejected — 96 uniform-background lab images; wrong domain for field phone photos; weights license unclear |
| GLOBE larvae classifier (ViT/CNN study) | Aedes / Culex / neither | study repo, weights PyTorch | Rejected — published cross-region accuracy ≈60–66%; heavy runtime; no in-browser path |
| Roboflow "Mosquito Larvae Detection" set | larvae boxes, 2 400 images | dataset account required | Deferred — usable as TRAINING input via our pipeline, not as shipped weights |
| Shipped in prototype: MobileNet v1 | ImageNet-1k content classes | Apache-2.0 | Accepted — real inference, browser-native; explicitly not presented as larvae detection |
training/mosqui-sense-ai/msa_train.py on a licensed dataset → export_to_tfjs() → set CONFIG.model.larvae.modelUrl + labelsUrl in js/config.js. The runner's real code path activates immediately — output stays labelled third-party / validate independently until a documented evaluation exists.| Factor | Value | Points |
|---|---|---|
| Standing water | Yes / Uncertain / No | 30 / 12 / 0 |
| Not answered (treated as uncertain) | 12 | |
| base factor — presence drives breeding opportunity | ||
| Water persistence | >7 days | 20 |
| 4–7 days / 1–3 days / <24 h | 15 / 10 / 5 | |
| Unknown or not observed | 0 | |
| stagnation time correlates with larval development window | ||
| Organic debris | Yes / Uncertain / No | 10 / 4 / 0 |
| Not answered | 4 | |
| detritus = food + shelter for filter-feeding larvae | ||
| Larvae observed | Confirmed | 30 |
| Suspected / Uncertain / Absent | 15 / 5 / 0 | |
| Not answered | 5 | |
| direct evidence outweighs context — but is still a user claim, not model output | ||
| Habitat type | High (tank, drum, tyre, construction, cooler) | 10 |
| Moderate (bucket, saucer, bird bath, puddle, gutter, …) | 6 | |
| Low (pond, drain, pool) / unknown | 4 / 2 | |
- Bands: score ≥65 → higher · ≥35 → moderate · below → lower.
- Insufficient-information gate: fewer than 3 clearly-known factors → verdict is insufficient regardless of score (we refuse to sound confident on thin evidence).
- Rule overrides: confirmed larvae + standing water → higher (active breeding site, even if other fields are soft); no standing water + no confirmed larvae → lower.
- Partial credit: "uncertain" scores ~40% of max so answers like "I think so" move the needle without faking certainty.
- Why no percentages? A weighted sum of ordinal observations is not a calibrated probability. Displaying "72% risk" would imply epidemiological validation that does not exist. The score is labelled relative, always.
Ye do alag cheezein hain, aur UI me kabhi mix nahi hoti:
Softmax belief of MobileNet over ImageNet classes for your image's pixels. Uncalibrated. A high value means "the classifier strongly recognizes this content pattern" — not "this is definitely a breeding site".
Deterministic function of your five observations through the published table above. Has nothing to do with pixels after validation. Traceable point-by-point in the results card.
msa_data.py— CSV manifest validation (unique ids, whitelisted labels, provenance column) + group-aware stratified split: capture batch / video / slide = one group, groups never straddle train/val/test → image-leakage prevention, verified byleakage_report().msa_train.py— MobileNetV2 transfer learning (TF.js-convertible, matches the browser runner), seeded RNGs, inverse-frequency class weights for imbalance, early epochs on val split;tensorflowimported lazily so the module stays testable without TF.msa_metrics.py— per-class precision/recall/F1, confusion matrix, and an abstention metric (coverage vs selective accuracy at a confidence threshold) — the numeric story behind "the model may decline to answer".export_to_tfjs()— one command to producemodel.json+ shards for the web runner's larvae slot.- Honesty rule baked into the output JSON: "Metrics are computed from held-out predictions on YOUR dataset only. Do not publish numbers from a different dataset or split."
Run: cd training/mosqui-sense-ai && python -m unittest discover -s tests — no TensorFlow needed for the pipeline tests.
| Area | Current state | What would fix it |
|---|---|---|
| Larvae detection | Absent — slot abstains | Licensed field dataset → our pipeline → documented per-class eval → then weights into the slot |
| Species / disease claims | Never produced (by design) | Requires entomologist-validated species dataset + official reference — out of prototype scope |
| Confidence calibration | Raw softmax, uncalibrated | Temperature scaling on a held-out set; currently not available |
| Risk score validity | Expert-shaped heuristic, unvalidated | Prospective field study comparing scores to actual larval counts / pupal indices |
| Geographic generalization | Lucknow/UP household contexts informed the habitat taxonomy only | Multi-region data + validation |
| Reporting channel | Device-local only; no authority linkage | An opt-in submission channel with municipal integration (not built — privacy first) |
| Cross-device history | localStorage is per-device/per-browser | Authenticated sync backend (deliberately not added: no accounts in this prototype) |