DEV Community

KAUSHIKEE KARMAKAR
KAUSHIKEE KARMAKAR

Posted on

Backyard Sweep: a ten-minute walk to find mosquito breeding spots, and what my own photos

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

Backyard Sweep is an AI-powered mosquito breeding site detection tool that turns routine household inspections into a simple, guided activity.

Mosquitoes breed in standing water, often hiding in things we overlook: old tires, bottles, vases, coconut shells, buckets, and blocked drains. Health agencies recommend regularly emptying, scrubbing, or covering these containers. But the real challenge is noticing them in the first place.

Backyard Sweep makes that process easier. Users can photograph areas around their homes, and an open-weight YOLOv8 detector identifies potential mosquito breeding containers, highlights them with bounding boxes, and provides straightforward action tips: tip it out, scrub it, bin it, or cover it.

The application also includes:

  • Direct Camera Access: Take photographs directly from a mobile device.
  • Confidence Slider: Filter detection results without running the model again.
  • Copyable To-Do List: Turn detected objects into actionable household tasks.
  • Walk Tracker: Five photographs count as a completed inspection walk.
  • Weather Card: Optional live weather information through Open-Meteo to help decide whether it's a good time for an outdoor inspection.
  • Light and Dark Modes: Including a custom Night Forest theme.

The Side Hustle Potential

Backyard Sweep is designed for households, community volunteers, housing societies, and local awareness initiatives in areas where dengue and mosquito-borne diseases are a recurring concern.

It could evolve into a lightweight household inspection service or a community-focused mosquito prevention platform. Its open-source foundation also makes it possible to adapt the detector to different household environments and regional container types.

The application is currently free to use. It is not a medical tool and does not diagnose or predict diseases. Its purpose is to make identifying and removing potential mosquito breeding containers easier.

Demo

Live Application: https://mosquito-breeding-detector.onrender.com

Note: The application runs on Render's free server, so the first load after a period of inactivity may take up to a minute.

Backyard Sweep flagging containers in a photo from the dataset's test split

The demonstration image uses a photograph from the VisText-Mosquito test split. My own photographs were used separately for real-world field testing.

Code

GitHub Repository: https://github.com/KK-Dev0/Mosquito-Breeding-Detector

GitHub logo KK-Dev0 / Mosquito-Breeding-Detector

Backyard Sweep: YOLOv8 detector for mosquito breeding sites (tires, vases, bottles, coconut shells, drain inlets), trained on VisText-Mosquito.

Backyard Sweep

Turn the weekly "check for standing water" chore into a short, guided walk.

License Python FastAPI YOLOv8n Hacktoberfest

Live demo: https://mosquito-breeding-detector.onrender.com (Free server: the first load after a quiet spell can take up to a minute.)

Photograph anything around your home that could hold water. A YOLOv8 detector flags the containers that commonly breed mosquitoes, and each one comes with a plain-language tip for what to do about it.

Built for the Hacktoberfest 2026 Open-Source AI Challenge, Week 1: Touch Grass.

Backyard Sweep scanning a dataset test photo

Example result on a photo from the VisText-Mosquito test split (not one of my own photos). Photo: Faiyaz and Jisan, CC BY 4.0.

Contents

  1. Why this exists
  2. Features
  3. How it works
  4. Model and results
  5. API
  6. Why open source mattered
  7. Run it locally
  8. Deploy on Render
  9. Project structure
  10. Limits and responsible use
  11. Ideas for next steps
  12. Credits and licence

Why this exists

Dengue is spread by Aedes mosquitoes, which breed in small…

How I Built It

The project combines an open-weight computer vision model with a lightweight web application.

1. AI Model — YOLOv8n

I used Ultralytics YOLOv8n, fine-tuned for 30 epochs at 640 px using a free Google Colab T4 GPU.

The model was trained to recognize five types of potential mosquito breeding containers:

  • Bottles
  • Coconut shells
  • Drain inlets
  • Tires
  • Vases

2. Dataset

I used the Breeding Place Detection subset of VisText-Mosquito:

  • 3,862 training images
  • 371 validation images
  • 183 test images
  • Five object classes
  • CC BY 4.0 license

Dataset citation: Faiyaz, Md Faiyaz Abdullah Sayeedi; Jisan, Md Adnanul (2025), VisText-Mosquito: A Multimodal Dataset for Mosquito Breeding Site Detection, Surface Segmentation, and Reasoning, Mendeley Data, V3, DOI: 10.17632/rtsfh7jh7p.3.

3. Application Architecture

  • Backend: FastAPI serves the trained detection model.
  • Frontend: HTML, CSS, and JavaScript, without a build step.
  • Hosting: Render free web service.
  • Weather Integration: Open-Meteo API, requested only when the user opens the optional weather card.
  • Image Processing: Photographs are processed in memory and are not saved.

