X-ray image lesion detection method and device

Through the structural relationship reasoning module of edge-guided spine feature enhancement and context aggregation, the characteristics of spinal lesions in X-ray images are used to solve the problem of limited detection performance in the existing technology and achieve more efficient spine lesion detection.

CN118691589AActive Publication Date: 2024-09-24TIANJIN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410882325.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-09-24
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

Existing deep learning-based spinal lesion detection methods in X-ray images fail to fully utilize the characteristics of spinal lesions in X-ray images, resulting in limited detection performance.

Method used

An edge-guided spine feature enhancement module and a contextual aggregation structural relationship reasoning module are designed. The spine edge features are extracted through histogram equalization, median filtering, and Canny edge detector, and the activation layer and multi-scale downsampling layer are used to obtain edge attention. Strive to enhance the characteristics of the spine; at the same time, explore the structural relationship between the spinal vertebrae through RoIAlign and feature aggregation units to improve the accuracy of lesion perception.

Benefits of technology

It effectively improves the performance of spinal lesion detection, obtains more discriminative feature representation and more accurate lesion perception, and improves detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691589A
    Figure CN118691589A
Patent Text Reader

Abstract

The invention discloses an X-ray image lesion detection method and device, and the method comprises an X-ray image feature extraction module which is used for extracting image features from an X-ray image; the edge-guided spine feature enhancement module is used for extracting a spine edge image from the X-ray image through an edge detector and enhancing spine features by using the spine edge image; the candidate feature extraction module is used for obtaining candidate features from the enhanced spine features; the context aggregated structural relation reasoning module is used for obtaining query features and context features from the enhanced spine features, mining correlation between the query features and the context features to obtain aggregated features, and compensating candidate features by using the aggregated features; and the spine lesion detection head is used for completing spine lesion detection through the compensated candidate features. The device comprises a processor and a memory. According to the invention, the spinal lesion characteristics in the X-ray image are deeply explored to realize more accurate lesion perception, so that the spinal lesion detection performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of X-ray image detection, and in particular to a method and device for detecting lesions in X-ray images. Background Art

[0002] As an important part of the human skeletal system, the spine plays an important role in protecting the central nervous system and maintaining body balance. Since spinal diseases can cause serious consequences such as nerve damage and limb dysfunction, accurate diagnosis of spinal diseases is crucial. In the process of diagnosing spinal diseases, doctors need to conduct in-depth analysis of spinal images to understand the lesions. Spinal lesion detection technology aims to automatically identify the type of spinal lesions and locate the location of spinal lesions from images, which can assist doctors in completing the diagnosis of spinal diseases. Therefore, it is of great significance to carry out research on spinal lesion detection technology.

[0003] Due to the advantages of low radiation and convenient operation, X-ray images have become one of the important bases for diagnosing spinal diseases. In recent years, thanks to the powerful feature extraction ability of deep learning, the X-ray image spinal lesion detection technology based on deep learning has attracted widespread attention from researchers. Nguyen et al. proposed a two-stage spinal lesion detection method, which first uses a densely connected network DenseNet to determine whether there are spinal lesions in the X-ray image, and then further detects the images with lesions to determine the type and location of the lesions, thereby effectively improving the accuracy of spinal lesion detection. et al. proposed a method for identifying lumbar spondylolisthesis, which first locates the lumbar region of the spine in the X-ray image and then uses an image classification network to determine whether lumbar spondylolisthesis occurs in the lumbar region.

[0004] The above methods directly use the detection methods in natural images to detect spinal lesions in X-ray images. However, these methods do not fully consider the characteristics of spinal lesions in X-ray images, resulting in limited performance of spinal lesion detection. Therefore, how to use the characteristics of spinal lesions in X-ray images to improve the accuracy of lesion detection still needs further exploration. Summary of the invention

[0005] The present invention provides a method and device for detecting lesions in X-ray images. The present invention makes full use of the characteristics of spinal lesions in X-ray images to improve the lesion detection performance, uses spinal edge information to enhance spinal features to obtain more discriminative feature representation, and deeply explores the structural relationship between spinal vertebrae to achieve more accurate lesion perception, thereby improving the spinal lesion detection performance. See the following description for details:

[0006] In a first aspect, a method for detecting lesions in an X-ray image is provided, the method comprising:

[0007] An X-ray image feature extraction module, which takes the X-ray image as input and obtains image features;

