Medical image detection method and related device

By using variational autoencoders and convolutional neural network models to process medical images, the problem of inaccurate detection caused by reliance on doctors' experience is solved, and more efficient lesion region and category identification is achieved.

CN117173075BActive Publication Date: 2026-01-23HON HAI PRECISION INDUSTRY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210571810.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2026-01-23
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

Existing medical image detection solutions rely on doctors' personal experience, which leads to inaccurate judgments and is prone to misidentification or omission.

Method used

A variational autoencoder model and a convolutional neural network model are used to process medical images. Image contrast is improved through preprocessing, and the target region and feature region are determined using the trained model to select the lesion region and category.

Benefits of technology

It improves the accuracy of medical image detection, reduces errors, and enables more accurate identification of lesion areas and categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173075B_ABST
    Figure CN117173075B_ABST
Patent Text Reader

Abstract

The application relates to image processing and provides a medical image detection method and related equipment. The medical image detection method comprises the following steps: acquiring a to-be-detected image, inputting the acquired to-be-detected image as a target image into a variational autoencoder model which has been pre-trained, obtaining a reconstructed image, determining a target region according to pixel values of corresponding pixel points in the reconstructed image and the target image, inputting the target image into a convolutional neural network model which has been pre-trained, obtaining a feature region and a lesion category of the feature region, if the target image has a feature region corresponding to the target region, determining a lesion region and a corresponding lesion category based on the target region and the feature region, and generating a detection result of the to-be-detected image, so that the detection accuracy of image detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, and in particular to a medical image detection method and related equipment. BACKGROUND

[0002] In the existing medical image detection scheme, a doctor usually performs manual recognition and judgment on a medical image. For example, the doctor often only frames a lesion region on the medical image according to personal experience, and gives a lesion category that may correspond to the lesion region. Since personal experience is needed, the judgment on the medical image is not accurate enough, and there is a problem of erroneous recognition or missed recognition. SUMMARY

[0003] In view of the above, it is necessary to provide a medical image detection method and related equipment, which can solve the problem of difficulty in improving the detection accuracy of a medical image.

[0004] The present application provides a medical image detection method, which comprises:

[0005] An image to be detected is acquired, and the acquired image to be detected is input as a target image into a variational autoencoder model that has been pre-trained to obtain a reconstructed image. A target region is determined according to pixel values of corresponding pixel points in the reconstructed image and the target image. The target image is input into a convolutional neural network model that has been pre-trained to obtain a feature region and a lesion category of the feature region. If there is a feature region corresponding to the target region in the target image, a lesion region and a corresponding lesion category are determined based on the target region and the feature region, and a detection result of the image to be detected is generated.

[0006] According to an optional embodiment of the present application, before the target image is input into the variational autoencoder model that has been pre-trained, the method further comprises pre-processing the target image, including:

[0007] traverse pixel values of all pixel points in the to-be-detected image, and determine a maximum gray scale value and a minimum gray scale value in the to-be-detected image from the pixel values of all pixel points in the to-be-detected image; calculate a sum of pixel values of all pixel points in the to-be-detected image, and calculate a ratio of the sum of pixel values to a number of the all pixel points to obtain a gray scale average value; calculate a mean square sum according to the number of the all pixel points and the pixel value of each pixel point in the to-be-detected image; generate a first numerical value according to the maximum gray scale value, the minimum gray scale value, the gray scale average value, the mean square sum, a preset maximum gray scale value, a preset minimum gray scale value, and a preset gray scale average value; generate a second numerical value according to the preset maximum gray scale value, the preset minimum gray scale value, the maximum gray scale value, the minimum gray scale value, and the first numerical value; generate a third numerical value according to the preset minimum gray scale value, the minimum gray scale value, the first numerical value, and the second numerical value; generate a target pixel value corresponding to each pixel point according to the pixel value of each pixel point in the to-be-detected image, the first numerical value, the second numerical value, and the third numerical value; and generate the target image according to each pixel point and the target pixel value corresponding to each pixel point.

[0008] According to an optional embodiment of the present application, the calculation formula of the target pixel value is:

[0009] Y = A (X - B) 2 +C;

[0010] wherein Y refers to the target pixel value, A refers to the second numerical value, X refers to the pixel value corresponding to any pixel point in the to-be-detected image, B refers to the first numerical value, and C refers to the third numerical value.

