Comprehensive comparison of different
Deep-Learning models for Plant Monitoring System
Om Mangalgi and Subhash Gupta P
R V College of Engineering,
[email protected] ,
[email protected] Dr Vijayalakshmi M.N.
R V College of Engineering [email protected]
Abstract - This is a review paper which deals with the accurate predictions. There are many components which can
efficiency, accuracy, robustness and other metrics of 4 be taken from the data collect like counting number of fruits,
models, namely EfficientNet, InceptionNet, ResNet and weed-plant classification, plant health detection etc. To
VGG19. As agriculture is the leading field for computer achieve this many architecture and technique are adopted,
vision experiments with very few progress done on the each of which have their own pros and cons.
field it plays a suitable data source for the experiment. The benefits of deep learning in plant monitoring extend
Dealing with cotton crop and its weed, the experiment beyond agriculture. Conservationists can utilize these
will require the model to classify between the two classes. techniques to monitor endangered plant species, detect
This comparative study will show different metric to invasive plants, and track habitat changes. Urban planners
make the best decision in choosing the best model for can employ deep learning algorithms to assess urban green
such experiments. Furthermore the dataset is masked spaces, optimize urban farming, and create sustainable
using a HSV tracker program. These model are run with landscapes. By harnessing the power of deep learning, we
these model as well and a comparative difference is made can unlock a wealth of knowledge about plants and leverage
between the masked and unmasked result. This shows it to tackle global challenges such as food security, climate
usage of good preprocessing of data and its effect on the change, and biodiversity loss.
results. Better the data more valuable and efficient the result of the
model. With a right preprocessing tool the image will be
converted into a more easily pattern detectable form. Using
INTRODUCTION tools like morphological filter, masking we can make the
model learn from only the region of interest and remove the
Agriculture is one of the most important sector of any state
unnecessary noise. Augmentation of data is also required to
and provide a huge variety of jobs and livelihood. However,
make it more robust as the real-world working have many
it is one of the least automated sector as well. With increase
unaccounted factors which will give wrong results.
of population the number of mouths to feed is also
increasing, hence increasing crop yield per unit area is very
important and necessary. A plant monitoring system is LITERATURE SURVEY
required which would assess the growth of the plant and
help improve the yield. This monitoring system usually has a Several approaches and researches have been done in the
camera mounted on a rover or drone and made to move field of plant-weed classification, plant detection, disease
through the field. The data collect via images or videos are detection, fruit counting etc. Deep Learning and image
passed through a Deep learning model which will help us processing has been done hand in hand to achieve this.
analyse various aspects of the crop. Over the past few years, advancements in deep learning
Traditionally, plant monitoring has relied on manual technology have led to significant enhancements in the field
observations, which are time-consuming, labor intensive, of plant image recognition. There is a continuous
and prone to human error. However, the integration of deep development of architecture and technology in the field of
learning, a subset of artificial intelligence (AI), has Deep Learning hence keeping track of various models and
revolutionized the way we gather and analyse plant-related parameter is of utmost importance. The intersection of
data. Deep learning algorithms have the ability to botanical taxonomy and computer vision has sparked a
automatically learn patterns and features from large amounts growing interdisciplinary interest in plant image
of data, enabling us to extract valuable insights and make identification. A groundbreaking contribution to this field
was the development of the BJFU100 dataset, comprising Having a good dataset is of utmost importance for any
10,000 images representing 100 plant species, which has model to get a good and just result. Our main and only data
become a crucial foundation for advancing plant are the images of cotton crop plants and cotton weeds.
identification research. Dataset collection play a major role Having a dataset of 400 images of each class taken from
in better efficient and results of different models. Several different angle and different lighting condition, this dataset
deep learning architectures have been utilized in plant give a complete overall perspective. In some case the images
monitoring, including AlexNet, GoogleNet Inception V3, are taken in different angle of the same plant giving an
Inception V4, VGG net, Microsoft ResNet, and DenseNets. in-built augmentation effect. Carefully analysing each image
However, these architectures are not without their challenges and remove unwanted images the data is put into the two
during the training process. One prominent issue is the classification classes of weed and crop.
problem of exploding or vanishing gradients, which can
II. Preprocessing
hinder the convergence of the model during training.
Additionally, a common challenge faced by deeper networks Making the data ready to be used for model is a major and
is degradation, wherein the accuracy of the model decreases important step in any artificial intelligence project. The data
as the network depth increases beyond a certain threshold. images are first cleaned to remove all the unwanted images
One more factor for on-field implementation is the so as to not confuse the model. Data augmentation is done to
integration of models on Edge devices like Jetson AGX make the model more robust and efficient. Rescaling and
Xavier, Nvidia J4012 etc. A primary comparison is whether resizing is done to make user that the input tensor to the
to use CPUs, GPUs or other processors. As we are working model is equal to avoid discrepancy. The pre-processed data
with images and videos GPU, DSU will give a higher is then divided into test and train datasets with the usual
performance compared to CPU. 80-20 split.
Although many models give high validation accuracy with
some going 99.35%, they often fail in different condition III. Masking
and hence lack of robustness to real-time efficiency. There
are a lot of factors that affect accuracy of model some being Coming to the main novelty of our research, we are showing
shading, lighting, overcast condition etc. Making a robust how the masking the data images of all the background
method is still in need with research being done in the field noises the accuracy and efficiency of the model will
of image preprocessing, data augmentation, batch increase. Since the hue of the crop and weed is different and
normalization to make the training data more conditional has a certain threshold in saturation and intensity, finding the
and hence improve the model efficiency. Image masking and right colour is very important. To achieve this a Python
morphological filter are being used to improve learning program is developed which will convert the usual RGB
pattern. When comes to detection labelling is a huge task image to HSV image and give an interface which will help
which requires large amount of man hours, to reduce this us find the right hue, saturation and value of the plant and
auto-labelling and synthetic data creation is researched upon. mask the rest. The calculate range for hue is 25-84,
Plant monitoring involves the steps like image acquisition saturation is 0-255 and value is 0-180. After carefully
(data collection), image pre-processing (rescaling, masking the images the data images are pre-processed and
augmentation), image segmentation, feature extraction and split into test-train.
classification.
FIGURE 1 : FLOWCHART OF PREOCESS
Figure2 : Masked images
MATERIALS AND MODELS
IV. ResNet
I. Datasets
InceptionNet has proven to be a valuable tool in the field of
In the context of plant health monitoring, ResNet has proven plant monitoring, leveraging its efficient architecture,
to be highly effective in detecting and diagnosing diseases, multi-scale feature extraction, and computational efficiency.
pests, and nutrient deficiencies in plants. One of the key Its ability to capture intricate plant details and generalize
advantages of ResNet is its ability to overcome the well to different plant-related tasks makes it a popular choice
vanishing gradient problem, which often occurs when among researchers and practitioners in the agricultural
training deep neural networks. This problem hinders the domain. InceptionNet is a deep convolutional neural
flow of gradients during backpropagation, making it difficult network architecture that incorporates the concept of
for the network to learn and optimize its parameters. By inception modules, enabling efficient feature extraction and
introducing residual connections, ResNet enables the representation learning.
network to bypass certain layers, allowing the gradients to
flow more easily and improving the overall training process. VII. EfficientNet
One of the key strengths of ResNet is its ability to handle
deep architectures with dozens or even hundreds of layers. EfficientNet is designed to optimize the trade-off between
ResNet comes with requirement of complex computation model size and accuracy, allowing for efficient utilization of
and tends to be quite sensitive to poor quality of data. computational resources while achieving state-of-the-art
results. EfficientNet's ability to strike a balance between
V. VGG19 model size and accuracy, along with its efficient building
blocks and excellent generalization capabilities, make it an
VGG19 is characterized by its deep architecture, consisting effective architecture for plant monitoring. By leveraging
of 19 layers, including convolutional layers, max-pooling EfficientNet, researchers and practitioners can develop
layers, and fully connected layers. One of the advantages of robust and computationally efficient deep learning models
VGG19 is its ability to capture both low-level and high-level that significantly contribute to advancing plant analysis,
features in the images. The stacked convolutional layers in management, and sustainability
VGG19 enable the model to learn complex hierarchical
representations, capturing fine-grained details as well as
higher-level semantic information. This makes VGG19 well-
Table1: Without masking
Table2: With masking
RESULTS
suited for tasks that require detailed analysis of plant The experiment is done in a systematic manner where every
structures, such as disease detection or leaf classification. controllable parameter is kept in constant. The data to every
However, there are some considerations when using VGG19 experiment is given the same with the same type of batch
for plant monitoring. The deep architecture of VGG19 normalization and augmentation. The masking experiment
makes it computationally more expensive compared to for
shallower models. Furthermore, VGG19, like other CNN each model is also passed through the same parameters of
architectures, lacks interpretability. While it can effectively masking. Every experiment has a common Adam optimizer
classify plant images, understanding the internal of 0.005 learning rate (default), Binary-cross-entropy loss
decision-making process or the specific features contributing and a simple accuracy metric. The remaining parameters are
to the predictions can be challenging. different for each model so as to get the best results of each
model keeping in mind underfitting and overfitting.
VI. InceptionV3
The experiments are run on a single device with a
Quadro M3000M GPU with 8192MB of GPU memory. The
device has an Intel Core i7-9280HQ with 64 GB of RAM
running at 2.70GHz. The models are run using the Conda
program using TensorFlow, Keras, Mathplotlib and Numpy.
Figure 5: Accuracy curve for InceptionNet(masked)
Figure 3: EfficientNet accuracy parameter(non-masking) EfficientNet and VGG19 are giving the lowest validation
losses for non-masking and masking datasets with 7.1%
and 9.03% respectively.
Figure 6: Loss curve InceptionNet(masked)
Figure 4 : Loss curve for EfficientNet (non-masking)
Comparing the models for the different types of datasets
gives a very interesting and novel result. The accuracy and
The experiments give a huge amount of interesting data
losses have either improved or remained the same. The most
and interpretation. The validation accuracy is lower than
important observation is found for the ResNet model where
training accuracy and validation loss is generally more than
the accuracy jumps from 75% to 93.75% and loss reduces
the training loss. The layer, epochs and parameter of each
drastically from 68.56% to 20.46% as the dataset is changed
model is kept constant while running with and without the
from the non-masking to masking. Another important aspect
masking. EfficientNet and InceptionNet is giving the best
is the time, for every model the as the dataset is masked the
accuracy with 96.34% and 100% respectively for
training time is reduced by almost half. In the case of
non-masking data. VGG19 and EfficientNet is giving better
EfficientNet the time taken is reduced from 2821s to 908s.
result for masking data with 97.56% and 96.34%
respectively.
REFERENCES
[1] “Tod J. W. Lee and Y. Chan Yoon, "Fine-Grained Plant Identification
using wide and deep learning model 1," 2019 International
Conference on Platform Technology and Service (PlatCon), Jeju,
Korea (South), 2019, pp. 1-5, doi: 10.1109/PlatCon.2019.8669407.
[2] Yu Sun, Yuan Liu, Guan Wang, Haiyan Zhang, "Deep Learning for Plant
Identification in Natural Environment", Computational Intelligence
and Neuroscience, vol. 2017, Article ID 7361042, 6 pages, 2017.
https://doi.org/10.1155/2017/7361042
[3] Edna Chebet Too, Li Yujian, Sam Njuki, Liu Yingchun, A comparative
study of fine-tuning deep learning models for plant disease
identification, Computers and Electronics in Agriculture, Volume 161,
2019, Pages 272-279, ISSN 0168-1699,
https://doi.org/10.1016/j.compag.2018.03.032.
[4] V. Mazzia, A. Khaliq, F. Salvetti and M. Chiaberge, "Real-Time Apple
Detection System Using Embedded Systems With Hardware
Accelerators: An Edge AI Application," in IEEE Access, vol. 8, pp.
Figure 7: Loss curve ResNet without masking 9102-9114, 2020, doi: 10.1109/ACCESS.2020.2964608
[5] Alexey, G., Klyachin, V., Eldar, K., Driaba, A. (2021). Autonomous
Mobile Robot with AI Based on Jetson Nano. In: Arai, K., Kapoor, S.,
Bhatia, R. (eds) Proceedings of the Future Technologies Conference
(FTC) 2020, Volume 1. FTC 2020. Advances in Intelligent Systems
and Computing, vol 1288. Springer, Cham.
https://doi.org/10.1007/978-3-030-63128-4_15
[6] Aboneh, T.; Rorissa, A.; Srinivasagan, R.; Gemechu, A. Computer
Vision Framework for Wheat Disease Identification and Classification
Using Jetson GPU Infrastructure. Technologies 2021, 9, 47.
https://doi.org/10.3390/technologies9030047
[7] Tugrul, B.; Elfatimi, E.; Eryigit, R. Convolutional Neural Networks in
Detection of Plant Leaf Diseases: A Review. Agriculture 2022, 12,
1192. https://doi.org/10.3390/agriculture12081192
[8] Rahnemoonfar, M.; Sheppard, C. Deep Count: Fruit Counting Based on
Deep Simulated Learning. Sensors 2017, 17, 905.
https://doi.org/10.3390/s17040905
[9] H. Wu, J. P. Siebert and X. Xu, "Fully Convolutional Networks for
Automatically Generating Image Masks to Train Mask R-CNN," 2021
IEEE International Conference on Robotics and Biomimetics
(ROBIO), Sanya, China, 2021, pp. 1712-1717,
doi:10.1109/ROBIO54168.2021.9739282.
[10]YuzhenLu.(2022).CottonWeedDet3.Kaggle. https://doi.org/10.34740/K
AGGLE/DSV/4090494
[11] Abdur Rahman, Yuzhen Lu, Haifeng Wang (2022). Deep Neural
Figure 8: Loss curve ResNet with masking Networks for Weed Detections Towards Precision Weeding. 2022
ASABE Annual International Meeting Paper# 2200845.
doi:10.13031/aim.202200845
[12] Noon, Serosh Karim et al. ‘Computationally Light Deep Learning
CONCLUSION Framework to Recognize Cotton Leaf Diseases’. 1 Jan. 2021 : 1 – 16.
In conclusion, EfficientNet is the best and most robust AUTHOR INFORMATION
compared to the rest no matter the type of datasets.
Om Mangalgi and Subhash Gupta are currently pursuing
ResNet was the worst for the non-masking dataset.
their bachelor’s degree in Artificial Intelligence from R V
However, this model showed the greatest improvement
College of Engineering, Bangalore. Dr Vijayalakshmi M.N.
after changing the dataset from non-masking to
is an Associate Professor in the Artificial Intelligence
masking. The time showed great improvement for all
department in R V College of Engineering, Bangalore.
the models. This showed that the masking of the images
has had a massive impact on the efficiency and
robustness of the result. The masking program play a
great help and showed the potential of a good
pre-processing effect on the result of the experiment.