Related Experiment Video
Updated: Jun 22, 2025

04:23
A Swin Transformer-Based Model for Thyroid Nodule Detection in Ultrasound Images
Published on: April 21, 2023
1.8K
Optimizing Strawberry Disease and Quality Detection with Vision Transformers and Attention-Based Convolutional Neural
Kimia Aghamohammadesmaeilketabforoosh1, Soodeh Nikan1, Giorgio Antonini1
1Department of Electrical & Computer Engineering, Western University, London, ON N6A 3K7, Canada.
Foods (Basel, Switzerland)
|June 27, 2024
Summary
Vision transformer models achieved high accuracy in strawberry disease classification, offering farmers a tool for improved crop monitoring and health management. This technology aids sustainable agriculture.
Area of Science:
- Agricultural technology
- Computer vision
- Machine learning
Background:
- Machine learning and computer vision offer potential for sustainable agriculture but have had limited success in strawberry cultivation.
- Previous applications in strawberry cultivation faced challenges, necessitating further research.
Purpose of the Study:
- To fine-tune and compare three pretrained models—Vision Transformer (ViT), MobileNetV2, and ResNet18—for strawberry disease and ripeness classification.
- To enhance model performance through data augmentation, background removal, noise reduction, and image flipping.
Main Methods:
- Collected and preprocessed two datasets of strawberry images, creating a nine-class dataset for training.
- Fine-tuned ViT, MobileNetV2, and ResNet18 models, incorporating attention heads into MobileNetV2 and ResNet18, and modifying ViT's architecture.
- Addressed class imbalance using class weights and ensured all model layers were active during training.
Main Results:
- Vision Transformer (ViT) achieved the highest accuracy at 98.4%, followed by MobileNetV2 (98.1%) and ResNet18 (97.9%).
- ViT demonstrated a precision approaching 99% despite imbalanced data.
- The integration of attention mechanisms, particularly in ViT and early layers of ResNet18/MobileNetV2, significantly improved image identification accuracy.
Conclusions:
- Vision Transformer (ViT) model shows superior performance for strawberry ripeness and disease classification compared to MobileNetV2 and ResNet18.
- Attention mechanisms enhance the accuracy of image classification in agricultural applications.
- This technology can empower farmers with passive camera monitoring for improved strawberry cultivation and crop health.

