A Deplabv3+ semantic segmentation method based on edge gradient guided interpolation

By improving the deeplabv3+ network model with an edge gradient guided interpolation algorithm, the problem of insufficient object edge segmentation accuracy is solved, and higher image interpolation quality and semantic segmentation accuracy are achieved.

CN114897919BActive Publication Date: 2024-09-17CHONGQING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210520032.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2024-09-17
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

The existing deeplabv3+ network model has insufficient accuracy in the semantic segmentation of objects in images. Traditional interpolation methods lead to the loss and blurring of edge information, and existing improved methods have failed to effectively solve the problem of object edge segmentation.

Method used

An edge gradient-guided interpolation method is adopted, which replaces the bilinear interpolation in the network model decoder with Gaussian filtering for noise reduction, Sobel operator for gradient calculation, bicubic interpolation, and edge gradient-guided interpolation algorithm to improve the acquisition and segmentation accuracy of edge information.

Benefits of technology

It significantly improves image interpolation quality and semantic segmentation accuracy, enhances the segmentation accuracy of object edges, and increases the MIOU value to 74.09%, which is superior to traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114897919B
    Figure CN114897919B
Patent Text Reader

Abstract

The present invention discloses a deplabv3+ semantic segmentation method based on edge gradient guided interpolation, and relates to the fields of intelligent algorithms and deep learning technology. The present invention has the following steps: S1: using Gaussian blur to reduce noise, and firstly performing Gaussian filtering on the original image before edge detection to reduce the influence of noise on edge detection; S2: using the Sobel operator to calculate the gradients of the blurred image in the x direction and the y direction respectively, and the total gradient image, i.e. the detected edge map, can be obtained, that is, the gradient of the low-resolution image; S3: finally performing bicubic interpolation on the x and y directions respectively. The present invention replaces the bilinear interpolation used in the deeplabv3+ semantic segmentation model with an edge gradient guided interpolation algorithm, so as to obtain more image object edge feature information that is easily ignored, improve the accuracy of semantic segmentation, and then effectively improve the image interpolation quality, and improve the accuracy of semantic segmentation and its MIOU to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent algorithms and deep learning technology, and in particular relates to a deplabv3+ semantic segmentation method based on edge gradient guided interpolation. Background Art

[0002] Image semantic segmentation is an important part of the field of computer vision, which is to classify each pixel in the image into its semantic category. At present, in the field of image semantic segmentation, the semantic segmentation models of the deeplab series can be said to occupy a more mainstream position. Among them, the more mature one is the deepLabv3+ network model based on the encoding-decoding structure; the decoder of the deeplabv3+ network uses bilinear interpolation for up-interpolation, and bilinear interpolation only considers the grayscale values ​​of the four direct neighboring points, ignoring the influence of each neighboring point, resulting in the loss of pixel information on the edge of the image object, resulting in the loss of the accuracy of semantic segmentation of the object edge; currently, more and more researchers have conducted relevant research to improve the semantic segmentation accuracy of deeplabv3+. Some have improved the image interpolation method by calculating the image gradient ratio, but have not conducted further research on the segmentation of object edges. Some have also used Laplace filters to amplify the edges of the image to sharpen the edge image and improve the quality of the interpolated image, but the image objects still have blurred edges.

[0003] The main task of image interpolation is to restore the edge and texture of the image and suppress blur as much as possible. The traditional linear image interpolation method will produce serious image detail blur and edge jaggedness during the interpolation process. In order to improve the ability of image to restore edge details, various methods are used. The LGRP operator calculated by gradient ratio obtains the anti-noise ability of the image in local features, and improves the quality of the transformed image under different postures. Some use attenuation function to replace the traditional non-maximum suppression (NMS) greedy algorithm to improve the detection rate of overlapping targets. Some combine edge gradient information with spatial clustering to propose an automatic segmentation algorithm that can improve the accuracy of image segmentation. Some use Laplace filters to enlarge the edges of the image and use blurred edges for interpolation to produce sharp edge images, thereby improving the quality of the interpolated image. However, the above methods still have certain defects in edge object detection and segmentation. Therefore, the method disclosed in the present invention proposes a deplabv3+ semantic segmentation method based on edge gradient guided interpolation, which is of great significance to the deeplabv3+ semantic segmentation model. Summary of the invention

[0004] The purpose of the present invention is to provide a deplabv3+ semantic segmentation method based on edge gradient guided interpolation to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention is achieved through the following technical solutions:

[0006] The present invention is a deplabv3+ semantic segmentation method based on edge gradient guided interpolation, characterized in that the steps are as follows:

[0007] S1: Use Gaussian blur to reduce noise. Before edge detection, the original image must first be Gaussian filtered to reduce the impact of noise on edge detection;

[0008] S2: Use the Sobel operator to calculate the gradients of the blurred image in the x and y directions respectively, and you can get the total gradient image, that is, the detected edge map, which is the gradient of the low-resolution image;

[0009] S3: Finally, bicubic interpolation is performed in the x and y directions to obtain the initial gradient of the high-resolution image;

[0010] S4: Use the edge gradient guided interpolation algorithm to replace the bilinear interpolation in the deeplabv3+ network model decoder, and use the VOC 2012 dataset to verify the effectiveness of the algorithm.

[0011] Furthermore, in S1, Gaussian filtering is first used to reduce the noise of the input image to reduce the impact of noise on edge detection. A 5×5 filter window is used here, and the filter window is as follows:

[0012]

[0013] Furthermore, in S2, the Sobel operator is used to calculate the gradients of the blurred image in the x direction and the y direction respectively, and the total gradient image, i.e., the detected edge map, can be obtained;

[0014] S200: Let the real image be a function f(x,y), then the gradient of f(x,y) at the pixel point (x,y) is Among them G x , G y Represent the gradient components in the x direction and y direction respectively, then:

[0015]

[0016] S201: The magnitude of the image gradient is recorded as The calculation formula is: can be simplified to:

[0017] In the image, the direction angle of the gradient vector is θ(x,y), then

[0018] For a digital image f(x,y), its pixels are discretely distributed, so the data set can be expressed as

[0019]

[0020] S202: At the pixel point (i, j), the first-order difference calculation formula along the x and y directions is:

[0021]

[0022] The gradient calculation template is as follows, where G x Represents the horizontal gradient template, G y Represents the gradient template in the vertical direction;

[0023]

[0024] according to Calculate the gradient direction of each point to obtain the gradient of the low-resolution image

[0025] Furthermore, in S3, bicubic interpolation is performed in the x and y directions respectively, so as to obtain the initial gradient of the high-resolution image

[0026] S300: Bicubic interpolation simultaneously considers the influence of the intensity of four adjacent pixel images and the influence of the image intensity change rate. The interpolation calculation is completed by taking the position of the estimated point as the center and the 16 pixel image intensities of the neighborhood window content with a known pixel number of 4×4. The mathematical expression of the cubic polynomial G(t) is as follows, where t is the independent variable;

[0027]

[0028] S301: The basic principle diagram of bicubic interpolation is given by Figure 1 It can be obtained that:

[0029] A=[G(1+u)G(u)G(1-u)G(2-u)]

[0030]

[0031] Where B is an image pixel matrix composed of 16 adjacent pixels in the neighborhood window, so the specific interpolation calculation method of bicubic interpolation can be defined as: f(i+u,i+v)=A*B*C.

[0032] Furthermore, the S4 uses an edge gradient-guided interpolation algorithm to replace the bilinear interpolation in the deeplabv3+ network model decoder, and uses the VOC2012 dataset to verify the effectiveness of the algorithm.

[0033] The present invention has the following beneficial effects:

[0034] The present invention replaces the bilinear interpolation in the original network decoder with an edge gradient-guided interpolation algorithm. The Soble operator is first used to calculate the edge gradient-guided interpolation of pixels along different directions to obtain a low-resolution image. Then, bicubic interpolation is used to perform interpolation calculation to obtain a transformed high-resolution image, thereby improving the image quality of the edge part of the object after interpolation. Then, the bilinear interpolation used in the deeplabv3+ semantic segmentation model is replaced with the edge gradient-guided interpolation algorithm, so as to obtain more easily overlooked edge feature information of image objects, improve the accuracy of semantic segmentation, and thus effectively improve the image interpolation quality, as well as have a certain improvement on the accuracy of semantic segmentation and its MIOU. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0036] Figure 1 is a flow chart of the present invention;

[0037] Figure 2 Schematic diagram of bicubic interpolation of the present invention;

[0038] Figure 3 It is a schematic diagram of the edge gradient of the present invention;

[0039] Figure 4 This is a 2-fold magnification effect diagram of different interpolation algorithms of the present invention;

[0040] Figure 5 Schematic diagram of Fourier amplitude spectrum with different interpolations of the present invention;

[0041] Figure 6 It is a visual comparison schematic diagram of the present invention. DETAILED DESCRIPTION

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

[0043] See also Figure 1-6As shown, the present invention is a deplabv3+ semantic segmentation method based on edge gradient guided interpolation, comprising the following steps:

[0044] S1: First, use Gaussian filtering to reduce the noise of the input image to reduce the impact of noise on edge detection. Here, a 5×5 filter window is used, and the filter window is as follows:

[0045]

[0046] S2: When implemented specifically, in step S2, the following specific steps are included:

[0047] The Sobel operator is used to calculate the gradients of the blurred image in the x and y directions respectively, and the total gradient image, that is, the detected edge map, can be obtained.

[0048] S200: Let the real image be a function f(x,y), then the gradient of f(x,y) at the pixel point (x,y) is Among them G x , G y Represent the gradient components in the x direction and y direction respectively, then:

[0049]

[0050] S201: The magnitude of the image gradient is recorded as The calculation formula is: can be simplified to:

[0051] In the image, the direction angle of the gradient vector is θ(x,y), then

[0052] For a digital image f(x,y), its pixels are discretely distributed, so the data set can be expressed as

[0053]

[0054] S202: At the pixel point (i, j), the first-order difference calculation formula along the x and y directions is:

[0055]

[0056] The gradient calculation template is as follows, where G x Represents the horizontal gradient template, G y Represents the vertical gradient template.

[0057]

[0058] according to Calculate the gradient direction of each point to obtain the gradient of the low-resolution image

[0059] Figure 3 (a) to Figure 3 (c) is the edge gradient image, where Figure 3 (a) is the gradient map in the horizontal direction. Figure 3 (b) is the vertical gradient map. Figure 3 (c) is the gradient map of the image. A low-resolution image is obtained, and then bicubic interpolation is used to perform image interpolation calculation based on the edge gradient in the x direction and the edge gradient in the y direction to obtain the final high-resolution image.

[0060] S3: In the specific implementation, in step S3, the following specific steps are included:

[0061] S300: Bicubic interpolation takes into account the influence of the intensity of four adjacent pixel images and the influence of the image intensity change rate. The interpolation calculation is completed based on the image intensity of 16 pixels of the neighborhood window content with a known pixel number of 4×4, with the location of the estimated point as the center. The mathematical expression of the cubic polynomial G(t) is as follows, where t is the independent variable.

[0062]

[0063] S301: The basic principle diagram of bicubic interpolation is given by Figure 1 If available, then

[0064] A=[G(1+u)G(u)G(1-u)G(2-u)]

[0065]

[0066] S303: Wherein B is an image pixel matrix composed of 16 adjacent pixel points in the neighborhood window, so the specific interpolation calculation method of bicubic interpolation can be defined as:

[0067] f(i+u,i+v)=A*B*C

[0068] By performing bicubic interpolation in the x and y directions respectively in the above way, the initial gradient of the high-resolution image is obtained.

[0069] The public method of this article selects several classic interpolation methods for comparative analysis, including nearest neighbor interpolation (Nearest), bilinear interpolation (Bilinear) and bicubic interpolation (Bicubic). Figure 4 (a) to Figure 4 (d) is the ssim_map effect diagram magnified 2 times by different interpolation algorithms. Figure 4(a) is the result of the nearest neighbor interpolation. Figure 4 (b) is the result of the bilinear interpolation used. Figure 4 (c) is the result of using bicubic interpolation. Figure 4 (d) is the result of the edge gradient guided interpolation using the method disclosed in this paper. ssim_map represents the mapping matrix composed of SSIM after windowing, where the darker the color, the worse the interpolation effect, and the brighter the color, the better. It can be seen that the effect of using the nearest neighbor interpolation in the image is the worst. Whether it is the edge part or the whole part, the effect of bilinear interpolation is significantly improved, and the interpolation effect of bicubic interpolation is better, but it is still lacking in edge smoothing. The image interpolated by the edge gradient guided algorithm disclosed in this paper has better expressiveness in both the whole and the edge part. Table 1 is the final PSNR results and MSSIM results of the example images using different interpolation methods. It can be seen that the PANR of the two example images using the Nearest interpolation method is the lowest, followed by Bilinear and Bicubic. The PANR value of the algorithm in this paper is 34.24dB, which is the best among several interpolation algorithms; the MSSIM value of the edge gradient guided interpolation algorithm disclosed in this paper reaches 0.9206, which is also the best among several interpolation algorithms.

[0070] The evaluation indicators of the edge gradient guided interpolation algorithm in the disclosed method of this paper include peak signal-to-noise ratio (PSNR) and structural similarity (SSIM). The peak signal-to-noise ratio (PSNR) is: Where m and n are the number of rows and columns of the image data, x i,j is the pixel value of the i-th row and j-th column of the original image, y i,j is the pixel value of the i-th row and j-th column of the image to be evaluated, then:

[0071]

[0072] Among them, L is the dynamic range of pixel value, that is, the grayscale value, which is usually 255.

[0073] Structural Similarity (SSIM) includes: Among them, γ x , γ y ,δ x ,δ y Respectively represent the original image mean, the mean of the image to be evaluated, the original image variance, and the image variance to be evaluated, Represents the structural component of the original image and the image to be evaluated. Both c1 and c2 are small constants used for error correction.

[0074] PSNR reflects the realism of the image to be evaluated. The higher the PSNR, the smaller the image distortion. SSIM is based on the similarity between the brightness and contrast of the image to be evaluated and the original image. It is between [0,1]. The larger the value, the higher the structural similarity between the two images.

[0075] Table 1 Comparison of PSNR and MSSIM values ​​of different interpolation algorithms

[0076]

[0077] S4: Use the open method edge gradient guided interpolation algorithm in this paper to replace the bilinear interpolation in the decoder of the deeplabv3+ network model, and use the VOC2012 dataset to verify the effectiveness of the algorithm. The experimental environment of this paper is mainly GPU2080Ti, operating system 64-bit, Ubuntu16.04, CUDA10.1, Dataprocessing is Python3.6, and the mainstream deep learning framework Pytorch is used to implement it. The learning rate decay during training uses "Poly", and the loss function is the pixel-by-pixel weighted cross entropy loss function (FocalLoss).

[0078] PASCAL VOC 2012 is one of the representative datasets in semantic segmentation tasks, containing a total of 20 foreground object classes and 1 background class, with 1464 images in the training set, 1449 images in the validation set, and 1456 images in the test set.

[0079] It can be seen from Table 2 that when using deeplabv3+, that is, the bilinear interpolation algorithm in its decoder, its MIOU value is 73.53%; when using the interpolation algorithm proposed by the edge gradient-guided interpolation algorithm disclosed in this article, its MIOU value reaches 74.09%, which improves the accuracy of semantic segmentation, thereby verifying the effectiveness of the disclosed method in this article.

[0080] Table 2 Comparison of deeplabv3+ semantic segmentation model and MIOU results of this paper’s public method

[0081]

[0082] In order to observe more intuitively Figure 6 (a) to Figure 6 (d) is a visual comparison between deeplabv3+ and the method disclosed in this paper. Figure 6 (a) is the original image, Figure 6 (b) is the segmentation result of the original deeplabv3+ network semantic segmentation model. Figure 6(c) is the segmentation result of the edge gradient-guided deeplabv3+ semantic segmentation model disclosed in this article. It can be seen that the segmentation result obtained by the method disclosed in this article is more accurate and has better expressiveness.

[0083] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0084] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the present invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A deplabv3+ semantic segmentation method based on edge gradient guided interpolation, characterized in that: Here are the steps: S1: Use Gaussian blur to reduce noise. Before edge detection, the original image must first be Gaussian filtered to reduce the impact of noise on edge detection; S2: Use the Sobel operator to calculate the gradients of the blurred image in the x and y directions respectively, and you can get the total gradient image, that is, the detected edge map, which is the gradient of the low-resolution image; S3: Finally, bicubic interpolation is performed in the x and y directions to obtain the initial gradient of the high-resolution image; S4: Use the edge gradient guided interpolation algorithm to replace the bilinear interpolation in the deeplabv3+ network model decoder, and use the VOC 2012 dataset to verify the effectiveness of the algorithm; In S2, the Sobel operator is used to calculate the gradients of the blurred image in the x direction and the y direction respectively, and the total gradient image, i.e. the detected edge map, can be obtained; S200: Let the real image be a function f(x,y), then the gradient of f(x,y) at the pixel point (x,y) is ▽f(x,y)=[G x ,G y ] T , where G x , G y Represent the gradient components in the x direction and y direction respectively, then: S201: The magnitude of the image gradient is recorded as mag(▽f), and its calculation formula is: It can be simplified as: |▽f|=|G x |+|G y In the image, the direction angle of the gradient vector is θ(x,y), then For a digital image f(x,y), its pixels are discretely distributed, so the data set can be expressed as S202: At the pixel point (i, j), the first-order difference calculation formula along the x and y directions is: The gradient calculation template is as follows, where G x Represents the horizontal gradient template, G y Represents the gradient template in the vertical direction; according to Calculate the gradient direction of each point to obtain the gradient of the low-resolution image In S3, bicubic interpolation is performed in the x and y directions respectively to obtain the initial gradient of the high-resolution image. S300: Bicubic interpolation simultaneously considers the influence of the intensity of four adjacent pixel images and the influence of the image intensity change rate. The interpolation calculation is completed by taking the position of the estimated point as the center and the 16 pixel image intensities of the neighborhood window content with a known pixel number of 4×4. The mathematical expression of the cubic polynomial G(t) is as follows, where t is the independent variable; S301: Bicubic interpolation can be obtained from the basic principle diagram, so it can be obtained: A=[G(1+u)G(u)G(1-u)G(2-u)] Among them, B is an image pixel matrix composed of 16 adjacent pixel points in the neighborhood window, so the specific interpolation calculation method of bicubic interpolation can be defined as: f(i+u,i+v)=A*B*C.

2. The deplabv3+ semantic segmentation method based on edge gradient guided interpolation according to claim 1, characterized in that: In S1, Gaussian filtering is used to reduce the noise of the input image to reduce the impact of noise on edge detection. Here, a 5×5 filter window is used, and the filter window is as follows:

3. The deplabv3+ semantic segmentation method based on edge gradient guided interpolation according to claim 1, characterized in that: In the S4, an edge gradient-guided interpolation algorithm is used to replace the bilinear interpolation in the deeplabv3+ network model decoder, and the VOC 2012 dataset is used to verify the effectiveness of the algorithm.