0% found this document useful (0 votes)
15 views

finplnt

The document outlines a project for developing an AI-powered plant disease detection system using Convolutional Neural Networks (CNNs) in PyTorch, aimed at assisting farmers by providing real-time disease identification and treatment suggestions. It addresses the limitations of traditional manual inspection methods and proposes a web and mobile solution that enhances agricultural productivity and sustainability. The system incorporates various technologies for image processing, user interface design, and secure payment handling, with future enhancements planned for broader accessibility and functionality.

Uploaded by

davon26006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

finplnt

The document outlines a project for developing an AI-powered plant disease detection system using Convolutional Neural Networks (CNNs) in PyTorch, aimed at assisting farmers by providing real-time disease identification and treatment suggestions. It addresses the limitations of traditional manual inspection methods and proposes a web and mobile solution that enhances agricultural productivity and sustainability. The system incorporates various technologies for image processing, user interface design, and secure payment handling, with future enhancements planned for broader accessibility and functionality.

Uploaded by

davon26006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

CHAPTER 1

INTRODUCTION

1.1 OVERVIEW OF PROJECT

This project focuses on developing an AI-powered plant disease detection system using
Convolutional Neural Networks (CNNs) in PyTorch. The system allows users to upload a leaf
image, which is then analyzed to detect whether the plant is affected by fungus or other
diseases. The model is trained on the Plant leaf dataset, which contains images of plant leaves
classified into 39 different categories of diseases and healthy plants.
Once the disease is identified, the system displays the disease name, provides a brief
description, and suggests appropriate medicines or treatments to cure it. Additionally, the
platform includes a medicine purchase module, enabling users to buy relevant treatments
directly.
This project aims to assist farmers and agricultural professionals by providing an easy-to-
use web-based or mobile solution for real-time plant disease detection, reducing crop losses
and improving productivity. This technology not only helps in reducing dependency on
manual inspection but also minimizes the use of unnecessary pesticides, promoting sustainable
farming practices. the system can be expanded to support multiple crops and regions, further
enhancing its impact on global agriculture.
The system leverages deep learning and image processing techniques to enhance the
accuracy of disease classification, ensuring reliable results. By automating the disease
detection process, it helps farmers make quick and informed decisions, ultimately improving
crop health. Future enhancements may include real-time detection using Edge AI devices,
multi-language support for accessibility, and a chatbot-based assistant for disease-related
queries. This AI-driven approach has the potential to revolutionize precision agriculture,
making plant disease diagnosis faster, easier, and more efficient.

1
1.2 PROBLEM DEFINITION

Agriculture plays a vital role in global food production, but plant diseases pose a serious threat
to crop yield and quality. Millions of farmers, especially in rural areas, lack access to agricultural
experts, making it difficult to diagnose plant diseases accurately. Traditional disease detection
methods, such as manual inspection, are time-consuming, subjective, and often inaccurate. While
laboratory-based testing provides precise results, it is expensive and not feasible for small-scale
farmers. Additionally, different plant diseases may exhibit similar symptoms, further increasing
the chances of misdiagnosis and ineffective treatment, which ultimately impacts the health of crops
and food supply chains.
Incorrect or excessive use of pesticides due to misdiagnosis not only increases farming costs but
also harms the environment by contaminating soil and water. To address these challenges, there is
a need for an AI-powered, automated system that can accurately detect plant diseases from leaf
images and suggest appropriate treatments. By leveraging deep learning and computer vision, such
a system can help farmers quickly identify diseases, take preventive measures, and improve overall
agricultural productivity, ultimately supporting sustainable and efficient farming practices.
Furthermore, integrating such a system into web and mobile applications can make disease
detection easily accessible to farmers, even in remote areas. With real-time analysis and treatment
recommendations, farmers can take immediate action to protect their crops, preventing large-scale
infections. The system can also be expanded to include multiple crop types and different
environmental conditions, increasing its usability across various agricultural sectors.

2
CHAPTER 2

SYSTEM STUDY

2.1 EXISTING SYSTEM

