> For the complete documentation index, see [llms.txt](https://docs.uiuc.chat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uiuc.chat/cropwizard/pest-detection-tool.md).

# Pest Detection Tool

Introducing the powerful new **LeAF Pest Detection Model**, now integrated into CropWizard to enhance your pest management capabilities! This tool leverages custom-trained computer vision models to accurately identify a vast range of agricultural pests directly from images. Built on a convolutional neural network (CNN) architecture, specifically a refined YOLOv8x model, LeAF has been trained on a massive dataset of over 1 million pest images, encompassing 3,580 different agricultural pest classes. This extensive training ensures high accuracy and reliability, allowing it to recognize even subtle differences between pest species.<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXclKXzCBOvRQBSbUghfVl6765koeh82eaD0U6izrPdhYhQAZWdJ9eOU-frDYyACKJbydVprQy95LAd2vvKiaZ1vCQpO5IJ65noeY5HexoyTxQL4CPPMtOSPipkyVIMx9W3vDwnt?key=QHnn7PILO5P3XH-4ReMzTztZ" alt=""><figcaption></figcaption></figure>

The LeAF model goes beyond simple classification. It not only identifies the pest in an image, but also provides bounding box detection, precisely pinpointing the pest's location within the image. The LeAF model (to be released in the AIFARMS blog this week) is also lightweight and capable of running on edge devices, such as farmer mobile phones or agricultural robots, which allows for easy model deployment and accessibility for all farmers. This is crucial for on-the-spot analysis and helps in monitoring pest populations across your fields, assisting with targeted treatment strategies.

The model as of today has been integrated within CropWizard as a tool. Simply upload an image containing a suspected pest, and you'll receive both the identification and the model detection, directly integrated into the context of your other questions and CropWizard's broader knowledge base.

With LeAF, CropWizard now provides an even more comprehensive approach to pest analysis. You can use this capability to quickly diagnose pest problems, track infestations, and get more informed treatment recommendations – all within the familiar CropWizard interface. This integration empowers you with faster, more accurate decision-making, leading to healthier crops, reduced pesticide use, and increased efficiency in your farming operations. It is constantly being improved, with plans to expand, and be retrained to perform even better with testing and feedback.<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeGexIZKEBBJedSJm02jlyIpBRVkbAl4hm2bIlEFsW91uy-JuGLZudo6EEct6Iwy-ZCiR45OEQzVHFryGwTfqkMoFmksH7R6-M3IemgMG177lAFU4dfhVwRGbrS4q8NmH1UPSxOVQ?key=QHnn7PILO5P3XH-4ReMzTztZ" alt=""><figcaption></figcaption></figure>

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.uiuc.chat/cropwizard/pest-detection-tool.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
