Professional Documents
Culture Documents
Zusong Li Jieru Xu
School of Information Engineering, West Anhui University School of Information Engineering, West Anhui University
Lu,an, China Lu,an, China
67202167@qq.com 9182783@qq.com
Abstract—In agricultural productivity, detecting plant pests exist, however, the synthesized samples are still a long way
and diseases is extremely crucial. This research studies images of from being accurate[3][4]. Another way is to extract features
plant leaf pests and diseases from an unsupervised perspective to from a large number of normal samples and then identify
solve the problem that existing plant leaf disease datasets are whether they are normal or abnormal by distance[5][6],
difficult to acquire and include few types of diseases, and they however, the accuracy is low[7]. We employ image restoration
cannot find the defective parts of leaves. This paper utilizes the to detect abnormalities in images in this paper, which is more
idea of image restoration and uses a deep learning correlation effective and has good generality, by contextualizing and
model to detect and localize the abnormal regions of plant leaves.
restoring mask regions[8][9][10].
The experimental results show that the img_AUCROC and
pixel_AUCROC level anomaly detection and localization achieve The main contributions of this paper are as follows:
good results, which bring influence and reference to other peers.
First, the detection of abnormal regions of plant leaves is by
Keywords- plant leaf pests and diseases; unsupervised learning; unsupervised method, which saves a lot of labor and does not
anomaly detection require labeled data.
817
Authorized licensed use limited to: NYSS'S Yeshwantrao Chavan College of Engineering. Downloaded on February 03,2023 at 10:17:27 UTC from IEEE Xplore. Restrictions apply.
anomaly scores are calculated using feature extraction from To train the autoencoder, three loss functions were used for
normal sample images, Gaussian modeling of feature vectors in the experiments, namely L2 loss, a multi-scale gradient seismic
the feature layer, and probability distribution of test sample similarity (MSGMS) loss, and structured similarity index
feature vectors. (SSIM) loss, the formula is shown below.
Self-supervised learning is aim to develop a task by
ourselves, which is equivalent to a supervised signal, and then L G LG S LS L2 (1)
help the model learn useful features for the downstream task. H W
1
The literature [15] proposes extracting a random patch of the
image and pasting it at any location on the image to create an Ls(I , Ir)
NP
1 SSIM ( I , I )
i 1 j 1
r (i , j ) (2)
anomalous sample, which can then be identified by a binary
classification network before moving on to the downstream task.
III. METHOD
LG I , Ir
1 4 1 H l WL
1 GMS I 1, Irl (i, j )
4 l 1 Nl i 1 j 1
(3)
IV. EXPERIMENTS
A. Dateset
We used a set of sample plant leaf datasets that we had on
hand. Our collection of plant leaf samples was used in the
experiment. Normal samples and three types of faulty samples
are grouped into four categories in the plant leaf dataset. There
are more than 100 samples in normal and ten faulty samples in
the other, and the relevant samples are depicted in figure 2. The
first row displays normal samples, gray spot disease leaf are
Figure 1 Flow chart of the overall framework of method
exhibited in the second row, the third row reveals brown spot
disease, and the last depicts human-damaged leaves.
To begin, the image is divided into several little patches by
the size of k , which can be 2, 4, 8, 16, or other numbers.
Second, the image is masked into patches and repeated n times
to produce n masked images, the intersection of the masked
patches in these n "stump maps" is empty, i.e., each patch is
guaranteed to be masked, and the image is then rebuilt in the
next procedure. Following that, it is reassembled in post-
processing. Finally, the reconstruction network receives the n
masked images for reconstruction.
The size of the region being discarded during inference
affects the accuracy of region reconstruction. Because anomaly
detection relies on reconstructing non-anomalous regions as
accurately as feasible, performance may be influenced by the Figure 2 Plant leaf dataset
size of the region used, k , as well as the size of the anomaly
B. Results
being reconstructed. If k is substantially greater than the
anomaly, precise repair reconstruction is necessary. The repair To detect the abnormal region of the leaf, the experiments
network can use the surrounding area to figure out which were run on an Intel Core i9 processor with a GeForce RTX
component of the anomaly is causing the problem. As 2070s GPU, and the code was written under the Ubuntu
anomalies come in various sizes, their identification must take 18.04+CUDA 10.2+CUDNN+PyTorch environment. The
into account a variety of scales. An accurate map of experimental learning rate was set to 0.0001, and 150 epochs
reconstruction effects can be constructed by considering were performed. The network is trained using Adam optimizer
numerous reconstructions of a single image generated using with S and G are set to 1. Due to the GPU's limited memory,
multiple values of k . The recovery reconstruction network the input batch size was set to 1, and 100 batches were
employed in this paper is a U-Net encoder-decoder model with processed in each epoch, with an average running time of
a ResNet-like Skip Connection between the shallow and deep roughly 250 seconds for each epoch. Each batch takes roughly
layers. 2.5 seconds to run on average.
818
Authorized licensed use limited to: NYSS'S Yeshwantrao Chavan College of Engineering. Downloaded on February 03,2023 at 10:17:27 UTC from IEEE Xplore. Restrictions apply.
The experimental training process is mostly used to update
parameters, change the weight value of the model, and evaluate
good and bad model training using the AUC value, which is the
total area under the ROC curve .The higher the False Positive
Rate (FPR), the more abnormal data are present in data that is
measured as normal; the higher the True Positive Rate (TPR),
the more normal data are present in data that is anticipated to be
normal. As a result, the higher the TPR and the lower the FPR,
the better, which is reflected in the AUC value, which is higher
than the AUC value. The best results obtained from model
training are judged by comparing the AUC values obtained
experimentally under different parameter conditions.
Figure 3, it depicts the change in AUC value during the
training process. when the model accepts different threshold
values, the leaf img_ROCAUC and pixel_ROCAUC values
continue to rise, reaching a maximum of 0.953, indicating that
the model is properly applied and can efficiently detect
anomalous regions in the leaves. Figure 4 shows the results of
the model training loss function transformation curve, which
includes L1 loss, SSIM loss, and GMS loss.
Figure 5 the detect result of normal and abnormal plant leaf
819
Authorized licensed use limited to: NYSS'S Yeshwantrao Chavan College of Engineering. Downloaded on February 03,2023 at 10:17:27 UTC from IEEE Xplore. Restrictions apply.
REFERENCES
[1] Sowmya B J , Shetty C , See Ma S , et al. Utility system for premature
plant disease detection using machine learning - ScienceDirect[J]. Hybrid
Computational Intelligence, 2020:149-172.
[2] Alguliyev R , Imamverdiyev Y , Sukhostat L , et al. Plant disease
detection based on a deep model[J]. Soft Computing, 2021, 25(21):13229-
13242.
[3] Y Li, Chao X . Semi-supervised few-shot learning approach for plant
diseases recognition[J]. Plant Methods, 2021, 17(1).
[4] Clohessy J W , Sanjel S , O'Brien G K , et al. Development of a high-
throughput plant disease symptom severity assessment tool using machine
learning image analysis and integrated geolocation[J]. Computers and
Electronics in Agriculture, 2021, 184(6):106089.
[5] Cohen, Niv, and Yedid Hoshen. "Sub-image anomaly detection with deep
pyramid correspondences." arXiv preprint arXiv:2005.02357 (2020).
[6] Deecke, Lucas, et al. "Image anomaly detection with generative
adversarial networks." Joint european conference on machine learning
and knowledge discovery in databases. Springer, Cham, 2018.
[7] Zhou, Kang, Yuting Xiao, Jianlong Yang, Jun Cheng, Wen Liu, Weixin
Luo, Zaiwang Gu, Jiang Liu, and Shenghua Gao. "Encoding structure-
texture relation with p-net for anomaly detection in retinal images."
In European Conference on Computer Vision, pp. 360-377. Springer,
Cham, 2020.
[8] Zavrtanik, Vitjan, Matej Kristan, and Danijel Skočaj. "Reconstruction by
inpainting for visual anomaly detection." Pattern Recognition 112 (2021):
107706.
[9] Xu, Shuaijing, Hao Wu, and Rongfang Bie. "CXNet-m1: anomaly
detection on chest X-rays with image-based deep learning." IEEE
Access 7 (2018): 4466-4477.Nguyen, Bao, Adam Feldman, Sarath
Bethapudi, Andrew Jennings, and Chris G. Willcocks. "Unsupervised
region-based anomaly detection in brain mri with adversarial image
inpainting." In 2021 IEEE 18th International Symposium on Biomedical
Imaging (ISBI), pp. 1127-1131. IEEE, 2021.
[10] Chen, Yurong, Hui Zhang, Yaonan Wang, Yimin Yang, Xianen Zhou, and
QM Jonathan Wu. "MAMA net: multi-scale attention memory
autoencoder network for anomaly detection." IEEE Transactions on
Medical Imaging 40, no. 3 (2020): 1032-1041.
[11] Pirnay, Jonathan, and Keng Chai. "Inpainting transformer for anomaly
detection." arXiv preprint arXiv:2104.13897 (2021).
[12] Yi, Jihun, and Sungroh Yoon. "Patch svdd: Patch-level svdd for anomaly
detection and segmentation." In Proceedings of the Asian Conference on
Computer Vision. 2020.
[13] Fan, Jinan, Qianru Zhang, Jialei Zhu, Meng Zhang, Zhou Yang, and
Hanxiang Cao. "Robust deep auto-encoding Gaussian process regression
for unsupervised anomaly detection." Neurocomputing 376 (2020): 180-
190.
[14] Li, Chun-Liang, Kihyuk Sohn, Jinsung Yoon, and Tomas Pfister.
"Cutpaste: Self-supervised learning for anomaly detection and
localization." In Proceedings of the IEEE/CVF Conference on Computer
Vision and Pattern Recognition, pp. 9664-9674. 2021.
820
Authorized licensed use limited to: NYSS'S Yeshwantrao Chavan College of Engineering. Downloaded on February 03,2023 at 10:17:27 UTC from IEEE Xplore. Restrictions apply.