A diabetic foot ulcer wound classification system, training method and classification method

CN122929264APending Publication Date: 2026-10-16HUAZHONG UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611027402.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]针对现有技术的以上缺陷或改进需求,本发明提供一种糖尿病足溃疡创面分级系统、训练方法及分级方法,用于解决现有技术无法准确进行糖尿病足溃疡创面分级的技术问题

Benefits of technology

1、本发明提供了一种糖尿病足溃疡创面分级系统,考虑到糖尿病足溃疡创面在位置、形态、大小以及周边皮肤状态下的差异表现出在同一级别内的差异小、在不同级别间的相似度高,通过全局分支提取糖尿病全足图像的全局特征图,以编码整体伤口上下文,从而捕捉糖尿病全足的整体情况;通过局部分支聚焦于糖尿病全足图像中病灶区域,执行注意力引导的病灶放大,提取得到病灶区域所对应的局部特征图,以捕获精细的病理细节;通过区域分支采用多尺度的滑动窗口在不同感受野上提取糖尿病全足图像中病灶区域的对病变相关特征高度敏感的候选区域,以自适应挖掘探索多个判别性子区域,实现对异质性伤口模式进行建模,得到区域特征图;对全局特征图、局部特征图和区域特征图进行融合,得到融合特征图;融合特征图包含了糖尿病全足图像中不同维度的溃疡创面特征,且由于全局分支、局部分支与区域分支形成由粗到细、层层聚焦且相互补充的层级化特征表征,针对性地应对了糖尿病足溃疡创面类内差异小、类间相似度高的难点,使融合特征图既能反映整体伤口上下文,又能保留区分相邻等级所需的细粒度病理线索,能够准确地感知各级间更细粒度的差异,进而实现对糖尿病足溃疡创面的准确分级。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122929264A_ABST
    Figure CN122929264A_ABST
Patent Text Reader

Abstract

The application discloses a diabetic foot ulcer wound grading system, a training method and a grading method, and belongs to the technical field of wound grading. The system extracts a global feature map of a diabetic whole foot image through a global branch to encode the overall wound context; focuses on a lesion area and performs attention-guided lesion magnification through a local branch to extract a local feature map to capture fine pathological details; adopts a multi-scale sliding window on different receptive fields through a regional branch to mine multiple discriminative sub-regions highly sensitive to lesion-related features, model heterogeneous wound patterns, and obtain a regional feature map; and then fuses the global feature map, the local feature map and the regional feature map to obtain a fused feature map and grade according to the fused feature map. The application can accurately perceive the more fine-grained differences between different levels and realize accurate grading of diabetic foot ulcer wounds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of wound grading technology, and more specifically, relates to a grading system, training method and grading method for diabetic foot ulcer wounds. Background Technology

[0002] With an aging population and changing lifestyles, the incidence of diabetes, a chronic metabolic disease characterized by hyperglycemia, continues to rise, and its long-term development can lead to various serious complications. Diabetic foot ulcers are among the most disabling and fatal types. These ulcers typically present as open lesions on the foot, caused by a combination of long-term hyperglycemia, peripheral neuropathy, and peripheral arterial disease. If assessment and intervention are not timely, they can easily progress to infection, osteomyelitis, or even lower limb amputation, placing a significant burden on patients' quality of life and the healthcare system. Therefore, accurate and timely severity classification of diabetic foot ulcers is crucial for developing appropriate treatment plans and assessing prognosis.

[0003] The Wagner classification system is widely used in clinical practice. Based on factors such as ulcer depth, extent of tissue involvement, and the presence of infection or gangrene, it classifies lesions into several sequential grades, providing a basis for clinical decision-making. However, in practice, this classification process relies heavily on the physician's experience, which is not only inefficient but also highly subjective and easily influenced by observer differences. Furthermore, diabetic foot ulcers exhibit significant intra-class and inter-class similarities in appearance, increasing the difficulty of classification, especially in primary healthcare settings, which can easily lead to misdiagnosis or inconsistent classification, thus delaying treatment.

[0004] With the development of artificial intelligence technology, deep learning-based medical image analysis methods are increasingly being applied to diabetic foot assessment tasks. Existing methods mostly employ general neural network architectures such as convolutional neural networks or Transformer architectures to automatically extract features from wound images and model the task as a binary or multi-class classification problem for identifying ulcers, infections, ischemia, etc. While these methods improve automation to some extent, the grading of diabetic foot ulcer wounds is essentially a classification problem with sequential relationships. Differences in location, shape, size, and surrounding skin condition of ulcer wounds exhibit small differences within the same level and high similarity between different levels. Because the aforementioned general neural network architectures often only extract global representation features and cannot perceive finer-grained differences between levels, accurate grading of diabetic foot ulcer wounds cannot be achieved. Summary of the Invention

[0005] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a diabetic foot ulcer wound grading system, training method and grading method to solve the technical problem that the existing technology cannot accurately grade diabetic foot ulcer wounds.