[0008] The edge-guided spine feature enhancement module takes the X-ray image and image features as input, extracts the spine edge map from the X-ray image using histogram equalization, median filtering and Canny edge detector; extracts edge features from the spine edge map using an edge map encoder; obtains an edge attention map corresponding to the image features using an activation layer and a multi-scale downsampling layer; and enhances the spine features using the edge attention map to obtain enhanced spine features.

[0009] The candidate feature extraction module takes the enhanced spine features and N randomly initialized learnable candidate boxes as input, and uses RoIAlign to obtain candidate features from the enhanced spine features;

[0010] The context-aggregated structural relationship reasoning module takes the highest-level features of the enhanced spine features, N randomly initialized learnable candidate boxes and candidate features as inputs, obtains the context features corresponding to the candidate features in the highest-level features through the context feature extraction unit; obtains the aggregated features corresponding to the candidate features using the feature aggregation unit; and adds the aggregated features to the candidate features using the feature compensation unit to obtain the compensated candidate features;

[0011] The spinal lesion detection head takes the compensated candidate features and N randomly initialized learnable features as input to complete spinal lesion detection.

[0012] The edge-guided spine feature enhancement module is represented as follows:

[0013]

[0014] in, represents histogram equalization, MF(·) represents median filtering, Represents the Canny edge detector; the spine edge map I e Feed it into the edge map encoder to extract edge features f e , with edge features f e As input, activation layer and multi-scale downsampling layer are used to obtain the X-ray image features. Edge attention maps of the same size

[0015]

[0016] Among them, E D(·) represents the edge map encoder, S(·) represents the activation layer, and MSDL(·) represents the multi-scale downsampling layer. The edge attention map is used to weight the X-ray image features to obtain enhanced spine features:

[0017]

[0018] Among them, ⊙ represents the element-wise multiplication operation.

[0019] The context feature extraction unit is: according to the learnable candidate box in the high-level feature P M Get query features

[0020]

[0021] Where RA(·) represents RoIAlign;

[0022] In the top feature P M The reference positions are evenly laid out in the spatial dimension Reference location With query features Correspondingly, the reference position is obtained through the offset learning operation The corresponding offset is calculated based on the reference position and the offset.

[0023]

[0024] Among them, θ offset (·) indicates the offset learning operation;

[0025] Based on the offset position obtained Through bilinear interpolation sampling operation in P M Sampling is performed to obtain context features

[0026]

[0027] Where φ(·) represents the bilinear interpolation sampling operation.

[0028] Wherein, the feature aggregation unit is:

[0029] Using the linear mapping W q The query feature Mapping to query vector Using the linear mapping W K and W V Context features Mapping to key vector Sum value vector

[0030]

[0031] According to the key vector obtained Sum value vector Calculate the correlation matrix A;

[0032]

[0033] Among them, σ(·) represents the softmax layer, d represents The channel dimension of

[0034] Under the guidance of the correlation matrix A, the aggregate features are obtained

[0035]

[0036] in, Represents a pixel addition operation.

[0037] The feature compensation unit is: adding the aggregated feature to the candidate feature to realize compensation for the candidate feature, and obtaining the compensated candidate feature:

[0038]

[0039] in, Represents a pixel addition operation.

[0040] In a second aspect, an X-ray image lesion detection device comprises: a processor and a memory, wherein the memory stores program instructions, and the processor calls the program instructions stored in the memory to enable the device to execute the method described in the first aspect.

[0041] The beneficial effects of the technical solution provided by the present invention are:

[0042] 1. The present invention utilizes the characteristics of spinal lesions in X-ray images to effectively improve the performance of spinal lesion detection;

[0043] 2. The present invention designs an edge-guided spine feature enhancement module, which utilizes spine edge information to enhance spine features, thereby obtaining a more discriminative feature representation;

[0044] 3. The present invention designs a context-aggregated structural relationship reasoning module, which deeply explores the structural relationship between spinal vertebrae, thereby achieving more accurate lesion perception. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a method for detecting lesions in X-ray images. DETAILED DESCRIPTION

[0046] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention are described in further detail below.

[0047] Example 1

[0048] The following is an example to illustrate a specific implementation of an X-ray image lesion detection method in an embodiment of the present invention.

[0049] 1. Constructing X-ray Image Feature Extraction Module

[0050] The X-ray image feature extraction module takes the X-ray image as input and aims to extract the multi-scale features of the X-ray image. Specifically, the X-ray image feature extraction module extracts M layers of X-ray image features. where F m Represents the learned X-ray image features of the mth layer, and M is set to 4. The feature extraction process formula is as follows:

[0051]

