浙江农业学报 ›› 2022, Vol. 34 ›› Issue (10): 2230-2239.DOI: 10.3969/j.issn.1004-1524.2022.10.17
张梓婷1(), 韩金玉1, 张东辉1, 李晗1, 李铭源1, 邓志平2, 孙晓勇1,*(
)
收稿日期:
2021-08-07
出版日期:
2022-10-25
发布日期:
2022-10-26
通讯作者:
孙晓勇
作者简介:
*孙晓勇,E-mail: johnsunx1@126.com基金资助:
ZHANG Ziting1(), HAN Jinyu1, ZHANG Donghui1, LI Han1, LI Mingyuan1, DENG Zhiping2, SUN Xiaoyong1,*(
)
Received:
2021-08-07
Online:
2022-10-25
Published:
2022-10-26
Contact:
SUN Xiaoyong
摘要:
农作物病害是影响粮食产量的重要因素之一。目前,大部分研究以已知病害作为数据来源,使用传统机器学习和深度学习方法进行病害识别与分类,这种模型构建方法需要大量的病害数据,而当新发病害出现时,很可能因为检测不到而错过最佳预警时间。为解决该问题,本文拟提出一种仅使用正常农作物叶片数据集作为训练数据便可检测出叶片病害异常的方法。具体地,本研究提出一种基于k-means++聚类与图像分块的农作物叶片病害异常检测方法,通过图像去噪、图像分割、图像截取等预处理操作后,提取图像的颜色矩特征,对训练集进行k-means++聚类,构建比对模型并设置阈值,从而确定测试集异常与否。试验使用的土豆、玉米与苹果数据集均下载于Kaggle网站。通过调整聚类数与分块数,在土豆、玉米和苹果数据集上,识别准确率分别达到了89%、95%、95%以上,并且在玉米和苹果两种数据集上的漏警率为0。
中图分类号:
张梓婷, 韩金玉, 张东辉, 李晗, 李铭源, 邓志平, 孙晓勇. 基于颜色矩的土豆、玉米、苹果叶片病害异常检测[J]. 浙江农业学报, 2022, 34(10): 2230-2239.
ZHANG Ziting, HAN Jinyu, ZHANG Donghui, LI Han, LI Mingyuan, DENG Zhiping, SUN Xiaoyong. Anomaly detection of potato, maize and apple leaf diseases based on color moments[J]. Acta Agriculturae Zhejiangensis, 2022, 34(10): 2230-2239.
植物种类 Plant species | 样本情况 Sample status | 样本数量 Sample quantity | |
---|---|---|---|
土豆Potato | 正常Normal | 健康Healthy | 152 |
异常Abnormal | 早疫病Early blight | 1 000 | |
晚疫病Late blight | 1 000 | ||
玉米Maize | 正常Normal | 健康Healthy | 1 162 |
异常Abnormal | 普通锈病Common rust | 1 142 | |
灰斑病Gray spot | 463 | ||
叶枯病Leaf blight | 935 | ||
苹果Apple | 正常Normal | 健康Healthy | 1 638 |
异常Abnormal | 黑腐病Black rot | 621 | |
雪松锈病Cedar rust | 275 | ||
黑星病Black-spot | 630 |
表1 数据集分布情况
Table 1 Distribution of datasets
植物种类 Plant species | 样本情况 Sample status | 样本数量 Sample quantity | |
---|---|---|---|
土豆Potato | 正常Normal | 健康Healthy | 152 |
异常Abnormal | 早疫病Early blight | 1 000 | |
晚疫病Late blight | 1 000 | ||
玉米Maize | 正常Normal | 健康Healthy | 1 162 |
异常Abnormal | 普通锈病Common rust | 1 142 | |
灰斑病Gray spot | 463 | ||
叶枯病Leaf blight | 935 | ||
苹果Apple | 正常Normal | 健康Healthy | 1 638 |
异常Abnormal | 黑腐病Black rot | 621 | |
雪松锈病Cedar rust | 275 | ||
黑星病Black-spot | 630 |
植物种类 Plant species | 数据集类型 Dataset type | 正常样本数 Quantity of normal samples | 异常样本数 Quantity of abnormal samples |
---|---|---|---|
土豆Potato | 训练集Training set | 120 | 0 |
测试集Testing set | 30 | 20 | |
玉米Maize | 训练集Training set | 928 | 0 |
测试集Testing set | 232 | 150 | |
苹果Apple | 训练集Training set | 1 232 | 0 |
测试集Testing set | 308 | 211 |
表2 训练集与测试集的样本数量分布
Table 2 Sample quantity distribution of training and testing datasets
植物种类 Plant species | 数据集类型 Dataset type | 正常样本数 Quantity of normal samples | 异常样本数 Quantity of abnormal samples |
---|---|---|---|
土豆Potato | 训练集Training set | 120 | 0 |
测试集Testing set | 30 | 20 | |
玉米Maize | 训练集Training set | 928 | 0 |
测试集Testing set | 232 | 150 | |
苹果Apple | 训练集Training set | 1 232 | 0 |
测试集Testing set | 308 | 211 |
颜色矩 Color moment | 聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | ||
RGB | 0 | 80.8 | 67.2 | 43.0 | 82.0 |
2 | 85.2 | 82.0 | 13.0 | 38.0 | |
3 | 74.4 | 81.2 | 21.0 | 34.0 | |
HSV | 0 | 64.4 | 67.2 | 31.0 | 79.0 |
2 | 72.0 | 66.8 | 45.0 | 80.0 | |
3 | 72.0 | 67.2 | 54.0 | 75.0 |
表3 在土豆上分割数据集的测试正确率与漏警率
Table 3 Test accuracy and missing alarm rate of segmentation dataset on potato %
颜色矩 Color moment | 聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | ||
RGB | 0 | 80.8 | 67.2 | 43.0 | 82.0 |
2 | 85.2 | 82.0 | 13.0 | 38.0 | |
3 | 74.4 | 81.2 | 21.0 | 34.0 | |
HSV | 0 | 64.4 | 67.2 | 31.0 | 79.0 |
2 | 72.0 | 66.8 | 45.0 | 80.0 | |
3 | 72.0 | 67.2 | 54.0 | 75.0 |
颜色矩 Color moment | 聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | ||
RGB | 0 | 60.7 | 60.7 | 100.0 | 100.0 |
2 | 68.1 | 77.1 | 44.9 | 40.9 | |
3 | 68.6 | 73.8 | 38.7 | 46.0 | |
HSV | 0 | 80.9 | 83.3 | 1.2 | 1.2 |
2 | 87.7 | 84.2 | 24.8 | 37.0 | |
3 | 89.7 | 92.3 | 8.0 | 11.0 |
表4 在玉米上分割数据集的测试正确率与漏警率
Table 4 Test accuracy and missing alarm rate of segmentation dataset on maize %
颜色矩 Color moment | 聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | ||
RGB | 0 | 60.7 | 60.7 | 100.0 | 100.0 |
2 | 68.1 | 77.1 | 44.9 | 40.9 | |
3 | 68.6 | 73.8 | 38.7 | 46.0 | |
HSV | 0 | 80.9 | 83.3 | 1.2 | 1.2 |
2 | 87.7 | 84.2 | 24.8 | 37.0 | |
3 | 89.7 | 92.3 | 8.0 | 11.0 |
颜色矩 Color moment | 聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | ||
RGB | 0 | 59.3 | 59.5 | 100 | 100.0 |
2 | 57.9 | 58.7 | 63.8 | 91.1 | |
3 | 60.2 | 65.7 | 42.2 | 42.2 | |
HSV | 0 | 54.3 | 69.7 | 6.4 | 27.6 |
2 | 71.4 | 69.4 | 49.1 | 71.0 | |
3 | 76.2 | 70.0 | 46.7 | 60.6 |
表5 在苹果上分割数据集的测试正确率与漏警率
Table 5 Test accuracy and missing alarm rate of segmentation dataset on apple %
颜色矩 Color moment | 聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | ||
RGB | 0 | 59.3 | 59.5 | 100 | 100.0 |
2 | 57.9 | 58.7 | 63.8 | 91.1 | |
3 | 60.2 | 65.7 | 42.2 | 42.2 | |
HSV | 0 | 54.3 | 69.7 | 6.4 | 27.6 |
2 | 71.4 | 69.4 | 49.1 | 71.0 | |
3 | 76.2 | 70.0 | 46.7 | 60.6 |
聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | |
0 | 82.8 | 74.8 | 18.0 | 61.0 |
2 | 89.2 | 78.8 | 7.0 | 22.0 |
3 | 80.0 | 82.8 | 14.0 | 37.0 |
表6 在土豆上截取数据集的测试正确率与漏警率
Table 6 Test accuracy and missing alarm rate of intercepted dataset on potato %
聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | |
0 | 82.8 | 74.8 | 18.0 | 61.0 |
2 | 89.2 | 78.8 | 7.0 | 22.0 |
3 | 80.0 | 82.8 | 14.0 | 37.0 |
聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | |
0 | 95.9 | 97.6 | 0 | 0 |
2 | 97.5 | 98.7 | 0 | 0 |
3 | 94.8 | 96.1 | 0 | 0 |
表7 在玉米上截取数据集的测试正确率与漏警率
Table 7 Test accuracy and missing alarm rate of intercepted dataset on maize %
聚类数 Cluster number | A | MAR | ||
---|---|---|---|---|
1×1 | 2×2 | 1×1 | 2×2 | |
0 | 95.9 | 97.6 | 0 | 0 |
2 | 97.5 | 98.7 | 0 | 0 |
3 | 94.8 | 96.1 | 0 | 0 |
聚类数 Cluster number | A | MAR | ||||||
---|---|---|---|---|---|---|---|---|
1×1 | 2×2 | 4×4 | 8×8 | 1×1 | 2×2 | 4×4 | 8×8 | |
0 | 68.1 | 72.1 | 94.1 | 94.7 | 8.2 | 0 | 0 | 0 |
2 | 77.8 | 85.4 | 96.2 | 96.4 | 20.6 | 0 | 0 | 0 |
3 | 79.0 | 91.8 | 95.0 | 95.1 | 23.8 | 0 | 0 | 0 |
表8 在苹果上截取数据集的测试正确率与漏警率
Table 8 Test accuracy and missing alarm rate of intercepted dataset on apple %
聚类数 Cluster number | A | MAR | ||||||
---|---|---|---|---|---|---|---|---|
1×1 | 2×2 | 4×4 | 8×8 | 1×1 | 2×2 | 4×4 | 8×8 | |
0 | 68.1 | 72.1 | 94.1 | 94.7 | 8.2 | 0 | 0 | 0 |
2 | 77.8 | 85.4 | 96.2 | 96.4 | 20.6 | 0 | 0 | 0 |
3 | 79.0 | 91.8 | 95.0 | 95.1 | 23.8 | 0 | 0 | 0 |
图7 玉米(a)、苹果(b)不同训练样本数下准确率与漏警率的变化
Fig.7 Change of accuracy and missing alarm rate under different training sample quantities on maize (a) and apple (b)
模型 Model | A | MAR | ||||
---|---|---|---|---|---|---|
土豆Potato | 玉米Maize | 苹果Apple | 土豆Potato | 玉米Maize | 苹果Apple | |
KNN | 92.0 | 89.8 | 79.2 | 5.0 | 10.4 | 36.8 |
ABOD | 92.4 | 92.2 | 75.4 | 3.0 | 4.2 | 47.4 |
HBOS | 76.4 | 85.6 | 60.8 | 48.0 | 20.0 | 80.6 |
COF | 79.6 | 59.0 | 58.8 | 47.0 | 89.6 | 89.2 |
CBLOF | 90.8 | 81.6 | 79.6 | 4.0 | 29.4 | 33.6 |
Iforest | 81.2 | 83.0 | 62.4 | 31.0 | 26.8 | 77.2 |
CMAD | 89.2 | 98.7 | 96.4 | 7.0 | 0 | 0 |
表9 不同模型的效果对比
Table 9 Comparison of effect of different models %
模型 Model | A | MAR | ||||
---|---|---|---|---|---|---|
土豆Potato | 玉米Maize | 苹果Apple | 土豆Potato | 玉米Maize | 苹果Apple | |
KNN | 92.0 | 89.8 | 79.2 | 5.0 | 10.4 | 36.8 |
ABOD | 92.4 | 92.2 | 75.4 | 3.0 | 4.2 | 47.4 |
HBOS | 76.4 | 85.6 | 60.8 | 48.0 | 20.0 | 80.6 |
COF | 79.6 | 59.0 | 58.8 | 47.0 | 89.6 | 89.2 |
CBLOF | 90.8 | 81.6 | 79.6 | 4.0 | 29.4 | 33.6 |
Iforest | 81.2 | 83.0 | 62.4 | 31.0 | 26.8 | 77.2 |
CMAD | 89.2 | 98.7 | 96.4 | 7.0 | 0 | 0 |
[1] | 刘慧, 朱莉, 赵守歧, 等. 警惕番茄褐色皱果病毒传入我国[J]. 中国植保导刊, 2019, 39(8): 73-76. |
LIU H, ZHU L, ZHAO S Q, et al. Watch out for introduction of Tomato brown rugose fruit virus to China[J]. China Plant Protection, 2019, 39(8): 73-76. (in Chinese with English abstract) | |
[2] |
OPPENHEIM D, SHANI G. Potato disease classification using convolution neural networks[J]. Advances in Animal Biosciences, 2017, 8(2): 244-249.
DOI URL |
[3] | SRAVAN V, SWARAJ K, MEENAKSHI K, et al. A deep learning based crop disease classification using transfer learning[J]. Materials Today: Proceedings, 2021. |
[4] | 王志国, 章毓晋. 监控视频异常检测: 综述[J]. 清华大学学报(自然科学版), 2020, 60(6): 518-529. |
WANG Z G, ZHANG Y J. Anomaly detection in surveillance videos: a survey[J]. Journal of Tsinghua University (Science and Technology), 2020, 60(6): 518-529. (in Chinese with English abstract) | |
[5] |
SMITI A. A critical overview of outlier detection methods[J]. Computer Science Review, 2020, 38: 100306.
DOI URL |
[6] | 张勇东, 陈思洋, 彭雨荷, 等. 基于深度学习的网络入侵检测研究综述[J]. 广州大学学报(自然科学版), 2019, 18(3): 17-26. |
ZHANG Y D, CHEN S Y, PENG Y H, et al. A survey of deep learning based network intrusion detection[J]. Journal of Guangzhou University (Natural Science Edition), 2019, 18(3): 17-26. (in Chinese with English abstract) | |
[7] |
WEST J, BHATTACHARYA M. Intelligent financial fraud detection: a comprehensive review[J]. Computers & Security, 2016, 57: 47-66.
DOI URL |
[8] |
FERNANDO T, DENMAN S, AHMEDT-ARISTIZABAL D, et al. Neural memory plasticity for medical anomaly detection[J]. Neural Networks, 2020, 127: 67-81.
DOI PMID |
[9] |
BAUR C, DENNER S, WIESTLER B, et al. Autoencoders for unsupervised anomaly segmentation in brain MR images: a comparative study[J]. Medical Image Analysis, 2021, 69: 101952.
DOI URL |
[10] |
TOGO R, WATANABE H, OGAWA T, et al. Deep convolutional neural network-based anomaly detection for organ classification in gastric X-ray examination[J]. Computers in Biology and Medicine, 2020, 123: 103903.
DOI URL |
[11] |
RUBINSTEIN E, SALHOV M, NIDAM-LESHEM M, et al. Unsupervised tumor detection in dynamic PET/CT imaging of the prostate[J]. Medical Image Analysis, 2019, 55: 27-40.
DOI PMID |
[12] |
DONG L, LIU S L, ZHANG H L. A method of anomaly detection and fault diagnosis with online adaptive learning under small training samples[J]. Pattern Recognition, 2017, 64: 374-385.
DOI URL |
[13] |
PURARJOMANDLANGRUDI A, GHAPANCHI A H, ESMALIFALAK M. A data mining approach for fault diagnosis: an application of anomaly detection algorithm[J]. Measurement, 2014, 55: 343-352.
DOI URL |
[14] |
AYDIN I, KARAKOSE M, AKIN E. A multi-objective artificial immune algorithm for parameter optimization in support vector machine[J]. Applied Soft Computing, 2011, 11(1): 120-129.
DOI URL |
[15] |
WU Y T, LI D L, LI Z B, et al. Fast processing of foreign fiber images by image blocking[J]. Information Processing in Agriculture, 2014, 1(1): 2-13.
DOI URL |
[16] | 袁渊, 丁胜, 徐新. 基于颜色与纹理特征的安防视频遮挡树叶检测[J]. 计算机工程与设计, 2016, 37(6): 1549-1554. |
YUAN Y, DING S, XU X. Color and texture feature based approach for leaf occlusion detection in security surveillance video[J]. Computer Engineering and Design, 2016, 37(6): 1549-1554. (in Chinese with English abstract) | |
[17] | 苗荣慧, 杨华, 武锦龙, 等. 基于图像分块及重构的菠菜重叠叶片与杂草识别[J]. 农业工程学报, 2020, 36(4): 178-184. |
MIAO R H, YANG H, WU J L, et al. Weed identification of overlapping spinach leaves based on image sub-block and reconstruction[J]. Transactions of the Chinese Society of Agricultural Engineering, 2020, 36(4): 178-184. (in Chinese with English abstract) | |
[18] | 王国屹, 孙永荣, 张怡, 等. 背景对齐差分的机场跑道异物分块检测与跟踪算法[J]. 计算机辅助设计与图形学学报, 2021, 33(3): 413-423. |
WANG G Y, SUN Y R, ZHANG Y, et al. Block detection and tracking algorithm of foreign objects debris in airport runway based on background alignment and difference[J]. Journal of Computer-Aided Design & Computer Graphics, 2021, 33(3): 413-423. (in Chinese with English abstract) | |
[19] |
ROTHER C, KOLMOGOROV V, BLAKE A. GrabCut: interactive foreground extraction using iterated graph cuts[J]. ACM Transactions on Graphics, 2004, 23(3): 309-314.
DOI URL |
[20] | BOYKOV Y Y, JOLLY M P. Interactive graph cuts for optimal boundary & region segmentation of objects in N-D images[C]// Proceedings of Eighth IEEE International Conference on Computer Vision. ICCV 2001. Vancouver, BC, Canada: IEEE, 2001: 105-112. |
[21] | STRICKER M A, ORENGO M. Similarity of color images[J]. Proceedings of SPIE, 1995, 2420: 381-392. |
[22] | POYNTON C A. A guided tour of colour space[C]// The SMPTE Advanced Television and Electronic Imaging Conference, February 10-11, 1995. San Francisco, CA, USA:. IEEE, 1995: 167-180. |
[23] | CHERNOV V, ALANDER J, BOCHKO V. Integer-based accurate conversion between RGB and HSV color spaces[J]. Computers & Electrical Engineering, 2015, 46: 328-337. |
[24] | STEMMER U. Locally private k-means clustering[M]//Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, Philadelphia, PA: Society for Industrial and Applied Mathematics, 2020: 548-559. |
[1] | 张红涛, 李艺嘉, 谭联, 许帅涛. 基于CS-SVM的谷子叶片病害图像识别[J]. 浙江农业学报, 2020, 32(2): 274-282. |
[2] | 江朝晖,张静,饶元,朱诚,李绍稳. 基于聚类和异常检测的作物监测数据预处理研究[J]. 浙江农业学报, 2016, 28(5): 885-. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||