A kidney stone detection system based on the SCC-YOLOX model
By optimizing the YOLOX network structure and combining the attention mechanism and error correction logic module, the problems of low efficiency and insufficient accuracy in the kidney stone detection system have been solved, achieving efficient and accurate automatic detection of kidney stones, especially small target detection, and reducing the risk of misdiagnosis.
Patent Information
- Application Number
- CN202510451498.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-04-11
AI Technical Summary
Existing kidney stone detection systems suffer from problems such as low detection efficiency, high misdiagnosis and missed diagnosis rates, insufficient feature extraction capabilities, unsatisfactory small target detection performance, high computational complexity, imbalance between positive and negative samples, and lack of misdiagnosis correction mechanisms, all of which affect detection accuracy.
Based on the YOLOX network structure, and combined with SE, CA and CBAM attention mechanisms, the feature extraction and detection process is optimized. An error correction logic judgment module is introduced. Through the combination of the backbone network, neck network and detection head, the feature learning and multi-scale feature fusion capabilities are enhanced, the imbalance between positive and negative samples is alleviated, and automatic error correction is achieved.
It improves the speed and accuracy of kidney stone detection, reduces computational costs, enhances the detection effect on small targets, reduces the false diagnosis rate, and improves the overall detection performance and reliability of the system.
Smart Images

