Breast ultrasonic image processing method and device, terminal, medium and program product

By integrating the EfficientViT encoder, U-Net decoder, and CBAM attention module, and combining a specific loss function, the problems of low contrast and strong noise interference in breast ultrasound images are solved, achieving high-precision breast tumor region segmentation, which is suitable for real-time applications on resource-constrained devices.

CN120976539APending Publication Date: 2025-11-18XINJIANG CHANGSEN DATA TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511081401.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Breast ultrasound images suffer from low contrast, strong noise interference, and blurred tissue structures, which increases the difficulty of subsequent use, especially in terms of tumor boundary identification and diagnostic accuracy.

Method used

A breast tumor region segmentation model was constructed using an EfficientViT encoder, a symmetric U-Net decoder, and a CBAM attention enhancement module, combined with Focal Tversky loss function and boundary loss function. Through data preprocessing and model training optimization, high-precision breast tumor region segmentation was achieved.

Benefits of technology

It improves the accuracy and stability of breast tumor region segmentation, is suitable for resource-constrained terminal equipment, and meets the real-time and precision requirements of early breast cancer screening.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976539A_ABST
    Figure CN120976539A_ABST
Patent Text Reader

Abstract

The invention discloses a breast ultrasound image processing method and device, a terminal, a storage medium and a computer program product, and the method comprises the steps: carrying out the data preprocessing of a breast ultrasound image sub-data set, obtaining a breast ultrasound image sample, and dividing the breast ultrasound image sample into a training set and a test set; the method comprises the following steps: constructing a segmentation network model by fusing an OfficientViT encoder, a symmetric U-Net decoder and a CBAM attention enhancement module, and designing a joint loss function; based on the joint loss function, training the segmentation network model by using the training set to obtain a segmentation network training model; and testing the segmentation network training model by using the test set, and optimizing the segmentation network training model according to a test result to obtain a breast tumor region segmentation model. According to the scheme, the breast tumor region segmentation model is set by fusing the codec, the CBAM attention enhancement module and the joint loss function, and the breast tumor region can be accurately segmented from the breast ultrasound image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computers, and particularly relates to a breast ultrasound image processing method and device, a terminal, a storage medium and a computer program product, and especially relates to a breast ultrasound image tumor segmentation method and device based on EfficientViT-Unet, a terminal, a storage medium and a computer program product. BACKGROUND

[0002] Breast cancer is one of the malignant tumors with the highest incidence rate among women worldwide, and early detection and accurate diagnosis are of great significance for reducing its mortality rate. Ultrasound imaging has become an important means for breast tumor screening and diagnosis due to its non-invasive, safe, real-time, low-cost and other advantages. However, traditional breast ultrasound images generally have low contrast, strong noise interference and blurred tissue structure, which increases the difficulty of subsequent use.

[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0004] The present application aims to provide a breast ultrasound image processing method and device, a terminal, a storage medium and a computer program product to solve the problems of low contrast, strong noise interference and blurred tissue structure in breast ultrasound images, and to increase the difficulty of subsequent use. The breast tumor region segmentation model is set by fusing the EfficientViT encoder, the symmetrical U-Net decoder, the CBAM attention enhancement module and the joint loss function, which can segment the breast tumor region from the breast ultrasound image and has good accuracy.

[0005] The application provides a breast ultrasound image processing method, comprising: acquiring a breast ultrasound image dataset, and acquiring a breast ultrasound image sub-dataset containing a breast tumor region from the breast ultrasound image dataset; performing data preprocessing on the breast ultrasound image sub-dataset to obtain a breast ultrasound image sample; dividing the breast ultrasound image sample into a training set and a test set; fusing an EfficientViT encoder, a symmetrical U-Net decoder, and a CBAM attention enhancement module to build a segmentation network model; designing a joint loss function; training the segmentation network model based on the joint loss function using the training set to obtain a segmentation network training model; testing the segmentation network training model using the test set to obtain a test result of the segmentation network training model; optimizing the segmentation network training model according to the test result of the segmentation network training model to obtain a segmentation network optimization model as a required breast tumor region segmentation model for segmenting a breast tumor region from a breast ultrasound image.

[0006] In some embodiments, the data preprocessing of the breast ultrasound image sub-dataset to obtain the breast ultrasound image sample comprises: extracting the original image and the corresponding mask label of each breast ultrasound image in the breast ultrasound image sub-dataset; performing preset standardization processing and preset data enhancement processing on the original image and the corresponding mask label of each breast ultrasound image to obtain a preprocessed image of each breast ultrasound image; and in this way, the preprocessed images of all breast ultrasound images in the breast ultrasound image sub-dataset are obtained as the breast ultrasound image sample.

[0007] In some embodiments, the segmentation network model is built by fusing the EfficientViT encoder, the symmetrical U-Net decoder, and the CBAM attention enhancement module, comprising: setting the main architecture of the segmentation network model, wherein the input is a single-channel breast ultrasound image conforming to a preset size, and the output is a binary segmentation mask image with the same size as the input; building an encoder module using the EfficientViT module; building a decoder module using the U-Net symmetrical decoding structure and introducing the CBAM attention enhancement module; based on the main architecture, building an EfficientViT-UNet network structure using the built encoder module and decoder module as the segmentation network model.

[0008] In some implementations, the encoder module is constructed using the EfficientViT module, including: constructing the encoder module based on lightweight convolution and local-global hybrid attention mechanism using the EfficientViT module; the constructed encoder module includes: two or more coding blocks; each coding block includes: a lightweight convolution module, a parallel attention mechanism, and a local-global feature fusion module;

[0009] And / or, a U-Net symmetric decoding structure is adopted, and a CBAM attention enhancement module is introduced to build a decoder module, including: adopting a symmetric U-Net decoding structure, wherein each level upsampling module gradually restores the spatial resolution through upsampling, and uses a convolution of preset specifications to align the channel number of the feature map; after each level upsampling gradually restores the spatial resolution, the corresponding level of enhanced feature map is added for fusion, and the fusion method is a residual connection structure; and the CBAM attention enhancement module is embedded after the output of each level feature map.

[0010] In some implementations, the joint loss function is designed by weighting the Focal Tversky loss function and the boundary loss impairment function to form the joint loss function; the expression of the joint loss function is as follows:

[0011] L total =λ1·L FTL +λ2·L boundary ;

[0012] Among them, L total L represents the joint loss function. FTL Let L represent the Focal Tversky loss function. boundary Let λ1 represent the boundary loss function, λ2 represent the weight coefficient of the Focal Tversky loss function in the joint loss function, and λ2 represent the weight coefficient of the boundary loss function in the joint loss function, satisfying λ1+λ2=1.

[0013] In some implementations, the segmentation network model is trained using the training set based on the joint loss function to obtain a segmentation network training model, including: training the segmentation network end-to-end using the AdamW optimizer based on the joint loss function; training the segmentation network model using the training set; monitoring the mIoU and Dice coefficients on the validation set as performance evaluation metrics during training at a preset initial learning rate; and saving the optimal model parameters after the performance evaluation metrics converge; thereby obtaining the segmentation network training model.

[0014] In conjunction with the above method, another aspect of the present invention provides a breast ultrasound image processing apparatus, comprising: an acquisition unit configured to acquire a breast ultrasound image dataset and acquire a breast ultrasound image subset containing a breast tumor region from the breast ultrasound image dataset; a control unit configured to preprocess the breast ultrasound image subset to obtain breast ultrasound image samples; and to divide the breast ultrasound image samples into a training set and a test set; the control unit is further configured to fuse an EfficientViT encoder, a symmetric U-Net decoder, and a CBAM attention enhancement module to construct a segmentation... The control unit is configured to train the segmentation network model using the training set based on the joint loss function to obtain a segmentation network training model; the control unit is also configured to test the segmentation network training model using the test set to obtain test results of the segmentation network training model; the control unit is further configured to optimize the segmentation network training model based on the test results of the segmentation network training model to obtain an optimized segmentation network model, which serves as the required breast tumor region segmentation model for segmenting breast tumor regions from breast ultrasound images.

[0015] In conjunction with the above-described device, the present invention further provides a terminal comprising: the breast ultrasound image processing device described above.

[0016] In conjunction with the above method, the present invention further provides a storage medium comprising a stored program, wherein, when the program is executed, the device on which the storage medium is located executes the above-described method for processing breast ultrasound images.

[0017] Therefore, the solution of this invention, for a breast ultrasound image dataset, acquires breast ultrasound images containing breast tumor regions and performs data preprocessing to obtain breast ultrasound image samples, dividing the breast ultrasound image samples into training and testing sets; an encoder module is built using an EfficientViT module, and a decoder module is built using a U-Net symmetric decoding structure + CBAM attention enhancement module; based on the constructed encoder and decoder modules, a segmentation network model fusing the EfficientViT encoder and U-Net decoder is constructed; Focal Tversky Loss and Boundary... Loss fusion is used to design a joint loss function. Based on the joint loss function, the segmentation network model is trained using the training set and then tested using the test set. The trained segmentation network model is then optimized based on the test results. The optimized segmentation network model is used as the required breast tumor region segmentation model to segment breast tumor regions from breast ultrasound images. Thus, by fusing the EfficientViT encoder, symmetric U-Net decoder, CBAM attention enhancement module, and joint loss function to set up a breast tumor region segmentation model, it is possible to segment breast tumor regions from breast ultrasound images with good accuracy.

[0018] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention.

[0019] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0020] Figure 1 This is a schematic flowchart of an embodiment of the breast ultrasound image processing method of the present invention;

[0021] Figure 2 This is a flowchart illustrating an embodiment of the method of the present invention for preprocessing the breast ultrasound image subset.

[0022] Figure 3 This is a flowchart illustrating an embodiment of the method of the present invention that integrates an EfficientViT encoder, a symmetric U-Net decoder, and a CBAM attention enhancement module;

[0023] Figure 4 This is a flowchart illustrating an embodiment of the method for constructing a decoder module in the present invention;

[0024] Figure 5 This is a flowchart illustrating an embodiment of the method of the present invention for training the segmentation network model using the training set;

[0025] Figure 6 This is a schematic diagram of an embodiment of the breast ultrasound image processing device of the present invention;

[0026] Figure 7 This is a flowchart illustrating a breast tumor ultrasound image segmentation method based on EfficientViT-UNet according to the present invention.

[0027] Figure 8 This is a schematic diagram of the overall process of a breast tumor ultrasound image segmentation method based on EfficientViT-UNet according to the present invention.

[0028] Figure 9 This is a schematic diagram of the structure of the EfficientViT-UNet network used in this invention;

[0029] Figure 10 This is a schematic diagram of the EfficientViT network structure;

[0030] Figure 11 This is a schematic diagram of the joint loss function, which can show the combination of Focal Tversky loss and boundary loss.

[0031] Referring to the accompanying drawings, the reference numerals in the embodiments of the present invention are as follows:

[0032] 102 - Acquisition unit; 104 - Control unit. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0034] Given that breast ultrasound images suffer from low contrast, strong noise interference, and blurred tissue structures, their subsequent use becomes more difficult. Specifically, traditional breast ultrasound images commonly suffer from low contrast, strong noise interference, and blurred tissue structures, making the diagnostic process largely reliant on the physician's subjective judgment. This can easily lead to unclear tumor boundaries and inconsistent judgments from one person to another, thus affecting the accuracy and consistency of the diagnosis. In other words, due to the low contrast, strong noise interference, and blurred tissue structures in breast ultrasound images, the screening and diagnosis of breast tumors based on breast ultrasound images largely depend on the physician's subjective judgment, and accuracy cannot be guaranteed.

[0035] In recent years, deep learning has made significant progress in the field of medical image segmentation. Among them, the U-Net architecture based on convolutional neural networks (CNNs) has been widely used in foreground region extraction tasks of various medical images. However, U-Net suffers from limited expressive power and excessive focus on local features when dealing with structurally complex, multi-scale tumors, making it difficult to effectively capture long-distance dependency information. As a result, there is still room for improvement in the segmentation accuracy of tumor boundaries.

[0036] To address the aforementioned issues, the Transformer model, with its excellent global modeling capabilities, has been introduced into the field of medical image processing. However, its original architecture suffers from high computational cost and a large number of parameters, making it unsuitable for resource-intensive terminal deployment scenarios. Meanwhile, lightweight convolution and hybrid attention mechanisms have become important directions in current model architecture design. Existing research has attempted to combine lightweight convolution with ViT modules to form the EfficientViT structure, which significantly improves the model's robustness in complex contexts by introducing local-global hybrid attention to enhance feature representation capabilities.

[0037] However, existing image segmentation methods based on EfficientViT are mostly limited to natural images, lacking structural adaptation and training strategy optimization for breast tumor ultrasound images. Especially when dealing with medical image characteristics such as blurred tumor boundaries, uneven grayscale distribution, and extreme foreground-background imbalance, they still suffer from insufficient generalization ability and large boundary errors, failing to meet the dual requirements of accuracy and real-time performance in practical clinical applications. Therefore, there is an urgent need to propose a breast tumor ultrasound image segmentation method that combines lightweight modeling, efficient feature representation, and boundary awareness capabilities. This method should ensure segmentation accuracy while also considering terminal deployment requirements, providing more intelligent and practical technical support for early breast cancer screening.

[0038] Therefore, the present invention proposes a method for processing breast ultrasound images, specifically a breast ultrasound image tumor segmentation method based on EfficientViT-Unet. By fusing a lightweight convolutional structure, an efficient visual Transformer module, and a boundary-aware loss function, it achieves high-precision automatic segmentation of breast tumor regions. At the same time, it takes into account the real-time and lightweight requirements of terminal deployment, thereby reducing the difficulty of subsequent use of breast ultrasound images, which suffer from low contrast, strong noise interference, and blurred tissue structures. Specifically, it ensures the accuracy of segmentation of breast tumor regions.

[0039] According to embodiments of the present invention, a method for processing breast ultrasound images is provided, such as... Figure 1 The diagram shows a flowchart of an embodiment of the method of the present invention. The method for processing breast ultrasound images may include steps S110 to S160.

[0040] In step S110, a breast ultrasound image dataset is obtained, and a breast ultrasound image subset containing breast tumor regions is obtained from the breast ultrasound image dataset.

[0041] In step S120, the breast ultrasound image subset is preprocessed to obtain breast ultrasound image samples; the breast ultrasound image samples are then divided into a training set and a test set.

[0042] In step S130, the EfficientViT encoder, the symmetric U-Net decoder, and the CBAM attention enhancement module are fused to build a segmentation network model; and a joint loss function is designed. The constructed segmentation network model is like the EfficientViT-UNet model, and the designed joint loss function is like the joint loss function L. total Loss of L by FocalTversky FTL With boundary loss L boundary Weighted composition.

[0043] In step S140, the segmentation network model is trained using the training set based on the joint loss function to obtain the segmentation network training model.

[0044] In step S150, the segmentation network training model is tested using the test set to obtain the test results of the segmentation network training model.

[0045] In step S160, the segmentation network training model is optimized based on the test results of the segmentation network training model to obtain an optimized segmentation network model, which serves as the required breast tumor region segmentation model for segmenting breast tumor regions from breast ultrasound images.

