🌿Cotton Plant Disease Prediction & Get Cure App using Artificial Intelligence

I developed “🌿Cotton Plant Disease Prediction & Get Cure App” using Artificial Intelligence especially Deep learning. As Farmer, I know Farmer can’t solve Farm’s complex and even small problems due to lack of perfect education. So as AI enthusiastic I decided to solve this problem using the latest technology like AI.

I just took baby step and start to collect lots of images of cotton crop plants from my farm. To collect accurate data we need expertise in that domain and as a farmer it help me a lot.

Then I decide which algorithm is best to solve this problem and I select as usual you know “Convolution Neural Network” (CNN). I create my own CNN architecture and it works well on the training and as well as testing dataset.

It gives me more than 98% accuracy on training and validation data set in just 500 epochs. I am trying to increase accuracy with more data and epochs.

After that I have deployed this model on AWS cloud. Please have look.

Model Accuracy & Loss

Tools / IDE

I used Jupyter NoteBook (Google Colab) for model training. used spyder for model deployment on the local system. To use Jupyter NoteBook and Spyder, just install anaconda.

Software Requirments

  • Python == 3.7.7
  • TensorFlow == 2.1.0
  • Keras == 2.4.3
  • NumPy == 1.18.5
  • Flask == 1.1.2

Install above packages using below command in anaconda prompt

pip install tensorflow==2.1.0
pip install Keras==2.4.3
pip install numpy==1.18.5
pip install flask==1.1.2

Training 🌿Cotton Plant Disease Prediction & Get Cure AI App

## Project: Cotton Plant Disease Prediction & Get Cure AI App - IAIP

#import libraries
import keras
from keras.preprocessing.image import ImageDataGenerator
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint
import matplotlib.pyplot as plt

keras.__version__

train_data_path = "/content/drive/My Drive/My ML Project /DL Project/CNN/cotton plant disease prediction/data/train"
validation_data_path = "/content/drive/My Drive/My ML Project /DL Project/CNN/cotton plant disease prediction/data/val"

def plotImages(images_arr):
    fig, axes = plt.subplots(1, 5, figsize=(20, 20))
    axes = axes.flatten()
    for img, ax in zip(images_arr, axes):
        ax.imshow(img)
    plt.tight_layout()
    plt.show()

# this is the augmentation configuration we will use for training
# It generate more images using below parameters
training_datagen = ImageDataGenerator(rescale=1./255,
                                      rotation_range=40,
                                      width_shift_range=0.2,
                                      height_shift_range=0.2,
                                      shear_range=0.2,
                                      zoom_range=0.2,
                                      horizontal_flip=True,
                                      fill_mode='nearest')

# this is a generator that will read pictures found in
# at train_data_path, and indefinitely generate
# batches of augmented image data
training_data = training_datagen.flow_from_directory(train_data_path, # this is the target directory
                                      target_size=(150, 150), # all images will be resized to 150x150
                                      batch_size=32,
                                      class_mode='binary')  # since we use binary_crossentropy loss, we need binary labels

training_data.class_indices



# this is the augmentation configuration we will use for validation:
# only rescaling
valid_datagen = ImageDataGenerator(rescale=1./255)

# this is a similar generator, for validation data
valid_data = valid_datagen.flow_from_directory(validation_data_path,
                                  target_size=(150,150),
                                  batch_size=32,
                                  class_mode='binary')

images = [training_data[0][0][0] for i in range(5)]
plotImages(images)

model_path = '/content/drive/My Drive/My ML Project /DL Project/CNN/cotton plant disease prediction/v3_red_cott_dis.h5'
checkpoint = ModelCheckpoint(model_path, monitor='val_accuracy', verbose=1, save_best_only=True, mode='max')
callbacks_list = [checkpoint]

