技术领域Technical Field
本发明属于数据处理技术领域,尤其涉及一种桉树单木分割方法和装置、系统、存储介质。The invention belongs to the technical field of data processing, and in particular relates to a method and device, a system and a storage medium for splitting a single eucalyptus tree.
背景技术Background Art
桉树人工林因生长快、单产高,与松树、杨树并称为世界三大速生人工林,广泛种植于热带和亚热带,不仅具有较好的木质特性,是纸浆和造纸生产中最重要的短纤维来源,而且在生态安全、调节全球气候变化及保障国家木材安全等方面均发挥着重要作用。传统桉树资源调查多是通过野外测量获得,结果虽然准确但耗时费力、成本高昂、范围有限,且数据更新频率较低,难以满足短轮伐期桉树人工林动态变化监测的数据需求。遥感技术的成功应用在一定程度上弥补了传统调查的不足,不仅节省了数据调查成本,同时也极大的减少了调查所需时间,提高数据更新频率。Eucalyptus plantations are known as the world's three fastest-growing plantations along with pine and poplar due to their fast growth and high yield. They are widely planted in tropical and subtropical areas. They not only have good wood properties and are the most important source of short fibers in pulp and paper production, but also play an important role in ecological security, regulating global climate change, and ensuring national timber security. Traditional eucalyptus resource surveys are mostly obtained through field measurements. Although the results are accurate, they are time-consuming, labor-intensive, costly, limited in scope, and the data update frequency is low, making it difficult to meet the data needs for monitoring the dynamic changes of short-rotation eucalyptus plantations. The successful application of remote sensing technology has made up for the shortcomings of traditional surveys to a certain extent, not only saving data survey costs, but also greatly reducing the time required for surveys and increasing the frequency of data updates.
无人机具有飞行高度低、操作灵活且成本较低等优点,现已成为获取高分辨率影像的主要技术手段,为桉树人工林单木结构参数提取奠定了数据基础。单木树冠分割是基于高分辨率遥感影像获取单木结构参数取的关键。深度学习算法算法能够从大量数据中学习并自适应地提取特征,因此适用于处理各种类型的数据,不仅对不同类型的地貌和植被具有较强的适应性,而且能够学习复杂的特征和上下文信息。同时它还可以自动学习数据中的模式和规律,无需人工干预,节省了大量的人力成本和时间。现已广泛应用于森林单木分割并获得不错的分割结果。现阶段常用的深度学习单木分割算法主要有两类:一类为语义分割,旨在将图像中的每个像素标记为对应的语义类别,从而实现对图像的像素级别的理解和分析,代表算法主要有DeepLabv3+算法、PSPNet算法和UNet算法。因它关注的是图像中的每个位置的内容,而不是单个对象的边界原因),导致语义分割结果易产生粘连,难以实现完全分割。另一类为实例分割,通过每个对象实例并将其精确地分割出来,同时为每个实例分配唯一的标识符,实现单木分割,代表算法主要有Mask R-CNN算法)和Yolact算法)。与语义分割算法不同,实例分割算法因其不仅关注图像中的物体类别,还要求区分同一类别中不同的对象实例的优势,使得单木分割结果不易产生粘连。其中Mask R-CNN算法作为实例分割的代表性算法,具有能够在像素级别对图像进行分割,因此能够提供精确的分割结果,包括物体的边界和形状信息,并且可以应用于不同尺寸和比例的物体,适用于各种不同场景和环境下的分割任务的优势,现已广泛应用于单木分割。如:Zhenbang Hao等基于无人机影像,利用Mask R-CNN算法对杉木幼龄林进行单木树冠检测,结果单木分割效果较好,精度为84.68%,但该算法在除幼龄林外其他林龄单木分割结果如何仍需进一步验证。Hancong Fu等采用Mask R-CNN算法对樟子松进行树冠检测,实验结果表明,该方法的树冠提取的最高精度为89.6%,但是在高郁闭度的森林中应用该方法仍存在一定困难。RobiahHamzah等使用Mask R-CNN算法对热带雨林中的树木进行分割识别,准确率达到75%,但是从分割效果来看,许多树木未被识别分割出来。虽然Mask R-CNN算法能够实现单木精确分割,但在复杂场景中识别准确率低,分割效果差,难以迁移到其它环境中。Drones have the advantages of low flight altitude, flexible operation and low cost. They have become the main technical means to obtain high-resolution images, laying a data foundation for the extraction of single tree structural parameters in eucalyptus plantations. Single tree crown segmentation is the key to obtaining single tree structural parameters based on high-resolution remote sensing images. The deep learning algorithm can learn and adaptively extract features from a large amount of data, so it is suitable for processing various types of data. It not only has strong adaptability to different types of landforms and vegetation, but also can learn complex features and contextual information. At the same time, it can also automatically learn patterns and laws in the data without manual intervention, saving a lot of manpower costs and time. It has been widely used in forest single tree segmentation and obtained good segmentation results. At present, there are two main types of deep learning single tree segmentation algorithms: one is semantic segmentation, which aims to mark each pixel in the image as a corresponding semantic category, so as to achieve pixel-level understanding and analysis of the image. The representative algorithms are DeepLabv3+ algorithm, PSPNet algorithm and UNet algorithm. Because it focuses on the content of each position in the image, rather than the boundary of a single object, the semantic segmentation results are prone to adhesion and it is difficult to achieve complete segmentation. The other type is instance segmentation, which accurately segments each object instance and assigns a unique identifier to each instance to achieve single tree segmentation. Representative algorithms include Mask R-CNN algorithm and Yolact algorithm. Unlike semantic segmentation algorithms, instance segmentation algorithms not only focus on the object category in the image, but also require the distinction between different object instances in the same category, making it difficult for single tree segmentation results to produce adhesion. Among them, the Mask R-CNN algorithm, as a representative algorithm for instance segmentation, has the advantage of being able to segment images at the pixel level, so it can provide accurate segmentation results, including the boundary and shape information of the object, and can be applied to objects of different sizes and proportions. It is suitable for segmentation tasks in various scenes and environments. It has now been widely used in single tree segmentation. For example, Zhenbang Hao et al. used the Mask R-CNN algorithm to detect single tree crowns in young Chinese fir forests based on drone images. The results showed that the single tree segmentation effect was good with an accuracy of 84.68%, but the segmentation results of single trees in forests other than young forests still need to be further verified. Hancong Fu et al. used the Mask R-CNN algorithm to detect the crown of Pinus sylvestris var. mongolica. The experimental results showed that the highest accuracy of crown extraction of this method was 89.6%, but it was still difficult to apply this method in forests with high canopy density. Robiah Hamzah et al. used the Mask R-CNN algorithm to segment and identify trees in tropical rainforests with an accuracy rate of 75%, but from the segmentation effect, many trees were not identified and segmented. Although the Mask R-CNN algorithm can achieve accurate segmentation of single trees, it has low recognition accuracy and poor segmentation effect in complex scenes, making it difficult to migrate to other environments.
发明内容Summary of the invention
本发明要解决的技术问题是,提供一种桉树单木分割方法和装置、系统、存储介质,提高复杂场景中识别准确率和在不同场景下的迁移适应性。The technical problem to be solved by the present invention is to provide a method and device, system and storage medium for segmenting a single eucalyptus tree, so as to improve the recognition accuracy in complex scenes and the migration adaptability in different scenes.
为实现上述目的,本发明采用如下的技术方案:To achieve the above object, the present invention adopts the following technical solution:
一种桉树单木分割方法,包括:A method for splitting a single eucalyptus tree, comprising:
步骤S1、获取历史桉树UAV数据;Step S1, obtaining historical eucalyptus UAV data;
步骤S2、根据历史桉树UAV数据训练改进型Mask R-CNN模型,得到单木分割模型;其中,改进型Mask R-CNN模型包括:依次连接主干网络、特征金字塔网络FPN、区域建议网络RPN、RoI Align层、classifier模块、mask模块;其中,在特征金字塔网络FPN中设置三个增强选择核卷积模块ESK,且每个增强选择核卷积模块ESK包含:通道注意力单元、空间注意力单元和多尺度卷积单元;Step S2, training an improved Mask R-CNN model according to historical eucalyptus UAV data to obtain a single tree segmentation model; wherein the improved Mask R-CNN model includes: sequentially connecting a backbone network, a feature pyramid network FPN, a region proposal network RPN, a RoI Align layer, a classifier module, and a mask module; wherein three enhanced selection kernel convolution modules ESK are set in the feature pyramid network FPN, and each enhanced selection kernel convolution module ESK includes: a channel attention unit, a spatial attention unit, and a multi-scale convolution unit;
步骤S3、将目标区域的桉树UAV数据输入到单木分割模型,提取桉树单木的数量和单木冠幅面积。Step S3: input the UAV data of eucalyptus trees in the target area into the single tree segmentation model to extract the number of single eucalyptus trees and the crown area of single trees.
作为优选,步骤S1还包括对历史桉树UAV数据进行预处理,其包括:Preferably, step S1 further comprises preprocessing the historical eucalyptus UAV data, which comprises:
对历史桉树UAV数据进行剪裁;Trimming of historical eucalyptus UAV data;
根据剪裁后的历史桉树UAV数据,进行桉树树冠边缘轮廓标注。The eucalyptus crown edge contour was marked based on the clipped historical eucalyptus UAV data.
本发明还提供一种桉树单木分割装置,包括:The present invention also provides a eucalyptus single wood splitting device, comprising:
获取模块,用于获取历史桉树UAV数据;Acquisition module, used to obtain historical eucalyptus UAV data;
训练模块,用于根据历史桉树UAV数据训练改进型Mask R-CNN模型,得到单木分割模型;其中,改进型Mask R-CNN模型包括:依次连接主干网络、特征金字塔网络FPN、区域建议网络RPN、RoI Align层、classifier模块、mask模块;其中,在特征金字塔网络FPN中设置三个增强选择核卷积模块ESK,且每个增强选择核卷积模块ESK包含:通道注意力单元、空间注意力单元和多尺度卷积单元;A training module is used to train an improved Mask R-CNN model based on historical eucalyptus UAV data to obtain a single tree segmentation model; wherein the improved Mask R-CNN model includes: a backbone network, a feature pyramid network FPN, a region proposal network RPN, a RoI Align layer, a classifier module, and a mask module are connected in sequence; wherein three enhanced selective kernel convolution modules ESK are set in the feature pyramid network FPN, and each enhanced selective kernel convolution module ESK includes: a channel attention unit, a spatial attention unit, and a multi-scale convolution unit;
提取模块,用于将目标区域的桉树UAV数据输入到单木分割模型,提取桉树单木的数量和单木冠幅面积。The extraction module is used to input the UAV data of eucalyptus in the target area into the single tree segmentation model to extract the number of single eucalyptus trees and the crown area of single trees.
作为优选,还包括预处理模块,用于对历史桉树UAV数据进行预处理,其包括:Preferably, a preprocessing module is also included for preprocessing the historical eucalyptus UAV data, which includes:
剪裁单元,用于对历史桉树UAV数据进行剪裁;A clipping unit, used to clip the historical eucalyptus UAV data;
标注单元,用于根据剪裁后的历史桉树UAV数据,进行桉树树冠边缘轮廓标注。The labeling unit is used to label the edge contour of the eucalyptus crown based on the clipped historical eucalyptus UAV data.
本发明还提供一种桉树单木分割系统,包括:存储器和处理器,所述存储器上存储有由所述处理器运行的计算机程序,所述计算机程序在被所述处理器运行时执行桉树单木分割方法。The present invention also provides a eucalyptus single tree segmentation system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a eucalyptus single tree segmentation method when executed by the processor.
本发明还提供一种存储介质,所述存储介质上存储有计算机程序,所述计算机程序在运行时执行桉树单木分割方法。The present invention also provides a storage medium, on which a computer program is stored, and the computer program executes the eucalyptus single tree segmentation method when running.
本发明通过对Mask R-CNN模型的FPN网络中添加三个增强选择核卷积模块ESK,提升对桉树语义信息重要特征的注意力,同时,将特征金字塔网络FPN输出5个大小不同的特征层,改为输出三个有效特征层,减少网络模型的参数量。采用本发明的技术方案,提高复杂场景中识别准确率和在不同场景下的迁移适应性。The present invention adds three enhanced selection kernel convolution modules ESK to the FPN network of the Mask R-CNN model to improve the attention to the important features of the eucalyptus semantic information. At the same time, the feature pyramid network FPN outputs five feature layers of different sizes, but instead outputs three effective feature layers, reducing the number of parameters of the network model. The technical solution of the present invention improves the recognition accuracy in complex scenes and the migration adaptability in different scenes.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
图1为本发明实施例桉树单木分割方法的流程图;FIG1 is a flow chart of a method for segmenting a single eucalyptus tree according to an embodiment of the present invention;
图2为改进型Mask R-CNN模型中特征金字塔网络FPN的结构图。Figure 2 is a structural diagram of the feature pyramid network FPN in the improved Mask R-CNN model.
具体实施方式DETAILED DESCRIPTION
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
实施例1:Embodiment 1:
如图1所示,本发明实施例提供一种桉树单木分割方法,包括:As shown in FIG1 , an embodiment of the present invention provides a method for segmenting a single eucalyptus tree, comprising:
步骤S1、获取历史桉树UAV数据;Step S1, obtaining historical eucalyptus UAV data;
步骤S2、根据历史桉树UAV数据训练改进型Mask R-CNN模型,得到单木分割模型;Step S2: training an improved Mask R-CNN model based on historical eucalyptus UAV data to obtain a single tree segmentation model;
步骤S3、将目标区域的桉树UAV数据输入到单木分割模型,提取桉树单木的数量和单木冠幅面积。Step S3: input the UAV data of eucalyptus trees in the target area into the single tree segmentation model to extract the number of single eucalyptus trees and the crown area of single trees.
作为本发明实施例的一种实施方式,步骤S1还包括对历史桉树UAV数据进行预处理,其包括:As an implementation of an embodiment of the present invention, step S1 also includes preprocessing the historical eucalyptus UAV data, which includes:
对历史桉树UAV数据进行剪裁;Trimming of historical eucalyptus UAV data;
根据剪裁后的历史桉树UAV数据,进行桉树树冠边缘轮廓标注。The eucalyptus crown edge contour was marked based on the clipped historical eucalyptus UAV data.
作为本发明实施例的一种实施方式,改进型Mask R-CNN模型包括:依次连接主干网络、特征金字塔网络FPN、区域建议网络RPN、RoI Align层、classifier模块、mask模块;其中,在特征金字塔网络FPN中设置三个增强选择核卷积模块ESK,且每个增强选择核卷积模块ESK包含:通道注意力单元、空间注意力单元和多尺度卷积单元。As an implementation method of an embodiment of the present invention, the improved Mask R-CNN model includes: a backbone network, a feature pyramid network FPN, a region proposal network RPN, a RoI Align layer, a classifier module, and a mask module are connected in sequence; wherein, three enhanced selection kernel convolution modules ESK are set in the feature pyramid network FPN, and each enhanced selection kernel convolution module ESK includes: a channel attention unit, a spatial attention unit and a multi-scale convolution unit.
如图2所示,步骤S2中,骨干网络对历史桉树UAV数据进行特征提取,生成C2至C5的大小不同的特征层,所述C2至C5的特征层在经过一次卷积核大小为1X1的Conv2D卷积后,C2至C4的特征层输入进入ESK特征模块中进行特征的加强提取,提取后的特征与前面卷积后的特征进行跳跃连接,进行上采样后得到对应的特征层P2至P5,取P2、P3和P4作为有效特征层;其中;ESK模块具有不同通道注意力单元、空间注意力单元以及不同核大小的多尺度卷积;ESK中的通道注意力模块和空间注意力模块能够同时从空间和通道的维度校准目标影像特征;ESK中不同核大小的多卷积层可以提供不同尺度的感受野,从而提高网络对不同输入图像的适应性,提高目标检测准确率。利用RPN网络对P2至P4特征层进行进行预测产生图像中可能包含目标的候选区域,生成区域建议框;对所述区域建议框进行筛选,筛选出来的区域在RoI Align层中进行特征对齐,生成候选区域对应的特征,映射回特征图中。对利用RoI Align操作后得到的特征结果进行resize,其中在classifier模块里,截取后的内容会resize到7x7x256的大小,然后再进行卷积操作,对建议框解码获得最终预测框;在mask模块里,截取后的内容会resize到14x14x256的大小,也进行卷积操作,获得预测框内部的语义分割结果,至此完成训练改进型Mask R-CNN模型,得到单木分割模型。As shown in Figure 2, in step S2, the backbone network extracts features from the historical eucalyptus UAV data to generate feature layers of different sizes from C2 to C5. After the feature layers of C2 to C5 undergo a Conv2D convolution with a convolution kernel size of 1X1, the feature layers of C2 to C4 are input into the ESK feature module for enhanced feature extraction. The extracted features are jump-connected with the features after the previous convolution, and the corresponding feature layers P2 to P5 are obtained after upsampling. P2, P3 and P4 are taken as effective feature layers; wherein; the ESK module has multi-scale convolutions with different channel attention units, spatial attention units and different kernel sizes; the channel attention module and spatial attention module in ESK can calibrate the target image features from the spatial and channel dimensions at the same time; the multi-convolution layers with different kernel sizes in ESK can provide receptive fields of different scales, thereby improving the adaptability of the network to different input images and improving the accuracy of target detection. The RPN network is used to predict the P2 to P4 feature layers to generate candidate regions that may contain targets in the image and generate region proposal boxes; the region proposal boxes are screened, and the screened regions are feature aligned in the RoI Align layer to generate features corresponding to the candidate regions and map them back to the feature map. The feature results obtained after the RoI Align operation are resized. In the classifier module, the intercepted content is resized to a size of 7x7x256, and then a convolution operation is performed to decode the proposal box to obtain the final prediction box; in the mask module, the intercepted content is resized to a size of 14x14x256, and a convolution operation is also performed to obtain the semantic segmentation result inside the prediction box. At this point, the training of the improved Mask R-CNN model is completed, and a single tree segmentation model is obtained.
进一步,训练改进型Mask R-CNN模型过程包括:Furthermore, the process of training the improved Mask R-CNN model includes:
1、将历史桉树UAV数据输入Restnet101主干网络中进行特征提取,得到四个不同大小尺寸的特征层,分别为C2,C3,C4,C5,然后将这些特征层进行一次卷积核大小为1X1,通道数为256的卷积操作。1. The historical eucalyptus UAV data is input into the Restnet101 backbone network for feature extraction, and four feature layers of different sizes are obtained, namely C2, C3, C4, and C5. Then these feature layers are convolved with a convolution kernel size of 1X1 and a channel number of 256.
2、将卷积后的C2至C4特征层引入ESK模块中,分别在通道注意力单元和空间注意力单元中进行特征提取,从通道维度和空间维度有选择性地关注对当前任务更重要的特征通道和空间位置,聚焦于影像重要的特征信息;然后将提取后的特征与原特征进行特征连接,得到总特征输出来。2. The convolutional C2 to C4 feature layers are introduced into the ESK module, and feature extraction is performed in the channel attention unit and the spatial attention unit respectively. The feature channels and spatial positions that are more important to the current task are selectively focused on from the channel dimension and the spatial dimension, focusing on the important feature information of the image; then the extracted features are connected with the original features to obtain the total feature output.
3、将经过ESK模块提取的特征与前面卷积得到的特征再进行一次特征连接后,分别进行上采样,分别得到P2、P3、P4、P5特征层。3. After the features extracted by the ESK module are concatenated with the features obtained by the previous convolution, they are upsampled to obtain the P2, P3, P4, and P5 feature layers respectively.
4、基于桉树种植密集及其树冠在影像中为小目标的特点,将原来的特征金字塔FPN输出5个大小不同的特征层,改为输出3个有效特征层。由于P2至P5,其对应的先验框越来越大,因而取其中的P2,P3,P4特征层。相应的,将RPN先验框的长度[32,64,128,256,512]的参数改为[32,64,128],分别对应于P2,P3,P4特征层。4. Based on the characteristics of dense eucalyptus planting and its crown as a small target in the image, the original feature pyramid FPN outputs 5 feature layers of different sizes, and is changed to output 3 effective feature layers. Since the corresponding prior frames from P2 to P5 are getting larger and larger, the P2, P3, and P4 feature layers are taken. Accordingly, the parameters of the RPN prior frame length [32, 64, 128, 256, 512] are changed to [32, 64, 128], corresponding to the P2, P3, and P4 feature layers, respectively.
5、获取得到的P2,P3,P4特征层输入RPN建议框网络中,获取先验框调整参数,检测先验框内部是否包含物体。具体操作是,输入进来的特征层首先进行一次3x3的通道数为512的卷积,然后根据RPN先验框的参数[32,64,128],把输入进来的图像分割成128x128x256、64x64x256、32x32x256不同大小的网格,每个网格默认存在3个先验框。然后再进行两次卷积分别判断先验框是否包含物体以及对其进行调整,获得一个新的框,即建议框。5. The obtained P2, P3, and P4 feature layers are input into the RPN suggestion box network to obtain the prior box adjustment parameters and detect whether the prior box contains an object. The specific operation is that the input feature layer first undergoes a 3x3 convolution with a channel number of 512, and then according to the parameters of the RPN prior box [32, 64, 128], the input image is divided into grids of different sizes of 128x128x256, 64x64x256, and 32x32x256. Each grid has 3 prior boxes by default. Then two more convolutions are performed to determine whether the prior box contains an object and adjust it to obtain a new box, namely the suggestion box.
6、获得的建议框经过进一步调整解码后,通过非极大抑制对其进行进一步的筛选,选出置信度最大的建议框。6. After further adjustment and decoding, the obtained suggestion box is further screened through non-maximum suppression to select the suggestion box with the highest confidence.
7、在RoI Align层利用建议框对共享特征层(P2、P3、P4)进行截取,将特征层与建议框进行特征对齐,通过建议框的大小找到建议框属于哪个特征层,生成候选区域对应的特征,映射回特征图中。7. In the RoI Align layer, the suggestion box is used to intercept the shared feature layer (P2, P3, P4), and the feature layer is aligned with the suggestion box. The feature layer to which the suggestion box belongs is found by the size of the suggestion box, and the features corresponding to the candidate area are generated and mapped back to the feature map.
8、在classifier模块里,其会利用一次通道数为1024的7x7的卷积和一次通道数为1024的1x1的卷积对ROI Align获得的7x7x256的区域进行卷积,两次通道数为1024卷积用于模拟两次1024的全连接,然后再分别进行全连接,获得建议框内的物体以及建议框的调整参数。8. In the classifier module, a 7x7 convolution with a channel number of 1024 and a 1x1 convolution with a channel number of 1024 are used to convolve the 7x7x256 area obtained by ROI Align. Two convolutions with a channel number of 1024 are used to simulate two 1024 full connections, and then full connections are performed separately to obtain the objects in the suggestion box and the adjustment parameters of the suggestion box.
9、在mask模块里,首先会对resize后的局部特征层进行四次3x3的256通道的卷积,再进行一次反卷积,再进行一次通道数为被检查物体种类数量大小,记为n的卷积,最终结果代表每一个像素点分的类;最终的shape为28x28xn,代表每个像素点的类别。9. In the mask module, the resized local feature layer is first subjected to four 3x3 256-channel convolutions, then a deconvolution, and then a convolution with the number of channels equal to the number of types of inspected objects, denoted as n. The final result represents the class of each pixel; the final shape is 28x28xn, representing the category of each pixel.
10、classifier模块的预测结果为建议框内部物体的种类和预测框的位置,建议框调整后的结果即为最终预测框,预测框的解码过程包括:1)取出不属于背景,并且得分大于置信度为0.7的建议框;2)利用建议框和classifier模块的预测结果进行解码,获得最终预测框的位置;3)利用得分和最终预测框的位置进行非极大抑制,防止重复检测。10. The prediction result of the classifier module is the type of object inside the suggestion box and the position of the prediction box. The result after the adjustment of the suggestion box is the final prediction box. The decoding process of the prediction box includes: 1) taking out the suggestion box that does not belong to the background and whose score is greater than 0.7; 2) decoding using the suggestion box and the prediction result of the classifier module to obtain the position of the final prediction box; 3) using the score and the position of the final prediction box for non-maximum suppression to prevent repeated detection.
11、将最终预测框作为mask模块的区域截取部分,利用最终预测框对mask模块中用到的公用特征层进行截取;截取后,利用mask模块再对像素点进行分类,获得语义分割结果。11. The final prediction box is used as the area cutout of the mask module, and the common feature layer used in the mask module is cutout using the final prediction box. After cutting out, the mask module is used to classify the pixels to obtain the semantic segmentation result.
12、将桉历史桉树UAV数据在改进型Mask R-CNN模型上进行训练,批处理大小为1,epoch大小为300,采用adam优化方法,动量参数momentum为0.9,weight decay参数为0,初始学习率为0.0001。12. The historical eucalyptus UAV data was trained on the improved Mask R-CNN model with a batch size of 1, an epoch size of 300, an adam optimization method, a momentum parameter of 0.9, a weight decay parameter of 0, and an initial learning rate of 0.0001.
实施例2:Embodiment 2:
本发明实施例还提供一种桉树单木分割装置,包括:The embodiment of the present invention further provides a eucalyptus single wood splitting device, comprising:
获取模块,用于获取历史桉树UAV数据;Acquisition module, used to obtain historical eucalyptus UAV data;
训练模块,用于根据历史桉树UAV数据训练改进型Mask R-CNN模型,得到单木分割模型;其中,改进型Mask R-CNN模型包括:依次连接主干网络、特征金字塔网络FPN、区域建议网络RPN、RoI Align层、classifier模块、mask模块;其中,在特征金字塔网络FPN中设置三个增强选择核卷积模块ESK,且每个增强选择核卷积模块ESK包含:通道注意力单元、空间注意力单元和多尺度卷积单元;A training module is used to train an improved Mask R-CNN model based on historical eucalyptus UAV data to obtain a single tree segmentation model; wherein the improved Mask R-CNN model includes: a backbone network, a feature pyramid network FPN, a region proposal network RPN, a RoI Align layer, a classifier module, and a mask module are connected in sequence; wherein three enhanced selective kernel convolution modules ESK are set in the feature pyramid network FPN, and each enhanced selective kernel convolution module ESK includes: a channel attention unit, a spatial attention unit, and a multi-scale convolution unit;
提取模块,用于将目标区域的桉树UAV数据输入到单木分割模型,提取桉树单木的数量和单木冠幅面积。The extraction module is used to input the UAV data of eucalyptus in the target area into the single tree segmentation model to extract the number of single eucalyptus trees and the crown area of single trees.
作为本发明实施例的一种实施方式,还包括预处理模块,用于对历史桉树UAV数据进行预处理,其包括:As an implementation of an embodiment of the present invention, a preprocessing module is also included, which is used to preprocess the historical eucalyptus UAV data, and includes:
剪裁单元,用于对历史桉树UAV数据进行剪裁;A clipping unit, used to clip the historical eucalyptus UAV data;
标注单元,用于根据剪裁后的历史桉树UAV数据,进行桉树树冠边缘轮廓标注。The labeling unit is used to label the edge contour of the eucalyptus crown based on the clipped historical eucalyptus UAV data.
实施例3:Embodiment 3:
本发明实施例还提供一种桉树单木分割系统,包括:存储器和处理器,所述存储器上存储有由所述处理器运行的计算机程序,所述计算机程序在被所述处理器运行时执行桉树单木分割方法。An embodiment of the present invention further provides a eucalyptus single tree segmentation system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a eucalyptus single tree segmentation method when executed by the processor.
实施例4:Embodiment 4:
本发明实施例还提供一种存储介质,所述存储介质上存储有计算机程序,所述计算机程序在运行时执行桉树单木分割方法。An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program executes a method for segmenting a single eucalyptus tree when running.
以上所述的实施例仅是对本发明优选方式进行的描述,并非对本发明的范围进行限定,在不脱离本发明设计精神的前提下,本领域普通技术人员对本发明的技术方案做出的各种变形和改进,均应落入本发明权利要求书确定的保护范围内。The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should fall within the protection scope determined by the claims of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410716890.XACN118537352B (en) | 2024-06-04 | 2024-06-04 | Eucalyptus single knot segmentation method, device, system and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410716890.XACN118537352B (en) | 2024-06-04 | 2024-06-04 | Eucalyptus single knot segmentation method, device, system and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN118537352Atrue CN118537352A (en) | 2024-08-23 |
| CN118537352B CN118537352B (en) | 2025-08-19 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410716890.XAActiveCN118537352B (en) | 2024-06-04 | 2024-06-04 | Eucalyptus single knot segmentation method, device, system and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN118537352B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2020103026A4 (en)* | 2020-10-27 | 2020-12-24 | Nanjing Forestry University | A Single Tree Crown Segmentation Algorithm Based on Super-pixels and Topological Features in Aerial Images |
| CN114049621A (en)* | 2021-11-10 | 2022-02-15 | 石河子大学 | A cotton top recognition and detection method based on Mask R-CNN |
| CN114202672A (en)* | 2021-12-09 | 2022-03-18 | 南京理工大学 | A small object detection method based on attention mechanism |
| CN115497091A (en)* | 2021-06-17 | 2022-12-20 | 安琪酵母股份有限公司 | Yeast cell counting and living cell rate detection system and method |
| CN115565064A (en)* | 2022-09-19 | 2023-01-03 | 汶上县林业保护和发展服务中心 | Single tree canopy detection method and device based on lightweight instance segmentation network |
| CN116935141A (en)* | 2023-08-07 | 2023-10-24 | 云启智慧科技有限公司 | College auxiliary sleeping device and method based on unmanned aerial vehicle and artificial intelligence |
| CN117292278A (en)* | 2023-09-28 | 2023-12-26 | 华南农业大学 | Digital orchard fruit tree positioning method, device, equipment and medium |
| CN117392382A (en)* | 2023-09-21 | 2024-01-12 | 广州飞鸟互联科技有限公司 | Single tree fruit tree segmentation method and system based on multi-scale dense instance detection |
| JP7450838B1 (en)* | 2023-02-16 | 2024-03-15 | 之江実験室 | Method and device for calculating crop canopy coverage using small amount of data learning based on background filtering |
| KR20240044145A (en)* | 2022-09-28 | 2024-04-04 | 동명대학교산학협력단 | System for vehicle damage volume and traffic accident type recognition based on mr-cnn |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2020103026A4 (en)* | 2020-10-27 | 2020-12-24 | Nanjing Forestry University | A Single Tree Crown Segmentation Algorithm Based on Super-pixels and Topological Features in Aerial Images |
| CN115497091A (en)* | 2021-06-17 | 2022-12-20 | 安琪酵母股份有限公司 | Yeast cell counting and living cell rate detection system and method |
| CN114049621A (en)* | 2021-11-10 | 2022-02-15 | 石河子大学 | A cotton top recognition and detection method based on Mask R-CNN |
| CN114202672A (en)* | 2021-12-09 | 2022-03-18 | 南京理工大学 | A small object detection method based on attention mechanism |
| CN115565064A (en)* | 2022-09-19 | 2023-01-03 | 汶上县林业保护和发展服务中心 | Single tree canopy detection method and device based on lightweight instance segmentation network |
| KR20240044145A (en)* | 2022-09-28 | 2024-04-04 | 동명대학교산학협력단 | System for vehicle damage volume and traffic accident type recognition based on mr-cnn |
| JP7450838B1 (en)* | 2023-02-16 | 2024-03-15 | 之江実験室 | Method and device for calculating crop canopy coverage using small amount of data learning based on background filtering |
| CN116935141A (en)* | 2023-08-07 | 2023-10-24 | 云启智慧科技有限公司 | College auxiliary sleeping device and method based on unmanned aerial vehicle and artificial intelligence |
| CN117392382A (en)* | 2023-09-21 | 2024-01-12 | 广州飞鸟互联科技有限公司 | Single tree fruit tree segmentation method and system based on multi-scale dense instance detection |
| CN117292278A (en)* | 2023-09-28 | 2023-12-26 | 华南农业大学 | Digital orchard fruit tree positioning method, device, equipment and medium |
| Title |
|---|
| QINGBIN SHAO: "Attentive CT Lesion Detection Using Deep Pyramid Inference with Multi-scale Booster", MICCAI 2019, 10 October 2019 (2019-10-10), pages 301 - 306* |
| QINGBIN SHAO: "Attentive CT Lesion Detection Using Deep Pyramid", MICCAI 2019, 10 October 2019 (2019-10-10), pages 301 - 306* |
| 梁桥康: "机器人智能视觉感知与深度学习应用", 31 March 2023, 机械工业出版社, pages: 154 - 158* |
| Publication number | Publication date |
|---|---|
| CN118537352B (en) | 2025-08-19 |
| Publication | Publication Date | Title |
|---|---|---|
| CN113160062B (en) | Infrared image target detection method, device, equipment and storage medium | |
| Liu et al. | “Is this blueberry ripe?”: a blueberry ripeness detection algorithm for use on picking robots | |
| CN114022432A (en) | Improved yolov 5-based insulator defect detection method | |
| CN110674735B (en) | Method and device for remote sensing extraction of agricultural facilities based on fine classification | |
| CN115830471B (en) | A Domain-Adaptive Cloud Detection Method Based on Multi-Scale Feature Fusion and Alignment | |
| CN115578602A (en) | A natural tree species recognition method based on improved YOLOv7 | |
| WO2021077947A1 (en) | Image processing method, apparatus and device, and storage medium | |
| CN114140665A (en) | A Dense Small Object Detection Method Based on Improved YOLOv5 | |
| CN114494910B (en) | Multi-category identification and classification method for facility agricultural land based on remote sensing image | |
| CN113379727A (en) | Kiwi fruit foliar disease detection method based on improved YOLOv4-Tiny characteristic fusion | |
| CN111027538A (en) | Container detection method based on instance segmentation model | |
| CN113280820B (en) | Method and system for extracting orchard visual navigation path based on neural network | |
| CN110008853A (en) | Pedestrian detection network and model training method, detection method, medium, equipment | |
| CN113902735A (en) | Crop disease identification method and device, electronic equipment and storage medium | |
| CN112990175A (en) | Method and device for recognizing handwritten Chinese characters, computer equipment and storage medium | |
| CN116052094B (en) | Ship detection method, system and computer storage medium | |
| CN119295864B (en) | Semi-automatic annotation method and device for flotation foam images based on prompt learning | |
| CN114863112A (en) | Improved U-net semantic segmentation model construction method and method and system for tea sprout identification and picking point location | |
| CN113570540A (en) | Image tampering blind evidence obtaining method based on detection-segmentation architecture | |
| CN113706469A (en) | Iris automatic segmentation method and system based on multi-model voting mechanism | |
| CN116740555A (en) | Crop leaf disease identification method and system based on improved YOLOv5s model | |
| Huahong et al. | A new type method of adhesive handwritten digit recognition based on improved faster rcnn | |
| CN112329697B (en) | A method for fruit recognition on trees based on improved YOLOv3 | |
| CN118537352A (en) | Eucalyptus single knot segmentation method, device, system and storage medium | |
| CN117456287B (en) | A method of observing wildlife populations using remote sensing images |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |