Optimizing Strawberry Disease and Quality Detection with Vision Transformers and Attention-Based Convolutional Neural Networks

被引:2
作者
Aghamohammadesmaeilketabforoosh, Kimia [1 ]
Nikan, Soodeh [1 ]
Antonini, Giorgio [1 ]
Pearce, Joshua M. [1 ,2 ]
机构
[1] Western Univ, Dept Elect & Comp Engn, London, ON N6A 3K7, Canada
[2] Western Univ, Ivey Business Sch, London, ON N6A 3K7, Canada
关键词
computer vision; monitoring; strawberries; yield monitoring; image classification; machine learning; vision transformers; MobileNetV2; ResNet18;
D O I
10.3390/foods13121869
中图分类号
TS2 [食品工业];
学科分类号
0832 ;
摘要
Machine learning and computer vision have proven to be valuable tools for farmers to streamline their resource utilization to lead to more sustainable and efficient agricultural production. These techniques have been applied to strawberry cultivation in the past with limited success. To build on this past work, in this study, two separate sets of strawberry images, along with their associated diseases, were collected and subjected to resizing and augmentation. Subsequently, a combined dataset consisting of nine classes was utilized to fine-tune three distinct pretrained models: vision transformer (ViT), MobileNetV2, and ResNet18. To address the imbalanced class distribution in the dataset, each class was assigned weights to ensure nearly equal impact during the training process. To enhance the outcomes, new images were generated by removing backgrounds, reducing noise, and flipping them. The performances of ViT, MobileNetV2, and ResNet18 were compared after being selected. Customization specific to the task was applied to all three algorithms, and their performances were assessed. Throughout this experiment, none of the layers were frozen, ensuring all layers remained active during training. Attention heads were incorporated into the first five and last five layers of MobileNetV2 and ResNet18, while the architecture of ViT was modified. The results indicated accuracy factors of 98.4%, 98.1%, and 97.9% for ViT, MobileNetV2, and ResNet18, respectively. Despite the data being imbalanced, the precision, which indicates the proportion of correctly identified positive instances among all predicted positive instances, approached nearly 99% with the ViT. MobileNetV2 and ResNet18 demonstrated similar results. Overall, the analysis revealed that the vision transformer model exhibited superior performance in strawberry ripeness and disease classification. The inclusion of attention heads in the early layers of ResNet18 and MobileNet18, along with the inherent attention mechanism in ViT, improved the accuracy of image identification. These findings offer the potential for farmers to enhance strawberry cultivation through passive camera monitoring alone, promoting the health and well-being of the population.
引用
收藏
页数:16
相关论文
共 46 条
  • [11] Digital Research Alliance of Canada, ABOUT US
  • [12] The potential of agrivoltaic systems
    Dinesh, Harshavardhan
    Pearce, Joshua M.
    [J]. RENEWABLE & SUSTAINABLE ENERGY REVIEWS, 2016, 54 : 299 - 308
  • [13] Dosovitskiy A, 2021, Arxiv, DOI arXiv:2010.11929
  • [14] Howard AG, 2017, Arxiv, DOI [arXiv:1704.04861, DOI 10.48550/ARXIV.1704.04861]
  • [15] Gad A.F., Accuracy, Precision, and Recall in Deep Learning.
  • [16] Food waste generation and industrial uses: A review
    Girotto, Francesca
    Alibardi, Luca
    Cossu, Raffaello
    [J]. WASTE MANAGEMENT, 2015, 45 : 32 - 41
  • [17] Great Learning Team, Hyperparameter Tuning with GridSearchCV.
  • [18] Intelligent detection of citrus fruit pests using machine vision system and convolutional neural network through transfer learning technique
    Hadipour-Rokni, Ramazan
    Asli-Ardeh, Ezzatollah Askari
    Jahanbakhshi, Ahmad
    Paeen-Afrakoti, Iman Esmaili
    Sabzi, Sajad
    [J]. COMPUTERS IN BIOLOGY AND MEDICINE, 2023, 155
  • [19] Deep Residual Learning for Image Recognition
    He, Kaiming
    Zhang, Xiangyu
    Ren, Shaoqing
    Sun, Jian
    [J]. 2016 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), 2016, : 770 - 778
  • [20] Deep learning in agriculture: A survey
    Kamilaris, Andreas
    Prenafeta-Boldu, Francesc X.
    [J]. COMPUTERS AND ELECTRONICS IN AGRICULTURE, 2018, 147 : 70 - 90