[0046] This invention relates to the field of artificial intelligence and addresses the problems of low contrast, strong noise interference, and blurred tissue structure in breast ultrasound images, which increase the difficulty of subsequent use. To overcome the shortcomings of existing breast ultrasound image segmentation methods, such as weak feature extraction capabilities, inaccurate boundary localization, and difficulty in deploying models on resource-constrained devices, this invention proposes a breast tumor ultrasound image segmentation scheme based on EfficientViT-UNet. The scheme mainly includes: introducing an EfficientViT encoder based on lightweight convolution and a local-global hybrid attention mechanism, significantly reducing the number of model parameters and computational complexity, balancing model inference efficiency and embedded deployment capabilities, and making it suitable for resource-constrained devices such as Jetson Nano; integrating a CBAM attention module into the decoder, effectively improving the model's response to tumor regions with low contrast and blurred boundaries, thereby enhancing the accuracy and stability of boundary recognition; achieving multi-scale semantic information fusion through skip connections, enabling deep semantics and shallow texture to be modeled collaboratively, enhancing the model's ability to express tumor targets of different shapes and sizes; and further strengthening the expression of edge continuity while optimizing overall segmentation performance, effectively improving boundary prediction accuracy.

[0047] In some embodiments, the specific process of preprocessing the breast ultrasound image subset in step S120 to obtain breast ultrasound image samples is described in the following exemplary description.

[0048] The following is combined with Figure 2 The diagram illustrates an embodiment of the method of the present invention for data preprocessing of the breast ultrasound image subset, further illustrating the specific process of data preprocessing of the breast ultrasound image subset in step S120, including steps S210 to S230.

[0049] Step S210: For each breast ultrasound image in the breast ultrasound image subset, extract the original image of each breast ultrasound image and its corresponding mask label.

[0050] Step S220: Perform preset standardization and preset data augmentation on the original image and its corresponding mask label of each breast ultrasound image to obtain the preprocessed image of each breast ultrasound image.

[0051] Step S230: In this way, preprocessed images of all breast ultrasound images in the breast ultrasound image subset are obtained as breast ultrasound image samples.

[0052] Figure 7 This is a schematic flowchart of a breast tumor ultrasound image segmentation method based on EfficientViT-UNet according to the present invention.Figure 7 As shown, a breast tumor ultrasound image segmentation method based on EfficientViT-UNet includes the following steps: S11, data preprocessing step: the breast ultrasound image and its mask label are standardized and enhanced. The enhancement preprocessing includes operations such as size scaling, normalization, rotation, flipping and noise perturbation. Finally, the image input size is unified to 320×320, that is, the image size is uniformly adjusted to 320×320 to improve the generalization ability and robustness of the model.

[0053] In this invention, the "mask label" refers to a pixel-level region annotation image corresponding to a breast ultrasound image. This image is obtained by experienced medical imaging experts using the professional annotation tool Labelme to delineate the tumor region frame by frame. The label image is a binary image, with a foreground (tumor region) pixel value of 1 and a background value of 0, serving as a supervisory signal to guide model learning. Regarding the unit "320×320" for the image input size: this size refers to the pixel size of the image during the model input stage, not the physical size (e.g., millimeters). Standardizing the image size to 320×320 pixels is a common preprocessing step in deep learning, aiming to standardize the input, adapt to the network structure, and improve training stability and model generalization ability.

[0054] Figure 8 This is a schematic diagram illustrating the overall process of a breast tumor ultrasound image segmentation method based on EfficientViT-UNet according to the present invention. Figure 8 As shown, a breast tumor ultrasound image segmentation method based on EfficientViT-UNet includes the following steps: S1, standardizing and data augmenting the original images and their corresponding mask labels in the breast ultrasound image dataset. Augmentation methods include size scaling, normalization, random rotation, horizontal flipping, and Gaussian noise perturbation. The augmented images are uniformly adjusted to an input size of 320×320 to adapt to the model training input requirements.

[0055] In the present invention, the breast ultrasound image subset is preprocessed to obtain more accurate breast ultrasound image samples, and then a breast tumor region segmentation model is trained based on the breast ultrasound image samples, which helps to improve the generalization ability and robustness of the breast tumor region segmentation model.

[0056] In some implementations, the specific process of integrating the EfficientViT encoder, the symmetric U-Net decoder, and the CBAM attention enhancement module in step S130 to build the segmentation network model is described in the following exemplary description.

[0057] The following is combined with Figure 3The flowchart shown is a schematic diagram of an embodiment of the method of the present invention that integrates the EfficientViT encoder, the symmetric U-Net decoder, and the CBAM attention enhancement module. It further illustrates the specific process of integrating the EfficientViT encoder, the symmetric U-Net decoder, and the CBAM attention enhancement module in step S130, including steps S310 to S340.

[0058] Step S310: Set the main architecture of the segmentation network model: the input is a single-channel breast ultrasound image of a preset size, and the output is a binary segmentation mask of the same size as the input.

[0059] Step S320: Use the EfficientViT module to build the encoder module.

[0060] In step S330, a U-Net symmetric decoding structure is adopted, and a CBAM attention enhancement module is introduced to build the decoder module.

[0061] Step S340: Based on the main architecture, the EfficientViT-UNet network structure is constructed using the encoder module and decoder module obtained from the construction, as the segmentation network model.

[0062] like Figure 7 As shown, a breast tumor ultrasound image segmentation method based on EfficientViT-UNet further includes the following steps: S12, Segmentation network construction step: Constructing a segmentation network model that integrates an EfficientViT encoder and a U-Net decoder, specifically, constructing a breast tumor ultrasound image segmentation model that integrates an EfficientViT encoder and a symmetrical U-Net decoder, which has the characteristics of lightweight structure, high segmentation accuracy, and strong adaptability to terminal deployment. U-Net is an end-to-end image segmentation model based on a convolutional neural network (CNN), whose main feature is its symmetrical encoder-decoder structure. The overall breast tumor ultrasound image segmentation model adopts an end-to-end architecture of "encoding-fusion-decoding", and the network construction specifically includes the following steps:

[0063] (1) Definition of the overall network framework:

[0064] The main architecture of the model is defined on the PyTorch platform. The input is a single-channel breast ultrasound image with a size of 320×320, and the output is a binary segmentation mask with the same size as the input. The network consists of an encoder module, a decoder module, and a fusion enhancement module.

[0065] (2) Encoder module construction (EfficientViT backbone): The encoder adopts the EfficientViT module to extract multi-scale features {F1,F2,F3,F4}. The encoder module includes lightweight convolutional blocks, lightweight attention mechanism and local-global feature fusion structure.

[0066] The EfficientViT architecture is used as the encoder, which consists of four stages, corresponding to different spatial resolutions (160×160, 80×80, 40×40, and 20×20) and number of channels. Each stage consists of a lightweight MobileInverted Bottleneck (MBConv) structure and a local-global hybrid attention module, used to extract multi-scale semantic features of the image.

[0067] The intermediate features output by the encoder are stored sequentially in the skip connection for subsequent fusion by the decoder, forming an efficient feature alignment path.

[0068] (3) Decoder module construction (U-Net symmetric decoding structure + CBAM attention enhancement): The decoder is a symmetric U-Net structure with residual connections. It achieves high-resolution segmentation output by upsampling step by step and fusing encoder features.

[0069] The decoder structure is symmetrical to the encoder and includes four upsampling stages. After each upsampling stage, a convolutional attention module (CBAM) is introduced to calculate channel and spatial attention weights, enhancing the responsiveness of the fused features to the target region. Each stage of the decoder includes:

[0070] Upsampling operation: interpolation or deconvolution operation is performed on low-resolution feature maps to restore spatial resolution;

[0071] Feature fusion operation: concatenate with the skip features of the corresponding encoder;

[0072] Convolution extraction module: The fused features are fed into two consecutive 3×3 convolution + BN + ReLU activation structures;

[0073] Attention Enhancement Module: The fused features are further processed by the CBAM module to calculate channel attention and spatial attention respectively, and the weighted results are fed back to the current layer to enhance the model's response to key regions (such as tumor boundaries and low-contrast regions).

