This repository acts as a gateway to the Wadhwani Institute for Artificial Intelligence (Wadhwani AI) pest data set. The data set is primarily intended for training pest recognition models. Such models are used by Wadhwani AI to help cotton farmers make better pest management decisions. Please view our github repository (https://github.com/WadhwaniAI/pest-management-opendata) which provides detailed documentation about the data and also contains scripts to format the data for consumption by popular modelling frameworks.
This repository acts as a gateway to the Wadhwani Institute for Artificial Intelligence (Wadhwani AI) pest data set. The data set is primarily intended for training pest recognition models. Such models are used by Wadhwani AI to help cotton farmers make better pest management decisions.
The pest management project at the Wadhwani Institute for Artificial Intelligence (Wadhwani AI) is an effort to help cotton farmers make better pest management decisions. The project works by asking farmers to install pheromone traps throughout their field designed to capture various types of bollworms. Farmers and farming extension workers periodically empty the trap and use a mobile application developed by the institute to take photos of what they find. The application then uses those photos to provide an action recommendation: whether a pesticide spray is required, and if so the ideal composition and concentration.
To go from mobile phone image to pesticide recommentation, the project uses an object detection model trained to localise and label relevant pests within an image. The S3 bucket around which this repository is designed contains the data used to train and test that model.
The data has been made available via Source Cooperative. Please visit Access Data page and follow instructions from there.
The data directory will house images along with compressed CSVs containing bounding box information for pests in those images. Because of their format, it is unlikely that the CSVs are directly usable by popular modelling toolkits. Users are free to write their own parsers to bridge that gap, or to use one of the parsers provided in this repository. Details on the data format, and the conversion scripts, can be found in the wiki.
We make the data available through our Github repository too. In addition to providing documentation about the data, this repository contains scripts to format the data for consumption by popular modelling frameworks. Please see the wiki for more information.
Clone the repository and download the data (10s of GB); within a terminal emulator:
The dataset is also accesible via Hugging Face datasets:
More information can be found in our wiki, and in the Hugging Face dataset repository.
Most images (data/images/*) were captured using the pest management
mobile application during actual app deployments. This means the
images come with a range of characteristics, both with respect to the
number of pests they contain, and to their contents overall.
Image EXIF information has been generated using ExifTool. Aside from the default values it generates, EXIF info in this data set includes:
Images meant for both model development and model testing are present in this dataset. There are two CSV files to describe each. Pest locations are only present in the development CSV, acting as a resource for training pipelines. The test CSV is meant only to idenfity which images are part of the test set. It is void of any pest information.
The metadata folder is divided into sub-directories, below each are the development and test CSVs previously described:
In this case, the development and test CSVs would be considered to be under version 20220629-1312.
The CSV files are GZIP'd, containing one line per bounding box (pest). The files are structured as follows:
Some rows in the dev CSV contain empty label and geometry values. These images come from user user submissions that did not contain pests.
The metadata format is designed to be minimal. It only assumes that potential downstream pipelines require bounding boxes and corresponding box labels. Example of potential manipulations:
Information not in the metadata: If additional information about the image is required, the image can be read to obtain it:
Pest counts: To train models based on pest counts instead of bounding boxes, the file can be manipulated as follows:
This minimal approach to data formatting makes it unlikely that a
modelling framework will be able to work with the files directly. For
convenience, we provide scripts to go from our minimal format to other
frameworks. See our documentation on how to use those tools; pay
attention to their source code (Python scripts in src/) for further
guidance.
If something is not clear, or does not seem correct, please let us know! This goes for all aspects of this repository: code, data, and documentation. Issues and pull requests are welcome. You can also reach out through email: agri-ai@wadhwaniai.org.