Quickly and accurately judging the quality grades of apples is the basis for choosing suitable harvesting date and setting a suitable storage strategy. At present, the research of multi-task classification algorithm models based on CNN is still in the exploration stage, and there are still some problems such as complex model structure, high computational complexity and long computing time.
This paper presents a light-weight architecture based on multi-task convolutional neural networks for maturity (L-MTCNN) to eliminate immature and defective apples in the intelligent integration harvesting task. L-MTCNN architecture with diseases classification sub-network (D-Net) and maturity classification sub-network (M-Net), to realize multi-task discrimination of the apple appearance defect and maturity level. Under different light conditions, the image of fruit may have color damage, which makes it impossible to accurately judge the problem, an image preprocessing method based on brightness information was proposed to restore fruit appearance color under different illumination conditions in this paper. In addition, for the problems of inaccurate prediction results caused by tiny changes in apple appearance between different maturity levels, triplet loss is introduced as the loss function to improve the discriminating ability of maturity classification task. Based on the study and analysis of apple grade standards, three types of apples were taken as the research objects. By analyzing the changes in apple fruit appearance in each stage, the data set corresponding to the maturity level and fruit appearance was constructed. Experimental results show that D-Net and M-Net have significantly improved recall rate, precision rate and F1-Score in all classes compared with AlexNet, ResNet18, ResNet34 and VGG16.