[0074] The final output features are compressed by a 1×1 convolution and then activated by a Sigmoid activation function to generate a probability map for each pixel. Subsequently, a threshold is set to convert it into a binary segmentation mask to represent the classification results of the breast tumor region and the background.

[0075] This invention proposes a breast tumor ultrasound image segmentation scheme based on EfficientViT-UNet, which mainly includes: a) acquiring an ultrasound image dataset containing breast tumor region annotations; b) performing image size normalization, grayscale normalization, and data augmentation processing; c) constructing an EfficientViT-UNet network structure, using an EfficientViT encoder for efficient feature extraction, combined with a symmetric U-Net decoder, and introducing residual connections to enhance feature recovery capabilities; d) embedding a CBAM attention module in the decoder to improve the perception and recognition of tumor boundaries; e) designing a joint loss function, fusing Focal Tversky Loss and Boundary Loss to optimize boundary detail representation and segmentation performance for difficult samples; f) training the model, which, after training, can input a test image and output a tumor segmentation mask of the same size as the original image. Here, breast tumor region annotation refers to the pixel-level contour delineation of the tumor region in the breast ultrasound image by professional medical personnel, generating a mask image corresponding one-to-one with the breast ultrasound image, used for supervised learning in the image segmentation task. The annotation process was completed by ultrasound or radiologists with extensive experience in breast pathology diagnosis. The tumor boundaries were meticulously delineated frame-by-frame using the medical image annotation tool labelme, and the annotations were cross-reviewed by multiple experts to ensure accuracy and consistency. Thus, by integrating a lightweight convolutional structure, an efficient visual Transformer module, and a boundary-aware loss function, high-precision automatic segmentation of breast tumor regions is achieved. This also takes into account the real-time and lightweight requirements of terminal deployment, reducing the difficulty of subsequent use by addressing issues such as low contrast, strong noise interference, and blurred tissue structures in breast ultrasound images, specifically ensuring the accuracy of breast tumor region segmentation.

[0076] In some implementations, step S320 involves constructing an encoder module using the EfficientViT module, including: constructing the encoder module based on lightweight convolution and a local-global hybrid attention mechanism using the EfficientViT module; the constructed encoder module includes two or more encoding blocks; each encoding block includes a lightweight convolution module, a parallel attention mechanism, and a local-global feature fusion module. That is, in step S320, the encoder module is constructed using the EfficientViT architecture, and the encoder module includes two or more encoding blocks, each encoding block consisting of a lightweight convolution module, a parallel attention mechanism, and a local-global fusion module. In the solution of this invention, the "encoder module" is designed based on the EfficientViT architecture, and its core idea is to combine lightweight convolution and a local-global hybrid attention mechanism to improve the model's expressive power and computational efficiency. In implementations, the encoder module is composed of two or more stacked encoder blocks. Each coding block has a fixed internal structure, including: a lightweight convolutional module for local feature extraction (e.g., using a Mobile Inverted Bottleneck structure); a parallel attention mechanism module for capturing important features in the channel and spatial domains; and a local-global feature fusion module for integrating local convolutional features with attention outputs to form fused features that enhance expressive power. This structure is part of the EfficientViT coding backbone, with clear connections and reasonable combinations between modules, forming a complete encoder network.

[0077] And / or, in step S330, a U-Net symmetric decoding structure is adopted, and a CBAM attention enhancement module is introduced. For the specific process of building the decoder module, please refer to the following exemplary description.

[0078] The following is combined with Figure 4 The flowchart of an embodiment of the method of the present invention for building a decoder module is shown below. The specific process of building the decoder module in step S330 is further explained, including steps S410 to S420.

[0079] Step S410: A symmetrical U-Net decoding structure is adopted, and each upsampling module gradually restores the spatial resolution through upsampling, and the feature map is aligned with the number of channels using a convolution of a preset specification.

[0080] Step S420: After gradually restoring the spatial resolution through upsampling at each level, the corresponding level of enhanced feature maps are added for fusion, using a residual connection structure; and a CBAM attention enhancement module is embedded after the output of each level of feature map. In this invention, a classic symmetrical decoder structure is adopted, wherein: the decoder gradually restores the spatial resolution reduced in the encoder stage to a higher resolution through multi-level upsampling operations, until it reaches the same size as the input image; the feature map after each level of upsampling is fused with the corresponding level of enhanced feature map from the encoder, ensuring an effective combination of spatial details and semantic information; this method of gradually upsampling to restore spatial resolution conforms to the mainstream U-Net and its variant architecture design specifications and has been verified in multiple medical image segmentation tasks, effectively improving segmentation accuracy and detail restoration capabilities.

[0081] like Figure 8 As shown, a breast tumor ultrasound image segmentation method based on EfficientViT-UNet further includes the following steps:

[0082] S2, Figure 9 This is a schematic diagram of the EfficientViT-UNet network used in this invention. The proposed EfficientViT-UNet is an image segmentation network model specifically designed for breast ultrasound images. It comprises: an EfficientViT encoder: an encoding module combining lightweight convolution and Transformer attention mechanisms, used to extract multi-scale, multi-level depth features from breast ultrasound images; and a U-Net decoder: a classic decoding module that employs layer-by-layer upsampling and skip connections to achieve spatial resolution restoration and detail feature fusion. Figure 9 As shown, the segmentation network in this invention adopts a symmetrical structure of "EfficientViT encoder + U-Net decoder", which mainly includes:

[0083] (1) Encoder section: Figure 10 This is a schematic diagram of the EfficientViT network structure. MBConv (MobileInverted Bottleneck) is an efficient convolutional structure that employs a dilated-depthmiseable convolution-compression design to reduce computational cost while maintaining feature extraction capabilities. Figure 10The diagram illustrates the use of the EfficientViT structure to extract multi-scale features {F1, F2, F3, F4} from an image. Each encoding block consists of a lightweight convolutional module (MBConv), a parallel attention mechanism (including local and global attention branches), and a local-global feature fusion module. In this invention, each encoding block comprises three main parts: the lightweight convolutional module, the parallel attention mechanism, and the local-global feature fusion module. Their relationships are as follows: The lightweight convolutional module (e.g., MBConv) is responsible for extracting local spatial information and detail features of the input features, serving as the basic feature extraction unit of the encoding block; the parallel attention mechanism executes in parallel after the lightweight convolutional module, including local and global attention branches, which are used to capture contextual information at different scales, achieving dynamic weighting of important features; the local-global feature fusion module is responsible for fusing the features output by the lightweight convolutional module with the local and global features obtained by the parallel attention mechanism. This fusion process aims to combine detail and global semantics to improve the overall feature representation capability. In the coding block, the three components form an integrated feature processing flow of "local convolution → parallel attention extraction → fusion enhancement" to jointly improve the model's semantic understanding ability and segmentation performance, which is especially suitable for the task of identifying tumor regions with complex textures and blurred boundaries in breast ultrasound images.

[0084] In this architecture, local branches focus on spatial details, while global branches model long-range dependencies. These two branches are fused through channel concatenation to enhance feature representation. This structure significantly improves the model's representation capabilities in complex breast ultrasound images while maintaining high computational efficiency and low resource consumption, making it suitable for real-time segmentation tasks on embedded devices.

[0085] The EfficientViT encoder, specifically built upon lightweight convolution and a local-global hybrid attention mechanism, includes:

[0086] (11) Use MobileConv instead of standard convolutional blocks to reduce the number of model parameters and computational complexity;

[0087] (12) Introduce local attention and global attention branches in parallel in each Transformer block. The local branch models short-range dependencies, and the global branch aggregates long-range structural information.

[0088] (13) The fusion results are dynamically weighted by learnable weights to enhance feature representation capabilities and improve robustness and generalization in complex ultrasound backgrounds.

