针对苹果果实在自然环境条件下易受到枝干、树叶等障碍物的遮挡,导致识别准确率降低的问题,引入了一种融合生成对抗网络(Generative adversarial networks,GAN)的苹果果实检测方法.使用Faster RCNN模型对苹果果实和遮挡物进行检测,对受遮挡的苹果果实图像添加掩码,然后用生成对抗网络对受遮挡的苹果果实图像进行修复,最后将修复的图像传输给目标检测模型进行识别定位.结果表明,融合生成对抗网络的GAN-Faster RCNN联合模型,对大面积遮挡的苹果果实,在测试集上的平均精度均值(Mean average precision,mAP)达73.62%,较原模型提高了8.76个百分点;对小面积遮挡的苹果果实,在测试集上的平均精度均值达90.67%,较原模型提高了9.54个百分点,解决了传统目标检测方法在遮挡条件下苹果果实识别准确率低的问题.
Apple fruit detection method based on generative adversarial networks under occlusion conditions
Aiming at the problem that apple fruit was easily blocked by branches,leaves,and other obstacles in the natural environ-ment,which led to the reduction of recognition accuracy,a method of apple fruit detection based on the fusion of generative adversari-al networks(GAN)was introduced.The Faster RCNN model was used to detect the apple fruit and occlusion,mask the occluded ap-ple fruit image,and then repair the occluded apple fruit image with the generative adversarial networks.Finally,the repaired image was transmitted to the target detection model for identification and positioning.The results showed that the combined model of GAN-Faster RCNN,which fused generative adversarial networks,had an mAP of 73.62%on the test set for apple fruits with a large area of occlusion,which was 8.76 percentage points higher than the original model;for the apple fruit with a small area of occlusion,the aver-age precision on the test set was 90.67%,which was 9.54 percentage points higher than the original model.It solved the problem of low accuracy of apple fruit recognition under occlusion conditions with traditional target detection methods.