Mosquito-borne illness starts in small pockets of stagnant water — a blocked gutter, a covered drum, an old tyre. Field surveys are slow, and most householders never connect a water container to risk. MosquiSenseAI is a decision-support prototype: it helps a resident or field volunteer structure what they observe, get an instant explainable assessment, and keep a simple record over time. It does not replace public-health authorities, and it never guesses what a photo cannot prove.
MobileNet v1 loads and runs inside your browser (TensorFlow.js, Apache-2.0). You see the model name, its classes and its confidence — clearly labelled as content classification, never as larvae proof.
A documented scoring table (weights in config.js) turns your observations into lower / moderate / higher / insufficient — with every contributing factor shown, plus what extra evidence would sharpen the result.
Save observations to a device-local dashboard: totals, category mix, habitat distribution, time trends, filters, and a consent-only location map. Includes clearly-labelled simulated demo data.
Evidence-aligned, safe, non-chemical steps drawn from standard source-reduction practice — remove, empty, cover, clear. No pesticide recipes, no unsafe handling advice.
- Separate the evidence streams. Model predictions (image classifier), user-reported observations (water, habitat, debris, larvae), and derived judgement (risk engine) are kept apart end-to-end and displayed in separate cards — confidence ≠ risk.
- Validate before inference. MIME type, extension, size (≤5 MB) and decode checks gate every upload; invalid input never reaches a model.
- Interchangeable model interface.
model-runner.jsexposesrunContent()andrunLarvae()over one contract; each returnsok | unavailable | errorwith model identity, license and latency. Timeouts degrade to an honest "unavailable" state — the environmental assessment keeps working. - Abstention over fabrication. The larvae slot ships empty and returns an explicit unavailable status with the rejection rationale for every candidate model. No weights → no larvae claim. Ever.
- Interpretable scoring. The risk engine is a deterministic weighted sum (0–100) with published thresholds (≥65 higher, ≥35 moderate), rule overrides for confirmed larvae / absent water, and an insufficient-information gate when <3 factors are known.
- Reproducible training path.
training/mosqui-sense-ai/ships a group-aware, leakage-checked split; per-class precision/recall/F1; an abstention-coverage metric; seeded runs; and a TF.js export step — so validated weights can be added later without rewriting the web app.
- Image model
- MobileNet v1 (1.0, 224px), ImageNet-1k — Apache-2.0, via TensorFlow.js. Used for content classification and sanity checks.
- Larvae model
- Not bundled. Slot is implemented but returns unavailable: AGPL detector (license conflict), lab-aliquot counter (wrong domain), GLOBE classifier (~65% cross-region, PyTorch-only) were all rejected on record. See How it works for the full evaluation.
- Confidence
- Raw softmax output, uncalibrated — shown as a percentage of classifier belief about image content, not as correctness probability.
- Training data
- No field dataset is bundled. The prototype ships a documented manifest + leakage-safe split pipeline; metrics are only ever computed from your held-out split (never invented).
- Risk score
- Heuristic weighted sum (0–100), fully documented in
METHODOLOGY.md. Explicitly not a probability, not a transmission estimate. - Licenses
- MobileNet/TF.js: Apache-2.0. Prototype code: this repository's license. Demo records: generated, simulated.
- Your photos never leave your device. Validation, inference and storage all run in the browser; there is no upload endpoint.
- Observations live in your browser's localStorage — export, strip locations, or delete everything at any time from the dashboard.
- Location is manual and optional: site privacy headers disable browser geolocation, so coordinates are only stored when you type them and tick consent.
- Model libraries load from public CDNs (jsDelivr, Google-hosted weights); those requests contain no image data.
- Third-party map tiles load only when the map is visible and only for consented coordinates.
- No species identification, no disease prediction. One photo cannot tell Aedes from Culex, cannot estimate mosquito density, and cannot forecast dengue.
- No larvae detection in this release. The classifier in the browser sees ImageNet categories, not larvae. The tool says so instead of pretending.
- Risk score is a heuristic, shaped by your inputs — poor inputs give an "insufficient information" verdict by design, not a confident wrong answer.
- Not an official surveillance channel. Reports here do not reach any municipal or health authority.
- Not medical advice. Fever or symptoms → see a doctor; emergency → call 108.
- Model confidence is uncalibrated and content-only; never read it as "probability this is a breeding site".
- ✅ Works now
- Image validation → preview → real MobileNet inference with top-5 content classes · explainable environmental risk assessment · observation save/delete/export/strip-location · dashboard counts, charts, filters, consent-only map · simulated demo dataset (labelled) · full offline-after-load operation.
- ⚠️ Honest gaps
- Larvae classification (slot empty — abstains) · no cross-device sync · no server-side report submission · no calibrated confidence · map requires network tiles (falls back to coordinate list offline).
- 🧪 Experimental
- Third-party weights slot for
modelUrl— enable only after independent validation; output is still labelled unvalidated.
Validation, inference, explainability, testing, privacy and documentation — ek hi prototype me. Aap bhi aise projects build kar sakte ho.
Talk to DSWallah on WhatsApp →