A liver micrometastasis image detection method based on an improved YOLO model

By improving the YOLOv8 model and combining multi-scale adaptive convolution and dynamic cross-channel fusion modules, the detection head structure was optimized, solving the problems of insufficient feature extraction and vascular artifact interference in the detection of liver micrometastases. This resulted in high sensitivity and high specificity in detection, making it suitable for real-time clinical detection.

CN121685539BActive Publication Date: 2026-04-17OCEAN UNIV OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
OCEAN UNIV OF CHINA
Filing Date
2026-02-10
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing liver micrometastases detection technologies suffer from insufficient feature extraction capabilities, lack of specificity in feature fusion, poor adaptability of detection heads, and weak generalization ability, failing to meet the detection requirements of high sensitivity, high specificity, and high generalization.

Method used

An improved YOLOV8 model was adopted, which optimized the detection head structure by introducing a nested multi-scale adaptive convolutional module NMSAC and a low-contrast adaptive convolutional module LCAC into the backbone network, combined with a dynamic cross-channel fusion module DCCFM and a dynamic upsampling module DUS, and constructed an adapted liver micrometastasis image detection model to enhance feature extraction and suppress vascular artifact interference.

Benefits of technology

It improves the sensitivity and specificity of detecting liver micrometastases, reduces the impact of interference factors such as vascular artifacts, meets the needs of real-time clinical detection, and has the ability to be generalized across devices and hospitals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121685539B_ABST
    Figure CN121685539B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of liver micrometastasis image detection, and discloses a liver micrometastasis image detection method based on an improved YOLO model. In view of the detection difficulties of liver micrometastasis, such as small size, low contrast, easy confusion with blood vessels / pseudo-lesions, etc., an improved YOLOV8 architecture-based liver micrometastasis image detection model is proposed. By introducing a nested multi-scale adaptive convolution module and a low-contrast adaptive convolution module into the model backbone network, designing a dynamic cross-channel fusion module and a dynamic up-sampling module in the neck network, optimizing the detection head structure at the detection end and adding a medical prior post-processing module, a target detection network suitable for liver micrometastasis image detection scenarios is constructed, which effectively realizes accurate feature extraction, efficient multi-scale fusion and reliable detection and determination of liver micrometastasis, finally improves the detection sensitivity and specificity of micrometastasis, and reduces the influence of interference factors such as blood vessel pseudo-lesions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of liver micrometastasis image detection technology, and specifically relates to a liver micrometastasis image detection method based on an improved YOLO model. Background Technology

[0002] Hepatic micrometastases refer to intrahepatic metastatic tumors with a diameter of <1 cm, often originating from distant metastases of malignant tumors such as colorectal cancer, gastric cancer, and lung cancer. Early and accurate detection of these micrometastases is crucial for clinical treatment planning and prognostic assessment. Clinical data shows that patients with timely detection and intervention of hepatic micrometastases can achieve a 5-year survival rate of 60%-80%, while missed or delayed diagnosis leads to tumor progression to intermediate or advanced stages, drastically reducing the 5-year survival rate to 12%-15%. Currently, the mainstream clinical detection methods are enhanced abdominal CT and enhanced MRI. These two imaging techniques identify lesions by capturing the density / signal differences between the lesion and the liver parenchyma. However, due to the inherent characteristics of hepatic micrometastases and the limitations of clinical detection procedures, many practical challenges remain.

[0003] From an imaging perspective, small liver metastases present significant challenges in detection: First, their small size leads to scarce feature information; lesions with a diameter <5mm correspond to only 3-8 pixels in a 640×640 resolution image, lacking clear distinguishing features such as edges and textures. Second, they exhibit prominent low contrast characteristics; the difference in HU value between lesions and liver parenchyma during the arterial phase of enhanced CT is typically only 5-15 HU, and the signal difference on enhanced MRI is easily masked by noise, resulting in weak lesion feature signals. Third, they are easily confused with intrahepatic vessels and artifacts; the morphology of small portal vein branches and hepatic vein tributaries is similar to that of small lesions, and metal artifacts and motion artifacts further interfere with lesion identification; in clinical practice, the probability of vascular artifacts being misjudged as lesions is as high as 25%-30%.

[0004] These characteristics make liver micrometastases a recognized challenge in the field of medical imaging. Traditional clinical detection relies on manual interpretation of images by physicians, requiring a comprehensive judgment based on imaging equipment parameters, patient history, and other information. However, manual detection has significant limitations: firstly, it is inefficient, as a single patient's abdominal CT / MRI images contain dozens to hundreds of slices, requiring physicians 15-30 minutes to complete the full sequence interpretation, making it difficult to meet the needs of large-scale screening; secondly, it is highly subjective and has a high rate of missed diagnoses, influenced by physician experience and fatigue. The manual missed diagnostic rate for liver micrometastases <5mm in diameter reaches 30%-40%, and in primary hospitals where physicians lack experience, the rate can be as high as 50% or more. To address the pain points of manual image interpretation, deep learning-based medical imaging detection technologies have developed rapidly, with the YOLO series of object detection algorithms becoming a mainstream research direction due to their combination of detection speed and accuracy.

[0005] However, when YOLO-based target detection algorithms are directly applied to the detection of small liver metastases, several adaptation deficiencies remain: First, the backbone network's feature extraction capability is insufficient, and the fixed receptive field struggles to capture both the local details of small lesions and the global contextual features of the liver parenchyma, failing to effectively capture the weak feature signals of low-contrast small lesions. Second, the feature fusion logic of the neck network lacks specificity; the PANet architecture's upsampling uses a fixed interpolation method, easily losing edge details of small lesions, and cross-channel fusion does not consider the medical priors of liver tissue, failing to suppress interfering features such as blood vessels and artifacts. Third, the optimization direction of the detection head is out of sync with clinical needs; the original detection head uses a uniform bounding box regression weight and binary classification logic, failing to optimize for the localization accuracy requirements of small lesions and failing to effectively distinguish between lesions and vascular artifacts. Finally, existing YOLO-based improvement schemes mostly focus on general small target detection, without incorporating the medical characteristics of small liver metastases (such as anatomical distribution patterns and image grayscale features) for targeted design, resulting in detection performance that fails to meet the stringent requirements of clinical diagnosis.

[0006] In summary, existing clinical detection methods and deep learning detection technologies cannot fully meet the detection requirements of high sensitivity, high specificity, and high generalization for liver micrometastases. Therefore, developing a dedicated detection method that adapts to the imaging characteristics of liver micrometastases, integrates prior medical knowledge, and balances detection accuracy and efficiency has become an urgent need in the clinical and technical fields.

[0007] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art. Summary of the Invention

[0008] The purpose of this invention is to propose a method for detecting liver micrometastases based on an improved YOLO model. This method improves the structure of the traditional YOLO model to construct an image detection model specifically adapted to the detection scenario of liver micrometastases, so as to achieve accurate feature extraction, efficient multi-scale fusion and reliable detection and judgment of liver micrometastases. Ultimately, it helps to improve the detection sensitivity and specificity of micro lesions and reduce the influence of interference factors such as vascular artifacts.

[0009] To achieve the above objectives, the present invention adopts the following technical solution:

[0010] A method for detecting small liver metastases based on an improved YOLO model includes the following steps:

[0011] Step 1. Obtain abdominal CT or enhanced MRI images of the liver, preprocess the images, and construct a dataset;

[0012] Step 2. Build a liver micrometastasis image detection model based on the improved YOLOV8 model architecture, which includes a backbone network, a neck network, and a detection head;

[0013] In the backbone network, the improved C2F module NMSAC-C2F replaces the original C2F module;

[0014] The NMSAC-C2F module replaces the cascaded Bottleneck unit with the NMSAC-Bottleneck module, enhancing the feature extraction capability for liver micrometastases while ensuring full compatibility of input and output dimensions with the original C2F module.

[0015] The core of the NMSAC-Bottleneck module is the multi-scale adaptive convolution module NMSAC;

[0016] A low-contrast adaptive convolutional module, namely the LCAC module, is designed between the last NMSAC-C2F module in the backbone network and the SPPF module in the backbone network to specifically enhance the weak feature signals of occult liver micrometastases.

[0017] A dynamic cross-channel fusion module DCCFM is designed in the neck network. Combining the medical prior of the channel feature clusters of liver tissue, it dynamically fuses multi-scale features across channels to suppress the interference of vascular artifacts on small lesions and improve the lesion feature recognition.

[0018] Step 3. Train the liver micrometastasis image detection model constructed in Step 2 based on the dataset from Step 1, and use the trained liver micrometastasis image detection model to achieve liver micrometastasis image detection.

[0019] Furthermore, based on the aforementioned method for detecting liver micrometastases using an improved YOLO model, this invention also proposes a corresponding system for detecting liver micrometastases using an improved YOLO model, which employs the following scheme:

[0020] A liver micrometastasis image detection system based on an improved YOLO model includes the following modules:

[0021] The preprocessing module is used to acquire abdominal CT or enhanced MRI images of the liver and to preprocess the images.

[0022] And a prediction module, used to build a liver micrometastasis image detection model based on an improved YOLOV8 model architecture, wherein the liver micrometastasis image detection model includes a backbone network, a neck network and a detection head;

[0023] In the backbone network, the improved C2F module NMSAC-C2F replaces the original C2F module;

[0024] The NMSAC-C2F module replaces the cascaded Bottleneck unit with the NMSAC-Bottleneck module, enhancing the feature extraction capability for liver micrometastases while ensuring full compatibility of input and output dimensions with the original C2F module.

[0025] The core of the NMSAC-Bottleneck module is the multi-scale adaptive convolution module NMSAC;

[0026] A low-contrast adaptive convolutional module, namely the LCAC module, is designed between the last NMSAC-C2F module in the backbone network and the SPPF module in the backbone network to specifically enhance the weak feature signals of occult liver micrometastases.

[0027] A dynamic cross-channel fusion module DCCFM is designed in the neck network. Combining the medical prior of the channel feature clusters of liver tissue, it dynamically fuses multi-scale features across channels to suppress the interference of vascular artifacts on small lesions and improve the lesion feature recognition.