[0006] To achieve the above objectives, in a first aspect, the present invention provides a grading system for diabetic foot ulcer wounds, comprising: The global branch includes: the first feature extraction module, which is used to extract features from the diabetic full-foot image F to be graded, and obtain the feature map. The first attention mechanism module is used to process the feature map. Attention enhancement is performed to obtain a global feature map; The local branch includes: a second feature extraction module, used to extract features from the lesion image T corresponding to the whole foot image F, to obtain a feature map. The second attention mechanism module is used to process the feature map. Attention enhancement was performed to obtain local feature maps; the lesion image T is the ulcer lesion area extracted from the whole foot image F; The region branch includes: a region extraction module, which performs sliding operations on the local feature map using sliding windows at multiple scales and calculates the confidence score of the sliding window at each window position; for each scale, the NMS algorithm is used to select the K window positions with the highest confidence scores as candidate regions; and the target region image corresponding to each candidate region is extracted from the lesion image T. The third feature extraction module is used to extract features from each target region image R to obtain the corresponding feature map. The third attention mechanism module is used to process each feature map. Attention enhancement is performed to obtain the corresponding region enhancement feature map; the first fusion module is used to fuse the region enhancement feature maps to obtain the region feature map; The second fusion module is used to fuse the global feature map, local feature map and region feature map to obtain a fused feature map; The classification module is used to classify the whole foot image F based on the fused feature map.

[0007] More preferably, the lesion image T' corresponding to any full foot image F' is obtained by the following method: determining the positions of pixels in the global feature map of the full foot image F' that are greater than a preset threshold as belonging to the ulcer lesion area, thereby determining the ulcer lesion area in the full foot image F', and extracting it from the full foot image F' to obtain the corresponding lesion image T'.

[0008] More preferably, the m-th feature extraction module includes: The m-th multi-scale feature extraction unit is used to extract multi-scale feature maps of the input image; The m-th multi-scale feature fusion unit is used to fuse multi-scale feature maps to obtain the feature map. ; The aforementioned m-th attention mechanism module is the channel-space attention module; m can be one, two, or three; when m is one, the above feature map For feature map When m is two, the above feature map For feature map When m is three, the above feature map For feature map .

[0009] More preferably, the second fusion module is used to transform the global feature map, local feature map and regional feature map to the same feature dimension using a projection head, and then sum the transformed local feature map and regional feature map pixel by pixel, and then stitch them together with the global feature map in the channel dimension to obtain a fused feature map.

[0010] Secondly, the present invention provides a training method for a diabetic foot ulcer wound grading system; wherein, the grading system is the diabetic foot ulcer wound grading system provided in the first aspect of the present invention; during the training phase, the global branch of the grading system further includes: a first projection head and a first classifier connected after the first attention mechanism module; the local branch of the grading system further includes: a second projection head and a second classifier connected after the second attention mechanism module; the regional branch of the grading system further includes: a third projection head and a third classifier connected after the third attention mechanism module; the first projection head, the second projection head, and the third projection head respectively transform the corresponding input feature maps to the same feature dimension; the classifier is used to obtain the probability that the corresponding training sample belongs to different Wagner grades based on the input feature maps, thereby obtaining the corresponding grading results; The above training methods include: Obtain the training set; the training samples in the training set are diabetic full-foot images carrying Wagner classification labels. For each training sample S: input the training sample S into the global branch to obtain the probability that the training sample S corresponding to the global branch belongs to different Wagner classifications, and thus obtain the first classification result; input the lesion image corresponding to the training sample S. The input is fed into the local branch to obtain the probability that the training sample S corresponding to the local branch belongs to different Wagner classifications, thus obtaining the second classification result; the lesion image is then processed. and local feature maps The input is fed into the region branch to obtain the probability that the training sample S corresponding to the region branch belongs to different Wagner classifications, thus obtaining the third classification result; lesion image The ulcer lesion area is extracted from the training sample S; Construct training objectives; training objectives include: the first objective; the first objective is to minimize the total classification loss; the total classification loss is the sum of the classification losses of each training sample in the training set; the classification loss is the sum of the difference losses between the first classification result, the second classification result, and the third classification result of the training sample S and their corresponding Wagner classification labels; Based on the training objectives, global branches, local branches, and region branches are trained.

[0011] More preferably, the training objective further includes: a second objective; the second objective is to minimize the similarity of the fused feature maps between pairwise training samples with different labels, and to maximize the similarity of the fused feature maps between pairwise training samples with the same label; The fusion feature map of training sample S is obtained by using the global feature map of training sample S. Local feature map and regional feature map The global feature map is obtained by fusing through the second fusion module of the hierarchical system. The feature map is obtained by passing through the first attention mechanism module in the global branch when the training sample S is input into the global branch; local feature map. To obtain the lesion image corresponding to the training sample S Feature maps obtained by the second attention mechanism module in the global branch when input into the local branch; region feature maps To obtain lesion images and local feature maps The feature map obtained by the first fusion module when input into the regional branch of the hierarchical system; While training the global branch, local branch, and region branch, the second fusion module is also trained.

[0012] More preferably, the loss function for the second objective is:

[0013] in, This represents minimization; N is the number of training samples in the training set. For training set; For training set and training samples A set of training samples with different Wagner classification labels; For training samples and training samples The weight values ​​between them and the training samples and training samples The absolute values ​​of the differences between the Wagner classification labels are negatively correlated; For training samples With training samples Similarity of fused feature maps between them; For training set and training samples The set of training samples that have the same Wagner classification label.

[0014] More preferably, the loss function for the first objective is:

[0015]

[0016]

[0017]

[0018] in, Indicates minimization; For training set; The total number of levels for Wagner's classification; , , All are preset weight values; For training samples Wagner rating labels; when hour, =1; when hour, =0; Training samples corresponding to the global branch belong The probability of Wagner classification; Training samples corresponding to local branches belong The probability of Wagner classification; Training samples corresponding to the region branches belong The probability of a Wagner classification.

