An intelligent detection method, electronic device and storage medium for CT images of hepatic echinococcosis based on domain adaptation

Through the intelligent detection method of liver CT images based on domain adaptive, the detection accuracy and consistency problems caused by CT equipment differences are solved, and higher detection accuracy and medical cost savings are achieved.

CN119810090BActive Publication Date: 2025-06-10JIANGSU SHIYU INTELLIGENT MEDICAL TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510269079.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-10
Estimated Expiration
2045-03-07

AI Technical Summary

Technical Problem

Traditional CT image detection has low accuracy and high misdiagnosis rate due to differences in equipment and models.

Method used

The intelligent detection method of liver CT images based on domain adaptation is adopted, and image preprocessing is performed through a multi-scale structure guided by gradient flow field. Combined with object detection annotation and model training, the loss calculation is dynamically adjusted to adapt to the differences between different CT devices.

Benefits of technology

Effectively reduce the impact of different CT devices on detection, improve the accuracy and consistency of AI-assisted doctors' diagnosis, save medical costs, and improve medical experience and health management of patients in remote areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810090B_ABST
    Figure CN119810090B_ABST
Patent Text Reader

Abstract

The present invention provides an intelligent detection method, an electronic device and a storage medium for liver echinococcosis CT images based on domain adaptation, comprising the following steps: collecting liver CT image data; performing image preprocessing based on a multi-scale structure-preserving enhancement model guided by a gradient flow field; performing target detection annotation; and training a model. Advantageous effects of the present invention: This method can effectively reduce the influence of different CT devices on the detection of liver echinococcosis by using domain adaptation technology, thereby improving the accuracy and consistency of AI-assisted doctor diagnosis. It can not only save medical costs, but also improve the medical experience and health management of patients in remote areas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image detection, and in particular, relates to an intelligent detection method, an electronic device, and a storage medium for CT images of hepatic echinococcosis based on domain adaptation. Background Art

[0002] Hepatic echinococcosis is a zoonotic parasitic disease mainly occurring in economically underdeveloped pastoral areas and high-altitude regions. These areas usually have harsh climatic conditions and limited medical resources. CT scanning is the main means for diagnosing HE, but traditional manual segmentation methods are time-consuming and laborious, and highly dependent on the subjective experience judgment of doctors, making it difficult to ensure the repeatability of the results. The following limitations also exist in existing CT image detection:

[0003] When traditional AI models are used for detection, they will encounter the "domain gap" challenge caused by data distribution differences. The "domain gap" stems from the differences in data acquisition and processing processes of different models of CT devices. This difference is mainly manifested in different imaging protocols, reconstruction algorithms, etc., resulting in significant differences in the contrast, noise, spatial resolution, etc. of the scanned images of the same patient. Therefore, even if a deep learning model trained on one device performs well on one device, it may experience a decrease in accuracy or a performance breakdown on another device. The most direct way to address this gap is to collect sufficient medical data from all other domains and have them annotated by professional doctors. However, obviously, due to the scarcity of data and the high cost of expert annotation, this direct method is almost impossible to achieve. Summary of the Invention

[0004] In view of this, the present invention aims to propose an intelligent detection method, an electronic device, and a storage medium for CT images of hepatic echinococcosis based on domain adaptation to solve the problems of low accuracy and high misdiagnosis rate of hepatic echinococcosis caused by device and model differences in traditional CT image detection.

[0005] To achieve the above object, the technical solution of the present invention is realized as follows:

[0006] An intelligent detection method for CT images of hepatic echinococcosis based on domain adaptation, comprising the following steps:

[0007] S1. Collect hepatic CT image data;

[0008] S2. Perform image preprocessing on the hepatic CT image data collected in step S1 based on a multi-scale structure-preserving enhancement model guided by a gradient flow field;

[0009] S3. Perform target detection annotation on the image data preprocessed in step S2;

[0010] S4. Perform model training on the image data after target detection annotation in step S3.

[0011] Further, in step S2, perform image preprocessing on the liver CT image data collected in step S1 based on the multi-scale structure-preserving enhancement model guided by the gradient flow field, including the following steps:

[0012] S21. Estimate the gradient field and structure tensor at different scales;