[0011] According to an optional embodiment of the present application, before the acquired to-be-detected image is input as a target image into a variational autoencoder model that has been pre-trained to obtain a reconstructed image, the method further comprises:

[0012] constructing a variational learner and acquiring an X-ray image of a normal lung; pre-processing the X-ray image of the normal lung to obtain a pre-processed normal lung image; training the variational learner based on the pre-processed normal lung image, and calculating a loss value of the variational learner until the loss value drops to the lowest to obtain the variational autoencoder model that has been pre-trained.

[0013] According to an optional embodiment of the present application, the determining of the target region according to the pixel values of the corresponding pixel points in the reconstructed image and the target image comprises:

[0014] Subtracting pixel values of the pixel points in the reconstructed image from pixel values of corresponding pixel points in the target image, a pixel difference value is obtained; taking an absolute value of the pixel difference value, a pixel absolute value is obtained; determining a target absolute value as the pixel absolute value whose value is greater than a first preset threshold, and determining a target region as a region composed of a plurality of adjacent target absolute values in the target image.

[0015] According to an optional embodiment of the present application, before the target image is input into the pre-trained convolutional neural network model to obtain the feature region and the lesion category of the feature region, the method further comprises:

[0016] Obtaining a plurality of lesion categories and a plurality of preset intervals; establishing a corresponding relationship between each preset interval and each lesion category.

[0017] According to an optional embodiment of the present application, the inputting of the target image into the pre-trained convolutional neural network model to obtain the feature region and the lesion category of the feature region comprises:

[0018] Performing feature extraction on the target image to generate a heat map; obtaining a heat pixel value of each pixel point in the heat map, and determining a target pixel point as a pixel point corresponding to a heat pixel value greater than a second preset threshold; comparing the heat pixel value of each target pixel point with the plurality of preset intervals, and determining a preset interval to which each target pixel point belongs; determining a feature region as a region composed of a plurality of adjacent target pixel points belonging to the same preset interval in the target image; determining a lesion category corresponding to the feature region according to the preset interval to which a pixel point in the feature region belongs and the corresponding relationship.

[0019] According to an optional embodiment of the present application, the determining of the lesion region and the corresponding lesion category based on the target region and the feature region, and the generating of the detection result of the image to be detected comprises:

[0020] Boxing out a common region of the target region and the feature region corresponding to the target region in the target image, and determining the common region as a lesion region; taking the lesion region and the lesion category corresponding to the corresponding feature region as the detection result of the image to be detected.

[0021] The present application provides an electronic device, which comprises:

[0022] a memory storing at least one instruction; and

[0023] a processor executing the at least one instruction to implement the medical image detection method.

[0024] The application provides a computer readable storage medium, wherein at least one instruction is stored in the computer readable storage medium, and the at least one instruction is executed by a processor in an electronic device to implement the medical image detection method.

[0025] It can be seen from the above technical solutions that the application pre-processes the to-be-detected image to obtain the target image, and since the pre-processing can improve the contrast of the to-be-detected image, the to-be-detected image is clearer. Since the variational autoencoder model is generated after being trained according to a normal lung image, the reconstructed image generated is equivalent to a normal lung image. According to the pixel values of the corresponding pixel points in the reconstructed image and the target image, the target region is determined, so the target region can more represent the difference between the target image and the normal lung image. The target image is input into the pre-trained convolutional neural network model to obtain a feature region and a lesion category of the feature region, which can preliminarily frame the position of the target image that may be a lesion. By detecting whether the feature region corresponding to the target region exists in the target image, whether the feature region contains a lesion can be further determined based on the target region. When the feature region corresponding to the target region does not exist in the target image, since the target region can be used to exclude the feature region without a lesion, the detection error is reduced, and therefore the detection accuracy is improved. If the feature region corresponding to the target region exists in the target image, the lesion region and the corresponding lesion category are determined based on the target region and the feature region, and the accurate region of the lesion region can be determined. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 FIG. 1 is a flowchart of a preferred embodiment of the medical image detection method of the application.

[0027] Figure 2 FIG. 2 is a schematic diagram of a to-be-detected image in the medical image detection method of the application.

[0028] Figure 3 FIG. 3 is a schematic diagram of a target image in the medical image detection method of the application.

[0029] Figure 4 FIG. 4 is a schematic diagram of a target region in the medical image detection method of the application.

[0030] Figure 5 FIG. 5 is a schematic diagram of a feature region in the medical image detection method of the application.

