Abstract:Under natural light conditions, the presence of shadows reduced the accurate perception ability of apple harvesting robot towards apple targets, leading to low picking efficiency. Therefore, an EnlightenGAN algorithm for image enhancement was proposed, which effectively improved the accuracy of shadow removal and apple object detection. This algorithm first obtained a self-regularized attention map through image lighting standardization to achieve image shadow detection. Next, an attention-guided U-Net was used as the backbone network of the generator to obtain the enhanced image. Then, the information before and after enhancement was compared using a global-local discriminator, and image enhancement was ultimately achieved in the confrontation between the generator and discriminator. To further evaluate the effectiveness of the proposed method, EnlightenGAN, Zero_DCE, Adaptive_GAMMA, and RUAS algorithms were tested on the publicly available MinneApple dataset. Compared with Zero_DCE, Adaptive_GAMMA, and RUAS algorithms, the MSE of EnlightenGAN algorithm was decreased by 19.21%, 59.47%, and 67.42%, respectively, while the PSNR was increased by 6.26%, 34.55%, and 47.27%, respectively. The SSIM was increased by 2.99%, 23.21%, and 68.29%, respectively. The detection P of EnlightenGAN algorithm before and after enhancement were 97.38% and 98.37%, respectively, with R of 74.74% and 91.37%. The F1 score were 84% and 94%, respectively. The precision, recall, and F1 score were improved by 1.02%, 22.25%, and 11.90%, respectively. In order to verify the effectiveness of the model, different datasets were tested, and the results showed that the target detection precision, recall and F1 score after the enhancement of the EnlightenGAN algorithm were improved compared with the non enhanced algorithm, Zero_DCE, Adaptive_GAMMA and RUAS algorithms. All results indicated that the proposed method can effectively improve the detection precision under uneven lighting conditions and provide reference for the visual system of apple harvesting robot.