Adenoid hypertrophy degree classification method

By preprocessing and feature extraction of the endoscopic imaging of adenoids and nasopharyngeal cavity, combined with comparison learning and weighting methods, the problem of inaccurate judgment of adenoid hypertrophy is solved, and higher segmentation and grading accuracy and stability are achieved.

CN119723175APending Publication Date: 2025-03-28HUNAN UNIV OF TECH

Patent Information

Application Number
CN202411776047.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art has problems with inaccurate judgment of the degree of adenoid hypertrophy, especially in monocular endoscopy, the area of ​​the lesion varies greatly due to different distances, which affects the accuracy of grading.

Method used

A method of classification of adenoid hypertrophy, including collecting endoscopic imaging images, pre-processing and feature extraction, and obtaining accurate classification results through comparative learning and weighting methods.

Benefits of technology

By constructing the relationship between the increase and decrease of the black area and the white area, the accuracy and stability of segmentation and grading are improved, the discrimination ability and generalization performance of the model are enhanced, and the accurate judgment of the degree of adenoid hypertrophy is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723175A_ABST
    Figure CN119723175A_ABST
Patent Text Reader

Abstract

The invention relates to an adenoid hypertrophy degree classification method, which comprises the following steps of S1, collecting a complete nasal endoscope imaging picture of an adenoid and a nasopharyngeal cavity, and preprocessing the imaging picture to obtain an image with a mask; s2, image mask division is carried out on the image to generate a white area and a black area which are complementary, feature extraction is carried out on the two area images, and finally segmentation feature output Fout is obtained; s3, performing comparative learning on the segmentation feature output Fout, and predicting a learning result to obtain a prediction grading result # imgabs0; S4, obtaining a relative area ratio R of the black and white double regions # imgabs1 # and # imgabs2 #; and a weighting method is adopted for # imgabs3 # and R, and corresponding weights are distributed, so that an accurate classification result is obtained. By means of the method, accurate judgment on the hypertrophy degree of the adenoid body can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for classifying the degree of adenoid hypertrophy. Background Art

[0002] Clinically, the degree of adenoid hypertrophy is divided into grades 1 to 3 by measuring the distance between the vomer and the adenoid tissue under nasal endoscopy. At present, the processing of medical images often uses the information after the segmentation of the lesion image as a reference for lesion grading, such as brain tumor grading and lung nodule detection. Segmentation technology can accurately distinguish lesions from normal tissues and provide information such as location and shape. However, due to individual differences among patients, there are challenges in the application of technology: grading based solely on the absolute size and position of the lesion is prone to errors, especially in monocular endoscopic examinations, where the lesion area varies greatly due to different distances, affecting the accuracy of grading. Ultimately, doctors make inaccurate judgments about the degree of adenoid hypertrophy.

[0003] The prior art CN113116305A discloses a method for processing nasopharyngeal endoscopic images, which obtains nasopharyngeal endoscopic images, determines the posterior nasal area and adenoids blockage area of ​​the nasopharyngeal endoscopic image, and determines the degree of adenoids hypertrophy based on the posterior nasal area and adenoids blockage area, thereby making the obtained degree of adenoids hypertrophy more accurate.

[0004] The prior art determines the posterior nasal area and adenoids obstruction area of ​​the nasopharyngeal endoscope image through images, thereby directly judging the degree of adenoids hypertrophy. The image is not subjected to any analysis and processing, and the degree of adenoids hypertrophy is judged entirely by experience, which also has the problem of inaccurate judgment of the degree of adenoids hypertrophy. Summary of the invention

[0005] The technical problem solved by the present invention is to overcome the problems existing in the prior art and provide a method for classifying the degree of adenoids hypertrophy which can accurately judge the degree of adenoids hypertrophy.

[0006] The purpose of the present invention is achieved through the following technical solutions:

[0007] A method for classifying the degree of adenoid hypertrophy is disclosed, comprising the following steps:

[0008] S1: Collect adenoids and nasopharyngeal cavity to take complete nasal endoscopic images, pre-process the images, and obtain the image with mask image mask ;

[0009] S2: image mask The division generates two complementary white areas and black areas, and extracts features from the two area images to finally obtain the segmentation feature output F out ;

[0010] S3: Output F for segmentation features out Conduct comparative learning and predict the results after learning to obtain the predicted classification result Y p ;

[0011] S4: Get black and white double zone A w and A b The relative area ratio R of p And R adopts a weighted method to assign corresponding weights to obtain accurate classification results.

[0012] Preferably, in step S1, the preprocessing includes classifying and labeling adenoids and nasopharyngeal cavities with different degrees of hypertrophy, and then inputting the image image into the segmentation model for preliminary segmentation, thereby obtaining an image image with a mask. mask .

[0013] Preferably, step S2 comprises the following steps:

[0014] S21: Perform a gridding operation on the original image image, dividing the image into a plurality of grid images, denoted as I = {p1, p2, ..., p n}, then set the input image size I to 3×H×W; then according to image mask Divide the image into white areas and black area

[0015] S22: for the i-th grid image in the black and white area respectively and Perform feature extraction operations to generate corresponding feature representations and

[0016] S23: and With the help of fusion operation F w and F b Fusion is performed to enhance information complementarity and then construct the final segmentation feature output F out .

[0017] Preferably, in step S22, the lesion area I w and non-lesion area I b Divide into multiple small blocks and And apply the feature extraction function f(·) to process each block to obtain the corresponding feature vector:

[0018]

[0019] Calculate the cross entropy between the white area and the black area First, P c (x) is defined as the probability of finding the class in block x; using these probabilities, we can quantitatively measure the contribution of each region to the image information:

[0020]

[0021] c is the category, and finally, by comparing and Analyze the difference in information contribution between white and black areas.

[0022] Preferably, in step S23, F out The calculation formula is:

[0023] F out =α·F w +(1-α)·F b

[0024] Where α∈[0, 1] is the fusion weight, which is used to control the contribution ratio of white and black region features.

[0025] Preferably, step S5 comprises:

[0026] S31: Calculate contrast loss through contrast learning;

[0027] S32: Fuse the multi-level feature blocks to integrate information at different levels, and use the fused features for prediction through the decoder.

[0028] Preferably, in step S31,

[0029]

[0030] where cos(·) represents the cosine similarity function, τ is a hyperparameter, and g(·) is a shallow fully connected network; the set ∧ - It consists of embeddings of feature pairs that are different from the input image;

[0031] The distance between each patch pair is calculated using the cosine similarity of the refined feature pair embeddings, and then a contrastive learning method is applied to calculate the contrastive loss to amplify the differences between feature pairs; cosine similarity is used to measure the distance between patch embeddings:

[0032]

[0033] And normalize the value range between 0 and 1:

[0034]

[0035] F out Used as input to the feature pair contrastive learning module; produces feature map P w (white area) and P b (black area); predicted score and the threshold ∈ determine the confidence of the classification: , it is classified as a high confidence category when , it is classified as low confidence Feature extraction is applied to N blocks in each region, and the similarity and distance between classes are further calculated; capturing P w and P b The complementary relationship between

[0036] The technical formula for the black-white paired comparison learning error is:

[0037]

[0038] in, and Represent the logarithm of high confidence and low confidence respectively; F high and F low Represents high confidence and Feature embedding for low confidence pairs.

[0039] Preferably, the step S32 comprises: firstly fusing the multi-level feature blocks to integrate information at different levels; mapping the category distribution generated by the decoder to the classification result:

[0040] where seg(·) is the segmentation decoder, is the input image I c The prediction results;

[0041] The predictions generated by the decoder are combined with the predicted categories of the feature pairs to calculate the segmentation loss.

[0042]

[0043] N is the total number of pixels in the image, Represents the input image I c The real segmentation map;