In the existing system, plant disease detection primarily relies on manual inspection by
farmers or agricultural experts, which is time-consuming, subjective, and prone to human
error. Farmers often depend on their own experience or visual observations to identify
diseases, leading to misdiagnosis and improper pesticide use. In some cases, laboratory testing
is used for disease identification, but it is expensive, requires specialized equipment, and is not
easily accessible to small-scale farmers. Additionally, some existing image-based disease
detection systems lack accuracy, scalability, and real-time processing capabilities, making
them ineffective for large-scale agricultural applications. Due to these limitations, farmers
struggle to detect plant diseases early, resulting in significant crop losses, lower productivity,
and increased farming costs.

2.2 PROPOSED SYSTEM

The proposed system introduces an AI-powered plant disease detection model using
Convolutional Neural Networks (CNNs) in PyTorch, capable of classifying leaf images into
39 different categories of plant diseases with high accuracy. The system allows users to upload
a leaf image, which is then analyzed by a deep learning model trained on the PlantVillage
dataset. Once the disease is identified, the system displays the disease name, provides a brief
description, and suggests appropriate medicines or treatments. Additionally, the platform
includes a medicine purchase module, allowing users to buy the recommended treatments
directly. This automated approach eliminates the need for manual disease identification,
enabling real-time, accurate, and accessible disease detection for farmers. By integrating deep
learning, web, and mobile technologies, the system helps farmers prevent crop losses, reduce
dependency on experts, and promote sustainable farming practices, ultimately improving
agricultural productivity and food security.

3
2.3 PROBLEM DESCRIPTION

The Plant diseases are a major concern in agriculture, leading to significant crop losses and
affecting farmers' livelihoods and food security. Early detection and accurate diagnosis of
plant diseases are crucial for effective treatment and prevention, but traditional methods of
disease identification rely heavily on manual inspection by farmers or agricultural experts.
This process is time-consuming, subjective, and prone to human error, often resulting in
misdiagnosis and improper pesticide usage. Additionally, laboratory-based testing, while
accurate, is expensive, not easily accessible, and impractical for small-scale farmers. The lack
of an efficient, scalable, and automated disease detection system further exacerbates the
problem, leading to delayed treatment and reduced agricultural productivity. In many cases,
farmers apply excessive pesticides, which not only increases costs but also harms the
environment, affecting soil quality and biodiversity.
With advancements in Artificial Intelligence (AI) and Deep Learning, an automated solution
can help overcome these challenges by providing real-time, accurate, and accessible disease
detection. This project aims to develop an AI-powered plant disease detection system using
Convolutional Neural Networks (CNNs) in PyTorch. The system will allow users to upload
leaf images, detect the presence of fungus or other diseases, and provide treatment
recommendations. By automating disease detection and integrating it with e-commerce and
mobile/web platforms, this system will help farmers take immediate action, reduce crop losses,
and promote sustainable farming practices. The use of machine learning algorithms ensures
that the system continuously improves its accuracy, making it a reliable tool for farmers.
Future enhancements can include multi-language support, chatbot assistance, and real-time
field monitoring, making the solution even more accessible and practical for global agriculture.

4
2.4 TECHNOLOGIES ADOPTED

1. Deep Learning and Machine Learning:

Convolutional Neural Networks (CNNs): Used for feature extraction and classification
of plant diseases.

PyTorch – A deep learning framework for building and training the CNN model.

2. Image Processing & Data Handling:

OpenCv: Used for preprocessing images (resizing, normalization, and enhancement).

NumPy & Pandas – For handling image data and model inputs.

3. Web Development (Frontend & Backend):

HTML, CSS, JavaScript: For designing the user-friendly front-end interface.

Flask (Python Framework): Used as the backend to handle image uploads, process
requests, and run the AI model.

4. Model Deployment & Execution:

Flask API: To integrate the trained CNN model with the web application.

Google Colab / Local GPU: For training the deep learning model efficiently.

5. E-commerce Module (Without Database):

Static JSON or Hardcoded Data: For displaying medicine recommendations and


treatment options without a database.

Payment Gateway Integration: If allowing users to buy medicines directly through


hyperlinkof official website.

6. Mobile & Offline Accessibility:

TensorFlow Lite: Allows the model to run on mobile devices without requiring an internet
connection.

5
CHAPTER 3
SYSTEM DESIGN AND DEVELOPMENT

3.1 USE CASE DIAGRAM

6
3.2 SYSTEM FLOW DIAGRAM

