Segmentation method of grassland degradation indicator grass species based on improved Mask2Former

By introducing the FFAM module and residual module into the Mask2Former network, combined with Swin Transformer and Labelme annotation data sets, the grassland degradation evaluation method is improved, solving the problem of unclear segmentation effects, and improving the accuracy and efficiency of grassland degradation evaluation.

CN117173600BActive Publication Date: 2024-08-23QINGHAI UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311214166.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2024-08-23
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

The existing grassland degradation evaluation method based on Mask2Former has the problem that the segmentation effect is not obvious, resulting in high time and labor costs and low efficiency.

Method used

The improved Mask2Former network is used, the FFAM module is introduced in the Pixel Decoder and Transformer Decoder parts for feature information fusion, and the residual module is added in the Query initialization. Swin Transformer is used as the backbone network, combined with Labelme software to label the data set, and IoU and Acc are used as Evaluation metrics for semantic segmentation.

Benefits of technology

It improves the accuracy of segmentation of grass species indicating grassland degradation, improves IoU and Acc scores, solves the problem of unclear segmentation effects, reduces time and labor costs, and improves evaluation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173600B
    Figure CN117173600B
Patent Text Reader

Abstract

The present invention relates to a segmentation method of grassland degradation indicator grass species based on improved Mask2Former, including unmanned aerial vehicle shooting video images, frame-by-frame interception, picture cropping, labeling using Labelme software, using Swin Transformer as a backbone network, using an improved Mask2Former segmentation network to semantically segment grassland degradation indicator grass species-lanceolate yellow flower, and using the IoU and Acc of lanceolate yellow flower as evaluation indicators. The present invention not only improves the segmentation ability of the network through the FFAM module, but also guides the initialization of the query and adds a residual module, thereby increasing the network's positioning ability for image features; ultimately achieving the improvement of the evaluation indicators IoU and Acc, and solving the defect that the segmentation effect is not obvious.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of computer image processing, and in particular to a segmentation method for grassland degradation indicator grass species based on an improved Mask2Former. Background Art

[0002] Grassland degradation is not only detrimental to the balance and stability of the ecosystem, but also affects the healthy development of the local economy. The focus of work is to evaluate the level of grassland degradation and take corresponding measures. Grassland degradation evaluation often adopts manual methods such as field surveys and fixed-point sampling, which often have high time and labor costs and low efficiency. With the rapid development of computer image processing technology, CN115965781A discloses a semantic segmentation method based on dual decoders, which involves using mask2former to perform instance segmentation tasks to achieve the purpose of image segmentation. Therefore, the method of combining deep learning with drone remote sensing images to evaluate grassland degradation levels is more efficient and saves time and labor costs compared to manual methods.

[0003] Thermopsis lanceolata is a common poisonous plant in pastures. Both its seeds and whole grass can cause livestock poisoning. The inventor used a drone to shoot Thermopsis lanceolata, obtained a Thermopsis lanceolata dataset by cutting, cropping, and annotating frames, and used Mask2Former to evaluate grassland degradation. The coverage of Thermopsis lanceolata, a grassland degradation indicator grass species, was used as an indicator of grassland degradation. However, this method still has the defect of unclear segmentation effect, see Figure 6 left part.

[0004] It should be noted that, although the technical solution involving the use of Mask2Former for grassland degradation assessment is mentioned above, it does not constitute prior art. Summary of the invention

[0005] The present invention aims at the method of evaluating grassland degradation level by combining deep learning with unmanned aerial vehicle remote sensing images in the background technology, and the method of using Mask2Former to evaluate grassland degradation, and using the coverage of grassland degradation indicator grass species - lanceolate yellow flower as an indicator of grassland degradation, which has the defect that the segmentation effect is not obvious. A segmentation method of grassland degradation indicator grass species based on improved Mask2Former is provided. The purpose is to use the present invention to replace the manual methods such as field investigation and fixed-point sampling often used in grassland degradation evaluation, so as to reduce time cost and labor cost, improve efficiency, and solve the defect that the segmentation effect is not obvious when using Mask2Former to evaluate grassland degradation.

