Gastric cancer CT lesion area detection method and device based on ZSNet
By introducing the ZSNet structure and multi-scale feature fusion of the CT-Neck module and improving the loss function, the problems of missed detection and false detection in gastric cancer CT image detection are solved, the detection accuracy and robustness of tiny lesions are improved, and it is suitable for complex scenarios of gastric cancer CT images.
Patent Information
- Application Number
- CN202510507064.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-04-22
AI Technical Summary
Existing technologies have problems with missed detection, false detection, and inaccurate positioning in gastric cancer CT image detection, especially in low-contrast and complex backgrounds where it is difficult to effectively detect tiny lesions, affecting clinical diagnosis and treatment outcomes.
A gastric cancer CT lesion area detection method based on the ZSNet structure is adopted, combined with ODConv technology and CT-Neck module, to improve detection accuracy and robustness through multi-scale feature fusion and improved loss functions (such as WIoU loss).
It significantly improves the detection accuracy and robustness of tiny lesions, reduces the risk of missed detection and false detection, is suitable for complex scenarios of gastric cancer CT images, and improves detection accuracy and applicability.
Smart Images

Figure CN120047435B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical imaging, and in particular to a method and device for detecting gastric cancer CT lesion areas based on ZSNet. Background Art
[0002] In recent years, gastric cancer has become one of the most common malignant tumors worldwide, with high morbidity and mortality posing a serious threat to public health. CT imaging technology, due to its high resolution and excellent visualization of lesion details, is widely used in the early diagnosis of gastric cancer. However, gastric cancer CT images often suffer from low contrast, high noise levels, and small, morphologically variable lesions. This makes traditional image processing methods and conventional target detection models prone to missed and false detections when segmenting and localizing tiny lesions, thus affecting the accuracy of clinical diagnosis.
[0003] Deep learning technology has achieved remarkable results in the field of object detection. However, when processing gastric cancer CT images, existing models often struggle to fully extract low-level details and high-level semantic information due to uneven grayscale distribution, blurred edges, and interference from complex backgrounds, resulting in suboptimal detection of tiny lesions. In particular, the traditional bounding box regression loss is insufficiently sensitive to target center alignment in small object detection, further limiting the model's performance in gastric cancer CT lesion detection.
[0004] Some studies have attempted to improve the detection performance of small lesions in gastric cancer CT images by introducing techniques such as improved network structures, multiscale fusion, and dynamic sampling, and have made some progress. However, due to the low contrast, high noise, and small size of gastric cancer CT images, these methods still have significant deficiencies in feature extraction and fusion, resulting in significant missed and false detections. Their detection accuracy and robustness cannot meet the stringent requirements of early clinical diagnosis and treatment. Therefore, there is an urgent need for a new detection method tailored to the characteristics of gastric cancer CT images that can fully integrate multiscale features, enhance the capture and accurate localization of small lesions, improve detection accuracy and robustness, and provide more effective technical support for early clinical diagnosis and treatment.
[0005] In summary, while existing methods for detecting gastric cancer in CT images have achieved target detection to a certain extent, they still suffer from issues such as missed detections, false detections, and inaccurate positioning, which directly impact clinical diagnosis and treatment outcomes. A new method is urgently needed to overcome these shortcomings and provide a more efficient and accurate technical solution for the automatic detection of gastric cancer in CT images. Summary of the Invention
[0006] To address the above problems, the present invention proposes a gastric cancer CT lesion area detection method and device based on ZSNet. It adopts an innovative ZSNet structure and a CT-Neck module based on ODConv technology, which significantly improves the detection accuracy and robustness of tiny lesions.
[0007] On the one hand, the gastric cancer CT lesion area detection method based on ZSNet has the following specific steps:
[0008] S1, obtain grayscale images of gastric cancer CT lesion areas, preprocess the images and annotate them to create a dataset;
[0009] S2, constructing a gastric cancer CT target detection model based on the YOLOv8 network; the gastric cancer CT target detection model includes a backbone part, a neck part, and a head part;
[0010] The Backbone part includes a first unit, a second unit, a third unit, and a fourth unit connected in sequence; the second unit and the fourth unit include one or more ZSNet structures based on full-dimensional dynamic convolution; the dataset is sequentially subjected to feature extraction by the first unit, the second unit, the third unit, and the fourth unit, and the extracted feature representations are output by the second unit and the fourth unit respectively to the Neck part;
[0011] The Neck part performs multi-scale feature fusion on the feature representation of the input Backbone part based on the dysample structure and the ZSNet structure, and then outputs several dimensional feature maps to the Head part;
[0012] The Head part obtains the dimensional feature map of the Neck part, and outputs the gastric cancer CT lesion area detection image after feature enhancement of the CBS structure and feature mapping of the Con2d structure;
[0013] S3, using the dataset to train the gastric cancer CT target detection model to obtain a trained model;
[0014] S4, use the trained model to detect gastric cancer CT lesion areas.
[0015] Preferably, in the Backbon part, the first unit includes a first CBS structure and a second CBS structure connected in sequence, the second unit includes a first ZSNet structure, a third CBS structure and a second ZSNet structure connected in sequence, the third unit includes a fourth CBS structure, and the fourth unit includes a third ZSNet structure, a fifth CBS structure, a fourth ZSNet structure and an SPPF structure connected in sequence.
[0016] Preferably, the Neck part includes a dysample structure, a second dysample structure, a first Concat structure, a second Concat structure, a third Concat structure, a fourth Concat structure, a fifth ZSNet structure, a sixth ZSNet structure, a seventh ZSNet structure, an eighth ZSNet structure, a sixth CBS structure, and a seventh CBS structure; the specific implementation of the Neck part is as follows:
[0017] The feature representation output by the SPPF structure is sampled by the first dysample structure. After feature fusion with the feature representation output by the third ZSNet structure in the first Concat structure, it passes through the fifth ZSNet structure and the second dysample structure in sequence, and is dimensionally spliced with the feature representation output by the second unit in the second Concate structure. The spliced result passes through the sixth ZSNet structure and outputs the first-dimensional feature map to the Head part;
[0018] The output of the sixth ZSNet structure passes through the sixth CBS structure, and is dimensionally spliced with the output of the fifth ZSNet structure in the third Concat structure. After passing through the seventh ZSNet structure, the second-dimensional feature map is output to the Head part;
[0019] The output of the seventh ZSNet structure passes through the seventh CBS structure, is spliced with the feature representation output by the SPPF structure in the fourth Concat structure, and then passes through the eighth ZSNet structure to output the third-dimensional feature map to the Head part.
[0020] Preferably, each of the ZSNet structures includes a CBS compression module, a channel splitting module, a first CT-Neck module, a second CT-Neck module, a feature fusion module and a CBS recovery module; the input data of the ZSNet structure undergoes feature transformation and channel compression through the CBS compression module, and then is evenly divided into first-path features and second-path features according to the channel dimension through the channel splitting module, the second-path features are enhanced through the first CT-Neck module to obtain third-path features, and the third-path features are enhanced through the second CT-Neck module to obtain fourth-path features; the feature fusion module fuses the first-path features, the second-path features, the third-path features and the fourth-path features to obtain a unified feature map; the channel recovery module adjusts the number of channels of the unified feature map so that it is consistent with the number of channels of the subsequent module connected to the ZSNet structure, and the output of the channel recovery module is used as the output of the ZSNet structure.
[0021] Preferably, the first CT-Neck module and the second CT-Neck module adopt the same structure, and each CT-Neck module includes a residual gating function module, a first ODConv module, a second ODConv module and an addition module; the residual gating function module calculates a gating function value of 1 or 0 based on the input features of the CT-Neck module; the first ODConv module inputs the input features of the CT-Neck module, performs full-scale dynamic convolution and outputs it to the second ODConv module; the second ODConv module performs full-scale dynamic convolution on the output of the first ODConv module and outputs it to the addition module; when the gating function value of the addition module is 0, the output of the second ODConv module is used as the output of the CT-Neck module; when the gating function value of the addition module is 1, the input features of the CT-Neck module and the output of the second ODConv module are element-wise added, and used as the output of the CT-Neck module.
[0022] Preferably, the processing process of the dysample structure is as follows:
[0023] Perform a linear transformation on the input feature X of the dysample structure to generate a learnable offset;
[0024] Add the regular grid used in traditional upsampling to the offset to generate a dynamic sampling grid;
[0025] The input features are interpolated and sampled using a dynamic sampling grid to obtain the upsampled feature map, as follows:
[0026] ;
[0027] in, Represents the upsampled feature map, that is, the output of the dysample structure; represents a dynamic sampling grid; Represents interpolation sampling; Represents the input features of the dysample structure.
[0028] Preferably, the total loss function of the gastric cancer CT target detection model is combined with the bounding box regression loss function and the classification loss function, and is expressed as:
[0029] ;
[0030] in, represents the total loss function; represents the bounding box regression loss function; represents the classification loss function; and They represent the weights of the loss function respectively.
[0031] Preferably, the bounding box regression loss function includes WIoU loss and distribution focus loss; the WIoU loss is expressed as:
[0032] ;
[0033] ;
[0034] ;
[0035] in, represents WIoU loss; represents the exponential weighting factor; represents CIoU loss; represents the intersection and union ratio; and Represent the predicted box and the true box respectively; Represents the center coordinates of the prediction box; Represents the center coordinates of the real box; and Represent the normalized width and height respectively;
[0036] The distribution focal loss is expressed as:
[0037] ;
[0038] in, represents the distribution focal loss; and Respectively represent the predicted values of the network output; 、 and Represent the true value of the input network, Represents the true label; i and i+1 represent two consecutive adjacent positions in the dataset.
[0039] Preferably, the classification loss function is expressed as:
[0040] ;
[0041] in, represents the classification loss function; represents the predicted probability of the model output; represents the true label; Represents the balance factor, which is used to adjust the impact of positive and negative samples; Represents the focus factor, which is used to control the model's focus on difficult samples.
[0042] On the other hand, the gastric cancer CT lesion area detection device based on ZSNet includes the following:
[0043] The image acquisition and preprocessing module is used to obtain grayscale images of gastric cancer CT lesion areas, preprocess the images, and annotate them to create a data set;
[0044] A model building module is used to build a gastric cancer CT target detection model based on the YOLOv8 network; the gastric cancer CT target detection model includes a backbone part, a neck part, and a head part;
[0045] The Backbone part includes a first unit, a second unit, a third unit, and a fourth unit connected in sequence; the second unit and the fourth unit include one or more ZSNet structures based on full-dimensional dynamic convolution; the dataset is sequentially subjected to feature extraction by the first unit, the second unit, the third unit, and the fourth unit, and the extracted feature representations are output by the second unit and the fourth unit respectively to the Neck part;
[0046] The Neck part performs multi-scale feature fusion on the feature representation of the input Backbone part based on the dysample structure and the ZSNet structure, and then outputs several dimensional feature maps to the Head part;
[0047] The Head part obtains the dimensional feature map of the Neck part, and outputs the gastric cancer CT lesion area detection image after feature enhancement of the CBS structure and feature mapping of the Con2d structure;
[0048] The model training module is used to train the gastric cancer CT target detection model using the data set to obtain a trained model;
[0049] The gastric cancer CT lesion area detection module is used to detect gastric cancer CT lesion areas using the trained model.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] (1) This paper innovatively introduces the ZSNet structure, which is constructed by using adaptive feature redistribution, residual connection and deep feature extraction technology. This module can extract more detailed and discriminative features at a low computational cost. Even under noise interference and low contrast conditions, it can still effectively capture the subtle information of the lesion, thereby significantly improving the detection performance.
[0052] (2) The present invention innovatively introduces the CT-Neck module and adopts the ODConv technology in it. It uses offset deformable convolution to dynamically adjust and deeply fuse the input features, achieving dual retention of global semantic information and local details, thereby significantly enhancing the model's ability to recognize complex lesion areas in gastric cancer CT images and effectively improving the overall performance of detection;
[0053] (3) The present invention adopts the WIoU loss function to replace the traditional bounding box regression loss. By exponentially weighting the center offset between the predicted box and the true box, the constraint on target center alignment is strengthened, which significantly reduces the risk of missed detection and false detection, and further improves the detection accuracy. It is particularly suitable for processing the complex situation of small lesion areas in gastric cancer CT images. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The present invention will be described in further detail below with reference to the accompanying drawings;
[0055] Figure 1 Flowchart of a method for detecting gastric cancer CT lesion areas based on ZSNet according to an embodiment of the present invention;
[0056] Figure 2 Schematic diagram of the flow of a gastric cancer CT lesion area detection method based on ZSNet according to an embodiment of the present invention;
[0057] Figure 3 4 is a structural block diagram of a gastric cancer CT lesion area detection device based on ZSNet according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The present invention is further described below through specific embodiments.
[0059] like Figure 1 As shown in the figure, the gastric cancer CT lesion area detection method based on ZSNet is as follows:
[0060] S1, obtain the grayscale image of the gastric cancer CT lesion area, preprocess the image and annotate it to produce a data set.
[0061] Preprocessing involves removing the annotation information from the original gastric cancer CT image to obtain a de-annotated image. Contrast enhancement can be performed on the de-annotated image using a logarithmic transformation, as shown in the following formula: ,in, is the value of the original image pixel, is the pixel value after enhancement processing. represents a logarithmic function, and the constant C is used to ensure that the grayscale dynamic range of the transformed image meets the requirements. This logarithmic transformation effectively enhances image contrast while preserving image detail, providing higher-quality image input for subsequent detection and identification of gastric cancer CT lesions.
[0062] S2, build a gastric cancer CT target detection model based on YOLOv8 network.
[0063] like Figure 2As shown, the backbone of the gastric cancer CT target detection model utilizes feature extraction modules arranged sequentially from top to bottom. These modules comprise four alternating modular units: the first unit comprises a CBS structure and a CBS structure; the second unit comprises a ZSNet structure, a CBS structure, and a ZSNet structure; the third unit comprises a CBS structure; and the fourth unit comprises a ZSNet structure, a CBS structure, a ZSNet structure, and an SPPF structure. Image features extracted from these units are input into the Neck component and help the target detection model construct a loss function, thereby improving the overall model's gastric cancer CT lesion detection capabilities and ensuring that the model focuses more on these lesions during learning.
[0064] The Neck part adopts the mutually fused FPN network and PANET network, and uses Dysample and ZSNet to improve the FPN network and PANET network to obtain feature maps of multiple dimensions.
[0065] The head uses multiple CBS structures and Conv2d convolutional layers to output images of gastric cancer CT lesion area predictions in three different dimensions and facilitate the construction of the bounding box regression loss function (Bbox Loss) and the classification loss function (Cls Loss). This example combines ZSNet and YOLOv8 object detection to optimize false detection and missed detection issues in gastric cancer CT images, improving detection recognition rate and accuracy.
[0066] In this embodiment, the implementation of the Neck part and the Head part is as follows:
[0067] The output of the SPPF module in the fourth alternating module serves as the input to the improved FPN network. This input passes through the dysample structure and the Concat structure, and is then fused with the output of the ZSNet (40x40x512) structure. It is then processed by the ZSNet (to obtain preliminary fusion features) and the dysample structure, and then matched with the output of the second alternating module for dimension concatenation. The concatenated result then passes through the ZSNet structure to complete feature fusion. The fused feature map is then input into the Head part, passed through the CBS structure and the Conv2d structure, and used as the first-layer output feature map.
[0068] After the fused feature map passes through the CBS structure, it is dimensionally spliced with the initial fusion feature again. The spliced result is then fused through the ZSNet structure to obtain the secondary fusion feature. The secondary fusion feature is input into the Head part and passes through the CBS structure and Conv2d structure as the second-layer output feature map;
[0069] After the secondary fusion features pass through the CBS structure, they are matched with the feature map output by the SPPF module of the fourth unit alternating module and then dimensionally spliced. The splicing results are then fused through the ZSNet structure and input into the Head part, and then pass through the CBS structure and Conv2d structure as the third-layer output feature map.
[0070] The implementation of the ZSNet structure of this embodiment is as follows:
[0071] The ZSNet structure receives the input feature map from the previous module. Where C represents the number of channels, H represents the height, and W represents the width.
[0072] Adopt channel compression module CBS, use Convolution, batch normalization (BN) and activation functions perform preliminary transformation and channel compression on the input features. The calculation formula is as follows: ,in, Indicates input Use a kernel size of The convolution operation changes the number of channels from Compress to , represents batch normalization, represents the activation function, Represents the output feature map, with size .
[0073] Use the channel splitting operation Spilt to transform the feature map Divide into two parts along the channel dimension and .in, and Represent the first and second path features after splitting, and the size of each path is , providing different sub-features for the subsequent CT-Neck branch.
[0074] Use the CT-Neck branch module to split the second path feature Further enhanced processing is performed. The CT-Neck branch module uses a gating mechanism to distinguish processing paths. Its process is as follows:
[0075] First, execute the first CT-Neck branch module to perform gating judgment to determine whether to use deep processing. The gating function is , if it is judged as True, then ; If False, then When the condition is True, the CT-Neck module enables the residual connection and converts the input features Execute twice in sequence Convolution (Omni-DimensionalDynamic Convolution, full-dimensional dynamic convolution) and Adding the elements together gives , the calculation formula is as follows: , when the condition is False, the CT-Neck module directly Carry out twice Convolution processing obtains features , the calculation formula is as follows: ,in, Indicates full-dimensional dynamic convolution with a convolution kernel size of 3×3, which can better adapt to local deformation and capture detailed information of gastric cancer CT.
[0076] Subsequently, the second CT-Neck branch module is executed to process the features output by the first CT-Neck branch module. Perform the same operation as the first CT-Neck branch module to obtain .
[0077] Finally, after the Spilt operation and CT-Neck module feature extraction, a total of four features are output, namely: 、 、 、 The size of each path is .
[0078] The feature fusion module Concat is used to fuse the four enhanced features to form a unified feature map. The calculation formula is as follows: ,in Indicates concatenation of four-way features in the channel dimension. Represents the fused feature map, whose size is .
[0079] The channel recovery module CBS is used to restore the fused feature map Adopt again Convolution, batch normalization (BN), and activation function processing are performed to restore or adjust the number of channels to make it consistent with the requirements of subsequent modules. The calculation formula is as follows: ,in, Indicates input Use a kernel size of The convolution operation restores the number of channels to , represents batch normalization, represents the activation function, Represents the output feature map, with size .
[0080] In this embodiment, the loss function of the gastric cancer CT target detection model is as follows:
[0081] A bounding box regression loss function (Bbox Loss) is constructed to measure the overlap between the predicted box and the ground-truth box, enabling the model to accurately regress the target location and size. Bounding box regression loss functions include CIoU loss and DFL loss.
[0082] The calculation formula of CIoU loss is as follows: ;
[0083] in, represents the prediction box, represents the true frame, It represents the intersection and union ratio of the two.
[0084] The distribution focus loss is used to measure the optimized label so that the network distribution focuses on the label value. The calculation formula is as follows: ;
[0085] in, , is the predicted value output by the network. , , is the true value input to the network.
[0086] Construct a classification loss function (Cls Loss) to measure the difference between the predicted category probability and the true category label to ensure that the model correctly identifies the target category. The classification loss function calculation formula is as follows:
[0087] ;
[0088] in, represents the predicted probability of the model output; is the true label; Is a balancing factor used to adjust the impact of positive and negative samples, is the focus factor, which is used to control the model's attention to difficult samples.
[0089] Construct a preliminary total loss function, the calculation formula is as follows:
[0090] ;
[0091] in, 、 Represent the weights of the two loss functions respectively.
[0092] In this embodiment, WIoU loss is introduced to replace the boundary regression loss (Bbox Loss) By introducing the center offset weighting mechanism, the model's attention to small targets and center alignment issues is enhanced. The calculation formula is as follows:
[0093] ;
[0094] ;
[0095] ;
[0096] in, Represent the predicted box and the true box respectively, represents the intersection-and-union ratio, and Represents the center coordinates of the predicted box and the real box, represents the normalized width and height, Represents the exponential weighting factor.
[0097] Finally, the final total loss function is constructed and the calculation formula is as follows:
[0098] ;
[0099] in, and Represent the weights of the two loss functions respectively.
[0100] S3, using the data set to train the gastric cancer CT target detection model to obtain a trained model.
[0101] S4, use the trained model to detect gastric cancer CT lesion areas.
[0102] This embodiment designs an efficient and accurate automatic detection method to meet the special detection requirements of gastric cancer CT images. Given the characteristics of gastric cancer CT images, which are usually small in size, low in contrast, noisy, and with complex backgrounds, an improvement scheme is proposed to effectively improve the detection rate and positioning accuracy of the lesion area, providing strong support for early clinical diagnosis and treatment. Specifically, this embodiment significantly improves the detection accuracy and robustness of tiny lesions by making multiple improvements based on the YOLOv8 model in the gastric cancer CT image detection scenario, adopting the innovative ZSNet structure and CT-Neck module (combined with ODConv technology), and introducing the WIoU loss function. This method is not only theoretically innovative, but also demonstrates extremely high clinical value and promotion prospects in practical applications.
[0103] This embodiment makes targeted improvements based on the YOLOv8 model. By optimizing the network structure and multi-scale feature extraction strategy, the model can better integrate high-level semantics with low-level detail information, thereby significantly improving the ability to detect tiny lesions in complex backgrounds. When processing gastric cancer CT images, the model can not only improve detection accuracy but also enhance robustness to image noise and low contrast issues.
[0104] like Figure 3 As shown, the present invention also discloses a gastric cancer CT lesion area detection device based on ZSNet, comprising:
[0105] The image acquisition and preprocessing module 301 is used to acquire a grayscale image of the gastric cancer CT lesion area, preprocess the image, and annotate it to produce a data set.
[0106] The model construction module 302 is used to construct a gastric cancer CT target detection model based on the YOLOv8 network; the gastric cancer CT target detection model includes a backbone part, a neck part, and a head part.
[0107] The Backbone part includes a first unit, a second unit, a third unit, and a fourth unit connected in sequence; the second unit and the fourth unit include one or more ZSNet structures based on full-dimensional dynamic convolution; the dataset is sequentially subjected to feature extraction by the first unit, the second unit, the third unit, and the fourth unit, and the extracted feature representations are output by the second unit and the fourth unit respectively to the Neck part;
[0108] The Neck part performs multi-scale feature fusion on the feature representation of the input Backbone part based on the dysample structure and the ZSNet structure, and then outputs several dimensional feature maps to the Head part;
[0109] The Head part obtains the dimensional feature map of the Neck part, and outputs the gastric cancer CT lesion area detection image after feature enhancement of the CBS structure and feature mapping of the Con2d structure.
[0110] The model training module 303 is used to train the gastric cancer CT target detection model using the data set to obtain a trained model.
[0111] The gastric cancer CT lesion region detection module 304 is used to perform gastric cancer CT lesion region detection using the trained model.
[0112] The specific implementation of the gastric cancer CT lesion area detection device based on ZSNet is the same as the gastric cancer CT lesion area detection method based on ZSNet, and will not be repeated in this embodiment.
[0113] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited to this. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.
Claims
1. A gastric cancer CT lesion area detection method based on ZSNet, characterized in that: The steps include: S1, obtain grayscale images of gastric cancer CT lesion areas, preprocess the images and annotate them to create a dataset; S2, constructing a gastric cancer CT target detection model based on the YOLOv8 network; the gastric cancer CT target detection model includes a backbone part, a neck part, and a head part; The Backbone part includes a first unit, a second unit, a third unit, and a fourth unit connected in sequence; the second unit and the fourth unit include one or more ZSNet structures based on full-dimensional dynamic convolution; the dataset is sequentially subjected to feature extraction by the first unit, the second unit, the third unit, and the fourth unit, and the extracted feature representations are output by the second unit and the fourth unit respectively to the Neck part; The Neck part performs multi-scale feature fusion on the feature representation of the input Backbone part based on the dysample structure and the ZSNet structure, and then outputs several dimensional feature maps to the Head part; The Head part obtains the dimensional feature map of the Neck part, and outputs the gastric cancer CT lesion area detection image after feature enhancement of the CBS structure and feature mapping of the Con2d structure; S3, using the data set to train the gastric cancer CT target detection model to obtain a trained model; S4, using the trained model to detect gastric cancer CT lesion areas; In the Backbon part, the first unit includes a first CBS structure and a second CBS structure connected in sequence, the second unit includes a first ZSNet structure, a third CBS structure and a second ZSNet structure connected in sequence, the third unit includes a fourth CBS structure, and the fourth unit includes a third ZSNet structure, a fifth CBS structure, a fourth ZSNet structure and an SPPF structure connected in sequence; Each ZSNet structure includes a CBS compression module, a channel splitting module, a first CT-Neck module, a second CT-Neck module, a feature fusion module, and a CBS recovery module; the input data of the ZSNet structure undergoes feature transformation and channel compression through the CBS compression module, and then is evenly divided into first-path features and second-path features according to the channel dimension through the channel splitting module, the second-path features are enhanced through the first CT-Neck module to obtain third-path features, and the third-path features are enhanced through the second CT-Neck module to obtain fourth-path features; feature The fusion module fuses the first-channel features, the second-channel features, the third-channel features and the fourth-channel features to obtain a unified feature map; the channel recovery module adjusts the number of channels of the unified feature map to make it consistent with the number of channels of the subsequent modules connected to the ZSNet structure, and the output of the channel recovery module is used as the output of the ZSNet structure.
2. The gastric cancer CT lesion area detection method based on ZSNet according to claim 1 is characterized in that: The Neck part includes a dysample structure, a second dysample structure, a first Concat structure, a second Concat structure, a third Concat structure, a fourth Concat structure, a fifth ZSNet structure, a sixth ZSNet structure, a seventh ZSNet structure, an eighth ZSNet structure, a sixth CBS structure, and a seventh CBS structure. The specific implementation of the Neck part is as follows: The feature representation output by the SPPF structure is sampled by the first dysample structure. After feature fusion with the feature representation output by the third ZSNet structure in the first Concat structure, it passes through the fifth ZSNet structure and the second dysample structure in sequence, and is dimensionally spliced with the feature representation output by the second unit in the second Concate structure. The spliced result passes through the sixth ZSNet structure and outputs the first-dimensional feature map to the Head part; The output of the sixth ZSNet structure passes through the sixth CBS structure, and is dimensionally spliced with the output of the fifth ZSNet structure in the third Concat structure. After passing through the seventh ZSNet structure, the second-dimensional feature map is output to the Head part; The output of the seventh ZSNet structure passes through the seventh CBS structure, is spliced with the feature representation output by the SPPF structure in the fourth Concat structure, and then passes through the eighth ZSNet structure to output the third-dimensional feature map to the Head part.
3. The gastric cancer CT lesion area detection method based on ZSNet according to claim 1, characterized in that: The first CT-Neck module and the second CT-Neck module adopt the same structure. Each CT-Neck module includes a residual gating function module, a first ODConv module, a second ODConv module and an addition module; the residual gating function module calculates a gating function value of 1 or 0 based on the input features of the CT-Neck module; the first ODConv module inputs the input features of the CT-Neck module, performs full-scale dynamic convolution and outputs it to the second ODConv module; the second ODConv module performs full-scale dynamic convolution on the output of the first ODConv module and outputs it to the addition module; when the gating function value of the addition module is 0, the output of the second ODConv module is used as the output of the CT-Neck module; when the gating function value of the addition module is 1, the input features of the CT-Neck module and the output of the second ODConv module are element-wise added, and the result is used as the output of the CT-Neck module.
4. The gastric cancer CT lesion area detection method based on ZSNet according to claim 1, characterized in that: The processing of the dysample structure is as follows: Perform a linear transformation on the input feature X of the dysample structure to generate a learnable offset; Add the regular grid used in traditional upsampling to the offset to generate a dynamic sampling grid; The input features are interpolated and sampled using a dynamic sampling grid to obtain the upsampled feature map, as follows: X′=gridsample(X,S); Among them, X′ represents the upsampled feature map, that is, the output of the dysample structure; S represents the dynamic sampling grid; gridsample represents interpolation sampling; X represents the input feature of the dysample structure.
5. The gastric cancer CT lesion area detection method based on ZSNet according to claim 1, characterized in that: The total loss function of the gastric cancer CT target detection model combines the bounding box regression loss function and the classification loss function and is expressed as: L total =λ Bbox L Bbox +λ cls L cls ; Among them, L total Represents the total loss function; L Bbox represents the bounding box regression loss function; L cls represents the classification loss function; λ Bbox and λ cls They represent the weights of the loss function respectively.
6. The gastric cancer CT lesion area detection method based on ZSNet according to claim 5, characterized in that: The bounding box regression loss function includes WIoU loss and distribution focus loss; the WIoU loss is expressed as: L WIoU =R WIoU ×L CIoU ; L CIoU =1-CIoU(b,b * ); Among them, L WIoU represents WIoU loss; R WIoU represents the exponential weighting factor; L CIoU represents CIoU loss; CIoU(b,b * ) represents the intersection-over-union ratio; b and b * Represent the predicted box and the real box respectively; (b cx ,b cy ) represents the center coordinate of the prediction box; Indicates the center coordinate of the real box; c w and c h Represent the normalized width and height respectively; The distribution focus loss is expressed as: L DFL (S i ,S i+1 )=-((and i+1 -y)log(S i )+(yy i )log(S i+1 )); Among them, L DFL (S i ,S i+1 ) represents the distribution focus loss; S i and S i+1 Represent the predicted values of the network output respectively; y, y i and y i+1 Represent the true value of the input network, y represents the true label; i and i+1 represent two consecutive adjacent positions in the dataset.
7. The gastric cancer CT lesion area detection method based on ZSNet according to claim 5, characterized in that: The classification loss function is expressed as: L cls =-αy(1-p)γlog(p)-(1-y)(pγ)log(1-p); Among them, L cls Represents the classification loss function; p represents the predicted probability of the model output; y represents the true label; α represents the balance factor, which is used to adjust the influence of positive and negative samples; γ represents the focus factor, which is used to control the model's attention to difficult samples.
8. A ZSNet-based gastric cancer CT lesion area detection device using the ZSNet-based gastric cancer CT lesion area detection method according to any one of claims 1 to 7, comprising: The image acquisition and preprocessing module is used to obtain grayscale images of gastric cancer CT lesion areas, preprocess the images, and annotate them to create a data set; A model building module is used to build a gastric cancer CT target detection model based on the YOLOv8 network; the gastric cancer CT target detection model includes a backbone part, a neck part, and a head part; The Backbone part includes a first unit, a second unit, a third unit, and a fourth unit connected in sequence; the second unit and the fourth unit include one or more ZSNet structures based on full-dimensional dynamic convolution; the dataset is sequentially subjected to feature extraction by the first unit, the second unit, the third unit, and the fourth unit, and the extracted feature representations are output by the second unit and the fourth unit respectively to the Neck part; The Neck part performs multi-scale feature fusion on the feature representation of the input Backbone part based on the dysample structure and the ZSNet structure, and then outputs several dimensional feature maps to the Head part; The Head part obtains the dimensional feature map of the Neck part, and outputs the gastric cancer CT lesion area detection image after feature enhancement of the CBS structure and feature mapping of the Con2d structure; The model training module is used to train the gastric cancer CT target detection model using the data set to obtain a trained model; The gastric cancer CT lesion area detection module is used to detect gastric cancer CT lesion areas using the trained model.
Citation Information
Patent Citations
Rapid behavior detection method based on long-time enhanced feature enhancement and sparse dynamic sampling
CN110688918A
Multi-task histopathological image lesion segmentation method
CN116128832A