[0019] Thirdly, the present invention provides a method for grading diabetic foot ulcer wounds, including: Feature extraction is performed on the diabetic full-foot image F to be graded to obtain the feature map. ; for feature maps Attention enhancement is performed to obtain a global feature map; Feature extraction is performed on the lesion image T to obtain the feature map. ; for feature maps Attention enhancement was performed to obtain local feature maps; the lesion image T is the ulcer lesion area extracted from the whole foot image F; Multi-scale sliding windows are used to slide the local feature map, and the confidence score at each window position is calculated. For each scale, the NMS algorithm is used to select the K window positions with the highest confidence scores as candidate regions. The target region image corresponding to each candidate region is extracted from the lesion image T. Feature extraction is performed on each target region image R to obtain the corresponding feature map. For each feature map Attention enhancement is performed to obtain the corresponding region enhancement feature map; the region enhancement feature maps are then fused to obtain the region feature map. The global feature map, local feature map, and region feature map are fused to obtain a fused feature map. The full-foot image F is classified based on the fused feature map.

[0020] Fourthly, the present invention provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device containing the storage medium to perform the training method provided in the second aspect or the grading method provided in the third aspect of the present invention.

[0021] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the training method provided in the second aspect or the grading method provided in the third aspect of the present invention.

[0022] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects: 1. This invention provides a grading system for diabetic foot ulcer wounds. Considering that diabetic foot ulcer wounds exhibit small differences in location, shape, size, and surrounding skin condition within the same grade and high similarity between different grades, the system extracts global feature maps from the whole diabetic foot image through global branching to encode the overall wound context, thereby capturing the overall condition of the whole diabetic foot. Local branching focuses on the lesion area in the whole diabetic foot image, performing attention-guided lesion magnification to extract the corresponding local feature maps, capturing fine pathological details. Regional branching uses multi-scale sliding windows across different receptive fields to extract candidate regions in the whole diabetic foot image that are highly sensitive to lesion-related features. Adaptive mining is used to explore multiple discriminative sub-regions to model heterogeneous wound patterns and obtain regional feature maps. The global feature map, local feature map, and regional feature map are fused to obtain a fused feature map. The fused feature map contains ulcer wound features of different dimensions in diabetic foot images. Because the global branch, local branch, and regional branch form a hierarchical feature representation that is coarse to fine, focused, and complementary, it specifically addresses the difficulty of small intraclass differences and high interclass similarity in diabetic foot ulcer wounds. This allows the fused feature map to reflect the overall wound context while retaining the fine-grained pathological clues needed to distinguish adjacent grades. It can accurately perceive finer-grained differences between grades, thereby achieving accurate grading of diabetic foot ulcer wounds.

[0023] 2. Furthermore, due to the high cost of annotation, most datasets only provide image-level labels and lack accurate lesion area annotations. In the diabetic foot ulcer grading system provided by this invention, the lesion image T' corresponding to any full foot image F' is determined based on the global feature map of the full foot image F'. It can have lesion localization capabilities without relying on lesion area annotations, and the annotation cost is low.

[0024] 3. Further, in the diabetic foot ulcer grading system provided by this invention, the m-th feature extraction module includes an m-th multi-scale feature extraction unit and an m-th multi-scale feature fusion unit; the m-th attention mechanism module is a channel spatial attention module. Through the above design, on the one hand, the m-th multi-scale feature extraction unit can simultaneously acquire fine-grained local information such as shallow texture, edges, and color, as well as deep semantic and contextual information. The m-th multi-scale feature fusion unit further integrates multi-scale features under different receptive fields, alleviating mismatches between features of different resolutions, thereby obtaining a feature map that combines semantic expression and detail depiction capabilities. On the other hand, the channel spatial attention module highlights more discriminative feature channels in the channel dimension and focuses on the ulcer area in the spatial dimension while suppressing irrelevant backgrounds, thus enhancing the response to the lesion area even under image-level supervision only. The two work together to enable the extracted feature map to represent the overall wound context while retaining fine-grained pathological clues, thereby improving the grading system's ability to discriminate subtle differences between adjacent grades and its grading accuracy.

[0025] 4. This invention provides a training method for a grading system for diabetic foot ulcer wounds. The training objective includes a first objective of minimizing the sum of classification losses of all training samples in the training set. The classification loss is the sum of the difference losses between the first, second, and third grading results of the training sample S obtained based on the global branch, local branch, and regional branch, respectively, and their corresponding Wagner grading labels. This invention focuses on the accuracy of feature representation of the global branch, local branch, and regional branch during training, enabling the grading system to accurately capture global, local, and regional features, thereby further improving the accuracy of the grading system.

[0026] 5. Furthermore, in the training method of the diabetic foot ulcer wound grading system provided by the present invention, the training objective further includes: a second objective of minimizing the similarity of the fusion feature map between two training samples with different labels and maximizing the similarity of the fusion feature map between two training samples with the same label, thereby bringing similar labeled samples closer in the feature space and pushing dissimilar labeled samples further apart in the feature space, which can further improve the grading system's ability to represent features, thereby further improving the accuracy of the grading system.