[0006] The technical solution adopted by the present invention is: a method for segmenting grassland degradation indicator grass species based on an improved Mask2Former, comprising the following steps:

[0007] S1. Use a drone to shoot the target grassland to obtain the video image of the yellow flowers of lanceolate;

[0008] S2, obtaining the yellow flower image of lanceolate by intercepting and cropping the images frame by frame;

[0009] S3, labeling using Labelme software to obtain the yellow flower data set of lanceolate;

[0010] S4, using Swin Transformer as the backbone network, and using the improved Mask2Former segmentation network to perform semantic segmentation on the grassland degradation indicator grass species - lanceolate yellow flower;

[0011] S5. The IoU and Acc of Psoralea lanceolata are used as evaluation indicators.

[0012] Furthermore, the Mask2former is divided into three parts: Pixel-Decoder, Transformer Decoder and Segmentation Moudel, wherein: the Pixel-Decoder part upsamples the image after extracting features from the image using the existing Backbone network, and sends the feature map of each upsampling to the Transformer Decoder part; the Transformer Decoder part uses the Transformer Decoder block of Masked Attention, and receives the multi-layer feature map of the Pixel Decoder to extract features from the Query Features; the Segmentation Moudel part classifies the Query output by the Transformer Decoder after MLP, and at the same time embeds the Mask and performs a dot multiplication with the output result of the Pixel Decoder to obtain a binary mask, which is combined with the classification result to obtain the final segmentation result.

[0013] Furthermore, the improved Mask2Former is that the FFAM (Feature fusion alignment module) module is applied to the connection between the Pixel Decoder part and the Transformer Decoder part in the Mask2Former network, so that the information of different levels can be more accurately integrated in the horizontal connection between the Pixel Decoder module and the Transformer Decoder module to improve the segmentation ability of the network; and the initialization of the Query in the Mask2Former is modified, and the output result of the backbone is used to extract the position information in the network after conversion through the MLP, and the initialization of the query is guided and the residual module is added to increase the network's ability to locate image features.

[0014] Furthermore, the input part of the FFAM module is: the horizontal feature map of the same layer extracted by the Backbone network, and the feature map of the previous layer in the Pixel Decoder; the horizontal feature map first passes through a 1*1 convolution layer, the main function of this layer is to modify the number of channels to ensure that the number of channels of the horizontal feature map and the vertical feature map are consistent, and then passes through a channel attention layer, the channel attention layer is composed of FC, Relu and Sigmod, the function is to give different weights to different channels, so that the model can have a focused understanding of the characteristics of different channels; the output result and the upsampled twice UP feature are input into a deformable convolution layer together, this layer can solve the problem of feature misalignment between the horizontal feature and the vertical feature map caused by the upsampling process; after a residual operation, a 3*3 convolution layer is passed to obtain the final output result.

[0015] The beneficial effects of implementing the present invention are as follows: the segmentation method of grassland degradation indicator grass species based on the improved Mask2Former of the present invention not only applies the FFAM (Feature fusion alignment module) module to the connection between the Pixel Decoder part and the Transformer Decoder part in the Mask2Former network, so that the lateral connection between the Pixel Decoder module and the Transformer Decoder module more accurately fuses information of different levels, further improving the segmentation ability of the network; and modifies the initialization of the Query in the Mask2Former, uses the output result of the backbone to extract the position information in the network after conversion through the MLP, guides the initialization of the query and adds a residual module, thereby increasing the network's positioning ability for image features; after the implementation of the present invention, the evaluation indicators IoU and Acc are improved, and the defect of unclear segmentation effect is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 : Improve the network structure diagram of Mask2Former;

[0018] Figure 2 : FFAM module structure diagram;

