--- tags: - computer-vision - object-detection - yolo - yolov10 - agriculture - plant-disease - biology - mobile-app - pytorch library_name: ultralytics license: agpl-3.0 --- # 🧅 OnionScan AI : Automated Detection of Onion Diseases ![OnionScan Banner](https://img.shields.io/badge/Project-OnionScan%20AI-success?style=for-the-badge) ![Grade](https://img.shields.io/badge/Grade-19%2F20%20(Excellent)-gold?style=for-the-badge) This model is the core Computer Vision engine behind **OnionScan**, an intelligent mobile application designed for the automated detection of onion diseases in Burkina Faso. It is based on the state-of-the-art **YOLOv10x** architecture, fine-tuned specifically for agricultural diagnosis. ## 🎓 Academic Context This project was developed as a Bachelor’s thesis at the **Burkina Institute of Technology**. * **Thesis Title:** *“Development of an Intelligent Mobile Application for the Automated Detection of Onion Diseases Using Computer Vision: Case of Burkina Faso.”* * **Supervision:** Dr. Rachid Gaetan NABOLLE * **Grade:** 19/20 (4.0/4.0) – Excellent Distinction * **Impact:** Demonstrated the practical use of Artificial Intelligence for sustainable agriculture in Burkina Faso. ## 📱 The OnionScan Application While this repository hosts the AI model weights, the full solution is a comprehensive mobile application designed to adapt to the realities of rural environments (usable by farmers with limited technical skills). **Key Features of the App:** * **Multi-source Input:** Capture images directly via camera, import from the gallery, or use aerial images taken by drones (e.g., DJI Phantom) for large-scale fields. * **Offline / Online Mode:** Fully functional in rural areas with low internet connectivity. * **Actionable Insights:** Provides tailored treatment recommendations based on the AI diagnosis. * **Community & Tracking:** Features a scan history, a community forum for farmer interaction, local notifications, and a built-in help center. ## 🧠 Model Details * **Architecture:** YOLOv10-X (Extra-large for maximum precision) * **Task:** Object Detection (Bounding boxes) * **Classes (4 Onion Diseases):** 1. `alternariose` (Alternaria porri) 2. `fusariose` (Fusarium) 3. `pourriture` (Rot) 4. `virose` (Viral diseases) ## 📊 Training Metrics & Performance The model was trained over 150 epochs (~47 minutes of training time) with carefully tuned hyperparameters (including Mosaic, Mixup, and Class Weights to handle dataset imbalance). **Key Validation Metrics:** * **mAP50:** 58.98 % * **mAP50-95:** 36.88 % * **Precision:** 59.63 % * **Recall:** 54.99 % *(Detailed graphs, F1 curves, and the confusion matrix are available in the `Files and versions` tab of this repository).* ## 💻 How to use the model (Inference) You can test the model directly in Python using the `ultralytics` library: ```python !pip install git+https://github.com/THU-MIG/yolov10.git from huggingface_hub import hf_hub_download from ultralytics import YOLOv10 # Download the best weights from Hugging Face model_path = hf_hub_download(repo_id="Dama12/yolov10x-onion-disease-detection", filename="weights/best.pt") # Load the YOLOv10x model model = YOLOv10(model_path) # Run inference on an image results = model.predict(source="path/to/your/onion_leaf.jpg", conf=0.25) results[0].show() ``` ## ⚖️ License & Citation ### License This model is built upon the YOLOv10 architecture. Therefore, the model weights are released under the **AGPL-3.0 License** (free for academic and research purposes). However, the dataset, methodology, and this specific implementation are intended strictly for **non-commercial research purposes**. If you intend to use this model for commercial applications, please contact the author. ### Citation If you use this model or the OnionScan application concept in your research, please cite it as follows: ```bibtex @misc{dama2025onionscan, author = {Soumana Dama}, title = {Development of an Intelligent Mobile Application for the Automated Detection of Onion Diseases Using Computer Vision: Case of Burkina Faso}, year = {2024}, publisher = {Burkina Institute of Technology}, note = {Bachelor's Thesis, supervised by Dr. Rachid Gaetan NABOLLE} } ``` ## 👨‍💻 Developer Information - **Developed by:** [Soumana Dama](https://soumanadama.netlify.app/) — Full stack developer & AI engineer - Founder & Lead AI Engineer at [Scoinvestigator AI](https://www.scoinvestigator.com/) - **LinkedIn:** [Soumana Dama](https://www.linkedin.com/in/soumana-dama-445096253/) - **GitHub:** [Damasoumana1](https://github.com/Damasoumana1) --- *Built to empower sustainable agriculture through Artificial Intelligence.* 🌾