[0031] Figure 6 FIG. 6 is a structural schematic diagram of an electronic device for implementing the preferred embodiment of the medical image detection method of the application. DETAILED DESCRIPTION

[0032] To make the objectives, technical solutions, and advantages of this application clearer, the application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] The medical image detection method can be applied to one or more electronic devices 1. The electronic device 1 is a device capable of automatically calculating parameter values ​​and / or processing information according to pre-set or stored instructions. Its hardware includes, but is not limited to: microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0034] The electronic device 1 can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.

[0035] The electronic device 1 may further include network devices and / or user devices. The network devices include, but are not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.

[0036] The network in which the electronic device 1 is located includes, but is not limited to: the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.

[0037] like Figure 1 The diagram shown is a flowchart of a preferred embodiment of a medical image detection method according to this application. Depending on different needs, the order of the steps in the flowchart can be adjusted according to actual detection requirements, and some steps can be omitted. The method is executed by an electronic device, such as... Figure 1 Electronic device 1 shown.

[0038] S10, acquire the image to be detected.

[0039] In at least one embodiment of this application, the image to be detected refers to a lung X-ray image that needs to be examined for lung detection.

[0040] In at least one embodiment of the present application, the electronic device obtains the to-be-detected image from a preset first database. The preset first database can be ChestX-ray14, LIDC-IDRI, etc.

[0041] S11, input the obtained to-be-detected image as a target image into a variational autoencoder model pre-trained, to obtain a reconstructed image.

[0042] In at least one embodiment of the present application, the target image refers to an image generated after the to-be-detected image is subjected to balanced contrast enhancement processing.

[0043] In at least one embodiment of the present application, before inputting the target image into the variational autoencoder model pre-trained, the method further comprises: preprocessing the target image, including:

[0044] The electronic device traverses the pixel values of all pixel points in the to-be-detected image, and determines the maximum gray scale value and the minimum gray scale value in the to-be-detected image from the pixel values of all pixel points in the to-be-detected image. The electronic device calculates the sum of the pixel values of all pixel points in the to-be-detected image, and calculates the ratio of the sum of the pixel values to the number of all pixel points to obtain a gray scale average value. The electronic device calculates the sum of squares according to the number of all pixel points and the pixel value of each pixel point in the to-be-detected image. Further, the electronic device generates a first value according to the maximum gray scale value, the minimum gray scale value, the gray scale average value, the sum of squares, a preset maximum gray scale value, a preset minimum gray scale value, and a preset gray scale average value. Still further, the electronic device generates a second value according to the preset maximum gray scale value, the preset minimum gray scale value, the maximum gray scale value, the minimum gray scale value, and the first value. Still further, the electronic device generates a third value according to the preset minimum gray scale value, the minimum gray scale value, the first value, and the second value. Still further, the electronic device generates a target pixel value corresponding to each pixel point according to the pixel value of each pixel point in the to-be-detected image, the first value, the second value, and the third value. Still further, the electronic device generates the target image according to each pixel point and the target pixel value corresponding to each pixel point.

[0045] Specifically, the calculation formula of the target pixel value is:

[0046] Y=A(X-B) 2 +C;

[0047] Wherein, Y refers to the target pixel value, A refers to the second numerical value, X refers to the pixel value corresponding to any pixel point in the to-be-detected image, B refers to the first numerical value, and C refers to the third numerical value.

[0048] Specifically, the calculation formula of the sum of squares is:

[0049]

[0050] Wherein, N refers to the number of all pixel points in the to-be-detected image, i refers to the i-th pixel point in the to-be-detected image, x i refers to the pixel value of the i-th pixel point in the to-be-detected image;

[0051] Specifically, the calculation formula of the first numerical value is:

[0052]

[0053] Wherein, B refers to the first numerical value, h refers to the maximum gray value, l refers to the minimum gray value, E refers to the preset gray average value, H refers to the preset maximum gray value, L refers to the preset minimum gray value, s refers to the sum of squares, and e refers to the gray average value.

[0054] Specifically, the calculation formula of the second numerical value is:

[0055]

[0056] Wherein, A refers to the second numerical value.

[0057] Specifically, the calculation formula of the third numerical value is:

[0058] C=L-A*(l-B) 2 ;

[0059] Wherein, C refers to the third numerical value.