[0044] The calculation formula for cross entropy loss is:

[0045]

[0046] y i is the true category label of the th pixel, is the category label predicted by the decoder. By calculating the segmentation loss, the predicted classification result Y of the image is obtained. p .

[0047] Preferably, in step S4,

[0048] The calculation formula of area ratio R is:

[0049]

[0050] A W Represents the area of ​​the white area, A b Represents the area of ​​the black area.

[0051] Preferably, in step S4, let P l (x) represents the predicted probability of label l at position x, A(x) represents the area ratio, and the calculation formula of the final label l(x) is:

[0052]

[0053] Using segmentation loss Used to optimize the accuracy of image segmentation, It is the loss of feature pair contrastive learning, which strengthens the feature relationship and feature discrimination of the input image through contrastive learning. We focus on optimizing the features of black and white regions in the contrastive learning module, and improve the model's ability to distinguish by reducing the intra-class distance and increasing the inter-class separation. The final total loss function is the weighted sum of these loss terms. The calculation formula for the total damage function is:

[0054]

[0055] α, β, γ are the weight coefficients of each loss term.

[0056] Compared with the prior art, it has the following beneficial effects:

[0057] 1) By constructing a relationship of increase and decrease between black and white areas, the accuracy and stability of segmentation and classification are improved. The introduction of dual-area contrast learning makes the same type of features closer and the different types of features more dispersed, which enhances the model's discrimination ability and generalization performance. Finally, a weighted method is used to assign corresponding weights to achieve image processing and improve the accuracy of judging the degree of adenoid hypertrophy.

[0058] 2) It can achieve precise segmentation and generate accurate grading results, providing reliable support for lesion analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A schematic diagram of a process for classifying the degree of adenoid hypertrophy according to the present invention;

[0060] Figure 2 This is a simulation result diagram of a method for classifying the degree of adenoid hypertrophy according to the present invention;

[0061] Figure 3 It is an F1-Confidence curve diagram in a method for classifying the degree of adenoid hypertrophy of the present invention;

[0062] Figure 4 A comparison diagram of the true segmentation and the model-predicted segmentation in a method for classifying the degree of adenoid hypertrophy of the present invention;

[0063] Figure 5 This is a comparison chart of grading results in a method for categorizing the degree of adenoid hypertrophy according to the present invention. DETAILED DESCRIPTION

[0064] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.

[0065] In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited to the specific embodiments disclosed below.

[0066] In addition, in the description of the present application, it should be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0067] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or a communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0068] In the present application, unless otherwise clearly specified and limited, a first feature "above" or "below" a second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in an appropriate manner in any one or more embodiments or examples.

[0069] Example 1

[0070] like Figure 1 As shown, a method for classifying the degree of adenoid hypertrophy is disclosed, comprising the following steps:

[0071] S1: Collect adenoids and nasopharyngeal cavity to take complete nasal endoscopic images, pre-process the images, and obtain the image with mask image mask ;

[0072] S2: image mask The division generates two complementary white areas and black areas, and extracts features from the two area images to finally obtain the segmentation feature output F out ;

[0073] S3: Output F for segmentation features out Conduct comparative learning and predict the results after learning to obtain the predicted classification result Y p ;

[0074] S4: Get black and white double zone A w and A b The relative area ratio R of p And R adopts a weighted method to assign corresponding weights to obtain accurate classification results.

[0075] In this embodiment, complete nasal endoscopic images of adenoids and nasopharyngeal cavity are collected, and classification and annotation are performed for adenoids and nasopharyngeal cavity with different degrees of hypertrophy. The image image is input into the segmentation model for preliminary segmentation, thereby obtaining an image image with a mask mask .

[0076] Then, a gridding operation is performed on the original image image, and image is divided into a plurality of grid images I = {p1, p2, ..., p n}, where n represents the number of grids. Then according to the image obtained earlier mask The mask position of these grids is further divided to generate two complementary area images, the white area I w (representing the lesion area with mask) and black area I b (represents the non-lesion area outside the mask).

