A photoacoustic b-scan image artifact removal method based on deep learning ResUNet
By using the deep learning ResUNet method, the problems of incomplete artifact removal and structural loss in photoacoustic B-scan images are solved. It achieves effective suppression of artifacts and preservation of real structure, thereby improving the interpretability and quantitative analysis capability of the images.
Patent Information
- Application Number
- CN202610444903.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-07
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies struggle to effectively remove artifacts from photoacoustic B-scan images, especially artifacts such as stripes, trails, and ringing. Furthermore, traditional methods can easily lead to the weakening of the true structure or loss of edges, making it difficult to take into account the artifact morphology variations of different tissue types and depth regions.
We employ a deep learning-based ResUNet approach, which achieves pixel-level feature learning and prediction output through grayscale normalization, data augmentation, specific network model training, and composite loss functions. We construct encoder and decoder structures, and combine the main structure with mask preservation and differential weights to remove artifacts.
It effectively suppresses artifacts while maintaining tissue structure boundaries and continuity, improving image interpretability and quantitative reliability. It solves the problems of incomplete artifact removal and structural loss in traditional methods, and has good robustness and adaptability.
Smart Images

Figure CN122335619A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photoacoustic imaging image processing technology, and in particular to a photoacoustic B-scan image artifact removal method based on deep learning ResUNet. Background Technology
[0002] Photoacoustic imaging is a novel biomedical imaging technique that combines the advantages of optical absorption contrast with ultrasound detection. During imaging, pulsed light irradiates biological tissue, causing transient thermoelastic expansion and generating photoacoustic signals. Transducers receive these acoustic signals, which are then amplified, sampled, and processed to form raw data. Depending on the scanning method and imaging pathway, the system typically arranges the echo data acquired at each location laterally to form a B-scan two-dimensional image, used to characterize the spatial distribution and structural features of absorbers within the tissue. The quality of the B-scan image directly affects subsequent target recognition, structural measurement, quantitative analysis, and 3D reconstruction results; therefore, effective quality enhancement and artifact suppression of B-scan images are of great significance.
[0003] In practical photoacoustic imaging systems, B-scan images often exhibit artifacts such as stripes, trailing, and ringing, which arise from a combination of factors. For example, the limited bandwidth and damping characteristics of the transducer can introduce ringing responses, while the system impulse response can cause energy diffusion in the depth direction, resulting in trailing residues. Multi-interface reflections, multi-path propagation, and scattering effects between tissue and coupling medium can produce repetitive structures or striped textures. Furthermore, changes in coupling state, pose perturbations, and environmental electromagnetic interference during the scanning process can also lead to localized abnormal bright bands or enhanced background textures. These artifacts often overlap with the real structures in spatial location, easily causing blurred tissue boundaries, decreased contrast, submersion of weak structures, or the appearance of pseudo-structures, thereby reducing the interpretability and quantitative reliability of the image.
[0004] To address artifacts in photoacoustic B-scan images, existing techniques typically employ filtering, deconvolution, background subtraction, thresholding, morphological processing, and transform domain methods. For example, bandpass filtering or wavelet thresholding reduces noise, deconvolution or impulse response compensation improves resolution, and background estimation and subtraction suppress fixed texture artifacts. However, these methods often rely on specific noise levels or system model assumptions, requiring manual setting of filtering parameters, thresholds, or regularization weights. This makes it difficult to accommodate artifact morphological variations across different tissue types, depth regions, and acquisition conditions. Furthermore, overly strong filtering or thresholding can weaken or break down the true structure, leading to excessive smoothing, edge loss, or loss of detail, thus affecting subsequent analysis.
[0005] In recent years, deep learning has shown great potential in medical imaging denoising and artifact correction, enabling it to learn complex imaging degradation patterns through data-driven approaches. However, in photoacoustic B-scan scenarios, artifact distribution exhibits significant spatial non-uniformity and structural correlation. Different depth regions, areas near the main structure, and unstructured regions have varying requirements for suppression intensity. Simultaneously, training labels may have local gaps or discontinuities, leading to network learning biases and causing structural breaks. Summary of the Invention
[0006] The purpose of this invention is to provide a photoacoustic B-scan image artifact removal method based on deep learning ResUNet. This method uses a deep learning neural network to perform pixel-level feature learning and prediction output on photoacoustic B-scan images, so as to enhance the artifact reduction capability while maintaining the boundaries, continuity and texture information of tissue structure.
[0007] To achieve the above objectives, the present invention provides the following solution: A photoacoustic B-scan image artifact removal method based on deep learning ResUNet includes the following steps: The acquired photoacoustic B-scan raw image is subjected to grayscale normalization processing to obtain a normalized input image; The original photoacoustic B-scan image is paired with the reference label image to obtain training samples, and the training samples are divided into training set and validation set; Construct a specific network model; the specific network model includes an encoder and a decoder. The encoder consists of multiple convolutional blocks and is downsampled step by step through max pooling. The decoder is connected to the encoder in a skip connection and is upsampled step by step through transposed convolution. A specific network model is trained using training samples, and a composite loss function is constructed to supervise learning and backpropagate parameter updates for the specific network model, resulting in a well-trained specific network model. By using a pre-trained specific network model to remove artifacts from the photoacoustic B-scan image to be processed, an artifact-free image is obtained.
[0008] Optionally, the acquired photoacoustic B-scan raw image is subjected to grayscale normalization processing to obtain a normalized input image, including: scaling the photoacoustic B-scan raw image by a preset maximum grayscale value, as expressed by: ;in, The preset maximum grayscale value, This is the original image from the photoacoustic B-scan.
[0009] Optionally, the original photoacoustic B-scan image is paired with the reference label image to obtain training samples, and the training samples are divided into a training set and a validation set, including: The original photoacoustic B-scan images are paired with reference label images to form a sample dataset; While keeping the depth dimension constant, random cropping with a fixed width is performed only along the horizontal direction of the sample dataset; The cropped sample dataset is horizontally flipped according to a preset probability to obtain training samples.
[0010] Optionally, the encoder includes: a first coding layer, a second coding layer, and a third coding layer, which transform the number of feature channels of the input image to 32, 64, and 128, respectively; the decoder includes: a first upsampling layer, a second upsampling layer, and a third upsampling layer, which upsample the output features of the corresponding coding layers step by step, and concatenate the upsampled features with the output features of the corresponding coding layers, and then perform convolutional fusion on the concatenated feature input convolutional blocks; the expression for convolutional fusion is: ;in For the input feature map, This is a feature transformation consisting of convolution and batch normalization. It is a non-linear activation function. This is for outputting feature maps.
[0011] Optionally, a specific network model is trained using training samples, and a composite loss function is constructed to perform supervised learning and backpropagation parameter updates on the specific network model, resulting in a trained specific network model, including: Adaptive determination of the main structure position of a specific network model based on reference label images; Pixel expansion is performed based on the position of the main structure to obtain the main structure retention band and generate the main structure retention mask; Construct out-of-band weights and depth weights based on the main structure retention band and the main structure retention mask; The label pixels of the reference label image are updated within the main structure retention band to obtain the completed label. A composite loss function is constructed based on weighted pixel difference loss, structural similarity constraint, main structure fidelity constraint, deep artifact suppression, out-of-band artifact suppression, and out-of-band TopK anomaly response suppression. The composite loss function is then used to backpropagate a specific network model to obtain a trained specific network model.
[0012] Optionally, adaptive determination of the principal structure position for a specific network model based on the reference label image includes: searching for the depth index corresponding to the maximum response value along the depth direction at each horizontal position of the reference label image, and using the depth index as the principal structure position, expressed as: ;in, The reference label image contains the pixel value at the depth index y and the horizontal index x. This represents the position of the main structure when the horizontal position is x.
[0013] Optionally, pixel expansion is performed based on the position of the main structure to obtain the main structure retention band and generate a main structure retention mask, including: The position of the main structure is smoothed laterally using the sliding window mean method to obtain the smoothed position; the expression for the smoothed position is: ;in, To smooth out half the width of the window, Main structural position, For integer operations; Centered on the smooth position, a preset number of pixels are extended in both the shallow and deep directions to obtain the main structure preservation band and generate the main structure preservation mask. The expression is: ;in, and These represent the number of extended pixels in the shallow and deep directions of the main structure retention band, respectively. The mask is retained for the main structure.
[0014] Optionally, out-of-band weights and depth weights are constructed based on the master structure retention band and the master structure retention mask, including: The out-of-band distance is determined based on the smoothing position; the expression for the out-of-band distance is: ; The out-of-band weights are determined based on the main structure retention mask and the out-of-band distance; the expression for the out-of-band weights is: ;in, This represents the maximum value of the out-of-band weights. This represents the transition length where the weight increases with distance. This is a truncation function that restricts the input to the range of 0 to 1.
[0015] Optionally, constructing out-of-band weights and depth weights based on the main structure retention band and the main structure retention mask further includes: Based on the position of the main structure, the starting position is obtained by shifting a preset pixel interval along the depth direction into the deeper layers. Based on the starting position, the foreground weight is transitioned within a preset transition length range to obtain the depth weight; the expression for the depth weight is: ;in, For the weights of the shallow region, For the weight of the deep region, The length of the weight transition, A truncation function that restricts the input to the range of 0 to 1. This is the starting depth index when the horizontal position is x; Based on the starting position, a deep suppression mask is generated in a deep region exceeding a preset transition length; the expression for the deep suppression mask is: ;in, This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise.
[0016] Optionally, the expression for the out-of-band TopK anomaly response suppression term is: ;in, The number of maximum values selected. To enhance the exponent by power, To calculate the average value of the horizontal positions; The expression for the main structure fidelity constraint term is: ;in, To predict the pixel value at the depth index y and horizontal index x in an image. These are the normalized pixel values of the original photoacoustic B-scan image. The mask is retained in the main structure. To prevent extremely small positive numbers with a denominator of zero; The expression for the structural similarity constraint term is: ;in, The reference label image used in training, It is a structural similarity index.
[0017] According to specific embodiments provided by the present invention, the following technical effects are disclosed: The photoacoustic B-scan image artifact removal method based on deep learning ResUNet provided by the present invention includes: performing grayscale normalization processing on the acquired photoacoustic B-scan original image to obtain a normalized input image; pairing the photoacoustic B-scan original image with a reference label image to obtain training samples, and dividing the training samples into a training set and a validation set; constructing a specific network model; the specific network model includes an encoder and a decoder, the encoder is composed of multiple convolutional blocks and performs stepwise downsampling through max pooling, and the decoder is skip-connected to the encoder and performs stepwise upsampling through transposed convolution; training the specific network model through the training samples, and constructing a composite loss function to perform supervised learning and backpropagation parameter updates on the specific network model to obtain a trained specific network model; and removing artifacts from the photoacoustic B-scan image to be processed using the trained specific network model to obtain an artifact-free image. This method utilizes a deep learning neural network to perform pixel-level feature learning and prediction output on photoacoustic B-scan images, thereby suppressing image artifacts while maintaining the continuity and boundary information of the real tissue structure. It can specifically suppress artifacts while preserving the real tissue structure information and has good robustness and adaptability. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of the photoacoustic B-scan image artifact removal method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the deep learning ResUNet model network structure according to an embodiment of the present invention; Figure 3 This is a comparison of the effects of photoacoustic image artifact removal processing on mouse ears according to an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] like Figure 1 As shown, this embodiment of the invention provides a photoacoustic B-scan image artifact removal method based on deep learning ResUNet, comprising the following steps: Step 100: Perform grayscale normalization on the acquired photoacoustic B-scan raw image to obtain a normalized input image; Step 200: Pair the original photoacoustic B-scan image with the reference label image to obtain training samples, and divide the training samples into training set and validation set; Step 300: Construct a specific network model; Step 400: Train the specific network model using training samples, and construct a composite loss function to perform supervised learning and backpropagation parameter updates on the specific network model to obtain the trained specific network model; Step 500: Use a trained specific network model to remove artifacts from the photoacoustic B-scan image to be processed, and obtain an artifact-free image.
[0023] In the specific implementation process, step 100 first acquires the original photoacoustic B-scan image I and the spatially aligned reference label image Y, which corresponds one-to-one with the original image, using a photoacoustic imaging system. Then, the original image is subjected to grayscale normalization processing to ensure that different samples have consistency in amplitude range, resulting in a normalized input image. In this embodiment, grayscale normalization is achieved by scaling according to a preset maximum grayscale value, as expressed by: ; in, This is the preset maximum grayscale value when the original image is an 8-bit grayscale image. Take 255, This is the original image from the photoacoustic B-scan.
[0024] In the specific implementation process, step 200 pairs the original image with the reference label image one-to-one to form training sample pairs XY, and divides them into training and validation sets for subsequent model training. Specifically, to improve the model's adaptability to different lateral fields of view and structural changes, the training samples are obtained through data augmentation. First, while keeping the depth dimension H constant, random cropping is performed only along the lateral direction of the training samples, with a preferred cropping width of 256; no cropping is performed when the lateral dimension is insufficient. Second, the cropped samples are horizontally flipped with a preset probability, preferably 0.5. This augmentation method ensures that the physical meaning of the depth direction is not destroyed, which is suitable for the imaging characteristics of photoacoustic B-scan images.
[0025] like Figure 2 As shown, in the specific implementation process, step 300 establishes a ResUNet network model, which is an encoder and decoder structure. Preferably, the encoder consists of convolutional blocks containing residual connections, and performs stepwise downsampling through max pooling to extract multi-scale features. The decoder performs stepwise upsampling through transposed convolution and fuses with the corresponding layer features of the encoder through skip connections to compensate for detail information. The output is a predicted image P produced by a 1-to-1 convolution followed by sigmoid activation, ensuring that the output is the same size as the input and the pixel values fall within the range of 0 to 1.
[0026] Specifically, the ResUNet network model in this embodiment includes an encoder, a bottleneck layer, and a decoder. The encoder sequentially includes a first encoding layer, a second encoding layer, and a third encoding layer, which transform the number of feature channels of the input single-channel image to 32, 64, and 128, respectively, and downsample through max pooling between adjacent encoding layers. The bottleneck layer transforms the number of feature channels to 256. The decoder sequentially includes a first upsampling layer, a second upsampling layer, and a third upsampling layer, which upsample the features step by step through transposed convolutions, and then concatenate the upsampled features with the corresponding encoding layer output features before inputting them into the convolutional block for fusion. Finally, a single-channel output is obtained through a one-to-one convolution, and the predicted image is output through Sigmoid activation. The convolutional block employs a residual connection structure, which is used to superimpose the convolutionally transformed features with the input features to enhance feature transfer. The expression is: ; in, The input feature map for the residual connection structure, This represents a feature transformation process that involves performing two convolutions and batch normalizations on the input feature map, followed by the introduction of nonlinear activation. It is a non-linear activation function. This is the output feature map of the residual connection structure.
[0027] In the specific implementation process, step 400 inputs the training samples into the ResUNet network model for training and parameter updating to obtain the predicted image P. Then, a composite loss function is constructed and the network parameters are updated through backpropagation. To achieve fidelity preservation of the main structure region and differential artifact suppression of the unstructured region, this embodiment introduces adaptive determination of the main structure position, adaptive completion of the reference label, and region weight construction process in the model training, as detailed below: 1. Adaptive determination of the main structure position. Based on the reference label image, the position corresponding to the maximum response along the depth direction at each horizontal position x is used as the main structure position. The expression is: ; in, The reference label image contains the pixel value at the depth index y and the horizontal index x. This represents the position of the main structure when the lateral position is x. To reduce lateral jitter, the position of the main structure is... The main structure position is obtained by smoothing the horizontal direction using a sliding window averaging method. The expression is: ; in, To smooth out half the width of the window, Main structural position, Indicates the window length. This is for the integer operation.
[0028] 2. Main structure retention zone construction. Based on the smoothed main structure position. Centered on the target layer, expand the preset number of pixels towards the shallower layers. Expand the preset number of pixels in the depth direction. This forms the main structure retention zone and generates the main structure retention mask. The expression is: ; in, and These represent the number of extended pixels in the shallow and deep directions of the main structure retention band, respectively. The mask is retained for the main structure. In this embodiment, the number of shallow layer extended pixels... Preferably 10, the number of pixels in the deep expansion layer. The preferred value is 14.
[0029] 3. Out-of-band weight and depth weight construction. Out-of-band distance-increasing weights are constructed based on the distance from pixels to the boundary of the main structure's preserved band, resulting in stronger penalties for farther out-of-band regions. Simultaneously, a depth-weighted region is set after the main structure to provide higher suppression intensity for deeper regions, thereby enhancing the suppression of deep trailing and ringing artifacts. Specifically, the out-of-band weight generation process is as follows: first, define the out-of-band distance... for: ; This yields the out-of-band distance increasing weights. for: ; in, This represents the maximum value of the out-of-band weights. This represents the transition length where the weight increases with distance. This is a truncation function that restricts the input to the range of 0 to 1. It should be noted that by making the weights of the in-band regions of the main structure lower than those of the out-of-band regions, and by increasing the out-of-band weights with increasing distance, the suppression of artifacts such as out-of-band stripes, trailing, and ringing is enhanced during training, while preserving the detailed information of the main structure regions.
[0030] Furthermore, the depth weight generation process is as follows: based on the smoothed main structure position... Based on this, a preset pixel interval is offset along the depth direction from the main structure position to determine the starting position of deep weighting. The expression is: ; in, This represents the starting depth index for the deep weighted index at a horizontal position of x. This indicates the number of pixels offset towards the deeper layers. Then, starting from the beginning of the deep weighting, within a preset transition length... Within the range, depth weights will be changed from foreground weights. Gradually transition to deep weights To obtain depth weights The expression is: ; in, For the weights of the shallow region, For the weight of the deep region, The length of the weight transition, A truncation function that restricts the input to the range of 0 to 1. The starting depth index is set at a lateral position of x; and a deep suppression mask is generated in the deep region exceeding the transition length. The expression is: ; in, This is an indicator function; it takes a value of 1 when the condition within the parentheses is true, and a value of 0 otherwise. During training, a suppression constraint is applied to the residual response of the predicted image in the background region based on the deep suppression mask, in order to enhance the suppression of deep trailing and ringing artifacts and reduce the impact of deep artifacts on image contrast.
[0031] 4. Adaptive Reference Label Completion. To alleviate the structural breakage caused by missing in-band reference labels in the main structure retention area, adaptive completion of the reference labels is performed before training. The main structure position is then determined a second time based on the completion result. The completion principle is to update the label pixels below a threshold within the main structure preservation zone so that they are not lower than the result of multiplying the original image pixel value by a fill factor. Specifically, pixels below a preset threshold in the reference label image are selected as missing regions within the main structure preservation zone, and the label values of the missing regions are updated to the larger of the reference label value and the original image pixel value multiplied by a preset fill factor, to obtain the completed reference label image, expressed as: ; in, This represents the pixel values of the reference label image before completion. This represents the pixel values of the completed reference label image. This represents the normalized pixel values of the original photoacoustic B-scan image. This indicates that the main structure retains the mask. Indicates the preset fill factor. This represents a preset threshold. The position of the main structure is redefined using the completed reference label image, and main structure preservation bands, depth weighting, and out-of-band distance increasing weights are generated. These are used to construct a composite loss function and for training, reducing the risk of structural breakage and oversuppression due to missing labels, and improving the continuity and detail preservation of the main structure after artifact removal from photoacoustic B-scan images.
[0032] 5. Construction of the composite loss function. The composite loss function includes at least the weighted pixel difference loss, structural similarity constraint term, principal structure fidelity constraint term, deep artifact suppression term, out-of-band artifact suppression term, and out-of-band TopK anomaly response suppression term. The weighted pixel difference loss is used to constrain the difference between the predicted image and the completed reference label image, and differentially weights the foreground and background regions. The expression is: ; in, This represents the pixel difference term in the foreground region. This represents the background region pixel difference term combined with depth weights. This represents the weighting coefficient for the background area.
[0033] The deep artifact suppression term is used to suppress trailing and ringing remnants in deep regions following the main structure. Its expression is: ; in, This is the normalization factor.
[0034] The out-of-band artifact suppression term is used to suppress anomalous responses in the background region outside the main structure preservation band, with a stronger penalty for distances from the main structure. The expression is: ; in, This indicates selecting the maximum. One response value, This represents the exponential enhancement index.
[0035] The out-of-band TopK anomaly response suppression term is used to penalize a small number of strong out-of-band artifacts. Preferably, the maximum k values of the out-of-band background response at each horizontal position are selected, power-wise enhanced, and then the average is calculated as the loss term. Specifically, the calculation process of the out-of-band TopK anomaly response suppression term includes: obtaining the pixel values of the predicted image at positions outside the main structure preservation mask and belonging to the background region, and representing the out-of-band background response as a depth-varying sequence according to the horizontal position, as expressed by: ; in, This represents the predicted pixel value at the depth index y and the horizontal index x in the image. This indicates that the main structure retains the mask. This represents a background region mask. Then, the sequence... The top k values along the depth direction are selected as the TopK anomaly responses, denoted as . The average of the TopK outlier responses after exponential enhancement is used as the out-of-band TopK outlier response suppression term, and the expression is: ; in, The number of maximum values selected. To enhance the exponent by power, To perform mean calculation on the horizontal positions; in this embodiment The preferred value is 6, power exponent. The preferred value is 2. By focusing on penalizing the maximum out-of-band anomaly response, the suppression effect on artifacts such as strong stripes, strong trailing, and strong ringing is improved, and the impact of a small amount of residual strong artifacts on the overall image quality is reduced.
[0036] The principal structure fidelity constraint term is used to constrain the difference between the predicted image and the original photoacoustic B-scan image within the principal structure preservation band, and assigns higher weights to strong response structures in the original image. The expression is: ; in, To predict the pixel value at the depth index y and horizontal index x in an image. These are the normalized pixel values of the original photoacoustic B-scan image. The mask is retained in the main structure. To prevent extremely small positive numbers with a denominator of zero.
[0037] The structural similarity constraint term is used to constrain the consistency of the predicted image and the reference label image in terms of local structure. The structural similarity constraint term is added to the composite loss function with a penalty term equal to or less than the structural similarity index, and its expression is: ; in, The reference label image used in training, This is a structural similarity index. By introducing a master structure fidelity constraint term and a structural similarity constraint term, artifact suppression is enhanced while reducing the loss of structural details caused by over-smoothing. The final composite loss function expression is as follows: ; in, to These are the weighting coefficients for each loss term. This composite loss function, while maintaining the continuity of the main structure and boundary information, can achieve joint suppression of deep artifacts, out-of-band artifacts, and strong anomaly responses.
[0038] Finally, after calculating the composite loss, the network parameters are updated via backpropagation until the training epochs or convergence criteria are met. Preferably, the optimizer is Adam, and the initial learning rate is preferably 1×10⁻⁶. -4 The preferred number of training rounds is 80, and the preferred batch size is 8.
[0039] like Figure 3 As shown, in the specific implementation process, step 500 normalizes the photoacoustic B-scan image to be processed in the same way as in the model training stage to obtain the input image, and inputs it into the trained ResUNet network model to obtain a predicted image of the same size as the input. The predicted image is then output as the photoacoustic B-scan image after artifact removal, and used as the input optimization data for image reconstruction. It is also used for imaging display and subsequent quantitative analysis processing, thereby improving the contrast, structural continuity and interpretability of the photoacoustic B-scan image.
[0040] The beneficial effects of this invention are as follows: 1) Based on deep learning, end-to-end artifact removal of photoacoustic B-scan images was achieved, effectively suppressing various superimposed artifacts such as stripes, trailing, and ringing caused by factors such as limited transducer bandwidth, system impulse response tailing, multi-interface reflection, acoustic multipath propagation, and coupling state fluctuations in photoacoustic imaging. At the same time, through core designs such as main structure preservation and multi-dimensional fidelity constraints, the problems of weakened real structure, blurred boundaries, loss of details, and structural breakage that are prone to occur in traditional methods are avoided. The tissue boundaries, continuity, and texture information are fully preserved, which greatly improves the interpretability and quantitative analysis reliability of photoacoustic B-scan images. 2) The ResUNet encoder-decoder architecture with residual convolutional blocks is adopted. The residual connection structure solves the gradient vanishing problem in deep networks, enhances feature transfer capability, and improves training stability. Multi-scale semantic features are extracted by progressive downsampling, and combined with transposed convolutional upsampling and skip connections of the corresponding layers of the encoder, global feature capture of different artifact shapes is achieved, and image detail information is accurately compensated. The final output is a high-resolution artifact suppression result of the same size as the input, which takes into account both the accuracy of artifact recognition and the restoration of image details. 3) Based on the reference label, the depth of the main structure at each horizontal position is adaptively determined. After smoothing by a sliding window, a main structure preservation band and a corresponding mask are constructed, accurately locking the core structure region of the tissue. At the same time, two types of differentiated weights are constructed: one is the out-of-band distance increasing weight, which increases the penalty for areas outside the main structure preservation band as the distance to the main structure increases, specifically suppressing background stripes and clutter artifacts; the other is the depth-weighted weight, which gradually increases the suppression intensity for the deep regions of the main structure, enhancing the suppression effect of deep trailing and ringing artifacts. Differentiated and precise suppression of artifacts at different regions and depths is achieved, solving the problem that traditional methods cannot meet the needs of artifact suppression in multiple regions, and significantly improving the overall image contrast. 4) To address the issues of local missing and discontinuous training labels, adaptive incomplete is performed on label missing regions below a threshold within the main structure preservation band, filling label holes with original image information; and the main structure position and region weights are determined a second time based on the incomplete labels, avoiding network learning bias, oversuppression of structure and breakage caused by label defects, and further improving the main structure continuity and detail preservation ability of the image after artifact removal. 5) A composite loss function was constructed, integrating weighted pixel difference loss, structural similarity constraint, main structure fidelity constraint, deep artifact suppression, out-of-band artifact suppression, and out-of-band TopK anomaly response suppression. The out-of-band TopK anomaly response suppression term penalizes a small number of strong out-of-band artifacts, solving the problem of persistent strong artifacts. The main structure fidelity constraint assigns higher weights to strong response signals in core structural regions, enhancing structural fidelity. The structural similarity constraint ensures the consistency of local structure between the predicted image and the reference label, avoiding excessive smoothing. This achieves multi-objective collaborative optimization of artifact suppression, structural fidelity, and detail preservation, comprehensively improving image quality. 6) A data augmentation strategy was designed that maintains the depth dimension unchanged and only performs random lateral cropping and horizontal flipping. This effectively improves the model's adaptability and generalization ability to different lateral fields of view, structural shapes, and acquisition conditions without destroying the physical meaning of the depth direction of the photoacoustic image. At the same time, the Adam optimizer, adaptive learning rate decay, and early stopping strategy are adopted to improve the convergence speed and stability of model training and avoid overfitting. Moreover, no manual parameter tuning is required during the inference stage, and it does not rely on specific system models or noise assumptions. It can achieve one-click end-to-end artifact removal, adapt to different photoacoustic imaging systems and biological tissue imaging scenarios, and has excellent engineering practicality and scalability.
[0041] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0042] Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. Furthermore, those skilled in the art will recognize that, based on the ideas of this invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A deep learning ResUNet-based photoacoustic B-scan image artifact removal method, characterized in that, Includes the following steps: The acquired photoacoustic B-scan raw image is subjected to grayscale normalization processing to obtain a normalized input image; The photoacoustic B-scan original image is paired with the reference label image to obtain training samples, and the training samples are divided into training set and validation set; Construct a specific network model; the specific network model includes an encoder and a decoder, the encoder is composed of multiple convolutional blocks and downsampled step by step through max pooling, the decoder is skipped to the encoder and upsampled step by step through transposed convolution; The specific network model is trained using the training samples, and a composite loss function is constructed to supervise learning and backpropagate parameter updates of the specific network model, thereby obtaining a trained specific network model. The trained specific network model is used to remove artifacts from the photoacoustic B-scan image to be processed, resulting in an artifact-free image.
2. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 1, characterized in that, The acquired photoacoustic B-scan raw image is subjected to grayscale normalization processing to obtain a normalized input image. This includes scaling the photoacoustic B-scan raw image by a preset maximum grayscale value, expressed as: ;in, The preset maximum grayscale value. This is the original image from the photoacoustic B-scan.
3. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 1, characterized in that, The photoacoustic B-scan original image is paired with the reference label image to obtain training samples, which are then divided into a training set and a validation set, including: The original photoacoustic B-scan image is paired with the reference label image to form a sample dataset; While keeping the depth dimension constant, random cropping with a fixed width is performed only along the horizontal direction of the sample dataset; The cropped sample dataset is horizontally flipped according to a preset probability to obtain the training samples.
4. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 1, characterized in that, The encoder includes a first coding layer, a second coding layer, and a third coding layer, which transform the number of feature channels of the input image to 32, 64, and 128, respectively. The decoder includes a first upsampling layer, a second upsampling layer, and a third upsampling layer, which upsample the output features of their respective coding layers level by level, and concatenate the upsampled features with the output features of their corresponding coding layers. The concatenated features are then input into the convolutional block for convolutional fusion. The expression for the convolutional fusion is: ;in For the input feature map, This is a feature transformation consisting of convolution and batch normalization. It is a non-linear activation function. This is for outputting feature maps.
5. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 1, characterized in that, The specific network model is trained using the training samples, and a composite loss function is constructed to perform supervised learning and backpropagation parameter updates on the specific network model to obtain a trained specific network model, including: The main structure position of the specific network model is adaptively determined based on the reference label image; Pixel expansion is performed based on the main structure position to obtain the main structure retention band and generate the main structure retention mask; Based on the main structure retention band and the main structure retention mask, construct out-of-band weights and depth weights; Within the main structure retention band, the reference label image is updated with label pixels to obtain a complete label; The composite loss function is constructed based on the weighted pixel difference loss, structural similarity constraint, main structure fidelity constraint, deep artifact suppression, out-of-band artifact suppression, and out-of-band TopK anomaly response suppression. The specific network model is then backpropagated through the composite loss function to obtain the trained specific network model.
6. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 5, characterized in that, Adaptive determination of the principal structure position of the specific network model based on the reference label image includes: searching for the depth index corresponding to the maximum response value along the depth direction at each horizontal position of the reference label image, and using the depth index as the principal structure position, expressed as: ;in, The reference label image contains the pixel value at the depth index y and the horizontal index x. This represents the position of the main structure when the horizontal position is x.
7. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 5, characterized in that, Pixel expansion is performed based on the main structure position to obtain the main structure retention band and generate the main structure retention mask, including: The position of the main structure is smoothed laterally using the sliding window mean method to obtain a smoothed position; the expression for the smoothed position is: ;in, To smooth out half the width of the window, Main structural position, For integer operations; Centered on the smooth position, a preset number of pixels are extended in both the shallow and deep directions to obtain the main structure retention band and generate the main structure retention mask, as expressed by: ;in, and These represent the number of extended pixels in the shallow and deep directions of the main structure retention band, respectively. The mask is retained for the main structure.
8. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 7, characterized in that, Based on the main structure retention band and the main structure retention mask, out-of-band weights and depth weights are constructed, including: The out-of-band distance is determined based on the smoothing position; the expression for the out-of-band distance is: ; The out-of-band weights are determined based on the main structure retention mask and the out-of-band distance; the expression for the out-of-band weights is: ;in, The maximum value of the out-of-band weight. This represents the transition length where the weight increases with distance. This is a truncation function that restricts the input to the range of 0 to 1.
9. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 8, characterized in that, Based on the main structure retention band and the main structure retention mask, out-of-band weights and depth weights are constructed, and the method further includes: Based on the position of the main structure, the starting position is obtained by shifting a preset pixel interval along the depth direction into the deeper layers. Based on the starting position, the foreground weight is transitioned within a preset transition length range to obtain the depth weight; the expression for the depth weight is: ;in, Weights for shallow regions, Weights for deeper regions, The length of the weight transition, A truncation function that restricts the input to the range of 0 to 1. This is the starting depth index when the horizontal position is x; Based on the starting position, a deep suppression mask is generated in a deep region exceeding the preset transition length; the expression for the deep suppression mask is: ;in, This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise.
10. The photoacoustic B-scan image artifact removal method based on deep learning ResUNet according to claim 5, characterized in that, The expression for the out-of-band TopK anomaly response suppression term is: ;in, The number of maximum values selected. To enhance the exponent by power, To calculate the average value of the horizontal positions; The expression for the main structure fidelity constraint term is: ;in, To predict the pixel value at the depth index y and horizontal index x in an image. These are the normalized pixel values of the original photoacoustic B-scan image. The mask is retained in the main structure. To prevent extremely small positive numbers with a denominator of zero; The expression for the structural similarity constraint term is: ;in, The reference label image used in training, It is a structural similarity index.