#Building cnn model
cnn_model = keras.models.Sequential([
                                    keras.layers.Conv2D(filters=32, kernel_size=3, input_shape=[150, 150, 3]),
                                    keras.layers.MaxPooling2D(pool_size=(2,2)),
                                    keras.layers.Conv2D(filters=64, kernel_size=3),
                                    keras.layers.MaxPooling2D(pool_size=(2,2)),
                                    keras.layers.Conv2D(filters=128, kernel_size=3),
                                    keras.layers.MaxPooling2D(pool_size=(2,2)),                                    
                                    keras.layers.Conv2D(filters=256, kernel_size=3),
                                    keras.layers.MaxPooling2D(pool_size=(2,2)),

                                    keras.layers.Dropout(0.5),                                                                        
                                    keras.layers.Flatten(), # neural network beulding
                                    keras.layers.Dense(units=128, activation='relu'), # input layers
                                    keras.layers.Dropout(0.1),                                    
                                    keras.layers.Dense(units=256, activation='relu'),                                    
                                    keras.layers.Dropout(0.25),                                    
                                    keras.layers.Dense(units=4, activation='softmax') # output layer
])


# compile cnn model
cnn_model.compile(optimizer = Adam(lr=0.0001), loss='sparse_categorical_crossentropy', metrics=['accuracy'])

# train cnn model
history = cnn_model.fit(training_data, 
                          epochs=500, 
                          verbose=1, 
                          validation_data= valid_data,
                          callbacks=callbacks_list) # time start 16.06

# summarize history for accuracy
plt.plot(history.history['accuracy'])
plt.plot(history.history['val_accuracy'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
# summarize history for loss
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()

history.history

Deploy 🌿Cotton Plant Disease Prediction & Get Cure AI App on Local System

Open Spyder and create a new project then create folders and files according to below hierarchy of the project.

app.py

#Import necessary libraries
from flask import Flask, render_template, request

import numpy as np
import os

from keras.preprocessing.image import load_img
from keras.preprocessing.image import img_to_array
from keras.models import load_model

#load model
model =load_model("model/v3_pred_cott_dis.h5")

print('@@ Model loaded')


def pred_cot_dieas(cott_plant):
  test_image = load_img(cott_plant, target_size = (150, 150)) # load image 
  print("@@ Got Image for prediction")
  
  test_image = img_to_array(test_image)/255 # convert image to np array and normalize
  test_image = np.expand_dims(test_image, axis = 0) # change dimention 3D to 4D
  
  result = model.predict(test_image).round(3) # predict diseased palnt or not
  print('@@ Raw result = ', result)
  
  pred = np.argmax(result) # get the index of max value

  if pred == 0:
    return "Healthy Cotton Plant", 'healthy_plant_leaf.html' # if index 0 burned leaf
  elif pred == 1:
      return 'Diseased Cotton Plant', 'disease_plant.html' # # if index 1
  elif pred == 2:
      return 'Healthy Cotton Plant', 'healthy_plant.html'  # if index 2  fresh leaf
  else:
    return "Healthy Cotton Plant", 'healthy_plant.html' # if index 3

#------------>>pred_cot_dieas<<--end
    

# Create flask instance
app = Flask(__name__)

# render index.html page
@app.route("/", methods=['GET', 'POST'])
def home():
        return render_template('index.html')
    
 
# get input image from client then predict class and render respective .html page for solution
@app.route("/predict", methods = ['GET','POST'])
def predict():
     if request.method == 'POST':
        file = request.files['image'] # fet input
        filename = file.filename        
        print("@@ Input posted = ", filename)
        
        file_path = os.path.join('static/user uploaded', filename)
        file.save(file_path)

        print("@@ Predicting class......")
        pred, output_page = pred_cot_dieas(cott_plant=file_path)
              
        return render_template(output_page, pred_output = pred, user_image = file_path)
    
# For local system &amp; cloud
if __name__ == "__main__":
    app.run(threaded=False) 

index.html

<!doctype html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
        integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link href="https://fonts.googleapis.com/css2?family=Rowdies:[email protected]&amp;display=swap" rel="stylesheet">

    <title>COTTON PLANT DISEASE PREDICTION</title>

    <style>
        * {
            margin: 0px;
            padding: 0px;
            box-sizing: border-box;

        }

        .carousel-inner img {
            height: 70vh;
        }

        form {
            display: flex;
            height: 85vh;
            justify-content: center;
            align-items: center;
            margin-top: 50px;
            width: 60%;
            text-align: center;
            margin: auto;
        }

        .details h2 {
            
            position: relative;
            top: 100px;
            margin: auto;
            color: rgb(18, 231, 231);
            font-size: 3rem;
        }

        label:hover {
            transform: scale(1.03);
        }

        .details h2 {
            /* margin-bottom: 300px; */
            position: relative;
            top: 100px;
            margin: auto;
            color: rgb(18, 231, 231);
            font-size: 3rem;

        }

        .gallery-h1 h1 {

            background-color: rgb(44, 43, 43);
            color: white;
            padding: 20px;
            border-radius: 15px;

        }

        .details h1 {
            color: white;
            padding: 20px;
            border-radius: 15px;
            background-color: rgb(45, 47, 49);
        }

        .upload {

            font-size: 20px;
            background-color: rgb(255, 252, 252);
            border-radius: 20px;
            outline: none;
            width: 315px;
            color: rgb(0, 0, 0);
            border: 3px solid rgb(45, 47, 49);

        }

        ::-webkit-file-upload-button {
            color: white;
            padding: 20px;
            border: 2px solid rgb(129, 129, 129);
            background-color: rgb(129, 129, 129);
            border-radius: 15px;

        }

        ::-webkit-file-upload-button:hover {
            border-radius: 20px;
            border: 2px solid rgb(177, 174, 174);

        }

        input[type="submit"] {
            position: absolute;
            margin-top: 150px;
            padding: 15px 35px;
            background-color: white;
            border-radius: 15px;
            color: black;
            font-size: 1.5rem;
            border: 4px solid rgb(31, 185, 190);
        }

        .carousel-caption {
            background: rgba(24, 25, 26, 0.5);
            border-radius: 10px;
        }

        .carousel-caption h3 {


            font-family: 'Rowdies', cursive;
            color: yellow;
            text-transform: uppercase;
            margin-bottom: 10px;

        }

        .carousel-caption p {
            padding: 7px;

        }

        .img-thumbnail {
            height: 300px;
        }

        .Content-h5 {

            padding: 15px;
            background-color: rgb(153, 156, 150);
            color: white;
            border-radius: 15px;
            margin-bottom: 25px;
        }

        @media only screen and (max-width: 325px) {
            body {
                font-size: x-small;
            }
        }
    </style>


</head>

<body>

    <header>
        <div class="container-fluid">
            <div id="myCarousel" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                    <li data-target="#myCarousel" data-slide-to="1" class=""></li>
                    <li data-target="#myCarousel" data-slide-to="2" class=""></li>
                </ol>
                <div class="carousel-inner">
                    <div class="carousel-item active ">
                        <img src="/static/images/img1.jpg" class="d-block w-100" alt="...">

                        <div class="container">
                            <div class="container background-img3">
                                <div class="carousel-caption">

                                    <h3>Cotton
                                        Plant Disease Prediction AI App</h3>
                                    <p>
                                        Many veterans said that Deep Learning and AI is a threat to our world, but if we
                                        use it properly, we can do many good things today, we will see a small example
                                        of this in which we will be in cotton farming
                                        Find out about the disease
                                    </p>

                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="carousel-item">
                        <img src="/static/images/img2.jpg" class="d-block w-100" alt="...">
                        <div class="container">
                            <div class="carousel-caption">
                                <h3>कपास पेड़ का रोग का अंदाज और उपाय 
                                </h3>
                                <p>
                                    कई दिग्गजों ने कहा कि Deep Learning and AI यह हमारी दुनिया के लिए खतरा है लेकिन अगर
                                    हम इसका सही यूज़ करें तो हम कई अच्छे काम भी कर सकते हैं आज इसी का छोटा सा example
                                    देखेंगे जिसमें हम कपास की खेती में होने वाले
                                    रोग के बारे मे पता करेगें</p>

                            </div>
                        </div>
                    </div>


                    <div class="carousel-item">
                        <img src="/static/images/img3.jpg" class="d-block w-100" alt="...">
                        <div class="container">
                            <div class="container ">
                                <div class="carousel-caption">
                                    <h3>
                                        कपाशीच्या झाडाच्या रोगाचा अंदाज आणि उपाय </h3>
                                    <p>गेल्या काही वर्षांपासून
								 सखोल अभ्यास (Deep Learning) आणि कृत्रिम बुद्धिमत्ता (Artificial Intelligence) हा सर्वात चर्चेचा विषय राहिला आहे, 
								बरेच दिग्गज लोक म्हणतात की हा आपल्या जगासाठी धोका आहे, परंतु जर आपण त्याचा योग्य वापर केला तर आपण आज बर्‍याच चांगल्या गोष्टी करू शकतो. 
								त्याचेच एक उदाहरण हे  की  आपण कापसाचे रोग जाणून त्यावर त्यावर उपाय काढतो.
                                    </p>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
                    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
                    <span class="carousel-control-next-icon" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
        </div>
    </header>

    <section>

        <div class="container-fluid details">
            <h1 class="text-center mt-5 ">Predict Cotton Crop Disease &amp; Get Cure</h1>

            <h2 class="text-center mt-4 mb-4" style="font-size: 2rem;">कपास के पेड कि तस्वीर डालिये</h2>
            <form action="/predict" method="post" enctype="multipart/form-data" onsubmit="showloading()">

                <input type="file" name="image" class="upload">
                <input type="submit" value="Predict">

            </form>
        </div>
    </section>

    <section style="margin-bottom: 100px;">

        <div class="container gallery-h1">

            <h1 class="text-center mt-4 mb-4">Photo Gallery</h1>

            <hr class="mt-2 mb-5">

            <div class="row text-center text-lg-left">

                <div class="col-lg-4 col-md-4 col-6 col-12">
                    <a href="#" class="d-block mb-4 h-100">
                        <img class="img-fluid img-thumbnail" src="/static/images/Gallery1.jpg" alt="">
                    </a>
                </div>
                <div class="col-lg-4 col-md-4 col-6 col-12">
                    <a href="#" class="d-block mb-4 h-100">
                        <img class="img-fluid img-thumbnail" src="/static/images/Gallery2.jpg" alt="">
                    </a>
                </div>

                <div class="col-lg-4 col-md-4 col-6 col-12">
                    <a href="#" class="d-block mb-4 h-100">
                        <img class="img-fluid img-thumbnail" src="/static/images/Gallery3.jpg" alt="">
                    </a>
                </div>
                <div class="col-lg-4 col-md-4 col-6 col-12">
                    <a href="#" class="d-block mb-4 h-100">
                        <img class="img-fluid img-thumbnail" src="/static/images/Gallery4.jpg" alt="">
                    </a>
                </div>
                <div class="col-lg-4 col-md-4 col-6 col-12">
                    <a href="#" class="d-block mb-4 h-100">
                        <img class="img-fluid img-thumbnail" src="/static/images/Gallery5.jpg" alt="">
                    </a>
                </div>
                <div class="col-lg-4 col-md-4 col-6 col-12">
                    <a href="#" class="d-block mb-4 h-100">
                        <img class="img-fluid img-thumbnail" src="/static/images/Gallery6.jpg" alt="">
                    </a>
                </div>

            </div>

        </div>

    </section>


    <section>
        <div class="container Content-h5">

            <h5 style="font-size: 1rem;" class="text-center my-3 contents">
                Delivery Contact:
                [email protected]</h5>

        </div>
    </section>

    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
        integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
        integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
        crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"
        integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV"
        crossorigin="anonymous"></script>

</body>

</html>

healthy_plant.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/css/bootstrap.min.css"
        integrity="sha384-VCmXjywReHh4PwowAiWNagnWcLhlEJLA5buUprzK8rxFgeH0kww/aWY76TfkUoSX" crossorigin="anonymous">

    <title>COTTON PLANT DISEASE PREDICTION</title>

    <style>
        * {
            margin: 0px;
            padding: 0px;
            box-sizing: border-box;
        }

        .border img {
            border-radius: 15px;
            border: 2px solid black;
        }
    </style>
</head>

<body>

    <div>
        <img src="/static/images/cotton palnt banner.png" class="w3-border w3-padding" alt="Indian AI Production"
            style="width:100%">
    </div>

    <div class="container my-2">
        <div class="row mb-5">

            <div class="col-sm" style="margin-bottom: 23px;">
                <span class="border border-primary">
                    <img src="{{ user_image }}" alt="User Image" class="img-thumbnail">
                    
                </span>
            </div>

            <div class="col-sm">

                <div>
                    <h1 style="padding: 15px; background-color: rgb(153, 156, 150); color: white;"
                        class="text-center mb-5 content-h1 rounded">
                        {{pred_output}} </h1>
                </div>
                <div class="details">

                    <h5>

                        There is no disease on the cotton Plant.</br></br>
                        कपास के पेड़ पर कोई बीमारी नहीं है। </br></br>
                        कपाशीच्या झाडावर कोणताही रोग नाही आहे. </br></br>
                        કપાસના ઝાડ ઉપર કોઈ રોગ નથી.</br></br>
                        ಹತ್ತಿ ಮರದ ಮೇಲೆ ಯಾವುದೇ ರೋಗವಿಲ್ಲ..</br></br>
                        పత్తి చెట్టుపై వ్యాధి లేదు..</br></br>
                    </h5>
                </div>
            </div>
        </div>

    </div>
</body>

</html>

healthy_plant_leaf.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/css/bootstrap.min.css"
        integrity="sha384-VCmXjywReHh4PwowAiWNagnWcLhlEJLA5buUprzK8rxFgeH0kww/aWY76TfkUoSX" crossorigin="anonymous">

    <title>COTTON PLANT DISEASE PREDICTION</title>

    <style>
        * {
            margin: 0px;
            padding: 0px;
            box-sizing: border-box;
        }

        .border img {
            border-radius: 15px;
            border: 2px solid black;
        }
    </style>
</head>

<body>

    <div>
        <img src="/static/images/cotton palnt banner.png" class="w3-border w3-padding" alt="Indian AI Production"
            style="width:100%">
    </div>

    <div class="container my-2">
        <div class="row mb-5">

            <div class="col-sm" style="margin-bottom: 23px;">
                <span class="border border-primary">
                    <img src="{{ user_image }}" alt="User Image" class="img-thumbnail">
                    
                </span>
            </div>

            <div class="col-sm">

                <div>
                    <h1 style="padding: 15px; background-color: rgb(153, 156, 150); color: white;"
                        class="text-center mb-5 content-h1 rounded">
                        {{pred_output}} </h1>
                </div>
                <div class="details">

                    <h6>

                        <b>There is no disease on the cotton plant.</b></br>
                        Although the chemical fertilizer has fallen on the leaves of the tree, the leaves are burnt, but
                        there is no need to worry.</br></br>
                        <b>कपास के पेड़ पर कोई बीमारी नहीं है। </b></br>
                        रासायनिक उर्वरक पेड़ की पत्तियों पर गिर गया है, पत्तियां जल गई हैं, लेकिन चिंता करने की कोई
                        जरूरत नहीं है।</br></br>
                        <b>कपाशीच्या झाडावर कोणताही रोग नाही आहे. </b></br>
                        रासायनिक खत झाडाच्या पानावर पडल्यामुळे पान जळल आहे, तरी काही चिंता करायची गरज नाही. <b>मजूरांना
                            कंबर बागवून खत टाकायला सांगा. </b></br></br>
                        <b>કપાસના ઝાડ ઉપર કોઈ રોગ નથી.</b></br></br>
                        <b>ಹತ್ತಿ ಮರದ ಮೇಲೆ ಯಾವುದೇ ರೋಗವಿಲ್ಲ..</b></br></br>
                        <b>పత్తి చెట్టుపై వ్యాధి లేదు..</b></br></br>

                    </h6>
                </div>
            </div>
        </div>
    </div>
</body>

</html>

disease_plant.html

<!doctype html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/css/bootstrap.min.css"
        integrity="sha384-VCmXjywReHh4PwowAiWNagnWcLhlEJLA5buUprzK8rxFgeH0kww/aWY76TfkUoSX" crossorigin="anonymous">

    <title>COTTON PLANT DISEASE PREDICTION</title>

    <style>
        * {
            margin: 0px;
            padding: 0px;
            box-sizing: border-box;
        }

        .card-style {
            background-color: #dcdcdc;

        }

        .content {
            padding: 15px;
            color: white;
            background-color: rgb(153, 156, 150);
            /* font-size: 1rem; */
        }

        @media (max-width: 430px) and (min-width: 200px) {

            .contents {
                font-size: 0.6rem;
                color: chartreuse;
            }

            .content-h1 {

                font-size: 1rem;
            }
        }

        .border img {
            border-radius: 15px;
            border: 2px solid black;
        }
    </style>
</head>

<body>

    <div>
        <img src="/static/images/cotton palnt banner.png" class="w3-border w3-padding" alt="Indian AI Production"
            style="width:100%">
    </div>

    <div class="container my-2">
        <div class="row mb-5">

            <div class="col-sm" style="margin-bottom: 23px;">
                <span class="border border-primary">
                    <img src="{{ user_image }}" alt="User Image" class="img-thumbnail">
                    <!-- <img src="{{pred_output}}" alt="User Image" class="img-thumbnail"> -->

                </span>
            </div>

            <div class="col-sm">

                <div>
                    <h1 style="padding: 15px; background-color: rgb(153, 156, 150); color: white;"
                        class="text-center mb-5 content-h1 rounded">
                        {{pred_output}} </h1>
                </div>

                <h2>Disease Name / रोग का नाम / रोगाचे नाव / રોગ નામ / ರೋಗದ ಹೆಸರು / వ్యాధి పేరు : </span></h2>
                <h3 style="line-height: 100%;">Attack of Leaf Sucking and Chewing Pests <br> चुरडा,मावा रोग <br> લીફ
                    ચૂસીને જીવાતો જીવાતોનો હુમલો <br> ಎಲೆ
                    ಹೀರುವ
                    ಮತ್ತು ಚೂಯಿಂಗ್ ಕೀಟಗಳ ದಾಳಿ <br> ఆకు పీల్చటం మరియు చూయింగ్ తెగుళ్ళ దాడి</h3>
                <hr class="w-100 mx-auto ">
            </div>
        </div>

        <h1> Solution for Disease / रोग का उपचार / रोगाचा उपाय / રોગનો ઉપાય / ರೋಗಕ್ಕೆ ಪರಿಹಾರ / వ్యాధికి పరిష్కారం: </h1>
        <p><strong>Use any one Systemic Insecticide, which contain<i> Flonicamid 50%/ Thiamethoxam 25% WG / Imidacloprid
                    17.8 Sl / Acetamiprid 20% SP.</i></strong></p>
        <p></p>
        <p>किसी भी एक प्रणालीगत कीटनाशक का प्रयोग करें, जिसमें फ्लोनिकमिड ५०% / थियामेथोक्साम 25% WG / इमिडाक्लोप्रिड
            १७.८
            एसएल / एसिटामिप्रिड २०% एसपी है।</p>
        <p>कोणत्याही एक सिस्टीमिक कीटकनाशकाचा वापर करा, ज्यात फ्लोनीकायमिड ५०% / थियॅमेथॉक्सम 25% WG / इमिडाक्लोप्रिड
            १७.८
            एसएल / एसीटामिप्रिड २०% एसपी असेल.</p>
        <p>કોઈપણ એક પ્રણાલીગત જંતુનાશક દવાઓનો ઉપયોગ કરો, જેમાં ફ્લોનીકેમિડ 50% / થાઇઆમેથોક્સમ 25% WG / ઇમિડાકલોપ્રિડ
            17.8
            એસએલ / એસેટામિપ્રિડ 20% એસપી હોય છે.</p>
        <p>ಫ್ಲೋನಿಕಾಮಿಡ್ 50% / ಥಿಯಾಮೆಥೊಕ್ಸಮ್ 25% WG / ಇಮಿಡಾಕ್ಲೋಪ್ರಿಡ್ 17.8 ಎಸ್ಎಲ್ / ಅಸೆಟಾಮಿಪ್ರಿಡ್ 20% ಎಸ್ಪಿ ಹೊಂದಿರುವ
            ಯಾವುದೇ
            ಒಂದು ವ್ಯವಸ್ಥಿತ ಕೀಟನಾಶಕವನ್ನು ಬಳಸಿ.</p>
        <p>ఫ్లోనికామిడ్ 50% / థియామెథోక్సామ్ 25% WG / ఇమిడాక్లోప్రిడ్ 17.8 స్లా / ఎసిటామిప్రిడ్ 20% ఎస్పిని కలిగి ఉన్న
            ఏదైనా
            ఒక దైహిక పురుగుమందును వాడండి.</p>
    </div>

    <section>

        <div class="container">
            <h1 style="padding: 15px; background-color: rgb(153, 156, 150); color: white;"
                class="text-center my-3 content-h1">
                Recommended Products</h1>
        </div>

        <div class="container">

            <div class="card-columns">
                <div class="card ">
                    <div class="card-body text-center card-style">
                        <img style="border-radius: 10px;" class="img-fluid" src="/static/images/preet.png" alt="">
                        <h3 class="card-text">Dose: 60-80 gm/Acre</h3>
                    </div>
                </div>
                <div class="card">
                    <div class="card-body text-center card-style">
                        <img style="border-radius: 10px;" class="img-fluid" src="/static/images/ulala.png" alt="">
                        <h3 class="card-text">Dose: 25-40 gm/Acre</h3>
                    </div>
                </div>
                <div class="card ">
                    <div class="card-body text-center card-style">
                        <img style="border-radius: 10px" class="img-fluid" src="/static/images/victor.png" alt="">
                        <h3 class="card-text">Dose: 60-80 gm/Acre</h3>
                    </div>
                </div>
                <div class="card ">
                    <div class="card-body text-center card-style">
                        <img style="border-radius: 10px;" class="img-fluid" src="/static/images/confidor.png" alt="">
                        <h3 class="card-text">Dose: 25-35 ml/Acre</h3>
                    </div>
                </div>
                <div class="card ">
                    <div class="card-body text-center card-style">
                        <img style="border-radius: 10px;" class="img-fluid" src="/static/images/panama.png" alt="">
                        <h3 class="card-text">Dose: 60-80 gm/Acre</h3>
                    </div>
                </div>
                <div class="card ">
                    <div class="card-body text-center card-style">
                        <img style="border-radius: 10px;" class="img-fluid" src="/static/images/actara.png" alt="">
                        <h3 class="card-text">Dose: 60-80 gm/Acre</h3>
                    </div>
                </div>

            </div>

            <!-- <div class="container-fluid contents"> -->
            <h5 style="padding: 15px; background-color: rgb(153, 156, 150); color: white;"
                class="text-center my-3 contents">
                Delivery Contact:
                [email protected]</h5>
            <!-- </div> -->
        </div>

    </section>

</body>

</html>

How to use App?

Just run ‘aap.py’ file in spyder or you can run it using anaconda prompt. Then you will get localhost address like ‘http://127.0.0.1:5000/‘ enter it in any browser in your system then enjoy it.

Share your feedback then I will teach you how I have deployed this project on the AWS cloud free of cost.

How to download the project and use it?

Click on the below button and download the project and just open it in Spyder and run ‘aap.py’ file and enjoy it.

Note:

You don’t have the right to use the below data for commercial purposes without our permission and attribute of ‘Indian AI Production’.

Below data share only for study purposes in the local system not for public distribution. (More contact use)

Note:

  1. I just implement my idea and create an APP skeleton, so you will maybe get an error so please share it by comment.
  2. I am trying to use more disease plant data, but waiting for insect attack on my farm crop.
  3. I have used company name in web banner, it does not exist just use for demonstration purposes.

Thanks for reading…..-:)

2 Replies to “🌿Cotton Plant Disease Prediction & Get Cure App using Artificial Intelligence”

  1. FileNotFoundError: [Errno 2] No such file or directory: ‘/content/drive/My Drive/My ML Project /DL Project/CNN/cotton plant disease prediction/data/train’

    Bro iam getting the above error please help me out with (data, Train Val)

    “/content/drive/My Drive/My ML Project /DL Project/CNN/cotton plant disease prediction/data/train”
    “/content/drive/My Drive/My ML Project /DL Project/CNN/cotton plant disease prediction/data/val”

Leave a Reply

Top