Pheromone Trap Moth Counting from Phone Photos for Cotton Pest Scouts
Build an app and model that count bollworm moths on a pheromone trap's sticky card from a phone photo, log the count with the trap's location and date, and show agriculture extension staff where catches are rising. Scouts count moths by eye today and write numbers on paper, so the data arrives late and is hard to compare. The project uses an existing phone and trap, not new hardware.
Beginner
Achievable by one student in a semester with familiar tools.1 semester · 2 students
7 to ship
4 optional extrasSuggested stack
What you should ship
- A labelled set of sticky card photos with every moth marked, combining a public bollworm dataset with your own photos
- A detection model that counts target moths and ignores other insects and debris
- A phone app that guides the photo, shows the count for confirmation and works offline
- Trap records with location, date and scout, synced when there is signal
- A map and chart view for extension staff showing counts per trap over time
- An alert when a trap's count passes a threshold set by the extension officer
- An evaluation of counting error against careful hand counts
If you have time left
- Separate counts for two or more pest species on the same card
- Running the model on the phone so the count appears without signal
- Weekly SMS or WhatsApp summaries for farmers near each trap
- Linking counts with weather data to explain peaks
The problem: counting moths by eye
Bollworms are among the most damaging pests of cotton in South Asia. Farmers and agriculture departments use pheromone traps: a lure attracts male moths, which get stuck on a card or fall into a container. Counting the catch every few days tells scouts when a pest population is building and when spraying is justified.
Counting is done by eye. Scouts lean over dozens of traps, count small brown moths among other insects and dust, and write numbers on paper. Counts differ between scouts, the paper reaches the office days later, and nobody can see a pattern across a district in time to act. Spraying too late loses the crop; spraying too early or too often wastes money and harms the beneficial insects that keep pests in check.
What already exists and the gap
- Trapview sells automated camera traps that photograph catches and identify species, including cotton bollworm, with a forecasting service.
- Research datasets of bollworm trap images exist, including the BOLLWM dataset from cotton fields in India.
- Extension departments collect trap counts on paper or simple spreadsheets.
Automated camera traps are excellent where farms can buy and maintain hardware in every field. Most smallholder areas cannot. The gap is a tool that uses the phone the scout already carries and the trap already in the field, and turns each visit into a reliable count on a shared map.
Inspiration
"Automatic moth detection from trap images for pest management" by Weiguang Ding and Graham Taylor, published in Computers and Electronics in Agriculture in 2016, used a trap with a pheromone lure and sticky surface, captured daily images and trained a convolutional network to detect moths among other insects. Your project brings the same idea to a phone photo taken by a scout.
What you build
- Pest scouts take one photo per trap, check the count and move on.
- Extension officers see a map of all traps, counts over time and alerts when a trap crosses the threshold they set.
- Farmers can be told when catches near them are rising.
Each trap gets a short code printed on a tag, so the scout scans or types it and the photo is linked to the right trap without relying on GPS alone. The app shows the count with boxes drawn around each moth, and the scout can add or remove a box before saving. Those corrections become new training labels, so the model gets better with each season of use instead of staying frozen at the version you shipped.
The technically interesting part
- Small, overlapping objects. Moths are small, often overlap and get damaged on the card. Counting by detection works when objects are separate; you may need to compare it with density estimation for crowded cards.
- Look-alikes. Other moths, flies and debris land on the same card. The model must count only the target species, so labelling must be careful and checked by someone who knows the pest.
- Photo conditions. Bright sun, shadows, cards at an angle and dirty cards. A guided camera screen with a frame and a blur check reduces bad photos.
- Offline first. Fields often have no signal. The app must store photos and counts and sync later without duplicates.
How to evaluate it
- Counting error: average difference between model counts and careful hand counts, per card and for crowded cards separately.
- Detection quality: precision and recall for the target moth.
- Scout time: minutes per trap with the app versus by eye.
- Field test: a few scouts use the app for two weeks; record problems and missed syncs.
Suggested plan
- Weeks 1 to 3: read the paper, get the public dataset, contact an extension office or agricultural university for field access.
- Weeks 4 to 7: label photos, train and test the detector.
- Weeks 8 to 10: the app and offline sync.
- Weeks 11 to 13: dashboard, alerts and a field test.
- Weeks 14 to 15: report and demo.
Path to a product
Agriculture departments, seed and pesticide companies and large farms all run trap networks. A low-cost phone-based service with a dashboard is easier to roll out than hardware traps, and can later connect to them. The project also gives you a clear computer vision portfolio piece with real users.
Scope warning
Do not design a new trap or camera. Do not give spraying advice; show counts and let the officer's threshold drive alerts. Work with an agricultural expert on labels, because a model trained on wrong labels will count the wrong insect with confidence.
Learn what you need on Sefism
- Machine learning roadmap: data splits and evaluation for the detector.
- Mobile development roadmap: offline storage and sync for the field app.
- Ultralytics YOLO Documentation: training the moth detector.
- Label Studio: marking every moth on the training photos.
- OpenCV-Python Tutorials: blur checks and cropping the card.
- Which final year project will actually help me get a job?: presenting a field project well.
Get help with this idea
The risk is weak labels and a model that counts the wrong insects. Tauseef can help you find an expert partner, plan labelling and keep the app simple enough for field use. If you are new here, create a free account first.
Ideas and guidance, not finished projects
These are project ideas and scoping guidance, published free for students to use as a starting point. I do not build, write, or sell final-year projects, and I do not complete coursework for anyone. Take an idea, make it yours, and build it.
Not sure this one fits you?
I help students pick an idea that matches their skills and their deadline, then scope it down until it is finishable. Guidance only, never done for you.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.