Figure CN120374544B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of kidney stone detection technology, and more specifically, it relates to a kidney stone detection system based on the SCC-YOLOX model. Background Technology
[0002] Kidney stones are a common disease of the urinary system, and early detection is crucial for subsequent treatment. Current kidney stone detection methods typically rely on manual image interpretation, which suffers from low detection efficiency and high rates of misdiagnosis and missed diagnosis. In recent years, deep learning-based object detection technology has been gradually applied to the field of medical imaging. Among them, traditional deep learning object detection algorithms, such as YOLOX, YOLOv5, and YOLOv8, have received widespread attention due to their advantages of fast detection speed and high accuracy. However, existing detection systems still have problems such as insufficient feature extraction capabilities, unsatisfactory small object detection results, high computational complexity, imbalance between positive and negative samples, and lack of misdiagnosis correction mechanisms, which limit their widespread application in clinical practice.
[0003] Traditional kidney stone detection systems typically employ a simple decoupled head architecture, which struggles to effectively perform multiple operations such as target separation, classification, and localization. This results in low efficiency in converting feature maps into detection results. Furthermore, the information channel weights in traditional systems are rather ambiguous, requiring the detection network to simultaneously focus on both critical and irrelevant information channels. This increases computational load and reduces information processing efficiency.
[0004] In addition, traditional kidney stone detection systems typically rely on CT scans to generate single-channel grayscale images with relatively limited color range. This makes it easy for significant recognition errors to occur in target detection. Traditional systems also lack channel attention and spatial attention mechanisms, resulting in low attention to key areas and further affecting detection performance.
[0005] The above-mentioned problems directly affect the accuracy of kidney stone detection and may even lead to false positives or false negatives. Summary of the Invention
[0006] This invention aims to provide a kidney stone detection system based on the SCC-YOLOX model. Using the YOLOX network structure as its basic framework, the system optimizes feature extraction and detection processes to achieve efficient and accurate automatic detection of kidney stones. By introducing an attention mechanism, the system effectively improves detection speed and accuracy, reduces information loss, and decreases the number of model parameters, thus improving computational efficiency. The model further enhances feature learning and multi-scale feature fusion capabilities, expanding the network's receptive field, and is particularly effective in detecting small targets (such as tiny kidney stones). The system effectively expresses feature information, improving detection robustness and accuracy. Finally, by identifying and analyzing specific scenarios of detection errors, the model can be continuously optimized, thereby further reducing the false diagnosis rate in kidney stone detection, reducing time and computational costs, and solving the problems of insufficient detection efficiency and accuracy in existing technologies.
[0007] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A kidney stone detection system based on the SCC-YOLOX model. This system mainly consists of a backbone network, a neck network, a detection head, an SE attention module, a CA attention module, a CBAM attention module, and an error correction logic judgment module. The detection steps are as follows:
[0008] Step 1: Data Input
[0009] (1) Data input: Input a CT image of kidney stones (640*640*3);
[0010] (2) Preprocessing: Image normalization, resizing, data augmentation (such as mosaic, random flipping);
[0011] (3) Input model: Input into YoloBody for object detection;
[0012] Step 2: Backbone Feature Extraction:
[0013] (1) Preliminary feature extraction is performed through the base convolutional layer (BaseConv), and the expressive power of channel information is enhanced by combining the SE attention module;
[0014] (2) Using CSPDarknet as the backbone network, features at different scales are extracted. During the forward process of YOLOPAFPN, P5 and P4 level features are added to the CoordAtt attention module to enhance the location awareness capability.
[0015] (3) The Backbone structure is divided as follows:
[0016] ①dark3 → low-level features (larger size, richer details);
[0017] ②dark4 → Medium-level feature (medium size, balanced information);
[0018] ③dark5 → High-level features (small size, rich semantic information);
[0019] Step 3: Neck network feature fusion:
[0020] YOLOX employs an FPN (Feature Pyramid) + PAN (Path Aggregation) structure to enhance feature fusion, and incorporates a CBAM attention module to improve feature extraction performance.
[0021] (1) Top-down (FPN);
[0022] ①dark5→P5 (reduce the number of channels);
[0023] ② Upsample P5 and merge it with dark4 → P4;
[0024] ③ Upsample P4 and merge with dark3 → P3;
[0025] (2) Bottom-up (PAN);
[0026] ①P3 downsampling, fused with P4 → P4_out;
[0027] ②P4_out downsamples and merges with P5 → P5_out;
[0028] ③The CBAM attention module further optimizes feature representation;
[0029] (3) Final output:
[0030] ①P3_out(80×80, detect small targets);
[0031] ②P4_out(40×40, target detected);
[0032] ③P5_out(20×20, for detecting large targets);
[0033] Step 4: Predicting YOLOX Head classification and regression;
[0034] (1) For each feature layer (P3, P4, P5), perform three-class predictions;
[0035] ① Classification branch (cls_preds): Predicts which category each pixel belongs to;
[0036] ② Regression branch (reg_preds): Predicts the bounding box of the target (4 values: x, y, w, h);
[0037] ③ Target confidence branch (obj_preds): Predicts whether there is a target at this point (1 value);
[0038] (2) Finally, the prediction results of P3_out, P4_out, and P5_out are merged and post-processed.
[0039] Among them, 1. The lesion information detected will also be input into the backbone network;
[0040] 1.1. The Focus module can reduce the number of parameters and improve computational efficiency without losing information. Furthermore, YOLOX uses Anchor-free instead of the traditional Anchor-base on the basis of Focus, discarding anchor boxes and only taking the location of the target center point as a positive sample, which alleviates the problem of imbalance between positive and negative samples and reduces time costs.
[0041] 1.2.CSPNet uses the residual structure in ResNet
[43] to segment the stacked residual blocks, which reduces computational complexity and enhances the feature learning ability of the network.
[0042] 1.3. The SPP (Spatial Pyramid Pooling) module increases the receptive field of the network by performing multi-scale max pooling operations on the feature maps;
[0043] 2. The information is then fed into the neck network to transfer the rich spatial information from the shallow layers to the high-level feature maps, thereby enhancing and fusing the features;
[0044] 3. The data is then input into the detection head for multi-scale feature fusion;
[0045] The output scan information is input into the error correction logic judgment module for error analysis. When it is determined that the collected data does not match the original data in the database, i.e., the data is incorrect, the erroneous data can be corrected and modified to achieve the effect of automatic data error correction.
[0046] Step 5: Error Correction Logic Judgment
[0047] Step 5: Error Correction Logic Judgment
[0048] (S1) Data storage: Construct a standard lesion data database and store it in a tree structure to facilitate efficient querying and comparison;
[0049] (S2) Data Acquisition: Obtain the current detection results through the data acquisition module;
[0050] (S3) Data Analysis: Standardize the test results to ensure they are consistent with the standard data format in the database;
[0051] (S4) Data comparison and judgment: Compare the current test data with the standard data to judge the accuracy of the test results;
[0052] (S5) Error correction execution: If the detection result is abnormal or incorrect, the error correction module will be automatically triggered to correct the erroneous result;
[0053] (S6) Exception handling: If no matching data is found in the database, it is determined that the current data is abnormal, step (S5) is executed to correct the error, and the abnormal situation is recorded to optimize the subsequent detection capabilities of the system.
[0054] Preferably, the CSPDarknet optimizes computational complexity through the CSPNet structure and adopts a gradient flow segmentation mechanism to reduce computational cost while maintaining high accuracy. It can also be used in conjunction with deep learning networks such as ResNet, ResNeXt, and DenseNet. CSPNet divides the input features into two parts through the gradient flow segmentation mechanism. One part extracts features through residual blocks, and the other part is directly passed through cross-layer connections. Finally, the features from the two paths are combined in the fusion stage to reduce computational cost while maintaining accuracy.
[0055] Preferably, the SPP (Spatial Pyramid Pooling) method is used to enhance the network's adaptability to input images of different scales, improve feature extraction capabilities and detection accuracy. By adding a spatial pyramid pooling layer between the convolutional layer (including convolution operations, pooling operations, etc.) and the fully connected layer (FC), the fully connected layer can receive feature vectors of fixed length, thereby eliminating the limitation of the fully connected layer on the input size.
[0056] Preferably, the spatial pyramid pooling layer adopts a hierarchical pooling method to ensure that the feature vector length is fixed, specifically including the following steps:
[0057] ① Multi-scale partitioning: Divide the feature map into multiple grids according to different scales, such as 4×4, 2×2 and 1×1;
[0058] ② Pooling calculation: Max pooling is performed within each grid to extract key information;
[0059] ③ Feature concatenation: Assuming the feature map has 256 channels, pooling will result in features of 16×256, 4×256, and 1×256 dimensions.
[0060] ④ Vector construction: The pooling results at different scales are concatenated into a fixed-length feature vector and input into the fully connected layer to ensure that the network can stably process input images of different sizes.
[0061] Preferably, the SE (Squeeze-and-Excitation) module includes two stages: a squeezing stage and an activation stage. In the squeezing stage, the feature map of each channel is first compressed into a vector of shape 1×1×C by global average pooling (GAP), where C is the number of channels of the feature map. Then, the compressed vector is passed as input to the activation stage for further processing.
[0062] Preferably, in the activation phase, two fully connected layers (FC1 and FC2) are used. To reduce computational complexity, an intermediate dimension r is usually used in the fully connected layers. This dimension is usually a small proportion of the number of input channels. First, the global feature vector z is mapped to a small dimension r through the first fully connected layer (FC1), and then non-linear activation is performed using the ReLU activation function. Then, the second fully connected layer (FC2) further maps the activated features back to the number of channels C to generate the final channel weights and perform a weighted multiplication with the original feature map.
[0063] Preferably, the CBAM attention module is used in the Neck network, with the CBAM module added after each CSPlayer to optimize the fusion of channel and spatial information.
[0064] Preferably, the calculation process for CBAM includes:
[0065] (1) Channel attention calculation: Channel information is obtained using global average pooling and max pooling respectively, and attention weights are calculated through a fully connected layer.
[0066] (2) Spatial attention calculation: Spatial information is obtained by using max pooling and average pooling in the channel dimension, and weights are calculated through convolution.
[0067] (3) Weighted feature map: Multiply the channel attention and spatial attention results with the original feature map respectively to optimize the final feature representation.
[0068] Preferably, the Error Correction Logic Judgment module consists of a data storage module, a data acquisition module, a data analysis module, a data comparison and judgment module, and an error correction execution module, and its workflow is as follows:
[0069] (S1) Data storage: Upload standard lesion data to the data storage module. The data is processed by the modeling module and constructed into a tree-structured database to facilitate efficient querying and matching.
[0070] (S2) Data Acquisition: The data acquisition module obtains the current detection data and uploads it to the data analysis module for processing;
[0071] (S3) Data Analysis: The data analysis module standardizes the collected data to make its format consistent with the database storage format, and uploads the processed data to the data comparison and judgment module;
[0072] (S4) Data Comparison: The data comparison and judgment module compares the analyzed data with the standard data in the database to determine the degree of matching.
[0073] (S5) Error correction execution: If the comparison result shows data errors, the error correction execution module will correct the erroneous data to improve detection accuracy;
[0074] (S6) Exception handling: If no matching data is found in the database, it is determined that the current data is abnormal, step (S5) is executed to correct the error, and the abnormal situation is recorded to optimize the subsequent detection capabilities of the system.
[0075] Preferably, the specific workflow of the data comparison and judgment module in step (S4) is as follows:
[0076] ① Data labeling: Uniquely identify and categorize the analyzed data;
[0077] ② Data partition comparison: The marked data is partitioned according to specific rules and compared step by step with the standard data in the database;
[0078] ③ Result judgment: If the marked data finds a match in the database, the data is judged to be correct and the detection process ends. If no match is found, the error correction process is executed to improve the detection accuracy.
[0079] By adopting the above technical solution, the kidney stone detection system based on the SCC-YOLOX model provided by this invention has the following beneficial effects:
[0080] 1. This invention is based on the YOLOX model network structure, integrates attention mechanism and error correction logic module, and embeds SE attention into the base convolution (BaseConv). By optimizing the backbone network structure, the number of model parameters is reduced, the computational complexity is reduced, and the computational efficiency is improved while ensuring that feature information is not lost. It also alleviates the detection error problem caused by the imbalance of positive and negative samples in medical image data, reduces the detection time cost, effectively improves the detection speed and detection accuracy, and improves the detection effect of kidney stones.
[0081] 2. This invention effectively enhances the spatial location perception capability of feature information by embedding the Coordinate Attention (CA) mechanism module into the horizontal connection part of the feature pyramid, thereby improving the feature expressiveness and aggregation capability, and thus improving the detection accuracy and precision.
[0082] 3. The CBAM module in the Neck network of this invention combines channel attention and spatial attention mechanisms. It obtains channel information through global average pooling and max pooling, and generates spatial attention weights through the pooled feature map. This enables the model to focus on key information regions in both channel and spatial dimensions, thereby enhancing the model's feature extraction and representation capabilities.
[0083] 4. The present invention also includes an error correction logic judgment module, which realizes the comparison and automatic error correction between the detection results and standard lesion data. It can identify misclassifications or abnormalities that occur during the detection process. Through automatic correction and data recording, it effectively reduces the risk of misdiagnosis in kidney stone detection and improves the overall detection performance and reliability of the system. Attached Figure Description
[0084] Other advantages of the invention will become clearer and more readily understood through the following detailed description taken in conjunction with the accompanying drawings, which are merely illustrative and do not limit the invention, wherein:
[0085] Figure 1 This is a schematic diagram of an SCC-YOLOX network structure according to an embodiment of the present invention;
[0086] Figure 2 This is a schematic diagram of the SE module structure according to an embodiment of the present invention;
[0087] Figure 3 This is a schematic diagram of the CA module structure according to an embodiment of the present invention;
[0088] Figure 4 This is a schematic diagram of the CBAM module structure according to an embodiment of the present invention;
[0089] Figure 5This is a schematic diagram of feature vector transformation of the SPP (Spatial Pyramid Pooling) module according to an embodiment of the present invention;
[0090] Figure 6 This is a schematic diagram comparing the YOLOX model of one embodiment of the present invention with the improved model mAP;
[0091] Figure 7 This is an embodiment of the present invention, showing (a) the loss function, (b) the average accuracy curve, (c) the accuracy variation curve, and (d) the accuracy curve of kidney stone images.
[0092] Figure 8 This is a schematic block diagram of the error correction logic judgment module according to an embodiment of the present invention. Detailed Implementation
[0093] In the following text, reference will be made to the appendix. Figure 1-8 This invention describes an embodiment of a kidney stone detection system based on the SCC-YOLOX model.
[0094] The embodiments described herein are specific implementations of the present invention, used to illustrate the concept of the present invention. They are all illustrative and exemplary, and are not intended to limit the present invention. In addition to the embodiments described herein, those skilled in the art can adopt other technical solutions based on the content disclosed in the claims and specification of this application. These technical solutions include technical solutions that make substitutions and modifications to the embodiments described herein.
[0095] The accompanying drawings in this specification are schematic diagrams to help illustrate the concept of the invention, showing the shape of each part and their interrelationship. Please note that, in order to clearly show the structure of each component in the embodiments of the invention, the drawings are not drawn to the same scale, and the same reference numerals are used to indicate the same parts.
[0096] Example 1
[0097] This embodiment discloses a kidney stone detection system based on the SCC-YOLOX model. The system mainly consists of a backbone network, a neck network, a detection head, an SE attention module, a CA attention module, a CBAM attention module, and an error correction logic judgment module. The detection steps are as follows:
[0098] Step 1: Data Input
[0099] (1) Data input: Input a CT image of kidney stones (640*640*3);
[0100] (2) Preprocessing: Image normalization, resizing, data augmentation (such as mosaic, random flipping);
[0101] (3) Input model: Input into YoloBody for object detection;
[0102] Step 2: Backbone Feature Extraction:
[0103] (1) Preliminary feature extraction is performed through the base convolutional layer (BaseConv), and the expressive power of channel information is enhanced by combining the SE attention module;
[0104] (2) Using CSPDarknet as the backbone network, features at different scales are extracted. During the forward process of YOLOPAFPN, P5 and P4 level features are added to the CoordAtt attention module to enhance the location awareness capability.
[0105] (3) The Backbone structure is divided as follows:
[0106] ①dark3 → low-level features (larger size, richer details);
[0107] ②dark4 → Medium-level feature (medium size, balanced information);
[0108] ③dark5 → High-level features (small size, rich semantic information);
[0109] Step 3: Neck network feature fusion:
[0110] YOLOX employs an FPN (Feature Pyramid) + PAN (Path Aggregation) structure to enhance feature fusion, and incorporates a CBAM attention module to improve feature extraction performance.
[0111] (1) Top-down (FPN);
[0112] ①dark5→P5 (reduce the number of channels);
[0113] ② Upsample P5 and merge it with dark4 → P4;
[0114] ③ Upsample P4 and merge with dark3 → P3;
[0115] (2) Bottom-up (PAN);
[0116] ①P3 downsampling, fused with P4 → P4_out;
[0117] ②P4_out downsamples and merges with P5 → P5_out;
[0118] ③The CBAM attention module further optimizes feature representation;
[0119] (3) Final output:
[0120] ①P3_out(80×80, detect small targets);
[0121] ②P4_out(40×40, target detected);
[0122] ③P5_out(20×20, for detecting large targets);
[0123] Step 4: Predicting YOLOX Head classification and regression;
[0124] (1) For each feature layer (P3, P4, P5), perform three-class predictions;
[0125] ① Classification branch (cls_preds): Predicts which category each pixel belongs to;
[0126] ② Regression branch (reg_preds): Predicts the bounding box of the target (4 values: x, y, w, h);
[0127] ③ Target confidence branch (obj_preds): Predicts whether there is a target at this point (1 value);
[0128] (2) Finally, the prediction results of P3_out, P4_out, and P5_out are merged and post-processed.
[0129] Among them, 1. The lesion information detected will also be input into the backbone network;
[0130] 1.1. The Focus module can reduce the number of parameters and improve computational efficiency without losing information. Furthermore, YOLOX uses Anchor-free instead of the traditional Anchor-base on the basis of Focus, discarding anchor boxes and only taking the location of the target center point as a positive sample, which alleviates the problem of imbalance between positive and negative samples and reduces time costs.
[0131] 1.2.CSPNet uses the residual structure in ResNet
[43] to segment the stacked residual blocks, which reduces computational complexity and enhances the feature learning ability of the network.
[0132] 1.3. The SPP (Spatial Pyramid Pooling) module increases the receptive field of the network by performing multi-scale max pooling operations on the feature maps;
[0133] 2. The information is then fed into the neck network to transfer the rich spatial information from the shallow layers to the high-level feature maps, thereby enhancing and fusing the features;
[0134] 3. The data is then input into the detection head for multi-scale feature fusion;
[0135] The output scan information is input into the error correction logic judgment module for error analysis. When it is determined that the collected data does not match the original data in the database, i.e., the data is incorrect, the erroneous data can be corrected and modified to achieve the effect of automatic data error correction.
[0136] Step 5: Error Correction Logic Judgment
[0137] (S1) Data storage: Construct a standard lesion data database and store it in a tree structure to facilitate efficient querying and comparison;
[0138] (S2) Data Acquisition: Obtain the current detection results through the data acquisition module;
[0139] (S3) Data Analysis: Standardize the test results to ensure they are consistent with the standard data format in the database;
[0140] (S4) Data comparison and judgment: Compare the current test data with the standard data to judge the accuracy of the test results;
[0141] (S5) Error correction execution: If the detection result is abnormal or incorrect, the error correction module will be automatically triggered to correct the erroneous result;
[0142] (S6) Exception handling: If no matching data is found in the database, it is determined that the current data is abnormal, step (S5) is executed to correct the error, and the abnormal situation is recorded to optimize the subsequent detection capabilities of the system.
[0143] The CSPDarknet optimizes computational complexity through the CSPNet structure and employs a gradient flow segmentation mechanism to reduce computational costs while maintaining high accuracy. It can be used in conjunction with deep learning networks such as ResNet, ResNeXt, and DenseNet. CSPNet uses a gradient flow segmentation mechanism to divide the input features into two parts: one part is processed through residual blocks to extract features, and the other part is directly passed through cross-layer connections. Finally, the features from both paths are combined in the fusion stage to reduce computational cost while maintaining accuracy.
[0144] The Spatial Pyramid Pooling (SPP) method is adopted to enhance the network's adaptability to input images of different scales, improve feature extraction capabilities and detection accuracy. By adding a Spatial Pyramid Pooling layer between the convolutional layer (including convolution and pooling operations) and the fully connected layer (FC), the fully connected layer can receive feature vectors of fixed length, thereby eliminating the limitation of the fully connected layer on the input size.
[0145] The spatial pyramid pooling layer employs a hierarchical pooling method to ensure a fixed feature vector length, specifically including the following steps:
[0146] ① Multi-scale partitioning: Divide the feature map into multiple grids according to different scales, such as 4×4, 2×2 and 1×1;
[0147] ② Pooling calculation: Max pooling is performed within each grid to extract key information;
[0148] ③ Feature concatenation: Assuming the feature map has 256 channels, pooling will result in features of 16×256, 4×256, and 1×256 dimensions.
[0149] ④ Vector construction: The pooling results at different scales are concatenated into a fixed-length feature vector and input into the fully connected layer to ensure that the network can stably process input images of different sizes.
[0150] The SE (Squeeze-and-Excitation) module consists of two stages: a squeezing stage and an activation stage. In the squeezing stage, the feature map of each channel is first compressed into a vector of shape 1×1×C by global average pooling (GAP), where C is the number of channels in the feature map. Then, the compressed vector is passed as input to the activation stage for further processing.
[0151] During the activation phase, two fully connected layers (FC1 and FC2) are used. To reduce computational complexity, an intermediate dimension r is typically used in the fully connected layers. This dimension is usually a small proportion of the number of input channels. First, the global feature vector z is mapped to a small dimension r through the first fully connected layer (FC1), and then non-linear activation is performed using the ReLU activation function. Next, the second fully connected layer (FC2) further maps the activated features back to the number of channels C to generate the final channel weights, which are then multiplied by a weighted sum with the original feature map.
[0152] The CBAM attention module is used in the Neck network. A CBAM module is added after each CSPrayer to optimize the fusion of channel and spatial information.
[0153] The calculation process of CBAM includes:
[0154] (1) Channel attention calculation: Channel information is obtained using global average pooling and max pooling respectively, and attention weights are calculated through a fully connected layer.
[0155] (2) Spatial attention calculation: Spatial information is obtained by using max pooling and average pooling in the channel dimension, and weights are calculated through convolution.
[0156] (3) Weighted feature map: Multiply the channel attention and spatial attention results with the original feature map respectively to optimize the final feature representation.
[0157] The Error Correction Logic Judgment module consists of a data storage module, a data acquisition module, a data analysis module, a data comparison and judgment module, and an error correction execution module. Its workflow is as follows:
[0158] (S1) Data storage: Upload standard lesion data to the data storage module. The data is processed by the modeling module and constructed into a tree-structured database to facilitate efficient querying and matching.
[0159] (S2) Data Acquisition: The data acquisition module obtains the current detection data and uploads it to the data analysis module for processing;
[0160] (S3) Data Analysis: The data analysis module standardizes the collected data to make its format consistent with the database storage format, and uploads the processed data to the data comparison and judgment module;
[0161] (S4) Data Comparison: The data comparison and judgment module compares the analyzed data with the standard data in the database to determine the degree of matching.
[0162] (S5) Error correction execution: If the comparison result shows data errors, the error correction execution module will correct the erroneous data to improve detection accuracy;
[0163] (S6) Exception handling: If no matching data is found in the database, it is determined that the current data is abnormal, step (S5) is executed to correct the error, and the abnormal situation is recorded to optimize the subsequent detection capabilities of the system.
[0164] The specific workflow of the data comparison and judgment module in step (S4) is as follows:
[0165] ① Data labeling: Uniquely identify and categorize the analyzed data;
[0166] ② Data partition comparison: The marked data is partitioned according to specific rules and compared step by step with the standard data in the database;
[0167] ③ Result judgment: If the marked data finds a match in the database, the data is judged to be correct and the detection process ends. If no match is found, the error correction process is executed to improve the detection accuracy.
[0168] It should be noted that:
[0169] 1. Backbone Network: This invention uses DSP Darknet53 as the backbone feature extraction network of the YOLOX algorithm. The backbone consists of a Residual Network, a Focus Network, a CBS Network, a CSPNet, and an SPP module, wherein:
[0170] (1) The Focus module slices and downsamples the input image without losing information, reducing the number of parameters and improving computational efficiency. At the same time, it adopts the Anchor-free mechanism to replace the traditional Anchor-base method, taking only the target center point position as a positive sample, which alleviates the problem of imbalance between positive and negative samples and reduces time cost.
[0171] (2) CSPNet effectively segments stacked residual blocks by introducing ResNet residual structure into the network structure. From the perspective of network design, CSPNet alleviates the problem of large amount of computation required in previous inference. The solution is to integrate the gradient changes from beginning to end into the feature map, which reduces the amount of computation while ensuring accuracy. CSPNet is a processing idea that can be combined with ResNet, ResNeXt and DenseNet.
[0172] (3) SPP module (e.g.) Figure 5 By using multi-scale max pooling operations, the receptive field of the network is increased, thereby improving the model's ability to detect targets at different scales.
[0173] 2. Neck Network: The Neck structure of this invention combines FPN and PAN. FPN transmits high-level semantic information to shallow feature maps from top to bottom, while PAN transmits positional information to high-level feature maps from bottom to top, enhancing the feature fusion effect. In addition, a CBAM attention module is introduced after each CSPlayer module of the Neck network to optimize the fusion of channel and spatial information and improve the feature representation ability.
[0174] 3. Detection Head: The detection head of this invention adopts a decoupled head structure, which divides the feature map into three branches for target classification, bounding box regression and target confidence prediction, respectively, thereby decoupling classification and localization and improving detection performance.
[0175] 4. Improved YOLOX Algorithm: This invention proposes an improved SCC-YOLOX scheme based on the YOLOX-s model, specifically as follows:
[0176] (1) Introduce the SE attention module into the base convolution module (BaseConv) to enhance the model’s ability to focus on key information channels through the channel weighting mechanism;
[0177] (2) Introduce the CA attention module into the horizontal connection part of the feature pyramid to enhance the expressiveness and aggregation ability of feature information;
[0178] (3) Add a CBAM module after the CSPlayer module in the Neck network to further optimize channel and spatial feature information and improve detection accuracy.
[0179] 4.1SE Attention Module:
[0180] The Squeeze-and-Excitation (SE) module (such as...) Figure 2 By weighting each channel with global information, the network can focus more on key information channels and suppress useless channel features. The SE module is added to the model's convolution operation BaseConv. The original BaseConv is a normal convolution in which all channel features are treated equally. After adding the SE module, each channel is assigned different weights based on global context information. More important channels are enhanced and redundant channels are suppressed, making the model more focused on the detection of small objects.
[0181] The SE module consists of two stages: squeezing and activation. In the squeezing stage, the feature map of each channel is compressed into a vector of shape 1×1×C through global average pooling, where C is the number of channels in the feature map. This vector is then passed as input to the activation function, as shown in formula (1).
[0182]
[0183] Where H and W represent the height and width of the input feature map, z c It is the feature after global average pooling of the Cth channel. The double summation in Equation (1) is to sum all positions in the input channel.
[0184] During the activation phase, two fully connected layers, namely FC1 and FC2, are used. To avoid excessive computation, an intermediate dimension r (usually a small proportion of the number of input channels) is typically used in the fully connected layers to reduce computational complexity. The global feature z is mapped to a smaller dimension r through a fully connected layer (FC1) and then ReLU activation is performed, as shown in formula (2).
[0185] s r =δ(W1z+b1) (2);
[0186] Where W1 and b1 are the weights and biases of the fully connected layer, and δ is the ReLU activation function.
[0187] Next, another fully connected layer (FC2) is used to map the features back to the number of channels C, and then the final channel attention weights are generated through the Sigmoid activation function, as shown in Equation (3):
[0188] s = o(W2s) r +b2) (3)
[0189] Where W2 and b2 are the weights and biases of the second fully connected layer, σ is the sigmoid activation function, and the output s∈R C It is the attention weight of each channel.
[0190] Finally, the generated attention weights s are multiplied channel by channel with the input feature map X to obtain the weighted feature map X′, as shown in formula (4):
[0191] X'(i,j,c)=X(i,j,c)·s c (4);
[0192] Among them, s c It is the attention weight of the Cth channel.
[0193] The global average pooling of the SE module introduces global contextual information to a certain extent, so that the convolution operation is not limited to the local receptive field. The convolution operation itself is local and has limited ability to model the relationship between channels. The SE module can learn the dependency relationship between channels through the fully connected operation of the Excitation part, thereby further optimizing the feature representation.
[0194] 4.2CA Attention Module
[0195] CT images are single-channel grayscale images with dull colors, which can easily cause large target detection and recognition errors. In order to improve the accuracy and precision of detection, the Coordinate Attention (CA) module is embedded into the horizontal connection part of the feature pyramid to enhance the expressiveness and aggregation ability of feature information.
[0196] Coordinate Attention is a lightweight attention mechanism module (such as...) Figure 3 The CA module primarily improves the model's feature representation capability by decomposing channel attention and spatial attention, while preserving location information. Unlike traditional channel attention, the CA module decomposes channel attention into two feature encoding processes, aggregating features along two spatial directions respectively. This method can capture long-range dependencies along one spatial direction while preserving precise location information along the other spatial direction.
[0197] First, global average pooling is performed on the input feature map X to obtain a 1×1×C vector, where each element represents the global average feature of the corresponding channel, as shown in formula (5):
[0198]
[0199] Among them, z c It is the global feature of the Cth channel.
[0200] Next, the global features of each channel are processed through a shared fully connected layer. Generally, the features are first mapped to a smaller dimension through a fully connected layer, then activated by an activation function (usually ReLU), then mapped back to the number of channels through another fully connected layer, and finally the channel attention weights are generated by the Sigmoid function. The output obtained is a 1×1×C vector, representing the importance of each channel, as shown in formula (6):
[0201] M=σ(W2δ(W1z) (6);
[0202] Where W1 and W2 are the weight matrices of the fully connected layer; δ is the ReLU activation function;
[0203] σ is the Sigmoid activation function, used to normalize the obtained attention value.
[0204] Finally, the obtained attention weights M are multiplied channel by channel with the original feature map X to obtain the weighted feature map X′, as shown in equation (7):
[0205] X'(i,j,c)=X(i,j,c)·M(c) (7);
[0207] This means that the feature map of each channel is adjusted by a scalar weight M(c), with important channels being amplified and unimportant channels being suppressed.
[0208] 4.3 CBAM Attention Module
[0209] CBAM (Convolutional Block Attention Module) is a module that combines channel attention and spatial attention (e.g., Figure 4 Channel attention refers to extracting channel information through global average pooling and global max pooling, enhancing attention to specific channels, thereby helping the model learn more effective feature representations. Spatial attention, on the other hand, refers to generating spatial attention weights through pooled feature maps, enhancing attention to specific regions, thereby allowing the model to focus on important regions in the spatial dimension.
[0210] The overall function of the CBAM attention module is to improve the feature representation capability of the model by explicitly modeling the feature importance in the channel and spatial dimensions. Adding CBAM after each CSPlayer in the neck network can further optimize the fused features and highlight key channels and spatial regions.
[0211] The CBAM computation process consists of two stages: channel attention computation and spatial attention computation. The output of each stage is multiplied by the original feature map to obtain the final feature map by weighting.
[0212] (1) Channel attention: Given an input feature map X∈R H×W×C First, global average pooling and global max pooling are performed on the input feature map along the spatial dimensions (height H and width W) to obtain two 1×1×C feature maps, as shown in equations (8) and (9):
[0213]
[0214] The purpose of these two operations is to capture global information for each channel of the input feature map.
[0215] Then, the two feature maps are passed through a shared multilayer perceptron to generate attention weights for each channel. Subsequently, a fully connected layer (FC) is used to map the two pooled feature maps to a lower dimension r, then ReLU activation is applied, and then another fully connected layer is used to map them back to the number of channels C. Finally, the channel attention weights are obtained through the Sigmoid function, as shown in Equation (10):
[0216] M c =σ(W2δ(W1[z avg ;zmax ])) (10);
[0217] Where W1 and W2 are the weight matrices of the fully connected layer, [z avg ;z max The symbol ] represents concatenating the results of average pooling and max pooling, where δ is the ReLU activation function and σ is the Sigmoid activation function, resulting in M. c ∈R C It is the channel attention weight.
[0218] Channel attention weight M c The weighted feature map is obtained by multiplying the input feature map X channel by channel, as shown in equation (11):
[0219] X′ c =X·M c (11);
[0220] (2) Spatial attention: After the channel attention module, we obtain the weighted feature map X′ c ∈R H×W×C Spatial attention obtains the description of each spatial location by performing global average pooling and global max pooling operations on this feature map along the channel dimension, as shown in equations (12) and (13):
[0221]
[0222]
[0223] The two feature maps obtained above are concatenated to obtain a 1×1×2C feature map. Then, a spatial attention map is generated through a 7×7 convolutional layer (or a smaller convolutional kernel), and the final spatial attention weights are obtained through the Sigmoid function, as shown in Equation (14):
[0224] M s =σ(Conv7([f avg ;f max ])) (14);
[0225] Where Conv7 represents a 7×7 convolution operation, the resulting M s σR H×W It is spatial attention weight.
[0226] Finally, the spatial attention weight M s With the weighted feature map X′ c Element-wise multiplication yields the final weighted feature map, as shown in equation (15):
[0227] X' s =X′c ·M s (15);
[0228] 4.4 The error correction logic judgment module includes a data storage module, a data acquisition module, a data analysis module, a data comparison and judgment module, and an error correction execution module;
[0229] (S1) Data storage: Upload standard lesion data to the data storage module. The data is processed by the modeling module and constructed into a tree-structured database to facilitate efficient querying and matching.
[0230] (S2) Data Acquisition: The data acquisition module obtains the current detection data and uploads it to the data analysis module for processing;
[0231] (S3) Data Analysis: The data analysis module standardizes the collected data to make its format consistent with the database storage format, and uploads the processed data to the data comparison and judgment module;
[0232] (S4) Data Comparison: The data comparison and judgment module compares the analyzed data with the standard data in the database to determine the degree of matching.
[0233] (S5) Error correction execution: If the comparison result shows data errors, the error correction execution module will correct the erroneous data to improve detection accuracy;
[0234] (S6) Exception handling: If no matching data is found in the database, it is determined that the current data is abnormal, step (S5) is executed to correct the error, and the abnormal situation is recorded to optimize the subsequent detection capabilities of the system.
[0235] 5. Experimental Results and Analysis:
[0236] 5.1 Experimental parameter settings:
[0237] This experiment was conducted using the PyTorch framework, with an Nvidia GeForce RTX3080 GPU, PyTorch version 1.10.0, Python version 3.8, and CUDA version 11.3. The input image size (Input_size) for the kidney stone dataset was (640, 640). The training epochs were 200. The batch size (Batch_size) was 16 during the first 50 epochs of freezing, then increased to 8 (each time 8 data points were passed to the model for training). The optimizer type (Optimizer_type) used was the SGD optimizer. The maximum learning rate (Init_Ir) was 0.01, and the minimum learning rate (Min_Ir) was 0.0001. Cosine annealing was used to decay the learning rate. The learning rate determined the convergence rate of the objective function. The parameters used are shown in Table 1.
[0238] Table 1 Training parameters
[0239] Parameter Name Value Input_size 640×640 Epoch 200 Freeze_Epoch 50 Freeze_batch_size 16 Unfreeze_batch_size 8 Optimizer_type sgd Init_lr 0.01 Min_lr 0.0001 lr_decay_type cos
[0240] 5.2 Dataset
[0241] A publicly available kidney stone dataset was obtained from Roboflow. This dataset contains various kidney stone images from CT scans, each with an labeled bounding box, covering different sizes, shapes, and locations of stones within the urinary system. The dataset is annotated in Pascal VOC format with a resolution of 391×320. Each image underwent a 50% horizontal flip and random rotation of -10 to +10 degrees for data augmentation. The kidney stone dataset contains 1300 images, which were repartitioned in an 8:2 ratio into a training set of 1040 images and a validation set of 260 images. The dataset ensured transparency and traceability during annotation and processing, guaranteeing the reproducibility of the SCC-YOLOX model. Furthermore, the data quality on the Roboflow platform has been rigorously verified, ensuring that the impact of data quality on performance is not obscured, and guaranteeing that experimental results truly reflect the relationship between data and model performance.
[0242] 5.3 Evaluation Indicators
[0243] To evaluate the detection performance of the model, Precision, AP, number of parameters, and FLOPs were selected as evaluation metrics, among which:
[0244] Precision, the predictive metric, is the detection accuracy, and its calculation formula is:
[0245]
[0246] In the formula, TP stands for True Positive, which means that the predicted result is kidney stone and the label value is also kidney stone, indicating a correct prediction. FP stands for False Positive, which means that the predicted result is kidney stone but there is no label value, indicating a wrong prediction. When the Precision is larger, the FP is smaller, and the number of unlabeled objects predicted as kidney stones is also smaller. This can be understood as the higher the purity of the predicted positive examples and the fewer false positives.
[0247] Recall refers to the rate of recall. The definition of recall is as follows:
[0248]
[0249] Analysis of the formula shows that Recall is concerned with the predicted positive and negative examples, as well as the true positive examples (FN). When Recall is larger, FN is smaller. In this case, the number of positive examples predicted as negative examples is smaller, that is, more of all positive examples are picked out. The higher the Recall, the fewer the missed detections.
[0250] mAP (mean Average Precision) is the average of AP across all categories. In this invention, there is only one category: kidney stones. mAP is AP. AP is the area enclosed by the curve formed by Precision and Recall on the coordinate axes. AP is the most important indicator in object detection, reflecting the overall detection level of the model. The larger the AP of a model, the larger the area enclosed by the PR curve and the coordinate axes, and the higher the overall Precision and Recall are.
[0251] The number of parameters refers to the total number of parameters that need to be trained during model training, and is used to measure the size of the model (computational space complexity).
[0252] 5.4 Experimental Results
[0253] To verify the effectiveness of the improved YOLOX model on the kidney stone dataset, ablation experiments were conducted under a unified experimental environment and parameters. Table 2 shows that the improved model demonstrates improvements over the original model. The model introducing only the SE attention mechanism improved mAP by 1.45 percentage points compared to the original model. Adding CA attention to the SE module also improved accuracy by 3.4 percentage points. Finally, the improved model incorporating SE, CA, and CBAM attention mechanisms, although increasing the number of parameters, showed a 2.74 percentage point increase in mean precision and a 0.52 percentage point increase in recall. This demonstrates that the improved SCC-YOLOX model shows improvements across various performance metrics, further proving the feasibility of this model.
[0254] Table 2 Ablation Experiment Results
[0255]
[0256] Analyzing the experimental data in Table 3, it can be concluded that the improved SCC-YOLOX model has a significant increase in mAP, reaching a final mAP of 76.74%. This not only surpasses the basic YOLOX model (74.00%), but also outperforms the three target detection models YOLOv5 (68.61%), YOLOv7 (74.23%), and YOLOv8 (74.98%). This indicates that by introducing attention mechanisms (SE, CA, and CBAM), the model's feature extraction capability and focus on key targets have been significantly enhanced, further improving its detection performance.
[0257] Table 3 Comparison of experimental results of the model
[0258]
[0259] from Figure 6 As shown in the graph, the horizontal axis represents the number of training epochs (from 0 to 200), and the vertical axis represents the model's mAP. In the initial stage (10-50 epochs), the blue curve (the model with the attention module introduced) is slightly higher than the orange curve (the original model), indicating that the attention module begins to improve model performance in the early stages of training. In the middle stage (50-100 epochs), both curves rise rapidly, indicating that the model gradually converges. In the later stage (100-200 epochs), the curves tend to be stable, indicating that the model has basically converged. The blue curve is always slightly higher than the orange curve, indicating that the model's mAP has been significantly improved after adding the attention mechanism.
[0260] The training results of the YOLOX model after the attention mechanism improvement are as follows: Figure 7 As shown in (a) and (b), Figure 7 In (a), both the training and validation losses gradually decrease as the training progresses and eventually plateau, indicating that the model has successfully converged and there are no obvious gradient explosion or gradient vanishing problems. Figure 7 (b) shows the trend of average detection accuracy with training. The model learns rapidly in the early stage of training and then gradually stabilizes, indicating that the model has good convergence in the training process and there is no significant underfitting or overfitting problem.
[0261] Figure 7 (c) and (d) are the Precision and AP obtained from the best results during training. Figure 7 (c) It can be concluded that the model achieved a precision of 86.27% at a scoring threshold of 0.5, indicating that it has a low false alarm rate in the kidney stone detection task. Figure 7 (d) It can be seen that the AP of the model in kidney stone detection is 76.74%, which indicates that it has achieved a good balance between precision and recall. In particular, the precision can maintain a high level in most of the recall interval.
[0262] In summary, the SCC-YOLOX model outperforms the original YOLOX model on multiple performance metrics, improving mean accuracy (mAP) by 2.74 percentage points, precision by 2.5 percentage points, and recall by 0.52 percentage points. This result fully demonstrates that by introducing an attention mechanism, the model can more effectively focus on the details of kidney stones and maintain a high recognition ability when faced with complex medical images.
[0263] In summary, this invention, by introducing the SE attention module, CoordAtt attention module, and CBAM attention module into the YOLOX model structure, effectively enhances the model's feature extraction and small target detection capabilities, making it particularly suitable for small, feature-indistinct medical imaging targets such as kidney stones. Simultaneously, the included error correction logic module reduces the risk of misdiagnosis, improving the reliability and stability of the system's detection results. By employing the above technical solutions, this invention maintains detection accuracy while reducing the number of model parameters and computational complexity, alleviating sample imbalance problems, and enhancing feature information expression and aggregation capabilities. It boasts advantages such as fast detection speed, high accuracy, and low misdiagnosis rate, and has broad clinical application value.
[0264] The technical features disclosed above are not limited to combinations of the disclosed technical features and other features. Those skilled in the art can also make other combinations of the technical features according to the purpose of the invention, in order to achieve the purpose of the invention.
Claims
1. A kidney stone detection system based on the SCC-YOLOX model, characterized in that: the system consists of a backbone network, a neck network, a head network, an SE attention module, a CA attention module, a CBAM attention module, and an error correction logic judgment module, wherein the detection steps are as follows: Step 1: Data Input (1) Data input: Input a CT image of a kidney stone; (2) Preprocessing: Image normalization, resizing, and data augmentation; (3) Input model: Input into YoloBody for object detection; Step 2: Backbone Feature Extraction: (1) Preliminary feature extraction is performed through the base convolutional layer (BaseConv), and the expressive power of channel information is enhanced by combining the SE attention module; (2) Using CSPDarknet as the backbone network, features at different scales are extracted. During the forward process of YOLOPAFPN, P5 and P4 level features are added to the CoordAtt attention module to enhance the location awareness capability. (3) The backbone structure is divided as follows: ①dark3 → low-level feature; ②dark4 → Intermediate feature; ③dark5 → Advanced features; Step 3: Neck network feature fusion: YOLOX employs a Feature Pyramid (FPN) + Path Aggregation (PAN) structure to enhance feature fusion, and incorporates a CBAM attention module to improve feature extraction performance. (1) Top-down FPN; ①dark5 → P5 reduces the number of channels; ② Upsample P5 and merge it with dark4 → P4; ③ Upsample P4 and merge with dark3 → P3; (2) PAN from bottom to top; ①P3 downsampling, fused with P4 → P4_out; ②P4_out downsamples and merges with P5 → P5_out; ③The CBAM attention module further optimizes feature representation; (3) Final output: ①P3_out: 80×80, for detecting small targets; ②P4_out: 40×40, indicating a target being detected; ③P5_out: 20×20, for detecting large targets; Step 4: Detect head classification and regression; (1) For each feature layer P3, P4, P5, perform three-class predictions; ① Classification branch (cls_preds): Predicts which category each pixel belongs to; ② Regression branch (reg_preds): Predicts the bounding box of the target; ③ Target confidence branch (obj_preds): Predicts whether there is a target at this point; (2) Finally, the prediction results of P3_out, P4_out, and P5_out are merged and post-processed. Among them, 1. The lesion information detected will also be input into the backbone network; 1.
1. The Focus module can reduce the number of parameters and improve computational efficiency without losing information. Furthermore, YOLOX uses Anchor-free instead of the traditional Anchor-base on the basis of Focus, discarding anchor boxes and only taking the location of the target center point as a positive sample, which alleviates the problem of imbalance between positive and negative samples and reduces time costs. 1.
2. CSPNet uses the residual structure in ResNet to segment stacked residual blocks, which reduces computational complexity while enhancing the network's feature learning ability; 1.
3. The Spatial Pyramid Pooling (SPP) module increases the receptive field of the network by performing multi-scale max pooling operations on the feature maps; 2. The information is then fed into the neck network to transfer the rich spatial information from the shallow layers to the high-level feature maps, thereby enhancing and fusing the features; 3. The data is then input into the detection head for multi-scale feature fusion; The output scan information is input into the error correction logic judgment module for error analysis. When it is determined that the collected data does not match the original data in the database, i.e., the data is incorrect, the erroneous data can be corrected and modified to achieve the effect of automatic data error correction. Step 5: Error Correction Logic Judgment: (S1) Data storage: Construct a standard lesion data database and store it in a tree structure to facilitate efficient querying and comparison; (S2) Data Acquisition: Obtain the current detection results through the data acquisition module; (S3) Data Analysis: Standardize the test results to ensure they are consistent with the standard data format in the database; (S4) Data comparison and judgment: Compare the current test data with the standard data to judge the accuracy of the test results; (S5) Error correction execution: If the detection result is abnormal or incorrect, the error correction module is automatically triggered to correct the erroneous result; (S6) Exception handling: If no matching data is found in the database, it is determined that the current data is abnormal, step (S5) is executed to correct the error, and the abnormal situation is recorded to optimize the subsequent detection capabilities of the system.
2. The kidney stone detection system based on the SCC-YOLOX model according to claim 1, characterized in that, The CSPDarknet optimizes computational complexity through the CSPNet structure and employs a gradient flow segmentation mechanism to reduce computational costs while maintaining high accuracy. It can be used in conjunction with ResNet, ResNeXt, and DenseNet networks. CSPNet uses a gradient flow segmentation mechanism to divide the input features into two parts: one part is processed through residual blocks to extract features, and the other part is directly passed through cross-layer connections. Finally, the features from both paths are combined in the fusion stage to reduce computational load while maintaining accuracy.
3. A kidney stone detection system based on the SCC-YOLOX model according to claim 2, characterized in that, The SPP method is adopted to enhance the network's adaptability to input images of different scales, improve feature extraction capabilities and detection accuracy. By adding a spatial pyramid pooling layer between the convolutional layer and the fully connected layer (FC), the fully connected layer can receive feature vectors of fixed length, thereby eliminating the limitation of the fully connected layer on the input size.
4. A kidney stone detection system based on the SCC-YOLOX model according to claim 3, characterized in that, The spatial pyramid pooling layer employs a hierarchical pooling method to ensure a fixed feature vector length, specifically including the following steps: ① Multi-scale partitioning: The feature map is divided into multiple grids according to different scales; ② Pooling calculation: Max pooling is performed within each grid to extract key information; ③ Feature concatenation: Assuming the feature map has 256 channels, pooling will result in features of 16×256, 4×256, and 1×256 dimensions; ④ Vector construction: The pooling results at different scales are concatenated into a fixed-length feature vector and input into the fully connected layer to ensure that the network can stably process input images of different sizes.
5. A kidney stone detection system based on the SCC-YOLOX model according to claim 4, characterized in that, The SE (Squeeze-and-Excitation) module consists of two stages: a squeezing stage and an activation stage. In the squeezing stage, the feature map of each channel is first compressed into a vector of shape 1×1×C by Global Average Pooling (GAP), where C is the number of channels in the feature map. Then, the compressed vector is passed as input to the activation stage for further processing.
6. A kidney stone detection system based on the SCC-YOLOX model according to claim 5, characterized in that, During the activation phase, two fully connected layers (FC1 and FC2) are used. To reduce computational complexity, an intermediate dimension r is typically used in the fully connected layers. This dimension is usually a small proportion of the number of input channels. First, the global feature vector z is mapped to a small dimension r through the first fully connected layer (FC1), and then non-linear activation is performed using the ReLU activation function. Next, the second fully connected layer (FC2) further maps the activated features back to the number of channels C to generate the final channel weights, which are then multiplied by a weighted sum with the original feature map.
7. A kidney stone detection system based on the SCC-YOLOX model according to claim 6, characterized in that, The CBAM attention module is used in the Neck network. A CBAM module is added after each CSPrayer to optimize the fusion of channel and spatial information.
8. A kidney stone detection system based on the SCC-YOLOX model according to claim 7, characterized in that, The calculation process of CBAM includes: (1) Channel attention calculation: Channel information is obtained using global average pooling and max pooling respectively, and attention weights are calculated through a fully connected layer. (2) Spatial attention calculation: Spatial information is obtained by using max pooling and average pooling in the channel dimension, and weights are calculated through convolution. (3) Weighted feature map: Multiply the channel attention and spatial attention results with the original feature map respectively to optimize the final feature representation.
9. A kidney stone detection system based on the SCC-YOLOX model according to claim 8, characterized in that, The specific workflow of the data comparison and judgment module in step (S4) is as follows: ① Data labeling: Uniquely identifying and classifying the analyzed data; ② Data partitioning and comparison: The tagged data is partitioned according to specific rules and compared step by step with the standard data in the database; ③ Result judgment: If the marked data finds a match in the database, the data is judged to be correct and the detection process ends. If no match is found, the error correction process is executed to improve the detection accuracy.
Citation Information
Patent Citations
Ultrasonic image abdominal organ and viscera detection method based on YOLOX
CN117422701A
Power contact network foreign matter detection method and system based on improved YOLOv8 neural network
CN119027401A