7
3.3 INPUT DESIGN

1. User Input Method – Users can upload a leaf image through a file selection button or a
drag-and-drop interface, making the process simple and efficient. The interface is designed to
be intuitive and mobile-friendly, ensuring that users from different backgrounds, including
farmers with minimal technical knowledge, can use it with ease.
2. Accepted Input Formats – The system supports commonly used image formats such as
JPG, PNG, and JPEG, allowing flexibility for images taken from various devices like
smartphones, digital cameras, and scanned documents. This ensures that users do not face
compatibility issues when uploading images for disease detection.
3. Input Validation & Constraints – The system performs checks to ensure that only valid
image files are uploaded. It restricts file sizes to an optimal limit, preventing large images
from slowing down processing. If a user tries to upload an incorrect format or an excessively
large file, the system prompts a clear error message, guiding them to correct their input.
4. Preprocessing of Input Data – After the image is uploaded, automated preprocessing
techniques are applied, including image resizing, contrast enhancement, and noise reduction
using OpenCV. These steps help in improving the clarity of the image, allowing the deep
learning model to extract features more effectively. This ensures that even low-quality or
unevenly lit images are standardized for accurate classification.
5. Error Handling & Feedback – If an invalid file is uploaded, the system instantly notifies
the user with a descriptive error message such as "Invalid file format, please upload a JPG or
PNG image." Additionally, if the image is blurry or unrecognizable, the system may prompt
users to upload a clearer image for better results. Providing real-time feedback ensures a
smooth user experience, reducing frustration and improving usability.

8
3.4 OUTPUT DESIGN

1. Disease Detection Result:

Once the image is analyzed, the system displays the detected disease name (e.g., "Tomato
Leaf Mold" or "Healthy Leaf"). The detection process is fast and efficient, ensuring real-time
feedback for immediate action.

2. Confidence Score & Accuracy:

The system provides a confidence percentage (e.g., "Prediction Accuracy: 92%") to


indicate how certain the AI model is about the disease classification. A lower score may
prompt users to upload a clearer image for better results.

3. Recommended Treatment & Precautionary Measures:

Based on the detected disease, the system suggests appropriate treatments, such as
fungicides, pesticides, or organic remedies. Additionally, it provides precautionary steps
to prevent further spread, ensuring effective disease management.
4. User-Friendly Report Generation:

The system allows users to download a detailed report of the diagnosis, including the
detected disease, confidence score, treatment suggestions, and preventive measures. This
helps farmers and researchers maintain records for future reference.

9
CHAPTER 4
SYSTEM TESING

4.1 FUNCTIONAL TESTING

Functional testing ensures that all components of the Plant Disease Detection System work
correctly according to the defined requirements. It helps validate the performance of the AI
model, the accuracy of disease detection, and the correctness of medicine recommendations.
The primary objective is to ensure seamless integration between the modules and provide users
with a smooth and efficient experience. Various test cases have been executed to check whether
the system can handle different types of inputs, such as various image formats, different plant
species, and varying lighting conditions in images. The disease detection algorithm was tested
with a dataset containing multiple disease categories to evaluate its precision and recall.
Additionally, error handling mechanisms were tested to ensure the system provides meaningful
feedback when incorrect inputs are uploaded. The recommendation system was also evaluated
to verify if the suggested treatments align with the detected diseases. Overall, the functional
testing phase confirmed that the system meets its intended functionality, ensuring reliability and
accuracy for end users.

10
TEST CASES

Test
Test Case Actual Outcome Status
Case Steps to Expected
Description
ID Execute Outcome
1.Click "Upload The system should Pass
TC-001 Image upload Image" button. accept the image Image uploaded
Functionality 2. Select leaf and proceed to the successfully and
image. processed.
detection phase.
3. Click"Submit".
1.Upload image The system should Disease detected Pass
TC-002 Disease of a diseased correctly identify accurately with
Detection leaf. the disease with a confidence score
Accuracy 2.Click "Submit" confidence score displayed.
3.Observe the above the threshold.
disease name.
Check if relevant The system should Correct medicines Pass
TC-003 Medicine medicines/pesticid provide appropriate recommended based
Recommendatio es are suggested. medicines on detected disease.
corresponding to the
identified disease.

Supplements 1.Select The system should Purchase completed Pass


TC-004 Purchase Module medicine. process the successfully with
2. Proceed purchase securely confirmation
confirm purchase. and generate a message.
confirmation
message.

System The system should Image processed Pass


After submission
TC-005 Response Time process the image and results
and measure the and provide results displayed within 5
time to display within 5 seconds. seconds.
results.

11
TEST CASE REPORT

1. Introduction
This report summarizes the functional testing conducted on the Netflix Data Analysis project,
focusing on validating core functionalities such as page loading, data filtering, and data
visualization. The primary goal was to ensure that the application behaves as expected and meets
user requirements.

TEST SUMMARY

Total Test Cases Executed: 5


• Total Passed: 5
• Total Failed: 0

2. Test Cases Overview

• TC-001: Home Page Load Result: Pass.


• TC-002: Data Analysis Page Load Result: Pass
• TC-003: Year Slider Functionality Result: Pass.
• TC-004: Content Type Filter Functionality Result: Pass
• TC-005: Country Filter Functionality Result: Pass.

3. Conclusion
All test cases were successfully executed, confirming that the Netflix Data Analysis application
operates as intended. The project meets its functional requirements, and all core functionalities
work correctly. The application is ready for further testing phases and potential deployment.

12
CHAPTER 5
SYSTEM IMPLEMENTATION AND MAINTENANCE

5.1 RESULT
1. Data Insights:

Content Overview: The analysis provided a detailed view of plant diseases detected,
including the types of diseases, their frequency, and severity levels based on the uploaded
images.

2. User Interaction:

Upload : Users could efficiently upload images and receive accurate disease detection
results along with suggested medicines. The interface allowed users to filter results by disease
type for a more focused experience.

3. Plant Disease Pattern:

Analysis: Identified the most frequent diseases affecting plants, providing insights into
common agricultural challenges.

4. User Feedback:

Usability Testing: Users reported a smooth experience in uploading images and


navigating results, suggesting the inclusion of more diseases and treatment options.

Interactivity: Users appreciated the clear presentation of detection results


and medicine recommendations.

13
5. Performance Metrics:

Detection Speed: The application processed images quickly, maintaining user


engagement.

Scalability: Tests confirmed that the system could handle multiple concurrent uploads
efficiently.

6. Future Enhancements:

Expanded Disease Dataset: Incorporate additional plant diseases and symptoms.

AI Based Recommendations: Enhance medicine suggestions using advanced AI


algorithms.

5.2 SYSTEM SECURITY MEASURES

1. Data Encryption:

 Ensures all sensitive data, including user details and transaction information, is encrypted
using SSL/TLS protocols during transmission.

 Encrypts stored data, especially for payment information in the medicine purchase module.

2. User Authentication:
 Implements secure login mechanisms to prevent unauthorized access to the system.
 Uses hashed passwords and authentication tokens for user session.

3. Secure API Integration:


 Uses API keys and OAuth tokens to secure communication with external services, such as
payment gateways and medicine databases.
 Validates API requests to prevent unauthorized access.

14
4. Input Validation:

 Implements validation for image uploads to prevent execution of malicious code.

 Uses whitelisting and sanitization techniques for all input fields to protect against SQL
injection and XSS attacks.

5. Secure Payment Handling:

 Integrates PCI DSS-compliant payment gateways to ensure safe processing of


payments in the medicine purchase module.

 Does not store sensitive payment information locally.

6. Regular Security Audits:

 Conducts periodic security audits and vulnerability assessments.

 Utilizes security monitoring tools to detect and respond to threats promptly.

7. User Education and Awareness:

 Provides guidelines and tips for users on securely using the system.

 Educates users on recognizing and avoiding potential security threats, such as phishing
links during the medicine purchase process.

15
5.3 MODULES

1. Home Module:

 Serves as the main interface for users.


 Provides an image upload option for disease detection.
 Displays system features and basic guidance on usage.
 Showcases a brief introduction to plant disease detection and its benefits.
 Includes a navigation menu to access different sections of the application.

2. AI Engine Module:

 Processes uploaded images using a CNN-based deep learning model.


 Identifies plant diseases and provides the disease name along with confidence scores.
 Retrieves disease-related information and recommended treatments.
 Ensures real-time analysis of the uploaded images to provide quick results.
 Stores previously detected disease results for reference and comparison.


3. Supplements Module:

 Displays suggested medicines, pesticides, or fertilizers based on detected diseases.


 Provides an option to purchase recommended treatments.
 Integrates with secure payment gateways for transactions.
 Offers additional tips on how to prevent plant diseases in the future.
 Includes a section for user reviews and feedback on recommended supplements.

16
CONCLUSION

The project Plant Disease Detection System successfully implements deep learning
techniques to identify plant diseases and recommend suitable treatments, enhancing
agricultural efficiency and plant health management. By leveraging Convolutional Neural
Networks (CNNs) for image analysis, the system accurately detects diseases in uploaded leaf
images, providing users with real-time insights into potential infections. This technology helps
farmers, gardeners, and agricultural researchers take immediate corrective actions, reducing
crop losses and improving overall yield. The system offers an intuitive and user-friendly
interface, allowing seamless image uploads and quick disease detection, ensuring accessibility
for users with varying levels of technical expertise. Additionally, the supplements module
provides users with treatment options, enabling them to purchase pesticides and fertilizers
directly through the system. The AI Engine Module ensures accurate and fast processing,
leveraging a structured disease database to enhance future detection accuracy. Future
improvements may include real-time disease monitoring, AI-driven advisory support, and an
expanded training dataset to improve the system’s predictive capabilities. Ultimately, this
project demonstrates the power of AI-driven automation in agriculture, offering a cost-
effective, data-driven approach to plant disease management and contributing to sustainable
farming practices and higher agricultural productivity.

17
CHAPTER 6
BIBLIOGRAPHY AND WEB REFERENCE

6.1 SAMPLE CODE


MAIN PAGE :

import os

from flask import Flask, redirect, render_template, request

from PIL import Image

import torchvision.transforms.functional as TF

import CNN

import numpy as np

import torch

import pandas as pd

disease_info = pd.read_csv('disease_info.csv' , encoding='cp1252')

supplement_info = pd.read_csv('supplement_info.csv',encoding='cp1252')

model = CNN.CNN(39)

model.load_state_dict(torch.load("plant_disease_model_1_latest.pt"))

model.eval()

def prediction(image_path):

image = Image.open(image_path)
18
image = image.resize((224, 224))

input_data = TF.to_tensor(image)

input_data = input_data.view((-1, 3, 224, 224))

output = model(input_data)

output = output.detach().numpy()

index = np.argmax(output)

return index

app = Flask(__name__)

@app.route('/')

def home_page():

return render_template('home.html')

@app.route('/index')

def ai_engine_page():

return render_template('index.html')

@app.route('/submit', methods=['GET', 'POST'])

def submit():

if request.method == 'POST':

image = request.files['image']

filename = image.filename

file_path = os.path.join('static/uploads', filename)

image.save(file_path)

print(file_path)
19
pred = prediction(file_path)

title = disease_info['disease_name'][pred]

description =disease_info['description'][pred]

prevent = disease_info['Possible Steps'][pred]

image_url = disease_info['image_url'][pred]

supplement_name = supplement_info['supplement name'][pred]

supplement_image_url = supplement_info['supplement image'][pred]

supplement_buy_link = supplement_info['buy link'][pred]

return render_template('submit.html' , title = title , desc = description , prevent =


prevent ,

image_url = image_url , pred = pred ,sname = supplement_name ,


simage = supplement_image_url , buy_link = supplement_buy_link)

@app.route('/market', methods=['GET', 'POST'])

def market():

return render_template('market.html', supplement_image =


list(supplement_info['supplement image']),

supplement_name = list(supplement_info['supplement name']),


disease = list(disease_info['disease_name']), buy = list(supplement_info['buy link']))

if __name__ == '__main__':

app.run(debug=True)

20
HOME PAGE :

import {% extends 'base.html' %}

{% block pagetitle %}

{% endblock pagetitle %}

{% block body %}

<style>

body{ overflow-x: hidden;

}@media only screen and (max-width: 830px) {

.laptop{

display: none;

@media (min-width:830px) and (max-width: 1536px){

.mobile{

display: none;

<p class="lead" style="font-weight: 500;color: black;">Please🙏 Open This Site

On Laptop/PC 💻 Screen Only</p>

<p class="lead" style="font-weight: 500;color: black;">Thank You 🤝</p>

</div>

</div>

</div>

21
<div class="row mb-5 text-center text-white laptop">

<div class="col-lg-10 mx-auto">

<h1 class="display-4" style="padding-top: 2%;font-weight: 400;color: rgb(4, 54,


4);"><b>🍁Plant Disease

Detection🍁 </b></h1>

<p class="lead" style="font-weight: 500;color: black;">This AI Engine Will Help


To Detect Disease From Following Fruites And Veggies</p>

</div>

</div>

<center class="laptop">

<a href="/index">

<button class = "bttn-pill bttn-lg btn-success"><b style="color: black;">AI


Engine</b></button>

</a>

</center>

<div class="row p-5 laptop">

<div class=" col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 90%;height: 92%;">

<img src="https://post.healthline.com/ 49.jpg" width="250" height="250">

<center><p class="lead" style="font-weight: 500;color: black;">Apple</p></center>

</div>

</div>

22
<div class="col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 90%;height: 92%;">

<img src="https://www.supermarketperimeter.com/ext/resources/0430-
blueberries.png?t=1588260305&width=1080" width="250" height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Blueberry</p></center>

</div>

</div>

<div class=" col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 90%;height: 92%;">

<img src="https://img.webmd.com/ slideshow.jpg" width="250" height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Cherry</p></center>

</div>

</div>

<div class=" col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 90%;height: 92%;">

<img src="https://www.may/corn.jpg" width="250" height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Corn</p></center>

</div>

</div>

23
</div>

<div class="row p-5 laptop">

<div class=" col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 90%;height: 92%;">

<img src="https://i.ndtvimg. 61443376353.jpg" width="250" height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Grape</p></center>

</div>

</div>

<div class="col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 90%;height: 92%;">

<img src="https://www. /image.jpg" width="250" height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Orange</p></center>

</div>

</div>

<div class=" col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 90%;height: 92%;">

<img src="https://img. _rf_peaches.jpg?resize=650px:*" width="250"


height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Peach</p></center>

</div

24
<center><p class="lead" style="font-weight: 500;color:
black;">Soybean</p></center>

</div>

</div>

<div class=" col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 90%;height: 92%;">

<img src="https://post.healthline2x549.jpg" width="250" height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Squash</p></center>

</div>

<center class="laptop">

<div class="row p-5">

<div class=" col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 45%;height: 92%;">

<img src="https://images.indianexpress.com/2020/02/strawberry-1200.jpg"
width="250" height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Strawberry</p></center>

</div>

</div>

<div class="col">

<div class="p-3 bg-white shadow rounded-lg" style="width: 45%;height: 92%;">

25
<img src="https://images-
prod.healthline.com/hlcmsresource/images/AN_images/tomatoes-1296x728-
feature.jpg" width="250" height="250">

<center><p class="lead" style="font-weight: 500;color:


black;">Tomato</p></center>

</div>

</div>

</div>

</center>

{% endblock body %}

INDEX PAGE :

<html>
{% extends 'base.html' %}
{% block pagetitle %}
{% endblock pagetitle %}
{% block body %}
<div>
<div class="container">
<div class="row mb-5 text-center text-white">
<div class="col-lg-10 mx-auto">
<h1 class="display-4" style="padding-top: 2%;font-weight: 400;color: rgb(4,
54, 4);"><b>🍀AI Engine🍀</b></h1>
<p class="lead" style="font-weight: 500;color: black;">Let AI Engine Will
Help You To Detect Disease</p>
</div>
</div>

26
<!-- End -->
<div class="row ">
<div class="col mx-auto">
<div class="p-5 bg-white shadow rounded-lg" style="height: 95%;">
<h5><b>Why is it necessary to detect disease in plant ?</b></h5>
<p>Plant diseases affect the growth of their respective species. In addition,
some research gaps are
identified from which to obtain greater transparency for detecting
diseases in plants, even
before their symptoms appear clearly.
diagnosis is one of the most important aspects of a plant pathologist's
training. Without proper
identification of the disease and the disease-causing agent, disease
control measures can be a
waste of time and money and can lead to further plant losses. Proper
disease diagnosis is
necessary.
</p>
</div>
<form action="/submit" method="POST" enctype="multipart/form-data">
<div class="custom-file overflow-hidden mb-4">
<input type="file" id="actual-btn" hidden name="image" />
<label for="actual-btn">Choose File</label>
<span id="file-chosen">No file chosen</span>
</div>
<!-- End -->
<h6 class="text-center mb-4 text-muted">
Simply upload your plant's leaf image and then see the magic of AI.
</h6>
<!-- Custom bootstrap upload file-->
<center>
<a class="mx-2"><button type="submit" class="btn btn-outline-

27
success">Submit</button></a>
</center>
</form>
<!-- End -->

</div>
</div>
<div class="col mx-auto">
<div class="p-5 bg-white shadow rounded-lg" style="height: 95%;">
<h5><b>Prevent Plant Disease follow below steps:</b></h5>
<ol>
<li>Follow Good Sanitation Practices.</li>
<li>Fertilize to Keep Your Plants Healthy.</li>
<li>Inspect Plants for Diseases Before You Bring Them Home.</li>
<li>Allow the Soil to Warm Before Planting.</li>
<li>Ensure a Healthy Vegetable Garden By Rotating Crops.</li>
<li>Provide Good Air Circulation</li>
<li>Remove Diseased Stems and Foliage</li>
</ol>
<a target="_blank" href="https://www.thespruce.com/prevent-plant-
diseases-in-your-garden-2539511"
class="mx-2"><button type="button" class="btn btn-outline-
success">More info</button></a>
</div>
</div>
</div>
</div>
</div>

<script>
const actualBtn = document.getElementById('actual-btn');

28
const fileChosen = document.getElementById('file-chosen');

actualBtn.addEventListener('change', function () {
fileChosen.textContent = this.files[0].name
})
</script>

{% endblock body %}

SUPPLEMENT PAGE :

{% extends 'base.html' %}
{% block pagetitle %}
Supplement Market
{% endblock pagetitle %}

{% block body %}

<br>
<div class="row mb-5 text-center text-white">
<div class="col-lg-10 mx-auto">
<h1 class="display-4" style="padding-top: 2%;font-weight: 400;color: rgb(4, 54,
4);"><b>🛒Supplements🛒</b></h1>
<p class="lead" style="font-weight: 500;color: black;">Buy Supplements &
Fertilizer at one place</p>
</div>
</div>
<div class="row p-3">
{% for index in range(0,supplement_name | length) %}
{% if index != 4 %}
<div class="col">

29
<div class=" p-5 bg-white shadow rounded-lg" style="height: 95%;">
<center>
{% if index==3 or index==5 or index==7 or index==11 or index==15 or
index==18 or index==20 or
index==23 or
index==24 or index==25 or index==28 or index==38 %}
<h5>Fertilizer<b style="color: green;"> (Healthy):</b></h5>
{% else %}
<h5>Supplements<b style="color: red;"> (Diseased):</b></h5>
{% endif %}
<br>
<img src={{supplement_image[index]}} width="200" height="250">
<br>
<br>
<h6>For {{disease[index]}}</h6>
<p>{{supplement_name[index]}}</p>

<a target="_blank" href={{buy[index]}}><button type="button" class="btn


btn-success"
style="background-color: #05380b;">Buy Product</button></a>
</center>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endblock body %}

30
6.2 SAMPLE SCREENSHOT

31
32
33
6.2 WEB REFERENCES

1. Convolutional Neural Networks (CNNs) for Image Classification:

 https://www.tensorflow.org/tutorials/images/cnn.
 Provides an in-depth guide on building CNN-based models for image classification, which
was utilized for plant disease detection.

2. Plant Disease Detection using Deep Learning:

 https://www.sciencedirect.com/science/article/pii/S0168169919311872

 Research paper discussing various approaches for plant disease detection using deep
learning.

3. OpenSource Datasets for Plant Disease Identification:

 https://www.kaggle.com/datasets

 A repository of publicly available datasets for training plant disease detection models.

4. HTML and CSS Resources:

 CSS : https://css-tricks.com/

 HTML: https://www.w3schools.com/html/

5. Flask Framework for Web Development:

 https://flask.palletsprojects.com/
 Official documentation for Flask, which was used for developing the backend of the
project.

34

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy