Prostate ultrasound image segmentation method and device based on denoising autoencoder
By combining a denoising autoencoder and an improved normal vector contrast boundary algorithm with the average contour of the prostate shape, the problems of artifacts and low computational efficiency in prostate ultrasound image segmentation methods are solved, achieving high-precision and efficient segmentation effects.
Patent Information
- Application Number
- CN202310398165.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-04-12
AI Technical Summary
Existing prostate ultrasound image segmentation methods are easily affected by artifacts, have low computational efficiency, and are difficult to achieve high-precision and efficient segmentation.
A method based on denoising autoencoder is used, combined with an improved normal vector contrast boundary algorithm. The average contour of the prostate shape is used to perform preliminary framing, and accurate segmentation of prostate ultrasound images is achieved through multiple iterative adjustments.
The anti-interference ability and computational efficiency of prostate ultrasound image segmentation are improved, and fast and accurate prostate ultrasound image segmentation is achieved.
Smart Images

Figure CN116563316B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical image processing, and in particular relates to a prostate ultrasound image segmentation method and device based on a denoising autoencoder. Background Art
[0002] The treatment of prostate disease is one of the important topics in current medical research. Segmenting the prostate from ultrasound images and locating and estimating it are of great significance for the treatment of prostate disease. Good segmentation accuracy is beneficial to the subsequent treatment effect.
[0003] Currently, prostate ultrasound image segmentation methods fall into two broad categories: traditional problem-specific boundary operators, such as Sobel and Robert, are used to extract image edge information. The other is the recently popular end-to-end deep learning approach, typified by network models such as the U-net architecture and its derivatives. However, the former's detection effectiveness is easily affected by image artifacts, while the latter often requires large datasets for iterative training, resulting in low computational efficiency and a poor balance of time and computing power. Summary of the Invention
[0004] The purpose of the present invention is to address the above-mentioned problems and provide a prostate ultrasound image segmentation method and device based on a denoising autoencoder, which uses a normal vector contrast boundary algorithm to correct the prostate image contour and adopts a neural network model to smooth the contour to improve the anti-interference ability of the prostate ultrasound image segmentation method; at the same time, it takes into account the accuracy of image segmentation and image processing efficiency, and solves the technical problems that the existing prostate ultrasound image segmentation method is greatly affected by artifact factors and / or has low computational efficiency.
[0005] The technical solution of the present invention is a prostate ultrasound image segmentation method based on a denoising autoencoder, comprising the following steps:
[0006] S1. Obtaining the average contour representing the prostate shape;
[0007] S2. Acquire a prostate ultrasound image to be segmented, display the prostate ultrasound image and the average contour on the same plane, and deform the average contour so that the deformed contour preliminarily coincides with a true prostate boundary on the prostate ultrasound image;
[0008] S3, using an improved normal vector contrast boundary calculation method to adjust each point on the deformed contour to a grayscale value mutation point on the prostate ultrasound image to obtain a rough segmentation contour;
[0009] S4, using a noise reduction autoencoder to smooth the rough segmentation contour;
[0010] S5. Use the improved normal vector contrast boundary calculation method to adjust the smoothed contour again, and smooth the adjusted contour. Use the improved normal vector contrast boundary calculation method to adjust the smoothed contour again, iterate multiple times until the difference between each point on the smoothed contour and the corresponding point on the contour adjusted by the normal vector contrast boundary calculation method is less than the preset tolerance value, and obtain the final prostate ultrasound image segmentation contour.
[0011] Preferably, the improved normal vector contrast boundary calculation method specifically includes:
[0012] 1) A normal vector is drawn for each point on the contour, and the grayscale values of each pixel point on the prostate ultrasound image through which the normal vector corresponding to each point passes are extracted and sequentially combined into a grayscale value list;
[0013] 2) Select a point and, in the grayscale value list, calculate the sum of the first grayscale values within a preset length range on one side of the selected point and a preset number of neighboring points on both sides of the selected point. Then calculate the sum of the second grayscale values within a preset length range on the other side of the selected point to obtain the grayscale value difference on both sides of the selected point.
[0014] 3) Move the selected point along the normal vector direction. After each move, calculate the grayscale value difference on both sides of the selected point and adjust the selected point to the point with the largest grayscale value difference.
[0015] Furthermore, step S1 includes the following sub-steps:
[0016] S101, selecting a certain number of manually drawn typical prostate boundary contours;
[0017] S102, performing equal-interval sampling on each of the boundary contours to obtain a plurality of boundary contour training point sets;
[0018] S103, aligning each of the boundary contour training point sets to the same coordinate system;
[0019] S104 , extracting an average contour representing the shape of the prostate from the aligned plurality of boundary contour training point sets.
[0020] Preferably, in step S2, the average contour is deformed, and the deformation method includes one or more combinations of scaling, translation, and rotation.
[0021] Furthermore, step S4 includes the following sub-steps:
[0022] S401, constructing a denoising autoencoder;
[0023] S402, obtaining multiple typical prostate boundary contour data sets, and performing augmentation processing on the contour data sets to obtain a contour training data set;
[0024] S403, training the denoising autoencoder using the contour training data set to obtain a fully trained denoising autoencoder;
[0025] S404: Import the coarse segmentation contour into a well-trained denoising autoencoder to obtain a smoothed contour.
[0026] Furthermore, in step S5, the smoothed contour is adjusted again using the improved normal vector contrast boundary calculation method, specifically including:
[0027] (1) Select a point on the smoothed contour, connect two points on the contour adjacent to the point to obtain a line segment, draw a perpendicular line through the selected point to the line segment, and obtain a foot of the perpendicular;
[0028] (2) extracting the grayscale values of each pixel point on the prostate ultrasound image through which the vertical line passes, and combining them in order into a grayscale value list;
[0029] (3) In the grayscale value list, calculate the sum of the third grayscale values within a preset length range on one side of the selected point, and then calculate the sum of the fourth grayscale values within a preset length range on the other side of the selected point, to obtain the grayscale value difference between the two sides of the selected point;
[0030] (4) between the selected point and the corresponding foot of the perpendicular, move the selected point along the direction of the corresponding perpendicular line, calculate the grayscale value difference on both sides of the selected point after each movement, and adjust the selected point to the point where the grayscale value difference is the largest;
[0031] (5) Processing the other points on the smoothed contour in accordance with steps (1) to (4) in sequence to obtain a contour that has been adjusted again.
[0032] Preferably, in step S5, the preset tolerance value is 2 pixels.
[0033] A prostate ultrasound image segmentation device includes a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor; the communication bus realizes connection and communication between the processor and the memory; when the processor executes the computer-readable program, the above-mentioned prostate ultrasound image segmentation method is implemented.
[0034] Compared with the existing technology, the beneficial effect of the present invention is to preliminarily frame the prostate contour on the prostate ultrasound image by characterizing the average contour of the prostate shape, and then correct the preliminarily framed contour through the improved normal vector contrast boundary calculation method, so that the corrected contour conforms to the grayscale information on the prostate ultrasound image, and then smooth the corrected contour to eliminate the noise on it, and then through multiple rounds of iteration, the contour is continuously converged on the true boundary, thereby realizing the rapid segmentation of the prostate ultrasound image; compared with the existing technology, since the present invention first preliminarily frames the prostate contour on the prostate ultrasound image through the average contour, the amount of calculation required for subsequent contour correction is greatly reduced. At the same time, in the contour smoothing stage, only the contour is input instead of the image, which can further reduce the amount of calculation and greatly improve the segmentation efficiency of the prostate ultrasound image. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The present invention will be further described below with reference to the accompanying drawings and examples.
[0036] Figure 1 Schematic diagram of the process of prostate ultrasound image segmentation method based on denoising autoencoder according to an embodiment of the present invention.
[0037] Figure 2 Schematic diagram of the process of obtaining the average contour of the prostate shape according to an embodiment of the present invention.
[0038] Figure 3 These are multiple typical prostate boundary contour images manually drawn according to an embodiment of the present invention.
[0039] Figure 4 Schematic diagram of obtaining a boundary contour point set by sampling multiple prostate boundary contours.
[0040] Figure 5 Schematic diagram of aligning multiple prostate boundary contour point sets to the same coordinate system.
[0041] Figure 6 Schematic diagram of the average contour extracted to characterize the shape of the prostate in an embodiment of the present invention.
[0042] Figure 7 Schematic diagram of average contour deformation processing in an embodiment of the present invention.
[0043] Figure 8 Schematic diagram of selecting points on the contour normal vector to obtain the point with the largest grayscale difference.
[0044] Figure 9 Schematic diagram of obtaining segmentation points of a prostate ultrasound image using a normal vector contrast boundary algorithm in an embodiment of the present invention.
[0045] Figure 10This is a schematic diagram of determining segmentation points using an improved normal vector contrast boundary calculation method according to an embodiment of the present invention.
[0046] Figure 11 Schematic diagram of the process of obtaining a rough segmentation contour according to an embodiment of the present invention.
[0047] Figure 12 This is a schematic diagram of obtaining segmentation points of a prostate ultrasound image using an improved normal vector contrast boundary algorithm in an embodiment.
[0048] Figure 13 Schematic diagram of the structure of the denoising autoencoder.
[0049] Figure 14 Schematic diagram of the process of step S5 of the present invention.
[0050] Figure 15 Schematic diagram of using the normal vector boundary calculation method to determine the contour segmentation points based on the point set output by the denoising autoencoder.
[0051] Figure 16 Schematic diagram of obtaining the final segmentation result of a prostate image according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] Example 1
[0053] like Figure 1 As shown, the prostate ultrasound image segmentation method based on denoising autoencoder includes the following steps:
[0054] Step S1: Obtaining an average contour representing the shape of the prostate, specifically including:
[0055] S101. Select a certain number of manually drawn typical prostate boundary contours, such as Figure 3 As shown;
[0056] S102, perform equal-interval sampling on each boundary contour to obtain several boundary contour training point sets, such as Figure 4 As shown;
[0057] S103, aligning each boundary contour training point set to a common coordinate system, such as Figure 5 As shown;
[0058] S104, extracting the average contour representing the shape of the prostate according to the aligned boundary contour training point sets on the common coordinate system, such as Figure 6 shown.
[0059] In step S104, a fitting method may be used to obtain an average contour representing the shape of the prostate, or principal component analysis may be used to extract the average contour.
[0060] Principal component analysis (PCA) extracts features from multiple vectors through dimensionality reduction. A small number of uncorrelated principal component eigenvectors can be used to represent a data set and describe its internal structure. PCA transforms shape vectors into a new coordinate system. Using the variance of the projection, the data is sorted by size and projected onto the coordinate system, reducing data dimensionality and redundancy. By calculating the positive vectors and eigenvalues of the shape vectors and selecting the top m, this approach ensures that the maximum amount of useful information is obtained while addressing the high spatial dimensionality.
[0061] Specifically, the method of extracting the average profile by principal component analysis includes the following steps:
[0062] (1) After aligning each boundary contour training point set to a common coordinate system, each contour training point set, i.e., the shape vector, can be expressed as:
[0063] x=[x1,x2,…,x n ;y1,y2,…y n ] T (1-1)
[0064] T represents the transpose operation, where n represents the number of boundary contour points.
[0065] (2) Obtaining global shape using principal component analysis
[0066]
[0067] (3) Calculate the covariance matrix S:
[0068]
[0069] (4) Calculate the eigenvalues and eigenvectors Φ of the covariance matrix and sort the eigenvalues from large to small, i.e. (λ1,λ2,…,λ q ), select the first t of them so that they satisfy:
[0070]
[0071] Among them, f V Indicates the proportion of the selected features to all features, generally 95%-98%; q represents the number of feature vectors; V T represents the sum of all eigenvectors, and we have:
[0072] V T =∑λ i (1-5)
[0073] (5) After principal component analysis of the aligned data, the resulting plane shape model is composed of the average shape The new plane shape can be decomposed and represented by the parameter vector b through the average shape and eigenvectors:
[0074]
[0075] (6) In the training shape space, the approximate shape is obtained by linear combination of feature vectors:
[0076]
[0077] Finally, the average contour of the prostate shape is obtained as Figure 6 As shown in Figure 1. Principal component analysis is used to handle the redundancy of the aligned m input data. This method can be used to estimate the shape of a plane during segmentation. According to Equation (1-7), a new shape can be obtained by adjusting the value of b, and the deformed new segmentation curve is constrained to the shape space generated by the training samples.
[0078] Step S2: Acquire a prostate ultrasound image to be segmented, display the prostate ultrasound image and the average contour on the same plane, and then deform the average contour so that the deformed contour preliminarily coincides with the true boundary of the prostate on the prostate ultrasound image;
[0079] The deformation processing method includes at least one of scaling, translation, and rotation.
[0080] In the embodiment, the average contour in the left figure is scaled and translated so that the deformed contour is preliminarily consistent with the real boundary of the prostate on the prostate ultrasound image, as shown in FIG. Figure 7 shown.
[0081] Step S2 can be performed manually or through an automated algorithm. The specific principle of the automated algorithm is to use a pyramid method from coarse to fine. In this method, the average shape of the training model is used as the seed contour, which is reduced to fit different resolution levels. The contour points of the model are moved along the normal direction, using the transition from bright to dark. When all points are moved, some significant contours x can be detected. s By using x s and the corresponding average shape part The similarity transformation T can be calculated s :
[0082]
[0083] Where m is the number of significant contour points, and the transformed shape is used as the initialization result for the current level. The shape obtained at the optimal level is considered the final initialization result.
[0084] Step S3: adjusting each point on the deformed contour to the gray value mutation on the prostate ultrasound image by the improved normal vector contrast boundary algorithm to obtain a rough segmentation contour;
[0085] For the convenience of understanding, the normal vector contrast boundary algorithm is introduced first as follows:
[0086] First, the target object in the ultrasound image is initially positioned by the method in steps S1 and S2 to form a wide contour curve, which can be discretely expressed as a point set:
[0087] S = {(x1, y1), (x2, y2),..., (x n , y n )}
[0088] A normal vector of the segmentation line at each point on the contour curve is made, and the normal vector is set as a point set with the same density as the pixel points. It is assumed that the normal vector direction points outward. Then each point on the normal vector has a fixed index value. An arbitrary point is taken as p(x, y), and it is assumed that the index value of the point on the normal vector is ind. Then the gray values of m points in the positive and negative directions of the p point are taken, and a point set for representing the gray values of the points is defined:
[0089] f = [f ind+m , f ind+m-1 ,... f ind ,... f ind-m+1 , f ind-m ]
[0090] Wherein, f represents the gray vector corresponding to the normal vector; f i represents the gray value of the point with the line index value i. The prostate contour boundary is expanded into a strip chart and a local enlarged view is shown as Figure 8 .
[0091] The gray difference C ind of the cumulative gray values of the upper and lower regions of a point in the normal direction is calculated:
[0092]
[0093] ind = argmax C ind (3-2)
[0094] Wherein, i represents the value range of the upper and lower region boundary algorithm, ind represents the line index value of the point, and C is the set composed of all C ind The gray difference of the cumulative gray values of the upper and lower regions of a point in the normal direction is calculated in formula (3-1). The point is moved on the normal vector to form the set C indFormula (3-2) is used to determine the optimal segmentation point. The row index corresponding to the maximum grayscale difference in C is taken. This can be considered as the index value of the target boundary point. By traversing all the points on the discretized curve in this way, the approximate contour boundary can be obtained.
[0095] After the normal vector contrast boundary algorithm is used, most of the prostate image segmentation point sets are already on the real boundary. Figure 9 As shown. However, there are still a few segmentation points that are not accurately positioned on the real boundary, especially the segmentation points located in the lower right area of the prostate, which have seriously deviated from the real boundary and do not conform to the boundary characteristics of the prostate. For the convenience of explanation below, these segmentation points that are out of the real boundary are called noise segmentation points. The main reason for the above problems is that the normal vector contrast boundary algorithm only processes a single normal vector at each step, that is, it only considers the grayscale information on a single normal vector path. However, since the grayscale information on a single normal vector is relatively one-sided, it is easy to be misled by the image noise information covered by the normal vector, resulting in inconsistency between the segmentation points of the front and rear neighborhood boundaries, which makes the overall contour appear somewhat rough in appearance. Therefore, in the embodiment, the normal vector contrast boundary algorithm is further improved, and a certain segmentation point is The neighborhood information of other segmentation points before and after is fully considered. Correct the position, such as Figure 10 shown.
[0096] like Figure 10 As shown, make a normal vector on the contour and its neighborhood and In the normal vector Take the point with the row index value ind, which is The points with the same index value on the normal vectors of the front and back neighborhoods are represented as
[0097] point The boundary algorithm is:
[0098]
[0099] In the formula, l represents the point The number of unilateral neighboring points at , m represents the number of normal vectors of the neighborhood. This formula calculates Figure 10 The grayscale difference between the upper and lower bounding boxes is no longer just the grayscale information on a single normal vector. Therefore, the boundary algorithm C neigh The grayscale information contained is much larger than C, thus avoiding the generation of noise segmentation points due to local grayscale noise at a few segmentation points.
[0100] In order to better understand the present invention, the following describes in detail how the improved normal vector contrast boundary algorithm is applied to prostate ultrasound image segmentation.
[0101] like Figure 11 As shown, step S3 specifically includes the following steps:
[0102] S301, creating a normal vector for each point on the deformed contour, extracting the grayscale values of each pixel on the prostate ultrasound image through which the normal vector corresponding to each point passes, and combining them in order to form a grayscale value list;
[0103] S302: Select a point, and in the grayscale value list, calculate the sum of the first grayscale values within a preset length range on one side of the selected point and a preset number of neighboring points on both sides of the selected point. Then calculate the sum of the second grayscale values within a preset length range on the other side of the selected point and a preset number of neighboring points on both sides of the selected point, to obtain the grayscale value difference between the two sides of the selected point.
[0104] S303, moving the selected point along the normal vector direction, calculating the grayscale value difference on both sides of the selected point each time the point is moved to a position where the grayscale value difference is the largest;
[0105] S304 , processing the other points on the deformed contour in accordance with steps S302 and S303 in sequence to obtain a coarse segmentation contour.
[0106] The effect obtained after improving the boundary algorithm is as follows Figure 12 As shown. It can be seen that compared with Figure 9 , the image has a smoother outline. However, this still does not meet the requirements of current medical institutions. The medical field requires computers to have higher segmentation accuracy, so the currently obtained boundary point set data still needs to be further processed.
[0107] Step S4: smoothing the rough segmentation contour;
[0108] The method for smoothing the rough segmentation contour may adopt a variety of smoothing algorithms. In this embodiment, a noise reduction autoencoder is used to smooth the rough segmentation contour, which specifically includes the following steps:
[0109] S401, constructing a denoising autoencoder;
[0110] S402, obtaining several typical prostate boundary contour data sets, and performing augmentation processing on the contour data sets to obtain contour training data sets;
[0111] S403, training the denoising autoencoder using the contour training data set to obtain a fully trained denoising autoencoder;
[0112] S404: Import the coarse segmentation contour into a well-trained denoising autoencoder to obtain a smoothed contour.
[0113] Autoencoder (AE) is a type of unsupervised learning neural network and an artificial neural network for feature extraction. The network can be considered to consist of two parts: an encoder h = f(x) and a decoder r = g(h) for generating reconstructed data. Based on this, it can be generalized to a random mapping P encoder (h|x), P decoder (x|h). The goal of the network learning is to make the output signal as close as possible to the input signal.
[0114] Denoising Autoencoder (DAE) is an improved version of Autoencoder (AE). Its core idea is to partially damage the input data based on the AE model, and input the data into the trained encoder for encoding and decoding to reconstruct a "clean" data. The purpose of data damage processing is to enhance the generalization ability of the model. Figure 13 shown.
[0115] In this invention, instead of using image data directly, we use a combination of artificial algorithms and neural networks to take advantage of their advantages. Therefore, during data preprocessing, the segmentation points obtained above, which have already achieved basic segmentation effects, are augmented by random angle rotation, random translation, and random scaling.
[0116] In the data processing stage, the present invention adopts random data inactivation, that is, a certain proportion of data is forcibly assigned to 0. It can be considered that the data assigned to 0 has no effect on the network, which is equivalent to reducing the dimension. Random inactivation is performed on the n-dimensional point set to obtain damaged data, that is, the noise addition process. Then the damaged data is used as input and the network is processed by Figure 13 The model is trained to fill these artificially introduced “gaps”.
[0117] The calculation formula of the encoding part is as follows:
[0118]
[0119] where f θ () represents the encoding function, y represents the encoded intermediate data, w represents the weight parameter of the encoder, and b represents the bias parameter of the encoder; Represents input data; s() represents activation function;
[0120] The decoder maps the intermediate data back to the "reconstructed" vector z, which is calculated as follows
[0121] z=g θ′ (y) = s(w′·y+b′) (4-2)
[0122] where g θ′ represents the decoding function, w′ represents the weight parameter of the decoder, and b′ represents the bias parameter of the decoder, where
[0123] w′=w T
[0124] Finally, each training sample data x i is mapped to the corresponding y i and z i In order to make the final output data z and the original input data x as similar as possible, a loss function is established between the reconstructed data z and the original data x. Here we use the traditional mean square error L(x,z) = ||xz|| 2 To continuously optimize the network parameters. Just repeat the above steps until the loss converges.
[0125] The loss function of the denoising autoencoder is:
[0126]
[0127] During training, 100 points on the segmentation labels were selected to represent the true boundaries. Each point was represented by a horizontal and vertical coordinate, resulting in a total of 132 image boundary coordinates. Through data augmentation (translating, rotating, and scaling the segmentation boundary coordinates), the number of image boundaries was increased to 13,200 for training. After setting parameters in the DAE code, such as the dropout rate and hidden layers, the data was fed into the DAE for training.
[0128] Step S5: The smoothed contour is adjusted again by the improved normal vector contrast boundary algorithm, the adjusted contour is smoothed, and the smoothed contour is adjusted again by the improved normal vector contrast boundary algorithm. This is repeated multiple times until the difference between each point on the smoothed contour and the corresponding point on the contour adjusted by the normal vector contrast boundary algorithm is less than the preset tolerance value, thereby obtaining the final prostate ultrasound image segmentation contour.
[0129] Because the denoising autoencoder doesn't learn directly from the image but instead learns the features of a set of boundary points, boundary recovery may not necessarily restore the exact boundary points of a specific shape. Therefore, it's still necessary to combine point features with the actual image to ensure that all boundary points are distributed along the true boundary, incorporating image information.
[0130] like Figure 14As shown, step S5 specifically includes the following steps:
[0131] S501, selecting a point on the smoothed contour, connecting two points adjacent to the point on the contour to obtain a line segment, and drawing a perpendicular line through the selected point to obtain a foot of the perpendicular;
[0132] S502, extracting the grayscale values of each pixel point that the vertical line passes through on the prostate ultrasound image, and combining them in order into a grayscale value list;
[0133] S503. In the grayscale value list, calculate the sum of the third grayscale values within a preset length range on one side of the selected point, and then calculate the sum of the fourth grayscale values within a preset length range on the other side of the selected point to obtain the grayscale value difference between the two sides of the selected point;
[0134] S504: Move the selected point along the direction of the corresponding perpendicular line between the selected point and the corresponding foot of the perpendicular. Calculate the grayscale value difference between the two sides of the selected point each time the point is moved to the position where the grayscale value difference is the largest. In this embodiment, the tolerance is 2 pixels.
[0135] S505 , processing the other points on the smoothed contour in sequence according to steps S501 to S304 to obtain a re-adjusted contour.
[0136] For ease of understanding, combined Figure 15 The above process is described in detail:
[0137] like Figure 15 As shown, the present invention takes out the relationship between the boundary points defined by the normal vector and the boundary points restored by the denoising autoencoder and enlarges the diagram for illustration. In the figure, points b and c represent adjacent contour points processed by the normal vector boundary algorithm, and point a represents a point on the ideal smooth boundary calculated by the trained denoising encoder. It can be found that point a does not meet the expected requirements, that is, on the real boundary. However, from a spatial perspective, it can be observed that a is located between points b and c, and points b and c are not exactly on the real boundary. However, it can be observed that the real boundary is often located between the normal vector point set and the denoising autoencoder, so the real boundary is found between the two types of points.
[0138] Connect points b and c, and draw a perpendicular line through a to point b and c, with the foot of the perpendicular being o. At this point, ao is a line segment that passes through the real boundary. Then, define two grayscale vectors of length l along vectors ao and oa with point a as the center, and calculate the cumulative grayscale difference of a point on the normal vector. The sliding range of the boundary algorithm is between line segments ao, and find the point with the maximum grayscale difference, which is the normal vector grayscale difference of the second round of iteration. It may be contaminated by external noise points, so that the point is not on the real boundary and the boundary points with the surrounding neighborhood are not smooth, so it is still necessary to convert the point set Send it into the denoising autoencoder to generate a new point set z (2) , new points in this area should be confined to a smaller range. Similarly, as the points generated by the normal vectors continue to approach the points generated by the denoising autoencoder, this will eventually lead to the two positioning pixels approaching each other. At this time, the boundary operator will converge to the true boundary. Generally, it is considered to have converged when the difference in pixels does not exceed 2 pixels.
[0139]
[0140] Here, the coordinates of a, b, and c are (x a ,y a )、(x b ,y b )、(x c ,y c ), Equation (5-1) calculates the distance d between point a generated by the noise reduction encoder and the line connecting points b and c generated by the normal vector. A new normal vector is created along d to accumulate grayscale differences. Therefore, a new normal vector dividing point is generated on this line segment. Obviously, by repeating the above process, the range of d will continue to shrink and eventually converge to two adjacent pixels, which is the final dividing point of this method.
[0141] During the smoothing stage, if the entire prostate image is input, the high-dimensional data will only increase the burden of model encoding and decoding, which is not cost-effective in terms of time and computing power. The goal of this invention is to correct the originally incomplete boundary of the prostate, realize the denoising function through the DAE model, and restore the true boundary.
[0142] like Figure 16 As shown, the implementation process of the present invention is divided into the following three stages:
[0143] Phase 1: The prostate in the original image is roughly located in step S2, and then the target prostate is roughly segmented using the improved normal vector contour algorithm in step S3. However, it can be observed that some boundary points are not smooth. The boundary point set obtained by this rough segmentation can be regarded as a noisy prostate boundary.
[0144] The second stage: The prostate boundary with noise points obtained in the first stage is directly input into the trained noise reduction encoder for testing. During the test, the boundary features learned by the DAE are used to automatically filter out the deviated points in the input, namely the noise points, and the boundary is restored through its own reconstruction capabilities.
[0145] The third stage is the iteration stage: Because one round of processing sometimes fails to achieve the desired segmentation effect, the point set obtained by the encoder is fed back to the initial normal vector contour algorithm stage to prepare for the next round of cyclic processing. In the embodiment, MATLAB programming is used to paste the boundary point set output by the DAE and the point set obtained by the previous normal vector operator onto the corresponding prostate original image and display them together. The two boundary points form a narrow band on the original image. In the embodiment, the point set that almost overlaps on a line can be considered as the true boundary point. This stage mainly processes the points that do not overlap and differ by many pixels in space. In general, it combines the image grayscale information from the first stage with the point feature information from the second stage. The second stage is repeated, and multiple rounds of iterations are performed until the segmentation point set converges as close to the true boundary as possible. In other words, the range of the normal vector boundary operator in the first stage is continuously narrowed, and the grayscale information is continuously refined to find the optimal position.
[0146] Example 2
[0147] A prostate ultrasound image segmentation device includes: a processor, a memory, and a communication bus; the memory stores a computer-readable program executable by the processor; the communication bus realizes connection and communication between the processor and the memory; when the processor executes the computer-readable program, it implements the prostate ultrasound image segmentation method of embodiment 1.
[0148] Example 3
[0149] A computer-readable storage medium stores one or more programs, wherein the programs can be executed by one or more processors to implement the steps in the prostate ultrasound image segmentation method of embodiment 1.
Claims
1. A prostate ultrasound image segmentation method based on denoising autoencoder, characterized in that: The following steps are involved: S1. Obtaining the average contour representing the prostate shape; S2. Acquire a prostate ultrasound image to be segmented, display the prostate ultrasound image and the average contour on the same plane, and deform the average contour so that the deformed contour preliminarily coincides with a true prostate boundary on the prostate ultrasound image; S3, using an improved normal vector contrast boundary calculation method to adjust each point on the deformed contour to a grayscale value mutation point on the prostate ultrasound image to obtain a rough segmentation contour; S4, using a noise reduction autoencoder to smooth the rough segmentation contour; S5. Using the improved normal vector contrast boundary calculation method to adjust the smoothed contour again, smoothing the adjusted contour, and adjusting the smoothed contour again using the improved normal vector contrast boundary calculation method, iterating multiple times until the difference between each point on the smoothed contour and the corresponding point on the contour adjusted by the normal vector contrast boundary calculation method is less than a preset tolerance value, thereby obtaining the final prostate ultrasound image segmentation contour; The improved normal vector contrast boundary calculation method specifically includes: 1) A normal vector is drawn for each point on the contour, and the grayscale values of each pixel point on the prostate ultrasound image through which the normal vector corresponding to each point passes are extracted and sequentially combined into a grayscale value list; 2) Select a point and, in the grayscale value list, calculate the sum of the first grayscale values within a preset length range on one side of the selected point and a preset number of neighboring points on both sides of the selected point. Then calculate the sum of the second grayscale values within a preset length range on the other side of the selected point to obtain the grayscale value difference on both sides of the selected point. 3) Move the selected point along the normal vector direction. After each move, calculate the grayscale value difference on both sides of the selected point and adjust the selected point to the point with the largest grayscale value difference.
2. The prostate ultrasound image segmentation method according to claim 1, characterized in that: Step S1 includes the following sub-steps: S101: Select a certain number of manually drawn typical prostate boundary contours; S102: performing equal-interval sampling on each of the boundary contours to obtain a plurality of boundary contour training point sets; S103: aligning each of the boundary contour training point sets to the same coordinate system; S104: Extracting an average contour representing the shape of the prostate from the aligned plurality of boundary contour training point sets.
3. The prostate ultrasound image segmentation method according to claim 2, characterized in that: In step S2, the average contour is deformed, and the deformation method includes one or more combinations of scaling, translation, and rotation.
4. The prostate ultrasound image segmentation method according to claim 3, characterized in that: Step S4 includes the following sub-steps: S401, constructing a denoising autoencoder; S402, obtaining multiple typical prostate boundary contour data sets, and performing augmentation processing on the contour data sets to obtain a contour training data set; S403, training the denoising autoencoder using the contour training data set to obtain a trained denoising autoencoder; S404: Import the coarse segmentation contour into a well-trained denoising autoencoder to obtain a smoothed contour.
5. The prostate ultrasound image segmentation method according to claim 4, characterized in that: In step S5, the smoothed contour is adjusted again using the improved normal vector contrast boundary calculation method, specifically including: (1) Select a point on the smoothed contour, connect two points on the contour adjacent to the point to obtain a line segment, draw a perpendicular line through the selected point to the line segment, and obtain a foot of the perpendicular; (2) extracting the grayscale values of each pixel point on the prostate ultrasound image through which the vertical line passes, and combining them in order into a grayscale value list; (3) In the grayscale value list, calculate the sum of the third grayscale values within a preset length range on one side of the selected point, and then calculate the sum of the fourth grayscale values within a preset length range on the other side of the selected point, to obtain the grayscale value difference between the two sides of the selected point; (4) between the selected point and the corresponding foot of the perpendicular, move the selected point along the direction of the corresponding perpendicular line, calculate the grayscale value difference on both sides of the selected point after each movement, and adjust the selected point to the point where the grayscale value difference is the largest; (5) Processing the other points on the smoothed contour in accordance with steps (1) to (4) in sequence to obtain a contour that has been adjusted again.
6. The prostate ultrasound image segmentation method according to any one of claims 1 to 5, characterized in that: In step S5, the preset tolerance value is 2 pixels.
7. A prostate ultrasound image segmentation device, characterized in that: Includes processor, memory and communication bus; The memory stores a computer-readable program executable by the processor; The communication bus realizes the connection and communication between the processor and the memory; When the processor executes the computer-readable program, the prostate ultrasound image segmentation method according to any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the prostate ultrasound image segmentation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Prostate ultrasonic segmentation model training method and device and prostate ultrasonic segmentation method and device
CN115953412A
Method and System for Automatic Prostate Segmentation in Magnetic Resonance Images
US20140029823A1