[0013] S22. Introduce a structural continuity metric and obtain a preliminary enhancement result through fusion;

[0014] S23. Denoise the image using non-local means and perform adaptive sharpening.

[0015] Further, in step S21, estimating the gradient field and structure tensor at different scales includes:

[0016] For the input CT image Perform Gaussian convolution at different scales to obtain a smoothed image:

[0017] ;

[0018] For each smoothed image , calculate the gradient components:

[0019] ;

[0020] ;

[0021] Thus, obtain the gradient field:

[0022] ;

[0023] Construct the structure tensor :

[0024] ;

[0025] where represents the smoothed image, represents the Gaussian kernel with variance , represents the convolution operation, represents the spatial coordinate in the horizontal direction in the image, represents the vertical direction coordinate in the horizontal direction in the image, represents the derivative of the Gaussian kernel in the direction, represents the derivative of the Gaussian kernel in the direction.

[0026] Further, in step S22, a structural continuity metric is introduced and a preliminary enhancement result is obtained through fusion, including:

[0027] Introduce a structural continuity metric for different regions of the CT image:

[0028] ;

[0029] where represents the structural continuity metric, is a hyperparameter for adjusting the sensitivity; represents the gradient intensity of the local region of the image in the main direction, represents the gradient intensity of the local region of the image in the secondary direction. When it means that the region lacks significant directionality; when it means that the region has obvious line structures or edge information;

[0030] At each scale the central pixel is enhanced by the kernel function . The kernel function assigns weights according to the similarity between all pixels in the neighborhood and the central pixel .

[0031] Further, in step S23, the image is processed using non-local means denoising and adaptive sharpening, including:

[0032] At each scale for a target pixel an adaptive enhancement kernel is defined to weight the information of the surrounding pixels:

[0033] ;

[0034] Spatial proximity :

[0035] ;

[0036] where represents the adaptive enhancement kernel for weighting the information of the surrounding pixels, represents the gray level difference, represents the direction consistency function, , both represent the main direction angles of the target pixel and the surrounding pixels, is a hyperparameter for controlling the spatial smoothing range;

[0037] Attenuated by the Gaussian function according to the Euclidean distance;

[0038] Gray-scale difference :

[0039] ;

[0040] where is a hyperparameter for controlling the sensitivity of gray-scale difference;

[0041] Direction similarity:

[0042] ;

[0043] where and are both the main direction angles;

[0044] For the smoothed version of the input image obtained at scale , perform weighted summation within a fixed neighborhood using a kernel function to obtain the enhanced pixel value :

[0045] ;

[0046] Calculate the weights for all , perform weighted summation on the gray-scale values of each pixel in the neighborhood, and then divide by the sum of the weights;

[0047] Each scale σ yields an enhancement result , and fuse the weights of each scale through structural continuity :

[0048] ;

[0049] ;

[0050] where represents the weight of the enhancement result.

[0051] Furthermore, in step S3, when the object of target detection annotation is cystic echinococcosis data, establish a cystic echinococcosis dataset, and the categories include single-cyst echinococcosis, multi-brood cyst echinococcosis, intraparietal collapse echinococcosis, necrotic solid echinococcosis, calcified echinococcosis, infiltrative echinococcosis, liquefied cavity echinococcosis.

[0052] Furthermore, in step S4, perform model training on the image data after target detection annotation in step S3, including the following steps:

[0053] S41. Select the features with a similarity higher than the set value in the source domain feature map of the CT image to form a feature set ;

[0054] S42. Based on the feature set Use the maximum mean discrepancy to measure the feature distribution difference between the source domain and the target domain;

[0055] S43. By calculating the distance between the source domain features and the target domain features, dynamically adjust the model training influence of the source domain features in the loss calculation.

[0056] Further, in step S41, select the features with a similarity higher than the set value in the source domain feature map of the CT image to form a feature set , including:

[0057] Select the cosine similarity as the similarity metric, and the formula is as follows:

[0058] ;

[0059] Among them, is the feature vector in the source domain, is the feature vector in the target domain;

[0060] Set the similarity threshold , and the similarity threshold is used to filter out the features with a similarity higher than the set value, and form a feature set through setting the similarity threshold :

[0061] ;