[0077] Perform feature extraction operations on the i-th grid image and in the black and white area respectively to generate the corresponding feature representation and

[0078] Will and With the help of fusion operation F w and F b Fusion is performed to enhance information complementarity and then construct the final segmentation feature output F out .

[0079] The obtained out Calculate the patch prediction score for the input of the comparative learning module and At the same time, the contrastive learning loss is calculated Finally, the model is optimized by patch contrast learning error loss (PLE). Clustering method is then used to group features so that the distance between features of the same category is closer and the distance between features of different categories is farther. Finally, the finely segmented white area A is obtained. w With black area A b .

[0080] After contrastive learning is completed, a decoder head is introduced to merge the multi-level feature block embeddings to make predictions, which is implemented through a simple multi-layer perceptron (MLP) layer. The decoder predictions are combined with the predicted category results of the feature pair to calculate the segmentation loss Specifically, each p c The predicted category is directly mapped to p cEach pixel in is used as the pixel category to calculate the segmentation loss, and then the predicted classification result Y is obtained. p .

[0081] The black and white area A obtained after clustering in step 3 w and A b The ratio of the relative areas of the two surfaces, this ratio R is one of the classification results.

[0082] Multi-class weighted part: the classification result Y p and, using a weighted approach, will be based on Y p and R, and assign corresponding weights to them according to their respective importance or contribution in the entire grading system. p The classification results are optimized by comprehensively considering α and R, making the final classification results more accurate and reasonable, and better reflecting the actual classification situation.

[0083] By constructing a relationship of increase and decrease between black and white areas, the accuracy and stability of segmentation and classification are improved. The introduction of dual-area contrast learning makes the same type of features closer and the different types of features more dispersed, which enhances the model's discrimination ability and generalization performance. Finally, a weighted method is used to assign corresponding weights to achieve image processing and provide accuracy in judging the degree of adenoid hypertrophy.

[0084] Example 2

[0085] A method for classifying the degree of adenoid hypertrophy is disclosed, comprising the following steps:

[0086] S1: Collect adenoids and nasopharyngeal cavity to take complete nasal endoscopic images, pre-process the images, and obtain the image with mask image mask ;

[0087] S2: image mask The division generates two complementary white areas and black areas, and extracts features from the two area images to finally obtain the segmentation feature output F out ;

[0088] S3: Output F for segmentation features out Conduct comparative learning and predict the results after learning to obtain the predicted classification result Y p ;

[0089] S4: Get black and white double zone A w and A b The relative area ratio R of p And R adopts a weighted method to assign corresponding weights to obtain accurate classification results.

[0090] The difference between this embodiment and the first embodiment is that the construction of the black and white dual area specifically includes: performing a gridding operation on the original image image to divide it into a plurality of grid images, denoted as I = {p1, p2, ..., p n}, then set the input image I size to 3×H×W. Next, according to image mask Divide the image into white areas and Black Area The division of the region depends on the position of the segmentation mask. To be precise, if the lesion is located in the upper right corner of the image, the detected mask position will also be located in the upper right corner of the image, while the non-lesion area is located in the lower left corner of the image. The two regions satisfy the "one increases while the other decreases" relationship, that is, when the area of ​​one region decreases, the area corresponding to the other region will increase, and always satisfy I w +I b = I. Feature extraction part: for the i-th grid image in the black and white area respectively and Perform feature extraction to generate the corresponding feature representation and

[0091] The lesion area I w and non-lesion area I b Divide into multiple small blocks and And apply the feature extraction function f(·) to process each block to obtain the corresponding feature vector:

[0092]

[0093] Then, the cross entropy between the white area and the black area is calculated First, P c (x) is defined as the probability of finding category c in block x. Using these probabilities, we can quantitatively measure the contribution of each region to the image information:

[0094]

[0095] c is the category, and finally, by comparing and Analyze the difference in information contribution between white and black areas.

[0096] Will and With the help of fusion operation F w and F b Fusion is performed to generate a unified feature representation through weighted combination. The formula is:

[0097] Fout =α·F w +(1-α)·F b

[0098] Where α∈[0, 1] is the fusion weight, which is used to control the contribution ratio of white and black region features.

[0099] In this embodiment, the contrastive learning method of feature pairs is used to calculate the contrastive loss, which has two main purposes: to strengthen the relationship between different representations of the input image to enhance the core features of the black and white areas, and to improve the discrimination. By reducing the intra-class distance and increasing the inter-class separation, the difference between the black and white areas is further amplified.

[0100]

[0101] Where cos(·) represents the cosine similarity function, τ is a hyperparameter, and g(·) is a shallow fully connected network. - It consists of embeddings of feature pairs that are different from the input image.

[0102] The distance between each patch pair is calculated using the cosine similarity of the refined feature pair embeddings, and then a contrastive learning method is applied to calculate the contrastive loss, whose main purpose is to further amplify the differences between feature pairs by reducing the intra-class distance and increasing the inter-class separation, and expanding the distance between feature pairs with high prediction scores. Cosine similarity is used to measure the distance between patch embeddings:

[0103]

[0104] The higher the similarity value, the closer the distance between the two embedded classes is, and the lower the value, the farther the distance is. In order to more clearly indicate the similarity, the value range between 0 and 1 is normalized as follows:

[0105]

[0106] F out Used as input to the feature pair contrastive learning module. Generate feature map P w (white area) and P b (Black area). Prediction score The threshold ∈ determines the confidence of the classification: Classified as high confidence when , it is classified as low confidence Feature extraction is applied to N blocks of each region, and the similarity and distance between classes are further calculated. w and P b These features are combined for the final segmentation prediction.

[0107] The paired comparison learning error (PLE) of the black and white areas can be expressed as:

[0108]

[0109] in, and Represents the logarithm of high confidence and low confidence respectively. high and F low Represent high confidence pairs and low confidence feature embedding.

[0110] In the decoder, the multi-level feature blocks are first fused to integrate information at different levels. This fusion process is achieved through a multi-layer perceptron (MLP) layer. After each feature block is embedded in the MLP layer, a representation vector with a higher-level feature expression is generated. Subsequently, the decoder uses these fused features for prediction.

[0111] The features P of the black and white regions w and P b After splicing, a comprehensive feature representation containing multi-region information is formed. The decoder then processes and predicts the category of each pixel based on these fused features through the MLP layer. In this way, the decoder not only captures the detailed features within the region, but also combines the visual relationship between the two regions, thereby more accurately reflecting the severity of the lesion in the generated predicted segmentation results. Finally, the model maps the category distribution generated by the decoder to the grading result This results in a more accurate and reliable image grading.

[0112]

[0113] where seg(·) is the segmentation decoder, is the input image I c prediction results.

[0114] The predictions generated by the decoder are combined with the predicted category of the feature pair to calculate the segmentation loss Specifically, p c The predicted category result is directly mapped to p c For each pixel in , the segmentation loss is calculated using the category as the label of each pixel. In this way, the segmentation loss It can be expressed by the following formula:

[0115]

[0116] Where N is the total number of pixels in the image. Represents the true segmentation map of the input image. The expression of cross entropy loss is:

[0117]

[0118] y i is the true category label of the th pixel, is the category label predicted by the decoder. By calculating the segmentation loss, the predicted classification result Y of the image is obtained. p , which reflects the classification result of the entire image or target area. This process makes full use of the effect of multi-level feature fusion, enabling the model to accurately segment and classify complex regional structures.

[0119] After clustering, the model obtains black area A b and White Area A w To assess the severity of the lesion, the model calculates the relative area ratio of the two regions and uses it as a key indicator to quantify the extent of the lesion. Specifically, the area ratio R is calculated as follows:

[0120]

[0121] Among them, A w Represents the area of ​​the white area, A b Represents the area of ​​the black area. Through this formula, the model can obtain the proportion of the white area in the total area, which is used to evaluate the relative size of the lesion area to the surrounding normal tissue. The area ratio R can reflect the relative expansion of the lesion area. A higher R value usually indicates that the lesion may be more serious. Therefore, this indicator plays an important role in the grading process of the model.

[0122] In the final grading decision process, the model will fuse multiple predicted labels. For each spatial position x in a given image I, the model will obtain a predicted label and a corresponding probability. For example, the model predicts that the probability of "complete hypertrophy" is 0.95 and the probability of "moderate hypertrophy" is 0.55; at the same time, the result based on the area ratio calculation also shows that the position is "complete hypertrophy". Therefore, the final grading result needs to be weighted and fused in combination with the predicted probability and area ratio to determine the most appropriate label.

[0123] Specifically, let P l (x) represents the predicted probability of the label at position x, A(x) represents the area ratio, and the final label l(x) can be calculated by the following formula:

[0124]

[0125] This formula calculates the probability P of each label lThe weighted product of A(x) and the area ratio A(x) is calculated, and the label with the largest weighted value is selected as the final classification result of position x. This fusion method effectively combines the classification information based on the predicted probability and the area ratio, making the classification result more accurate and robust.

[0126] In order to ensure the segmentation and classification performance of the model, the model is optimized using a combined loss function. Specifically, the segmentation loss Used to optimize the accuracy of image segmentation, It is the loss of feature pair contrastive learning, which strengthens the feature relationship and feature discrimination of the input image through contrastive learning. We focus on optimizing the features of black and white regions in the contrastive learning module, and improve the model's ability to distinguish by reducing the intra-class distance and increasing the inter-class separation.

[0127] In order to comprehensively optimize the segmentation and classification results, the final total loss function is the weighted sum of these loss terms:

[0128]

[0129] Among them, α, β, and γ are the weight coefficients of each loss term. By adjusting these weights, the model can strike a balance between segmentation accuracy, classification accuracy, and the effectiveness of feature contrast learning. This multi-task loss optimization method improves the performance of the model on different tasks, making the segmentation and classification results more reliable.

[0130] Example 3

[0131] The difference between this embodiment and embodiment 1 is that: in order to further demonstrate the beneficial effects of the present invention, this embodiment conducts a test experiment, which specifically includes the following steps:

[0132] (1) Constructing a test set

[0133] A high-quality test set was constructed. First, representative image samples were selected from the database of the Department of Otolaryngology of Zhuzhou People's Hospital. The samples covered different degrees of lesion types (such as normal, mild, moderate, and severe hypertrophy), and the image size was adjusted to 224 × 224. Then, Labelme software was used to accurately annotate each image in the test set, and the lesion area and nasal passage area were manually divided.

[0134] (2) Test model.

[0135] The samples to be tested in the test set are input into the model in batches of 64 to obtain preliminary segmentation and classification results. The evaluation indicators include mean intersection over union (mIoU), precision, recall, Dice coefficient, and mean average precision (mAP). The calculation methods of the first four indicators are as follows:

[0136]

[0137] TP, FP, TN, and FN represent the number of correctly identified positive samples (True Positives), the number of falsely identified positive samples (False Positives), the number of correctly identified negative samples (True Negatives), and the number of falsely identified negative samples (False Negatives), respectively.

[0138] Simulation experiment results:

[0139] In this experiment, the loss and performance indicators on the training and validation sets were monitored, and the results are shown in the attached Figure 2 Shown:

[0140] It can be observed from the figure that during the training process, box loss, segmentation loss, classification loss and DFL loss gradually decrease with the increase of iteration number, and tend to converge when approaching 100 iterations, which indicates that the model gradually learns more accurate features in target detection and segmentation tasks. At the same time, on the validation set, these loss values ​​also show a downward trend, indicating that the model has good generalization ability.

[0141] In terms of performance indicators, precision, recall, and mean average precision (mAP) all improved significantly during the training process. In particular, mAP@50 and mAP@50-95 reached high values ​​at nearly 100 iterations, indicating that the model is accurate and robust in segmentation and detection tasks.

[0142] Attached Figure 3 The F1-Confidence curve is shown in Figure 2, which shows how the F1 value of different categories (normal, fairly, nasal, almost, slightly) changes with confidence, as well as the overall performance of all categories.

[0143] It can be observed that the F1 values ​​of each category rise rapidly at a lower confidence level, stabilize after approaching the peak, and decrease at a high confidence level. Among them, the F1 values ​​of the fairly and normal categories show high stability in most confidence ranges. Overall, the combined F1 value of all categories reaches a maximum value of 0.89 at a confidence level of 0.517, showing the best performance of the model at this confidence level. This result shows that the model can better balance precision and recall at a certain confidence threshold, thereby achieving higher detection and segmentation effects.

[0144] Therefore, it can be seen from the results that the model can accurately segment the adenoids and nasopharyngeal cavity, and can accurately grade the different degrees of adenoids hypertrophy.

[0145] Attached Figure 4 as well as Figure 5 The comparison between the real segmentation and the model-predicted segmentation, as well as the comparison between the single-target classification and the dual-target classification are shown, and the characteristic areas that the model focuses on are intuitively presented through the heat map. As can be seen from the figure, the model of the present invention can not only achieve accurate segmentation effects, but also generate accurate classification results, providing reliable support for lesion analysis.

[0146] The figure below shows the comparison between the real segmentation and the model-predicted segmentation, as well as the comparison between the single-target classification and the dual-target classification. At the same time, the heat map intuitively presents the feature areas that the model focuses on. As can be seen from the figure, the model of the present invention can not only achieve accurate segmentation effects, but also generate accurate classification results, providing reliable support for lesion analysis.

[0147] Obviously, the above embodiments are merely examples for clearly illustrating the technical solutions of the present invention, and are not intended to limit the implementation methods of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all implementation methods here. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A method for classifying the degree of adenoid hypertrophy, characterized in that: The following steps are involved: S1: Collect adenoids and nasopharyngeal cavity to take complete nasal endoscopic images, pre-process the images, and obtain the image with mask image mask ; S2: image mask The division generates two complementary white areas and black areas, and extracts features from the two area images to finally obtain the segmentation feature output F out ; S3: Output F for segmentation features out Conduct comparative learning and predict the results after learning to obtain the predicted classification result Y p ; S4: Get black and white double zone A w and A b The relative area ratio R of p And R adopts a weighted method to assign corresponding weights to obtain accurate classification results.

2. A method for classifying the degree of adenoid hypertrophy according to claim 1, characterized in that: In step S1, the preprocessing includes classifying and labeling adenoids and nasopharyngeal cavities with different degrees of hypertrophy, and then inputting the image image into the segmentation model for preliminary segmentation, thereby obtaining an image image with a mask. mask .

3. A method for classifying the degree of adenoids hypertrophy according to claim 1, characterized in that: The step S2 comprises the following steps: S21: Perform a gridding operation on the original image image, dividing the image into a plurality of grid images, denoted as I = {p1, p2, ..., p n }, then set the input image size I to 3×H×W; then according to image mask Divide the image into white areas and black area S22: for the i-th grid image in the black and white area respectively and Perform feature extraction operations to generate corresponding feature representations and S23: and With the help of fusion operation F w and F b Fusion is performed to enhance information complementarity and then construct the final segmentation feature output F out .