[0052] Among them, E F (·) represents an X-ray image feature extraction module. This module is composed of ResNet and FPN networks. ResNet and FPN networks are well known to those skilled in the art, and will not be described in detail in the embodiments of the present invention.

[0053] 2. Design of edge-guided spine feature enhancement module

[0054] Based on the X-ray image feature extraction module, the embodiment of the present invention designs an edge-guided spine feature enhancement module, which uses X-ray images and image features. Specifically, the designed edge-guided spine feature enhancement module first extracts the spine edge map I from the X-ray image, e Specifically, the spine edge is first enhanced by using histogram equalization, then the noise in the X-ray image is reduced by using median filtering, and finally the spine edge is extracted by using the Canny edge detector. The formula for the above process is as follows:

[0055]

[0056] in, represents histogram equalization, MF(·) represents median filtering, Represents the Canny edge detector.

[0057] Then, the obtained spine edge map I e Feed it into the edge map encoder to extract edge features f e. Then, the edge feature f e As input, activation layer and multi-scale downsampling layer are used to obtain the X-ray image features. Edge attention maps of the same size The formula is as follows:

[0058]

[0059] Among them, E D (·) represents the edge map encoder, which consists of three convolutional layers with a convolution kernel size of 1×1. S(·) represents the activation layer, which is implemented using the Sigmoid activation function. MSDL(·) represents the multi-scale downsampling layer, which consists of four maximum pooling operations of different scales. The pooling kernels of the maximum pooling operation are 4, 8, 16, and 32 respectively.

[0060] Finally, using the obtained edge attention map X-ray image features Weighted to obtain enhanced spine features The formula is as follows:

[0061]

[0062] Among them, ⊙ represents the element-wise multiplication operation.

[0063] 3. Constructing the candidate feature extraction module

[0064] In order to obtain the potential location of the lesion and the features of the corresponding area, the embodiment of the present invention constructs a candidate feature extraction module. This module uses enhanced spinal features and N randomly initialized learnable candidate boxes As input, RoIAlign is used to extract the enhanced spine features Get candidate features N is set to 100. The formula is as follows:

[0065]

[0066] Wherein, RA(·) represents RoIAlign, and the feature space resolution extracted by RoIAlign is set to 7×7. RoIAlign is well known to those skilled in the art, and will not be described in detail in the embodiment of the present invention.

[0067] 4. Designing a structural relationship reasoning module for context aggregation

[0068] In order to fully explore the structural relationship between spinal vertebrae to improve the accuracy of spinal lesion detection, the present invention designs a context-aggregated structural relationship reasoning module. This module uses the highest-level feature P of the enhanced spinal feature to M, N randomly initialized learnable candidate boxes and candidate features As input, the highest level feature P is first obtained through the context feature extraction unit M Candidate features Corresponding context features Then, the feature aggregation unit is used to obtain the candidate features The corresponding aggregation features Finally, the feature compensation unit is used to aggregate the features Add candidate features In the above example, we obtain the compensated candidate features

[0069] In the context feature extraction unit, firstly, according to the learnable candidate box At the high-level feature P M Get query features

[0070]

[0071] Among them, RA(·) represents RoIAlign.

[0072] Then, at the top level feature P M The reference positions are evenly laid out in the spatial dimension Reference location With query features Correspondingly, the reference position is obtained through offset learning operation The corresponding offset is calculated based on the reference position and the offset.

[0073]

[0074] Among them, θ offset (·) represents the offset learning operation. This operation contains two convolutional layers with a kernel size of 3×3, a GeLU activation layer, and a normalization layer.

[0075] Finally, based on the obtained offset position Through bilinear interpolation sampling operation in P M Sampling is performed to obtain context features The formula is as follows:

[0076]

[0077] Where φ(·) represents the bilinear interpolation sampling operation.

[0078] In the feature aggregation unit, we first use the linear mapping W q The query feature Mapping to query vector And using the linear map W K and W V Context features Mapping to key vector Sum value vector

[0079]

[0080] Then, according to the key vector obtained Sum value vector Calculate the correlation matrix A.

[0081]

[0082] Among them, σ(·) represents the softmax layer, d represents The channel dimension d is set to 256.

[0083] Finally, the aggregate features are obtained under the guidance of the correlation matrix A The formula is as follows:

[0084]

[0085] in, Represents a pixel addition operation.

[0086] In the feature compensation unit, the aggregated features Add candidate features In order to realize the candidate features , thereby obtaining the compensated candidate features The formula is as follows:

[0087]