[0062] Among them, is the source domain feature, is the target domain feature.

[0063] Further, in step S42, based on the feature set Use the maximum mean discrepancy to measure the feature distribution difference between the source domain and the target domain, including:

[0064] Calculate the pairwise distance between the source domain feature and its nearest target domain feature , and take the average of all the minimum pairwise Euclidean distances as the local neighborhood alignment loss :

[0065] ;

[0066] Among them, is the batch size of the source domain, is the batch size of the target domain;

[0067] Introduce the global domain alignment loss Quantify the global difference between the source domain and target domain features; by using the first-order statistics of the source domain feature and target domain feature distributions, approximately represent the global difference between domains as:

[0068] ;

[0069] The global distribution difference between the source domain and target domain is a non-Gaussian distribution. Introduce a parameterized non-linear function to capture deeper global distribution differences:

[0070] ;

[0071] where , are learnable parameters. Therefore, the global domain difference is as follows:

[0072] ;

[0073] where represents the transpose of the weight matrix, represents global, represents transpose, represents the mean of the source domain features, represents the mean of the target domain features, represents the bias term, which is used to adjust the calculation of the global difference.

[0074] Furthermore, in step S43, by calculating the distance between the source domain features and target domain features, dynamically adjust the influence of the source domain feature model training in the loss calculation, including:

[0075] Introduce dynamic training parameters, which can automatically adjust according to the current learning state of the model;

[0076] ;

[0077] where represents the source domain feature influence factor in the th training iteration, is a preset constant;

[0078] Divide the source domain features into multiple levels according to their similarity to the target domain features. Among them, the low-similarity features retain gradient updates:

[0079] ;

[0080] ;

[0081] ;

[0082] Among them, is the maximum similarity, is the grade coefficient automatically calculated according to the maximum similarity and is used to adjust the weighting of the loss; is the source domain loss of the YOLO model; is to control hyperparameter.

[0083] An electronic device includes a processor and a memory communicatively connected to the processor and used for storing executable instructions of the processor. The memory stores instructions executable by the processor. The instructions are executed by the processor, and the processor is used for executing the intelligent detection method for liver echinococcosis CT images based on domain adaptation.

[0084] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the intelligent detection method for liver echinococcosis CT images based on domain adaptation is implemented.

[0085] Compared with the prior art, the intelligent detection method for liver echinococcosis CT images based on domain adaptation, the electronic device and the storage medium of the present invention have the following advantages:

[0086] For the intelligent detection method for liver echinococcosis CT images based on domain adaptation, the electronic device and the storage medium of the present invention, the method can effectively reduce the influence of different CT devices on the detection of liver echinococcosis by using the domain adaptation technology, thereby improving the accuracy and consistency of AI-assisted doctor diagnosis, not only saving medical costs, but also improving the medical experience and health management of patients in remote areas. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] The drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and the descriptions thereof are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0088] Figure 1 is the overall method flow schematic diagram of the embodiment of the present invention;

[0089] Figure 2 is the image preprocessing flow schematic diagram of the embodiment of the present invention;

[0090] Figure 3 is the model training flow schematic diagram of the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0091] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0092] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first", "second", etc. may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0093] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood through specific situations.

[0094] The present invention will be described in detail below with reference to the drawings and in combination with embodiments.

[0095] As Figures 1 to 3 shown, an intelligent detection method for CT images of hepatic echinococcosis based on domain adaptation includes the following steps:

[0096] S1. Data collection, collect high-quality liver CT image data to ensure data representativeness and diversity.

[0097] S2. Perform image preprocessing on the liver CT image data collected in step S1 based on a multi-scale structure-preserving enhancement model guided by the gradient flow field.

[0098] S3. Perform target detection and annotation on the image data preprocessed in step S2.

[0099] S4. Perform model training on the image data after target detection and annotation in step S3.

[0100] Final experimental results of this method: Cystic echinococcosis: mAP50-95 = 95.8%, an increase of 3.1%; Alveolar echinococcosis: mAP50-95 = 96.8%, an increase of 2.2%.

[0101] In a preferred embodiment of the present invention, in step S2, the multi-scale structure-preserving enhancement model guided by the gradient flow field is used to perform image preprocessing on the liver CT image data collected in step S1:

[0102] In the preprocessing of liver CT images, it is necessary to balance noise suppression and the preservation and enhancement of anatomical structures (such as blood vessels, lesion boundaries, etc.). The multi-scale structure-preserving enhancement model proposed by the present invention first estimates the gradient flow field and structure tensor at different scales, and obtains a preliminary enhancement result through fusion. Subsequently, non-local mean denoising and adaptive sharpening are used to further improve the visualization quality and diagnostic value of the image. Specifically:

[0103] For the input CT image Perform Gaussian convolution at different scales to obtain a series of smoothed images:

[0104] ;

[0105] For each smoothed image , calculate the gradient components:

[0106] ;

[0107] ;

[0108] Thus, the gradient field is obtained:

[0109] ;

[0110] Construct the structure tensor :

[0111] ;

[0112] wherein, represents the smoothed image, represents the Gaussian kernel with variance , represents the convolution operation, represents the spatial coordinate in the horizontal direction in the image, represents the vertical coordinate in the horizontal direction in the image, represents the derivative of the Gaussian kernel in the direction, represents the derivative of the Gaussian kernel in the direction.

[0113] In an image, the structural features of different regions vary greatly. To appropriately adjust the enhancement strength, a structural continuity measure is introduced:

[0114] ;

[0115] where represents the structural continuity measure, is a hyperparameter for adjusting the sensitivity. represents the gradient intensity of the local region of the image in the main direction, represents the gradient intensity of the local region of the image in the secondary direction. When it indicates the lack of significant directionality in this region; when it indicates that this region has obvious line structures or edge information.

[0116] At each scale the enhancement of the central pixel centers on the kernel function which assigns weights according to the similarity between all pixels in the neighborhood and the central pixel ; the greater the weight, the closer is to and the greater its proportion in the fusion.

[0117] At each scale for a target pixel an adaptive enhancement kernel is defined to weight the information of the surrounding pixels:

[0118] ;

[0119] Spatial proximity :

[0120] ;

[0121] where represents the adaptive enhancement kernel for weighting the information of the surrounding pixels, represents the gray - level difference, represents the direction consistency function, , both represent the principal direction angles of the target pixel and the surrounding pixels, is a hyperparameter for controlling the spatial smoothing range.

[0122] It decays according to the Euclidean distance through the Gaussian function: the farther the distance, the smaller the weight; the closer the distance, the greater the weight.

[0123] Gray - level difference :

[0124] ;

[0125] Considering the similarity of local gray values: the closer the gray values of two pixels are, the easier they are to reinforce each other; conversely, when the gap is large, the weight attenuation is obvious. is a hyperparameter for controlling the sensitivity of gray difference.

[0126] Direction similarity:

[0127] ;

[0128] If the main direction angle is close to , it means that these two positions are similar in structure and should be assigned a higher weight. If the difference is close to (the directions are almost opposite), then reduce its influence. According to actual needs, a certain modulo operation can be added to .

[0129] For the smoothed version of the input image obtained at scale , use the above kernel function to perform weighted summation within a fixed neighborhood to obtain the enhanced pixel value :

[0130] ;

[0131] In the discrete implementation, the above integral is replaced by the weighted summation of pixels in the neighborhood: (1) Calculate the weights for all , perform weighted summation on the gray values of each pixel in the neighborhood, and then divide by the sum of weights.

[0132] An enhanced result can be obtained for each scale σ. In order to overall strengthen both thick structures and retain fine textures, weighted fusion of each scale is performed through structural continuity :

[0133] ;

[0134] ;

[0135] where represents the weight of the enhanced result. If there are more obvious structural differences in the region at a certain scale , then is smaller or larger. According to the model design, this scale can be given a relatively higher or lower weight. The final integrates the enhanced information of each scale, and the characteristics of the gradient flow field are also retained.

[0136] In a preferred embodiment of the present invention, in step S3, target detection annotation is performed on echinococcosis granulosus data to establish an echinococcosis granulosus dataset, and the categories are single-cyst echinococcosis, multi-brood capsule echinococcosis, internal capsule collapse echinococcosis, necrotic solid echinococcosis, calcified echinococcosis, infiltrative echinococcosis, and liquefied cavity echinococcosis.