[0060] In this embodiment, the preset maximum gray value and the preset minimum gray value can be set by themselves, and the present application does not limit this. The preset gray average value can be calculated from the preset maximum gray value and the preset maximum gray value. The calculation formula of the preset gray average value is basically the same as the calculation process of the gray average value, and the present application does not repeat it.

[0061] As Figure 2 shown, it is a schematic diagram of a to-be-detected image in the medical image detection method of the present application. The to-be-detected image is a lung image, from Figure 2 It can be seen that the image contrast of the to-be-detected image is low, so that the lung region in the to-be-detected image is relatively blurred.

[0062] As Figure 3 shown, it is a schematic diagram of a target image in the medical image detection method of the present application. From Figure 3 It can be seen that the image contrast of the target image is enhanced, the bright places are brighter, the dark places are darker, and the target image is clearer, so that the black lung region in the image is more prominent.

[0063] Through the above implementation, since the preset maximum gray scale value and the preset minimum gray scale value can be adjusted, increasing the preset maximum gray scale value and reducing the preset minimum gray scale value can increase the difference between the two, which can increase the contrast of the image to be detected, thereby improving the brightness and clarity of the image to be detected. In this way, the brightness and clarity of the generated target image can be controlled.

[0064] In at least one embodiment of the present application, the pre-trained variational autoencoder model refers to a model generated after training on normal lung X-ray images, the normal lung X-ray image refers to an image without any lesions in the lung, and the normal lung X-ray image can be obtained from the first database.

[0065] In at least one embodiment of the present application, the reconstructed image refers to an image generated after the pre-trained variational autoencoder model reconstructs the target image.

[0066] In at least one embodiment of the present application, before the acquired image to be detected is input as a target image into the pre-trained variational autoencoder model to obtain a reconstructed image, the method further comprises:

[0067] The electronic device constructs a variational learner and acquires a normal lung X-ray image, further, the electronic device pre-processes the normal lung X-ray image to obtain a pre-processed normal lung image, the electronic device calculates the loss value of the variational learner, and further, the electronic device trains the variational learner based on the pre-processed normal lung image and calculates the loss value of the variational learner until the loss value decreases to the lowest, thereby obtaining the pre-trained variational autoencoder model.

[0068] In this embodiment, the loss value is calculated based on structural similarity.

[0069] In at least one embodiment of the present application, the pre-trained variational autoencoder model includes an encoder and a decoder, and the electronic device inputs the acquired image to be detected as a target image into the pre-trained variational autoencoder model to obtain a reconstructed image, which includes:

[0070] The electronic device inputs the target image into the encoder for feature extraction to obtain a feature vector, wherein the feature vector has 2n elements, the electronic device extracts the first n elements in the feature vector as a mean vector and extracts the last n elements in the feature vector as a standard deviation vector, further, the electronic device generates a Gaussian random number according to the mean vector and the standard deviation vector, performs random sampling on the Gaussian random number to obtain a sampling value, performs multiplication operation on each element in the mean vector and the sampling value to obtain a plurality of multiplication results, and further, the electronic device performs addition operation on each multiplication result and a corresponding element in the standard deviation vector to obtain a latent vector, and inputs the latent variable into the decoder for mapping processing to obtain the reconstructed image.

[0071] The Gaussian random number can be generated by a Box-Muller algorithm according to the mean vector and the standard deviation vector.

[0072] According to the above embodiment, the pre-trained variational autoencoder model is used to extract features of the target image to obtain the latent vector, important features in the target image can be extracted and compressed, and the influence of image noise is reduced in the compression process, so that the reconstructed image is clearer. Since the pre-trained variational autoencoder model is generated by training normal lung X-ray images, the pre-trained variational autoencoder model learns the features of the normal lung X-ray images, so that the reconstructed image is approximately a normal lung X-ray image.

[0073] S12, determining a target region according to pixel values of corresponding pixel points in the reconstructed image and the target image.

[0074] In at least one embodiment of the present application, the target region refers to a region composed of pixel absolute values greater than a first preset threshold, and the pixel absolute value refers to the absolute value of the difference between the pixel value of each pixel point in the reconstructed image and the pixel value of the corresponding pixel point in the target image.

[0075] In at least one embodiment of the present application, the electronic device determines the target region according to the pixel values of the corresponding pixel points in the reconstructed image and the target image, comprising:

[0076] The electronic device subtracts pixel values of pixel points in the reconstructed image from pixel values of corresponding pixel points in the target image to obtain pixel difference values, takes absolute values of the pixel difference values to obtain pixel absolute values, further determines pixel absolute values greater than a first preset threshold as target absolute values, and determines a region composed of a plurality of adjacent target absolute values in the target image as the target region.

[0077] The first preset threshold can be set by the user, and the present application does not limit this.

[0078] The target region can be a rectangle or other irregular shape.

[0079] As Figure 4 shown is a schematic diagram of a target region in the medical image detection method of the present application. Figure 4 There are two target regions in the figure, each of which is a rectangle.

[0080] According to the above embodiment, since the reconstructed image is approximately a normal lung image, when the target image has a lesion region, the pixel difference value in the target region is larger, and taking the absolute value of the pixel difference value can ensure the uniformity of the sign of the pixel absolute value, so that the target region can more accurately reflect the difference between the target image and the reconstructed image.

[0081] S13, inputting the target image into a pre-trained convolutional neural network model to obtain a feature region and a lesion category of the feature region.

[0082] In at least one embodiment of the present application, the pre-trained convolutional neural network model refers to a model generated after training a pre-constructed convolutional neural network using an X-ray image of lung abnormalities, wherein the X-ray image of lung abnormalities refers to an image in which a lesion region and a lesion category of the lesion region have been labeled, and the X-ray image of lung abnormalities can be obtained from a pre-set second database.

[0083] The pre-trained convolutional neural network model can be a full convolutional neural network.

[0084] For example, the fully connected layer in the deep convolutional neural network can be replaced by a convolutional layer to obtain a replaced deep convolutional neural network, and the replaced deep convolutional neural network is trained based on the X-ray image of lung abnormalities to obtain the pre-trained convolutional neural network model.

[0085] The deep convolutional neural network can include, but is not limited to, ResNet, GoogLeNet, and VGGNet, etc.

[0086] In at least one embodiment of the present application, before the target image is input into the pre-trained convolutional neural network model to obtain the feature region and the lesion category of the feature region, the method further includes:

[0087] The electronic device acquires a plurality of lesion categories and a plurality of preset intervals, and further establishes a corresponding relationship between each preset interval and each lesion category.

[0088] The preset intervals are self-set, and the present application does not limit this.

[0089] For example, the plurality of lesion categories can be lung nodules and pneumonia, wherein the preset interval corresponding to the lung nodules can be [0.6, 0.8], and the preset interval corresponding to the pneumonia can be (0.8, 1].

[0090] In at least one embodiment of the present application, the electronic device inputs the target image into the pre-trained convolutional neural network model to obtain the feature region and the lesion category of the feature region, which includes:

[0091] The electronic device extracts features from the target image to generate a heat map, further acquires a heat pixel value of each pixel point in the heat map, and determines a pixel point corresponding to a heat pixel value greater than a second preset threshold as a target pixel point, and further compares the heat pixel value of each target pixel point with the plurality of preset intervals to determine a preset interval to which each target pixel point belongs, and further determines a region composed of a plurality of adjacent target pixel points in the target image belonging to the same preset interval as the feature region, and further determines the lesion category corresponding to the feature region according to the preset interval to which the pixel points in the feature region belong and the corresponding relationship.

[0092] The lesion category can include, but is not limited to, lung nodules, pneumonia, and pulmonary effusion, and it can be understood that the image to be detected can contain a plurality of lesion categories.

[0093] The second preset threshold can include, but is not limited to, 0.7, 0.8, etc.

[0094] The shape of the feature region can be an ellipse, or other irregular shapes.

[0095] In the embodiment, the pixel point corresponding to the pixel value greater than the second preset threshold is determined as the target pixel point, the pixel point corresponding to the lesion can be determined, by comparing the pixel value of each target pixel point with the plurality of preset intervals, the preset interval to which each target pixel point belongs can be determined, and according to the corresponding relationship between each preset interval and the lesion category, the lesion category corresponding to each target pixel point can be quickly determined.

[0096] Specifically, the convolutional neural network model comprises a plurality of convolutional layers and a global average pooling layer, the electronic device performs feature extraction on the target image, and the generation of the heat map comprises:

[0097] The electronic device performs feature extraction on the to-be-detected image based on the plurality of convolutional layers, obtains a plurality of feature maps output by the last convolutional layer, classifies the target image based on the plurality of feature maps and the global average pooling layer, and obtains the lesion category of the target image and the probability of the lesion category, the electronic device performs reverse gradient calculation on the plurality of feature maps based on the lesion category and the probability of the lesion category, obtains the corresponding weight of each feature map, performs weighted summation on each feature map based on the corresponding weight, and obtains the heat map.

