| Literature DB >> 36230226 |
Xiaoting Liang1,2,3, Xueying Jia1,2,3, Wenqian Huang1,3, Xin He1,3, Lianjie Li1,3, Shuxiang Fan1,3, Jiangbo Li1,3, Chunjiang Zhao1,3, Chi Zhang1,3.
Abstract
At present, the apple grading system usually conveys apples by a belt or rollers. This usually leads to low hardness or expensive fruits being bruised, resulting in economic losses. In order to realize real-time detection and classification of high-quality apples, separate fruit trays were designed to convey apples and used to prevent apples from being bruised during image acquisition. A semantic segmentation method based on the BiSeNet V2 deep learning network was proposed to segment the defective parts of defective apples. BiSeNet V2 for apple defect detection obtained a slightly better result in MPA with a value of 99.66%, which was 0.14 and 0.19 percentage points higher than DAnet and Unet, respectively. A model pruning method was used to optimize the structure of the YOLO V4 network. The detection accuracy of defect regions in apple images was further improved by the pruned YOLO V4 network. Then, a surface mapping method between the defect area in apple images and the actual defect area was proposed to accurately calculate the defect area. Finally, apples on separate fruit trays were sorted according to the number and area of defects in the apple images. The experimental results showed that the average accuracy of apple classification was 92.42%, and the F1 score was 94.31. In commercial separate fruit tray grading and sorting machines, it has great application potential.Entities:
Keywords: apple grading; deep learning; defective apples; object detection; semantic segmentation
Year: 2022 PMID: 36230226 PMCID: PMC9563605 DOI: 10.3390/foods11193150
Source DB: PubMed Journal: Foods ISSN: 2304-8158
Figure 1Image acquisition system.
Figure 2The architecture of BiSeNet V2 network.
The initialization parameters of BiSeNet V2 network.
| Input Size of Images/Pixel | Batch Size | Initial Learning Rate | Iterations |
|---|---|---|---|
| 512 × 512 | 4 | 1.1 × 10−3 | 1000 |
Figure 3The architecture of YOLO V4 network.
Figure 4The channel changes of each layer of YOLO V4 model before and after pruning.
Figure 5The apple models with labels.
Figure 6The segmentation results of the Unet, DAnet and BiSeNet V2 networks.
The comparison of different semantic segmentation models.
| Models | MIoU/% | MPA/% | Inference Time/ms | Parameters/MB | Model Size/MB |
|---|---|---|---|---|---|
| DAnet | 74.08 | 99.52 | 37.40 | 45.31 | 181.30 |
| Unet | 73.93 | 99.47 | 22.64 | 12.78 | 51.15 |
| BiSeNet V2 | 80.46 | 99.66 | 9.00 | 2.22 | 9.67 |
Figure 7Comparison between segmentation results and detection results.((a,b) are images taken with stem upward. (c,d) are images taken with calyx upward.)
Figure 8Schematic diagram of defect location. (A, B, C represent different areas of the apple). (a) is a diagram of the top view of the apple and (b) is a diagram of the front view of the apple) Schematic diagram of defect location. (A, B, C represent different areas of the apple).
Figure 9Boxplot of the error rate between calculated and actual defect area at different regions of fruit.
Calculation results of defect area.
| Defect Position | The Pixels of the Defect | Calculated Defect Area/mm2 | Actual Defect Area/mm2 | Root Mean Square Error |
|---|---|---|---|---|
| 389.47 | 39.79 | 38.48 | 2.38 | |
| A | 243.55 | 24.58 | 22.90 | 2.76 |
| 186.92 | 19.08 | 18.10 | 1.85 | |
| 370.41 | 37.75 | 36.32 | 1.36 | |
| B | 218.63 | 21.86 | 19.63 | 2.13 |
| 157.68 | 15.77 | 16.62 | 2.92 | |
| 323.90 | 32.39 | 33.18 | 3.16 | |
| C | 221.58 | 22.16 | 20.43 | 3.22 |
| 135.27 | 13.53 | 12.56 | 3.03 |
The average of detection results of three grades.
| Defect Level | Precision/% | Recall/% | Accuracy/% | F1/% |
|---|---|---|---|---|
| First class | 95.59% | 95.59% | - | - |
| Second class | 92.06% | 90.63% | - | - |
| Third class | 95.24% | 96.77% | - | - |
| Total | 94.30% | 94.33% | 92.42% | 94.31% |
Figure 10The confusion matrix of defective apple grading.