Skin disease classification method based on multi-branch structure dynamic weight
By using dynamic weight adjustment of multi-branch structure and optimization of partial loss function, the problems of inaccurate localization and overfitting in skin disease diagnosis are solved, thereby improving the accuracy and generalization ability of skin disease classification.
Patent Information
- Application Number
- CN202410869201.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-07-01
AI Technical Summary
Existing technologies for dermatological diagnosis suffer from several problems: patch segmentation methods cannot accurately locate key disease sites; multi-branch structures lack effectiveness evaluation; and traditional cross-entropy loss functions carry the risk of overfitting.
A multi-branch structure dynamic weight adjustment mechanism is adopted. Key regions of the image are located through CAM heatmap, the branch weights are dynamically evaluated, and a partial loss function is introduced to optimize the model and reduce the risk of overfitting.
It improves the model's accuracy and adaptability in classifying skin disease images, enhances its generalization ability to inter-class similarity and intra-class diversity, and reduces the risk of overfitting.
Smart Images

Figure CN118840596B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image classification of skin diseases, and in particular to a skin disease classification method based on dynamic weights of a multi-branch structure. Background Technology
[0002] Skin cancer is a highly fatal disease, and early treatment can significantly improve the 5-year survival rate. However, skin diseases exhibit both inter-class similarities and intra-class differences in appearance. This makes accurate diagnosis of skin diseases highly demanding on physicians' skills. With the rapid development of machine learning technology, its application in the medical field is becoming increasingly widespread. Many scholars have already applied machine learning techniques to the diagnosis of skin diseases.
[0003] Initially, researchers focused on how to obtain artificial features as input to convolutional neural networks (CNNs) [1]. This method lacked a unified standard and was costly. Subsequently, automatic feature acquisition methods were introduced into the field, and researchers began to explore new theories and technologies. Initially, external datasets and pre-trained patterns were used to enhance the model's discriminative ability [2,3]. Then, ensemble methods became the mainstream method for diagnosing skin diseases, which can enhance the model's adaptability and generalization [4]. Based on this technology, researchers further introduced interpretability [5], multimodal technology [6], Transformer technology [7], and generative data augmentation [8].
[0004] Existing technologies in the field of dermatology diagnosis have the following main drawbacks: 1) Patch-based segmentation methods cannot effectively locate key parts for disease classification; 2) In multi-branch structures, there is a lack of evaluation of branching effects, which reduces the performance of multi-branch structures; 3) Traditional cross-entropy loss functions have the risk of overfitting and are not suitable for data with significant intra-class differences.
[0005] It should be noted that the information disclosed in the background section above is only for understanding the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The main objective of this invention is to overcome the shortcomings of the aforementioned background technology and provide a skin disease classification method based on dynamic weights of a multi-branch structure.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A skin disease classification method based on multi-branch structure dynamic weights includes the following steps:
[0009] S1. Input and cropping: Input the original skin disease image data into the multi-branch structure of the classification model, and crop the image under different resolution conditions through multiple branches;
[0010] S2.CAM Heatmap Generation: Generates a CAM heatmap for each branch of the cropped image, locates the center of the cropped image, and identifies key regions in the image;
[0011] S3. Feature Extraction and Processing: Using the cropped image and the corresponding CAM heatmap, feature extraction and processing are performed in each branch;
[0012] S4. Branch Weight Evaluation: Based on the feature extraction and processing results, the effectiveness of feature extraction for each branch is evaluated by comparing the similarity between the CAM heatmap and the inverted grayscale image of each branch, and the branch weights are dynamically adjusted accordingly.
[0013] S5. Feature Fusion: Based on the adjusted branch weights, the features extracted from multiple branches are weighted and fused to form a comprehensive feature representation that reflects the key information of the skin disease image;
[0014] S6. Classification Prediction: Based on the fused feature representation, classification prediction is performed at the output layer, and the final classification result is determined based on the probability distribution of the output layer.
[0015] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the skin disease classification method based on dynamic weights of a multi-branch structure.
[0016] A computer program product includes a computer program that, when executed by a processor, implements the skin disease classification method based on multi-branch structure dynamic weights.
[0017] The present invention has the following beneficial effects:
[0018] This invention provides an innovative method for classifying skin diseases. By introducing a dynamic weight adjustment mechanism with a multi-branch structure, this method significantly improves the performance of deep learning models in skin disease image classification tasks. Utilizing CAM heatmaps for dynamic region localization, this invention effectively captures key information in images, solving the problem of inaccurate localization of key disease sites in existing patch-based segmentation methods. Furthermore, by comparing inverted grayscale images with CAM heatmaps, this invention dynamically evaluates and adjusts branch weights, thereby enhancing the model's adaptability to image features at different resolutions and optimizing the performance of the multi-branch structure. Further, this invention proposes a partial loss function that, when the model makes a prediction error, simultaneously optimizes the probabilities of the target label and the incorrect label, reducing over-optimization of the target label and enhancing the model's tolerance to intra-class diversity. This reduces the risk of overfitting and improves the algorithm's generalization ability. Combining these innovations, this invention not only improves the model's accuracy and adaptability but also enhances its generalization ability to skin disease images of varying sizes, inter-class similarity, and intra-class diversity, demonstrating broad application prospects and practical value in the field of skin disease diagnosis.
[0019] In summary, this invention provides a highly accurate and adaptable technical solution for the diagnosis of skin diseases, with broad application prospects and practical value.
[0020] Other beneficial effects of the embodiments of the present invention will be further described below. Attached Figure Description
[0021] Figure 1 This is a multi-branch structure framework diagram of an embodiment of the present invention.
[0022] Figure 2 This is a schematic diagram of branch image cropping according to an embodiment of the present invention.
[0023] Figure 3 This is a schematic diagram of the branch weight module in an embodiment of the present invention.
[0024] Figure 4 This is a schematic diagram illustrating the principle of a partial loss function in an embodiment of the present invention. Detailed Implementation
[0025] The embodiments of the present invention will be described in detail below. It should be emphasized that the following description is merely exemplary and not intended to limit the scope and application of the present invention.
[0026] This invention provides a skin disease classification method based on dynamic weights with a multi-branch structure, addressing the following key issues arising from inter-class similarity and intra-class diversity in skin disease classification: Traditional methods fail to effectively and dynamically evaluate the performance of multi-branch predictions, thus failing to leverage the ability of the multi-branch structure to discover discrepancies and weakening the model's ability to solve inter-class similarity problems; traditional cross-entropy functions focus on maximizing the probability of target prediction results, failing to consider optimizing misclassifications and weakening the model's ability to solve intra-class diversity problems. The skin disease classification method based on dynamic weights with a multi-branch structure proposed in this invention evaluates branch performance through a dynamic weight structure, enabling the model to discover a more suitable classification scale and more effective information. Furthermore, it proposes an optimization strategy for a partial loss function, simultaneously optimizing both the target label and the mislabel when the model makes a prediction error, resulting in a larger target output distribution space and enhanced generalization ability of the algorithm.
[0027] See Figure 1 This invention provides a skin disease classification method based on dynamic weights of a multi-branch structure, comprising the following steps:
[0028] S1. Input and cropping: The original skin disease image data is input into the multi-branch structure of the classification model. Multiple branches crop the image under different resolution conditions. The different branches of the multi-branch structure are configured to be suitable for processing images of different resolutions, so as to extract and analyze multi-scale feature information at different resolutions.
[0029] S2.CAM Heatmap Generation: Generates a Class Activation Map (CAM) heatmap for each branch of the cropped image, locates the center of the cropped image, and identifies key regions in the image;
[0030] S3. Feature Extraction and Processing: Using the cropped image and the corresponding CAM heatmap, feature extraction and processing are performed in each branch;
[0031] S4. Branch Weight Evaluation: Based on the feature extraction and processing results, the effectiveness of feature extraction by each branch is evaluated by comparing the similarity between the CAM heatmap and the inverted grayscale image of each branch, and the branch weights are dynamically adjusted accordingly to optimize and integrate the feature contributions of each branch in the feature fusion step.
[0032] S5. Feature Fusion: Based on the adjusted branch weights, the features extracted from multiple branches are weighted and fused to form a comprehensive feature representation that reflects the key information of the skin disease image;
[0033] S6. Classification Prediction: Based on the fused feature representation, classification prediction is performed at the output layer, and the final classification result is determined based on the probability distribution of the output layer.
[0034] The method of this invention significantly improves the performance of deep learning models in skin disease image classification tasks by introducing a dynamic weight adjustment mechanism for a multi-branch structure. Utilizing CAM heatmaps for dynamic region localization, this invention effectively captures key information in images, solving the problem that existing patch-based segmentation methods cannot accurately locate key disease sites. Furthermore, by comparing inverted grayscale images with CAM heatmaps, this invention dynamically evaluates and adjusts the branch weights, thereby enhancing the model's adaptability to image features at different resolutions and optimizing the performance of the multi-branch structure.
[0035] In a preferred embodiment, the skin disease classification method based on multi-branch structure dynamic weights further includes using a partial loss function during the training of the classification model. The optimization strategies implemented by this partial loss function include: simultaneously optimizing the target class and the predicted class to reduce over-optimization of the target class; when the predicted class and the label class are the same, the partial loss function degenerates into cross-entropy loss, maintaining the traditional loss calculation method; when the predicted class and the label class are different, an additional optimization term is introduced to calculate the loss for the non-target class, enhancing the model's tolerance to intra-class variability; by adjusting the parameters in the partial loss function, the loss contributions of the target class and the non-target class are balanced; when the model makes a prediction error, the distribution range of the model's numerical output for similar samples is increased to mitigate the negative impact of highly variable data characteristics.
[0036] See Figure 1 In one exemplary embodiment, the multi-branch structure includes a main branch and two sub-branches, wherein the image cropping size of the main branch is 448×448, the image cropping size of the first sub-branch is 336×336, and the image cropping size of the second sub-branch is 224×224.
[0037] In a preferred embodiment, in step S2, the main branch generates the CAM heatmap of the cropped image and shares the heatmap with the sub-branch to help the sub-branch determine the cropping center point.
[0038] In some embodiments, Grad-CAM technology can be applied to generate the CAM heatmap.
[0039] In a preferred embodiment, the image cropping of the branch is performed as follows: The basic dimensions and CAM center position of the cropped image are determined; given the width and height of the cropping area, the coordinates of the upper left and lower right corners of the cropping area are calculated; the upper left corner coordinate is obtained by subtracting half of the cropping width and height from the CAM center position, while ensuring that this coordinate does not exceed the upper left boundary of the image; the lower right corner coordinate is obtained by adding half of the cropping width and height to the CAM center position, while ensuring that this coordinate does not exceed the lower right boundary of the image; if the vertical or horizontal coordinate of the upper left corner is zero, the lower right corner coordinate is taken as the height or width of the image accordingly; if the vertical or horizontal coordinate of the lower right corner is equal to the height or width of the image, adjustments are made accordingly to meet the cropping size requirements. Figure 2 An example of image cropping for branches is shown.
[0040] like Figure 3 As shown, in a preferred embodiment, step S5 specifically includes: performing grayscale inversion processing on the input image of each branch to obtain a grayscale inverted image; feeding the CAM heatmap and the corresponding grayscale inverted image of each branch as input into the branch weight module; within the branch weight module, the input image is processed for feature extraction through a sparse convolutional layer; the output of the sparse convolutional layer is processed by batch normalization (BN) and ReLU activation functions; the receptive field is increased by dilated convolution, and then the feature expression is enhanced by batch normalization (BN) and ReLU activation functions; the branch weight coefficients are output using a global average pooling layer (GAP) and a sigmoid activation function; based on the output of the GAP and sigmoid activation functions, the weight coefficients of each branch are evaluated, which reflect the similarity between the CAM heatmap and the grayscale inverted image, thereby evaluating the effectiveness of branch feature extraction; based on the evaluation results, the weights of each branch are dynamically adjusted so as to reasonably integrate the feature contributions of each branch in the feature fusion step.
[0041] In a preferred embodiment, during the initial stage of model training, the CAM heatmap is not used as a reference for cropping or feature extraction. After a predetermined delay, the CAM heatmap is used to assist in identifying key regions in the image. Correspondingly, the high-resolution branch (such as the main branch in the aforementioned embodiment) begins operation after the delay to utilize the more accurate CAM heatmap for more detailed feature extraction. This delayed use strategy improves the accuracy and reliability of the CAM heatmap. Preferably, the predetermined delay is no earlier than the 10th epoch.
[0042] This invention introduces a multi-branch dynamic weight adjustment method and a partial loss function into a dermatology diagnostic model, reducing the negative impact of inter-class similarity and intra-class differences on model performance and effectively improving the performance of deep learning models in dermatology image classification. The improvements and effects of this invention are: 1) Dynamic localization of dermatology regions based on CAM heatmaps, overcoming the problem of insufficient localization effect. 2) Branch effect evaluation: Using the inverted grayscale image of the original input image and the CAM heatmap as inputs to the weight module, the weight module compares the differences between the two to evaluate whether the branch resolution is appropriate, improving the model's adaptability. 3) Partial loss function: By optimizing the probability of predicting labels when prediction errors occur, over-optimization of target labels is reduced, enhancing the model's tolerance to differences within the same class.
[0043] The following describes specific embodiments of the present invention.
[0044] Diagnosis of multibranched skin diseases
[0045] Because skin diseases exhibit significant uncertainty in location and size, their characteristics cannot fully leverage the advantages of deep learning models. The advantage of a multi-branch structure in skin disease diagnostic models lies in its ability to acquire richer feature information under different resolution conditions through multiple branches. Furthermore, in this invention, to locate key disease locations, a CAM heatmap is used to pinpoint the center of the cropped image, preserving key features to the greatest extent possible.
[0046] exist Figure 1 The model contains three branches: the middle one is the main branch, and the others are sub-branches. The main branch image is cropped to 448×448 pixels, the upper branch to 336×336 pixels, and the lower branch to 224×224 pixels. The main branch provides CAM heatmaps for the sub-branches, which, after convolution, determine the cropping center point. The cropping method is as follows: given the width I of the cropped image from the main branch... ω ,high I h The center position of the CAM is (x, y), the cutting width and height are w and h respectively, the coordinates of the upper left point of the cutting image are (x1, y1), and the coordinates of the lower right point of the cutting image are (x2, y2). The calculation method is as follows:
[0047]
[0048] Figure 2 Example image of cropping a branch image.
[0049] Ideally, the CAM heatmap is not used as a reference in the early stages of model training. After the 10th epoch, the high-resolution branch starts operating, improving the accuracy and reliability of the CAM heatmap.
[0050] Branch weight module
[0051] Figure 3 The branch weight module is shown. This module is primarily used to evaluate the effectiveness of high-resolution branches. Fixed branch weights are not well-suited to adapting to changes in branch performance. To enable the model to better learn the evaluation results, this invention processes the input image using a grayscale inversion method. Specifically, the branch CAM heatmap is inverted with the grayscale image... Figure 1 The data is fed into the weight module, passes through a sparse convolutional layer and a GAP layer, and finally the sigmoid function outputs the final branch weight coefficients. The overall design idea is to let the branch weight module learn the evaluation pattern: when the branch structure performs well, the CAM heatmap and the grayscale image have a high similarity; otherwise, the similarity is low.
[0052] Partial loss function
[0053] Cross-entropy is one of the most commonly used loss functions in machine learning. However, due to the significant intra-class variability in skin diseases, cross-entropy may lead to overfitting. To address this issue, this invention proposes a partial loss function. This partial loss function reduces the optimization of the objective function by optimizing the loss function for non-target classes, thereby increasing the distribution space of the target class predictions and increasing tolerance for intra-class variability.
[0054] Given a set of data D = {(x1, y1), ..., (x i y i ), ......, (x N y N )},y i It is z i one-hot tag. Let be the value of the j-th class, j∈{1,2,...,C}, and the probability distribution is calculated as follows:
[0055]
[0056] p ij It represents the probability of the i-th sample in the j-th class. The cross-entropy function aims to continuously increase... Numerical values. This invention argues that non-target errors should also be considered; therefore, it proposes partial loss functions and full loss functions. This is the one-hot encoding of the predicted label. The formula is as follows:
[0057]
[0058] Figure 4 A schematic diagram of the principle of a partial loss function is shown.
[0059] J is the label category with the highest prediction probability. According to Formula 4, when the predicted category is the same as the label category, the loss function partially degenerates into the cross-entropy function; when the predicted category is different from the label category, both the target category and the predicted category are optimized simultaneously, and the value of β is 1.
[0060] In summary, this invention proposes a skin disease classification method based on a dynamic weighted multi-branch structure. The specific embodiments of this invention include the following key points:
[0061] (1) Dynamic region acquisition: The multi-branch input regions of the present invention are dynamically selected based on CAM heatmap, which can effectively capture key and effective information.
[0062] (2) Dynamic branch weights: In order to solve the problem of branch effect degradation, this invention proposes a method based on the comparison of heatmap and inverted grayscale image, which can effectively learn the branch evaluation mode, dynamically change the branch weights, improve the classification performance of the model, and it is a lightweight structure.
[0063] (3) Optimization strategy for partial loss function.
[0064] The main advantages of this invention include the following aspects: 1) This invention has multi-scale information acquisition capabilities, which can adapt to the complex situation where skin diseases vary in size due to different shooting angles or their own characteristics. 2) This invention uses a dynamic method to acquire cropping positions at different scales, making it easier to capture the key locations of lesions. 3) This invention can dynamically evaluate and adjust the weights of each branch, optimizing the effect of the multi-branch system. 4) This invention proposes a partial cross-entropy loss function, which reduces model overfitting and enhances model generalization by dynamically and flexibly modifying the neural network optimization objective.
[0065] This invention also provides a storage medium for storing a computer program, which, when executed, performs at least the methods described above.
[0066] This invention also provides a control device, including a processor and a storage medium for storing a computer program; wherein the processor executes the computer program by performing at least the method described above.
[0067] This invention also provides a processor that executes a computer program, at least performing the methods described above.
[0068] The storage medium can be implemented by any type of non-volatile storage device, or a combination thereof. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk drive or magnetic tape drive. The storage media described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0069] In the several embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0070] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0071] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0072] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0073] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0074] The methods disclosed in the several method embodiments provided by this invention can be arbitrarily combined without conflict to obtain new method embodiments.
[0075] The features disclosed in the several product embodiments provided by this invention can be arbitrarily combined without conflict to obtain new product embodiments.
[0076] The features disclosed in the several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0077] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various equivalent substitutions or obvious modifications can be made without departing from the concept of the present invention, and all such modifications, achieving the same performance or application, should be considered within the scope of protection of the present invention.
Claims
1. A skin disease classification method based on multi-branch structure dynamic weights, characterized in that, Includes the following steps: S1. Input the original skin disease image data into the multi-branch structure of the classification model. Multiple branches crop the image under different resolution conditions. The image cropping of the branches is carried out according to the following methods: Determine the basic size and CAM center position of the cropped image; Given the width and height of the cropping region, calculate the coordinates of the upper left and lower right corners of the cropping region; The upper left corner coordinate is obtained by subtracting half of the cropping width and height from the CAM center position, while ensuring that the coordinate does not exceed the upper left boundary of the image; The lower right corner coordinate is obtained by adding half of the cropping width and height to the CAM center position, while ensuring that the coordinate does not exceed the lower right boundary of the image; If the vertical or horizontal coordinate of the upper left corner is zero, the lower right corner coordinate is taken as the height or width of the image accordingly; If the vertical or horizontal coordinate of the lower right corner is equal to the height or width of the image, adjustments are made accordingly to meet the cropping size requirements. S2. Generate a CAM heatmap for each branch of the cropped image and locate the center of the cropped image to identify key regions in the image; S3. Using the cropped image and the corresponding CAM heatmap, perform feature extraction and processing in each branch; S4. Based on the feature extraction and processing results, the effectiveness of feature extraction for each branch is evaluated by comparing the similarity between the CAM heatmap and the inverted grayscale image of each branch, and the branch weights are dynamically adjusted accordingly. S5. Based on the adjusted branch weights, the features extracted from multiple branches are weighted and fused to form a comprehensive feature representation that reflects the key information of the skin disease image; S6. Based on the fused feature representation, perform classification prediction in the output layer, and determine the final classification result based on the probability distribution of the output layer.
2. The skin disease classification method based on multi-branch structure dynamic weights as described in claim 1, characterized in that, This also includes using a partial loss function during the training of the classification model, with optimization strategies including: Simultaneously optimize both the target category and the predicted category to reduce over-optimization of the target category; When the predicted category is the same as the label category, part of the loss function degenerates into cross-entropy loss, while maintaining the traditional loss calculation method; When the predicted category differs from the label category, an additional optimization term is introduced to calculate the loss for non-target categories, thereby enhancing the model's tolerance for intra-class discrepancies. By adjusting the parameters in part of the loss function, the loss contributions of the target class and non-target class can be balanced; When a model makes a prediction error, increasing the distribution range of numerical outputs from similar sample models can mitigate the negative impact of highly variable data characteristics.
3. The skin disease classification method based on multi-branch structure dynamic weights as described in claim 1 or 2, characterized in that, The multi-branch structure includes one main branch and two sub-branches, wherein the image cropping size of the main branch is 448×448, the image cropping size of the first sub-branch is 336×336, and the image cropping size of the second sub-branch is 224×224.
4. The skin disease classification method based on multi-branch structure dynamic weights as described in claim 3, characterized in that, In step S2, the main branch generates the CAM heatmap of the cropped image and shares the heatmap with the sub-branch to help the sub-branch determine the cropping center point.
5. The skin disease classification method based on multi-branch structure dynamic weights as described in claim 4, characterized in that, The CAM heatmap is generated using Grad-CAM technology.
6. The skin disease classification method based on multi-branch structure dynamic weights as described in any one of claims 1 to 2, characterized in that, Step S4 specifically includes: The input image of each branch is processed by inverting the grayscale image to obtain the inverted grayscale image; The CAM heatmap and the corresponding inverted grayscale image of each branch are used as inputs and fed into the branch weight module. Within the branch weight module, the input image is processed through sparse convolutional layers for feature extraction. The output of the sparse convolutional layer is processed using batch normalization (BN) and ReLU activation functions. The receptive field is increased by expanding the convolution, and then the feature representation is enhanced by batch normalization (BN) and ReLU activation functions. Use the Global Average Pooling (GAP) layer and the Sigmoid activation function to output the branch weight coefficients; Based on the outputs of the GAP and Sigmoid activation functions, the weight coefficients of each branch are evaluated. These coefficients reflect the similarity between the CAM heatmap and the inverted grayscale image, thereby assessing the effectiveness of the branch in extracting features. Based on the evaluation results, the weight of each branch is dynamically adjusted in order to optimize and integrate the feature contributions of each branch in the feature fusion step.
7. The skin disease classification method based on multi-branch structure dynamic weights as described in any one of claims 1 to 2, characterized in that, In the initial stage of model training, after a predetermined delay, CAM heatmaps are used to assist in identifying key regions in the image. Correspondingly, the high-resolution branch begins operation after the delay.
8. The skin disease classification method based on multi-branch structure dynamic weights as described in claim 7, characterized in that, The predetermined delay occurs after the 10th epoch of training.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the skin disease classification method based on dynamic weights of a multi-branch structure as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the skin disease classification method based on dynamic weights of a multi-branch structure as described in any one of claims 1-7.
Citation Information
Patent Citations
Skin lesion image classification method
CN113705630A
Skin disease image classification method based on three-branch feature fusion network
CN117392428A