4. A method for classifying the degree of adenoid hypertrophy according to claim 3, characterized in that: In step S22, the lesion area I w and non-lesion area I b Divide into multiple small blocks and And apply the feature extraction function f(·) to process each block to obtain the corresponding feature vector: Calculate the cross entropy between the white area and the black area First, P c (x) is defined as the probability of finding the class in block x; using these probabilities, we can quantitatively measure the contribution of each region to the image information: c is the category, and finally, by comparing and Analyze the difference in information contribution between white and black areas.

5. A method for classifying the degree of adenoid hypertrophy according to claim 4, characterized in that: In step S23, F out The calculation formula is: F out =α·F w +(1-a)·f b Where α∈[0, 1] is the fusion weight, which is used to control the contribution ratio of white and black region features.

6. A method for classifying the degree of adenoid hypertrophy according to claim 1, characterized in that: The step S5 comprises: S31: Calculate contrast loss through contrast learning; S32: Fuse the multi-level feature blocks to integrate information at different levels, and use the fused features for prediction through the decoder.

7. A method for classifying the degree of adenoid hypertrophy according to claim 6, characterized in that: In the step S31, where cos(·) represents the cosine similarity function, τ is a hyperparameter, and g(·) is a shallow fully connected network; the set ∧ - It consists of embeddings of feature pairs that are different from the input image; The distance between each patch pair is calculated using the cosine similarity of the refined feature pair embeddings, and then a contrastive learning method is applied to calculate the contrastive loss to amplify the differences between feature pairs; cosine similarity is used to measure the distance between patch embeddings: And normalize the value range between 0 and 1: F out Used as input to the feature pair contrastive learning module; produces feature map P w (white area) and P b (black area); predicted score and the threshold ∈ determine the confidence of the classification: , it is classified as a high confidence category when , it is classified as low confidence Feature extraction is applied to N blocks in each region, and the similarity and distance between classes are further calculated; capturing P w and P b The complementary relationship between The technical formula for the black-white paired comparison learning error is: in, and Represent the logarithm of high confidence and low confidence respectively; F high and F low Represent high confidence pairs and Feature embedding for low confidence pairs.

8. A method for classifying the degree of adenoid hypertrophy according to claim 6, characterized in that: The step S32 includes: firstly fusing the multi-level feature blocks to integrate the information at different levels; mapping the category distribution generated by the decoder to the classification result: where seg(·) is the segmentation decoder, is the input image I c The prediction results; The predictions generated by the decoder are combined with the predicted categories of the feature pairs to calculate the segmentation loss. N is the total number of pixels in the image, Represents the input image I c The real segmentation map; The calculation formula for cross entropy loss is: y i is the true category label of the th pixel, is the category label predicted by the decoder. By calculating the segmentation loss, the predicted classification result Y of the image is obtained. p .

9. A method for classifying the degree of adenoid hypertrophy according to claim 1, characterized in that: In the step S4, The calculation formula of area ratio R is: A w Represents the area of ​​the white area, A b Represents the area of ​​the black area.

10. A method for classifying the degree of adenoid hypertrophy according to claim 1, characterized in that: In step S4, let P l (x) represents the predicted probability of label l at position x, A(x) represents the area ratio, and the calculation formula of the final label l(x) is: Using segmentation loss Used to optimize the accuracy of image segmentation, It is the loss of feature pair contrastive learning, which strengthens the feature relationship and feature discrimination of the input image through contrastive learning. We focus on optimizing the features of black and white regions in the contrastive learning module, and improve the model's ability to distinguish by reducing the intra-class distance and increasing the inter-class separation. The final total loss function is the weighted sum of these loss terms. The calculation formula for the total damage function is: α, β, γ are the weight coefficients of each loss term.

Citation Information

Patent Citations

  • Head-side sheet adenoid image automatic evaluation method and device based on deep learning

    CN113688942A

  • Adenoid identification method and device based on nasopharyngeal endoscope imaging

    CN118038442A

Cited By

  • Image recognition method and system for adenoid hypertrophy based on visual nasal endoscope

    CN120689906A