[0089] (2) Decoder section: A symmetrical U-Net decoding structure is adopted. Each level gradually restores spatial resolution through upsampling, and 1×1 convolutions are used to align the channel count of the feature maps before fusing them with the corresponding encoder features. To enhance the collaborative expression of high-level semantic information and low-level detail features, a residual connection mechanism is introduced during the fusion process, effectively mitigating feature degradation and improving the decoder's ability to reconstruct target boundaries. Specifically, the decoder uses a symmetrical U-Net structure, and after upsampling at each level, an enhanced feature map F” of the corresponding level is added for fusion. The fusion method is a residual connection structure, and the specific calculation method is as follows:

[0090] D i =Up(D i+1 )+Conv(F″ i (1).

[0091] Among them, D i D represents the output of the i-th layer decoder. i+1 Let F' represent the output of the (i+1)th layer decoder, where Up is the upsampling operation and Conv is a channel-aligned 1×1 convolution. The original input feature map is fused with channel attention and spatial attention element-wise (Hadamard product) to output the enhanced feature F". This step-by-step residual fusion method enhances feature recovery capability, preserves key spatial details, suppresses noise propagation, and improves the accuracy of tumor boundary localization.

[0092] (3) CBAM Attention Enhancement Module: A CBAM (Convolutional Block Attention Module) is embedded after the output of each level of feature map to further enhance feature representation capabilities. This module consists of two parts: a channel attention mechanism and a spatial attention mechanism.

[0093] Channel attention: Global average pooling and max pooling are performed on the input feature map respectively to obtain two one-dimensional channel descriptors. These are then non-linearly transformed and fused using a shared multilayer perceptron (MLP) to generate channel-dimensional attention weights, which are used to dynamically adjust the importance of each channel. Specifically, the channel attention mechanism first performs global average pooling and max pooling on the feature map F to generate two one-dimensional vectors. These vectors are then summed after passing through the MLP and normalized using the sigmoid function to output the channel attention weights M. C (F):

[0094] M C (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))) (2).

[0095] In formula (2) related to the channel attention mechanism in the CBAM module, F: input feature map, usually a three-dimensional tensor with dimensions [C,H,W], where C is the number of channels, and H and W are the height and width of the feature map, respectively. AvgPool(F): global average pooling is performed on the input feature map F, averaging along the spatial dimension (i.e., H×W) for each channel, resulting in a C-dimensional one-dimensional vector representing the average response of each channel. MaxPool(F): global max pooling is performed on the input feature map F, taking the maximum value along the spatial dimension (H×W) for each channel, also resulting in a C-dimensional one-dimensional vector representing the strongest response of each channel. MLP(·): represents a multi-layer perceptron, which usually includes two fully connected layers and an intermediate nonlinear activation function (such as ReLU) used to perform nonlinear transformation on the pooled feature vector. +: Indicates an element-wise addition operation on the two channel descriptors processed by the MLP, fusing the features of the average pooling path and the max pooling path. σ(·): Represents the Sigmoid activation function, used to normalize the fused channel feature values ​​to the [0,1] interval, thereby generating the attention weight for each channel. M C (F): The output channel attention map, with dimensions [C,1,1], represents the importance weight of each channel, which can be used to weight and modulate the channel dimensions of the input feature map F. This mechanism, by fusing information from global averaging and max pooling paths, can effectively capture the importance features of different channels, improving the model's sensitivity and expressive power for target regions (such as breast tumor regions).

[0096] Spatial attention: After channel compression, average pooling and max pooling operations are applied separately. The concatenated maps are then passed through a 7×7 convolutional layer to extract a spatial attention map, which emphasizes the location features of key regions. Specifically, the spatial attention mechanism performs average pooling and max pooling operations on the channel-compressed feature maps, concatenates them, and outputs spatial attention weights M through a 7×7 convolution and a sigmoid function. S (F):

