Project Icon

Automatic-leaf-infection-identifier

自动植物叶片病害识别系统

该项目是一个基于机器视觉和机器学习的自动叶片病害识别系统。系统使用图像处理算法对叶片图像进行分割和特征提取,通过SVM分类器将叶片分类为健康或感染。它能够早期检测植物病害,有助于及时采取防控措施。项目包含完整代码实现,提供数据集创建、模型训练和图形界面等功能。

1268108 (1)

Automatic leaf infection identification

Join the chat at https://gitter.im/Automatic-leaf-infection-identification/Lobby

List of contents

Introduction


(Back to top)

Since, disease detection in plants plays an important role in the agriculture field, as having a disease in plants are quite natural. If proper care is not taken in this area then it can cause serious effects on plants and due to which respective product quality, quantity or productivity is also affected. Plant diseases cause a periodic outbreak of diseases which leads to large-scale death. These problems need to be solved at the initial stage, to save life and money of people. Automatic detection of plant diseases is an important research topic as it may prove benefits in monitoring large fields of crops, and at a very early stage itself it detects the symptoms of diseases means when they appear on plant leaves. Farm landowners and plant caretakers (say, in a nursery) could be benefited a lot with an early disease detection, in order to prevent the worse to come to their plants and let the human know what has to be done beforehand for the same to work accordingly, in order to prevent the worse to come to him too.

This enables machine vision that is to provide image-based automatic inspection, process control. Comparatively, visual identification is labor intensive less accurate and can be done only in small areas. The project involves the use of self-designed image processing algorithms and techniques designed using python to segment the disease from the leaf while using the concepts of machine learning to categorise the plant leaves as healthy or infected. By this method, the plant diseases can be identified at the initial stage itself and the pest and infection control tools can be used to solve pest problems while minimizing risks to people and the environment.

Working


(Back to top)

In the initial step, the RGB images of all the leaf samples were picked up. The step-by-step procedure of the proposed system:

  • RGB image acquisition;
  • Convert the input image from RGB to HSI format;
  • Masking the green-pixels;
  • Removal of masked green pixels;
  • Segment the components;
  • Obtain useful segments;
  • Evaluating feature parameters for classification;
  • Configuring SVM for disease detection.

Colour Transformation: HSI (hue, saturation, intensity) color model is a popular color model because it is based on human perception. After transformation, only the H (hue) component of HSI colour space is taken into account since it provides us with the required information.

Masking Green Pixels: This is performed as green colour pixel represent the healthy region of a leaf. Green pixels are masked based on the specified threshold values.

Segmentation: The infected portion of the leaf is extracted by segmenting the diseased part with other similar coloured parts (say, a brown coloured branch of a leaf that may look like the disease) which have been considered in the masked out image, are filtered here. All further image processing is done over a region of interest (ROI) defined at this stage.

Classification: From the previous results we analyze and evaluate the features like the area of the leaf, percentage(%) of the leaf infected, the perimeter of the leaf, etc., for all the leaf images, and pass it to the SVM classifier.

Installation


(Back to top)

These instructions assume you have git installed for working with Github from command window.

  1. Clone the repository, and navigate to the downloaded folder. Follow below commands.
git clone https://github.com/johri-lab/Automatic-leaf-infection-identifier.git
cd Automatic-leaf-infection-identifier
  1. Install few required pip packages, which are specified in the requirements.txt file .
pip3 install -r requirements.txt

or

sudo python3 setup.py install
  1. That's it. You are ready to test the application.

Dataset creation


(Back to top)

In leaf sampler directory run:

python3 leafdetectionALLsametype.py -i .

or

python3 leafdetectionALLmix.py -i .

leafdetectionALLsametype.py for running on one same category of images (say, all images are infected) and leafdetectionALLmix.py for creating dataset for both category (infected/healthy) of leaf images, in the working directory. Note: The code is set to run for all .jpg,.jpeg and .png file format images only, present in the specified directory. If you wish, you can add more file format support by intoducing it in the conditional statement of line 52 of both the files.

Running


(Back to top)

Run the following code:

python3 GUIdriver.py

where {Browse} is used to select the input image file for classifier

The code runs on two files:

  • First, main.py for image segmentatin and feature extraction.
  • Second, classifier.py is called in main.py for classifying the leaf in the input image as "infected" or "healthy".

leafdetection

Links


(Back to top)

License


(Back to top)

The code in this project is licensed under the MIT license 2018 - Shikhar Johri.

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号