[0137] In a preferred embodiment of the present invention, in step S4, as mentioned in the background art above, when the traditional AI model performs detection, it will encounter the "domain gap" challenge caused by data distribution differences. The "domain gap" stems from the differences in data acquisition and processing among different models of CT devices. This difference is mainly manifested in the differences in imaging protocols, reconstruction algorithms, etc., resulting in significant differences in the contrast, noise, spatial resolution, etc. of the scanned images of the same patient. Therefore, even if a deep learning model trained on one device performs well on one device, it may experience a decrease in accuracy or a performance breakdown on another device. The most direct way to solve this gap is to collect enough medical data from all other fields and have it annotated by professional doctors. However, obviously, this direct method is almost impossible to achieve due to the scarcity of data and the high cost of expert annotation. Therefore, the present invention has developed a new model to solve these problems in CT. The domain adaptation model for intelligent identification and cross-domain fusion of hepatic echinococcosis (HCE-YOLO) mainly optimizes the loss function this time.

[0138] Specifically, first, it is necessary to select feature instances with relatively high similarity in the source domain feature map to the target domain feature map. The first step in this process is to calculate the similarity between the source domain feature and the target domain feature . The cosine similarity is selected as the similarity metric, and the specific formula is as follows:

[0139] ;

[0140] Here, is the feature vector in the source domain, is the feature vector in the target domain. Once the similarity between the source domain feature and the target domain feature is calculated, a similarity threshold needs to be set. This threshold is used to screen out those features with relatively high similarity to ensure that the selected features are meaningful for the target domain features. By setting this threshold, a feature set can be formed:

[0141] ;

[0142] In practical applications, is obtained through experimental tuning. is the source domain feature, and is the target domain feature.

[0143] Secondly, once the feature set is obtained, the maximum mean discrepancy (MMD) can be used to measure the feature distribution difference between the source domain and the target domain:

[0144] Calculate the pairwise distance between the source domain feature and the feature in its nearest target domain, and take the average of all the minimum pairwise distances (pairwise Euclidean distances) as the local neighborhood alignment loss :

[0145] ;

[0146] where is the batch size of the source domain, is the batch size of the target domain. Here, the batch size is the number of samples processed by the model in one forward propagation and one backward propagation. Minimizing the pairwise distance can directly optimize the feature alignment between different domains. Although can alleviate the local feature differences by minimizing the pairwise distance between the intermediate features in the source domain and the target domain, using this method alone may not be sufficient to completely eliminate the global distribution shift between the source domain and the target domain. To further enhance the cross-domain transferability of the features, the global neighborhood alignment loss is introduced to quantify the global difference between the source domain and the target domain features. By using the first-order statistics of the source domain and target domain feature distributions, the global difference between domains can be approximately represented as:

[0147] ;

[0148] The global distribution difference between the source domain and the target domain is a non-Gaussian distribution, and there may be multiple modes, spikes, and skewness and other complex features. It is difficult to fully describe such complex distribution features with simple mean and variance, and more powerful statistics are needed. For this reason, a parameterized non-linear function is introduced to capture the deeper global distribution differences:

[0149] ;

[0150] where, , are learnable parameters. Therefore, the global domain difference is as follows:

[0151] ;

[0152] Among them, represents the transpose of the weight matrix, represents global, represents transpose, represents the mean of source domain features, represents the mean of target domain features, represents the bias term, which is used to adjust the calculation of global differences.

[0153] Finally, in order to achieve the independence of the model function and target domain features, an adaptive gradient stopping mechanism is introduced. By calculating the distance between source domain and target domain features, the training influence of source domain features is dynamically adjusted in loss calculation.

[0154] During the training process, the distribution distance between source domain features and target domain features will change. In order to respond to this change in a timely manner, dynamic training parameters can be introduced, and these parameters will be automatically adjusted according to the current learning state of the model.

[0155] ;

[0156] Among them, represents the influence factor of source domain features in the th training iteration, is a preset small constant. At the beginning of training, the weight of source domain features is relatively high and gradually decreases as the number of iterations increases. This method can not only flexibly adjust the contribution of the source domain, but also avoid the performance degradation caused by overemphasizing the target domain too early.

