Convolutional neural network for segmentation of apple blossoms in images - A. I. Kutyrev (Аграрная наука Евро-Северо-Востока, 2024)
The article provides a method for assessing the intensity of apple blossom for the thinning technological operation, including dataset preparation and training of YOLOv8-seg convolutional neural network models (n, s, m, l, x) for image segmentation. Transfer learning technique was applied in the research, utilizing pretrained models on the COCO dataset (Common Objects in Context). The apple blossom image dataset was captured using a GoPro HERO 11 camera. Image annotation was performed on the Roboflow platform using tools for bounding box and polygon annotation and labeling. To expand the dataset and improve the models' generalization during training, augmentation of original images was conducted, including horizontal flipping, horizontal rotation by 90°, rotation from -15° to +15°, adding noise up to 5% of pixels, blurring up to 2.5 pixels, horizontal and vertical shifts from -10° to 10°, and color hue adjustment from -15° to +15°. Binary classification metrics such as Precision and Recall were used to evaluate the performance of trained models in recognizing apple blossoms in images using bounding boxes and mask segmentation. The Loss(Box/Mask) loss function was used to assess model errors in determining bounding boxes and segmentation masks of objects in images during training. The hyperparameters of the YOLOv8-seg model for image recognition, classification, and segmentation of apple blossom images were identified through the YOLOv8x-seg (mAP50 metric = 0.591) and YOLOv8l-seg (mAP50 metric = 0,584) models demonstrate higher performance in apple blossom recognition. The frame processing speed (Frame Rate, FR) of  convolutional neural network models ranged from 10.27 (YOLOv8x-seg model) to 57.32 (YOLOv8n-seg model). The average  absolute error of the models in recognizing apple blossoms and counting their quantity in the test dataset does not exceed 9 %.