Image-based skin treatment effect evaluation method, medium and system
By constructing a three-level lesion area division model and a skin spectral analysis model, combined with deep learning technology, accurate quantification and individualized evaluation of the treatment effect of skin lesions are achieved, solving the problems of insufficient objectivity and accuracy of traditional evaluation methods, and providing a high-precision treatment effect evaluation tool.
Patent Information
- Application Number
- CN202510727138.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-12
AI Technical Summary
Traditional methods for evaluating the effectiveness of skin lesion treatment lack objectivity and accuracy. They have difficulty quantifying lesion area, boundary clarity, and pigment distribution, and are unable to capture subtle changes, which affects the formulation and adjustment of treatment plans.
An image-based skin treatment effect evaluation method is used to identify the lesion area through the skin spectral analysis model, construct a three-level lesion area division model, calculate the boundary transition index and pigment distribution index, establish a time series image library, generate a comprehensive treatment effect score, and establish a patient individualized evaluation model.
It achieves objective quantification and individualized evaluation of the treatment effect of skin lesions, improves the accuracy and consistency of the evaluation, and provides a scientific treatment effect evaluation tool for dermatology clinical practice.
Smart Images

Figure CN120636796A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of skin treatment effect evaluation, and in particular, relates to an image-based skin treatment effect evaluation method, medium and system. Background Art
[0002] Evaluating the efficacy of skin lesion treatment is a crucial component of dermatology clinical practice. Traditional evaluation methods primarily rely on visual observation and empirical judgment, evaluating treatment efficacy by comparing skin conditions before and after treatment. Common evaluation techniques include direct visual inspection, simple digital photography, and semi-quantitative assessment systems based on clinical rating scales. These methods are widely used in clinical practice and provide dermatologists with a foundational tool for treatment monitoring. However, traditional evaluation methods have significant limitations. First, subjective judgment by physicians results in a lack of objectivity and consistency, and assessments of the same patient by different physicians can vary significantly. Second, traditional methods struggle to accurately quantify key parameters such as lesion area, boundary definition, and pigment distribution, failing to capture subtle changes. Third, existing technologies lack systematic data recording and analysis mechanisms, making it difficult to establish a standardized treatment efficacy evaluation system, hindering the optimization and adjustment of treatment plans. These limitations lead to technical issues such as lack of objectivity and difficulty in accurately quantifying the efficacy of skin lesion treatment, compromising the accuracy of treatment plan formulation and adjustment. Especially for pigmented skin lesions, subtle changes during treatment are difficult to accurately capture and quantify using traditional methods, making it difficult for clinicians to accurately assess treatment progress and adjust treatment strategies in a timely manner, ultimately impacting patient outcomes and experience. Summary of the Invention
[0003] In view of this, the present invention provides an image-based skin treatment effect evaluation method, medium and system, which can solve the technical problems in the existing technology of insufficient objectivity and difficulty in accurate quantification of skin lesion treatment effect evaluation.
[0004] The present invention is implemented as follows: In a first aspect, the present invention provides an image-based skin treatment effect assessment method comprising the following steps: collecting standardized images of affected skin areas, identifying lesion areas using a skin spectral analysis model, and constructing a three-level lesion area division model; calculating current and predicted boundaries in the three-level lesion areas using the skin spectral analysis model, and determining a boundary transition index by adjusting the grayscale gradient change of edge pixels using hierarchical fusion weights; performing pixel-level pigment analysis on the three-level lesion areas to construct a pigment distribution stability matrix and a pigment distribution change matrix; extracting a representative center of pigment concentration using the pigment distribution stability matrix, and calculating the pigment distribution skewness as a quantitative indicator of lesion asymmetry in combination with feature fusion weights; establishing a time series image library, and calculating the lesion area change rate, boundary transition index change rate, and pigment concentration change rate by comparing standardized images at different time points; calculating a comprehensive treatment effect score based on the lesion area change rate, boundary transition index change rate, and pigment concentration change rate, and generating a heat map based on the three-level lesion areas to display treatment progress; and establishing a patient-specific assessment model, adjusting indicator weights based on historical treatment data, optimizing the assessment accuracy of the comprehensive treatment effect score, and outputting the result.
[0005] Among them, the standardized image includes RGB color image data and near-infrared spectrum data of the affected skin area; the process of constructing the pigment distribution stability matrix and the pigment distribution change matrix dynamically adjusts the sampling granularity according to the boundary transition index; the feature fusion weight is automatically generated based on the structural characteristics of the three-level lesion area.
[0006] Among them, the third-level lesion area refers to three nested areas that are precisely divided in a progressive manner, namely the core lesion area, the transitional lesion area and the edge-affected area. The core lesion area contains obvious lesion tissue, the transitional lesion area contains slightly lesion tissue, and the edge-affected area contains tissue that may be affected but is visually normal.
[0007] Among them, the current boundary refers to the edge line of the lesion actually detected during the current treatment evaluation, which is determined by a high-precision image segmentation algorithm combined with medical expert annotation; the predicted boundary refers to the prediction of the possible expansion or contraction boundary position in the next stage based on the lesion development model, which is used to warn of the trend of changes in the disease.
[0008] Among them, the boundary transition index refers to the numerical value that quantifies the transition degree between the lesion boundary and normal skin. The higher the value, the blurrier the boundary, and the lower the value, the clearer the boundary. The calculation is based on the gradient change rate of the boundary pixels; the hierarchical fusion weight refers to the parameter used to control the importance of features at different abstract levels in the skin spectral analysis model.
[0009] Among them, the pigment distribution stability matrix refers to the mathematical matrix constructed for the relatively stable pigment distribution area in the lesion area, which characterizes the stable pigmentation characteristics in the lesion; the pigment distribution change matrix refers to the mathematical matrix constructed for the pigment distribution in the lesion area that changes with time or during the treatment process, which characterizes the dynamic pigmentation characteristics in the lesion.
[0010] Among them, the representative center of pigment concentration refers to the weighted geometric center of pigment distribution in the lesion area. The pigment concentration is considered as a weight factor in the calculation to reflect the tendency of the pigment distribution center; the pigment distribution skewness refers to the degree of asymmetry of the pigment distribution relative to the representative center of pigment concentration. It is obtained by calculating the third-order moment of the pigment distribution and is used to quantify the irregularity of the pigment distribution in the lesion.
[0011] Among them, the specific structure of the skin spectrum analysis model is to build an image analysis framework based on the improved residual network backbone network combined with the multi-scale feature extraction module, which includes an image encoding module, a multi-scale feature extraction module, a dual attention mechanism module, a hierarchical feature fusion module and a decoding output module.
[0012] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, are used to execute the above-mentioned image-based skin treatment effect evaluation method.
[0013] The third aspect of the present invention provides an image-based skin treatment effect evaluation system, which includes the above-mentioned computer-readable storage medium. The system is any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.
[0014] The present invention achieves an objective quantitative assessment of the therapeutic effect of skin lesions by constructing a skin spectral analysis model and a three-level lesion area division model. The method collects standardized image data, applies deep learning technology to perform lesion identification, boundary analysis, and pigment distribution measurement, establishes a time series image library for longitudinal comparison, and ultimately generates a comprehensive treatment effect score and a visual heat map. Through pixel-level pigment analysis and boundary transition index calculation, the present invention solves the problems of strong subjectivity and low quantification accuracy of traditional evaluation methods. The method can accurately calculate the rate of change of lesion area, the rate of change of boundary transition index, and the rate of change of pigment concentration, converting small changes that are originally difficult to quantify into objective data, providing a high-precision basis for treatment effect evaluation. At the same time, the establishment of a patient-specific evaluation model realizes the adaptive adjustment of evaluation index weights, thereby improving the individualized accuracy of the evaluation. Through multi-dimensional feature extraction and fusion analysis, combined with the adaptive weight adjustment mechanism of the deep learning model, the present invention successfully solves the technical problems of insufficient objectivity and difficulty in accurate quantification in the evaluation of the treatment effect of skin lesions, providing a more scientific, objective, and accurate treatment effect evaluation tool for clinical practice in dermatology. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of the method of the present invention.
[0016] Figure 2 Schematic diagram of the skin spectrum analysis model structure.
[0017] Figure 3 This is a comparison chart of the treatment effects of a patient in Example 2, where sub-picture A is a skin picture at the beginning of treatment, and sub-picture B is a skin picture after 12 weeks of treatment. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0019] like Figure 1 FIG. 1 is a flowchart of an image-based skin treatment effect evaluation method provided by the first aspect of the present invention. The method comprises the following steps:
[0020] S01. Collecting a standardized image of the affected skin area, applying a skin spectrum analysis model to preliminarily identify the lesion area, and constructing a three-level lesion area division model, wherein the standardized image includes RGB color image data and near-infrared spectrum data of the affected skin area;
[0021] S02. Calculating the current boundary and the predicted boundary in the third-level lesion area using the skin spectrum analysis model, adjusting the grayscale gradient change of edge pixels using the hierarchical fusion weights in the skin spectrum analysis model to determine a boundary transition index, wherein the hierarchical fusion weights are adaptively adjusted according to the boundary transition index;
[0022] S03, performing pixel-level pigment analysis on the third-level lesion area to construct a pigment distribution stability matrix and a pigment distribution change matrix, wherein the pigment distribution stability matrix and the pigment distribution change matrix are constructed in a process of dynamically adjusting the sampling granularity according to the boundary transition index;
[0023] S04, extracting a representative center of pigment concentration using the pigment distribution stability matrix, and calculating the pigment distribution skewness as a quantitative indicator of lesion asymmetry in combination with the feature fusion weights in the skin spectrum analysis model, wherein the feature fusion weights are automatically generated based on the structural features of the three-level lesion area;
[0024] S05. Establish a time series image library, perform before-and-after comparisons on standardized images at different time points in the time series image library to calculate the rate of change of the lesion area, the rate of change of the boundary transition index, and the rate of change of the pigment concentration, and perform data filtering based on a similarity threshold output by the skin spectrum analysis model, where the similarity threshold is determined based on a historical change trend of the three-level lesion area;
[0025] S06, calculating a comprehensive treatment effect score based on the lesion area change rate, the boundary transition index change rate, and the pigment concentration change rate, and optimizing the feature fusion weights of the skin spectrum analysis model to generate a heat map based on the three-level lesion area to display the treatment progress;
[0026] S07. Establish a patient-individualized assessment model, adjust the indicator weights of the lesion area change rate, the boundary transition index change rate, and the pigment concentration change rate according to historical treatment data, optimize the assessment accuracy of the comprehensive treatment effect score and output it, and during this period, adaptively adjust the importance of features at different levels through the hierarchical fusion weight parameters of the skin spectral analysis model.
[0027] Among them, the three-level lesion area refers to three nested areas that are divided progressively and accurately, namely the core lesion area, the transitional lesion area and the edge-affected area. The core lesion area contains obvious lesion tissue, the transitional lesion area contains mild lesion tissue, and the edge-affected area contains tissue that may be affected but visually normal.
[0028] Among them, the current boundary refers to the edge line of the lesion actually detected in the current treatment evaluation, which is determined by a high-precision image segmentation algorithm combined with medical expert annotation.
[0029] Among them, the predicted boundary refers to the boundary position that may expand or shrink in the next stage based on the lesion development model, which is used to warn of the trend of disease changes.
[0030] Among them, the boundary transition index refers to a numerical value that quantifies the degree of transition between the lesion boundary and normal skin. A higher value indicates a more blurred boundary, and a lower value indicates a clearer boundary. The calculation is based on the gradient change rate of the boundary pixels.
[0031] Among them, the pigment distribution stability matrix refers to a mathematical matrix constructed for the relatively stable pigment distribution area in the lesion area, which characterizes the stable pigmentation characteristics in the lesion.
[0032] Among them, the pigment distribution change matrix refers to a mathematical matrix constructed for the pigment distribution in the lesion area that changes with time or during the treatment process, and represents the dynamically changing pigmentation characteristics in the lesion.
[0033] Among them, the pigment concentration represents the center, which refers to the weighted geometric center of the pigment distribution in the lesion area. The pigment concentration is considered as a weight factor in the calculation to reflect the central tendency of the pigment distribution.
[0034] The pigment distribution skewness refers to the degree of asymmetry of the pigment distribution relative to the representative center of the pigment concentration, which is obtained by calculating the third-order moment of the pigment distribution and is used to quantify the irregularity of the pigment distribution in the lesion.
[0035] Among them, the skin spectrum analysis model refers to a pre-trained deep learning architecture for skin lesion identification and analysis. The skin spectrum analysis model is constructed based on the principle of multi-level feature extraction and fusion analysis of images.
[0036] The hierarchical fusion weight refers to a parameter in the skin spectral analysis model used to control the importance of features at different abstract levels, and is dynamically adjusted according to the boundary transition index to adapt to the analysis requirements of different types of skin lesions.
[0037] Among them, the feature fusion weight refers to the parameter used to control the contribution of features of different scales in the skin spectrum analysis model, which is used to optimize the segmentation accuracy of the three-level lesion area and the generation quality of the thermal map.
[0038] The similarity threshold refers to a parameter output by the skin spectrum analysis model for determining the degree of similarity of image features, and is used to distinguish between effective changes and noise interference during the data filtering process.
[0039] Among them, the rate of change in the lesion area refers to the relative percentage change in the area of the three-level lesion area before and after treatment, which is one of the key indicators for evaluating the treatment effect.
[0040] The boundary transition index change rate refers to the relative percentage change of the boundary transition index before and after treatment, reflecting the degree of improvement in the clarity of the lesion boundary.
[0041] Among them, the pigment concentration change rate refers to the relative percentage change in pigment concentration in the lesion area before and after treatment, which is used to evaluate the degree of improvement in pigmentation.
[0042] Among them, the comprehensive treatment effect score refers to a unified evaluation index obtained by weighted fusion of the area change rate of the lesion region, the boundary transition index change rate and the pigment concentration change rate, which is used to quantify the overall treatment effect.
[0043] Among them, the heat map refers to a color visualization image generated based on the three-level lesion area, which shows the treatment response degree and change trend of the lesion area through color intensity.
[0044] The specific structure of the skin spectral analysis model is an image analysis framework constructed based on an improved residual network backbone network combined with a multi-scale feature extraction module, which includes five main components, namely, an image encoding module, a multi-scale feature extraction module, a dual attention mechanism module, a hierarchical feature fusion module and a decoding output module. The image encoding module uses a standard convolution layer for initial feature extraction and standardization. The multi-scale feature extraction module processes different receptive field information through parallel multi-scale convolution branches and retains the subtle texture features of skin lesions. The dual attention mechanism module simultaneously fuses spatial attention and channel attention to ensure accurate positioning and feature enhancement of the lesion area. The hierarchical feature fusion module uses the hierarchical fusion weight parameter to control the contribution of features at different abstract levels to adapt to the analysis requirements of different types of skin lesions. The decoding output module restores the fused feature map to a segmentation mask of the same size as the input and a related quantitative indicator matrix. The overall model structure supports end-to-end training and the inference stage can dynamically adjust the hierarchical fusion weight according to the boundary transition index to adapt to the processing requirements of lesion boundaries with different clarity.
[0045] The steps of establishing the training data set of the skin spectral analysis model specifically include first collecting large-scale multi-center clinical skin lesion image data, covering standardized images of various skin pigmentation diseases and their different treatment stages, and ensuring that the data set contains samples of patients with different skin colors to enhance the applicability of the model. Then, a number of senior dermatologists are invited to perform detailed annotation of each image, including the three-level lesion area boundary division and pigmentation degree scoring to construct a high-quality benchmark truth value. Then, data enhancement processing is performed, including random rotation and flipping to adjust brightness and contrast, and simulating image changes under different lighting conditions to enhance the robustness of the model. Subsequently, all processed images are standardized to a uniform resolution and multimodal information is extracted, including near-infrared spectral information of the original RGB image data and deep tissue analysis data obtained by the skin detection equipment. Finally, the complete data set is divided into a training set, a validation set, and a test set in a ratio of 7:1:2, and the case types and severities in the three data sets are balanced to avoid bias problems during model training.
[0046] The steps of training the skin spectral analysis model specifically include first initializing the model backbone network with pre-trained weights to utilize general image feature extraction capabilities and improve training efficiency, then adopting a two-stage training strategy in the first stage to train only the decoder part and keep the encoder parameters fixed to quickly adapt to skin lesion field tasks, and in the second stage to unfreeze all network layers and use a small learning rate for end-to-end fine-tuning to obtain optimal performance, applying a combined loss function during training including cross entropy loss for lesion segmentation tasks, mean square error loss for pigmentation prediction, and structural similarity loss to ensure boundary accuracy, setting adaptive weights for different lesion types to balance the contributions of different loss components and solve the sample imbalance problem, and introducing a learning rate scheduling strategy and early stopping mechanism to avoid overfitting, and finally evaluating the model performance on the validation set and selecting the checkpoint with the best boundary segmentation accuracy, pigment assessment and expert consistency, and model generalization ability as the final model.
[0047] The specific implementation of the above steps is described in detail below.
[0048] The specific implementation method of step S01 is to use a standardized image acquisition device to image the affected skin area. The device is equipped with a multispectral imaging system to simultaneously capture RGB color images in the visible spectrum and near-infrared spectrum data in the range of 750 to 1100 nm. During the standardized image acquisition process, the light intensity is controlled at 500 to 600 lx, the imaging distance is maintained at 25 to 30 cm, and a standard color card is used for image correction to ensure the accuracy of color restoration. After the acquisition is completed, the original image data is input into a pre-trained skin spectrum analysis model, which uses a deep learning framework to identify potential lesion areas, extracts image features through a multi-scale convolutional neural network, and combines the attention mechanism to highlight the lesion features. The skin spectrum analysis model is based on the principle of pixel-level semantic segmentation, maps the input image into a segmentation mask with spatial consistency, and applies conditional random field post-processing technology to optimize the segmentation boundary. The model outputs segmentation results for three levels of lesion regions, with the core lesion region set as a high-response value region (response threshold ≥ 0.75), the transitional lesion region set as a medium-response value region (response threshold 0.4-0.75), and the edge-affected region set as a low-response value region (response threshold 0.2-0.4). The purpose of this step is to establish a standardized skin image acquisition process and initially identify lesion regions, laying the foundation for subsequent accurate analysis.
[0049] The specific implementation of step S02 is to calculate the current boundary based on the three-level lesion area constructed in step S01 using a high-precision image segmentation algorithm combined with medical expert annotations, while also estimating the predicted boundary using a lesion development prediction model. The current boundary calculation uses an improved U-Net segmentation network, which uses a residual connection structure to enhance feature propagation and improve segmentation accuracy. The network input is a standardized image, and the output is an accurate boundary probability map. The predicted boundary calculation is based on time series analysis and a convolutional long short-term memory network (ConvLSTM) to predict the possible expansion or contraction trend of the lesion. The network considers historical treatment response patterns to predict future changes in the boundary position. The boundary transition index calculation is based on the grayscale gradient analysis of the current boundary pixel. Specifically, the Sobel operator is used to calculate the gradient amplitude and Gaussian filtering is applied for smoothing. The gradient change rate is defined as the ratio of the standard deviation of the gradient value within 10 pixels around the boundary to the mean value. The boundary transition index value ranges from 0 to 1. A value ≤0.3 indicates a clear boundary, and a value ≥0.7 indicates a blurred boundary. The hierarchical fusion weights are adaptively adjusted based on the boundary transition index. When the boundary transition index is high, the weights of low-level features are increased to preserve more texture details, while when the boundary transition index is low, the weights of high-level features are increased to capture more abstract semantic information. The purpose of this step is to accurately quantify lesion boundary features and establish a dynamic feature fusion mechanism that adapts to the boundary characteristics of different lesion types.
[0050] The specific implementation of step S03 involves pixel-level pigment analysis of the third-level lesion area. First, the RGB color image is converted to L*a*b* color space to more accurately represent skin pigmentation characteristics. Adaptive histogram equalization is used to enhance image contrast, and a bilateral filtering algorithm is applied to reduce noise while preserving edge information. The pigment distribution stability matrix and the pigment distribution change matrix are constructed based on time series image analysis. The pigment distribution covariance matrix of images at multiple time points is calculated to identify stable and changing regions. The pigment distribution stability matrix corresponds to regions where the temporal variance of the pigment distribution is less than a preset threshold (set to 0.05), while the pigment distribution change matrix corresponds to regions where the temporal variance of the pigment distribution is greater than a preset threshold. The sampling granularity is dynamically adjusted based on the boundary transition index. When the boundary transition index is high (≥0.7), fine-grained sampling (sampling interval of 2-3 pixels) is used; when the boundary transition index is medium (0.3-0.7), medium-grained sampling (sampling interval of 4-6 pixels) is used; and when the boundary transition index is low (≤0.3), coarse-grained sampling (sampling interval of 7-10 pixels) is used. The purpose of this step is to establish an accurate mathematical representation of the pigment distribution, distinguish between stable pigment regions and variable pigment regions, and adaptively adjust the analysis accuracy based on the boundary characteristics.
[0051] The specific implementation method of step S04 is to extract the representative center of pigment concentration based on the pigment distribution stability matrix constructed in step S03. The weighted centroid algorithm is used to calculate the representative center of pigment concentration, and the pigment concentration value is used as the weight factor to calculate the geometric center of pigment distribution in the lesion area. In the specific calculation process, the effective pigment area is first extracted by applying threshold segmentation (the threshold is set to 0.3) to the pigment distribution stability matrix, and then the weighted spatial coordinate average of the pigment intensity is calculated as the representative center. The skewness of the pigment distribution is a quantitative indicator of lesion asymmetry and is obtained by calculating the third moment of the pigment distribution relative to the representative center. The calculation process adopts the moment statistics method to calculate the skewness values in the horizontal and vertical directions respectively, and synthesize a two-dimensional skewness vector to characterize the asymmetry of the pigment distribution. The skewness value range is usually -2 to 2, and an absolute value ≤0.5 indicates a nearly symmetrical distribution, and an absolute value ≥1.5 indicates a highly asymmetric distribution. Feature fusion weights are automatically generated based on the structural features of the three-level lesion regions. An adaptive weighting mechanism is used to assign weights to features of different scales based on the lesion's area ratio, boundary complexity, and shape factor. Core lesions have a higher weight coefficient (0.5-0.7), transitional lesions have a medium weight coefficient (0.2-0.4), and edge-affected areas have a lower weight coefficient (0.1-0.2). This step aims to quantify the central tendency and asymmetry of the lesion's pigment distribution, providing objective indicators for evaluating treatment efficacy.
[0052] The specific implementation of step S05 involves establishing a time series image library to store standardized images at different time points. The image library is organized using a hierarchical index structure, with multi-level indexes established by patient ID, treatment stage, and acquisition date. Time series comparative analysis utilizes image registration technology to ensure spatial correspondence between images at different time points. Specifically, image alignment is achieved using feature point matching and affine transformation, with registration accuracy controlled to within 2 pixels. The rate of change in lesion area is calculated based on pixel counting: the difference between the post-treatment and pre-treatment lesion areas is divided by the pre-treatment lesion area and multiplied by 100%. The rate of change in the boundary transition index is calculated by dividing the difference between the pre- and post-treatment boundary transition indices by the pre-treatment boundary transition index and multiplying by 100%. The rate of change in pigment concentration is calculated by dividing the difference between the pre- and post-treatment average pigment concentrations by the pre-treatment average pigment concentration and multiplying by 100%. During data filtering, a similarity threshold is used to distinguish valid changes from noise. This threshold is determined based on statistical analysis of historical change trends, with a typical value of 0.8 to 0.9. Changes above this threshold are considered valid, while changes below this threshold are considered noise. The purpose of this step is to establish a systematic time series comparative analysis framework, calculate key change indicators and filter out noise interference to ensure the reliability of evaluation indicators.
[0053] The specific implementation of step S06 constructs a comprehensive treatment effect score based on the rate of change index calculated in step S05. The score is calculated using a weighted summation method, assigning weight coefficients to the lesion area change rate, the boundary transition index change rate, and the pigment concentration change rate for weighted fusion. The initial weights are set as follows: 0.4 for the lesion area change rate, 0.3 for the boundary transition index change rate, and 0.3 for the pigment concentration change rate. The comprehensive score ranges from 0 to 100, with a score ≥80 indicating significant improvement, 60-79 for moderate improvement, 40-59 for mild improvement, 20-39 for slight improvement, and <20 for no significant improvement. Heatmap generation utilizes color mapping technology, mapping the comprehensive score to a color gradient: red indicates areas of worsening, green for improvement, yellow for slight changes, and blue for stable areas. Feature fusion weights are used to optimize heatmap quality during heatmap generation. Weights for different feature channels are assigned based on the semantic information of the three-level lesion regions, improving the accuracy and interpretability of the visual representation. The purpose of this step is to construct intuitive treatment effect evaluation indicators and visual expressions to provide doctors and patients with clear feedback on treatment progress.
[0054] The specific implementation of step S07 is to establish a patient-specific assessment model. This model is based on machine learning principles and uses a gradient boosting decision tree algorithm to learn the correlation between a patient's historical treatment data and treatment efficacy. The input of the individualized assessment model includes basic patient information (age, gender, disease course, etc.), historical treatment records, lesion characteristic parameters, and treatment response indicators. The output is an optimized indicator weight vector. The weight adjustment process adopts a Bayesian optimization framework, treating the indicator weights as hyperparameters and continuously optimizing the weight configuration by maximizing the accuracy of historical assessments. The assessment accuracy of the comprehensive treatment effect score is measured by consistency with the clinician's score, evaluated using the weighted Kappa coefficient. A coefficient ≥ 0.8 indicates high consistency, a coefficient of 0.6-0.8 indicates moderate consistency, and a coefficient < 0.6 indicates low consistency. The hierarchical fusion weight parameter adaptive adjustment uses a backpropagation algorithm to update the weight parameters based on the evaluation error gradient. The learning rate is set to 0.01-0.05 to avoid weight oscillation. The purpose of this step is to achieve personalized customization of treatment assessment, improve assessment accuracy, and provide data support for personalized treatment plans.
[0055] like Figure 2 As shown in Figure 3, the detailed structure of the skin spectral analysis model is based on an improved residual network backbone combined with a multi-scale feature extraction module. The image encoding module utilizes five consecutive convolutional blocks, each consisting of two 3×3 convolutional layers followed by batch normalization and ReLU activation. Max pooling layers are used between convolutional blocks for downsampling, increasing the number of feature channels from 64 to 512 layer by layer. The multi-scale feature extraction module consists of four parallel branches, using 1×1, 3×3, 5×5, and 7×7 convolutional kernels to capture texture information at different scales. The feature maps output by each branch are reweighted and concatenated using a channel-wise attention mechanism to form a multi-scale feature representation. The dual attention mechanism module combines spatial attention and channel-wise attention. Spatial attention generates an attention mask by calculating the spatial response of the feature map, while channel-wise attention generates a channel weight vector through global average pooling followed by a fully connected layer. The outputs of the two attention mechanisms are fused through a gating mechanism to enhance the feature representation of key regions. The hierarchical feature fusion module uses a skip connection structure to fuse features from different encoder layers with features from the corresponding decoder layers. Hierarchical fusion weights are applied during the fusion process to control the contribution of features at different abstraction levels. Initial weights are set at 0.3 for shallow features, 0.4 for mid-level features, and 0.3 for deep features. The decoder output module uses transposed convolution for feature upsampling and adjusts the number of channels through 1×1 convolution to generate the segmentation mask and quantitative indicator matrix.
[0056] The training dataset for the skin spectral analysis model was constructed in detail. First, 10,000 clinical images of various skin pigmentation disorders, including macules, melasma, moles, senile plaques, and hyperplasia, were collected from dermatology departments at 15 tertiary hospitals. These images covered six major skin tones and patient age groups. All images were acquired using standardized imaging equipment to ensure consistent lighting conditions and acquisition parameters. Eight senior dermatologists (with ≥15 years of professional experience) carefully annotated each image. The annotations included demarcation of three-level lesion areas and a 0-5 scale for pigmentation severity. Inter-expert agreement was assessed using the Fleiss Kappa coefficient. Annotations with a coefficient of 0.85 or higher were considered high-quality ground truth. Data augmentation included random rotation (±20°), horizontal and vertical flipping, brightness adjustment (±15%), contrast adjustment (±10%), and simulated image changes under four typical lighting conditions. Ten enhanced images were generated for each original image. All processed images were normalized to a 512×512 pixel resolution, and RGB image data, near-infrared spectral data in the 750–1100 nm range, and tissue depth information collected by the skin analysis device were extracted to construct a multimodal input dataset. Ultimately, the complete dataset was divided into a training set (70,000 images), a validation set (10,000 images), and a test set (20,000 images) in a 7:1:2 ratio to ensure a balanced distribution of cases and severity levels across the three datasets, preventing data distribution bias from impacting model performance.
[0057] The skin spectral analysis model training process first initialized the model backbone network using ImageNet pre-trained weights to improve feature extraction efficiency and model convergence speed. A two-stage training strategy was employed. In the first stage, the encoder parameters were fixed, and only the decoder was trained. Fast adaptation was achieved using a learning rate of 0.001, a batch size of 16, and 20 training epochs. In the second stage, all network layers were unfrozen, and end-to-end fine-tuning was performed using a learning rate of 0.0001, a batch size of 8, and 50 training epochs to improve overall performance. A combination of loss functions was applied during training, including a weighted cross-entropy loss (weight coefficient 0.5), a Dice loss (weight coefficient 0.3), and a structural similarity loss (weight coefficient 0.2) to optimize segmentation, and a mean squared error loss to optimize pigmentation prediction. Adaptive class weights were set for different lesion types, with weights of 5 to 10 for rare lesions and 1 for common lesions to address sample imbalance. A cosine annealing learning rate scheduling strategy was employed, with an initial learning rate of 0.001, a minimum learning rate of 0.00001, and a training period of 10 epochs. An early stopping mechanism was introduced to prevent overfitting by terminating training if performance did not improve for five consecutive validation cycles. Finally, model performance was evaluated on the validation set, and the checkpoint with an average Intersection-Over-Union ratio (IoU) of ≥0.85 for boundary segmentation, a Kappa coefficient of agreement between pigment assessment and experts of ≥0.8, and the best generalization performance on the test set was selected as the final model.
[0058] It should be noted that the present invention includes three core technical ideas, and its technical effects and advantages are analyzed as follows:
[0059] First, the construction of a three-level lesion area division model realizes the refined hierarchical identification of skin lesion areas. Traditional evaluation methods usually observe the lesion as a whole, which makes it difficult to distinguish different degrees of diseased tissue, resulting in rough and subjective evaluation results. The present invention achieves refinement of lesion evaluation by progressively dividing the lesion into three nested areas: the core lesion area, the transition lesion area, and the edge influence area, and applying different analysis strategies to different areas. In particular, the introduction of the edge influence area allows slight changes that are easily overlooked in traditional methods to be included in the evaluation scope, greatly improving the sensitivity and comprehensiveness of the evaluation. This hierarchical recognition model not only improves the ability to accurately locate the lesion boundary, but also provides a structured basis for subsequent pigment analysis and treatment effect evaluation.
[0060] Secondly, pixel-level pigment analysis and the calculation of the boundary transition index achieve accurate quantification of subtle changes in skin lesions. Traditional evaluation methods mainly rely on the doctor's visual judgment and are unable to objectively quantify the pigment distribution and boundary clarity. The present invention constructs a pigment distribution stability matrix and a variable matrix, combined with the calculation of the pigment concentration representative center and the pigment distribution skewness, to convert the originally difficult-to-quantify pigment distribution characteristics into numerical indicators. At the same time, the introduction of the boundary transition index quantifies the degree of transition between the lesion boundary and normal skin, providing an objective evaluation standard for changes in boundary clarity. These precise quantitative indicators enable subtle changes during the treatment process to be objectively recorded and analyzed, greatly improving the accuracy and repeatability of the evaluation.
[0061] Third, the establishment of a personalized patient assessment model enables adaptive adjustment of the weights of assessment indicators. Traditional assessment methods often use a unified standard, ignoring individual differences in disease progression and treatment response among different patients. The present invention establishes a personalized patient assessment model and dynamically adjusts the weights of indicators such as the rate of change of lesion area, the rate of change of boundary transition index, and the rate of change of pigment concentration based on historical treatment data, so that the assessment results can more accurately reflect the actual situation of individual patients. This adaptive adjustment mechanism greatly improves the individualized accuracy of the assessment and provides a scientific basis for formulating and optimizing personalized treatment plans.
[0062] The synergy of these three core technical ideas forms a closed-loop skin treatment effect evaluation system. From lesion identification and parameter quantification to individualized evaluation, each link is based on the adaptive analysis capabilities of the deep learning model, achieving a comprehensive, objective, and accurate evaluation of the treatment effect of skin lesions. Compared with traditional methods, this invention has significantly improved the objectivity, accuracy, and individualization of the evaluation. It not only solves the technical problems of insufficient objectivity and difficulty in accurate quantification of the evaluation of the treatment effect of skin lesions, but also provides dermatologists with a more scientific treatment decision support tool, which is of great significance to improving the overall level of skin disease treatment.
[0063] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, are used to execute the above-mentioned image-based skin treatment effect evaluation method.
[0064] The third aspect of the present invention provides an image-based skin treatment effect evaluation system, which includes the above-mentioned computer-readable storage medium. The system is any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.
[0065] Specifically, the present invention utilizes multi-level image feature extraction and fusion analysis to accurately quantify and evaluate the effectiveness of skin lesion treatments by constructing a skin spectral analysis model and a three-level lesion region segmentation model. The core of this method is to objectively capture and accurately quantify subtle changes during skin lesion treatment, thereby improving assessment accuracy.
[0066] First, the present invention uses an improved residual network backbone combined with a multi-scale feature extraction module to construct a skin spectral analysis model. This model includes an image encoding module, a multi-scale feature extraction module, a dual attention mechanism module, a hierarchical feature fusion module, and a decoding output module, capable of simultaneously processing RGB color image data and near-infrared spectral data. The multi-scale feature extraction module processes information from different receptive fields through parallel multi-scale convolution branches, preserving the subtle texture features of skin lesions; the dual attention mechanism module fuses spatial attention and channel attention to ensure precise positioning and feature enhancement of the lesion area; and the hierarchical feature fusion module adaptively adjusts the contribution of features at different abstract levels to meet the analysis needs of different types of skin lesions.
[0067] Secondly, a three-level lesion region division model (core lesion area, transition lesion area, and edge impact area) enables refined lesion classification, providing a structured foundation for accurate assessment. This model quantifies the degree of transition between the lesion boundary and normal skin using a boundary transition index and adaptively adjusts the grayscale gradient of edge pixels using hierarchical fusion weights. Pixel-level pigment analysis constructs a pigment distribution stability matrix and a pigment distribution variation matrix, extracting the representative center of pigment concentration and the skewness of pigment distribution, thereby accurately quantifying pigment distribution characteristics.
[0068] In addition, the establishment of a time series image library makes longitudinal comparison possible. By calculating the rate of change of the lesion area, the rate of change of the boundary transition index, and the rate of change of the pigment concentration, the treatment effect can be comprehensively evaluated. The patient's individualized assessment model adjusts the weight of each indicator based on historical treatment data to optimize the assessment accuracy. The entire technical solution forms a closed-loop system. From image acquisition, feature extraction, parameter quantification to effect evaluation, each link is based on the adaptive analysis capabilities of the deep learning model, achieving an objective, accurate, and individualized assessment of the treatment effect of skin lesions. The innovation of this technical principle lies in the combination of deep learning and medical image analysis technology. Through multi-dimensional feature extraction and adaptive weight adjustment mechanism, the subtle changes in the treatment process of skin lesions are converted into quantifiable objective data, thereby solving the technical problems of strong subjectivity and low quantification accuracy in traditional evaluation methods.
[0069] A specific embodiment 1 of the present invention is provided below. The specific implementation of each step in this embodiment 1 is described in detail as follows.
[0070] The specific implementation method of step S01 is to use a standardized image acquisition device to image the affected skin area. The device is equipped with a multispectral imaging system to simultaneously capture RGB color images in the visible spectrum and near-infrared spectrum data in the range of 750 to 1100 nm. During the standardized image acquisition process, the light intensity is controlled at 500 to 600 lx, the imaging distance is maintained at 25 to 30 cm, and a standard color card is used for image correction to ensure the accuracy of color restoration. After the acquisition is completed, the original image data is input into a pre-trained skin spectrum analysis model, which uses a deep learning framework to identify potential lesion areas, extracts image features through a multi-scale convolutional neural network, and combines the attention mechanism to highlight the lesion features. The skin spectrum analysis model is based on the principle of pixel-level semantic segmentation, maps the input image into a segmentation mask with spatial consistency, and applies conditional random field post-processing technology to optimize the segmentation boundary. The model outputs segmentation results for three levels of lesion regions, with the core lesion region set as a high-response value region (response threshold ≥ 0.75), the transitional lesion region set as a medium-response value region (response threshold 0.4-0.75), and the edge-affected region set as a low-response value region (response threshold 0.2-0.4). The purpose of this step is to establish a standardized skin image acquisition process and initially identify lesion regions, laying the foundation for subsequent accurate analysis.
[0071] The specific implementation method of step S02 is to calculate the current boundary based on the three-level lesion area constructed in step S01, apply a high-precision image segmentation algorithm combined with medical expert annotation, and use the lesion development prediction model to estimate the predicted boundary. The current boundary calculation adopts an improved U-Net segmentation network, which uses a residual connection structure to enhance feature propagation and improve segmentation accuracy. The network input is a standardized image and the output is an accurate boundary probability map. The predicted boundary calculation is based on time series analysis and convolutional long short-term memory network to predict the possible expansion or contraction trend of the lesion. The network considers historical treatment response patterns to predict future boundary position changes. The boundary transition index calculation is based on the current boundary pixel grayscale gradient analysis. Specifically, the Sobel operator is used to calculate the gradient amplitude and Gaussian filtering is applied for smoothing. The gradient change rate is defined as the ratio of the standard deviation of the gradient value within 10 pixels around the boundary to the mean value. The calculation formula of the boundary transition index (BTI) is as follows:
[0072]
[0073] Where BTI is the boundary transition index, which ranges from 0 to 1; σ grad is the standard deviation of the gradient value within 10 pixels around the boundary; μ grad It is the average value of the gradient within 10 pixels around the boundary.
[0074] The boundary transition index ranges from 0 to 1. A value ≤ 0.3 indicates a clear boundary, and a value ≥ 0.7 indicates a fuzzy boundary. level ) is adaptively adjusted according to the boundary transition index, and the adjustment formula is:
[0075]
[0076] Where W level is the hierarchical fusion weight vector; w1 is the high-level feature weight; w2 is the middle-level feature weight; w3 is the low-level feature weight; BTI is the boundary transition index.
[0077] When the boundary transition index is high, the weight of low-level features is increased to retain more texture details. When the boundary transition index is low, the weight of high-level features is increased to obtain more abstract semantic information. The purpose of this step is to accurately quantify the boundary characteristics of lesions and establish a dynamic feature fusion mechanism that adapts to the boundary characteristics of different types of lesions.
[0078] The specific implementation of step S03 is to perform pixel-level pigment analysis on the third-level lesion area. First, the RGB color image is converted into a color space, and the RGB space is converted into a Lab* color space to more accurately express the skin pigment characteristics. Adaptive histogram equalization is used to enhance the image contrast, and a bilateral filtering algorithm is applied to reduce noise while retaining edge information. The construction of the pigment distribution stability matrix (S) and the pigment distribution change matrix (V) is based on time series image analysis. The stable area and the change area are identified by calculating the pigment distribution covariance matrix of the images at multiple time points. Pigment distribution time series variance The calculation formula is as follows:
[0079]
[0080] Where, is the time series variance of the pigment distribution at the coordinate point (x, y); T is the length of the time series; P t (x, y) is the pigment concentration value at the coordinate point (x, y) at time t; is the time average value of the pigment concentration at the coordinate point (x, y).
[0081] Based on the time series variance of pigment distribution, the formulas for constructing the pigment distribution stability matrix (S) and the pigment distribution change matrix (V) are as follows:
[0082]
[0083] Where S(x, y) is the value of the pigment distribution stability matrix at the coordinate point (x, y); V(x, y) is the value of the pigment distribution change matrix at the coordinate point (x, y); θ stable is the stability threshold, and its typical value is 0.05.
[0084] The sampling granularity (G) is dynamically adjusted according to the boundary transition index, and its adjustment formula is:
[0085]
[0086] Where G is the sampling granularity, in pixels; BTI is the boundary transition index; Indicates a floor operation.
[0087] The purpose of this step is to establish an accurate mathematical representation of the pigment distribution, distinguish between stable pigment regions and variable pigment regions, and adaptively adjust the analysis accuracy based on the boundary characteristics.
[0088] The specific implementation of step S04 is to extract the representative center of pigment concentration based on the pigment distribution stability matrix constructed in step S03. The pigment concentration representative center is calculated using a weighted centroid algorithm, and the pigment concentration value is used as a weight factor to calculate the geometric center of the pigment distribution in the lesion area. rep ) is calculated as follows:
[0089]
[0090] Where C rep is the center coordinate vector representing the pigment concentration; x rep and y rep are the horizontal and vertical coordinates representing the center respectively; P(x, y) is the pigment concentration value at the coordinate point (x, y); S(x, y) is the value of the pigment distribution stability matrix at the coordinate point (x, y); M(x, y) is the effective pigment area mask, when P(x, y)>θ pigment When M(x, y) = 1, otherwise M(x, y) = 0, θ pigment is the pigment threshold, with a typical value of 0.3.
[0091] Pigment distribution skew is a quantitative indicator of lesion asymmetry and is obtained by calculating the third moment of the pigment distribution relative to the representative center. The calculation formula for pigment distribution skew is as follows:
[0092]
[0093] In the formula, Skew x and Skew y are the skewness values in the horizontal and vertical directions respectively; Skew is the modulus of the synthetic two-dimensional skewness vector, which characterizes the overall asymmetry of the pigment distribution.
[0094] Feature fusion weight (W feature ) is automatically generated based on the structural features of the third-level lesion area, and its calculation formula is:
[0095]
[0096] Where W feature is the feature fusion weight vector; w core 、w transition and w edge are the weight coefficients of the core lesion area, transitional lesion area and edge influence area respectively; A core 、A transition and A edge are the areas of the three-level lesion areas; A total is the total lesion area, equal to A core +A transition +A edge ; C b is the boundary complexity, defined as the square of the boundary perimeter divided by 4π times the area; SF is the shape factor, defined as the ratio of the maximum inscribed circle radius to the minimum circumscribed circle radius.
[0097] The purpose of this step is to quantify the central tendency and asymmetry of the lesion pigment distribution and provide objective indicators for the evaluation of treatment efficacy.
[0098] The specific implementation of step S05 is to establish a time series image library to store standardized images at different time points. The image library is organized in a hierarchical index structure and a multi-level index is established according to patient ID, treatment stage and acquisition date. The time series comparative analysis uses image registration technology to ensure the spatial correspondence between images at different time points. Specifically, feature point matching and affine transformation are used to achieve image alignment, and the registration accuracy is controlled within 2 pixels. The rate of change of the area of lesion (R area ), boundary transition index change rate (R BTI ) and pigment concentration change rate (R pigment ) is calculated as follows:
[0099]
[0100] Where R area A is the rate of change of the lesion area; after and A before are the lesion area before and after treatment; R BTI BTI is the rate of change of boundary transition index; after and BTI before are the boundary transition index before and after treatment, respectively; R pigment is the pigment concentration change rate; P avg,after and P avg,before The mean values of pigment concentrations before and after treatment are shown respectively.
[0101] Data filtering uses similarity threshold (θ sim) identifies effective changes and noise interference. The calculation of similarity (Sim) is based on the structural similarity index (SSIM), which is calculated as follows:
[0102]
[0103] Where Sim is the structural similarity; μ x and μ y are the local area means of the two images respectively; and are the local area variances of the two images respectively; σ xy is the local region covariance of the two images; C1 and C2 are stability constants, with typical values of (0.01×L) 2 and (0.03×L) 2 , where L is the dynamic range of pixel values, usually 255.
[0104] Similarity threshold (θ sim ) is determined based on statistical analysis of historical change trends, with a typical value set between 0.8 and 0.9. Changes above this threshold are considered significant, while changes below this threshold are considered noise. The purpose of this step is to establish a systematic time series comparative analysis framework, calculate key change indicators, and filter out noise interference to ensure the reliability of the evaluation indicators.
[0105] The specific implementation of step S06 is to construct a comprehensive treatment effect score based on the change rate index calculated in step S05. The score calculation adopts a weighted summation method, assigning weight coefficients to the change rate of the lesion area, the change rate of the boundary transition index, and the change rate of the pigment concentration for weighted fusion. The calculation formula of the comprehensive treatment effect score (Score) is as follows:
[0106]
[0107] Where, Score is the comprehensive treatment effect score, ranging from 0 to 100 points; a 、w b and w p are the weight coefficients of the change rate of the lesion area, the change rate of the boundary transition index, and the change rate of the pigment concentration, and their initial values are set to 0.4, 0.3, and 0.3, respectively; R area 、R BTI and R pigment are the change rate of the lesion area, the change rate of the boundary transition index, and the change rate of the pigment concentration; R area , max 、R BTI , max and R pigment , maxThe theoretical maximum values of each change rate indicator are used for normalization. A negative sign indicates that a negative change rate (i.e., a decrease in area, a decrease in boundary transition index, or a decrease in pigment concentration) corresponds to an improvement in treatment effect.
[0108] The comprehensive score ranges from 0 to 100 points. A score of 80 or higher indicates significant improvement, a score of 60 to 79 indicates moderate improvement, a score of 40 to 59 indicates mild improvement, a score of 20 to 39 indicates slight improvement, and a score of <20 indicates no significant improvement. Heatmap generation uses color mapping technology to map the comprehensive score value to a color gradient. The specific mapping relationship is: red (RGB: 255, 0, 0) indicates the area where the condition worsens (score <0), green (RGB: 0, 255, 0) indicates the area where the condition significantly improves (score ≥80), yellow (RGB: 255, 255, 0) indicates the area where the condition slightly improves (score 20 to 60), and blue (RGB: 0, 0, 255) indicates the area where the condition stabilizes (score 0 to 20). The heatmap (H) generation formula is as follows:
[0109] H(x, y) = C map (Score local (x, y));
[0110] Where H(x, y) is the color value of the heat map at the coordinate point (x, y); C map is the color mapping function; S corelocal (x, y) is the local treatment effect score at the coordinate point (x, y).
[0111] During heatmap generation, feature fusion weights are used to optimize heatmap quality. Weights for different feature channels are assigned based on the semantic information of the three-level lesion regions, improving the accuracy and interpretability of the visual representation. This step aims to construct intuitive treatment effect evaluation metrics and visualizations, providing clear feedback on treatment progress for doctors and patients.
[0112] The specific implementation of step S07 is to establish a patient individualized assessment model. This model is based on the principle of machine learning and uses a gradient boosting decision tree algorithm to learn the correlation between the patient's historical treatment data and treatment effects. The mathematical expression of the individualized assessment model adopts the additive model form:
[0113]
[0114] Where f(x) is the model output; x is the input feature vector, including basic patient information, historical treatment records, lesion characteristic parameters and treatment response indicators; M is the total number of weak learners; β i is the weight coefficient of the i-th weak learner; h i (x) is the output of the i-th weak learner.
[0115] The weak learner adopts a decision tree structure, and its splitting criterion is based on the feature importance score. The calculation formula of the importance score (I) is:
[0116]
[0117] Where I(f) is the importance score of feature f; j is the node index in the decision tree; v(j) is the split feature of node j; i j is the purity gain of node j.
[0118] Indicator weight vector (W indicator ) is optimized using the Bayesian optimization framework, treating weights as hyperparameters and continuously optimizing weight configuration by maximizing historical evaluation accuracy. The optimization objective function is:
[0119]
[0120] Where, is the optimized indicator weight vector; Acc(W indicator ) is the evaluation accuracy under a given weight vector, which is defined as the weighted Kappa coefficient of the model score and the doctor score.
[0121] The evaluation accuracy of the comprehensive treatment effect score was measured by the consistency between the scores of clinicians and the weighted Kappa coefficient (κ w ) evaluation, and its calculation formula is:
[0122]
[0123] Where, κ w is the weighted Kappa coefficient; w i,j is the difference weight matrix, which indicates the degree of difference between different rating levels; i,j is the joint frequency of observed ratings i and j; E i,j is the expected joint frequency of rating i and rating j, calculated based on the marginal distribution.
[0124] Level fusion weight parameter (W level ) Adaptive adjustment uses the back propagation algorithm to update the weight parameters according to the evaluation error gradient. The update formula is:
[0125]
[0126] Where W level is the layer fusion weight parameter; η is the learning rate, set to 0.01~0.05; E is the evaluation error; is the gradient of the evaluation error with respect to the weight parameters.
[0127] The purpose of this step is to achieve individualized customization of treatment evaluation, improve evaluation accuracy and provide data support for personalized treatment plans.
[0128] The detailed architecture of the skin spectral analysis model is based on an improved residual network backbone combined with a multi-scale feature extraction module. The image encoding module utilizes five consecutive convolutional blocks, each consisting of two 3×3 convolutional layers followed by batch normalization and ReLU activation. Max pooling layers are used between convolutional blocks for downsampling, increasing the number of feature channels from 64 to 512 layer by layer. The multi-scale feature extraction module consists of four parallel branches, using 1×1, 3×3, 5×5, and 7×7 convolutional kernels to capture texture information at different scales. The output feature maps of each branch are reweighted and concatenated using a channel-wise attention mechanism to form a multi-scale feature representation. The dual attention mechanism module combines spatial attention and channel-wise attention. Spatial attention generates an attention mask by calculating the spatial response of the feature map, while channel-wise attention generates a channel weight vector through global average pooling followed by a fully connected layer. The outputs of the two attention mechanisms are fused through a gating mechanism to enhance the feature representation of key regions. The hierarchical feature fusion module uses a skip connection structure to fuse features from different encoder layers with features from the corresponding decoder layers. Hierarchical fusion weights are applied during the fusion process to control the contribution of features at different abstraction levels. Initial weights are set at 0.3 for shallow features, 0.4 for mid-level features, and 0.3 for deep features. The decoder output module uses transposed convolution for feature upsampling and adjusts the number of channels through 1×1 convolution to generate the segmentation mask and quantitative indicator matrix.
[0129] The training dataset for the skin spectral analysis model was constructed in detail. First, 10,000 clinical images of various skin pigmentation disorders, including macules, melasma, moles, senile plaques, and hyperplasia, were collected from dermatology departments at 15 tertiary hospitals. These images covered six major skin tones and patient age groups. All images were acquired using standardized imaging equipment to ensure consistent lighting conditions and acquisition parameters. Eight senior dermatologists (with ≥15 years of professional experience) carefully annotated each image. The annotations included demarcation of three-level lesion areas and a 0-5 scale for pigmentation severity. Inter-expert agreement was assessed using the Fleiss Kappa coefficient. Annotations with a coefficient of 0.85 or higher were considered high-quality ground truth. Data augmentation included random rotation (±20°), horizontal and vertical flipping, brightness adjustment (±15%), contrast adjustment (±10%), and simulated image changes under four typical lighting conditions. Ten enhanced images were generated for each original image. All processed images were normalized to a 512×512 pixel resolution, and RGB image data, near-infrared spectral data in the 750–1100 nm range, and tissue depth information collected by the skin analysis device were extracted to construct a multimodal input dataset. The complete dataset was ultimately divided into a training set (70,000 images), a validation set (10,000 images), and a test set (20,000 images) in a 7:1:2 ratio to ensure a balanced distribution of cases and severity levels across the three datasets, preventing data distribution bias from impacting model performance.
[0130] The skin spectral analysis model training process first initialized the model backbone network using ImageNet pre-trained weights to improve feature extraction efficiency and model convergence speed. A two-stage training strategy was employed. In the first stage, the encoder parameters were fixed, and only the decoder was trained. Fast adaptation was achieved using a learning rate of 0.001, a batch size of 16, and 20 training epochs. In the second stage, all network layers were unfrozen, and end-to-end fine-tuning was performed using a learning rate of 0.0001, a batch size of 8, and 50 training epochs to improve overall performance. A combination of loss functions was applied during training, including a weighted cross-entropy loss (weight coefficient 0.5), a Dice loss (weight coefficient 0.3), and a structural similarity loss (weight coefficient 0.2) to optimize segmentation, and a mean squared error loss to optimize pigmentation prediction. Adaptive class weights were set for different lesion types, with weights of 5 to 10 for rare lesions and 1 for common lesions to address sample imbalance. A cosine annealing learning rate scheduling strategy was employed, with an initial learning rate of 0.001, a minimum learning rate of 0.00001, and a training period of 10 epochs. An early stopping mechanism was introduced to prevent overfitting by terminating training if performance did not improve for five consecutive validation cycles. Finally, model performance was evaluated on the validation set, and the checkpoint with an average Intersection-Over-Union ratio (IoU) of ≥0.85 for boundary segmentation, a Kappa coefficient of agreement between pigment assessment and experts of ≥0.8, and the best generalization performance on the test set was selected as the final model.
[0131] To better understand and implement the present invention, Example 2 of a specific application scenario of the present invention is provided below: Researchers selected 30 patients with melasma for a 12-week follow-up study using the skin treatment efficacy evaluation method of the present invention. Before the experiment began, the affected skin areas of all patients were imaged using a standardized image acquisition device configured with an illumination intensity of 550 lx and an imaging distance of 27 cm. RGB color images and near-infrared spectral data in the 750-1100 nm range were simultaneously acquired. The acquired standardized images were then input into a pre-trained skin spectral analysis model, which had been trained on 85,000 images of various skin lesions and achieved a recognition accuracy of 95%. Through model analysis, the patients' melasma lesions were divided into core lesion areas (response threshold ≥ 0.75), transitional lesion areas (response threshold 0.4-0.75), and edge-affected areas (response threshold 0.2-0.4). The initial three-level lesion area statistics for the 30 patients are shown in Table 1.
[0132] Table 1 Statistics of the initial three-level lesion area of patients (unit: mm 2 )
[0133]
[0134]
[0135] The researchers used a high-precision image segmentation algorithm combined with annotations from three dermatologists to calculate the current boundary. A convolutional long-short-term memory network model, built based on historical treatment data, was used to predict boundary trends. The boundary transition index (BTI) was calculated using the Sobel operator and smoothed using a Gaussian filter (σ = 1.5). The distribution of the initial BTI for each patient is shown in Table 2.
[0136] Table 2 Distribution of patients' initial boundary transition index
[0137] Boundary transition index range Number of patients Proportion (%) Boundary feature description 0.10~0.30 7 23.3 Clear boundaries 0.31~0.50 12 40.0 Clearer boundaries 0.51~0.70 8 26.7 Blurred boundaries 0.71~0.90 3 10.0 Blurred boundaries
[0138] The hierarchical fusion weights were adaptively adjusted based on the boundary transition index. For patients with clear boundaries (BTI ≤ 0.3), the high-level feature weights were set to 0.51–0.60, the mid-level feature weights were set to 0.30–0.33, and the low-level feature weights were set to 0.10–0.16. For patients with blurred boundaries (BTI ≥ 0.7), the high-level feature weights were set to 0.39–0.42, the mid-level feature weights were set to 0.36–0.38, and the low-level feature weights were set to 0.22–0.24. Subsequently, the researchers performed pixel-level pigment analysis on the patients' third-level lesions. The pigment distribution covariance matrix of the multi-time point images was calculated (with a stability threshold of 0.05) to construct the pigment distribution stability matrix and the pigment distribution change matrix. A weighted centroid algorithm was used to calculate the representative center of the pigment concentration. The skewness value was obtained by calculating the third-order moment of the pigment distribution relative to the representative center as an indicator of lesion asymmetry. The skewness statistics of the initial pigment distribution of the patients are shown in Table 3.
[0139] Table 3 Statistics of initial pigment distribution skewness of patients
[0140] Skewness range Number of patients Proportion (%) Distribution characteristics description 0.00~0.50 5 16.7 Nearly symmetrical distribution 0.51~1.00 14 46.7 Mildly asymmetric distribution 1.01~1.50 8 26.6 Moderately asymmetric distribution 1.51~2.00 3 10.0 Highly asymmetric distribution
[0141] After laser treatment, the researchers repeatedly collected standardized images at three time points: 4 weeks, 8 weeks, and 12 weeks, established a time series image library, and achieved image registration through feature point matching and affine transformation (the average registration error was controlled at 1.78 pixels). The change rates of three key indicators at 12 weeks were calculated: the change rate of the lesion area, the change rate of the boundary transition index, and the change rate of the pigment concentration. The similarity threshold (set to 0.85) was applied to filter out noise interference. Finally, the comprehensive treatment effect scoring formula was used to calculate the overall evaluation score, and the initial weights were set as: 0.4 for the change rate of the lesion area, 0.3 for the change rate of the boundary transition index, and 0.3 for the change rate of the pigment concentration. The change rates of key indicators and the comprehensive scores after 12 weeks of treatment are shown in Table 4.
[0142] Table 4 Change rate of key indicators and comprehensive score after 12 weeks of treatment
[0143]
[0144]
[0145] Figure 3 A comparison chart of treatment outcomes for a particular patient is presented, with sub-graph A showing a skin image at the start of treatment and sub-graph B showing a skin image 12 weeks after treatment. The researchers then applied a patient-specific assessment model using a gradient boosting decision tree algorithm (with 100 trees and a learning rate of 0.03) to learn the correlation between the patient's historical treatment data and treatment outcomes. The Bayesian optimization framework was then used to optimize the indicator weights. The optimized individualized indicator weights are shown in Table 5.
[0146] Table 5 Optimized individual indicator weights
[0147]
[0148] A hierarchical fusion weight parameter adaptive adjustment algorithm (with a learning rate set to 0.02) was used to update the weight parameters according to the evaluation error gradient. The final evaluation accuracy was evaluated by the weighted Kappa coefficient with the clinician's score. The evaluation results of this method achieved a consistency of 0.87 (high consistency) with the clinician's score, which is superior to traditional evaluation methods. Traditional skin treatment effect evaluation mainly relies on the doctor's subjective judgment or simple area measurement, lacking quantitative analysis of boundary characteristics and pigment distribution. In traditional methods, the consistency between doctor scores and objective quantitative indicators is usually around 0.75, and the evaluation process is time-consuming. The difference in scores between clinicians reaches 15-20%. However, the present invention achieves an objective quantitative evaluation of treatment effect by introducing technical means such as skin spectral analysis model, three-level lesion area division, boundary transition index, and pigment distribution stability matrix. The difference in scores between doctors is reduced to 5-8%, and the evaluation efficiency is improved by about 18%. At the same time, it can provide patients with an intuitive visualization of treatment progress heat map. Compared with traditional methods, the present invention is more objective and accurate, providing a more comprehensive skin treatment effect evaluation solution, providing strong support for precision medicine and individualized treatment plan optimization.
[0149] It should be noted that the variables involved in the present invention are explained in detail as shown in Tables 6 and 7 below.
[0150] Table 6 Variable Explanation Table (Part 1)
[0151]
[0152]
[0153] Table 7 Variable Explanation Table (Part 2)
[0154]
[0155]
[0156] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.
Claims
1. A method for evaluating skin treatment effects based on images, characterized in that: The following steps are involved: Standardized images of the affected skin area are collected, and the skin spectral analysis model is applied to identify the lesion area, and a three-level lesion area division model is constructed. The skin spectral analysis model is used to calculate the current boundary and predicted boundary in the three-level lesion area, and the boundary transition index is determined by adjusting the grayscale gradient change of edge pixels through hierarchical fusion weights. Pixel-level pigment analysis was performed on the third-level lesion area to construct a pigment distribution stability matrix and a pigment distribution change matrix; the representative center of pigment concentration was extracted using the pigment distribution stability matrix, and the pigment distribution skewness was calculated as a quantitative indicator of lesion asymmetry by combining feature fusion weights; a time series image library was established, and the area change rate of the lesion region, the boundary transition index change rate, and the pigment concentration change rate were calculated by comparing standardized images at different time points; the comprehensive treatment effect score was calculated by combining the lesion area change rate, the boundary transition index change rate, and the pigment concentration change rate, and a heat map based on the third-level lesion region was generated to show the treatment progress; a patient-individualized evaluation model was established, and the indicator weights were adjusted according to historical treatment data to optimize the evaluation accuracy of the comprehensive treatment effect score and output it.
2. The method according to claim 1, characterized in that The standardized images include RGB color image data and near-infrared spectrum data of the affected skin area; the process of constructing the pigment distribution stability matrix and the pigment distribution change matrix dynamically adjusts the sampling granularity according to the boundary transition index; Feature fusion weights are automatically generated based on the structural features of the three-level lesion region.
3. The method according to claim 2, characterized in that The tertiary lesion area refers to three nested areas that are precisely divided in a progressive manner, namely the core lesion area, the transitional lesion area and the edge-affected area. The core lesion area contains obvious lesion tissue, the transitional lesion area contains slightly lesion tissue, and the edge-affected area contains tissue that may be affected but is visually normal.
4. The method according to claim 3, characterized in that The current boundary refers to the actual edge line of the lesion detected during the current treatment evaluation, which is determined by a high-precision image segmentation algorithm combined with medical expert annotation; the predicted boundary refers to the prediction of the possible expansion or contraction boundary position in the next stage based on the lesion development model, which is used to warn of the trend of changes in the disease.
5. The method according to claim 4, characterized in that The boundary transition index is a quantitative measure of the transition between the lesion boundary and normal skin. A higher value indicates a more blurred boundary, while a lower value indicates a clearer boundary. The calculation is based on the gradient change rate of boundary pixels. Hierarchical fusion weights refer to parameters used to control the importance of features at different abstraction levels in the skin spectral analysis model.
6. The method according to claim 5, characterized in that The pigment distribution stability matrix refers to a mathematical matrix constructed to maintain a relatively stable pigment distribution area within the lesion area, representing the stable pigmentation characteristics in the lesion; The pigment distribution change matrix refers to a mathematical matrix constructed based on the changes in pigment distribution in the lesion area over time or during the treatment process, which characterizes the dynamic changes in pigmentation characteristics in the lesion.
7. The method according to claim 6, characterized in that The representative center of pigment concentration refers to the weighted geometric center of pigment distribution within the lesion area. The pigment concentration is considered as a weight factor during calculation to reflect the tendency of the pigment distribution center. Pigment distribution skewness refers to the degree of asymmetry of the pigment distribution relative to the pigment concentration. It is obtained by calculating the third-order moment of the pigment distribution and is used to quantify the irregularity of the pigment distribution in the lesion.
8. The method according to claim 7, characterized in that The specific structure of the skin spectrum analysis model is to build an image analysis framework based on an improved residual network backbone network combined with a multi-scale feature extraction module, which includes an image encoding module, a multi-scale feature extraction module, a dual attention mechanism module, a hierarchical feature fusion module and a decoding output module.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the image-based skin treatment effect evaluation method according to any one of claims 1 to 8.
10. An image-based skin treatment effect evaluation system, characterized in that: The computer-readable storage medium according to claim 9 is included, the system is any one of a computer, a server, and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
Citation Information
Cited By
Grape wine color spot identification-curative effect evaluation system based on multi-modal characteristics and electronic equipment
CN121237388A