[0157] By grading the similarity between source domain features and target domain features, different gradient control strengths can be applied to features at different levels. Specifically, source domain features can be divided into multiple levels according to their similarity to target domain features. Features with high similarity have less influence on the target domain, while features with low similarity can retain more gradient updates:

[0158] ;

[0159] ;

[0160] ;

[0161] Among them, is the maximum similarity, is the level coefficient automatically calculated according to the maximum similarity, which is used to adjust the weighting of the loss. is the source domain loss of the yolo model. is to control hyperparameter.

[0162] The present invention also provides an electronic device, including a processor and a memory communicatively connected to the processor and used for storing executable instructions of the processor. The memory stores instructions executable by the processor, and when the instructions are executed by the processor, the processor is used to execute the intelligent detection method for liver echinococcosis CT images based on domain adaptation.

[0163] The present invention also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the intelligent detection method for liver echinococcosis CT images based on domain adaptation is implemented.

[0164] This method can effectively reduce the influence of different CT devices on the detection of liver echinococcosis by using domain adaptation technology, thereby improving the accuracy and consistency of AI-assisted doctor diagnosis. It can not only save medical costs but also improve the medical experience and health management of patients in remote areas.

[0165] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A domain-adaptive intelligent detection method for hepatic echinococcosis CT images, characterized in that: The following steps are involved: S1. Collect liver CT imaging data; S2, performing image preprocessing on the liver CT image data collected in step S1 based on a multi-scale structure-preserving enhancement model guided by a gradient flow field; S3, performing target detection and annotation on the image data preprocessed in step S2; S4, performing model training on the image data annotated by the target detection in step S3; In step S2, the liver CT image data collected in step S1 are preprocessed based on the multi-scale structure-preserving enhancement model guided by the gradient flow field, including: Perform Gaussian convolution on the input CT image I(x,y) at different scales σ to obtain a smooth image: For each smoothed image I s (x, y; σ), calculate the gradient component: This gives the gradient field: Construct the structure tensor T(x,y;σ): Among them, I s (x, y; σ) represents a smoothed image, Denote the variance as σ 2 Gaussian kernel, * represents convolution operation, x represents the spatial coordinate in the horizontal direction of the image, y represents the vertical coordinate in the horizontal direction of the image, G x (x, y; σ) represents the derivative of the Gaussian kernel in the y direction, G y (x, y; σ) represents the derivative of the Gaussian kernel in the x direction; Introducing structural continuity metrics for different regions of CT images: Among them, C(x, y; σ) represents the structural continuity measure, τ is a hyperparameter for adjusting sensitivity; λ1 represents the gradient strength of the local area of ​​the image in the main direction, and λ2 represents the gradient strength of the local area of ​​the image in the secondary direction. When λ1≈λ2, it means that the area lacks significant directionality; when λ1>λ2, it means that the area has obvious line structure or edge information; At each scale σ, through the kernel function K σ (x, y; x', y') enhances the central pixel (x, y), and the kernel function K σ (x, y; x', y') assigns weights according to the similarity between all pixels (x', y') in the neighborhood and the central pixel (x, y); At each scale σ, for a target pixel (x, y), define the adaptive enhancement kernel K σ To weight the information of surrounding pixels: K σ (x,y;x′,y′)=Ks×Ki×Φ(θ1,θ2); Spatial proximity Ks: Among them, K σ (x, y; x', y') represents the adaptive enhancement kernel, which is used to weight the information of surrounding pixels, Ki represents the grayscale difference, Φ represents the directional consistency function, θ1 and θ2 represent the main direction angles of the target pixel and the surrounding pixels, and σs is a hyperparameter that controls the range of spatial smoothing; Attenuation according to the Euclidean distance through a Gaussian function; Grayscale difference Ki: Among them, σ i A hyperparameter to control the sensitivity of grayscale differences; Direction similarity: Among them, θ1 and θ2 are the main direction angles; The smoothed version I of the input image at scale σ s (x', y'; σ), using the kernel function in a fixed neighborhood Ω (x,y) Perform weighted summation within to obtain the enhanced pixel value Calculate for all (x',y')∈Ω (x,y) The weight K σ (x, y; x', y'), perform weighted summation of the grayscale value of each pixel in the neighborhood and then divide it by the weighted sum; Each scale σ gets an enhanced result The weighted fusion of each scale is performed through structural continuity C(x, y; σ): in, Indicates the enhancement of the result weight; In step S4, model training is performed on the image data annotated with target detection in step S3, including the following steps: S41, select features whose similarity with the target domain feature map is higher than the set value from the source domain feature map of the CT image to form a feature set F similar ; S42, based on feature set F similar The maximum mean difference is used to measure the difference in feature distribution between the source domain and the target domain; S43. By calculating the distance between the source domain features and the target domain features, the model training impact of the source domain features is dynamically adjusted in the loss calculation.

