A matching processing method based on medical images
By calculating the size, density and boundary feature scores of lung lesions in multiple tomographic images, it solves the problem of difficulty in determining the malignant risk of lesions in the existing technology and improves the efficiency and accuracy of identifying malignant lesions.
Patent Information
- Application Number
- CN202410853298.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-28
AI Technical Summary
Existing technology is difficult to determine the malignant risk of lesions in pulmonary medical images, and may identify too many benign lesions, interfering with doctors' attention to malignant lesions.
By using an image detection model to detect the lesion area in multiple tomographic images, calculate the size, density and boundary characteristics of the lesion, score the malignant match of the lesion, including determining the lesion size score, density score and boundary score, and combine these scores to calculate the malignancy Match rating.
It improves the identification efficiency of malignant lesions, reduces the probability of missed diagnosis, helps doctors identify malignant lesions through more accurate lesion feature scoring, and reduces inaccuracies caused by measurement errors in a single tomographic image.
Smart Images

Figure CN118397007B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and in particular to a matching processing method based on medical images. Background Art
[0002] In the related art, when assisting in the detection and identification of lesions in lung medical images, methods such as artificial neural networks are usually used to identify the area where the lesions are located. However, this method can usually only locate the position of the lesion, but it is difficult to determine the malignancy risk of the lesion. It may even identify too many benign lesions, distracting doctors from paying attention to malignant lesions.
[0003] The information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or any form of implication that the information constitutes the prior art already known to those skilled in the art. Summary of the invention
[0004] The present invention provides a matching processing method based on medical images, which can solve the technical problem that related technologies are difficult to determine the malignant risk of lesions in lung medical images.
[0005] According to the present invention, a matching processing method based on medical images is provided, comprising:
[0006] In a plurality of tomographic images of lung medical images, the image detection model is used to detect the area where the lesion is located, and a selection box of the area where the lesion is located is obtained, wherein the selection box is a minimum circumscribed rectangle for selecting the area where the lesion is located;
[0007] Matching the selection boxes in each tomographic image according to the position of the selection boxes in each tomographic image to determine the target area where the lesion in the lung medical image is located and the target selection box corresponding to the target area;
[0008] Determine the lesion size score based on the length and width of the target selection box in each tomographic image and the location of the target selection box in each tomographic image;
[0009] Determine the background reference pixel value of each tomographic image according to the pixel value of the pixel point outside the selection box in each tomographic image;
[0010] Determine the centroid pixel of the target selection box in each tomographic image;
[0011] Determine a lesion density score according to the centroid pixel point, the background reference pixel value, and the pixel values of multiple pixels in the target selection box;
[0012] Set multiple sampling points on the target selection box;
[0013] Determine a lesion boundary score according to the centroid pixel point, the background reference pixel value, and a plurality of sampling points on the target selection box;
[0014] The malignancy matching score of the lesion is determined according to the lesion size score, the lesion density score and the lesion boundary score.
[0015] Technical effect: According to the present invention, the area where the lesion is located can be located by the image detection model, and the matching between the lesion and the malignant lesion can be determined by the three characteristics of the size feature of the lesion, the density feature of the lesion and the boundary feature of the lesion, so as to determine the malignant risk of the lesion, which can help doctors identify malignant lesions more efficiently and reduce the probability of missed diagnosis. When determining the lesion size score, the size of the lesion can be more accurately measured based on the length of each target selection box, the width of each target selection box, and the three-dimensional distance between the first centroid coordinate and the second centroid coordinate, reducing the error caused by representing the size of the lesion only based on the size measured in a single tomographic image, and improving the accuracy and objectivity of the lesion size score. When determining the lesion density score, the relative pixel difference between the core area in the target selection box and the background area of the tomographic image can be solved, and the proximity between the core area of the target selection box and the core area of the entire target area can be determined based on the area of the target selection box, and then the weight of the relative pixel difference corresponding to each target selection box is determined, so that the lesion density score can accurately and objectively describe the density difference between the core area of the lesion and the background area. When determining the lesion boundary score, the width of the lesion boundary can be determined by the sequence number of the pixel point when the gradient increase phenomenon occurs in the direction of the connecting line, and the number of times the gradient increase phenomenon occurs, and then the lesion boundary score can be determined. The lesion boundary score can be used to accurately and objectively describe whether the lesion boundary is clear, providing an accurate basis for judging whether the lesion is a malignant lesion.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present invention. Other features and aspects of the present invention will become more apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can be obtained based on these drawings without creative work.
[0018] Figure 1 The flowchart of the medical image-based matching processing method according to an embodiment of the present invention is exemplarily shown. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0021] Figure 1 A schematic flow chart of a matching processing method based on medical images according to an embodiment of the present invention is exemplarily shown, and the method includes:
[0022] Step S101, in a plurality of tomographic images of lung medical images, respectively detecting the area where the lesion is located by using an image detection model, and obtaining a selection box of the area where the lesion is located, wherein the selection box is a minimum circumscribed rectangle for selecting the area where the lesion is located;
[0023] Step S102, matching the selection boxes in each tomographic image according to the positions of the selection boxes in each tomographic image, and determining the target area where the lesion in the lung medical image is located, and the target selection box corresponding to the target area;
[0024] Step S103, determining a lesion size score according to the length and width of the target selection box in each tomographic image and the position of the target selection box in each tomographic image;
[0025] Step S104, determining the background reference pixel value of each tomographic image according to the pixel values of the pixel points outside the selection box in each tomographic image;
[0026] Step S105, determining the centroid pixel point of the target selection box in each tomographic image;
[0027] Step S106, determining a lesion density score according to the centroid pixel point, the background reference pixel value, and the pixel values of a plurality of pixels in the target selection box;
[0028] Step S107, setting multiple sampling points on the target selection box;
[0029] Step S108, determining a lesion boundary score according to the centroid pixel point, the background reference pixel value, and a plurality of sampling points on the target selection box;
[0030] Step S109, determining the malignancy matching score of the lesion according to the lesion size score, the lesion density score and the lesion boundary score.
[0031] According to the matching processing method based on medical images of an embodiment of the present invention, the area where the lesion is located can be located through an image detection model, and the matching between the lesion and the malignant lesion can be determined through three aspects of the lesion's size characteristics, the lesion's density characteristics and the lesion's boundary characteristics, thereby determining the malignancy risk of the lesion, which can help doctors identify malignant lesions more efficiently and reduce the probability of missed diagnosis.
[0032] According to one embodiment of the present invention, in step S101, the lung medical image may include a lung CT image, etc., and multiple tomographic images may be obtained by scanning multiple slices. Each tomographic image may be used to display images of different sections of the lungs, and multiple tomographic images may constitute a three-dimensional lung medical image. Each tomographic image may be processed separately by an image detection model to obtain a selection box for the area where the lesion is located in each tomographic image, wherein the selection box is the minimum circumscribed rectangle for selecting the area where the lesion is located, and the area of the selection box is larger than the area of the area where the lesion is located. The image detection model may be a deep learning neural network model, such as a convolutional neural network model, and the present invention does not limit the type of image detection model.
[0033] According to one embodiment of the present invention, in step S102, since the lung medical image includes multiple tomographic images, each presenting an image of a different cross-section, it is possible to determine, among the selection boxes of lesions detected in the multiple tomographic images, a selection box belonging to the same lesion, thereby determining a target area in the lung medical image where the lesion is located, as well as multiple target selection boxes in the target area.
[0034] According to one embodiment of the present invention, according to the position of the selection box in each tomographic image, the selection box in each tomographic image is matched to determine the target area where the lesion in the lung medical image is located, and the target selection box corresponding to the target area, including: searching for the selection box in the order of the serial number of the tomographic image until the i-th tomographic image in which the selection box first appears is determined, and determining the position of the j-th selection box in the i-th tomographic image, i is a positive integer, and 1≤i<n, n is the number of tomographic images; if in the i+1-th tomographic image, there is a pending selection box whose intersection-and-joint ratio with the j-th selection box in the i-th tomographic image is not 0, then the j-th selection box in the i-th tomographic image is determined as the target selection box of the j-th lesion, and the pending selection box in the i+1-th tomographic image is determined as the target selection box of the j-th lesion; if in the i+k+1-th tomographic image, there is a pending selection box whose intersection-and-joint ratio with the j-th selection box in the i+k-th tomographic image is not 0, then the j-th selection box in the i-th tomographic image is determined as the target selection box of the j-th lesion, and the pending selection box in the i+1-th tomographic image is determined as the target selection box of the j-th lesion; If there is a pending selection box whose intersection-and-union ratio of the target selection box of the j-th lesion in the i+k+1-th tomographic image is not 0, the pending selection box in the i+k+1-th tomographic image is determined as the target selection box of the j-th lesion, where k ≥ 1 and k is a positive integer; if there is a pending selection box in the i+k+1-th tomographic image whose intersection-and-union ratio of the target selection box of the j-th lesion in the i+k-th tomographic image is not 0, then stop searching for the target selection box of the j-th lesion and determine the target selection box of the j-th lesion The set of areas selected by the box is determined as the target area where the j-th lesion is located; if the t-th selection box appears in the i+k+1-th tomography image, and there is no selection box whose intersection-and-joint ratio with the t-th selection box is not 0 in the i+k-th tomography image, then the t-th selection box is determined as the target selection box of the t-th lesion, and the target selection box of the t-th lesion is searched in subsequent tomography images until the target area where the t-th lesion is located is determined, t≥1, t is a positive integer, and t≠j.
[0035] According to one embodiment of the present invention, each tomographic image may have a serial number, and the selection boxes in the tomographic images may be searched in sequence according to the serial numbers. During the search process, there may be some tomographic images without selection boxes. Therefore, each tomographic image may be searched one by one according to the serial number until the i-th tomographic image with the selection box appearing is found for the first time, and then the position of the selection box in the i-th tomographic image may be determined.
[0036] According to one embodiment of the present invention, for the jth selection box in the i-th tomographic image, the selection box can be set as the first target selection box of the j-th lesion, and then in the i+1-th tomographic image, a target selection box belonging to the j-th lesion is found, and the way of finding is to find a selection box whose intersection and union ratio with the j-th selection box in the i-th tomographic image is not 0 among the selection boxes of the i+1-th tomographic image, that is, the above-mentioned pending selection box, if there is a pending selection box, then the pending selection box is also a target selection box belonging to the j-th lesion. If there is no target selection box, it may be caused by the fact that the size of the j-th lesion is too small, for example, the diameter of the lesion is smaller than the scanning interval of the adjacent tomographic images, so that the lesion has a selection box only in one tomographic image.
[0037] According to one embodiment of the present invention, in the subsequent search process, it can be determined whether there is a pending selection box in the i+k+1th tomographic image whose intersection-and-joint ratio with the target selection box of the jth lesion in the i+kth tomographic image is not 0. If there is a pending selection box, then the pending selection box is the target selection box of the jth lesion. If not, stop searching for the target selection box of the jth lesion, and determine the set of areas selected by the determined target selection box of the jth lesion as the target area where the jth lesion is located.
[0038] According to an embodiment of the present invention, if the tth selection box appears in the i+k+1th tomographic image, and there is no selection box whose intersection-over-joint ratio with the tth selection box is not 0 in the i+kth tomographic image, then the tth selection box is a selection box of a new lesion, and the target selection box of the tth lesion can be found in the same way as the target selection box of the jth lesion, which will not be described in detail here. In addition, using the above method, the target selection boxes of all lesions can be found, and the target areas of all lesions can be determined.
[0039] According to one embodiment of the present invention, in step S103, a lesion size score can be determined based on the length and width of the target selection box in each tomographic image and the position of the target selection box in each tomographic image. The lesion size score can evaluate the similarity between the lesion and the malignant lesion in terms of size. The size of a malignant lesion is usually larger. Therefore, a lesion that reaches a certain size standard should focus on whether it is a malignant lesion or whether it has the risk of developing into a malignant lesion.
[0040] According to one embodiment of the present invention, step S103 may include: determining the lengths and widths of multiple target selection boxes in the target area where the jth lesion is located; determining the first centroid coordinates of the centroid of the first target selection box in the target area where the jth lesion is located in the tomographic image, and the second centroid coordinates of the centroid of the last target selection box in the tomographic image; determining the lesion size score based on the lengths and widths of the multiple target selection boxes, and the first centroid coordinates and the second centroid coordinates.
[0041] According to an embodiment of the present invention, determining the lesion size score according to the lengths and widths of the multiple target selection boxes, and the first centroid coordinates and the second centroid coordinates includes: determining the lesion size score of the jth lesion according to formula (1): , (1) Among them, is the length of the sth target selection box in the target area where the jth lesion is located, is the width of the sth target selection box in the target area where the jth lesion is located, is the first centroid coordinate of the centroid of the first target selection box in the target area where the jth lesion is located in the tomographic image, is the second centroid coordinate of the centroid of the last target selection box in the target area where the jth lesion is located in the tomographic image, is the number of target selection boxes in the target area where the jth lesion is located, is the scanning interval between adjacent tomographic images, is the preset length, max is the maximum value function, 1≤s≤ , s and All are positive integers.
[0042] According to one embodiment of the present invention, in formula (1), is the maximum length of all target selection boxes in the target area where the jth lesion is located. is the maximum value of the width of all target selection boxes in the target area where the jth lesion is located. is the three-dimensional distance between the first centroid coordinate and the second centroid coordinate. The maximum value among the three can be taken as the representative value of the lesion size, that is, the size of the lesion can be more accurately measured from the three aspects of length, width, and the three-dimensional distance between the first centroid coordinate and the second centroid coordinate, thereby reducing the error caused by representing the size of the lesion only based on the size measured in a single tomographic image. The ratio between the maximum value among the above three and the preset length can be solved as the lesion size score. If the maximum value among the three is small and the difference from the preset length is large, the lesion size score is small, the similarity between the lesion and the malignant lesion is small, and the possibility of the lesion being a malignant lesion is small, or the risk of developing into a malignant lesion is small. On the contrary, if the maximum value among the three is large, even exceeding the preset length, the similarity between the lesion and the malignant lesion is large, the possibility of the lesion being a malignant lesion is large, or the risk of developing into a malignant lesion is large.
[0043] In this way, the size of the lesion can be measured more accurately based on the length of each target selection box, the width of each target selection box, and the three-dimensional distance between the first centroid coordinate and the second centroid coordinate, reducing the error caused by representing the size of the lesion based only on the size measured in a single tomographic image, thereby improving the accuracy and objectivity of the lesion size scoring.
[0044] According to one embodiment of the present invention, in step S104, the background reference pixel value of each tomographic image can be determined based on the pixel values of the pixel points outside the selection box in each tomographic image. For example, in each tomographic image, the area within the outline of the lungs and outside all selection boxes (including not only the target selection box of the j-th lesion, but all selection boxes in the tomographic image) can be set as the background area, and the average pixel value of all pixel points in the background area is calculated as the background reference pixel value of the tomographic image.
[0045] According to one embodiment of the present invention, in step S105, the centroid pixel point of the target selection box in each tomographic image can be determined, and the pixel value of the centroid pixel point can also be determined as the pixel value of the pixel point at the center of the lesion in the tomographic image.
[0046] According to an embodiment of the present invention, in step S106, a lesion density score may be determined based on the centroid pixel, the background reference pixel value, and the pixel values of multiple pixels in the target selection box. The lesion density score may evaluate the similarity between a lesion and a malignant lesion in terms of density. The density of a malignant lesion is usually large. Therefore, a lesion that reaches a certain density standard should focus on whether it is a malignant lesion or whether it has the risk of developing into a malignant lesion.
[0047] According to one embodiment of the present invention, a lesion density score is determined based on the centroid pixel point, the background reference pixel value, and the pixel values of multiple pixel points in a target selection box, including: setting a circular area in the target selection box with the centroid pixel point as the center of the circle, wherein the diameter of the circular area is smaller than the minimum value of the length and the width of the target selection box; determining the average pixel value of the circular area based on the pixel values of multiple pixel points in the circular area; determining the lesion density score based on the average pixel value of the circular area, the background reference pixel value, and the area of the target selection box.
[0048] According to an embodiment of the present invention, in a target selection frame in the target area, the centroid pixel point can be used as the center of a circle, and a circular area can be set in the target selection frame, and the diameter of the circular area is smaller than the minimum value of the length and width of the target selection frame. For example, the diameter of the circular area is half of the minimum value of the length and width of the target selection frame. Further, the pixel values of multiple pixels in the circular area can be counted to determine the average pixel value of the circular area. The present invention does not limit the specific value of the diameter of the circular area.
[0049] According to one embodiment of the present invention, the lesion density score is determined according to the average pixel value of the circular area, the background reference pixel value and the area of the target selection box, including: determining the lesion density score of the jth lesion according to formula (2) According to one embodiment of the present invention, the lesion density score is determined according to the average pixel value of the circular area, the background reference pixel value and the area of the target selection box, including: determining the lesion density score of the jth lesion according to formula (2) , (2) Among them, is the average pixel value of the circular area within the sth target selection box in the target area where the jth lesion is located, is the background reference pixel value of the tomographic image where the sth target selection box is located in the target area where the jth lesion is located, is the maximum value of the pixel values of each pixel point in the tomographic image where the sth target selection box is located in the target area where the jth lesion is located, is the minimum value among the pixel values of each pixel point in the tomographic image where the sth target selection box is located in the target area where the jth lesion is located, is the area of the sth target selection box in the target area where the jth lesion is located, is the number of target selection boxes in the target area where the jth lesion is located, 1≤s≤ , s and All are positive integers.
[0050] According to one embodiment of the present invention, in formula (2), is the difference between the average pixel value of the circular area within the s-th target selection box in the target area where the j-th lesion is located and the background reference pixel value of the tomographic image where the s-th target selection box in the target area where the j-th lesion is located. It can be expressed as the pixel difference between the core area within the target selection box of the j-th lesion and the background area of the tomographic image in the tomographic image. It can also be used as the pixel difference between the area with the highest density of the j-th lesion and the background area in the tomographic image. The larger the pixel difference, the larger the density difference between the area with the highest density of the j-th lesion and the background area. Furthermore, there may be imaging errors between different tomographic images. For example, the brightness of the background is different. In order to reduce the interference caused by the imaging errors between different tomographic images, the relative value of the above pixel difference can be solved. , is used to represent the relative pixel difference between the area with the highest density of the j-th lesion and the background area in the tomographic image. The larger the relative pixel difference, the larger the density difference between the area with the highest density of the j-th lesion and the background area.
[0051] According to one embodiment of the present invention, , the relative pixel difference between the area with the highest density of the jth lesion in each tomographic image and the background area is weighted, and the weight is the ratio between the area of the sth target selection box and the sum of the areas of each target selection box. Therefore, the larger the area of the sth target selection box, the higher the weight. The larger the area of the sth target selection box, the closer the core area of the target selection box is to the core area of the entire target area. Therefore, the importance of the target selection box to the entire target area is higher, and therefore, the weight of the relative pixel difference corresponding to the tomographic image where the target selection box is located is higher. Through the above weights, the relative pixel difference corresponding to each tomographic image is weighted and summed to obtain the lesion density score. The higher the lesion density score, the greater the pixel difference between the core area of the lesion and the background area, which can also mean that the greater the density difference between the core area of the lesion and the background area, the higher the matching degree with the malignant lesion.
[0052] In this way, the relative pixel gap between the core area within the target selection box and the background area of the tomographic image can be solved, and the proximity of the core area of the target selection box to the core area of the entire target area can be determined based on the area of the target selection box, and then the weight of the relative pixel gap corresponding to each target selection box can be determined, so that the lesion density score can accurately and objectively describe the density gap between the core area of the lesion and the background area.
[0053] According to an embodiment of the present invention, in step S107, multiple sampling points may be set on the target selection box, for example, the sampling points may be evenly distributed on the edge of the target selection box. In step S108, the lesion boundary score may be determined based on the sampling points set above and the background reference pixel value of the centroid pixel point. The lesion boundary score may evaluate the similarity between the lesion and the malignant lesion from the perspective of the clarity of the boundary. The boundary of a malignant lesion is usually unclear, that is, the malignant lesion may gradually extend into normal tissue. Therefore, if the boundary of the lesion is unclear, it may be focused on whether it is a malignant lesion or whether it has the risk of developing into a malignant lesion.
[0054] According to one embodiment of the present invention, a lesion boundary score is determined based on the centroid pixel point, the background reference pixel value, and multiple sampling points on the target selection box, including: determining the pixel value of the centroid pixel point; determining the reference pixel difference between the pixel value of the centroid pixel point and the background reference pixel value; connecting the multiple sampling points on the target selection box to the centroid pixel point respectively to obtain multiple connecting line segments; determining the lesion boundary score based on the connecting line segments, the reference pixel difference and the pixel values of the pixels in the target selection box.
[0055] According to an embodiment of the present invention, the difference between the pixel value of the centroid pixel point in a certain target selection box and the background reference pixel value of the tomographic image in which the target selection box is located is the reference pixel difference value. Further, multiple sampling points on the target selection box can be connected to the centroid pixel point respectively to obtain multiple connecting line segments, and the direction of the connecting line segment can be set to the direction from the centroid pixel point to the sampling point.
[0056] According to an embodiment of the present invention, the lesion boundary score is determined according to the connecting line segment, the reference pixel difference and the pixel value of the pixel point in the target selection box, including: determining the lesion boundary score of the jth lesion according to formula (3): , (3) Among them, is the coordinate of the qth pixel point on the hth connecting line of the sth target selection box in the target area where the jth lesion is located, is the pixel value of the qth pixel on the hth connecting line of the sth target selection box in the target area where the jth lesion is located, is the direction vector of the hth connecting line of the sth target selection box in the target area where the jth lesion is located, for Along direction vector The gradient in the direction of for The model, is the reference pixel difference corresponding to the sth target selection box in the target area where the jth lesion is located, is the coordinate of the g-th pixel point on the h-th connecting line of the s-th target selection box in the target area where the j-th lesion is located, is the pixel value of the g-th pixel on the h-th connecting line of the s-th target selection box in the target area where the j-th lesion is located, for Along direction vector The gradient in the direction of for The modulus, if is a conditional function, q≤g, is the number of pixels on the hth connecting line of the sth target selection box in the target area where the jth lesion is located, is the number of connected line segments of the sth target selection box in the target area where the jth lesion is located, is the number of target selection boxes in the target area where the jth lesion is located, is the length of the sth target selection box in the target area where the jth lesion is located, is the width of the sth target selection box in the target area where the jth lesion is located, is the preset multiple, min is the minimum value function, g≤ , h≤ , s≤ , q, g, h, s, , and All are positive integers.
[0057] According to one embodiment of the present invention, in formula (3), The modulus of the gradient of the direction vector of the connection line where the pixel value of the gth pixel point on the hth connecting line of the sth target selection box in the target area where the jth lesion is located can represent the rate of change of the pixel value at the position of the pixel point along the direction indicated by the direction vector. If the jth lesion is a benign lesion, the edge of the jth lesion is clear, that is, there is a clear boundary between the area where the jth lesion is located and the normal tissue, and if the jth lesion is a malignant lesion, the edge of the jth lesion is unclear, that is, there is a gradual transition between the area where the jth lesion is located and the normal tissue. Therefore, if the jth lesion is a benign lesion, starting from the centroid pixel point, the gradient of the pixel points is calculated one by one along the direction of the connecting line, and the gradient of the pixel points only shows a significant change at the edge position. For example, the gradient of the pixel points shows a significant change from the internal area of the lesion to the edge position, and the gradient of the pixel points from the edge position to the normal tissue area outside the edge shows a significant increase. The number of pixels between two significant increases (i.e., the width of the boundary) is small, or even only the width of one pixel, that is, the boundary is obvious. If the jth lesion is a malignant lesion, the gradient of the pixel points is calculated one by one along the connecting line starting from the centroid pixel point. The gradient of the pixel points increases near the boundary, that is, from the denser lesion area to the edge area. In the edge area, due to the unclear edge, the gradient of the pixel points in the edge area may have a certain rate of change, but the rate of change is low. Subsequently, when entering the normal tissue area from the edge area, the gradient of the pixel points increases again and leaves the edge area, that is, completely leaves the lesion area. The interval between the two gradient increases is large, that is, there are more pixels in the interval, the width of the boundary area is wider, and the edge is unclear.
[0058] According to one embodiment of the present invention, based on the above analysis, the conditional function , to determine the number g of the pixel point on the connecting line when the gradient increases. The judgment standard is whether the gradient is greater than or equal to ,in, represents the average rate of change of the pixel values from the centroid pixel point to the background area pixel point on the hth connecting line. Therefore, this conditional function represents the condition when the gradient is greater than or equal to the average rate of change. When the conditional function is multiple, the sequence number g of the pixel is recorded; otherwise, the conditional function value is 0.
[0059] This means that the gradient of the direction vector of the qth pixel along the hth connecting line is greater than or equal to When , the conditional function value is 1, otherwise it is 0, so It can be used to indicate how many times the gradient increases between the 1st and gth pixels. It can be expressed that when the gradient increases for the first time, the pixel number g at which the gradient increases for the first time is recorded, and The value of is 1, then, , when the gradient increases for the second time, record the pixel number g when the gradient increases for the second time, and The value of is 2. At this time, Therefore, by summing the above two items, we can get the number of pixels between the first and second occurrences of the gradient increase phenomenon, that is, It is the number of pixels between two occurrences of gradient increase on the hth connecting line of the sth target selection box in the target area where the jth lesion is located. It can also be expressed as the width of the boundary measured on the hth connecting line of the sth target selection box in the target area where the jth lesion is located. The larger the width of the boundary, the less clear the boundary is, and the higher the probability that the lesion has a malignant risk.
[0060] According to an embodiment of the present invention, the average value of the width of the border measured on each connecting line on each target selection box can be solved, and the minimum value of the average value and the length and width of each target selection box can be solved. The ratio between them is used to obtain the relative value of the average value of the boundary width as the lesion boundary score. The higher the lesion boundary score, the larger the average value of the boundary width, which means that the boundary is less clear and the probability that the lesion has a malignant risk is higher.
[0061] In this way, the width of the lesion boundary can be determined by the sequence number of the pixel point when the gradient increase phenomenon occurs along the direction of the connecting line, and the number of times the gradient increase phenomenon occurs, and then the lesion boundary score can be determined. The lesion boundary score can be used to accurately and objectively describe whether the lesion boundary is clear, providing an accurate basis for judging whether the lesion is a malignant lesion.
[0062] According to one embodiment of the present invention, in step S109, the lesion size score, lesion density score and lesion boundary score may be weighted and summed to obtain the malignancy matching score of the lesion. The higher the malignancy matching score, the higher the matching degree between the lesion and the malignant lesion, and the more attention should be paid to it.
[0063] According to the matching processing method based on medical images of the embodiment of the present invention, the area where the lesion is located can be located by the image detection model, and the matching between the lesion and the malignant lesion can be determined by the three characteristics of the size feature, the density feature and the boundary feature of the lesion, so as to determine the malignant risk of the lesion, which can help doctors identify malignant lesions more efficiently and reduce the probability of missed diagnosis. When determining the lesion size score, the size of the lesion can be more accurately measured based on the length of each target selection box, the width of each target selection box and the three-dimensional distance between the first centroid coordinate and the second centroid coordinate, reducing the error caused by representing the size of the lesion only based on the size measured in a single tomographic image, and improving the accuracy and objectivity of the lesion size score. When determining the lesion density score, the relative pixel difference between the core area in the target selection box and the background area of the tomographic image can be solved, and the proximity between the core area of the target selection box and the core area of the entire target area can be determined based on the area of the target selection box, and then the weight of the relative pixel difference corresponding to each target selection box is determined, so that the lesion density score can accurately and objectively describe the density difference between the core area of the lesion and the background area. When determining the lesion boundary score, the width of the lesion boundary can be determined by the sequence number of the pixel point when the gradient increase phenomenon occurs in the direction of the connecting line, and the number of times the gradient increase phenomenon occurs, and then the lesion boundary score can be determined. The lesion boundary score can be used to accurately and objectively describe whether the lesion boundary is clear, providing an accurate basis for judging whether the lesion is a malignant lesion.
[0064] It should be understood by those skilled in the art that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.
[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A matching processing method based on medical images, characterized in that: include: In a plurality of tomographic images of lung medical images, the image detection model is used to detect the area where the lesion is located, and a selection box of the area where the lesion is located is obtained, wherein the selection box is a minimum circumscribed rectangle for selecting the area where the lesion is located; Matching the selection boxes in each tomographic image according to the position of the selection boxes in each tomographic image to determine the target area where the lesion in the lung medical image is located and the target selection box corresponding to the target area; Determine the lesion size score based on the length and width of the target selection box in each tomographic image and the location of the target selection box in each tomographic image; Determine the background reference pixel value of each tomographic image according to the pixel value of the pixel point outside the selection box in each tomographic image; Determine the centroid pixel of the target selection box in each tomographic image; Determine a lesion density score according to the centroid pixel point, the background reference pixel value, and the pixel values of multiple pixels in the target selection box; Set multiple sampling points on the target selection box; Determine a lesion boundary score according to the centroid pixel point, the background reference pixel value, and a plurality of sampling points on the target selection box; Determining a malignancy matching score of a lesion according to the lesion size score, the lesion density score and the lesion boundary score; According to the positions of the selection boxes in the respective tomographic images, the selection boxes in the respective tomographic images are matched to determine the target region where the lesion in the lung medical image is located, and the target selection box corresponding to the target region, including: Searching for the selection box in the order of the serial numbers of the tomographic images until the i-th tomographic image in which the selection box first appears is determined, and determining the position of the j-th selection box in the i-th tomographic image, where i is a positive integer and 1≤i<n, and n is the number of tomographic images; If in the i+1th tomographic image, there is a pending selection box whose intersection-and-joint ratio with the jth selection box in the i-th tomographic image is not 0, then the jth selection box in the i-th tomographic image is determined as the target selection box of the j-th lesion, and the pending selection box in the i+1th tomographic image is determined as the target selection box of the j-th lesion; If in the i+k+1th tomographic image, there is a pending selection box whose intersection-and-joint ratio with the target selection box of the jth lesion in the i+kth tomographic image is not 0, then the pending selection box in the i+k+1th tomographic image is determined as the target selection box of the jth lesion, where k≥1 and k is a positive integer; If in the i+k+1th tomographic image, there is a pending selection box whose intersection-and-joint ratio with the target selection box of the jth lesion in the i+kth tomographic image is not 0, then stop searching for the target selection box of the jth lesion, and determine the set of areas selected by the determined target selection box of the jth lesion as the target area where the jth lesion is located; If the tth selection box appears in the i+k+1th tomographic image, and there is no selection box whose intersection-over-joint ratio with the tth selection box is not 0 in the i+kth tomographic image, then the tth selection box is determined as the target selection box of the tth lesion, and the target selection box of the tth lesion is searched in subsequent tomographic images until the target area where the tth lesion is located is determined, t≥1, t is a positive integer, and t≠j; The lesion size score is determined based on the length and width of the target selection box in each tomographic image and the location of the target selection box in each tomographic image, including: Determine the length and width of multiple target selection boxes in the target area where the jth lesion is located; Determine the first centroid coordinates of the centroid of the first target selection box in the target area where the jth lesion is located in the tomographic image, and the second centroid coordinates of the centroid of the last target selection box in the tomographic image; Determining a lesion size score according to the lengths and widths of the multiple target selection boxes, and the first centroid coordinates and the second centroid coordinates; Determining a lesion size score according to the lengths and widths of the multiple target selection boxes, and the first centroid coordinates and the second centroid coordinates, includes: According to the formula Determine the lesion size score S of the jth lesion j , where L j,s is the length of the sth target selection box in the target area where the jth lesion is located, W j,s is the width of the sth target selection box in the target area where the jth lesion is located, (x j,1,c ,y j,1,c ) is the first centroid coordinate of the centroid of the first target selection box in the target area where the jth lesion is located in the tomographic image, (x j,2,c ,y j,2,c ) is the second centroid coordinate of the centroid of the last target selection box in the target area where the jth lesion is located in the tomographic image, n j is the number of target selection boxes in the target area where the jth lesion is located, Δl is the scanning interval of adjacent tomographic images, and l p is the preset length, max is the maximum value function, 1≤s≤n j , s and n j are all positive integers; Determining a lesion density score according to the centroid pixel point, the background reference pixel value, and the pixel values of multiple pixels in the target selection box includes: Taking the centroid pixel point as the center of the circle, a circular area is set in the target selection frame, wherein the diameter of the circular area is smaller than the minimum value of the length and the width of the target selection frame; Determine an average pixel value of the circular area according to the pixel values of a plurality of pixel points within the circular area; Determine a lesion density score according to the average pixel value of the circular area, the background reference pixel value, and the area of the target selection box; Determine the lesion density score according to the average pixel value of the circular area, the background reference pixel value and the area of the target selection box, including: According to the formula Determine the lesion density score D of the jth lesion j ,in, is the average pixel value of the circular area in the sth target selection box in the target area where the jth lesion is located, p j,s,r is the background reference pixel value of the tomographic image where the sth target selection box is located in the target area where the jth lesion is located, p j,s,max is the maximum value of the pixel values of each pixel point in the tomographic image where the sth target selection box is located in the target area where the jth lesion is located, p j,s,min is the minimum value of the pixel values of each pixel point in the tomographic image where the sth target selection box is located in the target area where the jth lesion is located, S j,s is the area of the sth target selection box in the target area where the jth lesion is located, n j is the number of target selection boxes in the target area where the jth lesion is located, 1≤s≤n j , s and n j are all positive integers; Determine the lesion boundary score according to the centroid pixel point, the background reference pixel value, and multiple sampling points on the target selection box, including: Determine the pixel value of the centroid pixel; Determine a reference pixel difference between a pixel value of a centroid pixel and a background reference pixel value; Connect multiple sampling points on the target selection box to the centroid pixel points to obtain multiple connecting line segments; Determine a lesion boundary score according to the connecting line segment, the reference pixel difference and the pixel value of the pixel point in the target selection box; Determining the lesion boundary score according to the connecting line segment, the reference pixel difference and the pixel value of the pixel point in the target selection box includes: According to the formula Determine the lesion boundary score B of the jth lesion j , where (x j,s,h,q ,y j,s,h,q ) is the coordinate of the qth pixel point on the hth connecting line of the sth target selection box in the target area where the jth lesion is located, p(x j,s,h,q ,y j,s,h,q ) is the pixel value of the qth pixel on the hth connecting line of the sth target selection box in the target area where the jth lesion is located, is the direction vector of the hth connecting line of the sth target selection box in the target area where the jth lesion is located, is p(x j,s,h,q ,y j,s,h,q ) along the direction vector The gradient in the direction of for The modulus, Δp j,s is the reference pixel difference corresponding to the sth target selection box in the target area where the jth lesion is located, (x j,s,h,g ,y j,s,h,g ) is the coordinate of the g-th pixel point on the h-th connecting line of the s-th target selection box in the target area where the j-th lesion is located, p(x j,s,h,g ,y j,s,h,g ) is the pixel value of the g-th pixel on the h-th connecting line of the s-th target selection box in the target area where the j-th lesion is located, is p(x j,s,h,g ,y j,s,h,g ) along the direction vector The gradient in the direction of for The modulus, if is a conditional function, q≤g, n j,s,h is the number of pixels on the hth connecting line of the sth target selection box in the target area where the jth lesion is located, n j,s is the number of connected line segments of the sth target selection box in the target area where the jth lesion is located, n j is the number of target selection boxes in the target area where the jth lesion is located, L j,s is the length of the sth target selection box in the target area where the jth lesion is located, W j,s is the width of the sth target selection box in the target area where the jth lesion is located, τ is the preset multiple, min is the minimum value function, g≤n j,s,h , h≤n j,s , s≤n j , q, g, h, s, n j,s,h 、n j,s and n j All are positive integers.
