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.
Moisture content (MC) is one of the important indexes to evaluate maize seed quality. Its accurate prediction is very challenging. In this study, the long-wave near-infrared hyperspectral imaging (LW-NIR-HSI) system was used, and the embryo side (S1) and endosperm side (S2) spectra of each maize seed were extracted, as well as the average spectrum (S3) of both being calculated. The partial least square regression (PLSR) and least-squares support vector machine (LS-SVM) models were established. The uninformative variable elimination (UVE) and successive projections algorithm (SPA) were employed to reduce the complexity of the models. The results indicated that the S3-UVE-SPA-PLSR and S3-UVE-SPA-LS-SVM models achieved the best prediction accuracy with an RMSEP of 1.22% and 1.20%, respectively. Furthermore, the combination (S1+S2) of S1 and S2 was also used to establish the prediction models to obtain a general model. The results indicated that the S1+S2-UVE-SPA-LS-SVM model was more valuable with Rpre of 0.91 and RMSEP of 1.32% for MC prediction. This model can decrease the influence of different input spectra (i.e., S1 or S2) on prediction performance. The overall study indicated that LW-HSI technology combined with the general model could realize the non-destructive and stable prediction of MC in maize seeds.