[0027] 6. Furthermore, in the training method of the diabetic foot ulcer grading system provided by the present invention, the loss function of the second objective carries the weight value w between training sample i and training sample j. ijThe absolute value of the difference between the Wagner grading labels and those of training samples i and j is negatively correlated; that is, the closer the Wagner grading labels of each pair of training samples are, the greater their corresponding weight value. Compared to traditional supervised contrastive learning, which binaryly divides sample pairs into positive and negative pairs based solely on whether the labels are the same, this invention introduces the ordered relationship of Wagner grading into contrastive learning through this weight value: since adjacent grades are inherently similar in pathological manifestations, assigning them higher weights ensures that samples of similar grades remain close together in the feature space, while samples with far-fetched labels contribute less. This constrains the learned feature space to form an ordered topological structure consistent with clinical severity. When misclassification occurs, the predicted result tends to fall on a grade adjacent to the true grade rather than a grade with a large gap, thereby improving the ordered consistency and clinical safety of the grading results.

[0028] 7. Furthermore, in the training method of the diabetic foot ulcer grading system provided by this invention, the loss function of the first objective includes a distance-aware penalty. A larger penalty term is set for Wagner gradings that are significantly different from the Wagner grading label of training sample i. That is, the greater the distance between the predicted Wagner grading and the true Wagner grading label of the training sample, the greater the penalty. Compared to conventional classification losses that treat all misclassifications equally and equate misclassifications of adjacent grades with misclassifications of large differences, the distance-aware penalty of this invention explicitly utilizes the orderliness of Wagner gradings: clinically, the consequences of misclassifying a minor wound as a severe wound, or other large-span misclassifications, are far more serious than misclassifications of adjacent grades. This penalty term can apply stronger gradient correction to large-span misclassifications, guiding the model to output predictions as close to the true grade as possible even when it is difficult to classify completely correctly. This allows the model to learn decision boundaries that conform to the grading order, reducing the risk of serious misclassifications and improving the orderliness, consistency, and accuracy of grading. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of a grading process for diabetic foot ulcers provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the grading system for diabetic foot ulcers provided in an embodiment of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0031] To achieve the above objectives, in a first aspect, the present invention provides a grading system for diabetic foot ulcer wounds, comprising: The global branch includes: the first feature extraction module, which is used to extract features from the diabetic full-foot image F to be graded, and obtain the feature map. The first attention mechanism module is used to process the feature map. Attention enhancement is performed to obtain a global feature map; The local branch includes: a second feature extraction module, used to extract features from the lesion image T corresponding to the whole foot image F, to obtain a feature map. The second attention mechanism module is used to process the feature map. Attention enhancement was performed to obtain local feature maps; the lesion image T is the ulcer lesion area extracted from the whole foot image F; The region branch includes: a region extraction module, which performs sliding operations on the local feature map using sliding windows at multiple scales and calculates the confidence score of the sliding window at each window position; for each scale, the NMS algorithm is used to select the K window positions with the highest confidence scores as candidate regions; and the target region image corresponding to each candidate region is extracted from the lesion image T. The third feature extraction module is used to extract features from each target region image R to obtain the corresponding feature map. The third attention mechanism module is used to process each feature map. Attention enhancement is performed to obtain the corresponding region enhancement feature map; the first fusion module is used to fuse the region enhancement feature maps to obtain the region feature map; The second fusion module is used to fuse the global feature map, local feature map and region feature map to obtain a fused feature map; The classification module is used to classify the whole foot image F based on the fused feature map.

[0032] It should be noted that there are multiple ways to obtain the lesion image T' corresponding to any full foot image F'. It can be the ulcer lesion area that the user has pre-extracted from the full foot image F (such as through interactive extraction, or by determining the full foot area through object detection methods before extraction), or it can be obtained based on the global feature map obtained from the global branch during the grading process. No limitation is made here.

[0033] Considering the high cost of annotation, most datasets only provide image-level labels and lack accurate lesion area annotations. Preferably, in one optional implementation, the lesion image T' corresponding to any full foot image F' is obtained by the following method: determining the positions of pixels with a value greater than a preset threshold in the global feature map of the full foot image F' as belonging to the ulcer lesion area, thereby determining the ulcer lesion area in the full foot image F', and extracting it from the full foot image F' to obtain the corresponding lesion image T'.

[0034] It should be noted that the first fusion module can fuse the enhanced feature maps of each region in various ways, such as weighted summation after making the enhanced feature maps of each region the same size, or geometric mean calculation after adjusting the enhanced feature maps of each region to the same size, etc. No limitation is made here.

[0035] It should be noted that the m-th feature extraction module can be any type of feature extraction module, such as CNN, ViT, YOLO series, etc., without any limitation here; where m can be one, two, or three.

[0036] The first feature extraction module, the second feature extraction module, and the third feature extraction module can be the same or different; no restrictions are imposed here.

[0037] Preferably, in one optional implementation, the m-th feature extraction module includes: The m-th multi-scale feature extraction unit is used to extract multi-scale feature maps of the input image; The m-th multi-scale feature fusion unit is used to fuse multi-scale feature maps to obtain the feature map. ; The aforementioned m-th attention mechanism module is the channel-space attention module; m can be one, two, or three; when m is one, the above feature map For feature map When m is two, the above feature map For feature map When m is three, the above feature map For feature map .

[0038] It should be noted that the m-th multi-scale feature fusion unit can fuse multi-scale feature maps in various ways, such as weighted summation after making the multi-scale feature maps of consistent size, or geometric mean calculation after adjusting the multi-scale feature maps of consistent size, etc., and no limitation is made here. Preferably, in an optional implementation, the m-th multi-scale feature fusion unit makes the multi-scale feature maps of consistent size before performing pixel-by-pixel summation.

[0039] It should be noted that the second fusion module can fuse global feature maps, local feature maps, and regional feature maps in various ways, such as adjusting the three feature maps to the same size and then weighting and summing them, or adjusting the three feature maps to the same size and then calculating the geometric mean, etc. There are no restrictions here.

[0040] Preferably, in one optional implementation, the second fusion module is used to transform the global feature map, local feature map and regional feature map to the same feature dimension using a projection head, and then sum the transformed local feature map and regional feature map pixel by pixel, and then stitch them together with the global feature map in the channel dimension to obtain a fused feature map.

[0041] It should be noted that there are various ways to calculate the confidence score of the sliding window at each window position, such as taking the summation value, maximum value, weighted average value (e.g., weighting the responses at each position within the window according to the attention map and then calculating the statistics), L2 norm or energy value, or the statistics obtained by pooling the features within the window along the spatial dimension and then summing them along the channel dimension, etc., which are not limited here. Preferably, in an optional implementation, the confidence score of the sliding window at any window position is the average value of each pixel within the sliding window when the sliding window is at that window position.

[0042] It should be noted that the training method for the above-mentioned diabetic foot ulcer wound grading system can be the same as conventional training methods, such as end-to-end training.

[0043] Preferably, in a second aspect, the present invention provides a training method for a diabetic foot ulcer wound grading system; wherein, the grading system is the diabetic foot ulcer wound grading system provided in the first aspect of the present invention; during the training phase, the global branch of the grading system further includes: a first projection head and a first classifier connected after the first attention mechanism module; the local branch of the grading system further includes: a second projection head and a second classifier connected after the second attention mechanism module; the regional branch of the grading system further includes: a third projection head and a third classifier connected after the third attention mechanism module; the first projection head, the second projection head, and the third projection head respectively transform the corresponding input feature maps to the same feature dimension; the classifier is used to obtain the probability that the corresponding training sample belongs to different Wagner grades based on the input feature maps, thereby obtaining the corresponding grading results; The above training methods include: Obtain the training set; the training samples in the training set are diabetic full-foot images carrying Wagner classification labels. For each training sample S: input the training sample S into the global branch to obtain the probability that the training sample S corresponding to the global branch belongs to different Wagner classifications, and thus obtain the first classification result; input the lesion image corresponding to the training sample S. The input is fed into the local branch to obtain the probability that the training sample S corresponding to the local branch belongs to different Wagner classifications, thus obtaining the second classification result; the lesion image is then processed. and local feature maps The input is fed into the region branch to obtain the probability that the training sample S corresponding to the region branch belongs to different Wagner classifications, thus obtaining the third classification result; lesion image The ulcer lesion area is extracted from the training sample S; Construct training objectives; training objectives include: the first objective; the first objective is to minimize the total classification loss; the total classification loss is the sum of the classification losses of each training sample in the training set; the classification loss is the sum of the difference losses between the first classification result, the second classification result, and the third classification result of the training sample S and their corresponding Wagner classification labels; Based on the training objectives, global branches, local branches, and region branches are trained.

[0044] The related technical solutions are the same as the grading system for diabetic foot ulcers provided in the first aspect of this invention, and will not be described in detail here.

[0045] It should be noted that the above-mentioned difference loss can be achieved using cross-entropy loss function, mean squared error loss function, mean absolute error loss function, Huber loss function, etc., and no specific method is specified here.

[0046] In one optional implementation, the training objective further includes: a second objective; the second objective is to minimize the similarity of the fused feature maps between pairwise training samples with different labels and to maximize the similarity of the fused feature maps between pairwise training samples with the same label; The fusion feature map of training sample S is obtained by using the global feature map of training sample S. Local feature map and regional feature map The global feature map is obtained by fusing through the second fusion module of the hierarchical system. The feature map is obtained by passing through the first attention mechanism module in the global branch when the training sample S is input into the global branch; local feature map. To obtain the lesion image corresponding to the training sample S Feature maps obtained by the second attention mechanism module in the global branch when input into the local branch; region feature maps To obtain lesion images and local feature maps The feature map obtained by the first fusion module when input into the regional branch of the hierarchical system; While training the global branch, local branch, and region branch, the second fusion module is also trained.

[0047] Preferably, in one optional implementation, the loss function for the second objective is:

[0048] in, This represents minimization; N is the number of training samples in the training set. For training set; For training set and training samples A set of training samples with different Wagner classification labels; For training samples and training samples The weight values ​​between them and the training samples and training samples The absolute value of the difference between the Wagner grading labels is negatively correlated (it decreases monotonically as the absolute value of the difference between the Wagner labels increases). For training samples With training samples Similarity of fused feature maps between them; For training set and training samples The set of training samples that have the same Wagner classification label.

[0049] It should be noted that the above similarity can be measured using cosine similarity, Euclidean distance, inner product, etc., and no specific method is specified here.

[0050] Preferably, in one optional implementation, the loss function of the first objective is:

[0051]

[0052]

[0053]

[0054] in, Indicates minimization; For training set; The total number of levels for Wagner's classification; , , All are preset weight values; For training samples Wagner rating labels; when hour, =1; when hour, =0; Training samples corresponding to the global branch belong The probability of Wagner classification; Training samples corresponding to local branches belong The probability of Wagner classification; Training samples corresponding to the region branches belong The probability of a Wagner classification.

[0055] To further illustrate the diabetic foot ulcer grading system and corresponding training method provided by this invention, detailed descriptions are provided below with reference to specific embodiments: The grading process for diabetic foot ulcers in this embodiment is as follows: Figure 1 As shown, it specifically includes: Data Acquisition: Multiple clinical datasets in the field of diabetic foot ulcers were collected to construct a large wound database covering a variety of challenging wound conditions. All images were taken by clinicians using professional cameras or smartphones, then manually cropped to retain regions of interest, and detailed annotations were completed by the physicians. Specifically, approximately 1500 clinical images of diabetic foot ulcers were collected for system training and testing, with data sources including self-built clinical data and publicly available datasets. All images were acquired using professional equipment or smartphones.

[0056] Data preprocessing: The acquired images were preprocessed, and the size of diabetic foot images from different datasets was unified and normalized. Data augmentation operations were then performed, including random cropping, rotation, and color perturbation, to improve model robustness. Specifically, all images were manually cropped to extract regions of interest, and the resolution was uniformly adjusted to 256×256. Some blurry images were removed, and then professional clinicians annotated the wound areas. Data augmentation included dynamic multi-scale cropping (center / random cropping), random horizontal and vertical flipping (p=0.5), affine transformation (rotation ±45°, scaling ±10%), photometric adjustments (brightness, contrast, CLAHE), and occlusion using Coarse Dropout. The Adam backpropagation algorithm (learning rate) was used. ), to optimize the model parameters.

[0057] Data partitioning: The preprocessed data is partitioned. Data from the same patient is grouped into a subset based on the number of cases, and then further split into training and test sets according to a certain ratio. Specifically, data from the same patient is grouped into a subset based on the number of cases, and then the data is divided into training and test sets according to a certain ratio. Partitioning between cases involves partitioning the data based on the different cases. If the total number of cases is... Then according to proportion Random selection The data from one case was used as the training set, and the remaining data... The data from all training set cases are used as the test set. Data from all test set cases are combined for model optimization, and data from all test set cases are used for model evaluation.

[0058] Diabetic foot ulcer grading system: The progressive lesion-focusing diabetic foot ulcer grading system proposed in this embodiment is a neural network model built using the PyTorch deep learning framework. The model takes a color RGB wound image as input and outputs the corresponding Wagner grade of the wound. The model structure is as follows... Figure 2 As shown, it mainly consists of three key components: a weakly supervised lesion localization module, progressive feature modeling, and a sequentially constrained hierarchical loss function.

[0059] Specifically, firstly, multi-scale feature representations are extracted from the input diabetic foot ulcer image. In this embodiment, feature maps at three scales are extracted. It generates attention maps that highlight clinically relevant wound areas using only image-level supervision.

[0060]

[0061]

[0062]

[0063] Guided by these attentional cues, the progressive feature modeling strategy gradually refines its focus: the global branch encodes the overall wound context; the local branch performs attention-guided lesion magnification to capture fine pathological details; and the regional branch further explores multiple discriminative sub-regions through adaptive mining to model heterogeneous wound patterns.

[0064]

[0065]

[0066] For the discriminative sub-region extraction module in the region branch, a set of predefined window shapes is first applied, each corresponding to a specific scale (aspect ratio). For each window configuration, dense average pooling is performed on the feature map to obtain window-level features. Each sliding window... The significance score (i.e., confidence score) at the corresponding window position n. The sum of all channel pooling activation values:

[0067] Where C is the number of channels; This indicates a dense average pooling operation; This represents the k-th predefined sliding window configuration; The variable represents the spatial location of the sliding window; F is the feature map of the input region extraction module, i.e., the high-level local feature map obtained by feature extraction from the lesion image. This process generates dense window scores across multiple scales, which can then be used to identify candidate regions that are highly sensitive to lesion-related features.

[0068] Each pooling window (i.e., a sliding window) corresponds to a specific receptive field on the original image. For each window index, its corresponding spatial coordinates on the input image are reconstructed based on the window size, stride, and feature map resolution. To remove redundant and overlapping candidate regions, non-maximum suppression (NMS) is applied independently at each scale. The window scale is divided into multiple scale groups, and a fixed number of candidate regions are selected from each group. Within each group, windows are sorted by score, and the highest-scoring window is iteratively selected while suppressing overlapping windows with an intersection-union ratio (IUU) exceeding a threshold.

[0069] The order-constrained hierarchical loss function jointly optimizes the network through an ordinal classification loss with distance-aware penalty and an ordinal-aware contrastive learning objective, thereby achieving consistent severity predictions and structured feature alignment. The final total loss function is:

[0070]

[0071]

[0072]

[0073]

[0074] in, Indicates minimization; For training set; The total number of levels for Wagner's classification; , , All are preset weight values; For training samples Wagner rating labels; when hour, =1; when hour, =0; Training samples corresponding to the global branch belong The probability of Wagner classification; Training samples corresponding to local branches belong The probability of Wagner classification; Training samples corresponding to the region branches belong The probability of a Wagner classification. N is the number of training samples in the training set; For training set; For training set and training samples A set of training samples with different Wagner classification labels; For training samples and training samples The weight values ​​between them and the training samples and training samples The absolute values ​​of the differences between the Wagner classification labels are negatively correlated; For training samples With training samples Similarity of fused feature maps between them; For training set and training samples The set of training samples that have the same Wagner classification label.

[0075] In practice, the training cycle is 300 epochs, the batch size is 12, and the initial learning rate is 1×10⁻⁶. -4 The learning rate is scheduled using a cosine annealing algorithm.

[0076] The following metrics are used to evaluate the relationship between predicted and actual values:

[0077]

[0078]

[0079]

[0080] Where N is the number of samples, and TP, FP, and FN represent the number of pixels that are true positives, false positives, and false negatives, respectively.

[0081] The double-weighted Kappa coefficient takes into account the sequential structure of the data. It is the observation confusion matrix. This represents the number of samples where the predicted value matches the actual value. Let... Given the expected value matrix assuming independent distributions, the weighting matrix is ​​as follows:

[0082] The double-weighted Kappa coefficient is defined as follows:

[0083] To verify the performance of the progressive lesion-focusing diabetic foot ulcer grading system provided in this invention, further experimental evaluation was conducted on the aforementioned Wagner grading dataset. The specific results are shown in the table below. As shown in Table 1, compared with the state-of-the-art algorithms, the diabetic foot ulcer grading system proposed in this invention achieves the best performance.

[0084] Table 1

[0085] In summary, this invention provides a grading system for diabetic foot ulcer wounds, which can assist doctors in more accurately assessing the severity of diabetic foot ulcer wounds. It is beneficial for long-term treatment and care of diabetic foot wounds, and is especially suitable for resource-scarce primary healthcare and home care scenarios to meet clinical requirements.

[0086] This embodiment provides a grading system for diabetic foot ulcers that can balance lesion localization capability and sequential relationship modeling under limited annotation conditions, thereby improving the accuracy, consistency and clinical interpretability of grading, and thus providing reliable support for intelligent planning-assisted diagnosis and treatment.

[0087] Thirdly, the present invention provides a method for grading diabetic foot ulcer wounds, including: Feature extraction is performed on the diabetic full-foot image F to be graded to obtain the feature map. ; for feature maps Attention enhancement is performed to obtain a global feature map; Feature extraction is performed on the lesion image T to obtain the feature map. ; for feature maps Attention enhancement was performed to obtain local feature maps; the lesion image T is the ulcer lesion area extracted from the whole foot image F; Multi-scale sliding windows are used to slide the local feature map, and the confidence score at each window position is calculated. For each scale, the NMS algorithm is used to select the K window positions with the highest confidence scores as candidate regions. The target region image corresponding to each candidate region is extracted from the lesion image T. Feature extraction is performed on each target region image R to obtain the corresponding feature map. For each feature map Attention enhancement is performed to obtain the corresponding region enhancement feature map; the region enhancement feature maps are then fused to obtain the region feature map. The global feature map, local feature map, and region feature map are fused to obtain a fused feature map. The full-foot image F is classified based on the fused feature map.

[0088] The related technical solutions are the same as the grading system for diabetic foot ulcers provided in the first aspect of this invention, and will not be described in detail here.

[0089] Preferably, in an optional implementation, the lesion image T' corresponding to any full foot image F' is obtained by the following method: determining the positions of pixels in the global feature map of the full foot image F' that are greater than a preset threshold as belonging to the ulcer lesion area, thereby determining the ulcer lesion area in the full foot image F', and extracting it from the full foot image F' to obtain the corresponding lesion image T'.

[0090] Fourthly, the present invention provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device containing the storage medium to perform the training method provided in the second aspect or the grading method provided in the third aspect of the present invention.

[0091] The related technical solutions are the same as the training method provided in the second aspect and the grading method provided in the third aspect of this invention, and will not be described in detail here.

[0092] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the training method provided in the second aspect or the grading method provided in the third aspect of the present invention.

[0093] The related technical solutions are the same as the training method provided in the second aspect and the grading method provided in the third aspect of this invention, and will not be described in detail here.

[0094] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A grading system for diabetic foot ulcer wounds, characterized in that, include: The global branch includes: the first feature extraction module, which is used to extract features from the diabetic full-foot image F to be graded, and obtain the feature map. The first attention mechanism module is used to process the feature map. Attention enhancement is performed to obtain a global feature map; The local branch includes: a second feature extraction module, used to extract features from the lesion image T corresponding to the whole foot image F, to obtain a feature map. The second attention mechanism module is used to process the feature map. Attention enhancement is performed to obtain local feature maps; the lesion image T is the ulcer lesion area extracted from the whole foot image F; The region branch includes: a region extraction module, which performs sliding operations on the local feature map using sliding windows at multiple scales and calculates the confidence score of the sliding window at each window position; for each scale, the NMS algorithm is used to select the K window positions with the highest confidence scores as candidate regions; and the target region image corresponding to each candidate region is extracted from the lesion image T. The third feature extraction module is used to extract features from each target region image R to obtain the corresponding feature map. The third attention mechanism module is used to process each feature map. Attention enhancement is performed to obtain the corresponding region enhancement feature map; the first fusion module is used to fuse the region enhancement feature maps to obtain the region feature map; The second fusion module is used to fuse the global feature map, the local feature map, and the region feature map to obtain a fused feature map; A classification module is used to classify the whole foot image F based on the fused feature map.

2. The grading system for diabetic foot ulcers according to claim 1, characterized in that, The lesion image T' corresponding to any full foot image F' is obtained in the following way: the positions of pixels in the global feature map of the full foot image F' that are greater than a preset threshold are determined to belong to the ulcer lesion area, and then the ulcer lesion area in the full foot image F' is determined and extracted from the full foot image F' to obtain the corresponding lesion image T'.