[0028] The dataset is constructed based on the preprocessed data, the liver micrometastasis image detection model is trained, and the trained liver micrometastasis image detection model is used to realize liver micrometastasis image detection.

[0029] The present invention has the following advantages:

[0030] As described above, this invention discloses a method for detecting liver micrometastases based on an improved YOLO model. This method constructs a liver micrometastases image detection model based on an improved YOLOV8 model architecture. Specifically, in terms of model structure, this invention designs a nested multi-scale adaptive convolutional module NMSAC and an NMSAC-C2f module based on this NMSAC module in the backbone network. The NMSAC module adopts a nested architecture of main branch + two auxiliary branches, dynamically allocating the weights of each branch through adaptive weight fusion units, taking into account both the local detailed features of liver micrometastases and the global contextual features of the liver parenchyma, thus solving the problem of insufficient multi-scale feature capture by traditional fixed receptive field convolution. Furthermore, this invention proposes a low-contrast adaptive convolutional module LCAC between the last NMSAC-C2f module and the SPPF module in the backbone network. This module identifies low-contrast lesion regions by calculating the gray-level variance of local regions in the feature map, dynamically adjusting the convolution kernel weights and stride to specifically enhance the weak feature signals of occult liver micrometastases, adapting to low-contrast lesion detection scenarios. Furthermore, this invention innovatively proposes a dynamic cross-channel fusion module, DCCFM, in the neck network. This module combines liver tissue medical priors to perform channel feature clustering, assigning high weights to lesion-related channels. Simultaneously, it enhances lesion features and suppresses interference from blood vessels and artifacts through parallel computation of 3×3 and 7×7 cross-scale convolutions. Additionally, this invention proposes using a dynamic upsampling module, DUS, to replace the two original upsamples in the neck region of the overall network, solving the problem of lost details in small lesions due to the original interpolation. Through a strategy of lesion perception + dynamic weight adjustment, it prioritizes the recovery of detailed features in low-contrast lesion areas while ensuring upsampling efficiency in the background region. Finally, this invention improves the detection head structure, innovatively proposing the MSLD-Detect detection head. By introducing a small-box adaptation regression weight mechanism and lesion-blood vessel artifact contrast loss, it optimizes the localization accuracy and class discrimination ability of small lesions, effectively addressing the problem of insufficient adaptability of the original detection head to small targets. This invention enhances feature extraction for low-contrast, small-sized hepatic micrometastases through the targeted design of the NMSAC and LCAC modules, effectively compensating for the shortcomings of traditional algorithms in capturing weak feature signals. Simultaneously, leveraging the medical prior fusion and channel grouping strategy of the DCCFM module, and the multi-dimensional verification of the medical prior post-processing module, it significantly suppresses interference from vascular artifacts and metal artifacts, improving the specificity of detection results. Furthermore, this invention retains the lightweight YOLOv8 architecture, with core innovative modules all employing lightweight designs, without significantly increasing the number of model parameters or computational load, meeting the application needs of real-time clinical detection. In addition, this invention is adaptable to multimodal imaging such as enhanced abdominal CT and enhanced MRI, and is compatible with differences in scanning parameters from different hospitals and devices, maintaining stable detection performance in cross-scenario applications. Attached Figure Description

[0031] Figure 1 This is a flowchart of the liver micrometastasis image detection method based on the improved YOLO model in an embodiment of the present invention;

[0032] Figure 2 This is a network structure diagram of the liver micrometastasis image detection model built in the embodiment of the invention;

[0033] Figure 3 This is a network structure diagram of the NMSAC-C2f module in an embodiment of the present invention;

[0034] Figure 4 These are schematic diagrams illustrating two operating modes of the NMSAC-Bottleneck module in an embodiment of the present invention; wherein... Figure 4 (a) and (b) in the diagram correspond to the on and off states of the shortcut switch, respectively.

[0035] Figure 5 This is a network structure diagram of the NMSAC module in an embodiment of the present invention;

[0036] Figure 6 This is a network structure diagram of the LCAC module in an embodiment of the present invention;

[0037] Figure 7 This is a network structure diagram of SPPF in an embodiment of the present invention;

[0038] Figure 8 This is a network structure diagram of the Dynamic Upsampling Module (DUS) in an embodiment of the present invention;

[0039] Figure 9 This is a network structure diagram of the Dynamic Cross-Channel Fusion Module (DCCFM) in an embodiment of the present invention;

[0040] Figure 10 This is a network structure diagram of the MSLD-Detect head in an embodiment of the present invention. Detailed Implementation

[0041] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0042] Example 1

[0043] This embodiment 1 addresses the challenges of detecting small liver metastases due to their small size, low contrast, and susceptibility to confusion with blood vessels / artifacts. It also addresses the shortcomings of existing YOLO models in this scenario, such as insufficient feature extraction, lack of specificity in feature fusion, poor adaptability of the detection head, and weak generalization ability. Therefore, it provides a method for detecting small liver metastases based on an improved YOLO model. This method proposes a small liver metastasis image detection model based on an improved YOLOV8 architecture. The model includes a backbone network, a neck network, and a detection head. This invention constructs a detection network adapted to the image detection scenario of liver micrometastases by introducing a nested multi-scale adaptive convolutional module NMSAC and a low-contrast adaptive convolutional module LCAC into the backbone network, designing a dynamic cross-channel fusion module DCCFM and a dynamic upsampling module DUS in the neck network, optimizing the MSLD-Detect detection head at the detection end and adding a medical prior-post-processing module. This enables accurate feature extraction, efficient multi-scale fusion, and reliable detection and judgment of liver micrometastases, ultimately improving the detection sensitivity and specificity of micro lesions, reducing the influence of interference factors such as vascular artifacts, and taking into account both the clinical real-time detection needs and the generalization ability across devices and hospitals, providing reliable technical support for the formulation of clinical treatment plans.

[0044] like Figure 1 As shown, the method for detecting liver micrometastases based on the improved YOLO model includes the following steps:

[0045] Step 1. Obtain abdominal CT or enhanced MRI images of the liver, preprocess the images, and construct a dataset.

[0046] First, obtain abdominal CT or enhanced MRI images of the liver, and then preprocess the images as follows:

[0047] First, the image resolution is uniformly normalized to 640×640 pixels. Then, Gaussian filtering and morphological opening operations are used to remove metal artifacts and motion artifacts. Next, the image grayscale values ​​are normalized to the [0,1] interval. Finally, the effective area of ​​the liver parenchyma is extracted using a liver region segmentation algorithm based on U-Net to remove irrelevant areas of other organs in the abdominal cavity and reduce background interference.

[0048] The preprocessed images are labeled with three categories: liver micrometastases (lesions, labeled 0), vascular artifacts (labeled 1), and background (labeled 2). The labeling results must be consistent with the classification output dimension of the subsequent MSLD-Detect head to provide standard labels for model training. A dataset is constructed based on the labeled images for model training as described below.

[0049] Step 2. Build a liver micrometastasis image detection model based on the improved YOLOV8 model architecture, which includes a backbone network, a neck network, and a detection head.

[0050] This invention uses YOLOv8 as the basic framework and addresses the pain points of detecting small liver metastases (<1cm in diameter) due to their small size, low contrast, and susceptibility to confusion with blood vessels / artifacts. It forms a dedicated detection network adapted to this liver micrometastasis image detection scenario by directionally reconstructing the backbone network and the neck feature fusion network (i.e., the neck network).

[0051] This invention makes the following improvements to the original YOLOv8 architecture:

[0052] In the backbone network, the improved C2F module NMSAC-C2F replaces the original C2F module.

[0053] The NMSAC-C2F module replaces the cascaded Bottleneck units with the NMSAC-Bottleneck module, enhancing the feature extraction capability for liver micrometastases while ensuring full compatibility of input and output dimensions with the original C2F module.

[0054] The core of the NMSAC-Bottleneck module is the multi-scale adaptive convolution module NMSAC.

[0055] A low-contrast adaptive convolutional module, namely the LCAC module, is designed between the last NMSAC-C2F module in the backbone network and the SPPF module in the backbone network to specifically enhance the weak feature signals of occult liver micrometastases.

[0056] A dynamic cross-channel fusion module DCCFM is designed in the neck network. Combining the medical prior of the channel feature clusters of liver tissue, it dynamically fuses multi-scale features across channels to suppress the interference of vascular artifacts on small lesions and improve the lesion feature recognition.

[0057] Furthermore, in the neck network, the original Upsample module is replaced with the Dynamic Upsampling (DUS) module.

[0058] Specifically, the feature maps preprocessed in step 1 are then fed into the improved backbone network for core feature extraction.

[0059] The improved backbone network retains the basic architecture logic of YOLOv8, and only makes targeted modifications to the core feature extraction process.

[0060] like Figure 2As shown, the overall processing flow of the backbone network is as follows: the initial 3×3 convolutional layer (64 channels, stride 2) after input maintains its original function, only undertaking the basic downsampling and preliminary extraction of shallow texture features, without any additional modifications.

[0061] The output feature map of the initial convolutional layer is then stacked with four improved C2f modules, namely NMSAC-C2f. The four NMSAC-C2f modules are defined starting from the input, and are designated as the first, second, third, and fourth NMSAC-C2f modules in that order.

[0062] Each NMSAC-C2f module retains the original 1×1 channel compressed / fused convolution and residual connection structure in C2f, only replacing all the 3×3 ordinary convolutions responsible for mid- and deep feature extraction within the module with nested NMSAC modules.

[0063] The NMSAC module adopts a nested structure of a main branch and two auxiliary branches. The main branch is a 3×3 standard convolution (the number of channels is the same as the original 3×3 convolution), and the two auxiliary branches are a 1×1 compressed convolution (the number of channels is halved) and a 5×5 deformable convolution (the number of channels is the same as the main branch). Through an adaptive weight fusion unit, the weights of each branch are dynamically allocated based on the gray-level gradient values ​​of the feature map pixels, which not only captures the local detailed features of liver micrometastases, but also takes into account the global contextual features of the liver parenchyma.

[0064] After the output feature map of the fourth NMSAC-C2f module and before the SPPF module, a low-contrast adaptive convolution module LCAC is inserted. This LCAC module identifies low-contrast weakly enhanced lesion regions by calculating the gray-level variance of local regions of the feature map, dynamically adjusts the weight coefficients and stride of the convolution kernel, and adaptively generates the convolution kernel parameter matrix based on the contrast distribution of each batch of images, thereby enhancing the weak feature signals of occult liver micrometastases.

