ASE-YOLOv8n: A Method for Cherry Tomato Ripening Detection

Xuemei Liang, Haojie Jia, Hao Wang, Lijuan Zhang, Dongming Li, Zhanchen Wei, Haohai You, Xiang Wan, Ruixin Li, Wei Li, Minglai YangAgronomy 2025 · DOI

TL;DR

This paper introduces ASE-YOLOv8n, an enhanced YOLOv8n model for accurately detecting cherry tomato ripeness in real-world agricultural settings. By incorporating novel down-sampling, neck, and attention modules, the model achieves improved accuracy and efficiency, paving the way for more intelligent automated harvesting systems.

What Problem Does This Paper Address?

Automated harvesting of delicate crops like cherry tomatoes presents significant challenges. Accurately identifying the ripeness of individual fruits in complex, natural environments—with varying lighting, overlapping fruits, and dense foliage—is crucial for efficient and profitable harvesting. Traditional manual methods are labor-intensive and costly, while existing automated systems often struggle with accuracy, speed, and adaptability to diverse conditions. This paper aims to bridge this gap by developing a robust and efficient deep learning model for precise cherry tomato ripeness detection.

Methods

The authors propose an improved YOLOv8n architecture, dubbed ASE-YOLOv8n, built upon the lightweight YOLOv8n framework. Key modifications include:

  • ADown Down-Sampling Module: This novel module replaces standard convolutional down-sampling in the backbone. It uses a combination of average pooling and maximum pooling, followed by convolutions, to better capture high-level image features and improve sensitivity to small targets, while also reducing model complexity.
  • Slim-Neck (GSConv+VoV-GSCSP): The traditional neck structure is replaced with a more efficient Slim-Neck, utilizing GSConv for feature extraction and VoV-GSCSP to replace the C2f module. This aims to enhance feature fusion and reduce computational load.
  • EMA Attention Mechanism: An Efficient Multi-Scale Attention (EMA) module is integrated at the P5 layer. This mechanism combines channel and spatial information through a multi-scale parallel sub-network structure to enrich feature representation and improve the model's ability to focus on detailed target features.

Datasets

The study utilized a self-constructed cherry tomato dataset.

  • Collection: Images were collected from cherry tomato plantations in Mingcun Town, Shandong Province, using an iPhone 15.
  • Variety: Busan 88.
  • Conditions: Images were captured in natural sunlight, with varying shooting distances and angles (5 directions: left, right, top, back, front). Lighting conditions included light and backlight scenarios.
  • Data Augmentation: Techniques like random angle rotation, vertical flip, random brightness adjustment, noise addition, and mosaic were applied to generate 9360 clear and complete images.
  • Labeling: Fruits were manually labeled as "Ripe_tomato" (approaching mid-red to late-red ripeness, >40% skin coloration) or "Unripe_tomato" (<40% skin coloration).
  • Splitting: The dataset was split into an 8:1:1 ratio for training, validation, and testing, resulting in 7488 training, 936 validation, and 936 test sets.

Key Insights and Ideas

  • Modular Improvement is Key: The paper demonstrates that targeted improvements to specific architectural components (down-sampling, neck, attention) can significantly boost the performance of an already strong baseline like YOLOv8n.
  • Small Target Detection Matters: The ADown module's focus on preserving details for small targets is crucial for fruit detection, where individual fruits can be easily lost in feature maps.
  • Efficiency vs. Accuracy Trade-off is Manageable: The proposed model achieves higher accuracy while simultaneously reducing parameter count and model size, making it suitable for resource-constrained environments like embedded systems.
  • Attention Enhances Specificity: The EMA attention mechanism proves effective in guiding the model to focus on finer details, leading to more accurate ripeness classification.

Key Results

The ASE-YOLOv8n model demonstrated significant improvements over the original YOLOv8n:

  • Overall Performance Gains:
    • Accuracy: +3.18%
    • Recall: +1.43%
    • F1 Score: +2.30%
    • mAP50: +1.57%
    • mAP50-95: +1.37%
  • Model Size and Parameters:
    • Parameters: Reduced to 2.52 M (from 3.01 M in original YOLOv8n)
    • Model Size: Reduced to 5.08 MB (from 5.97 MB)
  • Specific Category Performance: Notable improvements were also observed for "Ripe" and "Unripe" classifications.
  • Ablation Studies: Experiments showed that combining ADown, Slim-Neck, and EMA modules yielded the best results, achieving 91.83% accuracy, 89.79% recall, and 90.80% F1 score.
  • Comparison with Other Models: ASE-YOLOv8n outperformed various established object detection models (Faster R-CNN, SSD, YOLOv3-tiny, YOLOv5n, YOLOv6, YOLOv7-tiny, YOLOv8n, YOLOv9t, YOLOv10, YOLOv11) in key metrics, particularly in accuracy and efficiency.

Limitations and Future Work

  • Generalizability: The authors acknowledge that the model's validation is currently limited to specific conditions and cherry tomato varieties.
  • Future Work Suggestions:
    • Dataset Expansion: Include a wider range of cherry tomato varieties, geographical regions, and cultivation practices to enhance adaptability and generalization.
  • Diverse Environments: Assess performance across complex scenarios, seasonal variations, and varying backgrounds to ensure robustness.
  • Cross-Domain Application: Explore applicability to other fruits and vegetables with similar morphological characteristics to build more generalizable models.

Summary updated

Abstract

To enhance the efficiency of automatic cherry tomato harvesting in precision agriculture, an improved YOLOv8n algorithm was proposed for fast and accurate recognition in natural environments. The improvements are as follows: first, the ADown down-sampling module replaces part of the original network backbone’s standard convolution, enabling the model to capture higher-level image features for more accurate target detection, while also reducing model complexity by cutting the number of parameters. Secondly, the model’s neck adopts a Slim-Neck (GSConv+VoV-GSCSP) instead of traditional convolution with C2f. It replaces this combination with the more efficient CSConv and swaps the C2f module for VoV-GSCSP. Finally, the model also introduces the EMA attention mechanism, implemented at the P5 layer, which enhances the feature representation capability, enabling the network to extract detailed target features more accurately. This study trained the object-detection algorithm on a self-built cherry tomato dataset before and after improvement and compared it with early deep learning models and YOLO series algorithms. The experimental results show that the improved model increases accuracy by 3.18%, recall by 1.43%, the F1 score by 2.30%, mAP50 by 1.57%, and mAP50-95 by 1.37%. Additionally, the number of parameters is reduced to 2.52 M, and the model size is reduced to 5.08 MB, which outperforms other related models compared to the previous version. The experiment demonstrates the technology’s broad potential for embedded systems and mobile devices. The improved model offers efficient, accurate support for automated cherry tomato harvesting.
BibTeX
@inproceedings{liang2025ase,
  author = {Xuemei Liang and Haojie Jia and Hao Wang and Lijuan Zhang and Dongming Li and Zhanchen Wei and Haohai You and Xiang Wan and Ruixin Li and Wei Li and Minglai Yang},
  title = {{ASE-YOLOv8n: A Method for Cherry Tomato Ripening Detection}},
  booktitle = {Agronomy},
  year = {2025},
  doi = {10.3390/agronomy15051088},
}
Figure