[0088] in, Represents a pixel addition operation.

[0089] 5. Constructing the Spinal Lesion Detection Head

[0090] Spinal lesion detection head with compensated candidate features and N randomly initialized learnable features As input, spinal lesion detection is completed. Specifically, the classification branch and regression branch are used to predict the lesion category respectively. and lesion location The formula is as follows:

[0091]

[0092] in, represents the classification branch, Represents a regression branch.

[0093] Finally, the predicted lesion category and lesion location The results are combined into lesion detection results, and the final lesion detection results are obtained through non-maximum suppression operation.

[0094] 6. Training the Spinal Lesion Detection Network

[0095] An X-ray image lesion detection network proposed in an embodiment of the present invention optimizes the spinal lesion detection process in an end-to-end manner. First, the prediction result is matched with the real lesion using the Hungarian matching algorithm, and then the set prediction loss is used to constrain the distance between the prediction result and the real lesion. The formula of the set prediction loss is expressed as follows:

[0096] L=λ cls ·L cls +λ L1 ·L L1 +λ giou ·L giou

[0097] Among them, L cls represents the Focal loss, L L1 represents the Smooth L1 loss, L giou represents GIOU loss, λ cls , L1 and λ giou Respectively represent the coefficients of Focal loss, Smooth L1 loss and GIOU loss. In the embodiment of the present invention, λ cls , L1 and λ giou Set to 2.0, 5.0 and 2.0 respectively.

[0098] The above-mentioned Focal loss, Smooth L1 loss and GIOU loss are well known to those skilled in the art and will not be elaborated in detail in the embodiment of the present invention.

[0099] Example 2

[0100] An X-ray image lesion detection device, the device comprising: a processor and a memory, the memory storing program instructions, the processor calling the program instructions stored in the memory to enable the device to perform the following method steps in embodiment 1:

[0101] Taking X-ray images and image features as input, histogram equalization, median filtering and Cann yThe edge detector extracts a spine edge map from the X-ray image; the edge map encoder is used to extract edge features from the spine edge map; the activation layer and the multi-scale downsampling layer are used to obtain an edge attention map corresponding to the image features; the spine features are enhanced using the edge attention map to obtain enhanced spine features;

[0102] Taking the enhanced spine features and N randomly initialized learnable candidate boxes as input, RoIAlign is used to obtain candidate features from the enhanced spine features;

[0103] Taking the highest-level features of the enhanced spine features, N randomly initialized learnable candidate boxes and candidate features as input, the context features corresponding to the candidate features in the highest-level features are obtained through the context feature extraction unit; the aggregated features corresponding to the candidate features are obtained by the feature aggregation unit; the aggregated features are added to the candidate features by the feature compensation unit to obtain the compensated candidate features;

[0104] The compensated candidate features and N randomly initialized learnable features are used as input to complete spinal lesion detection.

[0105] Among them, the representation of edge-guided spine feature enhancement is as follows:

[0106]

[0107] in, represents histogram equalization, MF(·) represents median filtering, Represents the Canny edge detector; the spine edge map I e Feed it into the edge map encoder to extract edge features f e , with edge features f e As input, activation layer and multi-scale downsampling layer are used to obtain the X-ray image features. Edge attention maps of the same size

[0108]

[0109] Among them, E D (·) represents the edge map encoder, S(·) represents the activation layer, and MSDL(·) represents the multi-scale downsampling layer. The edge attention map is used to weight the X-ray image features to obtain enhanced spine features:

[0110]

[0111] Among them, ⊙ represents the element-wise multiplication operation.

[0112] Among them, the context feature extraction unit is: according to the learnable candidate box in the high-level feature P MGet query features

[0113]

[0114] Where RA(·) represents RoIAlign;

[0115] In the top feature P M The reference positions are evenly laid out in the spatial dimension Reference location With query features Correspondingly, the reference position is obtained through the offset learning operation The corresponding offset is calculated based on the reference position and the offset.

[0116]

[0117] Among them, θ offset (·) indicates the offset learning operation;

[0118] Based on the offset position obtained Through bilinear interpolation sampling operation in P M Sampling is performed to obtain context features

[0119]

[0120] Where φ(·) represents the bilinear interpolation sampling operation.

[0121] Among them, the feature aggregation unit is:

[0122] Using the linear mapping W q The query feature Mapping to query vector Using the linear mapping W K and W V Context features Mapping to key vector Sum value vector

[0123]

[0124] According to the key vector obtained Sum value vector Calculate the correlation matrix A;

[0125]