2. The method for intelligent detection of hepatic echinococcosis CT images based on domain adaptation according to claim 1, characterized in that: In step S3, when the object of target detection and annotation is cystic echinococcosis data, a cystic echinococcosis data set is established, and the categories include single cystic echinococcosis, multiascus echinococcosis, internal capsule collapse echinococcosis, necrotizing and consolidating echinococcosis, calcified echinococcosis, infiltrative echinococcosis, and liquefied cavitary echinococcosis.

3. The method for intelligent detection of hepatic echinococcosis CT images based on domain adaptation according to claim 1, characterized in that: In step S41, features whose similarity with the target domain feature map is higher than a set value are selected from the source domain feature map of the CT image to form a feature set F similar ,include: Cosine similarity is selected as the similarity measure, and the formula is as follows: Among them, f s is the feature vector in the source domain, f t is the feature vector in the target domain; Set a similarity threshold α, which is used to filter out features with a similarity higher than the set value. By setting the similarity threshold α, the feature set F is formed. similar : Among them, F source is the source domain feature, F target is the target domain feature.

4. The method for intelligent detection of hepatic echinococcosis CT images based on domain adaptation according to claim 3 is characterized in that: In step S42, based on the feature set F similar The maximum mean difference is used to measure the difference in feature distribution between the source domain and the target domain, including: Calculate the source domain feature F source and its closest target domain feature F target The pairwise distance of the local domain alignment loss is taken as the average of all the minimum pairwise Euclidean distances. Among them, N s is the batch size of the source domain, N t is the batch size of the target domain; Introducing global domain alignment loss Quantify the global difference between source and target domain features; by using the first-order statistics of the distribution of source and target domain features, the global difference between domains is approximately expressed as: The global distribution difference between the source domain and the target domain is a non-Gaussian distribution, which introduces a parameterized nonlinear function f θ Capture deeper global distribution differences: in, is a learnable parameter, so the global domain difference As shown below: in, represents the transpose of the weight matrix, G represents global, T represents transpose, μ s represents the mean of the source domain features, μ t represents the mean of the target domain features, b G Represents the bias term, which is used to adjust the calculation of the global difference.

5. The method for intelligent detection of hepatic echinococcosis CT images based on domain adaptation according to claim 4, characterized in that: In step S43, by calculating the distance between the source domain features and the target domain features, the model training influence of the source domain features is dynamically adjusted in the loss calculation, including: Introducing dynamic training parameters, which can be automatically adjusted according to the current learning state of the model; Among them, α(t) represents the influence factor of the source domain feature in the t-th training iteration, and β is a preset constant; the source domain features are divided into multiple levels according to their similarity with the target domain features, among which the low-similarity features retain the gradient update: Among them, S max is the maximum similarity, K S It is the level coefficient automatically calculated based on the maximum similarity, which is used to adjust the weighting of the loss; L yolo is the source domain loss of the YOLO model; σ2 is the control K S Hyperparameters of .

6. An electronic device comprising a processor and a memory connected to the processor for storing instructions executable by the processor, characterized in that: The memory stores instructions that can be executed by the processor, and the instructions are executed by the processor. The processor is used to execute the domain-adaptive intelligent detection method for hepatic echinococcosis CT images described in any one of claims 1 to 5.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the domain-adaptive intelligent detection method for hepatic echinococcosis CT images described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Domain adaptive model training method and device, image detection method and device, equipment and medium

    CN111860670A

  • Map image interpretation method and system based on domain self-adaption

    CN118762281A