[0019] Figure 3 : Example of lanceolate yellow flower Figure 1 ;

[0020] Figure 4 : Example of lanceolate yellow flower Figure 2 ;

[0021] Figure 5 : Picture and annotation of the yellow flower of lanceolate;

[0022] Figure 6 : Mask2Former prediction graph and Mask-FAFormer prediction graph. DETAILED DESCRIPTION

[0023] 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.

[0024] Example: A segmentation method for grassland degradation indicator grass species based on improved Mask2Former, please refer to the attached Figure 1 , 2 As shown, the following steps are included:

[0025] S1. Use a drone to shoot the target grassland to obtain the video image of the yellow flowers of lanceolate;

[0026] S2, obtaining the yellow flower image of lanceolate by intercepting and cropping the images frame by frame;

[0027] S3, labeling using Labelme software to obtain the yellow flower data set of lanceolate;

[0028] S4, using Swin Transformer as the backbone network, and using the improved Mask2Former segmentation network to perform semantic segmentation on the grassland degradation indicator grass species - lanceolate yellow flower;

[0029] S5. The IoU and Acc of Psoralea lanceolata are used as evaluation indicators.

[0030] in:

[0031] The Mask2former is mainly divided into three parts: Pixel-Decoder, Transformer Decoder and Segmentation Moudel, among which: the Pixel-Decoder part upsamples the image after extracting features from the image using the existing Backbone network, and sends the feature map of each upsampling to the Transformer Decoder part; the Transformer Decoder part is a Transformer Decoder block that uses Masked Attention, and receives the multi-layer feature map of the Pixel Decoder to extract features from the Query Features; the Segmentation Moudel part classifies the Query output by the Transformer Decoder after MLP, and embeds the Mask and performs dot multiplication with the output result of the Pixel Decoder to obtain a binary mask, which is combined with the classification result to obtain the final segmentation result.

[0032] The improved Mask2Former is that the FFAM (Feature fusion alignment module) module is applied to the connection between the Pixel Decoder part and the Transformer Decoder part in the Mask2Former network, so that the information of different levels can be more accurately integrated in the horizontal connection between the Pixel Decoder module and the Transformer Decoder module to improve the segmentation ability of the network; and the initialization of the Query in the Mask2Former is modified, and the output result of the backbone is used to extract the position information in the network after conversion through the MLP, and the initialization of the query is guided and the residual module is added to increase the network's positioning ability for image features.

[0033] The FFAM module improves Mask2Former, and its input part is: the horizontal feature map of the same layer extracted by the Backbone network, and the feature map of the previous layer in the Pixel Decoder; the horizontal feature map first passes through a 1*1 convolution layer, the main function of this layer is to modify the number of channels to ensure that the number of channels of the horizontal feature map and the vertical feature map are consistent, and then passes through a channel attention layer, which is composed of FC, Relu and Sigmod, and its function is to give different weights to different channels, so that the model can have a focused understanding of the features of different channels; the output result and the upsampled twice UP feature are input into a deformable convolution layer together, and this layer can solve the problem of feature misalignment between the horizontal feature and the vertical feature map caused by the upsampling process; after a residual operation, a 3*3 convolution layer is passed to obtain the final output result.

[0034] The present invention discloses a data set of yellow lanceolate flowers, wherein: the data set of yellow lanceolate flowers is a self-made data set of yellow lanceolate flowers, which is shot in Guinan County and Zeku County of Hainan Tibetan Autonomous Prefecture in Qinghai Province, China; that is, a video image of yellow lanceolate flowers is obtained by shooting with an unmanned aerial vehicle, and then a picture of yellow lanceolate flowers is obtained by intercepting frame by frame and cropping the picture, and the yellow lanceolate flowers are annotated by using Labelme software to obtain a data set of yellow lanceolate flowers, wherein the data set has a total of 951 pictures, the image size is 512*512, wherein 808 pictures are in a training set, 143 pictures are in a verification set, and the ratio of the training set to the verification set is 5:1. Figure 3 and Figure 4 This is a sample image of the Yellow lanceolate data set.