[0126] Among them, σ(·) represents the softmax layer, d represents The channel dimension of

[0127] Under the guidance of the correlation matrix A, the aggregate features are obtained

[0128]

[0129] in, Represents a pixel addition operation.

[0130] The feature compensation unit is: adding the aggregated features to the candidate features to realize compensation for the candidate features, and obtaining the compensated candidate features:

[0131]

[0132] in, Represents a pixel addition operation.

[0133] Unless otherwise specified, the models of the components in the embodiments of the present invention are not limited, and any device that can perform the above functions may be used.

[0134] Those skilled in the art will appreciate that the accompanying drawing is only a schematic diagram of a preferred embodiment, and the serial numbers of the embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0135] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting lesions in X-ray images, characterized in that: The method comprises: An X-ray image feature extraction module, which takes the X-ray image as input and obtains image features; The edge-guided spine feature enhancement module takes the X-ray image and image features as input, extracts the spine edge map from the X-ray image using histogram equalization, median filtering and Canny edge detector; extracts edge features from the spine edge map using an edge map encoder; obtains an edge attention map corresponding to the image features using an activation layer and a multi-scale downsampling layer; and enhances the spine features using the edge attention map to obtain enhanced spine features. The candidate feature extraction module takes the enhanced spine features and N randomly initialized learnable candidate boxes as input, and uses RoIAlign to obtain candidate features from the enhanced spine features; The context-aggregated structural relationship reasoning module takes the highest-level features of the enhanced spine features, N randomly initialized learnable candidate boxes and candidate features as inputs, obtains the context features corresponding to the candidate features in the highest-level features through the context feature extraction unit; obtains the aggregated features corresponding to the candidate features using the feature aggregation unit; and adds the aggregated features to the candidate features using the feature compensation unit to obtain the compensated candidate features; The spinal lesion detection head takes the compensated candidate features and N randomly initialized learnable features as input to complete spinal lesion detection.

2. The X-ray image lesion detection method according to claim 1, characterized in that: The edge-guided spine feature enhancement module is represented as follows: in, represents histogram equalization, MF(·) represents median filtering, Represents the Canny edge detector; the spine edge map I e Feed it into the edge map encoder to extract edge features f e , with edge features f e As input, activation layer and multi-scale downsampling layer are used to obtain the X-ray image features. Edge attention maps of the same size Among them, E D (·) represents the edge map encoder, S(·) represents the activation layer, and MSDL(·) represents the multi-scale downsampling layer. The edge attention map is used to weight the X-ray image features to obtain enhanced spine features: Among them, ⊙ represents the element-wise multiplication operation.

3. The X-ray image lesion detection method according to claim 1, characterized in that: The context feature extraction unit is: According to the learnable candidate box in the high-level feature P M Get query features Where RA(·) represents RoIAlign; In the top feature P M The reference positions are evenly laid out in the spatial dimension Reference location With query features Correspondingly, the reference position is obtained through the offset learning operation The corresponding offset is calculated based on the reference position and the offset. Among them, θ offset (·) indicates the offset learning operation; Based on the offset position obtained Through bilinear interpolation sampling operation in P M Sampling is performed to obtain context features Where φ(·) represents the bilinear interpolation sampling operation.

4. The X-ray image lesion detection method according to claim 1, characterized in that: The feature aggregation unit is: Using the linear map W q The query feature Mapping to query vector Using the linear mapping W K and W V Context features Mapping to key vector Sum value vector According to the key vector obtained Sum value vector Calculate the correlation matrix A; Among them, σ(·) represents the softmax layer, d represents The channel dimension of Under the guidance of the correlation matrix A, the aggregate features are obtained in, Represents a pixel addition operation.

5. The X-ray image lesion detection method according to claim 1, characterized in that: The characteristic compensation unit is: Add the aggregated features to the candidate features to compensate for the candidate features and obtain the compensated candidate features: in, Represents a pixel addition operation.

6. An X-ray image lesion detection device, characterized in that: The device comprises: a processor and a memory, wherein program instructions are stored in the memory, and the processor calls the program instructions stored in the memory to enable the device to execute any one of the methods of claims 1-5.

Citation Information

Patent Citations

  • Automatic cardiac mitral valve annulus detecting method

    CN103284758A

  • Remote sensing image culture pond detection method based on instance segmentation

    CN110751075A

  • Spinal tumor MRI image semantic segmentation method based on multiple attention mechanisms

    CN117392677A

  • Hyperspectral image classification method based on rich context network

    WO2023019698A1