Friday, August 21, 2020

CROP PEST RECOGNITION AND PEST CONTROL RECOMMENDATION



PROBLEM STATEMENT:
Insects came into existence very long ago. Compared to other living organisms, insects
sustain close and complex relations to plants. Although some insects are beneficial,
they involved in both direct and indirect losses to agriculture. It is estimated that
approximately 35-40% of crops are destroyed in a year by insects, this affects farmers
whose only source of income is agriculture. Insect identification is time-consuming and
requires experienced workforce.Our goal is to recognize pests in the crops in early
stages before it causes some symptoms using computer vision and deep learning.

PROPOSED SYSTEM:
First phase involves subjecting the dataset collected from various  places like TNAU - Tamil Nadu Agricultural University, and Insect Museum at Coimbatore and sources like nbair.res.in digital repository and photographs collected from field visits and from several websites through various process like preprocessing, augmentation, segmentation and annotation for converting it into a format suitable for training the neural network.

Second phase involves using Retinanet with resnet50 trained in COCO dataset (Common Objects in context dataSet) as the backbone network. For this purpose the network is built in a AWS server and training is using GPU. After training and validation steps, the trained model is converted into a inference model for the purpose of crop pest identification.

Third Phase contains front-end part, a web application through which user input which is an insect image along with plant name is given. After recognition of pest using the retinanet inference model, the articles corresponding to the pest in plant is displayed to the user. Retinanet is chosen for perfect balance between speed and accuracy.

DATASET:
Images collected from various places like TNAU - Tamil Nadu Agricultural University, and Insect Museum at Coimbatore and sources like nbair.res.in digital repository and photographs collected from field visits and from several websites. The pests include Aphids, Flea Beetle, Mealy Bug, Red Spider Mite, Stem Borer, Thrips, White Fly.

ARCHITECTURE DIAGRAM:


DETAILS OF MODULES:
IMAGE PREPROCESSING:
For optimal computer vision outcomes, attention to image pre-processing is required so
that one can improve image features by eliminating unwanted falsification. Effective use
of image pre-processing can offer advantages and resolve complications that finally
results in improved detection of local and global features. This Module involves
Resizing the pixels of the image i.e, resizing height and width (which is very important
step before we send images to the neural network) and Cropping. The Input is images
from dataset. The Output is Preprocessed images.

 

IMAGE AUGMENTATION:
Image augmentation is a technique that is used to artificially expand the data-set. This
is helpful when we are given a data-set with very few data samples. In case of Deep
Learning, this situation is bad as the model tends to over-fit when we train it on limited
number of data samples.Image augmentation parameters that are generally used to
increase the data sample count are translation, flipping, rotation and so on. Usage of
these parameters results in generation of images having these attributes during training
of Deep Learning model. Image samples generated using image augmentation, in
general results in increase of existing data sample set by nearly 3x to 4x times. The
Input is images after preprocessing. The Output is increased number of images.
  

IMAGE ANNOTATION:
The Module involves annotating images by drawing bounding boxes around the pest
with the label and generating xml files in the Pascal VOC xml format using labelImg
manually.
IMAGE SEGMENTATION:
This Module involves splitting the dataset into training set and testing set. This module
involves parsing (using BeautifulSoup library) the xml file generated as the output of
Image Annotation and extract maximum and minimum values of coordinates and class
label and get the path of the image and write it to the csv file. The Input is Augmented
image set. The Output is Training set and Testing set.

Training Set
Testing Set

TRAINING AND RECOGNITION:
Object detection is a computer technology related to computer vision and image
processing that deals with detecting instances of pests in digital images. After Training,
the trained model will be converted into inference model, so that the weight cannot be
updated while giving input for prediction.

 
Bounding Box showing detection
Red Spider Mite: 0.91

RECOMMEND PEST CONTROL:
Suggestions are given for the identified pest to control it by using organic, inorganic or
cultural method. This information is stored in a knowledge base of pest control and
measures. Input is the predicted insect and plant name and Output will be articles
recommending various pest control measures.

TEST CASES:
1) Image with multiple pests in a camouflaged environment.


2) Image with multiple pests in different orientation.


3) Image with pests in non leafy background.


CROP PEST RECOGNITION AND PEST CONTROL RECOMMENDATION

PROBLEM STATEMENT: Insects came into existence very long ago. Compared to other living organisms, insects sustain close and complex ...