[0065] The number of input and output channels of the LCAC module is consistent with the output of the preceding NMSAC-C2f module (512 channels), without disrupting the feature flow logic. The SPPF module and the auxiliary convolutional layers before and after it for channel dimension adaptation retain their original structure, only receiving the enhanced feature maps output by the LCAC module. Finally, the improved backbone network outputs backbone feature maps of three scales: 8×8, 16×16, and 32×32, completing the core feature extraction (these output feature maps enter the neck network).

[0066] The improved neck network is based on the original PANet architecture of YOLOv8. It retains the upsampling and downsampling paths and residual fusion logic of PANet, and only replaces and optimizes the key modules in PANet that are responsible for multi-scale feature fusion.

[0067] The overall processing flow of the neck network is as follows:

[0068] First, the output feature map (8×8) of the SPPF module at the end of the improved backbone network is input to the Dynamic Upsampling (DUS) module of the neck network. After being upsampled by 2x, it is concatenated with the feature map (16×16) output by the third NMSAC-C2f module in the backbone network through a Concat operation. The concatenated feature map is then fed into the first C2f module for feature refinement. Next, the feature map output by the second NMSAC-C2f module in the backbone network is input to another Concat operation in the neck network. Simultaneously, the output feature map of the first C2f module is first processed by the DUS module of the neck network, and then concatenated with the feature map output by the backbone network through this Concat operation. The concatenated feature map is then fed into the second C2f module for secondary feature refinement. The refined feature map is then input to the Dynamic Cross-Channel Convolutional Fusion (DCCFM) module for channel grouping and interference suppression based on medical priors.

[0069] Subsequently, the output feature map of DCCFM is processed by the Concat operation of the neck network and concatenated with the feature map output by the first C2f module. The concatenated feature map is then sent to the third C2f module for refinement. The refined feature map is then processed by the DCCFM module again to further enhance lesion features and suppress vascular / artifact interference. Finally, the output feature map of DCCFM is processed by the Concat operation of the neck network and concatenated with the output feature map of the terminal SPPF module in the backbone network. The concatenated feature map is then sent to the fourth C2f module for final feature refinement. Finally, the Neck outputs a multi-scale fused feature map, which is directly fed into the subsequent detection head.

[0070] The three scale feature maps output by the improved Neck are respectively connected to the MSLD-Detect head (whose structure will be described in detail below). This head retains the anchorless box structure of YOLOv8, and optimizes the bounding box regression and class determination logic for liver micrometastases: the localization accuracy of micro lesions is improved by adapting the regression weights to small boxes (the smaller the lesion size, the higher the regression weight), and the feature discrimination between the two types of targets is enhanced by the lesion-vessel artifact contrast loss. Finally, the preliminary detection results containing bounding box coordinates, detection confidence, and class probability are output.

[0071] Furthermore, the preliminary results can be processed by the medical prior-processing module. This module combines the clinical prior knowledge that liver micrometastases are mostly distributed under the liver capsule and far from large blood vessels. It uses morphological filtering to remove false positive boxes with abnormal morphology, and then uses the positional relationship between lesions and blood vessels to remove mislabeled blood vessel associations. Finally, it outputs the location coordinates, size, detection confidence, and visual labeled image of the liver micrometastases, thus completing the entire detection process.

[0072] The following section provides a detailed explanation of each module in the improved network structure.

[0073] like Figure 2 As shown, the Conv module (reusing the original YOLOv conv) adopts a cascaded structure of convolutional layers + batch normalization (BN) layers + SiLU activation function, and is the standard basic feature processing unit of YOLO. The Conv module is retained because it only undertakes basic functions. The initial Conv module under the input layer is responsible for completing the initial transformation of the input image into a feature map, converting the 3-channel image into a 64-channel feature map and achieving the first downsampling. The Conv module connecting the NMSAC-C2f modules is used to adjust the channel dimensions between different modules to ensure the stability of the feature flow links in the backbone network. It does not participate in the extraction of core lesion features, but only serves as a basic link unit to cooperate with the feature enhancement logic of innovative modules such as NMSAC and LCAC.

[0074] The NMSAC-C2F module is a targeted improvement based on the original YOLO C2F module. Its core is to retain the overall framework of channel conversion, branch splitting, and fusion of the original C2F module, only replacing the cascaded Bottleneck units within the module with the innovative NMSAC-Bottleneck module. This enhances the feature extraction capability for liver micrometastases while ensuring full compatibility of the module's input / output dimensions with the original C2F. Its structure is as follows: Figure 3 As shown.

[0075] The input feature map received by the NMSAC-C2F module includes height H, width W, and number of input channels C. in The three-dimensional features are first fed into a 1×1 convolutional layer for initial channel number conversion. This convolutional layer uses a kernel of size 1, with a stride of 1 and no padding. After processing by this convolutional layer, the height and width of the feature map remain unchanged, only the number of channels is converted from the original input channel number to the target output channel number preset by the module.

[0076] After the channel conversion is completed, the feature map will be split into two parallel branches through the Split operation. The height and width of the feature map of the two branches are the same as before the split, and the number of channels is half of the target output channel number. One of the branches does not participate in any feature extraction calculations and always remains in a direct connection state. It is only retained as a basic feature branch in the subsequent fusion stage.

[0077] Another branch will sequentially connect several NMSAC-Bottleneck modules, with the number of NMSAC-Bottleneck modules in the connection being exactly the same as the number of Bottleneck modules contained in the original C2F module. Furthermore, all NMSAC-Bottleneck modules will perform targeted liver micrometastasis feature extraction on the feature map of this branch.

[0078] After the concatenated NMSAC-Bottleneck modules complete feature processing, the feature maps of the directly connected branches and the concatenated NMSAC-Bottleneck branches are concatenated using a Concat operation. The height and width of the concatenated feature map remain unchanged, but the number of channels is expanded to half the target output channel number multiplied by (the number of concatenated NMSAC-Bottleneck modules plus 2). The concatenated feature map then enters a 1×1 convolutional layer again, using a kernel of size 1, a stride of 1, and no padding. The purpose is to restore the expanded number of channels to the module's preset target output channel number. At this point, the feature map's height H, width W, and number of channels C are... out Each dimension is consistent with the output dimension of the original C2F module.

[0079] Finally, the NMSAC-C2F module can optionally enable the shortcut residual connection mechanism, which adds the output feature map to the original input feature map received by the module by residual addition. Regardless of whether this mechanism is enabled, the final output feature map of the module has a fixed dimension of height × width × target output channel number, which perfectly matches the input and output dimensions of the original C2F module. It can seamlessly adapt to other modules in the YOLO backbone network without disrupting the flow logic of features in the backbone network.

[0080] The NMSAC-Bottleneck module is the core unit of the NMSAC-C2F module. It is modified based on the original YOLO Bottleneck module, and retains the shortcut switching logic and basic link structure of the original module. Only the two 3×3 ordinary convolutional layers responsible for core feature extraction are replaced with NMSAC modules. In this way, the feature expression ability of a single module for liver micrometastases is enhanced without changing the input and output dimensions of the module.

[0081] like Figure 4 As shown, the NMSAC-Bottleneck module includes two operating modes, corresponding to the on and off states of the shortcut switch, respectively. Figure 4 (a) and Figure 4 As shown in (b) of the diagram.

[0082] When the shortcut switch is on, the input feature map (containing a fixed height, width, and number of channels) received by the module first enters the first NMSAC module. After feature extraction by the first NMSAC module, the height, width, and number of channels of the output feature map are completely consistent with the input. Subsequently, the feature map will pass through a batch normalization layer (BN) to normalize the data distribution. After batch normalization, the feature map will be transformed into a nonlinear feature map through the SiLU activation function.

[0083] The activated feature map enters the second NMSAC module, repeating the above process of feature extraction, batch normalization and SiLU activation to obtain an intermediate output feature map. Finally, the intermediate output feature map is added to the original input feature map received by the module by residual addition, and the dimension of the final output feature map is still consistent with that of the input feature map.

[0084] When the shortcut switch is off, the module's processing flow is exactly the same as when the switch is on, except that the residual addition operation in the last step is removed, and the feature map after activation of the second NMSAC sub-module is directly used as the module's final output. The dimension of the output feature map is also consistent with that of the input feature map.

[0085] like Figure 5 As shown, the NMSAC module is a multi-branch adaptive fusion convolutional unit designed for the detection of liver micrometastases. The height H, width W, and number of channels C of its input feature map are completely matched with the number of input channels of the NMSAC-Bottleneck module, and the dimension of the output feature map is also consistent with the input.

[0086] The NMSAC module's overall structure consists of three parallel convolutional branches plus an adaptive weight fusion unit, which solves the problem that traditional fixed receptive field convolution cannot simultaneously capture details of small lesions and extract global contextual relationships.

[0087] The input feature map is first split into three functionally differentiated parallel convolutional branches (i.e., a three-way parallel convolutional branch with a main branch and two auxiliary branches), and each branch performs its own function to extract features.

[0088] The first branch is the detail feature branch. This branch uses a 3×3 standard convolutional layer for feature extraction. The kernel size is set to 3, the stride is 1, and the padding value is 1. The number of output channels is the same as the number of input feature maps. After the feature map passes through this convolutional layer, it will be processed by a batch normalization layer and the SiLU activation function in sequence. Finally, the output is a feature map mainly composed of detailed features such as the local edges and textures of liver micrometastases. This branch is the basic link for the entire submodule to capture the core details of micro lesions.

[0089] The second branch is the channel compression branch. This branch first compresses the number of channels in the input feature map to half of the original number using a 1×1 convolutional layer. This 1×1 convolutional layer uses a kernel of size 1, a stride of 1, and no padding. After channel compression, the feature map is processed by a batch normalization layer and the SiLU activation function, and then another 1×1 convolutional layer restores the number of channels to the original number. Figure 1 The number of features is reduced, and the final output feature map is obtained. The core function of this branch is to simplify redundant information in the feature data, reduce the overall amount of computation, and at the same time help to enhance the adaptability of features in the channel dimension.

