Wang Shijie, Sun Guiling, Zheng Bowen, Du Yawen
College of Electronic Information and Optical Engineering, Nankai University, Tianjin 300350, China.
Entropy (Basel). 2021 Sep 3;23(9):1160. doi: 10.3390/e23091160.
The wide variety of crops in the image of agricultural products and the confusion with the surrounding environment information makes it difficult for traditional methods to extract crops accurately and efficiently. In this paper, an automatic extraction algorithm is proposed for crop images based on Mask RCNN. First, the Fruits 360 Dataset label is set with Labelme. Then, the Fruits 360 Dataset is preprocessed. Next, the data are divided into a training set and a test set. Additionally, an improved Mask RCNN network model structure is established using the PyTorch 1.8.1 deep learning framework, and path aggregation and features are added to the network design enhanced functions, optimized region extraction network, and feature pyramid network. The spatial information of the feature map is saved by the bilinear interpolation method in ROIAlign. Finally, the edge accuracy of the segmentation mask is further improved by adding a micro-fully connected layer to the mask branch of the ROI output, employing the Sobel operator to predict the target edge, and adding the edge loss to the loss function. Compared with FCN and Mask RCNN and other image extraction algorithms, the experimental results demonstrate that the improved Mask RCNN algorithm proposed in this paper is better in the precision, Recall, Average precision, Mean Average Precision, and F1 scores of crop image extraction results.
农产品图像中作物种类繁多,且与周围环境信息相互混淆,这使得传统方法难以准确、高效地提取作物。本文提出了一种基于Mask RCNN的作物图像自动提取算法。首先,使用Labelme设置Fruits 360数据集标签。然后,对Fruits 360数据集进行预处理。接下来,将数据划分为训练集和测试集。此外,使用PyTorch 1.8.1深度学习框架建立了改进的Mask RCNN网络模型结构,并在网络设计中添加了路径聚合和特征增强功能、优化的区域提取网络和特征金字塔网络。在ROIAlign中通过双线性插值方法保存特征图的空间信息。最后,通过在ROI输出的掩码分支中添加微全连接层、采用Sobel算子预测目标边缘并将边缘损失添加到损失函数中,进一步提高了分割掩码的边缘精度。与FCN和Mask RCNN等图像提取算法相比,实验结果表明,本文提出的改进Mask RCNN算法在作物图像提取结果的精度、召回率、平均精度、平均平均精度和F1分数方面表现更好。