[0097] M S (F)=σ(Conv 7×7 ([AvgPool(F c MaxPool(F) c (3).

[0098] In the expression (3) involving the spatial attention mechanism in the CBAM module, F: input feature map, usually a three-dimensional tensor with dimensions [C,H,W], where C is the number of channels and H and W are the spatial dimensions (height and width). AvgPool(F): performs channel-wise average pooling on the input feature map F along the channel dimension, with an output size of [1,H,W], reflecting the average response of each position in all channels. MaxPool(F): performs channel-wise max pooling on the input feature map F along the channel dimension, with an output size of [1,H,W], reflecting the strongest response of each position in all channels. [·;·]: indicates tensor concatenation operation, where the results of average pooling and max pooling are concatenated along the channel dimension (i.e., the first dimension) to obtain a two-dimensional feature map with a size of [2,H,W]. Conv7×7(·): Represents a 2D convolution operation with a kernel size of 7×7, used for feature extraction from the concatenated feature map. The output size of this convolutional layer is [1,H,W], generating a spatial attention map. σ(·): Represents the Sigmoid activation function, which normalizes each pixel value in the spatial attention map output by the convolution to the [0,1] interval, serving as the importance weight for each spatial location. M S (F): The output spatial attention map, with dimensions [1, H, W], is used to weight the input feature map F in terms of spatial dimensions, emphasizing important spatial regions in the image (such as tumor edges or central regions). This spatial attention mechanism can guide the model to focus on key spatial location features, thereby improving the segmentation model's ability and accuracy in locating breast tumor regions in complex backgrounds.

[0099] The original input feature map is fused with channel attention and spatial attention sequentially through element-wise multiplication (Hadamard product), outputting the enhanced feature F”, achieving cascaded attention modeling of the channel and spatial dimensions. The final enhanced feature F” is represented as:

[0100] F” = M S (M C (F)·F)·(M C (F)·F) (4).

[0101] Regarding the meaning of each symbol in F" in the final enhanced feature representation formula (4) of the CBAM module, the following explanation is given: F: represents the original input feature map; M C (F): Represents the channel attention weights, obtained by applying global average pooling and max pooling to F, transforming it using a shared multilayer perceptron (MLP), and then normalizing it using the sigmoid function; M S(·): Represents the spatial attention weight function, which first compresses the input feature map by channels, then applies average pooling and max pooling, concatenates the features, and generates the result through a 7×7 convolution and the Sigmoid function; ·: Represents element-wise multiplication (Hadamard product), used to weight and enhance the input features; F": Represents the final output feature map after enhancement by the CBAM module. This formula means: First, the original feature map F is multiplied by the channel attention weights M... C (F) Perform element-wise multiplication to obtain the channel enhancement feature M. C (F)·F; then, using this result as input to the spatial attention module, the spatial attention map M is calculated. S (·), and then perform element-wise multiplication again to obtain the final enhanced feature F".

[0102] The EfficientViT-UNet model constructed by the scheme of this invention has significant advantages in terms of structural design, performance and engineering feasibility. By introducing the EfficientViT encoder based on lightweight convolution and a local-global hybrid attention mechanism, the model's parameter count and computational complexity are significantly reduced, balancing inference efficiency and embedded deployment capabilities, making it suitable for resource-constrained devices such as Jetson Nano. Integrating the CBAM attention module into the decoder effectively improves the model's response to tumor regions with low contrast and blurred boundaries, thereby enhancing the accuracy and stability of boundary recognition. Skip connections enable multi-scale semantic information fusion, allowing for collaborative modeling of deep semantics and shallow texture, enhancing the model's ability to express tumor targets of different shapes and sizes. Simultaneously, the proposed joint loss function further strengthens edge continuity expression while optimizing overall segmentation performance, effectively improving boundary prediction accuracy. The entire network structure is built on the PyTorch framework, possessing good modularity, scalability, and transferability. It supports efficient end-to-end training and has good cross-scenario adaptability, making it applicable to multimodal medical image analysis tasks such as breast MRI and CT, demonstrating high engineering practical value and clinical application potential.

[0103] In some implementations, step S130 involves designing the joint loss function, which includes weighting the FocalTversky loss function and the boundary loss impairment function to form the joint loss function; the expression for the joint loss function is as follows:

[0104] L total =λ1·L FTL +λ2·L boundary ;

[0105] Among them, L total L represents the joint loss function. FTLLet L represent the Focal Tversky loss function. boundary Let λ1 represent the boundary loss function, λ2 represent the weight coefficient of the Focal Tversky loss function in the joint loss function, and λ2 represent the weight coefficient of the boundary loss function in the joint loss function, satisfying λ1+λ2=1.

[0106] like Figure 7 As shown, a breast tumor ultrasound image segmentation method based on EfficientViT-UNet further includes the following steps: S13, Joint loss function definition: The network is trained using a joint loss function, wherein the joint loss function L... total Loss of L by FocalTversky FTL With boundary loss L boundary Weighted composition is used to balance foreground-background imbalance and tumor boundary accuracy. The Focal Tversky loss function is a variant of the Tversky loss designed for image segmentation tasks. It focuses on difficult samples by reducing the weights of simpler samples, thus improving the model's ability to learn complex segmentation problems. Boundary Loss is a loss function specifically designed to solve boundary detection problems in image segmentation. It improves segmentation accuracy by optimizing the model's ability to identify target edges. Its core principle is to simultaneously consider the accuracy of pixel classification within the target and the clarity of gradients in the edge region.

[0107] (4) Feature fusion and guidance mechanism:

[0108] To enhance the ability of skip features to express boundary and texture regions, a lightweight channel guidance module is introduced before fusion with the decoder. The SE Block structure is used to weight the skip features by channel dimension, highlighting key semantic response regions and suppressing invalid background interference.

[0109] like Figure 8 As shown, a breast tumor ultrasound image segmentation method based on EfficientViT-UNet further includes the following steps: Step S3: Loss function design:

[0110] Figure 11 This is a schematic diagram of the joint loss function, illustrating the combination of Focal Tversky loss and boundary loss. For example... Figure 11 As shown, the solution of this invention employs a joint loss function, which consists of FocalTversky Loss and Boundary Loss, to balance class imbalance and boundary accuracy. Specifically:

[0111] (1) The Tversky coefficient T is defined as:

[0112]

[0113] In this model, α and β are the weights in the Tversky coefficient, with α = 0.7 and β = 0.3. TP, FN, and FP represent the matching accuracy between the predicted results and the true labels. The meanings of TP (True Positive), FN (False Negative), and FP (False Positive) in the Tversky coefficient are as follows: TP (True Positive): The number of pixels that the model predicts as foreground (tumor) and that pixel also belongs to the foreground region in the true label; FN (False Negative): The number of pixels that the model predicts as background, but that pixel actually belongs to the foreground region in the true label; FP (False Positive): The number of pixels that the model predicts as foreground, but that pixel actually belongs to the background region in the true label. These three metrics collectively reflect the accuracy of the model in classifying foreground (i.e., tumor regions) pixels. FN and FP respectively measure false negatives and false positives, while TP represents correctly identified foreground regions. The Tversky coefficient, by introducing parameters α and β, applies a weighted penalty to FN and FP to balance the model performance under imbalanced categories. In this invention, α = 0.7 and β = 0.3 are set, reflecting a higher penalty for false negatives (FN) to improve the complete detection rate of tumor regions.

[0114] (2) Focal Tversky loss function L FTL Defined as:

[0115] L FTL =(1-T) γ (6).

[0116] Where γ = 1.33, γ is the focus parameter.

[0117] (3) Boundary Loss Function L boundary Defined as:

[0118]

[0119] in, G is the prediction mask, and G is the real label.

[0120] Equation (7) represents boundary loss, used to measure the difference between the model's predicted result and the true label in terms of boundary information. This loss function effectively guides the network to learn a segmentation result that is closer to the true edge contour by integrating the boundary differences at all pixels in the image. It is particularly suitable for segmentation tasks of medical images such as breast ultrasound images with blurred, irregular, and unclear contours. Therefore, Equation (7) The setting is reasonable and effective.

[0121] Regarding the boundary loss function L boundary The meanings of the symbols in the formula are explained as follows: Ω: represents the image domain, that is, the pixel space of the image. G: Represents the segmentation probability map or label map predicted by the model. and These represent the gradients of the predicted image and the ground truth image in space, respectively. (Represents the gradient operator). This represents the difference between the predicted boundary and the true boundary along the gradient direction. The integral ∫ Ω dx: Accumulate the gradient difference mentioned above for each pixel location in the entire image.

[0122] (4) The constructed joint loss function consists of Focal Tversky Loss and Boundary Loss, specifically represented as the joint loss function L. total In weighted form:

[0123] L total =λ1·L FTL +λ2·L boundary (8).

[0124] Where λ1=0.6, λ2=0.4, λ1 and λ2 are the weight coefficients of each sub-loss in the joint loss function, satisfying λ1+λ2=1.

[0125] In this invention, a joint loss function comprising Focal Tversky loss and boundary loss is designed to balance the uneven distribution of foreground and background and enhance the fitting ability to tumor boundaries. Focal Tversky loss is used to weight and penalize difficult-to-separate regions; boundary loss improves edge consistency through gradient difference constraints, thereby significantly improving segmentation accuracy.

[0126] In some implementations, the specific process of training the segmentation network model using the training set based on the joint loss function in step S140 to obtain the segmentation network training model is described in the following exemplary description.

[0127] The following is combined with Figure 5The diagram illustrates an embodiment of the method of the present invention for training the segmentation network model using the training set. It further explains the specific process of training the segmentation network model using the training set in step S140, including steps S510 to S520.

[0128] Step S510: Based on the joint loss function, the AdamW optimizer is used to perform end-to-end training on the segmentation network, and the training set is used to train the segmentation network model.

[0129] Step S520: Using a preset initial learning rate, monitor the mIoU and Dice coefficients on the validation set as performance evaluation metrics during training. Save the optimal model parameters after the performance evaluation metrics converge; thus, obtain the segmentation network training model.

[0130] like Figure 7 As shown, a breast tumor ultrasound image segmentation method based on EfficientViT-UNet further includes the following steps: S14, Model training and validation step: The segmentation network is trained end-to-end using the AdamW optimizer, with an initial learning rate set to 1×10⁻⁶. -4 During training, the mIoU and Dice coefficients on the validation set are monitored as performance evaluation metrics, and the optimal model parameters are saved after performance convergence.

[0131] In the scheme of this invention, the AdamW optimizer is used to train the constructed network end-to-end, mIoU and Dice coefficient are used as the main evaluation indicators, and the optimal performance model is selected on the validation set and its parameters are saved.

[0132] (5) Model training and loss function definition:

[0133] The breast tumor ultrasound image segmentation model was trained using the AdamW optimizer with an initial learning rate of 1×10⁻⁶. -4 The training loss is dynamically adjusted using a cosine annealing strategy. The training loss is a weighted combination of Focal Tversky loss and boundary loss. The former improves robustness to foreground / background imbalance, while the latter utilizes mask gradient information to optimize boundary regression accuracy. The joint optimization improves the overall segmentation performance and edge continuity representation ability.

[0134] S15. Model Deployment and Inference Steps: Deploy the trained EfficientViT-UNet model to the target terminal device to achieve real-time prediction and mask output of tumor regions in breast ultrasound images. For example, deploy the trained model on edge devices such as Jetson Nano to achieve real-time automatic tumor segmentation of newly input ultrasound images.

[0135] (6) Project Implementation and Deployment Configuration:

[0136] Once trained, the breast tumor ultrasound image segmentation model can be exported to ONNX format and deployed on edge computing platforms such as Jetson Nano. While maintaining a lightweight structure, the model achieves efficient and real-time segmentation of breast tumor regions, making it suitable for intelligent diagnostic assistance scenarios in terminal medical devices.

[0137] like Figure 8 As shown, a breast tumor ultrasound image segmentation method based on EfficientViT-UNet further includes the following steps:

[0138] Step S4, Model Training and Validation: The segmentation network model of this invention is trained end-to-end using the AdamW optimizer, with an initial learning rate set to 1×10⁻⁶. -4 A learning rate cosine annealing decay strategy was adopted. During training, the mIoU and Dice coefficient on the validation set were used as evaluation metrics, and the parameters of the best-performing model were saved.

[0139] Step S5: Model Deployment and Inference: The EfficientViT-UNet model trained by the present invention possesses excellent lightweight characteristics and can be deployed on edge computing devices, including Jetson Nano, to achieve rapid and accurate segmentation of breast tumor ultrasound images. The output of the model inference stage is a binary mask map of the tumor region, which has clear spatial boundary representation capabilities and can provide key input for subsequent lesion localization, pathological region contour extraction, and intelligent assisted diagnostic systems.

[0140] The segmentation model is deployed on embedded terminal devices with limited computing resources, such as the Jetson Nano. These devices are characterized by low power consumption and small size, making them suitable for mobile healthcare or edge computing scenarios. By running the pre-trained EfficientViT-UNet model on this terminal, real-time prediction and mask output of tumor regions in breast ultrasound images are achieved, improving the model's response efficiency and deployment adaptability in clinical settings and meeting the comprehensive requirements of real-time performance, accuracy, and computing resources in actual medical applications.

[0141] This invention proposes a tumor segmentation method for breast ultrasound images based on EfficientViT-UNet. It combines a highly efficient and lightweight visual Transformer with a classic UNet decoding structure, balancing feature extraction capabilities with computational efficiency. This method segmentes tumor regions using breast ultrasound images without invasive procedures such as biopsies or pathological sections, significantly reducing diagnostic risks and discomfort for patients. In terms of model structure, an EfficientViT encoder module is introduced, which effectively improves the perception of low-contrast tumor regions in breast ultrasound images through the fusion of local receptive field modeling and attention mechanisms, while maintaining a low parameter count to adapt to embedded device deployment requirements. During training, a joint optimization strategy using the Focal Tversky loss function and boundary loss function is employed. This approach addresses foreground / background class imbalance while further improving segmentation accuracy for blurred boundaries and small tumor targets, enhancing the model's adaptability to complex structures in breast ultrasound images. This invention combines lightweight model design with strong feature representation capabilities, enabling accurate segmentation of breast tumor regions. It is suitable for the auxiliary diagnosis and intelligent screening of breast diseases, possessing good clinical adaptability and engineering implementation potential.

[0142] In the present invention, the relevant terms are explained as follows:

[0143] EfficientViT (Efficient Visual Transformer): EfficientViT is an efficient and lightweight visual Transformer model that combines the computational efficiency of convolutional neural networks with the global modeling capabilities of Transformers. In image segmentation tasks, EfficientViT can extract rich image features with relatively low computational cost, making it particularly suitable for deployment in resource-constrained scenarios.

[0144] U-Net (U-shaped Neural Network): U-Net is a typical symmetric encoder-decoder neural network widely used in medical image segmentation. Its encoder extracts feature information, the decoder gradually restores spatial resolution, and it effectively improves segmentation accuracy by fusing low-level and high-level features through skip connections.

[0145] CBAM (Convolutional Block Attention Module): CBAM is a lightweight attention mechanism module used in neural networks, consisting of channel attention and spatial attention. It adaptively emphasizes feature regions that are meaningful to the current task and suppresses redundant background, thereby improving the model's object perception ability and segmentation accuracy.

[0146] Focal Tversky Loss: The Focal Tversky loss function is an improved loss function based on the Tversky coefficient, suitable for medical image segmentation tasks with sparse foreground objects and class imbalance. The Tversky coefficient can be seen as a generalized form of the Dice coefficient. By introducing two adjustable parameters to control the penalty weights for false positives and false negatives, Focal Tversky further introduces an exponential adjustment term to enhance its ability to focus on difficult-to-segment samples (such as the edges of small tumors).

[0147] Boundary Loss: The boundary loss function focuses on optimizing the error between the predicted result and the ground truth labeled boundary, effectively mitigating the problem of blurring or misclassification in edge regions. This loss function is suitable for image segmentation tasks with high requirements for boundary accuracy, such as tumor region segmentation.

[0148] mIoU (mean intersection-union ratio): mIoU is a commonly used performance evaluation metric in image segmentation. It represents the average degree of overlap between the predicted segmented region and the ground truth labeled region. The higher the value, the better the segmentation effect.

[0149] Dice coefficient: The Dice coefficient is another metric that measures the degree of overlap between the predicted region and the ground truth region. It is particularly suitable for medical image segmentation tasks with small foreground regions. The closer the value is to 1, the more accurate the prediction.

[0150] Stage: The EfficientViT network structure is divided into four processing stages, each responsible for feature extraction at different spatial resolutions. Increasing the number of stages means that the model gradually extracts abstract information at higher semantic levels.

[0151] MBConv (Mobile Inverted Bottleneck): A high-efficiency, lightweight convolutional module originally used in MobileNetV2. Its structural feature is that it achieves the effect of extracting deep features with low computational cost through a combination of dilation, depthwise convolution and compression.

[0152] Skip Connection: Used to connect feature maps at the same level in the encoder and decoder. In image segmentation tasks, it helps to compensate for missing details in low-resolution features and improves the decoder's ability to recover image accuracy.

[0153] The technical solution of this embodiment involves acquiring breast ultrasound images containing breast tumor regions from a breast ultrasound image dataset, performing data preprocessing to obtain breast ultrasound image samples, and dividing these samples into training and testing sets. An encoder module is built using the EfficientViT module, and a decoder module is built using a U-Net symmetric decoding structure + CBAM attention enhancement module. Based on the constructed encoder and decoder modules, a segmentation network model fusing the EfficientViT encoder and U-Net decoder is constructed. Focal... TverskyLoss and BoundaryLoss are fused to design a joint loss function. Based on this joint loss function, the segmentation network model is trained using the training set and then tested using the test set. The trained segmentation network model is then optimized based on the test results. The optimized segmentation network model is used as the required breast tumor region segmentation model to segment breast tumor regions from breast ultrasound images. Thus, by fusing the EfficientViT encoder, symmetric U-Net decoder, CBAM attention enhancement module, and joint loss function to set up a breast tumor region segmentation model, it is possible to segment breast tumor regions from breast ultrasound images with good accuracy.

[0154] According to embodiments of the present invention, a breast ultrasound image processing apparatus corresponding to a breast ultrasound image processing method is also provided. See also Figure 6 The diagram shows a structural schematic of an embodiment of the device of the present invention. The breast ultrasound image processing device may include an acquisition unit 102 and a control unit 104.

[0155] The acquisition unit 102 is configured to acquire a breast ultrasound image dataset and, from the breast ultrasound image dataset, acquire a sub-dataset of breast ultrasound images containing breast tumor regions. The specific functions and processing of the acquisition unit 102 are described in step S110.

[0156] The control unit 104 is configured to preprocess the breast ultrasound image subset to obtain breast ultrasound image samples; and to divide the breast ultrasound image samples into a training set and a test set.

[0157] The control unit 104 is further configured to fuse the EfficientViT encoder, the symmetric U-Net decoder, and the CBAM attention enhancement module to build a segmentation network model; and to design a joint loss function. The constructed segmentation network model is an example of the EfficientViT-UNet model, and the designed joint loss function is an example of the joint loss function L. total Loss of L by FocalTverskyFTL With boundary loss L boundary Weighted composition.

[0158] The control unit 104 is further configured to train the segmentation network model using the training set based on the joint loss function, thereby obtaining a segmentation network training model.

[0159] The control unit 104 is further configured to use the test set to test the segmentation network training model and obtain the test results of the segmentation network training model.

[0160] The control unit 104 is further configured to optimize the segmentation network training model based on the test results of the segmentation network training model to obtain an optimized segmentation network model, which serves as the required breast tumor region segmentation model for segmenting breast tumor regions from breast ultrasound images.

[0161] This invention relates to the field of artificial intelligence and addresses the problems of low contrast, strong noise interference, and blurred tissue structure in breast ultrasound images, which increase the difficulty of subsequent use. To overcome the shortcomings of existing breast ultrasound image segmentation methods, such as weak feature extraction capabilities, inaccurate boundary localization, and difficulty in deploying models on resource-constrained devices, this invention proposes a breast tumor ultrasound image segmentation scheme based on EfficientViT-UNet. The scheme mainly includes: introducing an EfficientViT encoder based on lightweight convolution and a local-global hybrid attention mechanism, significantly reducing the number of model parameters and computational complexity, balancing model inference efficiency and embedded deployment capabilities, and making it suitable for resource-constrained devices such as Jetson Nano; integrating a CBAM attention module into the decoder, effectively improving the model's response to tumor regions with low contrast and blurred boundaries, thereby enhancing the accuracy and stability of boundary recognition; achieving multi-scale semantic information fusion through skip connections, enabling deep semantics and shallow texture to be modeled collaboratively, enhancing the model's ability to express tumor targets of different shapes and sizes; and further strengthening the expression of edge continuity while optimizing overall segmentation performance, effectively improving boundary prediction accuracy.

[0162] Since the processing and functions implemented by the device in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in the description of this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0163] According to an embodiment of the present invention, a terminal corresponding to a breast ultrasound image processing device is also provided. This terminal may include the breast ultrasound image processing device described above.

[0164] Since the processing and functions implemented by the terminal in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned device, any details not covered in this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0165] According to an embodiment of the present invention, a storage medium corresponding to a breast ultrasound image processing method is also provided, the storage medium including a stored program, wherein the program controls the device where the storage medium is located to execute the breast ultrasound image processing method described above when it is running.

[0166] Since the processing and functions implemented by the storage medium in this embodiment are basically the same as the embodiments, principles and examples of the aforementioned methods, any details not covered in this embodiment can be found in the relevant descriptions in the aforementioned embodiments, and will not be repeated here.

[0167] In summary, it is readily understood by those skilled in the art that, without conflict, the aforementioned advantageous methods can be freely combined and superimposed.

[0168] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A method for processing breast ultrasound images, characterized in that, include: Obtain a breast ultrasound image dataset, and extract a breast ultrasound image subset containing breast tumor regions from the breast ultrasound image dataset; The breast ultrasound image subset is preprocessed to obtain breast ultrasound image samples; the breast ultrasound image samples are then divided into a training set and a test set. A segmentation network model is built by integrating the EfficientViT encoder, the symmetric U-Net decoder, and the CBAM attention enhancement module; and a joint loss function is designed. Based on the joint loss function, the segmentation network model is trained using the training set to obtain the segmentation network training model; The segmentation network training model is tested using the test set to obtain the test results of the segmentation network training model. The segmentation network training model is optimized based on the test results to obtain an optimized segmentation network model, which serves as the required breast tumor region segmentation model for segmenting breast tumor regions from breast ultrasound images.

2. The method for processing breast ultrasound images according to claim 1, characterized in that, The breast ultrasound image subset is preprocessed to obtain breast ultrasound image samples, including: For each breast ultrasound image in the breast ultrasound image subset, extract the original image of each breast ultrasound image and its corresponding mask label; The original image of each breast ultrasound image and its corresponding mask label are subjected to preset standardization and preset data augmentation to obtain the preprocessed image of each breast ultrasound image. In this way, preprocessed images of all breast ultrasound images in the breast ultrasound image subset are obtained, which are used as breast ultrasound image samples.

3. The method for processing breast ultrasound images according to claim 1, characterized in that, A segmentation network model is built by integrating the EfficientViT encoder, the symmetric U-Net decoder, and the CBAM attention enhancement module, including: The main architecture of the segmentation network model is set as follows: the input is a single-channel breast ultrasound image of a preset size, and the output is a binary segmentation mask of the same size as the input. The encoder module is built using the EfficientViT module; A U-Net symmetric decoding structure is adopted, and a CBAM attention enhancement module is introduced to build the decoder module; Based on the main architecture, the EfficientViT-UNet network structure is constructed using the encoder module and decoder module, which serve as the segmentation network model.

4. The method for processing breast ultrasound images according to claim 3, characterized in that, in, An encoder module is built using the EfficientViT module, including: The encoder module is constructed using the EfficientViT module, based on a lightweight convolution and a local-global hybrid attention mechanism. The constructed encoder module includes two or more encoding blocks. Each encoding block includes a lightweight convolution module, a parallel attention mechanism, and a local-global feature fusion module. And / or, A U-Net symmetric decoding structure is adopted, and a CBAM attention enhancement module is introduced to build a decoder module, including: A symmetrical U-Net decoding structure is adopted, and each upsampling module gradually restores the spatial resolution through upsampling, and the feature map is aligned by channel number using convolution of preset specifications. After upsampling at each level to gradually restore spatial resolution, the corresponding level of enhanced feature maps are added for fusion, and the fusion method is a residual connection structure; and a CBAM attention enhancement module is embedded after the output of each level of feature map.

5. The method for processing breast ultrasound images according to claim 1, characterized in that, Design the joint loss function, including: The joint loss function is constructed by weighting the FocalTversky loss function and the boundary loss / damage function; the expression of the joint loss function is as follows: L total =λ1·L FTL +λ2·L boundary ; Among them, L total L represents the joint loss function. FTL L represents the Focal Tversky loss function. boundary Let λ1 represent the boundary loss function, λ2 represent the weight coefficient of the Focal Tversky loss function in the joint loss function, and λ2 represent the weight coefficient of the boundary loss function in the joint loss function, satisfying λ1+λ2=1.

6. The method for processing breast ultrasound images according to any one of claims 1 to 5, characterized in that, Based on the joint loss function, the segmentation network model is trained using the training set to obtain a segmentation network training model, including: Based on the joint loss function, the AdamW optimizer is used to train the segmentation network end-to-end, and the training set is used to train the segmentation network model. Using a preset initial learning rate, the mIoU and Dice coefficients on the validation set are monitored during training as performance evaluation metrics. The optimal model parameters are saved after the performance evaluation metrics converge; in this way, the segmentation network training model is obtained.

7. A processing device for breast ultrasound images, characterized in that, include: The acquisition unit is configured to acquire a breast ultrasound image dataset and acquire a breast ultrasound image subset containing breast tumor regions from the breast ultrasound image dataset. The control unit is configured to preprocess the breast ultrasound image subset to obtain breast ultrasound image samples; and to divide the breast ultrasound image samples into a training set and a test set. The control unit is also configured to integrate the EfficientViT encoder, the symmetric U-Net decoder, and the CBAM attention enhancement module to build a segmentation network model; and to design a joint loss function. The control unit is further configured to train the segmentation network model using the training set based on the joint loss function to obtain a segmentation network training model. The control unit is further configured to use the test set to test the segmentation network training model and obtain the test results of the segmentation network training model. The control unit is further configured to optimize the segmentation network training model based on the test results of the segmentation network training model to obtain an optimized segmentation network model, which serves as the required breast tumor region segmentation model for segmenting breast tumor regions from breast ultrasound images.

8. A terminal, characterized in that, include: The breast ultrasound image processing apparatus as described in claim 7.

9. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the storage medium to perform the breast ultrasound image processing method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method for processing breast ultrasound images according to any one of claims 1 to 6.

Citation Information

Cited By

  • Muscle segmentation method based on state space model and boundary perception attention

    CN121213594A

  • Ultrasonic image processing method and training method and device based on adaptive loss function

    CN121600263A

  • Ultrasonic image processing method, ultrasonic equipment and storage medium

    CN122004923A

  • Breast cancer ultrasonic image automatic segmentation method and system and storage medium

    CN122134748A