An Improved Apple Object Detection Method Based on Lightweight YOLOv4 in Complex Backgrounds
Convolutional neural networks have recently experienced successful development in the field of computer vision. In precision agriculture, apple picking robots use computer vision methods to detect apples in orchards. However, existing object detection algorithms often face problems such as leaf shad...
Main Authors: | , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2022-08-01
|
Series: | Remote Sensing |
Subjects: | |
Online Access: | https://www.mdpi.com/2072-4292/14/17/4150 |
_version_ | 1797493421572620288 |
---|---|
author | Chenxi Zhang Feng Kang Yaxiong Wang |
author_facet | Chenxi Zhang Feng Kang Yaxiong Wang |
author_sort | Chenxi Zhang |
collection | DOAJ |
description | Convolutional neural networks have recently experienced successful development in the field of computer vision. In precision agriculture, apple picking robots use computer vision methods to detect apples in orchards. However, existing object detection algorithms often face problems such as leaf shading, complex illumination environments, and small, dense recognition targets, resulting in low apple detection rates and inaccurate localization. In view of these problems, we designed an apple detection model based on lightweight YOLOv4—called Improved YOLOv4—from the perspective of industrial application. First, to improve the detection accuracy while reducing the amount of computation, the GhostNet feature extraction network with a Coordinate Attention module is implemented in YOLOv4, and depth-wise separable convolution is introduced to reconstruct the neck and YOLO head structures. Then, a Coordinate Attention module is added to the feature pyramid network (FPN) structure in order to enhance the feature extraction ability for medium and small targets. In the last 15% of epochs in training, the mosaic data augmentation strategy is turned off in order to further improve the detection performance. Finally, a long-range target screening strategy is proposed for standardized dense planting apple orchards with dwarf rootstock, removing apples in non-target rows and improving detection performance and recognition speed. On the constructed apple data set, compared with YOLOv4, the mAP of Improved YOLOv4 was increased by 3.45% (to 95.72%). The weight size of Improved YOLOv4 is only 37.9 MB, 15.53% of that of YOLOv4, and the detection speed is improved by 5.7 FPS. Two detection methods of similar size—YOLOX-s and EfficientNetB0-YOLOv3—were compared with Improved YOLOv4. Improved YOLOv4 outperformed these two algorithms by 1.82% and 2.33% mAP, respectively, on the total test set and performed optimally under all illumination conditions. The presented results indicate that Improved YOLOv4 has excellent detection accuracy and good robustness, and the proposed long-range target screening strategy has an important reference value for solving the problem of accurate and rapid identification of various fruits in standard orchards. |
first_indexed | 2024-03-10T01:19:44Z |
format | Article |
id | doaj.art-1b369a0637b3446eb40ddbc4284d89dd |
institution | Directory Open Access Journal |
issn | 2072-4292 |
language | English |
last_indexed | 2024-03-10T01:19:44Z |
publishDate | 2022-08-01 |
publisher | MDPI AG |
record_format | Article |
series | Remote Sensing |
spelling | doaj.art-1b369a0637b3446eb40ddbc4284d89dd2023-11-23T14:01:46ZengMDPI AGRemote Sensing2072-42922022-08-011417415010.3390/rs14174150An Improved Apple Object Detection Method Based on Lightweight YOLOv4 in Complex BackgroundsChenxi Zhang0Feng Kang1Yaxiong Wang2Key Lab of State Forestry and Grassland Administration on Forestry Equipment and Automation, School of Technology, Beijing Forestry University, Beijing 100083, ChinaKey Lab of State Forestry and Grassland Administration on Forestry Equipment and Automation, School of Technology, Beijing Forestry University, Beijing 100083, ChinaKey Lab of State Forestry and Grassland Administration on Forestry Equipment and Automation, School of Technology, Beijing Forestry University, Beijing 100083, ChinaConvolutional neural networks have recently experienced successful development in the field of computer vision. In precision agriculture, apple picking robots use computer vision methods to detect apples in orchards. However, existing object detection algorithms often face problems such as leaf shading, complex illumination environments, and small, dense recognition targets, resulting in low apple detection rates and inaccurate localization. In view of these problems, we designed an apple detection model based on lightweight YOLOv4—called Improved YOLOv4—from the perspective of industrial application. First, to improve the detection accuracy while reducing the amount of computation, the GhostNet feature extraction network with a Coordinate Attention module is implemented in YOLOv4, and depth-wise separable convolution is introduced to reconstruct the neck and YOLO head structures. Then, a Coordinate Attention module is added to the feature pyramid network (FPN) structure in order to enhance the feature extraction ability for medium and small targets. In the last 15% of epochs in training, the mosaic data augmentation strategy is turned off in order to further improve the detection performance. Finally, a long-range target screening strategy is proposed for standardized dense planting apple orchards with dwarf rootstock, removing apples in non-target rows and improving detection performance and recognition speed. On the constructed apple data set, compared with YOLOv4, the mAP of Improved YOLOv4 was increased by 3.45% (to 95.72%). The weight size of Improved YOLOv4 is only 37.9 MB, 15.53% of that of YOLOv4, and the detection speed is improved by 5.7 FPS. Two detection methods of similar size—YOLOX-s and EfficientNetB0-YOLOv3—were compared with Improved YOLOv4. Improved YOLOv4 outperformed these two algorithms by 1.82% and 2.33% mAP, respectively, on the total test set and performed optimally under all illumination conditions. The presented results indicate that Improved YOLOv4 has excellent detection accuracy and good robustness, and the proposed long-range target screening strategy has an important reference value for solving the problem of accurate and rapid identification of various fruits in standard orchards.https://www.mdpi.com/2072-4292/14/17/4150precision agricultureYOLOv4attention mechanism |
spellingShingle | Chenxi Zhang Feng Kang Yaxiong Wang An Improved Apple Object Detection Method Based on Lightweight YOLOv4 in Complex Backgrounds Remote Sensing precision agriculture YOLOv4 attention mechanism |
title | An Improved Apple Object Detection Method Based on Lightweight YOLOv4 in Complex Backgrounds |
title_full | An Improved Apple Object Detection Method Based on Lightweight YOLOv4 in Complex Backgrounds |
title_fullStr | An Improved Apple Object Detection Method Based on Lightweight YOLOv4 in Complex Backgrounds |
title_full_unstemmed | An Improved Apple Object Detection Method Based on Lightweight YOLOv4 in Complex Backgrounds |
title_short | An Improved Apple Object Detection Method Based on Lightweight YOLOv4 in Complex Backgrounds |
title_sort | improved apple object detection method based on lightweight yolov4 in complex backgrounds |
topic | precision agriculture YOLOv4 attention mechanism |
url | https://www.mdpi.com/2072-4292/14/17/4150 |
work_keys_str_mv | AT chenxizhang animprovedappleobjectdetectionmethodbasedonlightweightyolov4incomplexbackgrounds AT fengkang animprovedappleobjectdetectionmethodbasedonlightweightyolov4incomplexbackgrounds AT yaxiongwang animprovedappleobjectdetectionmethodbasedonlightweightyolov4incomplexbackgrounds AT chenxizhang improvedappleobjectdetectionmethodbasedonlightweightyolov4incomplexbackgrounds AT fengkang improvedappleobjectdetectionmethodbasedonlightweightyolov4incomplexbackgrounds AT yaxiongwang improvedappleobjectdetectionmethodbasedonlightweightyolov4incomplexbackgrounds |