| Apple is the fruit of the large planting area and the high yield in China,which is an important pillar of agricultural economic development.At present,the picking of fruit is still dominated by manual work in China,which is labor-intensive and timeconsuming.Accelerating the research of apple picking robots can realize the automatic picking of fruit and promote the rapid transformation of China’s agriculture.The identification and location of fruit is the key step for apple picking robots to efficiently complete the task of picking.However,apple fruit in natural environment can be affected by complex factors such as light intensity,shade of branches and leaves,overlapping fruit,which can cause the deviation of visual system in acquiring the location of the fruit,affecting the efficiency of fruit picking.The rapid and accurate detection of apples in the natural environment is of great research significance to improve the efficiency of picking robot and promote the automatic development of apple industry.With the rapid development of deep learning,more and more researchers have applied it to the field of agricultural production and achieved remarkable results.Compared with the traditional machine learning method,the deep learning method can avoid the deficiency of manual feature extraction,and the convolutional neural network can directly extract the deep semantic features of images,which can be better applied to the complex and changeable orchard environment.Although the existing algorithm can effectively detect apple fruits in the natural environment,there is still the situation of missing fruit detection,so the detection accuracy of the algorithm needs to be further improved.This paper studies the problem of apple detection in natural environment,the main research contents are as follows:Aiming at the problem that low brightness and low contrast of images collected under insufficient illumination environment,a low-light image enhancement method based on improved EnlightenGAN is proposed.First,the RFB receptive field module is introduced into the encoder of the generator to deepen the depth and width of the network,expand the receptive field of the model,and enhance the multi-scale feature learning ability of the model,then the dual discriminator structure is used to balance global and local low light enhancement,Finally,the unpaired datasets are used to train the model.Experimental results show that compared with CycleGAN and ZeroDCE methods,the proposed method has better enhancement effect and can effectively learn the lighting features in low-light images and generate high-quality images.Aiming at the problem that low accuracy of apple detection in natural environment and missed detection of overlapping targets,an apple target detection method based on improved YOLOv5s is proposed.The feature extraction network of the original model is reconstructed by introducing multi-scale convolution to replace conventional convolution,and enhance the ability of multi-scale features of the model.At the same time,an attentional module was added to the neck network of the model to strengthen the model’s attention to high-level semantic information and ignore irrelevant shallow information through the feature of adaptive weight allocation of attentional mechanism.Finally,DIoU-NMS is used to replace the NMS algorithm to reduce the missed detection of overlapping targets.The results show that the detection accuracy of the improved model is increased by 3.47% compared with the original model,and it can better detect overlapping or occluded fruits in the natural environment. |