[0098] The calculation formula of the weight is:

[0099]

[0100] Wherein, α k c is the weight corresponding to the kth feature map, Z is the number of pixel points contained in the kth feature map, i is the ith pixel point in the kth feature map, y c is the probability of the lesion category of the target image, x i k is the pixel value of the ith pixel point of the kth feature map, is the partial derivative of the probability of the lesion category to the pixel value of the ith pixel point of the kth feature map.

[0101] Specifically, the calculation formula of the heat map is:

[0102]

[0103] Wherein, L Grad-DAM is the heat map, ReLu is the linear rectifier function, x k is the kth feature map.

[0104] The heat value of each pixel point in the heat map represents the probability that the pixel point belongs to the lesion category. It can be understood that the range of the heat value of each pixel point in the heat map is [0, 1].

[0105] Specifically, the electronic device classifies the target image based on the plurality of feature maps and the global average pooling layer to obtain the lesion category of the target image and the probability of the lesion category, which includes:

[0106] The electronic device inputs the plurality of feature maps into the global average pooling layer to obtain a plurality of predicted categories and a probability corresponding to each predicted category. Further, the electronic device determines the predicted category corresponding to the probability with the maximum value as the lesion category of the target image, and determines the probability with the maximum value as the probability of the lesion category.

[0107] Through the above embodiment, feature extraction is performed on the target image to generate a heat map. Since the heat value of each pixel point in the heat map represents the probability that the pixel point belongs to the lesion category, the greater the heat value in the heat map, the greater the possibility that the pixel point corresponding to the heat value is a lesion. Therefore, the pixel point that may be a lesion in the heat map can be preliminarily determined.

[0108] S14, if the target image includes a feature region corresponding to the target region, determining a lesion region and a corresponding lesion category based on the target region and the feature region, and generating a detection result of the to-be-detected image.

[0109] In at least one embodiment of the present application, the detection result can include a lesion region in the to-be-detected image and a lesion category corresponding to the lesion region. The detection result can also include that the to-be-detected image does not include a lesion region.

[0110] In at least one embodiment of the present application, the electronic device determines a lesion region and a corresponding lesion category based on the target region and the feature region, and generates a detection result of the to-be-detected image, which includes:

[0111] The electronic device frames the common region of the target region and the feature region corresponding to the target region in the target image, and determines the common region as a lesion region. Further, the electronic device takes the lesion region and the lesion category corresponding to the corresponding feature region as the detection result of the to-be-detected image.

[0112] In this embodiment, the color of the target pixel point in the heat map is different from that of other pixel points. For example, the color of the target pixel point can be orange red, and the colors of other pixel points are light blue and yellow.

[0113] As shown in Figure 5 is a schematic diagram of a feature region in the medical image detection method of the present application. Figure 5 There are two ellipses in the feature region, each ellipse is a feature region, and each feature region contains a plurality of target pixel points. Since the color of the target pixel points is obviously different from that of other pixel points, the color of the feature region is more obvious. The positions of the two feature regions are basically consistent with Figure 4 the position of the target region, so Figure 4 each target region in Figure 5 there is a corresponding feature region.

[0114] In at least one embodiment of the present application, if the target region does not have a corresponding feature region in the target image, it indicates that the target region is an error.

[0115] Through the above implementation, it can be determined whether the feature region corresponding to the target region contains a lesion based on the target region, the common region is determined as a lesion region, and the accurate range of the lesion region can be determined based on the target region and the feature region corresponding to the target region, thereby improving the detection accuracy.

[0116] As can be seen from the above technical solutions, the present application pre-processes the to-be-detected image to obtain the target image. Since the pre-processing can improve the contrast of the to-be-detected image, the to-be-detected image can be made clearer. Since the variational autoencoder model is generated after being trained according to a normal lung image, the reconstructed image generated is equivalent to a normal lung image. According to the pixel values of the corresponding pixel points in the reconstructed image and the target image, a target region is determined. Therefore, the target region can more represent the difference between the target image and the normal lung image. The target image is input into a pre-trained convolutional neural network model to obtain a feature region and a lesion category of the feature region. The position of the target image that may be a lesion can be preliminarily framed. By detecting whether there is a feature region corresponding to the target region in the target image, it can be further determined whether the feature region contains a lesion based on the target region. When there is no feature region corresponding to the target region in the target image, since the target region can be used to exclude feature regions without lesions, the detection error is reduced, and therefore the detection accuracy can be improved. If there is a feature region corresponding to the target region in the target image, the lesion region and the corresponding lesion category are determined based on the target region and the feature region, and the accurate region of the lesion region can be determined.

[0117] As shown in Figure 6It is shown that the electronic device is a structural schematic diagram of the electronic device for implementing the medical image detection method according to the preferred embodiment of the present application.

[0118] In an embodiment of the present application, the electronic device 1 comprises, but is not limited to, a memory 12, a processor 13, and a computer program, such as a medical image detection program, stored in the memory 12 and executable on the processor 13.

[0119] Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation on the electronic device 1, which can include more or fewer components than the diagram, or combine certain components, or different components, for example, the electronic device 1 can also include an input / output device, a network access device, a bus, etc.

[0120] The processor 13 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like, and the processor 13 is the operation core and control center of the electronic device 1, which connects each part of the entire electronic device 1 through various interfaces and lines, and obtains the operating system of the electronic device 1 and various installed application programs, program codes, etc.

[0121] The processor 13 obtains the operating system of the electronic device 1 and various installed application programs. The processor 13 obtains the application program to implement the steps in each of the above medical image detection method embodiments, for example Figure 1 The steps shown.

[0122] For example, the computer program can be divided into one or more modules / units, which are stored in the memory 12 and obtained by the processor 13 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the acquisition process of the computer program in the electronic device 1.

[0123] The memory 12 can be used to store the computer programs and / or modules, and the processor 13 realizes various functions of the electronic device 1 by running or acquiring the computer programs and / or modules stored in the memory 12, and calling the data stored in the memory 12. The memory 12 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like; and the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 12 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device.

[0124] The memory 12 can be an external memory and / or an internal memory of the electronic device 1. Further, the memory 12 can be a memory having a physical form, such as a memory stick, a TF card (Trans-flash Card), and the like.

[0125] The modules / units integrated in the electronic device 1, if implemented in the form of software functional units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be implemented by a computer program instructing related hardware to complete, and the computer program can be stored in a computer readable storage medium. When the processor acquires the computer program, the steps of the above-mentioned various method embodiments can be implemented.

[0126] The computer program includes computer program code, which can be in the form of source code, object code, an executable file, or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM).

[0127] In combination Figure 1The memory 12 in the electronic device 1 stores a plurality of instructions to implement a medical image detection method. The processor 13 can acquire the plurality of instructions to implement the following: acquiring a to-be-detected image, inputting the acquired to-be-detected image as a target image into a variational autoencoder model pre-trained, obtaining a reconstructed image, determining a target region according to pixel values of corresponding pixel points in the reconstructed image and the target image, inputting the target image into a convolutional neural network model pre-trained, obtaining a feature region and a lesion category of the feature region, if there is a feature region corresponding to the target region in the target image, determining a lesion region and a corresponding lesion category based on the target region and the feature region, and generating a detection result of the to-be-detected image.

[0128] Specifically, the processor 13 can refer to the specific implementation method of the above instructions Figure 2 The descriptions of related steps in corresponding embodiments are not repeated here.

[0129] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic. For example, the division of the modules is only a logical function division. In actual implementation, other division manners can be adopted.

[0130] The modules described as separate components can or can not be physically separate, and the components displayed as modules can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment.

[0131] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of hardware plus software functional modules.

[0132] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, and the scope of the present application is defined by the appended claims rather than the above description, and therefore all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present application. Any additional reference signs in the claims should not be regarded as limiting the claims involved.

[0133] Furthermore, the term "comprising" does not exclude other elements or steps, and the singular does not exclude the plural and vice-versa, unless the context clearly requires these exclusions. The application can be implemented by means of both soft- and hardware, the elements being either specific integrated circuits (application specific ICs) or parts of software units (e.g. code means) arranged to perform the various functionalities.

[0134] Finally, it should be noted that the above- described embodiments illustrate rather than limit the application, since various modifications and changes can be made thereto by those skilled in the art without departing from the broader spirit and scope of the application as set forth in the appended claims.

Claims

1. A medical image detection method, characterized in that, The medical image detection method includes: Acquire the image to be detected; The acquired image to be detected is input as the target image into a pre-trained variational autoencoder model to obtain the reconstructed image; Determining a target region based on the pixel values ​​of corresponding pixels in the reconstructed image and the target image includes: subtracting the pixel values ​​of pixels in the reconstructed image from the pixel values ​​of corresponding pixels in the target image to obtain a pixel difference; taking the absolute value of the pixel difference to obtain a pixel absolute value; determining the pixel absolute value that is greater than a first preset threshold as the target absolute value; and determining the region formed by multiple adjacent target absolute values ​​in the target image as the target region. The target image is input into a pre-trained convolutional neural network model to obtain the feature regions and the lesion categories of the feature regions; If a feature region corresponding to the target region exists in the target image, the lesion region and the corresponding lesion category are determined based on the target region and the feature region, and the detection result of the image to be detected is generated, including: selecting the common area of ​​the target region and the feature region corresponding to the target region in the target image, determining the common area as the lesion region, and using the lesion region and the lesion category corresponding to the corresponding feature region as the detection result of the image to be detected.

2. The medical image detection method as described in claim 1, characterized in that, Before inputting the target image into a pre-trained variational autoencoder model, the method further includes: preprocessing the target image, including: Traverse the pixel values ​​of all pixels in the image to be detected, and determine the maximum and minimum grayscale values ​​in the image to be detected from the pixel values ​​of all pixels in the image to be detected; Calculate the sum of pixel values ​​of all pixels in the image to be detected, and calculate the ratio of the sum of pixel values ​​to the number of all pixels to obtain the average grayscale value; The mean square sum is calculated based on the total number of all pixels and the pixel value of each pixel in the image to be detected. A first value is generated based on the maximum grayscale value, the minimum grayscale value, the average grayscale value, the mean square sum, the preset maximum grayscale value, the preset minimum grayscale value, and the preset average grayscale value; A second value is generated based on the preset maximum grayscale value, the preset minimum grayscale value, the maximum grayscale value, the minimum grayscale value, and the first value; A third value is generated based on the preset minimum grayscale value, the minimum grayscale value, the first value, and the second value; Generate a target pixel value corresponding to each pixel based on the pixel value of each pixel in the image to be detected, the first value, the second value, and the third value; The target image is generated based on each pixel and the target pixel value corresponding to each pixel.

3. The medical image detection method as described in claim 2, characterized in that, The formula for calculating the target pixel value is: in, This refers to the target pixel value. This refers to the second value. This refers to the pixel value corresponding to any pixel in the image to be detected. This refers to the first value. This refers to the third numerical value.

4. The medical image detection method as described in claim 1, characterized in that, Before inputting the acquired image to be detected as the target image into a pre-trained variational autoencoder model to obtain the reconstructed image, the method further includes: Construct a variational learner and acquire X-ray images of normal lungs; The X-ray image of the normal lung is preprocessed to obtain a preprocessed image of the normal lung; The variational learner is trained based on the preprocessed normal lung images, and the loss value of the variational learner is calculated until the loss value is reduced to the minimum, thus obtaining the pre-trained variational autoencoder model.

5. The medical image detection method according to any one of claims 1 to 4, characterized in that, Before inputting the target image into a pre-trained convolutional neural network model to obtain the feature regions and the lesion categories of the feature regions, the method further includes: Acquire multiple lesion categories and multiple preset intervals; Establish a correspondence between each preset interval and each lesion category.

6. The medical image detection method as described in claim 5, characterized in that, The step of inputting the target image into a pre-trained convolutional neural network model to obtain feature regions and lesion categories within those feature regions includes: Feature extraction is performed on the target image to generate a heatmap; Obtain the thermal pixel value of each pixel in the heat map, and determine the pixel corresponding to the thermal pixel value that is greater than the second preset threshold as the target pixel; The thermal pixel value of each target pixel is compared with the multiple preset intervals to determine the preset interval to which each target pixel belongs; The region consisting of multiple adjacent target pixels belonging to the same preset interval in the target image is defined as the feature region; The lesion category corresponding to the feature region is determined based on the preset interval to which the pixels in the feature region belong and the corresponding relationship.

7. An electronic device, characterized in that, The electronic device includes: Memory, storing at least one instruction; and The processor executes the at least one instruction to implement the medical image detection method as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, which is executed by a processor in an electronic device to implement the medical image detection method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • CT image automatic detection method and system

    CN110827310A

  • Unsupervised medical image segmentation method based on adversarial network

    CN112734764A