[0090] The third branch is the context-related branch. This branch first predicts the sampling point offset of a 5×5 deformable convolution using a 3×3 convolutional layer. The 3×3 convolutional layer has a kernel size of 3, a stride of 1, and a padding value of 1. The number of output channels is fixed at 50. This corresponds to the offset of the 25 sampling points of the 5×5 convolutional kernel in the x and y directions. The calculation formula is:

[0091] .

[0092] in The input feature map represents the NMSAC module. The first layer represents the convolutional layer used to predict the offset; the predicted offset is then applied to a 5×5 deformable convolutional layer with a kernel size of 5, a stride of 1, and padding of 2. The number of output channels is equal to the number of input features. Figure 1 After passing through this deformable convolutional layer, the feature map is also processed by a batch normalization layer and the SiLU activation function, and finally output as a feature map.

[0093] By dynamically adjusting the sampling area of ​​the convolution kernel, the context association branch can effectively capture the global context association between liver micrometastases and surrounding liver parenchyma, blood vessels and other tissues, thus making up for the limitations of fixed receptive field convolution.

[0094] The feature maps output from the main branch and the two auxiliary branches are jointly fed into the adaptive weight fusion unit to complete the directional feature fusion.

[0095] First, the gray-level gradient magnitude of the input feature map is calculated using the Sobel operator to determine the regions of potential liver micrometastases in the feature map. The calculation formula is:

[0096] ;

[0097] in and These represent the gradient values ​​of the feature map in the x-axis and y-axis directions, respectively.

[0098] The calculated gray-level gradient magnitudes are then normalized to obtain the weight coefficients corresponding to the three branches. The sum of the three weight coefficients is 1. The higher the gradient magnitude (i.e., the region suspected of having liver micrometastases), the greater the proportion of the weight coefficient corresponding to the detail feature branch, thereby enhancing the extraction of detail features in the lesion region.

[0099] Finally, the output feature maps of the main branch and the two auxiliary branches are fused using a weighted summation method. The fusion formula is as follows:

[0100] ;

[0101] in Represents the fused feature map; , , These represent the output feature maps of the detail feature branch, the channel compression branch, and the context association branch, respectively. , , This represents the weight coefficient of the corresponding branch. The final output is the fused feature map. It achieves targeted feature extraction effects that enhance the extraction of details in lesion areas and enhance the contextual association in background areas.

[0102] like Figure 6 As shown, the LCAC module is a feature enhancement unit designed specifically for the detection of low-contrast liver micrometastases. It is precisely inserted between the last NMSAC-C2F module and the SPPF module in the backbone network. Its input is the output feature map of the NMSAC-C2F module, with a fixed dimension of H×W×C. The dimension of the output feature map is completely consistent with the input. It can be seamlessly embedded into the original network without additional dimension adaptation, and will not disrupt the flow logic of features in the backbone network.

[0103] The LCAC module consists of a local contrast perception unit, a dynamic convolution adjustment unit, and a feature refinement output unit. Its core function is to dynamically adjust the convolution strategy by perceiving the local contrast differences in the feature map, thereby specifically enhancing the weak features of low-contrast liver micrometastases while ensuring computational efficiency in conventional regions.

[0104] The function of the local contrast sensing unit is to identify low-contrast suspected lesion areas in the input feature map, providing a basis for subsequent dynamic adjustments. This local contrast sensing unit first performs a 3×3 sliding window division on the input feature map, generating a local window for each pixel containing itself and eight surrounding pixels. Then, it calculates the grayscale extreme value for each window to obtain the maximum grayscale value within the window. With minimum gray value Then, substitute the values ​​into the local contrast formula to calculate the contrast of each window:

[0105] ;

[0106] Among them, 10 -5 A small constant is used to avoid the denominator being zero. Finally, the contrast values ​​of all windows are calculated. Normalization is performed to map the contrast ratio C to the [0,1] interval, generating a pixel-level contrast coefficient map. .

[0107] The closer the value is to 0, the more likely the area is a low-contrast suspected lesion area; The closer the value is to 1, the more typical the contrast ratio indicates a background area with normal contrast. After calculation, the local contrast sensing unit will display the contrast coefficient map. Compared with the original input features Figure X The data is passed in parallel to the next unit, providing pixel-level information for dynamically adjusting the convolution strategy. The dynamic convolution adjustment unit is based on the output of the local contrast sensing unit. The graph and the original feature map are used to perform two key operations in parallel: weight adjustment and step size adjustment.