[0035] Comparative example: Steps S1-S5 of the embodiment of the present invention are also used, except that in step S4, a CNN network and a Trasnformer network are used, wherein the CNN network uses ResNet101 as the backbone network, and the segmentation head uses FCN, Upernet, PSPnet and Deeplabv3+ for analysis, respectively, and Table 1 is obtained.

[0036]

[0037] As can be seen from Table 1, the IoU of the Mask2Former model on the Psoralea lanceolata dataset is 75.01%, while in the model using the improved Mask2Former of the present invention, the IoU reaches 77.23%, an increase of about 2%, and the Acc is also increased from 87.2% to 88.21%, an increase of about 1%.

[0038] In the use effect of the present invention, wherein: Figure 5 This is a picture of the yellow flower of lanceolate and a manually annotated mask. Figure 6The left side shows the segmentation result of the image of the yellow flower of lanceolate using the Mask2Former network, and the right side shows the result of the image segmentation using the improved Mask2Former network of the present invention. It can be seen that the segmentation of a small piece of plant on the left side of the image is not obvious in the MaskFormer network, while the target plant on the left side can be accurately segmented using the improved network.

[0039] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A segmentation method for grassland degradation indicator grass species based on improved Mask2Former, It is characterized in that The following steps are involved: S1. Use a drone to shoot the target grassland to obtain the video image of the yellow flowers of lanceolate; S2, obtaining the yellow flower image of lanceolate by intercepting and cropping the images frame by frame; S3, labeling using Labelme software to obtain the yellow flower data set of lanceolate; S4, using Swin Transformer as the backbone network, and using the Mask2Former segmentation network with the FFAM module and query initialization to perform semantic segmentation on the grassland degradation indicator grass species - lanceolate yellow flower; S5, IoU and Acc of lanceolate yellow flower are used as evaluation indicators; in: The improved Mask2Former is to apply the FFAM module at the connection between the Pixel Decoder part and the Transformer Decoder part in the Mask2Former network; and modify the initialization of the Query in the Mask2Former, use the output result of the backbone to extract the position information in the network after conversion through the MLP, guide the initialization of the query and add the residual module; The input part of the FFAM module is the horizontal feature map of the same layer extracted by the Backbone network and the feature map of the previous layer in the PixelDecoder; the horizontal feature map first passes through a 1*1 convolution layer, and then passes through a channel attention layer, which is composed of FC, Relu and Sigmod; the output result and the UPfeature that is upsampled twice are input into a deformable convolution layer; After a residual operation, a 3*3 convolutional layer is passed to obtain the final output result.

2. The method for segmenting grassland degradation indicator grass species based on improved Mask2Former according to claim 1, It is characterized in that The Mask2former is divided into three parts: Pixel-Decoder, Transformer Decoder and SegmentationMoudel, among which: the Pixel-Decoder part upsamples the image after extracting features from the image using the existing Backbone network, and sends the feature map of each upsampling to the TransformerDecoder part; the Transformer Decoder part uses the TransformerDecoder block of Masked Attention, and receives the multi-layer feature map of Pixel Decoder to extract features from Query Features; the Segmentation Moudel part classifies the Query output by the Transformer Decoder after MLP, and embeds the Mask and performs dot multiplication with the output result of the Pixel Decoder to obtain a binary mask, which is combined with the classification result to obtain the final segmentation result.

Citation Information

Patent Citations

  • Semantic segmentation method and system based on double decoders

    CN115965781A

  • Grassland degeneration automatic extraction method based on fully convolutional neural network

    CN108647568A

  • Depth completion method and device based on attention panoramic perception guidance

    CN116245930A

  • Image semantic segmentation method based on large convolution kernel backbone network

    CN116612283A

  • Multi-query network for semantic segmentation

    CN116701681A