Figure 1.
Geographic location of the study area.
Figure 1.
Geographic location of the study area.
Figure 2.
Flowchart of walnut collection process.
Figure 2.
Flowchart of walnut collection process.
Figure 3.
Partial walnut dataset. (a) Bright light. (b) Dim light. (c) Occlusion. (d) Close-range. (e) Far-range. (f) Multiple fruits.
Figure 3.
Partial walnut dataset. (a) Bright light. (b) Dim light. (c) Occlusion. (d) Close-range. (e) Far-range. (f) Multiple fruits.
Figure 4.
Improved model structure diagram. CBS represents Conv+BN+SiLU, UpSample denotes the upsampling operation, Concat represents the feature fusion operation, and C3_DE refers to the C3 structure proposed in this paper.
Figure 4.
Improved model structure diagram. CBS represents Conv+BN+SiLU, UpSample denotes the upsampling operation, Concat represents the feature fusion operation, and C3_DE refers to the C3 structure proposed in this paper.
Figure 6.
Ghost bottleneck. (a) shows the bottleneck structure with stride = 1, and (b) shows the bottleneck structure with stride = 2.
Figure 6.
Ghost bottleneck. (a) shows the bottleneck structure with stride = 1, and (b) shows the bottleneck structure with stride = 2.
Figure 7.
Standard convolution and depthwise separable convolution. (a) Standard convolution. (b) Depthwise separable convolution.
Figure 7.
Standard convolution and depthwise separable convolution. (a) Standard convolution. (b) Depthwise separable convolution.
Figure 8.
ECA attention mechanism.
Figure 8.
ECA attention mechanism.
Figure 9.
Improvement structure diagram of C3. (a) is the C3 bottleneck structure, (b) is the C3 structure, (c) is the DE_C3 bottleneck structure, and (d) is the DE_C3 structure.
Figure 9.
Improvement structure diagram of C3. (a) is the C3 bottleneck structure, (b) is the C3 structure, (c) is the DE_C3 bottleneck structure, and (d) is the DE_C3 structure.
Figure 10.
CIoU bounding box loss.
Figure 10.
CIoU bounding box loss.
Figure 11.
CIoU and Alpha CIoU mAP0.5 curves.
Figure 11.
CIoU and Alpha CIoU mAP0.5 curves.
Figure 12.
mAP0.5 for different attention mechanisms. A represents SE, B represents CBAM, C represents CA, D represents ECA, E represents SimAM, F represents SKAttention, G represents DoubleAttention, H represents Triplet, I represents SpaticalGroupEnhance, J represents NAM, K represents ParNet, L represents GAM, M represents ParallelPolarized, N represents ParallelPolarized, O represents NO Attention.
Figure 12.
mAP0.5 for different attention mechanisms. A represents SE, B represents CBAM, C represents CA, D represents ECA, E represents SimAM, F represents SKAttention, G represents DoubleAttention, H represents Triplet, I represents SpaticalGroupEnhance, J represents NAM, K represents ParNet, L represents GAM, M represents ParallelPolarized, N represents ParallelPolarized, O represents NO Attention.
Figure 13.
Comparison of performance before and after improvement.
Figure 13.
Comparison of performance before and after improvement.
Figure 14.
Pruning effect under different model speed-up ratios. (a) Parameter number variation. (b) Variation of computation. (c) Variation of P/R. (d) Variation of mAP0.5.
Figure 14.
Pruning effect under different model speed-up ratios. (a) Parameter number variation. (b) Variation of computation. (c) Variation of P/R. (d) Variation of mAP0.5.
Figure 15.
Distillation comparison results. (a) Variation of P/R. (b) Variation of mAP0.5.
Figure 15.
Distillation comparison results. (a) Variation of P/R. (b) Variation of mAP0.5.
Figure 16.
Occlusion detection results. (a,c,e,g) represent the detection results of YOLOv5s, while (b,d,f,h) denote the detection results of GDAD-YOLOv5. Purple circles represent missed detections, and purple squares denote false detections.
Figure 16.
Occlusion detection results. (a,c,e,g) represent the detection results of YOLOv5s, while (b,d,f,h) denote the detection results of GDAD-YOLOv5. Purple circles represent missed detections, and purple squares denote false detections.
Figure 17.
Results of near-background detection. (a,c,e,g) represent the detection results of YOLOv5s, while (b,d,f,h) denote the detection results of GDAD-YOLOv5. Purple circles represent missed detections, and purple squares denote false detections.
Figure 17.
Results of near-background detection. (a,c,e,g) represent the detection results of YOLOv5s, while (b,d,f,h) denote the detection results of GDAD-YOLOv5. Purple circles represent missed detections, and purple squares denote false detections.
Figure 18.
Raspberry Pi 5.
Figure 18.
Raspberry Pi 5.
Figure 19.
Visualization of the inference results. (a,c,e,g) represent the detection results of YOLOv5s, while (b,d,f,h) denote the detection results of GDAD-YOLOv5. Purple circles represent missed detections.
Figure 19.
Visualization of the inference results. (a,c,e,g) represent the detection results of YOLOv5s, while (b,d,f,h) denote the detection results of GDAD-YOLOv5. Purple circles represent missed detections.
Table 1.
The number of walnut images in different scenarios.
Table 1.
The number of walnut images in different scenarios.
Bright Light | Dim Light | Occlusion | Close-Range | Far-Range | Multiple Fruits |
---|
316 | 420 | 861 | 641 | 159 | 93 |
Table 2.
Initialization parameter table.
Table 2.
Initialization parameter table.
Parameter | Value |
---|
epoch | 300 |
lr | 0.01 |
momentum | 0.937 |
weight_decay | 0.0005 |
batch_size | 16 |
optimizer | SGD |
Table 3.
Comparison of lightweight backbone networks.
Table 3.
Comparison of lightweight backbone networks.
Model | mAP0.5 (%) | GFLOPs () | Param () |
---|
YOLOv5s | 94.1 | 15.8 | 7.0 |
MobileNetv3 | 92.9 | 2.5 | 1.3 |
GhostNet | 93.9 | 7.7 | 4.9 |
ShuffleNetv2 | 92.1 | 6.9 | 3.3 |
EfficientNetv2 | 93.4 | 5.6 | 5.9 |
Table 4.
Comparison results of different attention mechanisms.
Table 4.
Comparison results of different attention mechanisms.
Attention | mAP0.5 (%) | P (%) | R (%) | Parameters | GFLOPs () |
---|
no attention | 94.3 | 91.7 | 86.7 | 4,045,114 | 6.1 |
ECA | 94.5 | 91.0 | 87.8 | 4,045,126 | 6.1 |
SE | 94.5 | 90.4 | 88.8 | 4,057,914 | 6.1 |
Triplet | 94.5 | 90.9 | 87.7 | 4,046,314 | 6.1 |
SimAM | 94.5 | 89.9 | 88.5 | 4,045,144 | 6.1 |
Table 5.
Results of ablation experiments.
Table 5.
Results of ablation experiments.
Components | 1 | 2 | 3 | 4 | 5 | 6 |
---|
GhostNet | |
√
|
√
|
√
|
√
|
√
|
DE_C3 | | |
√
|
√
|
√
|
√
|
Alhpa CIoU | | | |
√
|
√
|
√
|
Prune | | | | |
√
|
√
|
KD | | | | | |
√
|
mAP0.5 (%) | 94.1 | 93.9 | 94.5 | 94.8 | 94.3 | 95.2 (+1.1%) |
P (%) | 90.9 | 89.8 | 91.0 | 91.4 | 89.9 | 91.6 (+0.7%) |
R (%) | 88.4 | 88.8 | 86.7 | 88.2 | 88.2 | 88.7 (+0.3%) |
Param () | 7.0 | 4.8 | 4.0 | 4.0 | 1.8 | 1.8 (−72.9%) |
GFLOPs () | 15.8 | 7.7 | 6.1 | 6.1 | 2.5 | 2.5 (−84.1%) |
Model Size/MB | 14.4 | 10.3 | 8.6 | 8.6 | 4.3 | 4.3 (−70.1%) |
Table 6.
Comparison of the experimental results.
Table 6.
Comparison of the experimental results.
Model | Param () | GFLOPs () | mAP0.5 (%) | Model Size/MB | FPS |
---|
YOLOv3-tiny | 8.7 | 12.9 | 92.3 | 17.4 | 105.3 |
YOLOv4-tiny | 5.8 | 16.2 | 90.8 | 23.6 | - |
YOLOv5s | 7.0 | 15.8 | 94.1 | 14.4 | 75.2 |
YOLOv6s | 18.5 | 45.17 | 93.1 | 38.7 | 91.5 |
YOLOv7-tiny | 6.0 | 13.0 | 94.2 | 12.3 | 61.7 |
YOLOv8s | 11.1 | 28.4 | 94.5 | 22.5 | 90.9 |
YOLOv9t | 2.6 | 10.7 | 94.6 | 6.1 | 52.9 |
GDA-YOLOv5 | 4.0 | 6.1 | 94.8 | 8.6 | 126.6 |
GDA-YOLOv5 (prune) | 1.8 | 2.5 | 94.3 | 4.3 | 128.2 |
GDAD-YOLOv5 | 1.8 | 2.5 | 95.2 | 4.3 | 135.1 |
Table 7.
Comparison of different pruning methods.
Table 7.
Comparison of different pruning methods.
Prune_method | Param () | GFLOPs () | mAP0.5 (%) | Model Size/MB |
---|
LAMP | 1,894,721 | 2.5 | 94.3 | 4.3 |
DepGraph [44] | 1,894,721 | 2.5 | 93.9 | 4.3 |
Taylor Pruning [45] | 1,894,721 | 2.5 | 93.7 | 4.3 |
L1-norm Pruning [46] | 1,894,721 | 2.5 | 93.4 | 4.3 |
Table 8.
Occlusion detection results.
Table 8.
Occlusion detection results.
Model | Target Numbers | Missed Numbers | Wrong Numbers |
---|
YOLOv5s | 889 | 128 | 16 |
GDAD-YOLOv5s | 899 | 62 | 6 |
Table 9.
Results of near-background detection.
Table 9.
Results of near-background detection.
Model | Target Numbers | Missed Numbers | Wrong Numbers |
---|
YOLOv5s | 918 | 119 | 18 |
GDAD-YOLOv5s | 918 | 63 | 6 |