Method and system for constructing nasosinusitis-nasal polyp prognosis model based on image analysis
By segmenting and extracting multiple modes of lesion area and feature of CT images of sinusitis-nose polyps patients, a quantitative model of prognostic risk was constructed, which solved the problem of inaccurate extraction of sinusitis-nose polyps lesions in the prior art and quantifying the risk of recurrence, and achieved more accurate prognostic analysis and personalized treatment plans.
Patent Information
- Application Number
- CN202510388857.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When analyzing the prognosis of sinusitis-nasal polyps, the existing medical imaging analysis and prognosis technology cannot accurately extract and segment the lesion area through multiple image characteristic values based on a single medical image, and quantify the risk of recurrence by extracting multiple characteristics of the lesion area.
By collecting relevant CT images of patients with sinusitis-nose polyps, marking the patient's CT image set, and dividing it; multimodal lesion area segmentation is performed based on the patient's CT image set, and the lesion area image set is obtained; lesion feature extraction is performed based on the lesion area image set, and the lesion image characteristics of the lesion area are obtained; a prognostic risk quantitative model is constructed, and the lesion image characteristics are used to quantify the risk of recurrence of sinusitis-nose polyps.
While accurately extracting and segmenting the lesion area through multiple image characteristic values, the risk of recurrence of sinusitis-nose polyps is quantitatively analyzed, providing more accurate prognosis analysis and more personalized treatment plans.
Smart Images

Figure CN120236775A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image analysis and prognosis, and specifically to a method and system for constructing a sinusitis-nasal polyps prognosis model based on image analysis. Background Art
[0002] Medical image prognosis analysis technology refers to the technology that uses medical image data and, through a series of technical means, predicts and evaluates the disease prognosis of patients; this technology can help doctors more accurately judge the development trend of the disease and the survival rate of patients, so as to provide more personalized treatment plans and better medical services for patients.
[0003] When the existing medical image analysis and prognosis technology extracts and segments the lesion area in medical images, it often extracts and segments only based on a single gray value feature. For example, in the patent application with the publication number CN118154602A, an image analysis method and system based on a colorectal polyp CT image dataset are disclosed. When this solution extracts and segments the lesion area, it is based on a single gray value feature. This method may be interfered by factors such as noise and partial volume effect, resulting in blurred lesion area boundaries or misjudgments. Moreover, when facing complex and variable sinusitis-nasal polyps lesion types, it may not be able to effectively adapt due to the singularity of the segmentation features; in addition, when the existing medical image analysis and prognosis technology analyzes and predicts the prognosis of sinusitis-nasal polyps, it often requires experienced physicians to analyze and judge by observing relevant images. However, due to differences in knowledge background, experience level, and analysis methods among different physicians when analyzing medical images and judging prognosis, different conclusions may be drawn. There is no quantitative and objective standard to provide reference for physicians' analysis. Moreover, it is challenging to judge the lesion area boundary by simply observing the gray value with the naked eye, and it may be difficult for physicians to comprehensively consider the combined impact of multiple features such as lesion area size, perimeter, and boundary irregularity on the recurrence risk during manual analysis, and it is impossible to analyze and predict the prognosis through a single image; when the existing medical image analysis and prognosis technology analyzes and predicts the prognosis of sinusitis-nasal polyps, it cannot accurately extract and segment the lesion area based on a single medical image through multiple image feature values, and at the same time, quantitatively analyze and predict the recurrence risk by extracting multiple features of the lesion area. Summary of the Invention
[0004] The present invention aims to solve at least one of the technical problems in the prior art to some extent. By collecting relevant CT images of patients with sinusitis-nasal polyps, marking the patient CT image set, and dividing it; performing multi-modal lesion area segmentation processing based on the patient CT image set, and performing lesion feature extraction processing to obtain the lesion image features of the lesion area; constructing a prognostic risk quantification model to quantitatively predict the recurrence risk of sinusitis-nasal polyps; to solve the problem that the existing medical image analysis prognosis technology cannot accurately extract and segment the lesion area based on a single medical image through multiple image feature values, and at the same time, quantitatively analyze and predict the recurrence risk by extracting multiple features of the lesion area when analyzing the prognosis of sinusitis-nasal polyps.
[0005] To achieve the above object, in the first aspect, the present application provides a method for constructing a prognostic model of sinusitis-nasal polyps based on image analysis, including the following steps: Collect relevant CT images of patients with sinusitis-nasal polyps, mark the patient CT image set, and divide the patient CT image set. Perform multi-modal lesion area segmentation processing based on the patient CT image set to obtain a lesion area image set. Perform lesion feature extraction processing based on the lesion area image set to obtain the lesion image features of the lesion area. Construct a prognostic risk quantification model, and use the lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps.
[0006] Further, collecting relevant CT images of patients with sinusitis-nasal polyps, marking the patient CT image set, and dividing the patient CT image set includes the following sub-steps: Collect CT images of sinusitis-nasal polyps before treatment of patients with sinusitis-nasal polyps, classify them according to the patients, and sort them in the order from near to far according to the time distance between the CT image shooting time and the treatment start time, and mark them as the first CT image set. Based on the first CT image set, divide the first CT image set into a recurrence group and a non-recurrence group according to whether the patients with sinusitis-nasal polyps relapse after treatment, and after completion, obtain the patient CT image set.
[0007] Further, performing multi-modal lesion area segmentation processing based on the patient CT image set to obtain a lesion area image set includes the following sub-steps: Perform grayscale processing on the patient CT image set to obtain a grayscale CT image set; for any grayscale image in the grayscale CT image set, mark it as the first image; extract the grayscale values of all pixel points in the first image, and mark it as the first image grayscale data. Set the horizontal direction operator H as ; the vertical direction operator V is ; The left diagonal direction operator L is ; The right diagonal direction operator R is ; For any pixel point in the first image, denoted as I(x, y), where I(x, y) represents the gray value of the pixel with coordinates (x, y), use the horizontal direction operator H, the vertical direction operator V, the left diagonal direction operator L, and the right diagonal direction operator R to calculate the horizontal direction gradient GH(x, y), the vertical direction gradient GV(x, y), the left diagonal direction gradient GL(x, y), and the right diagonal direction gradient GR(x, y) of I(x, y) in sequence; The calculation formula for the horizontal direction gradient is as follows: ; The calculation formula for the vertical direction gradient is as follows: ; The calculation formula for the left diagonal direction gradient is as follows: ; The calculation formula for the right diagonal direction gradient is as follows: ; Where H(i + 1, j + i), V(i + 1, j + i), L(i + 1, j + i), and R(i + 1, j + i) represent the elements with coordinates (i + 1, j + i) in the horizontal direction operator H, the vertical direction operator V, the left diagonal direction operator L, and the right diagonal direction operator R respectively; Set the weight of the horizontal direction gradient GH(x, y) as q1, the weight of the vertical direction gradient GV(x, y) as q2, the weight of the left diagonal direction gradient GL(x, y) as q3, and the weight of the right diagonal direction gradient GR(x, y) as q4, where q1 + q2 + q3 + q4 = 1; Then use the total gradient value calculation formula to calculate the total gradient value G(x, y) of I(x, y), and the total gradient value calculation formula is as follows: ; Obtain the total gradient values of all pixel points in the first image, marked as the first image gradient data.
[0008] Further, based on the patient CT image set for multi-modal lesion area segmentation processing, the obtained lesion area image set also includes the following sub-steps: Based on the first image gradient data and the first image gray data, judge the total gradient value G(x, y) and the gray value I(x, y) of any pixel point to determine whether G(x, y) > T0 and I(x, y) > T1 are satisfied, where T0 is the gradient threshold and T1 is the gray threshold. If satisfied, mark the pixel point as a lesion edge pixel point and record the position of the lesion edge pixel point; Traverse all pixel points in the first image to obtain all lesion edge pixel points in the first image; Lesion area marking: Select any pixel point on the lesion edge and mark it as the initial edge pixel point. Based on the pixel points in the 8-neighborhood around the initial edge pixel point, screen the pixel points in the 8-neighborhood in a clockwise direction, connect the first screened lesion edge pixel point to the initial edge pixel point, and then based on the pixel points in the 8-neighborhood around the first screened lesion edge pixel point, screen the pixel points in the 8-neighborhood in a clockwise direction and make connections until the initial edge pixel point is connected again, recording the connection order of the lesion edge pixel points; Mark the closed area formed by connecting the lesion edge pixel points as the lesion area, and mark the pixel points in the lesion area as lesion pixels; Then, select any lesion edge pixel point from the lesion edge pixel points that have not been marked as the lesion area for lesion area marking until all lesion edge pixel points are marked as the lesion area, and mark the first image with completed lesion area marking as the lesion area image; Traverse the patient CT image set, obtain the lesion area images corresponding to all images in the patient CT image set, and mark them as the lesion area image set.
[0009] Furthermore, perform lesion feature extraction processing based on the lesion area image set. The lesion image features of the lesion area are obtained through the following sub-steps: Based on any lesion area in any image in the lesion area image set, perform size feature extraction, length feature extraction, and boundary feature extraction respectively; Size feature extraction: Count the number of pixel points in the lesion area, obtain the actual area represented by each pixel point in the corresponding image, calculate the area size of the lesion area, and mark it as the size feature of the lesion area; Length feature extraction: Count the number of lesion edge pixel points in the lesion area, and based on the actual area represented by each pixel point in the corresponding image, calculate the perimeter size of the lesion area, and mark it as the length feature of the lesion area.
[0010] Furthermore, perform lesion feature extraction processing based on the lesion area image set. The lesion image features of the lesion area also include the following sub-steps: Boundary feature extraction: Based on the size feature of the lesion area and the length feature of the lesion area, calculate the perimeter-area ratio of the lesion area, mark it as the first boundary feature value, denoted as B1; Obtain all the lesion edge pixel points and their corresponding coordinates in the lesion area. According to the connection order of the lesion edge pixel points, mark the corresponding coordinates of all the lesion edge pixel points as XC1, XC2, ……, XCn in sequence; denote it as the coordinate sequence, represent the coordinate sequence in complex number form to obtain the coordinate complex number sequence, perform discrete Fourier transform on the coordinate complex number sequence, and obtain the spectral coefficients of the coordinate complex number sequence, denoted as the boundary spectral coefficients; based on the boundary spectral coefficients, calculate the ratio of the energy of the high-frequency part to the total energy in the energy distribution of the boundary spectral coefficients, and mark it as the second boundary eigenvalue, denoted as B2. Set the weight of the first boundary eigenvalue as m1, set the weight of the second boundary eigenvalue as m2, and m1 + m2 = 1; calculate the third boundary eigenvalue B0 based on the first boundary eigenvalue and the second boundary eigenvalue. The calculation formula for the third boundary eigenvalue is as follows: ; Mark the third boundary eigenvalue as the boundary feature. Mark the size feature, length feature, and boundary feature as the lesion image features; obtain all the corresponding lesion image features in the lesion area image set and store them classified according to the corresponding patients and corresponding lesion areas, marked as the lesion feature data.
[0011] Furthermore, construct a prognostic risk quantification model and use the lesion image features to quantitatively predict the recurrence risk of rhinosinusitis-nasal polyps, including the following sub-steps: Based on the patient's CT image set, mark the lesion image features in the lesion feature data according to whether the corresponding rhinosinusitis-nasal polyps patient relapses after treatment. If it relapses after treatment, mark it as E = 1; if it does not relapse after treatment, mark it as E = 0, where E represents the recurrence situation after treatment; then perform normalization processing on the size feature, length feature, and boundary feature in the lesion feature data respectively, and scale all the data sizes to [0, 1]. After completion, obtain the first feature data. Divide the first feature data into a first training set and a first test set according to the ratio of 7:3.
[0012] Furthermore, construct a prognostic risk quantification model and use the lesion image features to quantitatively predict the recurrence risk of rhinosinusitis-nasal polyps also includes the following sub-steps: Based on the logistic regression model and the size feature, length feature, and boundary feature in the first feature data, construct the first logistic regression model as follows: , where P(E = 1) represents the risk probability of recurrence; C1, C2, and C3 respectively represent the size feature, length feature, and boundary feature within the first feature data in sequence, and β0, β1, β2, and β3 are logistic regression model parameters; the initial learning rate is set to d1, the number of training rounds is set to d2, the batch size is set to d3, and every d4 training rounds, the learning rate is reduced by 5%. The risk quantification logistic regression model is trained using the first training set; after completion, the first prognosis risk model is obtained. The first prognosis risk model is tested using the first test set, including: inputting the first test set into the first prognosis risk model, and evenly dividing the probability range output by the first prognosis risk model into N intervals. For any one interval, denoted as the v interval, calculate the proportion u of the actual recurrence patients corresponding to the v interval to the total patients within the interval; and determine whether the proportion u satisfies u ∈ v interval. If it satisfies, it is marked as the v interval being qualified, and if it does not satisfy, it is marked as the v interval being unqualified. If all N intervals are qualified, it is determined that the model test of the first prognosis risk model is qualified, and it is marked as the prognosis risk quantification model; otherwise, it is determined that the model test of the first prognosis risk model is unqualified, and the first prognosis risk model is continued to be trained using the first training set until the model test is qualified, and the prognosis risk quantification model is obtained.
[0013] Furthermore, constructing the prognosis risk quantification model and using the lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps further includes the following sub-steps: Through multiple relevant CT images taken at different times of patients with sinusitis-nasal polyps, multi-modal lesion area segmentation processing and lesion feature extraction processing are respectively performed to obtain the lesion image features of the lesion area of patients with sinusitis-nasal polyps at different times. The lesion image features of the lesion area at different times are respectively input into the prognosis risk quantification model to obtain multiple recurrence risk quantification results, and weighted averaging is performed according to the proximity of the CT image shooting times corresponding to the multiple recurrence risk quantification results to obtain the recurrence risk prediction result.
[0014] In a second aspect, the present application provides a system for constructing a prognosis model of sinusitis-nasal polyps based on image analysis, including an image acquisition module, an image segmentation module, a feature extraction module, and a risk prediction module; The image acquisition module is used to collect relevant CT images of patients with sinusitis-nasal polyps, mark the patient CT image set, and divide the patient CT image set; The image segmentation module performs multi-modal lesion area segmentation processing based on the patient CT image set to obtain a lesion area image set; The feature extraction module performs lesion feature extraction processing based on the lesion area image set to obtain the lesion image features of the lesion area; The risk prediction module includes a model construction unit and a quantitative prediction unit. The model construction unit is used to construct a prognostic risk quantification model; the quantitative prediction unit uses the lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps.
[0015] Advantages of the present invention: By collecting relevant CT images of patients with sinusitis-nasal polyps, marking the patient CT image set, and dividing the patient CT image set; performing multi-modal lesion area segmentation processing based on the patient CT image set to obtain a lesion area image set; performing lesion feature extraction processing based on the lesion area image set to obtain the lesion image features of the lesion area; constructing a prognostic risk quantification model, and using the lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps; while accurately extracting and segmenting the lesion area through multiple image feature values, by extracting multiple features of the lesion area, through a single medical image, the recurrence risk can be quantitatively analyzed and predicted.
[0016] The present invention performs multi-modal lesion area segmentation processing by calculating the total gradient value of pixel points and combining the gray value. The advantage is that combining the gray value and the total gradient value can reduce the interference of other irrelevant factors, accurately extract the lesion area, and at the same time can meet the extraction and segmentation requirements of different types of lesions, improving the overall adaptability and robustness; by extracting a variety of lesion image features for prognostic analysis, the advantage is that the size feature reflects the scope of the lesion, the length feature can reflect the geometric shape and extension degree of the lesion, and the boundary feature reveals the complexity and possible invasiveness of the lesion from the perspective of the boundary morphology; combining these features can more comprehensively evaluate the lesion, more comprehensively capture the dynamic information of the lesion, provide rich information for more accurate recurrence risk prediction, and better predict the recurrence risk. Description of the Drawings
[0017] Figure 1 It is the principle block diagram of the system of the present invention; Figure 2 It is the step flow chart of the method of the present invention; Figure 3 It is the schematic diagram of lesion area marking of the present invention; Figure 4 It is the step flow chart of the quantitative prediction strategy of the present invention; Figure 5 It is the structural schematic diagram of the electronic device of the present invention. Detailed Embodiments
[0018] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0019] Example 1. Refer to Figure 1 As shown, the present application provides a system for constructing a prognosis model of sinusitis-nasal polyps based on image analysis, including an image acquisition module, an image segmentation module, a feature extraction module, and a risk prediction module; The image acquisition module is used to collect relevant CT images of patients with sinusitis-nasal polyps, mark the patient CT image set, and divide the patient CT image set. The image acquisition module is configured with an image acquisition strategy, and the image acquisition strategy includes: collecting CT images of sinusitis-nasal polyps before the treatment of patients with sinusitis-nasal polyps, classifying them according to the patients, and sorting them in the order from near to far according to the time distance between the CT image shooting time and the treatment start time, and marking them as the first CT image set; for example, if patient a has taken three CT images in the same year before treatment, which were taken on March 21st, April 18th, and May 20th respectively, then the CT image taken on May 20th is the closest, and the corresponding CT image is the first one of patient a, and the CT images corresponding to March 21st and April 18th are the third and second ones of patient a respectively; Based on the first CT image set, according to whether the patients with sinusitis-nasal polyps relapse after treatment, the first CT image set is divided into a relapsed group and a non-relapsed group, and after completion, the patient CT image set is obtained. In the specific implementation process, the number of images in the patient CT image set cannot be too small, because if it is too small, it will affect the subsequent model construction process, and CT images with poor imaging quality should be excluded when collecting CT images.
[0020] The image segmentation module performs multi-modal lesion area segmentation processing based on the patient CT image set to obtain a lesion area image set. The image segmentation module is configured with an image segmentation strategy, and the image segmentation strategy includes: performing grayscale processing on the patient CT image set to obtain a grayscale CT image set; for any grayscale image in the grayscale CT image set, marking it as the first image; extracting the grayscale values of all pixel points in the first image and marking them as the first image grayscale data. Set the horizontal direction operator H as ; the vertical direction operator V is ; the left diagonal direction operator L is ; the right diagonal direction operator R is ; For any pixel point in the first image, denoted as I(x, y), where I(x, y) represents the gray value of the pixel with coordinates (x, y). In the image coordinate system, the (x, y) coordinates start from the upper left corner, where (0, 0) represents the upper left corner pixel, and x represents the column and y represents the row; Calculate the horizontal gradient GH(x, y), vertical gradient GV(x, y), left diagonal gradient GL(x, y), and right diagonal gradient GR(x, y) of I(x, y) in sequence using the horizontal direction operator H, vertical direction operator V, left diagonal direction operator L, and right diagonal direction operator R respectively. The formula for calculating the horizontal gradient is as follows: ; The formula for calculating the vertical gradient is as follows: ; The formula for calculating the left diagonal gradient is as follows: ; The formula for calculating the right diagonal gradient is as follows: ; Where H(i + 1, j + i), V(i + 1, j + i), L(i + 1, j + i), and R(i + 1, j + i) represent the elements with coordinates (i + 1, j + i) in the horizontal direction operator H, vertical direction operator V, left diagonal direction operator L, and right diagonal direction operator R respectively. For example, the partial gray values in a certain first image are as follows: , then calculate the horizontal gradient GH(1, 1) of the gray value 42 at the position (1, 1) as GH(1, 1) = (-1 * 21 + -1 * 23 + -1 * 20) + (0 * 54 + 0 * 52 + 0 * 50) + (1 * 89 + 1 * 88 + 1 * 82) = 195; Set the weight of the horizontal gradient GH(x, y) as q1, the weight of the vertical gradient GV(x, y) as q2, the weight of the left diagonal gradient GL(x, y) as q3, and the weight of the right diagonal gradient GR(x, y) as q4, where q1 + q2 + q3 + q4 = 1. In this embodiment, q1 = q2 = 0.3, q3 = q4 = 0.2. Because the horizontal and vertical directions are more critical for judging the lesion boundary, and the two diagonal directions are used as auxiliary to supplement details, the weights of the horizontal and vertical directions are greater than those of the two diagonal directions. Then calculate the total gradient value G(x, y) of I(x, y) using the total gradient value calculation formula. The total gradient value calculation formula is as follows: ; Obtain the total gradient values of all pixel points in the first image, marked as the first image gradient data; Based on the first image gradient data and the first image grayscale data, a total gradient value G(x, y) and a grayscale value I(x, y) of any pixel are judged to determine whether G(x, y)>T0 and I(x, y)>T1 are satisfied, where T0 is a gradient threshold and T1 is a grayscale threshold. In this embodiment, T0=80 and T1=160; if satisfied, the pixel is marked as a lesion edge pixel, and the position of the lesion edge pixel is recorded; all pixels of the first image are traversed to obtain all lesion edge pixels in the first image; Lesion area marking: Select any lesion edge pixel and mark it as the initial edge pixel. Figure 3 As shown in the figure, based on the pixels in the 8 neighborhoods around the initial edge pixel point, the 8 neighborhoods include the pixels adjacent to the initial edge pixel point in 8 directions: directly above, directly below, directly left, directly right, upper left, lower left, upper right and lower right; the pixels in the 8 neighborhoods are screened in a clockwise direction, and the first screened lesion edge pixel point is connected to the initial edge pixel point. Then, based on the pixels in the 8 neighborhoods around the first screened lesion edge pixel point, the pixels in the 8 neighborhoods are screened in a clockwise direction and connected, that is, the lesion edge pixel point screened each time is used as a new initial point for re-screening; until it is connected to the initial edge pixel point again, record it. Record the connection order of the lesion edge pixels; mark the closed area formed by the lesion edge pixels as the lesion area, and mark the pixels in the lesion area as lesion pixels; if isolated lesion edge pixels are encountered during the lesion area marking process, these isolated lesion edge pixels can be ignored. In complex lesion areas, the boundaries may cross; when the boundaries cross, the clockwise rule is also followed, and the branches that have not been traversed are preferred for continued screening; this complex situation can be handled by recording the paths that have been traversed or setting direction marks to ensure that the entire boundary can be completely and correctly tracked; Then, any lesion edge pixel point is selected from the lesion edge pixel points that have not been marked as lesion areas to mark the lesion area, until all lesion edge pixel points are marked as lesion areas, and the first image that has completed the lesion area marking is marked as the lesion area image; Traverse the patient CT image set, obtain the lesion area images corresponding to all images in the patient CT image set, and mark them as the lesion area image set; In the specific implementation process, the gray value can reflect the density difference of tissues. In medical images, diseased tissues and normal tissues often have different gray characteristics; the directional gradient can highlight the areas where the pixel values change drastically in the image, and the boundaries of diseased areas are usually places where the gray values change significantly; combining the gray value and the directional gradient can more accurately locate the boundaries of diseased areas; while the gradient threshold T0 and the gray threshold T1 need to be analyzed and statistically obtained based on a certain amount of medical image samples to get accurate values, and the image quality of the image itself also needs to be considered.
[0021] The feature extraction module performs lesion feature extraction processing based on the lesion area image set to obtain the lesion image features of the lesion area. The feature extraction module is configured with a feature extraction strategy, and the feature extraction strategy includes: respectively performing size feature extraction, length feature extraction, and boundary feature extraction based on any lesion area in any image in the lesion area image set. Size feature extraction: Count the number of pixel points in the lesion area, and obtain the actual area represented by each pixel point in the corresponding image, calculate the area size of the lesion area, and mark it as the size feature of the lesion area; the calculation formula for the area size of the lesion area is as follows: Area size = number of pixel points * actual area represented by each pixel point. For example, a certain lesion area has 60 pixel points, and the actual area represented by each pixel point is 0.2mm * 0.2mm, then the area size of this lesion area = 60 * 0.2 * 0.2 = 2.4mm 2 ; Length feature extraction: Count the number of pixel points on the lesion edge in the lesion area, and calculate the perimeter size of the lesion area based on the actual area represented by each pixel point in the corresponding image, and mark it as the length feature of the lesion area; the calculation formula for the perimeter size of the lesion area is as follows: Perimeter size = number of pixel points on the lesion edge * √(actual area represented by each pixel point). For example, a certain lesion area has 30 pixel points on the lesion edge, and the actual area represented by each pixel point is 0.2mm * 0.2mm, then the perimeter size of this lesion area = 30 * √(0.2 * 0.2) = 6mm; Boundary feature extraction: Based on the size feature of the lesion area and the length feature of the lesion area, calculate the perimeter - area ratio of the lesion area, and mark it as the first boundary feature value, denoted as B1; the calculation formula for the first boundary feature value is as follows: B1 = perimeter size / area size; Obtain all the lesion edge pixel points and their corresponding coordinates in the lesion area, and sequentially label the corresponding coordinates of all the lesion edge pixel points as XC1, XC2, ……, XCn according to the connection order of the lesion edge pixel points; denote it as the coordinate sequence, and represent the coordinate sequence in complex form, that is, the coordinate of any pixel point is expressed as z(n)=x(n)+iy(n). For example, if XC1 is (2, 3), then z1 = 2 + i3; obtain the coordinate complex sequence, perform discrete Fourier transform on the coordinate complex sequence to obtain the spectral coefficients of the coordinate complex sequence, denoted as the boundary spectral coefficients; based on the boundary spectral coefficients, calculate the ratio of the energy of the high-frequency part to the total energy in the energy distribution of the boundary spectral coefficients, marked as the second boundary eigenvalue, denoted as B2; in this embodiment, the energy calculation formula of the high-frequency part is as follows: ; The total energy calculation formula is as follows: , where Z(K) represents the boundary spectral coefficient, N is the number of lesion edge pixel points, and k represents the k-th pixel point; then B2 = energy of the high-frequency part / total energy; Set the weight of the first boundary eigenvalue as m1, set the weight of the second boundary eigenvalue as m2, and m1 + m2 = 1; in this embodiment, m1 = 0.4 and m2 = 0.6 Based on the first boundary eigenvalue and the second boundary eigenvalue, calculate the third boundary eigenvalue B0, and the third boundary eigenvalue calculation formula is as follows: ; Mark the third boundary eigenvalue as the boundary feature; Mark the size feature, length feature, and boundary feature as the lesion image features; obtain all the corresponding lesion image features in the lesion area image set, and store them classified according to the corresponding patient and corresponding lesion area, marked as the lesion feature data; In the specific implementation process, the size feature directly reflects the scope of the lesion, the length feature can reflect the geometric shape and extension degree of the lesion, and the boundary feature reveals the complexity and possible invasiveness of the lesion from the perspective of the boundary morphology. For example, the larger the boundary feature of the lesion area, the more complex and disordered the growth pattern of the lesion tissue is likely to be, and the potential risk of its recurrence may be higher; and for m1 and m2, they can be set according to whether the application scenario pays more attention to the irregularity of the macroscopic shape or the irregularity of the microscopic details. The first boundary eigenvalue reflects the irregularity of the macroscopic shape, and the second boundary eigenvalue reflects the irregularity of the microscopic details.
[0022] The risk prediction module includes a model construction unit and a quantization prediction unit. The model construction unit is used to construct a prognostic risk quantization model; the quantization prediction unit uses the lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps; The model construction unit is configured with a model construction strategy, and the model construction strategy includes: based on the CT image set of the patient, the lesion image features in the lesion feature data are marked according to whether the sinusitis-nasal polyps patient relapses after treatment. If it relapses after treatment, it is marked as E = 1; if it does not relapse after treatment, it is marked as E = 0, where E represents the relapse situation after treatment; then the size feature, length feature, and boundary feature in the lesion feature data are respectively normalized, and all data sizes are scaled to [0, 1]. After completion, the first feature data is obtained; for the normalization of the size feature and length feature, the unit can be directly converted to scale the data size to [0, 1]. For example, 6mm = 0.6cm. For the normalization of the boundary feature, the maximum value in the boundary feature can be selected, and all boundary features are divided by the maximum value to scale the data size to [0, 1]. The first feature data is divided into a first training set and a first test set according to a ratio of 7:3. Based on the logistic regression model and the size feature, length feature, and boundary feature in the first feature data, the first logistic regression model is constructed as follows: , where P(E = 1) represents the risk probability of relapse; C1, C2, and C3 represent the size feature, length feature, and boundary feature in the first feature data in sequence, and β0, β1, β2, and β3 are the logistic regression model parameters; the initial learning rate is set to d1, the number of training rounds is set to d2, the batch size is set to d3, and every d4 training rounds, the learning rate is reduced by 5%. The risk quantification logistic regression model is trained using the first training set; after completion, the first prognostic risk model is obtained. In this embodiment, d1 = 0.01, d2 = 200, d3 = 32, d4 = 10, that is, every 10 training rounds, the learning rate becomes 0.95 times the original; before model training, β1, β2, and β3 need to be initialized. Usually, β1, β2, and β3 are initialized to small random values, such as 0.005, because if the initial parameter values are too large, it will affect the model training. Testing the first prognostic risk model using the first test set includes: inputting the first test set into the first prognostic risk model, and evenly dividing the probability range output by the first prognostic risk model into N intervals. For any interval, denoted as the v interval, calculating the ratio u of the corresponding actual recurrence patients within the v interval to the total patients within that interval; and determining whether the ratio u satisfies u ∈ v interval. If it satisfies, mark the v interval as qualified; if not, mark the v interval as unqualified. For example, if the probability range output by the first prognostic risk model is (0, 1), it is evenly divided into 5 intervals: (0, 0.2], (0.2, 0.4], (0.4, 0.6], (0.6, 0.8], and (0.8, 1). The number of corresponding patients with a probability output by the first prognostic risk model in the range (0.2, 0.4] is 40, and among them, 12 patients actually had a recurrence. Then 12 / 40 = 0.3, which is within (0.2, 0.4]. So the first prognostic risk model is qualified in the (0.2, 0.4] interval. If all N intervals are qualified, it is determined that the model test of the first prognostic risk model is qualified and marked as a prognostic risk quantification model; otherwise, it is determined that the model test of the first prognostic risk model is unqualified, and the first prognostic risk model is retrained using the first training set until the model test is qualified to obtain a prognostic risk quantification model; when retraining, parameters such as the number of training rounds, batch size, and learning rate can be appropriately changed to better complete the training and reduce the unqualified situation of the model. The quantization prediction unit is configured with a quantization prediction strategy, and the quantization prediction strategy includes: Please refer to Figure 4 As shown, through multiple relevant CT images taken at different times of patients with sinusitis-nasal polyps, multi-modal lesion area segmentation processing and lesion feature extraction processing are respectively performed to obtain the lesion image features of the lesion area of patients with sinusitis-nasal polyps at different times. The lesion image features of the lesion area at different times are respectively input into the prognostic risk quantification model to obtain multiple recurrence risk quantification results. According to the proximity of the CT image shooting times corresponding to the multiple recurrence risk quantification results, weighted averaging is performed to obtain a recurrence risk prediction result. For example, for patient a, three CT images were taken within the same year before treatment, on March 21st, April 18th, and May 20th respectively. The three CT images can be processed in sequence and input into the model, and three risk prediction results 0.42, 0.50, and 0.61 are obtained in sequence. According to the proximity of the times, weights of 0.2, 0.3, and 0.5 are respectively assigned. Then the recurrence risk prediction result = 0.5 * 0.61 + 0.3 * 0.50 + 0.2 * 0.42 = 0.539. The closer the CT image shooting time is, the greater the reference value, so the greater the weight, and the sum of the weights should be equal to 1. In the specific implementation process, logistic regression is a generalized linear model used to handle binary classification problems; for example, whether sinusitis-nasal polyps recur or not. Its basic idea is to establish a linear combination model to predict the probability of an event occurring. The output of the logistic regression model is the probability value of the recurrence risk, ranging from 0 to 1. This enables clinicians to intuitively understand the likelihood of recurrence for patients. For example, if a patient has a recurrence risk probability of 0.7, compared to another patient with a recurrence risk probability of 0.3, the doctor can arrange the treatment plan and follow-up schedule more reasonably based on this probability. For patients with a high probability of recurrence, more aggressive treatment measures can be taken or the follow-up interval can be shortened.
[0023] Example 2, please refer to Figure 2 As shown, the present application provides a method for constructing a prognosis model for sinusitis-nasal polyps based on image analysis, including the following steps: Step S1, collect relevant CT images of patients with sinusitis-nasal polyps, label the patient CT image set, and divide the patient CT image set; Step S1 includes the following sub-steps: Step S101, collect CT images of sinusitis-nasal polyps before the treatment of patients with sinusitis-nasal polyps, classify them according to the patients, and sort them in the order from near to far according to the time distance between the CT image shooting time and the treatment start time, and label them as the first CT image set; Step S102, based on the first CT image set, divide the first CT image set into a recurrence group and a non-recurrence group according to whether the patients with sinusitis-nasal polyps recur after treatment, and obtain the patient CT image set after completion.
[0024] Step S2, perform multi-modal lesion area segmentation processing on the patient CT image set to obtain a lesion area image set; Step S2 includes the following sub-steps: Step S201, perform grayscale processing on the patient CT image set to obtain a grayscale CT image set; for any grayscale image in the grayscale CT image set, label it as the first image; extract the grayscale values of all pixel points in the first image, and label it as the first image grayscale data; Step S202, set the horizontal direction operator H as ; the vertical direction operator V is ; the left diagonal direction operator L is ; the right diagonal direction operator R is ; Step S203: For any pixel point in the first image, denoted as I(x, y), where I(x, y) represents the grayscale value of the pixel with coordinates (x, y), calculate the horizontal gradient GH(x, y), vertical gradient GV(x, y), left diagonal gradient GL(x, y), and right diagonal gradient GR(x, y) of I(x, y) in sequence using the horizontal direction operator H, vertical direction operator V, left diagonal direction operator L, and right diagonal direction operator R. The formula for calculating the horizontal gradient is as follows: ; The formula for calculating the vertical gradient is as follows: ; The formula for calculating the left diagonal gradient is as follows: ; The formula for calculating the right diagonal gradient is as follows: ; where H(i + 1, j + i), V(i + 1, j + i), L(i + 1, j + i), and R(i + 1, j + i) represent the elements with coordinates (i + 1, j + i) in the horizontal direction operator H, vertical direction operator V, left diagonal direction operator L, and right diagonal direction operator R respectively; Step S204: Set the weight of the horizontal gradient GH(x, y) as q1, the weight of the vertical gradient GV(x, y) as q2, the weight of the left diagonal gradient GL(x, y) as q3, and the weight of the right diagonal gradient GR(x, y) as q4, where q1 + q2 + q3 + q4 = 1; Step S205: Then calculate the total gradient value G(x, y) of I(x, y) using the total gradient value calculation formula. The total gradient value calculation formula is as follows: ; Obtain the total gradient values of all pixel points in the first image, marked as the first image gradient data; Step S206: Based on the first image gradient data and the first image grayscale data, judge the total gradient value G(x, y) and grayscale value I(x, y) of any pixel point to determine whether G(x, y) > T0 and I(x, y) > T1 are satisfied, where T0 is the gradient threshold and T1 is the grayscale threshold. If satisfied, mark the pixel point as a lesion edge pixel point and record the position of the lesion edge pixel point. Traverse all pixel points in the first image to obtain all lesion edge pixel points in the first image; Step S207: Lesion area marking: Select any lesion edge pixel point and mark it as the initial edge pixel point. Based on the pixel points in the 8-neighborhood around the initial edge pixel point, screen the pixel points in the 8-neighborhood in a clockwise direction, connect the first screened lesion edge pixel point to the initial edge pixel point, then based on the pixel points in the 8-neighborhood around the first screened lesion edge pixel point, screen the pixel points in the 8-neighborhood in a clockwise direction and connect them until connecting to the initial edge pixel point again, and record the connection order of the lesion edge pixel points; Step S208: Mark the closed area formed by connecting the lesion edge pixel points as the lesion area, and mark the pixel points in the lesion area as lesion pixel points; Step S209: Then, select any one of the lesion edge pixel points that have not been marked as the lesion area for lesion area marking until all lesion edge pixel points are marked as the lesion area. Mark the first image with the completed lesion area marking as the lesion area image; Step S210: Traverse the patient CT image set, obtain the lesion area images corresponding to all images in the patient CT image set, and mark them as the lesion area image set.
[0025] Step S3: Perform lesion feature extraction processing based on the lesion area image set to obtain the lesion image features of the lesion area. Step S3 includes the following sub-steps: Step S301: Based on any one lesion area in any one image in the lesion area image set, perform size feature extraction, length feature extraction, and boundary feature extraction respectively; Step S302: Size feature extraction: Count the number of pixel points in the lesion area, obtain the actual area represented by each pixel point in the corresponding image, calculate the area size of the lesion area, and mark it as the size feature of the lesion area; Step S303: Length feature extraction: Count the number of lesion edge pixel points in the lesion area, and based on the actual area represented by each pixel point in the corresponding image, calculate the perimeter size of the lesion area, and mark it as the length feature of the lesion area; Step S304: Boundary feature extraction; Step S304 includes the following sub-steps: Step S3041: Based on the size feature of the lesion area and the length feature of the lesion area, calculate the perimeter-area ratio of the lesion area, and mark it as the first boundary feature value, denoted as B1; Step S3042: Obtain all the lesion edge pixel points and their corresponding coordinates in the lesion area, and mark the corresponding coordinates of all the lesion edge pixel points in the order of connection of the lesion edge pixel points as XC1, XC2,..., XCn; denoted as the coordinate sequence; Step S3043: Represent the coordinate sequence in complex form to obtain the coordinate complex sequence, perform discrete Fourier transform on the coordinate complex sequence, and obtain the spectral coefficients of the coordinate complex sequence, denoted as the boundary spectral coefficients; Step S3044: Based on the boundary spectral coefficients, calculate the ratio of the energy of the high-frequency part to the total energy in the energy distribution of the boundary spectral coefficients, and mark it as the second boundary feature value, denoted as B2; Step S305: Set the weight of the first boundary eigenvalue as m1, and set the weight of the second boundary eigenvalue as m2, where m1 + m2 = 1; calculate the third boundary eigenvalue B0 based on the first boundary eigenvalue and the second boundary eigenvalue. The calculation formula for the third boundary eigenvalue is as follows: ; Mark the third boundary eigenvalue as the boundary feature. Step S306: Mark the size feature, length feature, and boundary feature as lesion image features; obtain all corresponding lesion image features in the lesion area image set, and store them classified according to the corresponding patient's corresponding lesion area, marked as lesion feature data.
[0026] Step S4: Construct a prognostic risk quantification model and use the lesion image features to quantitatively predict the recurrence risk of rhinosinusitis-nasal polyps; Step S4 includes the following sub-steps: Step S401: Based on the patient's CT image set, mark the lesion image features in the lesion feature data according to whether the corresponding rhinosinusitis-nasal polyps patient relapses after treatment. If it relapses after treatment, mark it as E = 1; if it does not relapse after treatment, mark it as E = 0, where E represents the recurrence situation after treatment. Step S402: Then, normalize the size feature, length feature, and boundary feature in the lesion feature data respectively, and scale all data sizes to [0, 1]. After completion, obtain the first feature data. Step S403: Divide the first feature data into a first training set and a first test set in a ratio of 7:3. Step S404: Based on the logistic regression model and the size feature, length feature, and boundary feature in the first feature data, construct the first logistic regression model as follows: , where P(E = 1) represents the risk probability of recurrence; C1, C2, and C3 represent the size feature, length feature, and boundary feature in the first feature data in sequence, and β0, β1, β2, and β3 are the logistic regression model parameters. Step S405: Set the initial learning rate as d1, the number of training rounds as d2, the batch size as d3, and the learning rate decreases by 5% every d4 training rounds. Use the first training set to train the risk quantification logistic regression model; after completion, obtain the first prognostic risk model. Step S406: Use the first test set to test the first prognostic risk model, including: input the first test set into the first prognostic risk model, and evenly divide the probability range output by the first prognostic risk model into N intervals. For any one interval, denoted as the v interval, calculate the ratio u of the actual recurrence patients in the v interval to the total patients in this interval. Step S407, and determine whether the ratio u satisfies u ∈ v interval. If it satisfies, mark it as qualified for the v interval; if not, mark it as unqualified for the v interval; Step S408, if all N intervals are qualified, determine that the model test of the first prognosis risk model is qualified, and mark it as the prognosis risk quantification model; otherwise, determine that the model test of the first prognosis risk model is unqualified, and continue to train the first prognosis risk model with the first training set until the model test is qualified to obtain the prognosis risk quantification model; Step S409, perform multi-modal lesion area segmentation processing and lesion feature extraction processing on multiple relevant CT images taken at different times of patients with sinusitis-nasal polyps respectively, to obtain the lesion image features of the lesion area of patients with sinusitis-nasal polyps at different times; Step S410, input the lesion image features of the lesion area at different times into the prognosis risk quantification model respectively to obtain multiple recurrence risk quantification results, and perform weighted average according to the distance of the CT image shooting time corresponding to the multiple recurrence risk quantification results to obtain the recurrence risk prediction result.
[0027] Example 3, please refer to Figure 5 as shown Figure 5 illustrates a schematic structural diagram of an electronic device. The electronic device may include: a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, it runs the steps in the method for constructing a prognosis model of sinusitis-nasal polyps based on image analysis to achieve the following functions: collect relevant CT images of patients with sinusitis-nasal polyps, mark the patient CT image set, and divide the patient CT image set; perform multi-modal lesion area segmentation processing based on the patient CT image set to obtain a lesion area image set; perform lesion feature extraction processing based on the lesion area image set to obtain the lesion image features of the lesion area; construct a prognosis risk quantification model, and use the lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps.
[0028] In addition, when the logical instructions in the above-mentioned memory can be implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0029] Embodiment 4, this application also provides a computer-readable storage medium. This application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, it runs the steps in the above-mentioned method for constructing a prognosis model for sinusitis-nasal polyps based on image analysis to achieve the following functions: collecting relevant CT images of patients with sinusitis-nasal polyps, marking the patient CT image set, and dividing the patient CT image set; performing multi-modal lesion area segmentation processing based on the patient CT image set to obtain a lesion area image set; performing lesion feature extraction processing based on the lesion area image set to obtain the lesion image features of the lesion area; constructing a prognosis risk quantification model, and using the lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps.
[0030] Through the description of the above embodiments, the embodiments of the present invention can be provided as a method, a system, or a computer program product. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disks, optical discs, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments.
[0031] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of systems, modules, and units can be electrical, mechanical, or other forms.
[0032] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis, characterized in that: The steps include: Collect relevant CT images of patients with sinusitis and nasal polyps, mark the patient CT image set, and divide the patient CT image set; Perform multimodal lesion region segmentation processing based on the patient CT image set to obtain a lesion region image set; Perform lesion feature extraction processing based on the lesion area image set to obtain lesion image features of the lesion area; A prognostic risk quantification model was constructed, and the recurrence risk of sinusitis-nasal polyps was quantitatively predicted using lesion imaging features.
2. The method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to claim 1, characterized in that: Collecting relevant CT images of patients with sinusitis and nasal polyps, marking the patient CT image set, and dividing the patient CT image set includes the following sub-steps: Collect CT images of sinusitis-nasal polyps patients before treatment, classify them according to the patients they belong to, and sort them from near to far according to the time distance between the CT image shooting time and the start time of treatment, and mark them as the first CT image set; Based on the first CT image set, patients with sinusitis-nasal polyps are divided into a recurrence group and a non-recurrence group according to whether the sinusitis-nasal polyps relapse after treatment. After completion, the patient CT image set is obtained.
3. The method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to claim 2, characterized in that: The multimodal lesion region segmentation process is performed based on the patient CT image set to obtain the lesion region image set, which includes the following sub-steps: Grayscale processing is performed on the patient CT image set to obtain a grayscale CT image set; any grayscale image in the grayscale CT image set is marked as a first image; the grayscale values of all pixels in the first image are extracted and marked as grayscale data of the first image; Set the horizontal operator H to ; The vertical operator V is ; The left diagonal operator L is ; The right diagonal operator R is ; For any pixel point in the first image, denoted as I(x, y), I(x, y) represents the grayscale value of the pixel with coordinates (x, y), and the horizontal direction operator H, the vertical direction operator V, the left diagonal direction operator L, and the right diagonal direction operator R are used to calculate the horizontal direction gradient GH(x, y), the vertical direction gradient GV(x, y), the left diagonal direction gradient GL(x, y), and the right diagonal direction gradient GR(x, y) of I(x, y) in sequence; the horizontal direction gradient calculation formula is as follows: ; The vertical gradient calculation formula is as follows: ; The left diagonal gradient calculation formula is as follows: ; The right diagonal gradient calculation formula is as follows: ; Wherein H(i+1, j+i), V(i+1, j+i), L(i+1, j+i) and R(i+1, j+i) represent the elements with coordinates (i+1, j+i) in the horizontal direction operator H, the vertical direction operator V, the left diagonal direction operator L and the right diagonal direction operator R, respectively; Set the weight of the horizontal gradient GH(x, y) to q1, the weight of the vertical gradient GV(x, y) to q2, the weight of the left diagonal gradient GL(x, y) to q3, and the weight of the right diagonal gradient GR(x, y) to q4, q1+q2+q3+q4=1; then use the total gradient value calculation formula to calculate the total gradient value G(x, y) of I(x, y), the total gradient value calculation formula is as follows: ; Get the total gradient value of all pixels in the first image, marked as the first image gradient data.
4. The method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to claim 3, characterized in that: Performing multimodal lesion region segmentation processing based on the patient CT image set to obtain the lesion region image set also includes the following sub-steps: Based on the first image gradient data and the first image grayscale data, a total gradient value G(x, y) and a grayscale value I(x, y) of any pixel point are judged to determine whether G(x, y)>T0 and I(x, y)>T1 are satisfied, where T0 is a gradient threshold and T1 is a grayscale threshold. If satisfied, the pixel point is marked as a lesion edge pixel point, and the position of the lesion edge pixel point is recorded; all pixels of the first image are traversed to obtain all lesion edge pixels in the first image; Lesion area marking: select any lesion edge pixel point and mark it as the initial edge pixel point. Based on the pixels in the 8 neighborhoods around the initial edge pixel point, filter the pixels in the 8 neighborhoods in a clockwise direction. Connect the first filtered lesion edge pixel point with the initial edge pixel point. Then, based on the pixels in the 8 neighborhoods around the first filtered lesion edge pixel point, filter the pixels in the 8 neighborhoods in a clockwise direction and connect them until they are connected to the initial edge pixel point again. Record the connection order of the lesion edge pixels. Mark the closed area formed by the lesion edge pixels as the lesion area, and mark the pixels in the lesion area as lesion pixels. Then, any lesion edge pixel point is selected from the lesion edge pixel points that have not been marked as lesion areas to mark the lesion area, until all lesion edge pixel points are marked as lesion areas, and the first image that has completed the lesion area marking is marked as the lesion area image; The patient CT image set is traversed to obtain the lesion area images corresponding to all images in the patient CT image set, and marked as the lesion area image set.
5. The method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to claim 4, characterized in that: Performing lesion feature extraction based on the lesion area image set to obtain the lesion image features of the lesion area includes the following sub-steps: Based on any lesion area in any image in the lesion area image set, size feature extraction, length feature extraction and boundary feature extraction are performed respectively; Size feature extraction: Count the number of pixels in the lesion area, obtain the actual area represented by each pixel in the corresponding image, calculate the area size of the lesion area, and mark it as the size feature of the lesion area; Length feature extraction: Count the number of lesion edge pixels in the lesion area, and calculate the perimeter of the lesion area based on the actual area represented by each pixel in the corresponding image, and mark it as the length feature of the lesion area.
6. The method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to claim 5, characterized in that: Performing lesion feature extraction based on the lesion area image set to obtain the lesion image features of the lesion area also includes the following sub-steps: Boundary feature extraction: Based on the size feature and length feature of the lesion area, the perimeter area ratio of the lesion area is calculated and marked as the first boundary feature value, denoted as B1; Obtain all lesion edge pixel points and corresponding coordinates in the lesion area, and mark the corresponding coordinates of all lesion edge pixel points as XC1, XC2, ..., XCn in sequence according to the connection order of the lesion edge pixel points; record them as a coordinate sequence, express the coordinate sequence in complex form to obtain a coordinate complex sequence, perform discrete Fourier transform on the coordinate complex sequence, obtain the spectrum coefficient of the coordinate complex sequence, and record it as a boundary spectrum coefficient; based on the boundary spectrum coefficient, calculate the ratio of the energy of the high-frequency part of the energy distribution of the boundary spectrum coefficient to the total energy, mark it as the second boundary eigenvalue, and record it as B2; The weight of the first boundary eigenvalue is set to m1, and the weight of the first boundary eigenvalue is set to m2, m1+m2=1; the third boundary eigenvalue B0 is calculated based on the first boundary eigenvalue and the second boundary eigenvalue, and the calculation formula of the third boundary eigenvalue is as follows: ; Mark the third boundary feature value as a boundary feature; The size features, length features and boundary features are marked as lesion image features; all corresponding lesion image features in the lesion area image set are obtained, and are classified and stored according to the corresponding lesion areas of the corresponding patients, and marked as lesion feature data.
7. The method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to claim 6, characterized in that: The construction of a prognostic risk quantification model and the quantitative prediction of the recurrence risk of sinusitis-nasal polyps using lesion imaging features include the following sub-steps: Based on the patient CT image set, the lesion image features in the lesion feature data are marked according to whether the corresponding sinusitis-nasal polyps patients relapse after treatment. If the disease relapses after treatment, it is marked as E=1; if the disease does not relapse after treatment, it is marked as E=0, where E represents the recurrence after treatment; the size features, length features, and boundary features in the lesion feature data are normalized respectively, and all data sizes are scaled to [0, 1], and the first feature data is obtained after completion; The first feature data is divided into a first training set and a first test set in a ratio of 7:
3.
8. The method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to claim 7, characterized in that: Constructing a prognostic risk quantification model and using lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps also includes the following sub-steps: Based on the logistic regression model and the size feature, length feature and boundary feature in the first feature data, the first logistic regression model is constructed as follows: , where P(E=1) represents the risk probability of recurrence; C1, C2 and C3 represent the size feature, length feature and boundary feature in the first feature data in order, β0, β1, β2 and β3 are logistic regression model parameters; the initial learning rate is set to d1, the training round is set to d2, the batch size is set to d3, and the learning rate is reduced by 5% after every d4 training rounds. The risk quantification logistic regression model is trained using the first training set; After completion, the first prognostic risk model was obtained; The first prognostic risk model is tested using the first test set, including: inputting the first test set into the first prognostic risk model, and evenly dividing the probability range output by the first prognostic risk model into N intervals, for any interval, recorded as v interval, calculating the ratio u of the actual recurrence patients corresponding to the v interval to the total patients in the interval; and judging whether the ratio u satisfies u∈v interval, if so, marking the v interval as qualified, and if not, marking the v interval as unqualified; If all N intervals are qualified, the model test of the first prognostic risk model is determined to be qualified and marked as a prognostic risk quantification model; otherwise, the model test of the first prognostic risk model is determined to be unqualified, and the first prognostic risk model is continuously trained with the first training set until the model test is qualified to obtain a prognostic risk quantification model.
9. The method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to claim 8, characterized in that: Constructing a prognostic risk quantification model and using lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps also includes the following sub-steps: Through multiple related CT images taken at different times of patients with sinusitis and nasal polyps, multimodal lesion area segmentation processing and lesion feature extraction processing are performed to obtain the lesion image features of the lesion area of patients with sinusitis and nasal polyps at different times. The lesion image features of the lesion area at different times are input into the prognostic risk quantification model to obtain multiple recurrence risk quantification results. The weighted average is performed according to the distance of the CT image shooting time corresponding to the multiple recurrence risk quantification results to obtain the recurrence risk prediction result.
10. A system for constructing a prognostic model for sinusitis and nasal polyps based on image analysis, applicable to the method for constructing a prognostic model for sinusitis and nasal polyps based on image analysis according to any one of claims 1 to 9, characterized in that: It includes image acquisition module, image segmentation module, feature extraction module and risk prediction module; The image acquisition module is used to collect relevant CT images of patients with sinusitis-nasal polyps, mark the patient CT image set, and divide the patient CT image set; The image segmentation module performs multimodal lesion region segmentation processing based on the patient CT image set to obtain a lesion region image set; The feature extraction module performs lesion feature extraction processing based on the lesion area image set to obtain lesion image features of the lesion area; The risk prediction module includes a model building unit and a quantitative prediction unit. The model building unit is used to build a prognostic risk quantitative model; the quantitative prediction unit uses lesion image features to quantitatively predict the recurrence risk of sinusitis-nasal polyps.
Citation Information
Patent Citations
Image analysis method and system based on colorectal polyp CT image data set
CN118154602A