3. The grading system for diabetic foot ulcers according to claim 1 or 2, characterized in that, The m-th feature extraction module includes: The m-th multi-scale feature extraction unit is used to extract multi-scale feature maps of the input image; The m-th multi-scale feature fusion unit is used to fuse multi-scale feature maps to obtain the feature map. ; The m-th attention mechanism module is the channel space attention module; m can be one, two, or three; when m is one, the feature map For feature map When m is two, the feature map For feature map When m is three, the feature map For feature map .

4. The grading system for diabetic foot ulcers according to claim 1 or 2, characterized in that, The second fusion module is used to transform the global feature map, local feature map and regional feature map to the same feature dimension using a projection head, and then sum the transformed local feature map and regional feature map pixel by pixel, and then stitch them together with the global feature map in the channel dimension to obtain a fused feature map.

5. A training method for a grading system for diabetic foot ulcer wounds, characterized in that, The grading system is the grading system for diabetic foot ulcer wounds as described in any one of claims 1-4; during the training phase, the global branch of the grading system further includes: a first projection head and a first classifier connected after the first attention mechanism module; the local branch of the grading system further includes: a second projection head and a second classifier connected after the second attention mechanism module; the regional branch of the grading system further includes: a third projection head and a third classifier connected after the third attention mechanism module; the first projection head, the second projection head, and the third projection head respectively transform the corresponding input feature maps to the same feature dimension; the classifier is used to obtain the probability that the corresponding training sample belongs to different Wagner grades based on the input feature map, thereby obtaining the corresponding grading result; The training method includes: Obtain a training set; the training samples in the training set are diabetic full foot images carrying Wagner classification labels. For each training sample S: input the training sample S into the global branch to obtain the probability that the training sample S corresponding to the global branch belongs to different Wagner classifications, and thus obtain the first classification result; input the lesion image corresponding to the training sample S. The input is fed into the local branch to obtain the probability that the training sample S corresponding to the local branch belongs to different Wagner classifications, thereby obtaining the second classification result; the lesion image is then processed. and local feature maps The input is fed into the region branch to obtain the probability that the training sample S corresponding to the region branch belongs to different Wagner classifications, thus obtaining the third classification result; lesion image The ulcer lesion area is extracted from the training sample S; Construct a training objective; the training objective includes: a first objective; the first objective is to minimize the total classification loss; the total classification loss is the sum of the classification losses of each training sample in the training set; the classification loss is the sum of the difference losses between the first classification result, the second classification result, and the third classification result of the training sample S and their corresponding Wagner classification labels; Based on the training objectives, training is performed on global branches, local branches, and region branches.

6. The training method according to claim 5, characterized in that, The training objective further includes a second objective; the second objective is to minimize the similarity of the fused feature maps between pairwise training samples with different labels and to maximize the similarity of the fused feature maps between pairwise training samples with the same label. The fusion feature map of training sample S is obtained by using the global feature map of training sample S. Local feature map and regional feature map The global feature map is obtained by fusing through the second fusion module of the hierarchical system. The feature map is obtained by passing through the first attention mechanism module in the global branch when the training sample S is input into the global branch; local feature map. To obtain the lesion image corresponding to the training sample S Feature maps obtained by the second attention mechanism module in the global branch when input into the local branch; region feature maps To obtain lesion images and local feature maps The feature map obtained by the first fusion module when input into the regional branch of the hierarchical system; While training the global branch, local branch, and region branch, the second fusion module is also trained.

7. The training method according to claim 6, characterized in that, The loss function for the second objective is: in, This represents minimization; N is the number of training samples in the training set. For training set; For training set and training samples A set of training samples with different Wagner classification labels; For training samples and training samples The weight values ​​between them and the training samples and training samples The absolute values ​​of the differences between the Wagner classification labels are negatively correlated; For training samples With training samples Similarity of fused feature maps between them; For training set and training samples The set of training samples that have the same Wagner classification label.

8. The training method according to any one of claims 5-7, characterized in that, The loss function for the first target is: in, Indicates minimization; For training set; The total number of levels for Wagner's classification; , , All are preset weight values; For training samples Wagner rating labels; when hour, =1; when hour, =0; Training samples corresponding to the global branch belong The probability of Wagner classification; Training samples corresponding to local branches belong The probability of Wagner classification; Training samples corresponding to the region branches belong The probability of a Wagner classification.

9. A method for grading diabetic foot ulcer wounds, characterized in that, include: Feature extraction is performed on the diabetic full-foot image F to be graded to obtain the feature map. ; for the feature map Attention enhancement is performed to obtain a global feature map; Feature extraction is performed on the lesion image T to obtain the feature map. ; for the feature map Attention enhancement is performed to obtain local feature maps; the lesion image T is the ulcer lesion area extracted from the whole foot image F; Multi-scale sliding windows are used to slide the local feature map, and the confidence score at each window position is calculated. For each scale, the NMS algorithm is used to select the K window locations with the highest confidence scores as candidate regions; the target region image corresponding to each candidate region is extracted from the lesion image T. Feature extraction is performed on each target region image R to obtain the corresponding feature map. For each feature map Attention enhancement is performed to obtain the corresponding region enhancement feature map; The enhanced feature maps of each region are fused to obtain the region feature map; The global feature map, the local feature map, and the region feature map are fused to obtain a fused feature map. The full-foot image F is classified based on the fused feature map.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, it controls the device in which the storage medium is located to perform the method according to any one of claims 5-9.