[0108] During weight adjustment, this unit will adjust the original weights of the preset 3×3 convolution kernel. With coefficient (1+(0.5-) Multiplying these results in dynamically adjusted convolutional kernel weights. ,when When smaller (low contrast area), (0.5- A positive value will increase the weight of the convolution kernel, strengthening the feature response of that region; when... When the area is large (in the normal range), the weights remain close to their original values ​​to avoid over-amplifying background noise. During step size adjustment, this unit is based on... Threshold determination for dynamically setting the convolution stride: If <0.3 (low-contrast suspected lesion area), set the step size to 1 to avoid losing weak feature details during downsampling; if ≥0.3 (normal contrast region), stride set to 2, maintaining normal downsampling efficiency. The adjusted convolutional kernel weights and stride will be applied to a dynamic 3×3 convolutional layer to perform convolution calculations on the original feature map. The output dimension is still a dynamic convolutional feature map of H×W×C, ensuring consistency with the input dimension. This strengthens the weak features of low-contrast lesions while maintaining the computational efficiency of normal regions.

[0109] The feature refinement output unit is responsible for normalizing and applying nonlinear activations to the feature map after dynamic convolution, further refining the feature representation. This unit first performs batch normalization (BN) on the dynamically convolutional feature map to accelerate model convergence and improve feature stability. Then, it introduces a nonlinear transformation through the SiLU activation function to further refine the nonlinear representation of the features. The final output is a feature map with dimensions H×W×C, which can be directly connected to the input port of the subsequent SPPF module without additional processing, achieving seamless integration. The SPPF module retains the original YOLO structure without any modifications. It is a multi-scale feature capture unit at the end of the backbone network, efficiently aggregating feature information at different scales to provide multi-scale support for feature fusion in the subsequent neck network. It is particularly suitable for detecting small liver metastases with small size ranges but diverse feature distributions.

[0110] like Figure 7 As shown, the SPPF module receives the input feature map from the LCAC module. First, the feature map is fed into the first 3×3 convolutional layer. This convolutional layer uses a convolutional kernel of size 3, a stride of 1, and no padding. After processing by this convolutional layer, the height and width of the feature map remain unchanged, only the number of channels is initially transformed, and the feature map is output.

[0111] Subsequently, the feature map enters a three-tiered MaxPool2d pooling layer. Each pooling layer uses a fixed pooling kernel size and stride (usually a 5×5 pooling kernel, stride 1 and padding 2, to ensure that the feature map size remains unchanged after pooling). The feature map after each pooling is retained as an independent branch and continues to be passed down to the next pooling layer.

[0112] After three pooling operations, the output feature maps from the first 3×3 convolutional layer and the third pooling layer (a total of four feature maps) are concatenated using a Concat operation. The height and width of the concatenated feature map remain consistent with the input, and the number of channels is expanded to four times the original input channel number. Finally, the concatenated feature map is fed into a second 3×3 convolutional layer. This convolutional layer uses a kernel of size 3, a stride of 1, and padding of 1. Its core function is to perform channel fusion and feature refinement on the concatenated multi-scale features, outputting a feature map with the same number of channels as the module's input channels. This output feature map is directly fed into the subsequent neck network, providing stable backbone feature support for multi-scale feature fusion.

[0113] As a downstream unit of the LCAC module, the SPPF module can further aggregate the low-contrast lesion features enhanced by the LCAC module with multi-scale contextual features, effectively improving the backbone network's ability to express multi-scale features of liver micrometastases.

[0114] like Figure 8As shown, the DUS module is an innovative upsampling unit in the liver micrometastasis detection network design. It replaces the two original upsamples in the Neck region of the main network, solving the problem of lost details in micro-lesions due to the original interpolation. Through a strategy of lesion perception and dynamic weight adjustment, it prioritizes the recovery of detailed features in low-contrast lesion areas while ensuring upsampling efficiency in background areas. The DUS module is fully compatible with the input and output dimensions of the original upsample and can be seamlessly embedded into the two upsampling links of the main network. The input is a low-resolution feature map (8×8 or 16×16), and the output is a high-resolution feature map (16×16 or 32×32) after 2x upsampling, with the number of channels remaining unchanged. It directly connects to the subsequent Concat module.

[0115] like Figure 8 As shown, the processing flow of the DUS module is as follows:

[0116] First, the lesion area sensing unit receives the contrast coefficient map from the LCAC module. (Original dimensions and corresponding Backbone features) Figure 1 (The input feature map is the low-resolution feature map that needs to be upsampled.) ;

[0117] First of all The graph is subjected to bilinear downsampling, and its size is matched to the input feature map. The size is used to obtain the contrast coefficient image after downsampling. Subsequently, a binary mask image is generated based on a threshold determination. The formula is:

[0118] ;

[0119] in Areas with a value <0.3 are marked as suspected microlesions. =1; the rest are background / vascular regions, M=0; the final output is a mask image with dimensions H×W×1. Mask image It perfectly matches the size of the input feature map.

[0120] Subsequently, the dynamic interpolation weight generation unit is based on the mask image. The weights of the 2×2 bilinear interpolation kernel are dynamically adjusted.

[0121] For the lesion region (M=1), generate enhancement-type interpolation kernel weights. The formula is:

[0122] ;in The original bilinear interpolation kernel weights, The interpolation weight of the lesion area is increased by 1 time, prioritizing the preservation of lesion details.

[0123] For the background region (M=0), the original interpolation kernel weights are used directly. = This is to ensure upsampling efficiency.

[0124] Finally, the enhancement interpolation kernel weight of the lesion area will be... Original interpolation kernel weights of the background region According to the binary mask image pixel markers ( =1 corresponds to the lesion area. =0 corresponds to the background area) and is integrated pixel by pixel to generate a pixel-level dynamic weight map. (The dimensions are H×W×4, corresponding to the 4 weight parameters of the 2×2 bilinear interpolation kernel. The 4 weight parameters of each pixel position are determined by the interpolation kernel weights of its region.)

[0125] Adaptive upsampling execution unit based on mask image Input feature map The region is divided into lesion area and background area, and 2x upsampling is performed using the corresponding interpolation kernels for each. The lesion area uses... Fine-grained interpolation is performed to restore the edges and texture details of minute lesions. Background areas are used... Efficient bilinear interpolation is performed to balance computational efficiency. Finally, region fusion is used to seamlessly stitch the two upsampled feature maps together, outputting a preliminary upsampled feature map. (Dimensions are 2H×2W×C).

[0126] The feature refinement unit integrates local feature redundancy in the initially upsampled feature map through a 1×1 lightweight convolution. The 1×1 lightweight convolution has a size k=1, a stride s=1, padding p=0, and the number of channels remains unchanged, thus integrating local feature redundancy.

[0127] The feature distribution is stabilized by a batch normalization layer, and a nonlinear transformation is introduced by the SiLU activation function. Finally, the DUS module outputs a high-resolution feature map. The dimensions are completely consistent with the original Upsample output.

[0128] In this innovative network for detecting small liver metastases, the Concat module fully retains the original channel splicing structure of YOLO. Without changing the height and width of the feature maps, it directly splices and fuses multiple feature maps of the same size in the channel dimension, integrating feature information from multiple branches and scales, and providing more comprehensive feature support for subsequent feature extraction and fusion modules.

[0129] The Concat module does not perform additional parameter learning or feature transformation; it only performs pure feature concatenation. The size adaptability of the input and output feature maps is guaranteed by the preceding modules. It can be seamlessly embedded into the backbone and neck of the network. It is a key link connecting the NMSAC-C2f, C2f, DCCFM, and upsampling / downsampling modules. Especially in the multi-scale feature fusion link in the Neck region, it plays an important role in integrating shallow detail features and deep contextual features, adapting to the detection requirements of multi-scale feature distribution of liver micrometastases. The Concat module has a specific target distribution in this innovative network, mainly concentrated in two core regions. First, within the NMSAC-C2f module of the backbone network, it is used to stitch together the feature maps of the direct branches within the module with the feature maps of the NMSAC-Bottleneck cascaded branches, fusing the original basic features without complex feature extraction with the enhanced liver micrometastases features, preserving the original information of the features. Second, in the entire link of the neck network, including feature stitching of the Neck upsampling path, feature stitching of the downsampling path, and feature stitching between the DCCFM module and the C2f module. In the multi-scale fusion link of the Neck, this module mainly realizes channel stitching of feature maps at different scales. For example, it stitches together the upsampled deep high-dimensional lesion feature map with the shallow detail feature map, integrating the deep lesion semantic features with the shallow lesion edge and texture features. It also stitches together the devascularization artifact feature map processed by the DCCFM module with feature maps from other branches, further enriching the feature dimensions. In the task of detecting liver micrometastases, although the Concat module is a parameterless basic unit, it plays an irreplaceable role in feature fusion. Within NMSAC-C2f, by splicing the features of the direct connection branch and the NMSAC-Bottleneck series branch, it not only preserves the original channel information of the feature map, but also incorporates the details and contextual features of liver micrometastases enhanced by the NMSAC module, thus avoiding information loss during the feature extraction process.

[0130] In the multi-scale fusion link of the Neck region, by stitching feature maps of different scales and different processing stages, the edge details of superficial liver micrometastases, the contour features of lesions in the middle layer, the semantic features of deep lesions, and the pure features after suppressing vascular artifacts by the DCCFM module are integrated to form a multi-dimensional, multi-scale composite feature map. This provides comprehensive feature basis for lesion identification and localization of subsequent detection heads, effectively making up for the deficiency of single-scale, single-branch features in expressing micro lesions, and improving the detection accuracy of low-contrast, small-sized liver micrometastases.

[0131] The DCCFM module (Dynamic Cross-Channel Fusion Module) is a feature fusion unit specifically designed for detecting small liver metastases. It replaces all Conv modules in the original YOLO Neck region, precisely adapting to the Neck's multi-scale feature fusion chain. The module's input is the output feature map (multi-scale dimension) of the C2f module in the Neck. The output feature map has the same dimensions as the input, allowing it to be embedded into the original Neck structure without additional dimensional adaptation. Its function is to dynamically fuse multi-scale features across channels by combining medical priors on the channel feature clusters of liver tissue, suppressing the interference of vascular artifacts on small lesions, and improving the recognition accuracy of lesion features.

[0132] like Figure 9 As shown, the DCCFM module as a whole includes a channel feature cluster perception unit, a dynamic weight allocation unit, and a cross-channel fusion and refinement unit. The channel feature cluster perception unit is the pre-processor of the DCCFM module. Its function is to cluster the channel dimensions of the input feature map based on the medical prior of liver tissue (the channel feature distribution of liver parenchyma, blood vessels, and lesions has a clustered aggregation).

[0133] The channel feature cluster sensing unit first calculates the feature response statistics for each channel in the input feature map, i.e., the mean response of each channel. With variance Combine them into channel feature vectors .

[0134] Subsequently, the K-means clustering algorithm was used to classify all channels into three categories: lesion feature clusters, vascular artifact feature clusters, and background feature clusters, resulting in channel-level cluster label maps. Where 0 represents the lesion feature channel, 1 represents the vascular artifact feature channel, and 2 represents the background feature channel, thus providing a medical prior basis for subsequent dynamic weight allocation.

[0135] The dynamic weight allocation unit is used to assign dynamic weights to each channel based on the cluster label map output by the channel feature cluster perception unit, so as to achieve targeted regulation to suppress vascular artifacts and enhance lesion features.

[0136] The weight calculation for the dynamic weight allocation unit adopts a Softmax mechanism with a temperature coefficient, and the formula is as follows:

[0137] .

[0138] Where s is a learnable temperature coefficient. It is the cluster label of the i-th channel (when the channel is a vascular artifact). =1, after substituting into the formula 1- =0, weights are suppressed; when the channel has lesion characteristics. =0,1- =1, weights are enhanced); through the generated weight vector It will be multiplied by the channel dimension of the input feature map in a weighted manner to obtain a weighted feature map, which not only preserves the response intensity of lesion features, but also effectively reduces the interference of vascular artifact channels. This represents the total number of channels in the input feature map.

[0139] The cross-channel fusion and refinement unit is used to perform cross-channel interaction and feature refinement on the weighted feature map.

[0140] The cross-channel fusion refining unit first achieves feature interaction between channels through a 1×1 convolutional layer to enhance the correlation of multi-scale features. The kernel size of the 1×1 convolutional layer is k=1, stride is s=1, and padding is p=0.

[0141] Subsequently, batch normalization is performed on the convolutional output to stabilize the feature distribution; finally, a nonlinear transformation is introduced through the SiLU activation function to further refine the nonlinear expression of the features; the final output feature map dimension is completely consistent with the input.

[0142] To ensure the model's lightweight nature, the original C2F is retained in the neck network. The feature maps concatenated at multiple scales in the neck network undergo deep refinement and redundancy compression to generate more compact and discriminative feature representations, providing stable feature support for subsequent detection heads. This module is used to handle the multi-scale fusion features of Concat and is a crucial link in the neck network connecting feature concatenation with subsequent modules. Since its network structure is relatively conventional, it will not be elaborated upon here.

[0143] Furthermore, the present invention has improved the detection head, resulting in an improved detection head MSLD-Detect module (Multi-Scale Lesion Detection for Hepatic Micrometastases).

[0144] MSLD-Detect is an innovative detection head specifically designed for the detection of small liver metastases, intended to replace the original YOLO Detect module. Figure 10 As shown, the MSLD-Detect module retains the basic framework of the original detection head, which features multi-scale features as input and uses a classification + regression dual-branch architecture. However, it addresses the issues of low classification accuracy, large localization deviation, and easy confusion with vascular artifacts in the original detection head by using multi-scale lesion feature enhancement, small box adaptation regression, and lesion-artifact contrast loss. The module's input and output interfaces are fully compatible with the original Detect module and can be seamlessly embedded into the end of the overall network without modifying the preceding links.

[0145] The system receives three feature maps from the Neck module (8×8×512 deep semantic features, 16×16×256 mid-level contour features, and 32×32×128 shallow detail features), corresponding to lesion features in large, medium, and small receptive fields, respectively. It outputs the triplet information for each detection box, which includes the classification probability of liver micrometastases (distinguishing between lesions / vascular artifacts / background), bounding box coordinates, and detection confidence (combining classification and localization reliability).

[0146] like Figure 10 As shown, the multi-scale lesion feature enhancement unit first integrates the feature advantages of the three scales to enhance the feature response of small lesions and avoid the insufficient expression of lesions by single-scale features.

[0147] A lightweight combination of 1×1 convolution and 3×3 depthwise separable convolution is applied to the three input feature maps. The 1×1 convolution reduces the number of channels to a uniform dimensionality of 64 (8×8×512→8×8×64, 16×16×256→16×16×64, 32×32×128→32×32×64), reducing computational cost. The 3×3 depthwise separable convolution (stride 1, padding 1) extracts lesion details at each scale. The 8×8×64 feature map is then upsampled to 16×16×64 (bilinear interpolation), and the 32×32×64 feature map is downsampled to 16×16×64 (average pooling), unifying the three feature maps to a size of 16×16. Finally, a concat operation is used to stitch them together into a 16×16×192 fused feature map, integrating deep context, mid-level contours, and shallow details, significantly improving the feature response intensity of small lesions. A 1×1 convolutional layer (channel count 192 → 192) is then applied with the SiLU activation function to refine and fuse features, outputting an enhanced multi-scale lesion feature map. (16×16×192).

[0148] like Figure 10 As shown in the middle dashed box, the dual-branch precision detection unit consists of a classification branch and a localization branch, which respectively solve the problems of lesion-vascular artifact confusion and large localization deviation of small boxes.

[0149] I. Classification Branches (Distinguishing between lesions / vessels / background).

[0150] Input augmented feature map Classification features were extracted using a 3×3 convolutional layer (stride 1, padding 1, channel count 192→128→64→3 respectively), with an output dimension of 16×16×3 (3 classes: liver micrometastases, vascular artifacts, and background); then, the class probabilities were calculated using the Softmax function.

[0151] .

[0152] in Let f be the probability of the i-th class, and f represent the output function of the classification convolution. is the subscript of f; cls is an abbreviation for classification, indicating that this is the output of the classification branch; i represents the target class whose probability is to be calculated.

[0153] ( )yes The input parameters represent the enhanced feature maps of the input classification branch. Indicates the enhancement feature map The output of the classification convolution for class i. The sum of the exponential terms for the three categories is used to normalize the output probability (ensuring the sum of probabilities for all categories is 1), and j represents the summation variable across all categories; lesion-vascular artifact contrast features are introduced to calculate the cosine distance between the feature vectors of the two classes. Distinguishing by mandatory features:

[0154] .

[0155] in This represents the feature vector of liver micrometastases output by the classification branch (dimension 64, from the last 3×3 convolution). This represents the vascular artifact feature vector (64 dimensions) output by the classification branch. Minimizing this distance enhances the discriminative power between the two types of features. This distance value is incorporated into the subsequent loss function to further strengthen the feature differentiation between lesions and vascular artifacts.

[0156] II. Locating the branch (small box adaptation regression).

[0157] Input augmented feature map Localization features are extracted using a 3×3 convolutional layer (stride 1, padding 1, channel count 192→128→64→4), with an output dimension of 16×16×4 (corresponding to the coordinate offset of the bounding box). Small box adaptation regression weights are introduced to increase the regression weights for the bounding boxes of tiny lesions <5mm, reducing localization bias.

[0158] .

[0159] in To predict the pixel area of ​​the bounding box, =25 (corresponds to the pixel area of ​​a 5mm lesion, which can be adjusted according to the resolution of the dataset). This indicates that the small box is adapted to the regression weights.

[0160] The value range is (1,2]. The smaller the lesion, the higher the weight and the stronger the localization accuracy of the small box.

[0161] Final bounding box coordinates The formula for calculating using the anchor frame and offset is as follows:

[0162] .

[0163] in For the preset anchor frame, This is the offset of the convolution output.

[0164] The lesion adaptation loss function unit reconstruction loss function prioritizes the classification and localization accuracy of small lesions, with a total loss. The weighted sum of classification loss and localization loss:

[0165] .

[0166] Increase the weight of localization loss to adapt to the characteristic that localization is more critical than classification for small lesions.

[0167] Classification loss By fusing cross-entropy loss and contrast loss, the confusion between lesions and blood vessel artifacts can be resolved.

[0168] .

[0169] in For standard cross-entropy loss, For contrast loss due to lesion-vascular artifacts:

[0170] .

[0171] Where m=0.8 is the marginal value of the contrast loss, which forces the feature distance between the lesion and the vascular artifact to be ≥0.8 to avoid confusion between the two classes.

[0172] Location loss Apply CIoU loss and multiply by the small box weights:

[0173] .

[0174] in for Loss (considering bounding box overlap, center point distance, and aspect ratio):

[0175] .

[0176] in, The intersection-union ratio (IU) of the predicted bounding box and the ground truth bounding box. The Euclidean distance is the center point. The minimum bounding box diagonal length. These are the weighting coefficients. The aspect ratio consistency coefficient.

[0177] The medical prior and post-processing module receives the preliminary detection results output by the MSLD-Detect head. Its core is based on prior clinical knowledge of liver micrometastases. Through multi-dimensional verification to eliminate false positives and correct localization biases, it transforms the preliminary algorithm results into clinically usable results. The module takes as input the candidate bounding box set output by the detection head (format: [bounding box coordinates, detection confidence, category probability (liver micrometastases / vascular artifacts / background)]) and outputs the optimized final candidate bounding box set, directly connecting to the detection result output layer.

[0178] I. Preprocessing: Candidate box deduplication and format standardization.

[0179] First, non-maximum suppression (NMS) is performed on the candidate bounding boxes output by the detection head to remove duplicates, ensuring that only the best candidate bounding box is retained for each lesion. The NMS parameters are set to a confidence threshold of 0.25 (filtering low-confidence candidate boxes) and an intersection-overlap (IoU) threshold of 0.7 (removing duplicate boxes with high overlap). Then, the coordinates of the candidate bounding boxes are converted from relative coordinates (relative to the 640×640 image) to absolute coordinates (based on the pixel coordinates of the original CT / MRI image), and associated with the liver parenchyma segmentation mask and the intrahepatic large vessel segmentation mask output by the preprocessing module to provide basic data for subsequent medical verification.

[0180] II. Morphological filtering: Removes false positive boxes with abnormal shapes.

[0181] Based on the clinical morphological characteristics of liver micrometastases, which are typically round or oval, candidate bounding boxes were selected through morphological manipulation, and the aspect ratio of each candidate box was calculated. Candidate boxes with AR < 0.7 (too narrow, suspected blood vessel) or AR > 1.3 (too wide, suspected intestinal artifact) were removed. The coordinates of the top-left corner of the candidate box are 10 pixels. The coordinates of the bottom right corner of the candidate box are in pixels. The candidate box width, The candidate box height is set; candidate boxes with AR < 0.7 (too narrow, suspected to be small intrahepatic vessels) or AR > 1.3 (too wide, suspected to be intestinal artifacts or scanning noise) are removed, and candidate boxes that conform to the round / elliptical morphological characteristics of liver micrometastases are retained.

[0182] Morphological opening operations were performed using 3×3 circular structuring elements to remove small noise boxes with an area < 5 pixels (corresponding to an actual size < 0.4 mm, which does not meet the definition of liver micrometastases). The contour smoothness (contour perimeter² / 4π × area) was calculated for the retained candidate boxes. When the smoothness was > 1.5, it was judged as irregular in shape (suspected calcification artifact) and removed.

[0183] III. Anatomical location verification: Screening based on clinical distribution patterns.

[0184] Based on the prior clinical observation that over 90% of liver micrometastases are distributed within 3 cm below the liver capsule and far from large blood vessels with a diameter > 4 mm, the liver capsule boundary is extracted using a liver parenchyma segmentation mask, and the Euclidean distance from the center of the candidate box to the liver capsule is calculated.

[0185] When the distance is greater than 38 pixels (1cm ≈ 12.8 pixels at 640×640 resolution, 3cm corresponds to 38.4 pixels, rounded down to 38 pixels), it is judged as a deep liver abnormality box, and its detection confidence is reduced to 0.5 times the original confidence, prompting the doctor to confirm with caution; Large vessel distance verification: Based on the intrahepatic large vessel segmentation mask, the Euclidean distance from the edge of the candidate box to the nearest large vessel is calculated. When the distance is less than 6 pixels (corresponding to the actual distance < 0.5mm), it is judged as a vessel-related artifact and directly removed; Intrahepatic parenchyma verification: If the center coordinates of the candidate box fall outside the liver parenchyma segmentation mask (mask value is 0), it is judged as an extrahepatic artifact (such as interference from abdominal organs) and removed.

[0186] IV. Gray-scale feature verification: Optimization based on CT / MRI gray-scale differences.

[0187] Utilizing the grayscale difference between hepatic micrometastases and liver parenchyma in enhanced CT / MRI (the grayscale value of lesions in the arterial phase is 5-15 HU lower than that of liver parenchyma), the classification determination is further optimized: the original image region corresponding to the candidate box is extracted, and the average grayscale value of the region is calculated. With gray standard deviation ; Calculate the average gray value of the liver parenchyma region from the liver parenchyma segmentation mask. Calculate the grayscale difference If the candidate box category is liver micrometastases but If the value is less than 5 HU (does not meet the grayscale difference feature), adjust the probability of its lesion category to the original probability × 0.6, and increase the probability of its vascular artifact category to the original probability × 1.4; if ΔHU > 15 HU (suspected calcification), remove the candidate box directly.

[0188] V. Confidence Calibration: Outputs clinical fit results.

[0189] The candidate bounding boxes selected through the above steps undergo confidence calibration. A sigmoid function is used to map the confidence level to the range of 0.1-0.95 to avoid extreme confidence values ​​affecting clinical judgment. Finally, candidate bounding boxes with a detection confidence level ≥0.5 and passing all medical validations are retained to form the optimized final detection result. This result includes the absolute coordinates of the candidate bounding boxes, their actual size (based on image resolution conversion), the calibrated confidence level, and the category label, and is simultaneously output to the detection result output layer.

[0190] This invention incorporates prior medical knowledge into the entire process from feature extraction and fusion to result optimization. The results align with the diagnostic logic of clinicians, and the output of visual annotations and structured reports can directly assist clinical decision-making, thereby reducing the burden of reading images for physicians.

[0191] Step 3. Train the liver micrometastasis image detection model constructed in Step 2 based on the dataset from Step 1, and use the trained liver micrometastasis image detection model to achieve liver micrometastasis image detection.

[0192] Data from 600 clinical cases were collected from three tertiary hospitals, including 400 cases of enhanced abdominal CT images and 200 cases of enhanced MRI images. The data covered mainstream equipment models from GE, Siemens, and Philips, with scan parameters ranging from slice thickness of 1mm to 2mm and tube voltage of 120kV to 140kV, ensuring data diversity. Among the cases, 250 were hepatic micrometastases <1cm in diameter (80 of which were <5mm), 150 were cases of vascular artifacts, and 200 were cases of normal liver tissue. All cases were confirmed by pathological biopsy (hepatic micrometastases) or excluded by clinical follow-up for more than 6 months (normal tissue and artifacts).

[0193] In accordance with the Personal Information Protection Law and medical data security regulations, data was anonymized, removing patient names, ID numbers, and other private information, replacing patient identifiers with random IDs, and retaining key clinical metadata such as scan time, slice thickness, and HU value calibration parameters. Two physicians with over 5 years of experience in hepatobiliary surgical imaging diagnosis independently annotated the data, including the bounding box of liver micrometastases, lesion size, and category label. The 3DSlicer annotation tool was used, and annotation consistency was verified by the Kappa test, requiring a Kappa value ≥ 0.85. In case of inconsistencies, a chief physician arbitrated to establish the final gold standard for annotation. The data was divided into a training set (480 cases), a validation set (60 cases), and a test set (60 cases) in an 8:1:1 ratio to ensure no overlap between the test and training sets and to cover cases from different hospitals and with different equipment models, thus avoiding data bias.

[0194] Training environment and parameter settings.

[0195] Training was performed using a single GPU (NVIDIA A100 40GB), an Intel Xeon Platinum 8375C CPU, 128GB of RAM, and 5TB of SSD storage. The system was based on the PyTorch 2.0 framework, combined with the MONAI 1.2 medical imaging toolkit, Python version 3.9, and CUDA 11.8 for accelerated computation. The lightweight pre-trained YOLOv8n.pt model (trained on the COCO dataset) was selected to suit small object detection scenarios, reduce the total number of model parameters, and avoid overfitting on a small amount of data.

[0196] The first 10 layers of the improved backbone are frozen (while retaining general feature extraction capabilities). Only the MSLD-Detect head and newly added modules such as DCCFM and LCAC are trained. The training epochs are 20, the batch size is set to 16, the initial learning rate is 0.001, and a cosine annealing learning rate scheduling strategy is adopted.

[0197] When the validation set mAP 0.5 When the learning rate is ≥60% and the training set loss is ≤3, unfreeze all network layers for joint training, add 50 epochs, adjust the learning rate to 0.0005, enable weight decay (weight_decay=0.002) to suppress overfitting, and enable the early stopping strategy (patience=15, stop training if there is no improvement in validation set mAP for 15 consecutive epochs).

[0198] For small targets and low contrast characteristics, turn off mosaic enhancement (to avoid destroying small targets) and enable multi-scale training (input image size is randomly switched to 640×640, 720×720, 800×800).

[0199] Perform geometric transformations (horizontal flip probability 0.5, random translation ±10%, rotation ±10°) and color gamut transformations (brightness ±0.2, contrast ±0.2, saturation ±0.2) to simulate image features under different scanning conditions.

[0200] The total loss function L consists of bounding box regression loss and category classification loss, as shown above.

[0201] This invention employs a multi-dimensional validation process, conducting 5-fold cross-validation based on the validation set to evaluate the model's stability across different data subsets and to calculate the mAP of each fold. 0.5 The average of the false negative rate and false positive rate is used as the internal validation result.

[0202] Retrospective clinical validation was conducted in two independent tertiary hospitals, including 100 untrained clinical cases (40 cases of liver micrometastases, 30 cases of vascular artifacts, and 30 cases of normal liver tissue). Three clinicians used a double-blind method to compare the model results with human diagnostic results to evaluate the model's improvement in clinical diagnostic efficiency. The model's performance was tested under different hardware platforms (hospital workstations, edge computing devices) and different image qualities (low-dose CT, motion artifact images), requiring inference speed fluctuation ≤3 FPS and mAP. 0.5 The decrease should be ≤5%; the model attention map should be output through feature visualization tools to verify the consistency between the model's attention area and the actual location of the lesion, and to ensure that the model's decision-making basis conforms to the logic of clinical diagnosis.

[0203] Once the model is trained, it can be deployed (on a computer device) and used to detect liver micrometastases.

[0204] Example 2

[0205] This embodiment 2 describes a liver micrometastasis image detection system based on an improved YOLO model. This system is based on the same inventive concept as the liver micrometastasis image detection method based on an improved YOLO model in embodiment 1 above.

[0206] The liver micrometastasis image detection system based on the improved YOLO model in this embodiment includes the following modules:

[0207] The preprocessing module is used to acquire abdominal CT or enhanced MRI images of the liver and to preprocess the images.

[0208] And a prediction module, used to build a liver micrometastasis image detection model based on an improved YOLOV8 model architecture, wherein the liver micrometastasis image detection model includes a backbone network, a neck network and a detection head;

[0209] In the backbone network, the improved C2F module NMSAC-C2F replaces the original C2F module;

[0210] The NMSAC-C2F module replaces the cascaded Bottleneck unit with the NMSAC-Bottleneck module, enhancing the feature extraction capability for liver micrometastases while ensuring full compatibility of input and output dimensions with the original C2F module.

[0211] The core of the NMSAC-Bottleneck module is the multi-scale adaptive convolution module NMSAC;

[0212] A low-contrast adaptive convolutional module, namely the LCAC module, is designed between the last NMSAC-C2F module in the backbone network and the SPPF module in the backbone network to specifically enhance the weak feature signals of occult liver micrometastases.

[0213] A dynamic cross-channel fusion module DCCFM is designed in the neck network. Combining the medical prior of the channel feature clusters of liver tissue, it dynamically fuses multi-scale features across channels to suppress the interference of vascular artifacts on small lesions and improve the lesion feature recognition.

[0214] The dataset is constructed based on the preprocessed data, the liver micrometastasis image detection model is trained, and the trained liver micrometastasis image detection model is used to realize liver micrometastasis image detection.

[0215] It should be noted that any content not mentioned in the above-described functional modules of the system described in Embodiment 2 can be referred to the step description of the corresponding method in Embodiment 1 above, and will not be repeated in detail here.

[0216] Of course, the above description is only a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. It should be noted that any equivalent substitutions or obvious modifications made by those skilled in the art under the guidance of this specification fall within the scope of this specification and should be protected by the present invention.

Claims

1. A method for detecting liver micrometastases based on an improved YOLO model, characterized in that, Includes the following steps: Step 1. Obtain abdominal CT or enhanced MRI images of the liver, preprocess the images, and construct a dataset; Step 2. Build a liver micrometastasis image detection model based on the improved YOLOV8 model architecture, which includes a backbone network, a neck network, and a detection head; In the backbone network, the improved C2F module NMSAC-C2F replaces the original C2F module; The NMSAC-C2F module replaces the cascaded Bottleneck units with the NMSAC-Bottleneck module, enhancing the feature extraction capability for liver micrometastases while ensuring full compatibility of input and output dimensions with the original C2F module. The core of the NMSAC-Bottleneck module is the multi-scale adaptive convolution module NMSAC; A low-contrast adaptive convolutional module, namely the LCAC module, is designed between the last NMSAC-C2F module in the backbone network and the SPPF module in the backbone network to specifically enhance the weak feature signals of occult liver micrometastases. A dynamic cross-channel fusion module DCCFM is designed in the neck network. Combining the medical prior of the channel feature clusters of liver tissue, it dynamically fuses multi-scale features across channels to suppress the interference of vascular artifacts on small lesions and improve the lesion feature recognition. Step 3. Train the liver micrometastasis image detection model constructed in Step 2 based on the dataset in Step 1, and use the trained liver micrometastasis image detection model to realize liver micrometastasis image detection. The multi-scale adaptive convolution module NMSAC adopts a main branch + dual auxiliary branch structure. The main branch is a 3×3 standard convolution, and the dual auxiliary branches are a 1×1 compressed convolution and a 5×5 deformable convolution, respectively. Through the adaptive weight fusion unit, the weights of each branch are dynamically allocated based on the gray-level gradient values ​​of the feature map pixels to capture the local detailed features of liver micrometastases, while also taking into account the global contextual features of the liver parenchyma. The input to the LCAC module is the output feature map of the last NMSAC-C2F module in the backbone network; The output feature map of the LCAC module has the same dimension as the input feature map of the LCAC module; the LCAC module includes a local contrast perception unit, a dynamic convolution adjustment unit, and a feature refinement output unit. The local contrast sensing unit first performs a 3×3 sliding window division on the original input feature map, generating a local window for each pixel that includes itself and eight surrounding pixels; Then, the grayscale extreme values ​​are calculated for each window to obtain the maximum grayscale value within the window. With minimum gray value ; Next, substitute the values ​​into the local contrast formula to calculate the contrast of each window. The formula is as follows: ; wherein, 10 -5 a tiny constant is used to avoid the denominator being 0; Finally, adjust the contrast values ​​for all windows. Normalization processing, to adjust contrast Mapped to the [0,1] interval, a pixel-level contrast coefficient map is generated. ;in The closer to 0, the more likely the 3×3 sliding window area is a low-contrast suspected lesion area; The closer it is to 1, the more likely the 3×3 sliding window area is a background area with normal contrast. After completing the calculation, the contrast coefficient graph will be displayed. The original input feature map is passed to the dynamic convolutional adjustment unit in parallel. Dynamic convolution adjustment units are used to generate contrast coefficient maps based on the output of local contrast sensing units. Along with the original input feature map, two key operations, weight adjustment and step size adjustment, are performed in parallel. The process is as follows: In the weight adjustment, the dynamic convolution adjustment unit adjusts the preset 3×3 convolution kernel original weights. With coefficient Multiplying them together yields the dynamically adjusted convolutional kernel weights. ; In stride adjustment, the dynamic convolutional adjustment unit is based on... Threshold determination for dynamically setting the convolution stride: like <0.3, the step size is set to 1 to avoid losing weak feature details during downsampling; like ≥0.3, with a step size of 2, to maintain normal downsampling efficiency; The convolution kernel weights, after weight adjustment and stride adjustment respectively, are... With stride, it is applied to a dynamic 3×3 convolutional layer to perform convolution calculations on the original input feature map, and the output dimension is the same as the original input feature map; The feature refinement output unit performs batch normalization on the dynamic convolutional feature map; then, a nonlinear transformation is introduced through the SiLU activation function to refine the nonlinear expression of the features; finally, the output dimension is the same as the original input features. The dynamic cross-channel fusion module DCCFM is used to receive the output feature map of the original C2f module in the neck network; The output feature map of the DCCFM module has the same dimension as the input feature map of the DCCFM module; the DCCFM module includes a channel feature cluster perception unit, a dynamic weight allocation unit, and a cross-channel fusion and refinement unit. The channel feature cluster sensing unit first calculates the feature response statistics for each channel in the input feature map, i.e., the mean response of each channel. With variance Combine them into channel feature vectors ; Subsequently, the K-means clustering algorithm was used to classify all channels into three categories: lesion feature clusters, vascular artifact feature clusters, and background feature clusters, resulting in channel-level cluster label maps. ; Where 0 represents the lesion feature channel, 1 represents the vascular artifact feature channel, and 2 represents the background feature channel; The dynamic weight allocation unit is used to assign dynamic weights to each channel based on the cluster label map output by the channel feature cluster perception unit, so as to achieve targeted regulation to suppress vascular artifacts and enhance lesion features; The weight calculation of the dynamic weight allocation unit adopts the Softmax mechanism with a temperature coefficient, and the formula is as follows: ; in It is a learnable temperature coefficient. It is the cluster label of the i-th channel; the weight vector generated by this formula It will be multiplied by the channel dimension of the input feature map in a weighted manner to obtain a weighted feature map; The total number of channels in the input feature map; The cross-channel fusion and refinement unit is used to perform cross-channel interaction and feature refinement on the weighted feature map; The cross-channel fusion refining unit first achieves feature interaction between channels through a 1×1 convolutional layer to enhance the correlation of multi-scale features. The kernel size of the 1×1 convolutional layer is k=1, stride is s=1, and padding is p=0. Subsequently, batch normalization is performed on the convolutional output to stabilize the feature distribution; finally, a nonlinear transformation is introduced through the SiLU activation function to further refine the nonlinear expression of the features; the final output feature map dimension is completely consistent with the input.

2. The method for detecting liver micrometastases based on the improved YOLO model according to claim 1, characterized in that, In step 1, the image preprocessing process is as follows: First, the image resolution is uniformly normalized to 640×640 pixels. Then, Gaussian filtering and morphological opening operations are used to remove metal artifacts and motion artifacts. Next, the image grayscale values ​​are normalized to the [0,1] interval. Finally, the effective area of ​​the liver parenchyma is extracted using a liver region segmentation algorithm based on U-Net to remove irrelevant areas of other organs in the abdominal cavity and reduce background interference.

3. The method for detecting liver micrometastases based on the improved YOLO model according to claim 1, characterized in that, The processing flow of the NMSAC-C2F module is as follows: The input feature map received by the NMSAC-C2F module contains three dimensions: height, width, and number of input channels. First, the feature map input to the NMSAC-C2F module is fed into a 1×1 convolutional layer for initial channel conversion; after channel conversion, the feature map is split into two parallel branches through a Split operation. The feature map height and width of both branches are the same as before splitting, and the number of channels is half of the target output channel number; one of the branches does not participate in any feature extraction calculation and always remains in a direct connection state; The other branch will connect several NMSAC-Bottleneck modules in series, and the number of NMSAC-Bottleneck modules connected in series is exactly the same as the number of Bottleneck modules contained in the original C2F module. All NMSAC-Bottleneck modules will perform targeted liver micrometastasis feature extraction on the feature map of this branch; After the NMSAC-Bottleneck modules to be connected in series have completed feature processing, the feature maps of the directly connected branches and the feature maps of the NMSAC-Bottleneck connected branches are spliced ​​together using the Concat operation. The NMSAC-Bottleneck module uses two NMSAC modules connected in series. After the first NMSAC module extracts preliminary features, the features are then sent to the second NMSAC module for deep feature enhancement. Subsequently, the concatenated feature map will enter a 1×1 convolutional layer again to restore the expanded number of channels to the target output channel number preset by the NMSAC-C2F module; finally, the NMSAC-C2F module outputs the feature map.

4. The method for detecting liver micrometastases based on the improved YOLO model according to claim 1, characterized in that, The processing flow for the main branch + double auxiliary branch structure is as follows: The main branch is the detail feature branch, which uses a 3×3 standard convolutional layer for feature extraction. The kernel size is set to 3, the stride is 1, and the padding value is 1. The number of output channels is the same as the number of input feature maps. After the feature map passes through this convolutional layer, it will be processed by a batch normalization layer and the SiLU activation function in sequence, and finally the feature map of the main branch will be output. The first auxiliary branch is the channel compression branch. First, the number of channels in the input feature map is compressed to half of the original number of channels through a 1×1 convolutional layer. This 1×1 convolutional layer uses a convolutional kernel of size 1, a stride of 1, and no padding. After channel compression is completed, the feature map is also processed by batch normalization layer and SiLU activation function, and then a 1×1 convolutional layer is passed to restore the number of channels to the same number as the input feature map, and finally the feature map of the first auxiliary branch is output. The second auxiliary branch is the context association branch. First, it predicts the sampling point offset of the 5×5 deformable convolution through a 3×3 convolutional layer. The kernel size of the 3×3 convolutional layer is 3, the stride is 1 and the padding value is 1. The number of output channels is fixed at 50, which corresponds to the offset of the 25 sampling points of the 5×5 convolutional kernel in the x-axis and y-axis directions. The predicted offset is then applied to a 5×5 deformable convolutional layer with a kernel size of 5, a stride of 1, and a padding value of 2. The number of output channels is the same as the input feature map. After passing through this deformable convolutional layer, the feature map is also processed by a batch normalization layer and the SiLU activation function, and finally outputs the feature map of the second auxiliary branch.

5. The method for detecting liver micrometastases based on the improved YOLO model according to claim 4, characterized in that, The specific processing flow of the adaptive weight fusion unit is as follows: The feature maps output from the main branch and the two auxiliary branches are jointly fed into the adaptive weight fusion unit to complete the directional feature fusion. First, the gray-level gradient magnitude of the input feature map is calculated using the Sobel operator to determine the regions of potential liver micrometastases in the feature map. The calculation formula is: ; in and These represent the gradient values ​​of the feature map in the x-axis and y-axis directions, respectively; The calculated gray-level gradient magnitude is then normalized to obtain the weight coefficients corresponding to the three branches. The sum of the three weight coefficients is 1. The higher the gradient magnitude, the greater the proportion of the weight coefficient corresponding to the detailed feature branch. Finally, the output feature maps of the main branch and the two auxiliary branches are fused using a weighted summation method. The fusion formula is as follows: ; in Represents the fused feature map; , , These represent the output feature maps of the detail feature branch, the channel compression branch, and the context association branch, respectively. , , This represents the weight coefficient of the corresponding branch.

6. The method for detecting liver micrometastases based on the improved YOLO model according to claim 1, characterized in that, In step 2, the original Upsample module is replaced by the Dynamic Upsample module (DUS) in the neck network. The DUS module takes a low-resolution feature map as input and outputs a high-resolution feature map after 2x upsampling. The DUS module includes a lesion region perception unit, a dynamic interpolation weight generation unit, an adaptive upsampling execution unit, and a feature refinement unit. The processing flow of the DUS module is as follows: First, the lesion area sensing unit receives the contrast coefficient map from the LCAC module. And the low-resolution feature map that needs to be upsampled, i.e., the input feature map. ; First of all The graph is subjected to bilinear downsampling, and its size is matched to the input feature map. The size is used to obtain the contrast coefficient image after downsampling. Subsequently, a binary mask image is generated based on a threshold determination. The formula is: ; in Areas with a value <0.3 are marked as suspected microlesions. =1; the rest are background / vascular areas. =0; the final output dimension is mask image Mask image The size perfectly matches the input feature map. Subsequently, the dynamic interpolation weight generation unit is based on the mask image. Dynamically adjust the weights of the 2×2 bilinear interpolation kernel; For the lesion region, generate enhancement-type interpolation kernel weights. The formula is: ; in The original bilinear interpolation kernel weights, This doubles the interpolation weight of the lesion area. For the background region, the original interpolation kernel weights are used directly. = To ensure upsampling efficiency; Finally, the enhancement interpolation kernel weight of the lesion area will be... Weights of the original interpolation kernel with the background region The pixel-by-pixel weight map is generated by integrating the pixel markers of the binary mask image M. ; Adaptive upsampling execution unit based on mask image Input feature map The region is divided into lesion area and background area, and 2x upsampling is performed by applying the corresponding interpolation kernel to each region. Use in lesion area Perform fine interpolation to restore the edge and texture details of tiny lesions; Background area used Perform efficient bilinear interpolation while balancing computational efficiency; Finally, the two upsampled feature maps are seamlessly stitched together using region fusion to output a preliminary upsampled feature map. ; The feature refinement unit integrates local feature redundancy in the initially upsampled feature map through a 1×1 lightweight convolution, where the size k=1, stride s=1, padding p=0, and the number of channels remains unchanged. The feature distribution is stabilized by a batch normalization layer, and a nonlinear transformation is introduced by the SiLU activation function. Finally, the DUS module outputs a high-resolution feature map. The dimensions are completely consistent with the original Upsample output.

7. A liver micrometastasis image detection system based on an improved YOLO model for implementing the liver micrometastasis image detection method based on an improved YOLO model as described in claim 1, characterized in that, The liver micrometastasis image detection system based on the improved YOLO model includes the following modules: The preprocessing module is used to acquire abdominal CT or enhanced MRI images of the liver and to preprocess the images. And a prediction module, used to build a liver micrometastasis image detection model based on an improved YOLOV8 model architecture, wherein the liver micrometastasis image detection model includes a backbone network, a neck network and a detection head; In the backbone network, the improved C2F module NMSAC-C2F replaces the original C2F module; The NMSAC-C2F module replaces the cascaded Bottleneck units with the NMSAC-Bottleneck module, enhancing the feature extraction capability for liver micrometastases while ensuring full compatibility of input and output dimensions with the original C2F module. The core of the NMSAC-Bottleneck module is the multi-scale adaptive convolution module NMSAC; A low-contrast adaptive convolutional module, namely the LCAC module, is designed between the last NMSAC-C2F module in the backbone network and the SPPF module in the backbone network to specifically enhance the weak feature signals of occult liver micrometastases. A dynamic cross-channel fusion module DCCFM is designed in the neck network. Combining the medical prior of the channel feature clusters of liver tissue, it dynamically fuses multi-scale features across channels to suppress the interference of vascular artifacts on small lesions and improve the lesion feature recognition. The dataset is constructed based on the preprocessed data, the liver micrometastasis image detection model is trained, and the trained liver micrometastasis image detection model is used to realize liver micrometastasis image detection.

Citation Information

Patent Citations

  • Brain tumor MRI image detection method based on improved YOLOv8n

    CN119648705A

  • Application of DRAM1 as diagnosis and treatment target for resisting non-alcoholic fatty liver disease related hepatocellular carcinoma in preparation of kit, carrier and medicine

    CN120683257A