<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: surya saketh</title>
    <description>The latest articles on DEV Community by surya saketh (@surya_saketh_2ad73f686fdf).</description>
    <link>https://dev.to/surya_saketh_2ad73f686fdf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3664214%2F0db3e009-044b-4199-84dd-61ee7375c598.png</url>
      <title>DEV Community: surya saketh</title>
      <link>https://dev.to/surya_saketh_2ad73f686fdf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/surya_saketh_2ad73f686fdf"/>
    <language>en</language>
    <item>
      <title>AI-Based Medicinal Plant Leaf Analysis System</title>
      <dc:creator>surya saketh</dc:creator>
      <pubDate>Fri, 03 Apr 2026 14:24:31 +0000</pubDate>
      <link>https://dev.to/surya_saketh_2ad73f686fdf/ai-based-medicinal-plant-leaf-analysis-system-3pj6</link>
      <guid>https://dev.to/surya_saketh_2ad73f686fdf/ai-based-medicinal-plant-leaf-analysis-system-3pj6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Medicinal plants play a critical role in traditional healthcare systems such as Ayurveda. However, identifying plant species and detecting diseases from leaf images typically requires expert knowledge.&lt;/p&gt;

&lt;p&gt;To address this, I built a full-stack AI application that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify medicinal plants from leaf images&lt;/li&gt;
&lt;li&gt;Detect whether the leaf is healthy or diseased&lt;/li&gt;
&lt;li&gt;Provide structured outputs such as scientific name, medicinal properties, and care recommendations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project combines computer vision, backend APIs, and a modern frontend into a single deployable system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsu0q2o54n8voafqtdwc1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsu0q2o54n8voafqtdwc1.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem Statement
&lt;/h2&gt;

&lt;p&gt;The main challenges this project addresses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lack of accessible tools for plant identification&lt;/li&gt;
&lt;li&gt;Difficulty in early disease detection&lt;/li&gt;
&lt;li&gt;Dependence on domain experts&lt;/li&gt;
&lt;li&gt;Limited awareness of medicinal uses and remedies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was to build a system that makes this process automated and accessible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem Statement
&lt;/h2&gt;

&lt;p&gt;The main challenges this project addresses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lack of accessible tools for plant identification&lt;/li&gt;
&lt;li&gt;Difficulty in early disease detection&lt;/li&gt;
&lt;li&gt;Dependence on domain experts&lt;/li&gt;
&lt;li&gt;Limited awareness of medicinal uses and remedies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was to build a system that makes this process automated and accessible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;System Architecture&lt;/p&gt;

&lt;p&gt;The system is divided into three layers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frontend&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image upload interface&lt;/li&gt;
&lt;li&gt;Displays prediction results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Backend (FastAPI)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handles file uploads&lt;/li&gt;
&lt;li&gt;Runs model inference&lt;/li&gt;
&lt;li&gt;Returns structured JSON response&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;ML Model&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trained on labeled medicinal plant datasets&lt;/li&gt;
&lt;li&gt;Classifies plant type and health status&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Model Training Pipeline
&lt;/h2&gt;

&lt;p&gt;The model training involved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Organizing dataset into class folders&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Preprocessing:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  1. Resizing to 224×224
  2. Normalization
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Data augmentation:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 1. Rotationz
 2. Flipping
 3. Color jitter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Train/validation/test split&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Transfer learning was used with a pretrained model to improve performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prediction Workflow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;User uploads a leaf image&lt;/li&gt;
&lt;li&gt;Backend saves the image temporarily&lt;/li&gt;
&lt;li&gt;Image is passed to the trained model&lt;/li&gt;
&lt;li&gt;Model outputs:
    class_name, confidence, class_index&lt;/li&gt;
&lt;li&gt;Backend maps the class to structured data using a knowledge file&lt;/li&gt;
&lt;li&gt;Response is returned to frontend&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30mlhvvu5cep9y4ytor1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30mlhvvu5cep9y4ytor1.png" alt=" " width="800" height="817"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Medicinal plant identification&lt;/li&gt;
&lt;li&gt;Disease detection (healthy vs diseased)&lt;/li&gt;
&lt;li&gt;Confidence-based predictions&lt;/li&gt;
&lt;li&gt;Knowledge integration (scientific name, properties, remedies)&lt;/li&gt;
&lt;li&gt;Unknown class handling for non-medicinal inputs&lt;/li&gt;
&lt;li&gt;Real-time API-based inference&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This project demonstrates how AI can be used to make traditional knowledge systems more accessible. By combining computer vision with a structured knowledge base, the system provides meaningful insights beyond basic classification.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;br&gt;
GitHub Repo: &lt;a href="https://github.com/saketh10-10/Medicinal-plant-leaf-disease-detection" rel="noopener noreferrer"&gt;https://github.com/saketh10-10/Medicinal-plant-leaf-disease-detection&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:7428844593728688129/?originTrackingId=1XU4D7RC3aOmWI7Q%2F7P%2BGg%3D%3D" rel="noopener noreferrer"&gt;https://www.linkedin.com/feed/update/urn:li:activity:7428844593728688129/?originTrackingId=1XU4D7RC3aOmWI7Q%2F7P%2BGg%3D%3D&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