Model Evaluation

On the held-out dataset test split (183 images, 424 objects), the 30-epoch model achieved:

Metric Result
mAP50 0.926
Precision 0.906
Recall 0.844

Class-wise AP50:

Class Test Instances AP50
Bottle 50 0.884
Coconut shell 101 0.973
Drain inlet 54 0.956
Tire 115 0.893
Vase 104 0.923

I also experimented with a longer 80-epoch training run, which stopped early at epoch 78. Surprisingly, it did not outperform the original model: mAP50 decreased from 0.926 to 0.914, while recall decreased from 0.844 to 0.832. I retained the original 30-epoch model.

Real-World Testing: Taking It Outside

Dataset performance is one thing. Real-world performance is another.

I tested Backyard Sweep using five photographs taken around my own home. This was a small exploratory test, not a formal benchmark.

The results exposed several limitations:

  • A pile containing two clear tires and one partially hidden tire produced only one correct tire detection at 41%. Meanwhile, a parked car was incorrectly classified as a vase at 87%, and a dark corner as a coconut shell at 70%.
  • A blue dustbin was classified as a vase at 83%.
  • Among approximately five paint buckets and tins, only one was detected at 25%, with three additional detections at 10%.
  • A rooftop containing two clay water pots, a plastic bucket, and a water tank produced no detections, even at 10%.
  • An open drain channel was also missed.

This showed me that many household objects capable of holding water were outside the model's original five classes. It also demonstrated that confidence scores from unfamiliar real-world photographs cannot always be trusted.

Experimenting with YOLO-World

To explore a possible improvement, I tested YOLO-World, an open-vocabulary object detector, without additional training.

I supplied a custom list of object descriptions, including clay water pots, buckets, and water tanks. These descriptions were chosen after examining my own photographs, so this was an exploratory demonstration rather than a fair independent comparison.

Metric Fine-tuned YOLOv8n YOLO-World
Dataset mAP50 0.926 0.297
Tire recall 0.80 0.017
Drain-inlet AP50 0.956 0.000
Loaded parameters ~3 million ~164 million
Model file size ~6 MB 329 MB

YOLO-World successfully identified objects my original model missed in the rooftop photograph, including a clay pot (89%), a bucket (77%), and a water tank.

However, it also produced false detections, identifying a parked car and a bathroom basin as water tanks, and even confusing a real tire with a clay water pot.

Its dataset evaluation also used the original class names, meaning alternative text descriptions could change the results.

I ultimately retained YOLOv8n because it performed considerably better on its trained dataset classes and was much smaller.

I also investigated deploying YOLO-World. Its 329 MB model file and approximately 1.7 GB RAM requirement during my Colab test exceeded the free Render server's 512 MB memory limit.

My next step: Use YOLO-World to generate preliminary labels for additional household containers, manually correct the bounding boxes, and fine-tune the smaller YOLOv8n model using more diverse real-world photographs.

Development Process

I built this project with assistance from Claude through a chat-based workflow. Claude helped develop the FastAPI application and frontend, and drafted the README and this submission.

I handled the model training in Colab, tested the deployed application using my own photographs, investigated its failures, compared alternative models, evaluated the results, and made the final decisions about which model and architecture to retain.

Why Does Open Innovation Matter?

I never benchmarked a closed AI API against Backyard Sweep, so I cannot claim that open-source models outperform proprietary alternatives.

However, open innovation made several things possible:

1. Custom Model Training

I could fine-tune a relatively small, approximately 3-million-parameter detector for a specific household inspection task without paying per-image API fees.

2. Freedom to Experiment

I could switch between YOLOv8n and YOLO-World, evaluate both against the same dataset, investigate their limitations, and decide which was more suitable for deployment.

3. Greater Control Over Data

Photographs are processed on a server I control rather than being sent to a third-party AI inference service. The application processes them in memory without saving them.

4. Transparency and Reproducibility

The source code, model weights, dataset reference, and licensing information are publicly accessible. Anyone interested can inspect the implementation, reproduce the experiments, or adapt the project.

5. Accessibility

A lightweight model can run on a relatively inexpensive server, making the application accessible without requiring expensive infrastructure or individual API subscriptions.

There are trade-offs, too. Ultralytics YOLO uses the AGPL-3.0 license, so the project is also licensed under AGPL-3.0. The free Render server also sleeps when idle.

For me, open innovation is not simply about using freely available models. It is about having the freedom to experiment, question results, understand limitations, and build something that can evolve beyond its original dataset.

Prize Categories

  • Best Use of Render: The FastAPI backend serving the AI detection model is deployed using Render's free web service.

Credits: Open-Meteo for providing the optional live weather information.

Top comments (0)