| Literature DB >> 33297402 |
Haiyan Zhou1, Zilong Zhuang1, Ying Liu1, Yang Liu1, Xiao Zhang1.
Abstract
The green plum is rich in amino acids, lipids, inorganic salts, vitamins, and trace elements. It has high nutritional value and medicinal value and is very popular among Chinese people. However, green plums are susceptible to collisions and pests during growth, picking, storage, and transportation, causing surface defects, affecting the quality of green plums and their products and reducing their economic value. In China, defect detection and grading of green plum products are still performed manually. Traditional manual classification has low accuracy and high cost, which is far from meeting the production needs of green plum products. In order to improve the economic value of green plums and their products and improve the automation and intelligence level of the product production process, this study adopted deep learning methods based on a convolutional neural network and cost-effective computer vision technology to achieve efficient classification of green plum defects. First, a camera and LEDs were used to collect 1240 green plum images of RGB, and the green plum experimental classification standard was formulated and divided into five categories, namely, rot, spot, scar, crack, and normal. Images were randomly divided into a training set and test set, and the number of images of the training set was expanded. Then, the stochastic weight averaging (SWA) optimizer and w-softmax loss function were used to improve the VGG network, which was trained and tested to generate a green plum defect detection network model. The average recognition accuracy of green plum defects was 93.8%, the test time for each picture was 84.69 ms, the recognition rate of decay defect was 99.25%, and the recognition rate of normal green plum was 95.65%. The results were compared with the source VGG network, resnet18 network, and green lemon network. The results show that for the classification of green plum defects, the recognition accuracy of the green plum defect detection network increased by 9.8% and 16.6%, and the test speed is increased by 1.87 and 6.21 ms, respectively, which has certain advantages.Entities:
Keywords: classification; deep learning; defects; green plum
Year: 2020 PMID: 33297402 PMCID: PMC7730893 DOI: 10.3390/s20236993
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1Image acquisition device.
Figure 2The original image collected by the system.
Figure 3Preprocessed image.
Distribution of dataset.
| Rot | Spot | Scar | Crack | Normal | |
|---|---|---|---|---|---|
| Original Dataset | 390 | 400 | 140 | 80 | 230 |
| Augmented Dataset | 3900 | 4000 | 1400 | 800 | 2300 |
| Training Dataset | 3100 | 3200 | 1120 | 640 | 1840 |
| Test Dataset | 800 | 800 | 280 | 160 | 460 |
Figure 4Green plum defect detection network structure.
Software and hardware environment configuration.
| Name | Parameter |
|---|---|
| System | Windows 10 × 64 |
| CPU | Inter Xeon W-2155@3.30 GHz |
| GPU | Nvidia GeForce GTX 1080 Ti(11G) |
| Environment configuration | PyCharm + Pytorch 1.2.0 + Python 3.7.7 |
| RAM | 64 GB |
Results of green plum defect detection.
| Method | Green Plum Defect Detection Network | |
|---|---|---|
| Average precision of defect detection | Rot | 99.25% |
| Spot | 93% | |
| Scar | 84.29% | |
| Crack | 78.13% | |
| Normal | 95.65 | |
| Mean average precision | 93.8% | |
| Total Loss | 0.02 | |
| Test time | 84.69 ms | |
Figure 5Confusion matrix diagram of green plum defect detection network test.
Figure 6Results of the test (a) test 1 (the red box is the confusion of spot); (b) test 2 (the red box is the confusion of scars, crack and rot).
Figure 7Loss curve.
Green plum defect detection results.
| Method | VGG Network | Green Plum Defect Detection Network | Lime Network | Resnet-18 Network | |
|---|---|---|---|---|---|
| Average precision of defect detection | Rot | 89.38% | 99.25% | 99.0% | 94.1% |
| Spot | 89.88% | 93% | 96.0% | 86.6% | |
| Scar | 78.93% | 84.29% | 50.0% | 79.3% | |
| Crack | 55.63% | 78.13% | 4.0% | 62.5% | |
| Normal | 89.88% | 95.65% | 8.7% | 83.5% | |
| Mean average precision | 84% | 93.8% | 77.2% | 90.18% | |
| Test time | 86.56 ms | 84.69 ms | 90.9 ms | 92.34 ms | |
Network evaluation.
| Green Plum Defect Detection Network | VGG Network | Lime Network | Resnet-18 Network | ||
|---|---|---|---|---|---|
| Recall | Scar | 0.84 | 0.79 | 0.5 | 0.79 |
| Rot | 0.99 | 0.89 | 0.99 | 0.94 | |
| Normal | 0.96 | 0.94 | 0.087 | 0.83 | |
| Crack | 0.78 | 0.56 | 0.04 | 0.63 | |
| Spot | 0.93 | 0.90 | 0.96 | 0.87 | |
| Precision | Scar | 0.86 | 0.64 | 0.82 | 0.78 |
| Rot | 0.94 | 0.92 | 0.88 | 0.91 | |
| Normal | 0.93 | 0.93 | 0.28 | 0.91 | |
| Crack | 0.93 | 0.74 | 0.055 | 0.67 | |
| Spot | 0.96 | 0.91 | 0.59 | 0.85 | |
| F1-Measure | Scar | 0.85 | 0.70 | 0.62 | 0.79 |
| Rot | 0.97 | 0.91 | 0.93 | 0.93 | |
| Normal | 0.94 | 0.93 | 0.13 | 0.87 | |
| Crack | 0.85 | 0.64 | 0.046 | 0.65 | |
| Spot | 0.94 | 0.91 | 0.73 | 0.86 |