--- title: KaraAgro Cadi AI emoji: 🏆 colorFrom: indigo colorTo: red sdk: gradio sdk_version: 4.40.0 app_file: app.py pinned: false license: openrail --- ## Introduction CADI AI - *Cashew Disease Identification with Artificial Intelligence* - is a demo-application that uses the technology Artificial Intelligence (AI). It looks at drone images of cashew trees and informs the user whether the Cashew tree suffers from: - pest infection - insect/pest stress factors represent the damage to crops by insects or pests - disease - diseased factors represent attacks on crops by microorganisms - abiotic stress - abiotic stress factors represent stress factors caused by non-living factors, e.g. environmental factors like weather or soil conditions or the lack of mineral nutrients to the crop. [KaraAgro AI](https://www.karaagro.com/) developed CADI AI for the initiatives “Market-Oriented Value Chains for Jobs & Growth in the ECOWAS Region (MOVE/Comcashew)” and [FAIR Forward - Artificial Intelligence for All](https://toolkit-digitalisierung.de/en/fair-forward/). Both initiatives are implemented by the Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) on behalf of the German Federal Ministry for Economic Cooperation and Development (BMZ). CADI AI shall support farmers as an early warning system to quickly identify problems in their cashew farms and to keep their crops healthier and more yielding. Please note that the application will not tell you which particular disease or pest a cashew tree suffers from or how to treat it. As with any application that uses AI: Please treat the results with caution because this system can produce wrong results. It is recommended to verify the diagnoses, for example, by seeking advice from a trained agronomist or extension officer before acting upon the diagnoses of the application. ## Problem Statement The threat of pests and diseases to the agricultural sector in Ghana is a constant concern, with climate change contributing to the potential for new and more damaging types of outbreaks (Yeboah et al., 2023). Based on multi-stakeholder engagements conducted by KaraAgro AI, also with women smallholder cashew farmers, stakeholders have identified pest and disease detection and yield estimation as critical concerns. However, the existing methods of identifying agricultural pest and disease outbreaks, such as land surveys and on-site observations by individuals, are limited in their effectiveness and efficiency. Thus, there is a need for more innovative and efficient solutions to improve the monitoring and management of crop health. This highlights a gap in the existing tools and resources, which can be addressed through the use of advanced technologies such as machine learning and image analysis. The creation of an open and accessible cashew dataset with well-labeled, curated, and prepared imagery and an artificial intelligence model and application software that exposes the model to users can be a valuable resource for data scientists, researchers, and social entrepreneurs to develop innovative solutions towards infield pest and disease detection and yield estimation, and through the use of the software, help farmers quickly identify problems in their cashew farms. ## Project Description * ### Data Collection The data collection process was conducted at cashew farms in the Bono Region of Ghana. Two separate trips were made to the farms to accommodate seasonal variations for the diversity of the data. The collection process spanned six days in total. While more continuous data collection across various regions during the cashew blooming cycle could have been beneficial, we still consider the dataset to be sufficiently diverse. This is due to the inclusion of different maturity stages, camera angles, time of capture, and various types of stress morphology in the data collected. Dataset images were captured with the P4 multispectral drone at image resolution of 1600 x 1300 pixels. The images consist of close up shots and distant shots of the cashew plant abnormalities. The total number of images collected were 4,736. * ### Image Pre-processing Preprocessing of the data involved removing crop images in which human figures or faces were accidentally captured. Also blurry images were deleted. * ### Annotation The collected dataset annotation consisted of drawing bounding boxes on the collected images using MakeSense dataset annotation tool. The three classes that were annotated in the process include: - Disease - Abiotic stress - Pest infection * ### Model Training YOLO v5X architecture was employed to construct the model. To enhance the image quality and facilitate efficient processing, the resolution of the images was adjusted to 640 pixels, while maintaining a batch size of 56. The resulting model achieved an mAP of 0.648 and a size of 173.1 MB. ![](https://minohealth-storage.fra1.cdn.digitaloceanspaces.com/karaagro-giz/build-guide-images/val_batch2_pred.jpg)