🧪 Methodology · Models · Honest limits

How MosquiSenseAI Works

Jo chalta hai, jo nahi chalta, aur kyun — sab document hai. Ye page prototype ka "model card + methodology" hai.

1 · End-to-end pipeline
① Validate

MIME + extension + size (≤5 MB) + decode check + dimension guards. Bad input never reaches a model.

② Infer (in-browser)

TF.js loads MobileNet v1; top-5 ImageNet classes + raw softmax + latency, with the license shown next to it.

③ Abstain honestly

Larvae slot has no validated weights → returns unavailable + why each candidate was rejected.

④ Assess

Deterministic weighted sum over your five observations; rules override band edges for confirmed larvae / absent water.

⑤ Record

Optional device-local save → dashboard aggregates counts, trends, habitats, consent-only map.

2 · Larvae model — evaluation record (why nothing is bundled) Slot empty by decision

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).

CandidateTask / classesLicenseVerdict
culico-net-det-v1 (YOLO11n, Hugging Face)4 adult mosquito species detectionAGPL-3.0Rejected — copyleft license conflict for this site; also adult mosquitoes, not larvae-in-water
mosquito_larvae_counter_YOLOv8 (GitHub)larvae + eggs counting, lab aliquotnot clearly licensedRejected — 96 uniform-background lab images; wrong domain for field phone photos; weights license unclear
GLOBE larvae classifier (ViT/CNN study)Aedes / Culex / neitherstudy repo, weights PyTorchRejected — published cross-region accuracy ≈60–66%; heavy runtime; no in-browser path
Roboflow "Mosquito Larvae Detection" setlarvae boxes, 2 400 imagesdataset account requiredDeferred — usable as TRAINING input via our pipeline, not as shipped weights
Shipped in prototype: MobileNet v1ImageNet-1k content classesApache-2.0Accepted — real inference, browser-native; explicitly not presented as larvae detection
Activation path: run 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.
3 · Risk scoring table (complete, verbatim from config) Heuristic · 0–100
FactorValuePoints
Standing waterYes / Uncertain / No30 / 12 / 0
Not answered (treated as uncertain)12
base factor — presence drives breeding opportunity
Water persistence>7 days20
4–7 days / 1–3 days / <24 h15 / 10 / 5
Unknown or not observed0
stagnation time correlates with larval development window
 
Organic debrisYes / Uncertain / No10 / 4 / 0
Not answered4
detritus = food + shelter for filter-feeding larvae
Larvae observedConfirmed30
Suspected / Uncertain / Absent15 / 5 / 0
Not answered5
direct evidence outweighs context — but is still a user claim, not model output
Habitat typeHigh (tank, drum, tyre, construction, cooler)10
Moderate (bucket, saucer, bird bath, puddle, gutter, …)6
Low (pond, drain, pool) / unknown4 / 2
4 · Model confidence vs environmental risk

Ye do alag cheezein hain, aur UI me kabhi mix nahi hoti:

Model confidence
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".
Environmental risk
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.
5 · Reproducible training pipeline (for future validated weights) 22/22 unit tests

Run: cd training/mosqui-sense-ai && python -m unittest discover -s tests — no TensorFlow needed for the pipeline tests.

6 · Limitations register (what evidence is missing) Read before trusting
AreaCurrent stateWhat would fix it
Larvae detectionAbsent — slot abstainsLicensed field dataset → our pipeline → documented per-class eval → then weights into the slot
Species / disease claimsNever produced (by design)Requires entomologist-validated species dataset + official reference — out of prototype scope
Confidence calibrationRaw softmax, uncalibratedTemperature scaling on a held-out set; currently not available
Risk score validityExpert-shaped heuristic, unvalidatedProspective field study comparing scores to actual larval counts / pupal indices
Geographic generalizationLucknow/UP household contexts informed the habitat taxonomy onlyMulti-region data + validation
Reporting channelDevice-local only; no authority linkageAn opt-in submission channel with municipal integration (not built — privacy first)
Cross-device historylocalStorage is per-device/per-browserAuthenticated sync backend (deliberately not added: no accounts in this prototype)
Not a medical tool. Fever, rash, severe headache → consult a doctor. Emergency → call 108. This prototype never replaces professional or official guidance.
🔬 Analyze an Image 📊 Dashboard ← Project home