A training method and system for dermoscopy image segmentation model

Through image color correction and denoising modules, image sample enhancement and over- and undersampling balance, combined with multi-scale feature fusion and adaptive learning rate adjustment, the segmentation accuracy problem of the dermatoscope image segmentation model under complex background and lighting conditions is solved, and more efficient lesion area segmentation is achieved.

CN120070899BActive Publication Date: 2025-10-17SANYA CENT HOSPITAL (THE THIRD PEOPLES HOSPITAL OF HAINAN PROVINCE)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510541618.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-10-17
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

The existing dermatoscope image segmentation model has poor segmentation accuracy when dealing with complex backgrounds and different lighting conditions, resulting in insufficient generalization ability and affecting application effects.

Method used

Color offset correction and lossy blur removal are performed through the image color correction and denoising modules. Combined with image sample enhancement and over-sampling and under-sampling balance, a multi-scale feature fusion segmentation network based on convolutional neural networks is constructed, and an adaptive learning rate adjustment strategy is used for model training optimization.

Benefits of technology

The segmentation accuracy and generalization ability of the dermatoscope image segmentation model are improved, the recognition ability of complex lesion areas is enhanced, and the model training efficiency and the accuracy of lesion area segmentation are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070899B_ABST
    Figure CN120070899B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and particularly relates to a training method and system for a dermoscope image segmentation model. The system comprises an image color correction and noise removal module, an image sample enhancement balancing module, a segmentation model construction module, and a segmentation model training optimization module. Multiple source dermoscope images can be obtained for color offset correction processing, and simultaneously, scattering loss blur removal and image sample enhancement are performed to generate dermoscope enhanced image samples. The dermoscope enhanced image samples are subjected to over / under sampling balancing processing to generate dermoscope proportionally balanced image samples. A lesion area segmentation network is constructed in combination with a multi-scale feature fusion module and an attention mechanism, and segmentation model training optimization is performed in combination with an adaptive learning rate adjustment strategy to generate a dermoscope image segmentation optimization model. The dermoscope image lesion area segmentation result is output at the last layer in the lesion area segmentation network. The present application improves the accuracy of skin lesion area segmentation based on image processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to a training method and system for a dermoscope image segmentation model. BACKGROUND

[0002] Dermoscopy can provide detailed information of skin lesion area through high magnification and optical imaging technology, and with the continuous development of dermoscopy technology, its application in early detection of skin cancer (especially melanoma) is becoming more and more widespread. In dermoscope image analysis, image segmentation is one of the key steps, which aims to separate the lesion area of interest from the dermoscope image for subsequent feature extraction and classification. In recent years, the rapid development of deep learning technology has enabled convolutional neural networks (CNN) to achieve outstanding results in image segmentation tasks. However, although there are many methods for medical image segmentation, there are still some problems when applied to dermoscope images, for example, existing models often perform poorly in handling complex backgrounds, different lighting conditions and skin types, resulting in decreased segmentation accuracy, which further affects the generalization ability and application effect of the model. SUMMARY

[0003] Therefore, it is necessary to provide a training method and system for a dermoscope image segmentation model to solve at least one of the above technical problems.

[0004] To achieve the above-mentioned purpose, a training system for a dermoscope image segmentation model includes the following modules:

[0005] An image color correction and noise removal module is used to obtain multi-source dermoscope images; corresponding dermoscope spectral images under R, G and B color channels are obtained through the multi-source dermoscope images, and color offset correction processing is performed on the multi-source dermoscope images based on the corresponding dermoscope spectral images under R, G and B color channels to generate dermoscope color offset correction images; the dermoscope color offset correction images are subjected to scatter loss blur removal and standardization processing to generate dermoscope standardized images;

[0006] An image sample enhancement balancing module is used to perform image sample enhancement on the dermoscope standardized images to obtain dermoscope enhanced image samples; the dermoscope enhanced image samples are subjected to over-sampling balancing processing to generate dermoscope proportionally balanced image samples;

[0007] A segmentation model construction module is used to construct a lesion area segmentation network based on a convolutional neural network combined with a multi-scale feature fusion module and an attention mechanism to generate a dermoscope image segmentation model;

[0008] The segmentation model training optimization module is configured to perform segmentation model training optimization on the dermoscope image segmentation model based on the dermoscope proportion balance image sample and in combination with an adaptive learning rate adjustment strategy, to generate a dermoscope image segmentation optimization model, and output a corresponding dermoscope image lesion area segmentation result at the last layer in the lesion area segmentation network.

[0009] Further, the image color correction and noise removal module includes the following functions:

[0010] Obtaining a multi-source dermoscope image;

[0011] Obtaining corresponding dermoscope spectral images under R, G, and B color channels through the multi-source dermoscope image, and performing color offset correction processing on the multi-source dermoscope image based on the corresponding dermoscope spectral images under R, G, and B color channels, to generate a dermoscope color offset correction image;

[0012] Performing contrast enhancement on the dermoscope color offset correction image using histogram equalization, to obtain a dermoscope contrast enhancement image;

[0013] Performing pixel blur analysis on the dermoscope contrast enhancement image, to obtain dermoscope image pixel blur;

[0014] Performing scatter loss blur removal and pixel standardization processing on each pixel block in the dermoscope contrast enhancement image based on the dermoscope image pixel blur, to generate a dermoscope standardization image.

[0015] Further, the obtaining corresponding dermoscope spectral images under R, G, and B color channels through the multi-source dermoscope image, and performing color offset correction processing on the multi-source dermoscope image based on the corresponding dermoscope spectral images under R, G, and B color channels includes:

[0016] Performing RGB color channel decomposition on the multi-source dermoscope image under different color channel wavelengths, to generate corresponding dermoscope spectral images under R, G, and B color channels;

[0017] Performing local area brightness analysis on the corresponding dermoscope spectral images under R, G, and B color channels, to obtain corresponding local area brightness features under R, G, and B color channels, including local area brightness distribution mean and local area brightness distribution variance;

[0018] Performing image color offset calculation on the corresponding dermoscope spectral images based on the corresponding local area brightness features under R, G, and B color channels, to obtain dermoscope image color offset amounts under R, G, and B color channels;

[0019] channel color adjustment analysis on the corresponding dermoscopy spectral image based on the corresponding dermoscopy image color offset in the R, G and B color channels to obtain the corresponding dermoscopy image color adjustment amplitude and adjustment direction in the R, G and B color channels;

[0020] color offset correction processing on the corresponding dermoscopy spectral image in the corresponding color channel based on the corresponding dermoscopy image color adjustment amplitude and adjustment direction in the R, G and B color channels, to correct the corresponding color value of each pixel block in the dermoscopy spectral image according to the corresponding dermoscopy image color adjustment amplitude and adjustment direction, to generate a dermoscopy color offset correction image.

[0021] Further, the color offset correction processing on the corresponding dermoscopy spectral image in the corresponding color channel based on the corresponding dermoscopy image color adjustment amplitude and adjustment direction in the R, G and B color channels includes:

[0022] channel adjustment evaluation calculation according to the corresponding dermoscopy image color adjustment amplitude and adjustment direction in the R, G and B color channels to obtain the corresponding dermoscopy color channel adjustment coefficient in the R, G and B color channels;

[0023] corresponding dermoscopy image spectral characteristics in the R, G and B color channels, and based on the corresponding dermoscopy image spectral characteristics in the corresponding color channel and in combination with the corresponding dermoscopy color channel adjustment coefficient in the R, G and B color channels, color offset simulation is performed on the corresponding color channel to generate the corresponding dermoscopy image color offset mechanism in the R, G and B color channels;

[0024] color value offset correction on the corresponding color value of each pixel block in the corresponding dermoscopy spectral image in the corresponding color channel based on the corresponding dermoscopy image color offset mechanism in the R, G and B color channels and according to the corresponding dermoscopy color channel adjustment coefficient, to generate the corresponding local color offset correction matrix in the R, G and B color channels, including the corresponding color offset value of each pixel block in the corresponding color channel;

[0025] pixel-by-pixel color correction reconstruction processing on each pixel block in the corresponding dermoscopy spectral image in the corresponding color channel based on the corresponding local color offset correction matrix in the R, G and B color channels, to generate a dermoscopy color offset correction image.

[0026] Further, the pixel-by-pixel color correction reconstruction processing on each pixel block in the corresponding dermoscopy spectral image in the corresponding color channel based on the corresponding local color offset correction matrix in the R, G and B color channels includes:

[0027] Based on the pixel blur of the dermatoscope image, each pixel block in the dermatoscope contrast-enhanced image is subjected to pixel blur division, so as to compare and judge the pixel blur corresponding to each pixel block according to a preset pixel blur threshold. If the pixel blur is greater than the preset pixel blur threshold, the corresponding pixel block is determined as a scattering blurred pixel block; if the pixel blur is equal to the preset pixel blur threshold, the corresponding pixel block is determined as a noise blurred pixel block; if the pixel blur is less than the preset pixel blur threshold, the corresponding pixel block is determined as a clear pixel block;

[0028] Denoising the corresponding scattering blurred pixel blocks and noise blurred pixel blocks in the dermatoscope contrast-enhanced image. For the scattering blurred pixel blocks, the light scattering degree is calculated to compensate for the light scattering loss corresponding to the pixel blocks. For the noise blurred pixel blocks, the corresponding noise blurred areas are enclosed and the noise interference of the noise blurred areas is removed by using median filtering to generate the dermatoscope de-noised image.

[0029] Perform pixel mean and variance analysis on the dermoscopic blur and denoising image to obtain the dermoscopic image pixel mean and dermoscopic image pixel variance;

[0030] The dermoscopic blurred denoised image is pixel-normalized based on the dermoscopic image pixel mean and dermoscopic image pixel variance to generate a dermoscopic normalized image.

[0031] Furthermore, the step of calculating the light scattering degree for the scattered blurred pixel block to compensate for the light scattering loss corresponding to the pixel block includes:

[0032] Performing spectral scattering analysis on the scattering blur pixel block to statistically analyze the scattering wavelength and scattering blur distortion corresponding to the pixel block, and forming a feature vector based on the scattering wavelength and scattering blur distortion to generate a spectral scattering blur feature vector;

[0033] Obtain the environmental factors, object surface material, and light source angle corresponding to the pixel block through the scattering blur pixel block, and perform scattering intensity prediction calculation based on the environmental factors, object surface material, and light source angle corresponding to the pixel block and combined with the spectral scattering blur feature vector to obtain the light scattering degree corresponding to the pixel block;

[0034] Obtaining the theoretical light scattering intensity corresponding to the pixel block by scattering the blurred pixel block, and performing a scattering loss compensation calculation based on the light scattering degree corresponding to the pixel block and the corresponding theoretical light scattering intensity to obtain a scattering loss compensation factor;

[0035] The light scattering loss corresponding to the pixel block is compensated based on the scattering loss compensation factor.

[0036] Furthermore, the image sample enhancement and balancing module includes the following functions:

[0037] The dermoscope standard image is enhanced by image samples, to enhance the corresponding dermoscope image samples under different conditions by random rotation, flipping, scaling, cropping, brightness adjustment and contrast adjustment operations, to obtain dermoscope enhanced image samples;

[0038] The lesion area proportion analysis is performed on the dermoscope enhanced image samples to quantitatively calculate the proportion value between the lesion samples and the normal samples in the dermoscope image samples, and the dermoscope image sample lesion proportion is obtained.

[0039] The over-sampling balance processing is performed on the dermoscope enhanced image samples based on the dermoscope image sample lesion proportion, wherein the over-sampling balance processing is specifically that if the dermoscope image sample lesion proportion shows that the lesion samples are much less than the normal samples, the over-sampling operation is performed on the corresponding lesion samples in the dermoscope enhanced image samples to increase the number of samples corresponding to the minority class by using the generative adversarial network to copy the samples corresponding to the minority class, and the under-sampling operation is performed on the corresponding normal samples in the dermoscope enhanced image samples to reduce the number of samples corresponding to the majority class, to generate the dermoscope proportion balanced image samples.

[0040] Further, the segmentation model construction module includes the following functions:

[0041] A 3-layer 5x5 convolution layer, a 3x3 convolution layer and a 1x1 pooling layer are designed by a convolutional neural network, and each layer is connected and constructed into a corresponding dermoscope image segmentation network architecture by a connection channel layer.

[0042] The multi-scale feature fusion module is combined with the different convolution layers in the dermoscope image segmentation network architecture, so that the 3x3 shallow lesion high-resolution features and the 5x5 deep lesion semantic features are fused by introducing the skip connection and the feature fusion operation in the multi-scale feature fusion module, so that the features of different scales are adjusted to the same size for splicing and fusion by up-sampling and down-sampling operations in the pooling layer, and the lesion area segmentation network is constructed by introducing the attention mechanism in the connection channel layer between each layer to improve the segmentation ability of different scale lesion areas, wherein the attention mechanism is composed of a channel attention module and a spatial attention module, wherein the channel attention module is arranged in the connection channel layer between the convolution layer and the pooling layer in each layer to automatically learn the importance between each connection channel layer; and the spatial attention module is arranged in each connection channel layer between the 3-layer network architecture space to focus on the corresponding lesion area in the dermoscope image sample to enhance the expression of the network to the segmentation task of the lesion area, to generate the dermoscope image segmentation model.

[0043] Further, the segmentation model training optimization module includes the following functions:

[0044] The dermoscope proportion balancing image sample is divided into training image samples, verification image samples and test image samples by a proportion of 7:2:1;

[0045] The training image samples are input into the dermoscope image segmentation model for segmentation model training, and the verification image samples are input into the trained dermoscope image segmentation model for training loss analysis, so as to train and calculate the cross-entropy loss for the lesion classification task and the Dice loss for the lesion segmentation task, and the cross-entropy loss and the Dice loss are weighted and summed to obtain the dermoscope image segmentation training loss;

[0046] Based on the dermoscope image segmentation training loss and combined with an adaptive learning rate adjustment strategy, the trained dermoscope image segmentation model is adjusted in learning rate, so that when the dermoscope image segmentation training loss does not decrease significantly within 10 iteration cycles according to the adaptive learning rate adjustment strategy, the learning rate of the dermoscope image segmentation model is reduced to 0.1 times of the original, and the test image samples are used to verify the learning rate convergence of the dermoscope image segmentation model after the learning rate adjustment, and the L2 regularization method is used for model training optimization to generate a dermoscope image segmentation optimization model, and the corresponding dermoscope image lesion area segmentation result is output at the last layer in the lesion area segmentation network.

[0047] Further, the present application also provides a training method for a dermoscope image segmentation model, which is implemented based on the training system for the dermoscope image segmentation model as described above, and the training method for the dermoscope image segmentation model comprises:

[0048] Obtaining a multi-source dermoscope image; obtaining corresponding dermoscope spectral images under R, G and B color channels from the multi-source dermoscope image, and performing color offset correction processing on the multi-source dermoscope image based on the corresponding dermoscope spectral images under R, G and B color channels to generate a dermoscope color offset correction image; removing scattering loss blur and normalizing the dermoscope color offset correction image to generate a dermoscope normalized image;

[0049] Performing image sample enhancement on the dermoscope normalized image to obtain a dermoscope enhanced image sample; performing over-sampling balancing processing on the dermoscope enhanced image sample to generate a dermoscope proportion balancing image sample;

[0050] Based on a convolutional neural network and combined with a multi-scale feature fusion module and an attention mechanism, a lesion area segmentation network is constructed to generate a dermoscope image segmentation model;

[0051] Based on the dermoscope proportional balance image sample and combined with an adaptive learning rate adjustment strategy, a dermoscope image segmentation model is trained and optimized to generate a dermoscope image segmentation optimization model, and the corresponding dermoscope image lesion area segmentation result is output in the last layer of the lesion area segmentation network.

[0052] The beneficial effects of the present application are:

[0053] The training system for the dermoscope image segmentation model comprises an image color correction and noise removal module, an image sample enhancement and balance module, a segmentation model construction module and a segmentation model training and optimization module. Compared with the prior art, the application has the beneficial effect that the color components of the dermoscope image can be more accurately obtained by acquiring multi-source dermoscope images and using the spectral information of the images in the R (red), G (green) and B (blue) color channels. The key to this step is to convert the color channel information into a spectral image of the dermoscope, which provides important color and spectral data support for subsequent image processing and lesion analysis. Different dermoscope images are often affected by different acquisition environments, device settings and light source conditions, so color offset correction is needed. Color offset correction processing can effectively eliminate color differences caused by factors such as light source color temperature and lighting conditions, thereby making the color distribution of dermoscope images from different sources more consistent and ensuring the accuracy and consistency of image analysis. After color offset correction, the color distortion of the image is corrected, and subsequent image processing such as segmentation and feature extraction can achieve better results. In addition, in order to further improve the quality of the image, the corrected image needs to be subjected to scatter loss and blur removal and standardization processing. Scatter loss and blur removal can eliminate the blur in the image caused by the acquisition device or environmental factors, making the dermoscope image clearer and facilitating subsequent detailed analysis. Standardization processing can unify the size and brightness of the image, reducing the impact of size or lighting differences between different images, thereby ensuring the stability and precision of subsequent model training and inference. Secondly, by performing various data enhancement processing (such as rotation, flipping, scaling, noise addition, etc.) on the dermoscope image, the training data set can be effectively expanded, enabling the model to learn more rich features during the learning process and improving its generalization ability. In addition, through over-sampling and under-sampling balance processing, the model bias problem caused by too many or too few samples of a certain type during training can be avoided. For example, if a certain type of lesion image is significantly more than other types, the model will tend to only recognize the lesion type with more quantity. By balancing the sample ratio, the weight of each class is balanced, which can improve the recognition ability of the model on different lesion types. This enhancement and ratio balance processing is crucial for high-precision lesion region segmentation. Then, a lesion region segmentation network is constructed based on a convolutional neural network (CNN) to utilize the powerful features of deep learning, which can more accurately identify and segment lesion regions. Combined with a multi-scale feature fusion module, the network can extract features from different scales (small to large, local to global), improving the recognition accuracy of complex lesion structures.In addition, the attention mechanism can effectively enhance the network's focus on important features and suppress irrelevant information interference. This adaptive adjustment of feature weights allows the network to focus more effectively on areas that have a greater impact on segmentation results, resulting in significant improvements in segmentation accuracy and efficiency. The final dermoscopy image segmentation model not only improves the efficiency of the model training process, but also improves the segmentation accuracy of the lesion area of the dermoscopy image. Finally, the segmentation model is trained and optimized using proportionally balanced image samples to generate the final segmentation optimization model. During training, an adaptive learning rate adjustment strategy is used to dynamically adjust the learning rate based on training progress and model performance. This can avoid problems such as instability caused by a learning rate that is too large, or slow convergence speed caused by a learning rate that is too small, thereby improving training efficiency and effectiveness. After optimization, the model can better capture key features and data distribution, thereby improving the segmentation accuracy of the lesion area. BRIEF DESCRIPTION OF DRAWINGS

[0054] Other features, objects, and advantages of the application will become more apparent from the following detailed description when read in conjunction with the accompanying drawings:

[0055] Figure 1 Module schematic diagram of the training system for the dermoscopy image segmentation model of the present application;

[0056] Figure 2 For Figure 1 Functional flowchart of the image color calibration and noise removal module;

[0057] Figure 3 For Figure 1 Functional flowchart of the image sample enhancement and balancing module. DETAILED DESCRIPTION

[0058] The technical method of the present application will be described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0059] In addition, the accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and therefore repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities, which do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.

[0060] It should be understood that, although the terms "first", "second" and the like can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the example embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0061] To achieve the above object, please refer to Figures 1 to 3 The application provides a training system for a dermoscope image segmentation model, which comprises the following modules:

[0062] An image color correction and noise removal module is configured to acquire multi-source dermoscope images, acquire corresponding dermoscope spectral images under R, G and B color channels through the multi-source dermoscope images, and perform color offset correction processing on the multi-source dermoscope images based on the corresponding dermoscope spectral images under the R, G and B color channels to generate dermoscope color offset correction images, and perform scattering loss blur removal and standardization processing on the dermoscope color offset correction images to generate dermoscope standardized images.

[0063] An image sample enhancement balancing module is configured to perform image sample enhancement on the dermoscope standardized images to obtain dermoscope enhanced image samples, and perform over / under sampling balancing processing on the dermoscope enhanced image samples to generate dermoscope proportionally balanced image samples.

[0064] A segmentation model construction module is configured to construct a lesion region segmentation network based on a convolutional neural network and in combination with a multi-scale feature fusion module and an attention mechanism to generate a dermoscope image segmentation model.

[0065] A segmentation model training and optimization module is configured to perform segmentation model training and optimization on the dermoscope image segmentation model based on the dermoscope proportionally balanced image samples and in combination with an adaptive learning rate adjustment strategy to generate a dermoscope image segmentation optimized model, and output a corresponding dermoscope image lesion region segmentation result at the last layer in the lesion region segmentation network.

[0066] In the embodiments of the application, please refer to Figure 1 The module schematic diagram of the training system for the dermoscope image segmentation model is shown in the figure, and in the present example, the training system for the dermoscope image segmentation model comprises the following modules:

[0067] S1: image color calibration and noise removal module, used for acquiring multi-source dermoscopy images; corresponding dermoscopy spectral images under R, G and B color channels are acquired through the multi-source dermoscopy images, and color offset correction processing is performed on the multi-source dermoscopy images based on the corresponding dermoscopy spectral images under the R, G and B color channels, to generate dermoscopy color offset correction images; the dermoscopy color offset correction images are subjected to scattering loss blur removal and standardization processing, to generate dermoscopy standardized images;

[0068] In the embodiment of the present application, the dermoscopy images are collected from professional skin disease hospitals, scientific research institutions and medical equipment suppliers, etc. The images are decomposed into R, G and B color channels to generate spectral images under R, G and B color channels. Local area brightness analysis is performed on the spectral images of each channel. The mean and variance are calculated. The color offset is obtained by comparing the reference value. The adjustment range and direction are determined for color offset correction. Then the contrast is enhanced by histogram equalization. The pixel blur is analyzed by Laplace operator. The pixel blocks are divided according to the blur threshold. The scattering blur and noise blur pixel blocks are processed respectively. Finally, the pixel mean and variance of the processed image are calculated to realize the standardization of each pixel, and finally the dermoscopy standardized image is generated.

[0069] S2: image sample enhancement balancing module, used for performing image sample enhancement on the dermoscopy standardized images to obtain dermoscopy enhanced image samples; over-sampling and under-sampling balancing processing is performed on the dermoscopy enhanced image samples to generate dermoscopy proportion balanced image samples;

[0070] In the embodiment of the present application, the dermoscopy standardized images are subjected to random rotation (-90 degrees to 90 degrees), flipping (horizontal and vertical), scaling (0.8 to 1.2 times), cropping, brightness adjustment (-0.2 to 0.2) and contrast adjustment (-0.2 to 0.2) operations to simulate images under different conditions to obtain dermoscopy enhanced image samples. The enhanced image samples are classified pixel by pixel by using a binary classification model. The total number of pixels of the lesion and normal area is counted. The lesion proportion is calculated. When the lesion proportion is less than 0.3, the lesion samples are over-sampled by using a generative adversarial network. 50% of the normal samples are randomly deleted for under-sampling. Finally, the dermoscopy proportion balanced image samples are generated.

[0071] S3: segmentation model construction module, used for constructing a lesion area segmentation network based on a convolutional neural network and combining a multi-scale feature fusion module and an attention mechanism to generate a dermoscopy image segmentation model;

[0072] In the embodiment of the present application, by virtue of the principle of convolutional neural network, a 3-layer 5x5 convolution layer, a 3x3 convolution layer and a 1x1 pooling layer are designed, and each layer is connected through a connection channel layer to construct a basic network architecture, a multi-scale feature fusion module is designed in different convolution layers, a high-resolution feature of a 3x3 shallow layer and a semantic feature of a 5x5 deep layer are fused through a skip connection, the feature maps are spliced after being adjusted in size through up-sampling and down-sampling, an attention mechanism is introduced in the connection channel layer, a channel attention module is arranged between the convolution layer and the pooling layer, and the importance of channels is learned through global average pooling and a fully connected layer; a spatial attention module is arranged in the connection channel layer between the 3-layer network architecture spaces, and focuses on the lesion area, and finally a lesion area segmentation network is constructed to generate a dermoscope image segmentation model.

[0073] S4: a segmentation model training optimization module, configured to balance the dermoscope image samples based on the dermoscope, and combine an adaptive learning rate adjustment strategy to perform segmentation model training optimization on the dermoscope image segmentation model, so as to generate a dermoscope image segmentation optimization model, and output a corresponding dermoscope image lesion area segmentation result in the last layer of the lesion area segmentation network.

[0074] In the embodiment of the present application, the dermoscope image samples are divided into training, verification and test image samples according to a ratio of 7:2:1, the training image samples are input into the dermoscope image segmentation model for training, the verification image samples are used for training loss analysis, the cross-entropy loss of lesion classification and the Dice loss of lesion segmentation are calculated, the training loss is obtained by weighted summation, in the training process, if the training loss decreases by less than 0.001 for 10 consecutive iteration periods, the learning rate is reduced to 0.1 times of the original, the learning rate adjustment effect is verified by using the test image samples, the L2 regularization optimization model is adopted, and finally the dermoscope image segmentation optimization model is generated, and the lesion area segmentation result is output in the last layer of the lesion area segmentation network.

[0075] Further, the image color correction and noise removal module comprises the following functions:

[0076] Step S11: acquiring multi-source dermoscope images;

[0077] Step S12: acquiring corresponding dermoscope spectral images under R, G and B color channels through the multi-source dermoscope images, and performing color offset correction processing on the multi-source dermoscope images based on the corresponding dermoscope spectral images under the R, G and B color channels, to generate dermoscope color offset correction images;

[0078] Step S13: performing contrast enhancement on the dermoscope color offset correction images by using histogram equalization, to obtain dermoscope contrast enhancement images;

[0079] Step S14: performing pixel blur analysis on the dermoscope contrast enhancement images, to obtain dermoscope image pixel blur.

[0080] Step S15: Based on the pixel blur of the dermoscopic image, each pixel block in the dermoscopic contrast-enhanced image is subjected to lossy blur removal and pixel normalization processing to generate a dermoscopic normalized image.

[0081] As an embodiment of the present invention, refer to Figure 2 As shown, Figure 1 FIG. 1 is a functional flow chart of the image color correction and noise removal module in FIG. 1 . In this embodiment, the image color correction and noise removal module includes the following functions:

[0082] S11: Acquire multi-source dermatoscopic images;

[0083] In an embodiment of the present invention, dermoscopic image data are collected from multiple channels, including professional dermatology hospitals, scientific research institutions and medical equipment suppliers. The dermatology department of the hospital cooperates with the dermatology department of the hospital to obtain dermoscopic images of patients through its dermoscopic examination equipment at a fixed image acquisition frequency, such as collecting 100 images per day. The image data accumulated by scientific research institutions in the process of skin disease research, which data include dermoscopic images of different types of skin diseases, are obtained from medical equipment suppliers during the equipment testing and verification stage. These dermoscopic images from different channels are uniformly stored in a data storage center to prepare for subsequent processing.

[0084] S12: acquiring dermoscopic spectral images corresponding to R, G, and B color channels through the multi-source dermoscopic image, and performing color shift correction processing on the multi-source dermoscopic image based on the dermoscopic spectral images corresponding to R, G, and B color channels to generate a dermoscopic color shift-corrected image;

[0085] In an embodiment of the present invention, a multi-source dermoscopic image is decomposed into RGB color channels to generate dermoscopic spectral images under R, G, and B color channels, and a local area brightness analysis is performed on the spectral image of each channel. The image is divided into local areas of 32×32 pixels, and the brightness distribution mean and variance of each area are calculated. The standard brightness distribution mean and variance are set as a reference, and the mean and variance of each local area are compared with the reference value. The color offset of each color channel is obtained by weighted summation, and the color adjustment amplitude and direction are determined according to the offset. If the offset is positive and the adjustment direction is to reduce the brightness, the color value of each pixel block in the channel is subtracted by the adjustment amplitude, and the adjusted color value is limited to between 0 and 255. Finally, the corrected three channel images are re-merged to generate a dermoscopic color offset corrected image.

[0086] S13: performing contrast enhancement on the dermoscopic color shift-corrected image using histogram equalization to obtain a dermoscopic contrast-enhanced image;

[0087] In the embodiment of the present application, the pixel value of the dermoscope color offset correction image is regarded as a set of gray values, the frequency of each gray value in the image is counted, a gray histogram is constructed, a cumulative distribution function of the gray value is calculated, the cumulative distribution function is normalized to have a value range of 0-255, and each pixel value in the image is mapped according to the normalized cumulative distribution function, so that the original pixel value is replaced by a new pixel value after mapping. For example, if the original pixel value is 100, the new pixel value obtained after mapping by the cumulative distribution function is 150, and the gray value of the pixel is updated to 150. After mapping processing of all pixels in the image, the contrast of the image is enhanced, and finally a dermoscope contrast enhanced image is obtained.

[0088] S14: performing pixel blur analysis on the dermoscope contrast enhanced image to obtain a dermoscope image pixel blur;

[0089] In the embodiment of the present application, the dermoscope contrast enhanced image is processed by using a Laplace operator, a Laplace operator template (such as [0, 1, 0], [1, -4, 1], [0, 1, 0]) is used for sliding convolution operation on the image, and the second derivative of each pixel point is calculated. The second derivative reflects the rate of change of the pixel value. The greater the rate of change, the greater the difference in pixel value around the pixel, and the clearer the image. The smaller the rate of change, the more blurred the image. The result obtained after the convolution operation is statistically analyzed, and the average value of the second derivatives of all pixel points is calculated. The average value is the dermoscope image pixel blur.

[0090] S15: based on the dermoscope image pixel blur, performing scattering blur removal and pixel standardization processing on each pixel block in the dermoscope contrast enhanced image to generate a dermoscope standardized image.

[0091] In the embodiment of the present application, the dermoscope contrast enhanced image is divided into 5x5 pixel blocks, a pixel blur threshold value is set, such as 0.5, the pixel blur of each pixel block is compared with the threshold value, if greater than the threshold value, it is determined as a scattering blur pixel block, the light scattering degree is calculated by analyzing the pixel value distribution, and the linear interpolation method is used to compensate the light scattering loss; if equal to the threshold value, it is determined as a noise blur pixel block, the adjacent pixel blocks are surrounded to form a noise blur area, the noise is removed by median filtering, the pixel mean and variance of the processed image are calculated, and for each pixel value, the formula is used for standardization processing, wherein is the pixel mean, The square root value corresponding to the pixel variance, that is, the pixel standard deviation, is finally generated to generate a dermoscope standardized image. By performing the scatter loss blur removal processing on the pixel block, the blur of the dermoscope image caused by various factors (such as the imaging quality of the equipment, the unevenness of the skin surface, etc.) can be effectively reduced, the details in the image are more clear and identifiable, the characteristics of the skin lesions such as the boundary, the color, the texture, etc. can be more accurately observed, and when the pixel standardization processing is performed, the gray scale range of the image can be adjusted, the difference between different pixel values is more obvious, and thus the contrast of the image is enhanced. This helps to highlight the difference between the skin lesion area and the surrounding normal tissue, and improves the detection and diagnosis accuracy of the lesion.

[0092] Further, the obtaining the dermoscope spectral images corresponding to the R, G and B color channels from the multi-source dermoscope images and performing the color offset correction processing on the multi-source dermoscope images based on the dermoscope spectral images corresponding to the R, G and B color channels comprises:

[0093] performing the RGB color channel decomposition on the multi-source dermoscope images under different color channel wavelengths to generate the dermoscope spectral images corresponding to the R, G and B color channels;

[0094] In the embodiment of the present application, the multi-source dermoscope image is regarded as a three-dimensional matrix composed of red (R), green (G) and blue (B) color channels, and the image channel separation algorithm is used to separate each pixel of the image in the three channels according to the wavelength characteristics of the color channels. Specifically, for each pixel point in the image, the value of the R channel is extracted to form a two-dimensional matrix containing only R channel information, that is, the dermoscope spectral image under the R color channel. Similarly, the values of the G and B channels are extracted to generate the dermoscope spectral images corresponding to the G and B color channels, for example, if the image resolution is 512*512 pixels, the spectral images of each channel after separation are also 512*512 two-dimensional matrices, which respectively represent the dermoscope image information under different color channels.

[0095] Preferably, the local area brightness analysis is performed on the dermoscope spectral images corresponding to the R, G and B color channels to obtain the local area brightness characteristics corresponding to the R, G and B color channels, which include the local area brightness distribution mean and the local area brightness distribution variance.

[0096] In the embodiment of the present application, by dividing the dermoscopy spectral image under R, G, B color channels into a plurality of non-overlapping local regions, for example, each local region has a size of 32x32 pixels, for each local region, the sum of the brightness values is calculated, taking the R channel as an example, the R channel values of all pixels in the local region are added, and then divided by the total number of pixels in the region to obtain the mean value of the brightness distribution of the local region. Then, the square of the difference between the R channel value of each pixel and the mean value is calculated, the sum of these square values is summed and divided by the total number of pixels to obtain the variance of the brightness distribution of the local region. In the same way, the spectral images of G and B channels are processed to obtain the corresponding mean value and variance of the brightness distribution of the local region under R, G and B color channels. These values constitute the local region brightness feature.

[0097] Preferably, the corresponding dermoscopy spectral image is subjected to image color offset calculation based on the corresponding local region brightness feature under R, G and B color channels to obtain the dermoscopy image color offset under R, G and B color channels.

[0098] In the embodiment of the present application, by setting a standard mean value and variance of brightness distribution as reference values, these reference values represent the brightness features of the dermoscopy image under each color channel in the ideal state. For the dermoscopy spectral image under R color channel, the mean value and variance of the brightness distribution of each local region are compared with the reference values, the difference between the mean value of the local region brightness distribution and the reference mean value is calculated, and the difference between the variance of the local region brightness distribution and the reference variance is calculated. The two differences are weighted and summed according to certain weights (such as the mean value difference weight is 0.6 and the variance difference weight is 0.4) to obtain the color offset of the local region. The same calculation is performed for all local regions of R channel, and the average value is taken as the dermoscopy image color offset under R color channel. In the same way, the dermoscopy image color offsets under G and B color channels are calculated respectively.

[0099] Preferably, the corresponding dermoscopy spectral image is subjected to channel color adjustment analysis based on the corresponding dermoscopy image color offset under R, G and B color channels to obtain the dermoscopy image color adjustment amplitude and adjustment direction under R, G and B color channels.

[0100] In the embodiment of the present application, by the color offset of the dermoscopy image under the R color channel, if the offset is positive, it indicates that the brightness of the channel is overall too high, and the adjustment direction is to reduce the brightness; if the offset is negative, it indicates that the brightness is overall too low, and the adjustment direction is to increase the brightness, and the adjustment amplitude is determined according to the absolute value of the offset, for example, a proportion coefficient k (such as k=0.1) is set, the absolute value of the offset is multiplied by k to obtain a preliminary adjustment amplitude, at the same time, considering the overall contrast and color balance of the image, the preliminary adjustment amplitude is further corrected, for example, when the offset is large, the adjustment amplitude is appropriately reduced to avoid excessive adjustment, according to the same method, the color offset of the dermoscopy image under the G and B color channels is analyzed respectively to determine the corresponding color adjustment amplitude and adjustment direction, and finally the corresponding dermoscopy image color adjustment amplitude and adjustment direction under the R, G and B color channels are obtained.

[0101] Preferably, the corresponding dermoscopy spectral image under the corresponding color channel is subjected to color offset correction processing based on the corresponding dermoscopy image color adjustment amplitude and adjustment direction under the R, G and B color channels, so as to correct the corresponding color value of each pixel block in the dermoscopy spectral image according to the corresponding dermoscopy image color adjustment amplitude and adjustment direction, to generate a dermoscopy color offset correction image.

[0102] In the embodiment of the present application, by the dermoscopy spectral image under the R color channel, if the adjustment direction is to increase the brightness, the R channel color value of each pixel block is added by the adjustment amplitude; if the adjustment direction is to reduce the brightness, the adjustment amplitude is subtracted, when the adjustment is performed, the adjusted color value is range-limited to ensure that it is between 0-255, for example, if the R channel value of a certain pixel block is 200, the adjustment amplitude is 10, and the adjustment direction is to increase the brightness, then the adjusted R channel value is min(200+10, 255)=210, in the same way, the dermoscopy spectral image under the G and B color channels is subjected to color offset correction processing, finally, the corrected spectral images of the R, G and B channels are recombined into a complete image, and finally a dermoscopy color offset correction image is generated.

[0103] Further, the color offset correction processing of the corresponding dermoscopy spectral image under the corresponding color channel based on the corresponding dermoscopy image color adjustment amplitude and adjustment direction under the R, G and B color channels comprises:

[0104] Channel adjustment evaluation calculation is performed according to the corresponding dermoscopy image color adjustment amplitude and adjustment direction under the R, G and B color channels, to obtain the corresponding dermoscopy color channel adjustment coefficient under the R, G and B color channels;

[0105] In the embodiment of the present application, by using the OpenCV library of Python and related mathematical calculation library (such as numpy), the channel adjustment evaluation calculation is performed according to the color adjustment amplitude and adjustment direction of the corresponding dermoscope image in the R, G and B color channels, the data is read from the file storing the adjustment record, and the adjustment record records the adjustment operation of the multi-source dermoscope image in each color channel, for example, for the R channel of an image, the record shows that the color adjustment amplitude is increased by 10%, and the direction is positive (i.e. the color is more biased towards red), for each color channel, taking the R channel as an example, if the adjustment amplitude is (hypothetical 0.1), the direction is represented by the sign function (if positive, ; if negative, ), for example, the dermoscope color channel adjustment coefficient can be calculated by the formula , assuming that in a certain adjustment, the R channel adjustment amplitude is increased by 15% (i.e. ), and the direction is positive ( ), then , the same method is used to calculate the G and B channels, and finally the corresponding dermoscope color channel adjustment coefficients in the R, G and B color channels are obtained.

[0106] Preferably, the corresponding dermoscope image spectral characteristics in the corresponding color channel are obtained by obtaining the corresponding dermoscope spectral image in the R, G and B color channels, and the color shift simulation is performed on the corresponding color channel based on the corresponding dermoscope image spectral characteristics in the corresponding color channel and in combination with the corresponding dermoscope color channel adjustment coefficients in the R, G and B color channels, to generate the dermoscope image color shift mechanism in the R, G and B color channels.

[0107] In the embodiment of the present application, by using the OpenCV library of Python and the related library of spectral analysis (such as the module related to spectral analysis in the scipy library), the corresponding dermoscope spectral image in the R, G and B color channels is read, for example, the R channel spectral image is analyzed to obtain its spectral characteristics, such as spectral peak position and spectral bandwidth, assuming that the spectral peak of the R channel spectral image is located at a wavelength of , and the bandwidth is , and the previously obtained dermoscope color channel adjustment coefficients in the R, G and B color channels are taken as an example, taking the R channel adjustment coefficient (hypothetical 1.2) as an example, a mathematical model is established to simulate color shift, for example, assuming that there is a linear relationship between the spectral peak position and the color shift, and the shifted spectral peak position is (where is a proportional constant determined according to a large number of experiments, and is assumed to be ), and the color offset mechanism of the corresponding dermoscopy image under the R, G and B color channels is generated, wherein the simulation process and related parameters of the color offset of each channel are described in detail, and finally the color offset mechanism of the corresponding dermoscopy image under the R, G and B color channels is generated.

[0108] Preferably, based on the color offset mechanism of the corresponding dermoscopy image under the R, G and B color channels and according to the corresponding dermoscopy color channel adjustment coefficient, the color value offset correction of the corresponding color value of each pixel block in the corresponding dermoscopy spectral image under the corresponding color channel is performed to generate the corresponding local color offset correction matrix under the R, G and B color channels, including the color offset value corresponding to each pixel block under the corresponding color channel.

[0109] In the embodiment of the present application, by using the OpenCV library and numpy library of Python, based on the color offset mechanism of the corresponding dermoscopy image under the R, G and B color channels and the corresponding dermoscopy color channel adjustment coefficient, the color value offset correction of the corresponding color value of each pixel block in the corresponding dermoscopy spectral image under the corresponding color channel is performed to read the dermoscopy spectral image, divide the image into multiple pixel blocks, assume that the size of each pixel block is 8x8 pixels, and take the R channel as an example. For each pixel in each pixel block, the original color value is , according to the color offset mechanism and the adjustment coefficient, assuming that the adjustment coefficient is , the offset color value is calculated by the formula (wherein is a proportion factor determined according to the color offset mechanism, assuming that ), the difference between the offset color value and the original color value of all pixels in each pixel block is calculated to obtain the color offset value, and these color offset values are arranged in the form of a matrix to generate the corresponding local color offset correction matrix under the R channel. The same operation is also performed on the G and B channels to store the matrix data by using the npy format of numpy), and finally the local color offset correction matrix under the R, G and B color channels is generated.

[0110] Preferably, based on the local color offset correction matrix under the R, G and B color channels, the pixel-by-pixel color correction reconstruction processing of each pixel block in the corresponding dermoscopy spectral image under the corresponding color channel is performed to generate a dermoscopy color offset correction image.

[0111] In an embodiment of the present invention, by utilizing Python's OpenCV library and numpy library, pixel-by-pixel color correction and reconstruction processing is performed on each pixel block in the corresponding dermatoscope spectrum image under the corresponding color channel based on the local color offset correction matrix corresponding to the R, G, and B color channels, so as to read the local color offset correction matrix file corresponding to the R, G, and B color channels. Taking the R channel as an example, for each pixel block, the color value of each pixel in the pixel block is corrected according to the color offset value in the corresponding local color offset correction matrix. For example, if the color offset value of a pixel position in the local color offset correction matrix is , then the corrected color value of the pixel ,in, After performing such correction processing on all pixel blocks as the initial color value, the corrected R channel image is merged with the G and B channel images that have also been corrected using the merge function of OpenCV to finally generate a dermatoscope color shift correction image, providing high-quality color-corrected image data for subsequent dermatoscope image segmentation model training.

[0112] Furthermore, the performing of lossy blur removal and pixel normalization processing on each pixel block in the dermoscopic contrast-enhanced image based on the pixel blur of the dermoscopic image includes:

[0113] Based on the pixel blur of the dermatoscope image, each pixel block in the dermatoscope contrast-enhanced image is subjected to pixel blur division, so as to compare and judge the pixel blur corresponding to each pixel block according to a preset pixel blur threshold. If the pixel blur is greater than the preset pixel blur threshold, the corresponding pixel block is determined as a scattering blurred pixel block; if the pixel blur is equal to the preset pixel blur threshold, the corresponding pixel block is determined as a noise blurred pixel block; if the pixel blur is less than the preset pixel blur threshold, the corresponding pixel block is determined as a clear pixel block;

[0114] In the embodiment of the present application, the dermoscope contrast enhanced image is divided into a plurality of pixel blocks of the same size, for example, each pixel block is 5x5 pixels, each pixel block is processed by using the Laplace operator, the pixel blur degree of each pixel block is calculated, the Laplace operator reflects the change between pixels by calculating the second derivative of the pixel value in the pixel block, the more intense the change, the lower the pixel blur degree, and vice versa, a preset pixel blur threshold is set, for example, 0.5, for each pixel block, the calculated pixel blur degree is compared with the threshold. If the pixel blur degree of a pixel block is greater than 0.5, it indicates that the pixel block is greatly affected by light scattering and other factors, and the pixel block is determined as a scattering blur pixel block; if the pixel blur degree is equal to 0.5, it indicates that the pixel block is mainly disturbed by noise, and the pixel block is determined as a noise blur pixel block; if the pixel blur degree is less than 0.5, it is considered that the pixel block is relatively clear, and the pixel block is determined as a clear pixel block. All pixel blocks in the dermoscope contrast enhanced image are divided into pixel blur by this method.

[0115] Preferably, the corresponding scattering blur pixel block and noise blur pixel block in the dermoscope contrast enhanced image are subjected to blur block noise removal, the light scattering degree is calculated for the scattering blur pixel block to compensate for the loss of light scattering corresponding to the pixel block, and the noise blur region is surrounded for the noise blur pixel block, and the median filter is used to remove the noise interference in the noise blur region to generate a dermoscope blur denoising image.

[0116] In the embodiment of the present application, for the scattering blur pixel block, the light scattering degree is calculated by analyzing the distribution of the pixel value, assuming that the standard deviation of the pixel value in the scattering blur pixel block is σ, the light scattering degree is calculated by a specific formula, such as light scattering degree=k×σ (k is a coefficient determined according to the experiment), according to the calculated light scattering degree, the pixel value of the pixel block is adjusted by using linear interpolation method, etc. to compensate for the loss caused by light scattering, so that the brightness and color of the pixel block are closer to the true situation, for the noise blur pixel block, the adjacent noise blur pixel blocks are combined to form a noise blur region, and the median filter method is used to process the noise blur region. Taking a 3x3 neighborhood window as an example, the pixel values in the window are sorted, and the middle value is used to replace the center pixel value of the window. In this way, the noise interference is removed. After processing all the scattering blur pixel blocks and noise blur pixel blocks, a dermoscope blur denoising image is finally generated.

[0117] Preferably, the pixel mean and variance analysis is performed on the dermoscope blur denoising image to obtain the dermoscope image pixel mean and the dermoscope image pixel variance.

[0118] In the embodiment of the present application, by regarding the dermoscope blurred denoising image as a two-dimensional pixel matrix, assuming that the width of the image is W and the height is H, first, the pixel mean value is calculated, all pixel values in the image are added, that is , and then divided by the total number of pixels of the image WxH to obtain the dermoscope image pixel mean value , then the pixel variance is calculated, for each pixel value in the image , the square of the difference between the pixel mean value and the pixel mean value is calculated , and the square of the difference of all pixels is added, that is , and then divided by the total number of pixels of the image WxH to obtain the dermoscope image pixel variance , through such calculation, the dermoscope image pixel mean value and the dermoscope image pixel variance are accurately obtained.

[0119] Preferably, the dermoscope blurred denoising image is subjected to pixel standardization processing based on the dermoscope image pixel mean value and the dermoscope image pixel variance to generate a dermoscope standardization image.

[0120] In the embodiment of the present application, for each pixel value in the dermoscope blurred denoising image , pixel standardization processing is performed using the formula , wherein is the previously calculated dermoscope image pixel mean value, is the standard deviation corresponding to the dermoscope image pixel, which normalizes each pixel value to make the distribution of image pixel values have zero mean and unit variance. By performing such standardization processing on all pixel values in the dermoscope blurred denoising image, the pixel values of the image are adjusted to a unified scale range, eliminating the pixel value differences between different images caused by factors such as lighting and equipment, and finally generating a dermoscope standardization image, which provides more standardized and easier-to-process data for subsequent dermoscope image segmentation model training.

[0121] Further, the calculation of the light scattering degree for the scattering blurred pixel block to compensate for the light scattering loss corresponding to the pixel block comprises:

[0122] Performing spectral scattering analysis on the scattering blurred pixel block to statistically analyze the scattering wavelength and scattering blur distortion degree corresponding to the pixel block, and forming a feature vector with the scattering wavelength and the scattering blur distortion degree to generate a spectral scattering blur feature vector;

[0123] In the embodiment of the present application, the spectral scattering analysis of the scattering blur pixel block is performed by using the spectral analysis library of Python (such as the spectral analysis related module in scikit-image), the scattering blur pixel block data is read from the dermoscope image dataset in which the scattering blur pixel block is marked, the spectral information of the pixel block is processed by using the spectral analysis function in the library, such as the Fourier transform correlation function, the corresponding scattering wavelength of the pixel block is determined by analyzing the spectral data, for example, after the Fourier transform, the frequency corresponding to the energy peak value in the frequency spectrum is found, and the scattering wavelength is calculated according to the conversion relationship between the frequency and the wavelength (wherein is the speed of light, is the frequency) calculates the scattering wavelength, assuming that the calculated scattering wavelength is 550 nm, for the scattering blur distortion degree, the scattering blur distortion degree is calculated by comparing the spectral feature difference between the pixel block and the clear pixel block, a spectral feature template library of the clear pixel block is constructed, the spectral feature of the clear pixel block most similar to the current scattering blur pixel block is selected from the template library, the mean square error (MSE) between the two is calculated, the larger the MSE value, the higher the scattering blur distortion degree, assuming that the calculated scattering blur distortion degree is 0.3, the scattering wavelength and the scattering blur distortion degree are combined to form a feature vector [550, 0.3], and finally a spectral scattering blur feature vector is generated.

[0124] Preferably, the corresponding environmental factors, object surface material and light source angle of the pixel block are obtained through the scattering blur pixel block, and the scattering intensity prediction calculation is performed based on the corresponding environmental factors, object surface material and light source angle of the pixel block and combined with the spectral scattering blur feature vector, so as to obtain the light scattering degree corresponding to the pixel block.

[0125] In the embodiment of the present application, by using the data analysis library of Python (such as pandas) and some field knowledge related algorithm library, from the file storing the dermoscope image shooting related information, the environmental factors (such as the humidity and temperature when shooting) corresponding to the scattering blur pixel block are found according to the pixel block number, the object surface material (such as the texture type of the skin, whether there are scales, etc.) and the light source angle information, assuming that the environmental humidity corresponding to the pixel block is 50%, the temperature is 25℃, the object surface material is smooth skin with a small amount of scales, and the light source angle is 45 degrees with the skin surface, the spectral scattering blur feature vector is read, and based on these information, the scattering intensity is calculated by using the pre-established light scattering prediction model, which is trained by a large amount of experimental data, for example, the support vector regression (SVR) algorithm is used to construct the model, the model input is the environmental factors, the object surface material, the light source angle and the scattering wavelength and scattering blur distortion degree in the spectral scattering blur feature vector, and the output is the light scattering degree, the related data is input into the model, and the light scattering degree corresponding to the pixel block is obtained after calculation, which is assumed to be 0.6, and finally the light scattering degree corresponding to the pixel block is obtained.

[0126] Preferably, the theoretical light scattering intensity corresponding to the pixel block is obtained by the scattering blur pixel block, and scattering loss compensation calculation is performed based on the light scattering degree corresponding to the pixel block and the corresponding theoretical light scattering intensity, to obtain a scattering loss compensation factor.

[0127] In the embodiment of the present application, by using the mathematical calculation library of Python (such as numpy), starting from the optical theory knowledge and the dermoscope imaging principle, the theoretical light scattering intensity corresponding to the scattering blur pixel block is obtained by consulting relevant materials or consulting optical experts, assuming that for the current pixel block, the theoretical light scattering intensity is calculated to be 0.8 according to its material, light source condition and imaging distance and other factors, and the light scattering degree corresponding to the pixel block is obtained, which is assumed to be 0.6, according to the formula: scattering loss compensation factor = theoretical light scattering intensity / light scattering degree, the scattering loss compensation factor is calculated, that is, 0.8 / 0.6≈1.33, and finally the scattering loss compensation factor is obtained.

[0128] Preferably, the light scattering loss corresponding to the pixel block is compensated based on the scattering loss compensation factor.

[0129] In the embodiment of the present application, by using the OpenCV library and numpy library of Python, the corresponding scattering loss compensation factor is obtained in advance, which is assumed to be 1.33, and the scattering blur pixel block image data is read, for each pixel in the pixel block, the original light intensity value is set to , according to the formula , the compensated light intensity value is calculated, for example, the original light intensity value of a certain pixel is 100, the compensated light intensity value is 100*1.33=133, and the compensation of the light scattering loss corresponding to the pixel block is completed by calculating the compensated light intensity value of all pixels in the pixel block. The pixel block image data is overlaid on the original file, and the light scattering loss corresponding to the pixel block is finally compensated, providing high-quality pixel block data after light scattering loss compensation for subsequent skin mirror image segmentation model training, and improving the segmentation accuracy of the model for the skin mirror image.

[0130] Further, the image sample enhancement balancing module includes the following functions:

[0131] The skin mirror standardized image is subjected to image sample enhancement, so as to enhance the corresponding skin mirror image samples under different conditions through random rotation, flipping, scaling, cropping, brightness adjustment and contrast adjustment operations, so as to obtain skin mirror enhanced image samples;

[0132] The lesion area proportion of the skin mirror enhanced image sample is analyzed, so as to quantitatively calculate the proportion value between the lesion sample and the normal sample in the skin mirror image sample, and obtain the lesion proportion of the skin mirror image sample;

[0133] The skin mirror enhanced image sample is subjected to over-sampling balancing processing based on the lesion proportion of the skin mirror image sample, wherein the over-sampling balancing processing is specifically that if the lesion proportion of the skin mirror image sample shows that the lesion sample is much less than the normal sample, the over-sampling operation is performed on the corresponding lesion sample in the skin mirror enhanced image sample, so as to increase the number of samples corresponding to the minority class by using the generative adversarial network to copy the samples corresponding to the minority class, and the under-sampling operation is performed on the corresponding normal sample in the skin mirror enhanced image sample, so as to reduce the number of samples corresponding to the majority class, so as to generate the skin mirror proportion balanced image sample.

[0134] As an embodiment of the present application, referring to Figure 3 , it is Figure 1 the function flow diagram of the image sample enhancement balancing module in the embodiment, the image sample enhancement balancing module includes the following functions in the embodiment:

[0135] S21: The skin mirror standardized image is subjected to image sample enhancement, so as to enhance the corresponding skin mirror image samples under different conditions through random rotation, flipping, scaling, cropping, brightness adjustment and contrast adjustment operations, so as to obtain skin mirror enhanced image samples;

[0136] In the embodiment of the present application, by performing a plurality of image enhancement operations on the dermoscope standardized image in turn, in the random rotation operation, taking the image center as the rotation point, an angle is randomly selected in the range of-90 degrees to 90 degrees to rotate the image, so as to simulate the dermoscope image under different viewing angles. For the random flipping, horizontal flipping and vertical flipping are performed respectively to increase the diversity of the image. In the scaling operation, the image is randomly scaled in the ratio range of 0.8 to 1.2 to simulate the observation effect under different distances. In the cropping operation, a region is randomly selected in the image for cropping to retain the image features of different parts. In the brightness adjustment, the brightness value is randomly adjusted in the range of-0.2 to 0.2 on the basis of the original brightness value. In the contrast adjustment, the contrast is randomly changed in the range of-0.2 to 0.2. Through these operations, dermoscope image samples under different conditions are simulated, and finally dermoscope enhanced image samples are obtained.

[0137] S22: Perform lesion area proportion analysis on the dermoscope enhanced image sample to quantitatively calculate the proportion value between the lesion sample and the normal sample in the dermoscope image sample, and obtain the dermoscope image sample lesion proportion.

[0138] In the embodiment of the present application, by performing pixel-by-pixel analysis on the dermoscope enhanced image sample, a pre-trained binary classification model is used to classify each pixel to determine whether it belongs to a lesion area or a normal area. The binary classification model is trained based on a large number of labeled dermoscope image data and has a high classification accuracy. The total number of pixels in the lesion area and the total number of pixels in the normal area are counted and denoted as and Then, the proportion value between the lesion sample and the normal sample is calculated by the formula proportion value to obtain the dermoscope image sample lesion proportion. For example, if the total number of pixels in the lesion area is 5000 and the total number of pixels in the normal area is 20000, the dermoscope image sample lesion proportion is 5000 / 20000=0.25.

[0139] S23: Perform over-sampling balance processing on the dermoscope enhanced image sample based on the dermoscope image sample lesion proportion. The over-sampling balance processing is specifically that if the dermoscope image sample lesion proportion shows that the lesion sample is much less than the normal sample, an over-sampling operation is performed on the corresponding lesion sample in the dermoscope enhanced image sample to increase the number of samples corresponding to the minority class by using a generative adversarial network to copy the samples corresponding to the minority class, and an under-sampling operation is performed on the corresponding normal sample in the dermoscope enhanced image sample to reduce the number of samples corresponding to the majority class, so as to generate a dermoscope proportion balanced image sample.

[0140] In the embodiment of the present application, when the proportion of the skin mirror image sample lesion is less than 0.3, it is determined that the lesion sample is much less than the normal sample, for the lesion sample, oversampling operation is performed using a generative adversarial network (GAN), the GAN is composed of a generator and a discriminator, the generator takes random noise as input and tries to generate an image similar to the real lesion sample, the discriminator judges whether the input image is a real lesion sample or an image generated by the generator, by continuously training the generator and the discriminator, the generator can generate high-quality lesion sample images, thereby increasing the number of lesion sample, for the normal sample, a random undersampling method is adopted, a certain proportion of normal samples are randomly selected for deletion, for example, 50% of the normal samples are deleted, to reduce the number of samples corresponding to the majority class, after such oversampling and undersampling balancing processing, the number of lesion samples and normal samples is relatively balanced, and finally the skin mirror proportion balanced image sample is generated.

[0141] Further, the segmentation model construction module includes the following functions:

[0142] A 3-layer 5x5 convolution layer, a 3x3 convolution layer and a 1x1 pooling layer are designed through a convolutional neural network, and each layer is connected through a connection channel layer to construct a corresponding dermoscope image segmentation network architecture.

[0143] In the embodiment of the present application, when constructing the dermoscope image segmentation network architecture, first, according to the principle of convolutional neural network, for the first layer, a 5x5 convolution layer is constructed, the convolution kernel size of this layer is 5x5, by setting a suitable number of convolution kernels (such as 32), the input dermoscope image is subjected to feature extraction operation, specifically, the convolution kernel slides on the image and performs convolution operation with the pixel value of the image to generate a feature map, then the second layer is designed as a 3x3 convolution layer, and a certain number of convolution kernels (such as 64) are set, to further extract finer features from the feature map output by the first layer, then the third layer is constructed as a 1x1 pooling layer, the 1x1 pooling layer is used for dimensionality reduction operation on the feature map, reducing the data amount while retaining important feature information, each layer is connected through a connection channel layer, which ensures that the feature map can be smoothly transmitted from one layer to the next layer, for example, the feature map output by the first layer 5x5 convolution layer is transmitted to the 3x3 convolution layer through the connection channel layer for further processing, and finally the dermoscope image segmentation network architecture is constructed.

[0144] Preferably, by combining corresponding multi-scale feature fusion modules in different convolutional layer designs within the dermoscope image segmentation network architecture, 3x3 shallow lesion high-resolution features and 5x5 deep lesion semantic features are fused through the multi-scale feature fusion module to introduce a skip connection and a feature fusion operation, so that the features of different scales are adjusted to the same size through upsampling and downsampling operations in the pooling layer to perform splicing fusion, and the segmentation ability for different scale lesion areas is improved by introducing an attention mechanism in the connection channel layer between each layer to construct a lesion area segmentation network, wherein the attention mechanism consists of a channel attention module and a spatial attention module, wherein the channel attention module is arranged in the connection channel layer between each layer of the convolutional layer and the pooling layer to automatically learn the importance between each connection channel layer; and the spatial attention module is arranged in each connection channel layer between the space of the 3-layer network architecture to focus on the corresponding lesion area in the dermoscope image sample to enhance the network's expression of the segmentation task corresponding to the lesion area, so as to generate a dermoscope image segmentation model.

[0145] In the embodiment of the present application, by designing multi-scale feature fusion modules for different convolutional layers in the constructed dermoscope image segmentation network architecture, the feature maps output by the 3x3 shallow convolutional layer contain high-resolution features of the lesion, while the feature maps output by the 5x5 deep convolutional layer contain semantic features of the lesion. Through the multi-scale feature fusion module, the output of the 3x3 shallow convolutional layer is directly connected to the subsequent appropriate layer in a corresponding skip connection manner, and then fused with the features of the 5x5 deep convolutional layer. In the pooling layer, the features of different scales are adjusted to the same size through upsampling (such as bilinear interpolation) and downsampling (such as maximum pooling) operations, and then spliced and fused, so that the fused feature maps have both high resolution and semantic information. In order to improve the segmentation ability for different scale lesion areas, an attention mechanism is introduced in the connection channel layer between each layer. The channel attention module is arranged in the connection channel layer between each layer of the convolutional layer and the pooling layer, which automatically learns the importance between each connection channel layer through global average pooling and fully connected layer operations, and assigns different weights to different channels. The spatial attention module is arranged in each connection channel layer between the space of the 3-layer network architecture, which focuses on the corresponding lesion area in the dermoscope image sample by calculating the spatial correlation of the feature maps, enhances the expression ability of the network for the lesion area segmentation task, and finally constructs a lesion area segmentation network through these operations, and then generates a dermoscope image segmentation model.

[0146] Further, the segmentation model training optimization module includes the following functions:

[0147] The dermoscopy proportion balancing image samples are divided into training image samples, verification image samples and test image samples by a division proportion of 7:2:1;

[0148] In the embodiment of the present application, by assuming that a batch of N dermoscopy proportion balancing image samples are owned, first, the sample number for division is calculated, the training image sample number is N*0.7, the verification image sample number is N*0.2, and the test image sample number is N*0.1, a random sampling method is used to randomly sample N*0.7 samples from the N samples as training image samples, to ensure the randomness of sampling to cover images of different characteristics, then N*0.2 samples are randomly sampled from the remaining samples as verification image samples, and finally, the remaining N*0.1 samples are used as test image samples, for example, if there are 1000 dermoscopy proportion balancing image samples, then there are 700 training image samples, 200 verification image samples and 100 test image samples, through such clear proportion division, suitable data sets are provided for subsequent model training, verification and testing.

[0149] Preferably, the training image samples are input into the dermoscopy image segmentation model for segmentation model training, and the verification image samples are input into the trained dermoscopy image segmentation model for training loss analysis, to train and calculate the cross-entropy loss for the lesion classification task and the Dice loss for the lesion segmentation task, and to perform weighted summation according to the cross-entropy loss and the Dice loss to obtain the dermoscopy image segmentation training loss;

[0150] In the embodiment of the present application, by sequentially inputting the training image samples into the dermoscopy image segmentation model, each convolutional layer, pooling layer and other components in the model perform feature extraction and processing on the images, in the training process, for the lesion classification task, according to the classification result output by the model and the real lesion category label, the cross-entropy loss is calculated using the cross-entropy loss function, for example, if the model predicts that a certain skin lesion has a probability of 0.8 of being malignant, and the real label is malignant (the label value is set to 1), then the cross-entropy loss is calculated through a specific formula, for the lesion segmentation task, the segmentation result output by the model is compared with the real lesion segmentation area, and the Dice loss is calculated using the Dice loss function, assuming that the real lesion area is A and the model predicts the lesion area as B, the Dice loss is calculated according to the proportion relationship of the intersection and union of the two, then weights are set for the cross-entropy loss and the Dice loss, such as the cross-entropy loss weight is 0.6 and the Dice loss weight is 0.4, the two are weighted and summed, and finally the dermoscopy image segmentation training loss is obtained.

[0151] Preferably, the learning rate of the trained dermoscopic image segmentation model is adjusted based on the dermoscopic image segmentation training loss and combined with an adaptive learning rate adjustment strategy. When it is determined that the dermoscopic image segmentation training loss has not decreased significantly within 10 iteration cycles according to the adaptive learning rate adjustment strategy, the learning rate corresponding to the dermoscopic image segmentation model is reduced to 0.1 times the original value, and the learning rate convergence of the dermoscopic image segmentation model after the learning rate adjustment is verified using test image samples. At the same time, the L2 regularization method is used to optimize the model training to generate a dermoscopic image segmentation optimization model, and the corresponding dermoscopic image lesion area segmentation result is output in the last layer of the lesion area segmentation network.

[0152] In an embodiment of the present invention, the dermoscopic image segmentation training loss is continuously monitored during the model training process, and the current training loss value is recorded after each iteration cycle. When the decrease in the training loss value is less than a preset minimum value (such as 0.001) within 10 consecutive iteration cycles, it is determined that the training loss has not decreased significantly within 10 iteration cycles. At this time, the current learning rate of the dermoscopic image segmentation model is multiplied by 0.1 to obtain a new learning rate. For example, the original learning rate is 0.001, which becomes 0.0001 after adjustment. Then, the test image sample is input into the model after the learning rate adjustment, and the change in the model output result is observed to verify whether the learning rate adjustment is effective. At the same time, the L2 regularization method is used in the model training process, and a regularization term is added to the loss function to constrain the model parameters to prevent overfitting. After multiple rounds of training and adjustment, a dermoscopic image segmentation optimization model is finally generated. The model outputs accurate dermoscopic image lesion area segmentation results in the last layer of the lesion area segmentation network.

[0153] Furthermore, the present invention also provides a training method for a dermoscopic image segmentation model, which is implemented based on the training system for the dermoscopic image segmentation model described above. The training method for the dermoscopic image segmentation model includes:

[0154] Acquire a multi-source dermoscopic image; acquire corresponding dermoscopic spectral images in R, G, and B color channels through the multi-source dermoscopic image, and perform color shift correction processing on the multi-source dermoscopic image based on the corresponding dermoscopic spectral images in R, G, and B color channels to generate a dermoscopic color shift-corrected image; perform lossy blur removal and normalization processing on the dermoscopic color shift-corrected image to generate a dermoscopic normalized image;

[0155] Performing image sample enhancement on the dermoscopic standardized image to obtain a dermoscopic enhanced image sample; performing over-sampling and under-sampling balancing processing on the dermoscopic enhanced image sample to generate a dermoscopic ratio-balanced image sample;

[0156] A lesion region segmentation network is constructed based on a convolutional neural network, combined with a multi-scale feature fusion module and an attention mechanism, to generate a dermoscope image segmentation model;

[0157] Based on the dermoscope proportion balance image sample and combined with an adaptive learning rate adjustment strategy, the dermoscope image segmentation model is trained and optimized to generate a dermoscope image segmentation optimization model, and the corresponding dermoscope image lesion region segmentation result is output in the last layer of the lesion region segmentation network.

[0158] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, the scope of the application being defined by the appended claims and not by the above description, therefore all variations falling within the meaning and scope of the equivalent elements of the application file are intended to be included in the present application.

[0159] The above description is merely one specific implementation of the application, which enables those skilled in the art to understand or implement the application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A training system for a dermatoscope image segmentation model, characterized in that: Includes the following modules: An image color correction and noise removal module is used to obtain a multi-source dermoscopic image; obtain corresponding dermoscopic spectral images in R, G, and B color channels from the multi-source dermoscopic image, and perform color shift correction processing on the multi-source dermoscopic image based on the corresponding dermoscopic spectral images in R, G, and B color channels to generate a dermoscopic color shift-corrected image; perform lossy blur removal and standardization processing on the dermoscopic color shift-corrected image to generate a dermoscopic standardized image; An image sample enhancement and balancing module is used to perform image sample enhancement on the dermoscopic standardized image to obtain a dermoscopic enhanced image sample; and perform over-sampling and under-sampling balancing processing on the dermoscopic enhanced image sample to generate a dermoscopic ratio-balanced image sample; A segmentation model building module is used to build a lesion area segmentation network based on a convolutional neural network combined with a multi-scale feature fusion module and an attention mechanism to generate a dermatoscope image segmentation model; The segmentation model building module includes the following functions: A convolutional neural network was used to design three layers of 5x5 convolutional layers, 3x3 convolutional layers, and 1x1 pooling layers. Each layer was connected through a channel layer to construct the corresponding dermatoscope image segmentation network architecture. By designing different convolutional layers within the dermatoscope image segmentation network architecture and combining corresponding multi-scale feature fusion modules, skip connections and feature fusion operations are introduced through the multi-scale feature fusion module to fuse the high-resolution features of the lesions corresponding to the 3x3 shallow layer and the semantic features of the lesions corresponding to the 5x5 deep layer, so that feature maps of different scales are adjusted to the same size through upsampling and downsampling operations in the pooling layer to perform splicing and fusion. The attention mechanism is introduced in the connection channel layer between each layer to improve the segmentation ability of lesion areas of different scales and construct a lesion area segmentation network, wherein the attention mechanism consists of a channel attention module and a spatial attention module, wherein the channel attention module is set in the connection channel layer between the convolution layer and the pooling layer in each layer to automatically learn the importance between each connection channel layer; The spatial attention module is set in each connection channel layer between the three-layer network architecture space to focus on the corresponding lesion area in the dermoscopic image sample to enhance the network's segmentation task expression corresponding to the lesion area, thereby generating a dermoscopic image segmentation model; The segmentation model training and optimization module is used to optimize the segmentation model training of the dermoscopic image segmentation model based on the dermoscopic ratio-balanced image samples and combined with the adaptive learning rate adjustment strategy to generate a dermoscopic image segmentation optimization model and output the corresponding dermoscopic image lesion area segmentation result in the last layer of the lesion area segmentation network.

2. The training system for a dermoscopic image segmentation model according to claim 1, characterized in that: The image color correction and noise removal module includes the following functions: Acquire multi-source dermatoscopic images; Obtaining dermoscopic spectral images corresponding to R, G, and B color channels from the multi-source dermoscopic image, and performing color shift correction processing on the multi-source dermoscopic image based on the dermoscopic spectral images corresponding to the R, G, and B color channels to generate a dermoscopic color shift-corrected image; The dermoscopic color shift-corrected image is contrast-enhanced using histogram equalization to obtain a dermoscopic contrast-enhanced image. Performing pixel blur analysis on the dermoscopic contrast-enhanced image to obtain the dermoscopic image pixel blur; Based on the pixel blur of the dermoscopic image, each pixel block in the dermoscopic contrast-enhanced image is subjected to lossy blur removal and pixel normalization processing to generate a dermoscopic standardized image.

3. The training system for a dermatoscope image segmentation model according to claim 2, characterized in that: The method of obtaining dermoscopic spectral images corresponding to R, G, and B color channels through a multi-source dermoscopic image and performing color shift correction processing on the multi-source dermoscopic image based on the dermoscopic spectral images corresponding to R, G, and B color channels includes: By performing RGB color channel decomposition on the multi-source dermatoscope image at different color channel wavelengths, the corresponding dermatoscope spectral images under R, G and B color channels are generated; Perform local area brightness analysis on the dermoscopic spectral images corresponding to the R, G, and B color channels to obtain the local area brightness features corresponding to the R, G, and B color channels, including the local area brightness distribution mean and local area brightness distribution variance; Performing image color shift calculation on the corresponding dermoscopic spectral image based on the corresponding local area brightness characteristics in the R, G, and B color channels to obtain the corresponding dermoscopic image color shift in the R, G, and B color channels; Based on the color offset of the dermoscopic image under the R, G, and B color channels, a channel color adjustment analysis is performed on the corresponding dermoscopic spectral image to obtain the color adjustment amplitude and adjustment direction of the dermoscopic image under the R, G, and B color channels; Based on the corresponding dermoscopic image color adjustment amplitude and adjustment direction under the R, G and B color channels, the corresponding dermoscopic spectral image under the corresponding color channel is subjected to color shift correction processing to correct the color value corresponding to each pixel block in the dermoscopic spectral image according to the corresponding dermoscopic image color adjustment amplitude and adjustment direction to generate a dermoscopic color shift corrected image.

4. The training system for a dermoscopic image segmentation model according to claim 3, characterized in that: The color shift correction processing of the dermoscopic spectral image corresponding to the corresponding color channel based on the color adjustment amplitude and adjustment direction of the dermoscopic image corresponding to the R, G and B color channels includes: Perform channel adjustment evaluation calculation based on the color adjustment amplitude and adjustment direction of the dermatoscope image under the R, G, and B color channels to obtain the corresponding dermatoscope color channel adjustment coefficients under the R, G, and B color channels; The dermoscopic image spectral characteristics corresponding to the R, G, and B color channels are obtained by using the dermoscopic spectral images corresponding to the R, G, and B color channels. The color shift simulation is performed on the corresponding color channels based on the dermoscopic image spectral characteristics corresponding to the corresponding color channels and in combination with the dermoscopic color channel adjustment coefficients corresponding to the R, G, and B color channels, so as to generate the dermoscopic image color shift mechanism corresponding to the R, G, and B color channels. Based on the color shift mechanism of the dermoscopic image corresponding to the R, G, and B color channels and according to the corresponding dermoscopic color channel adjustment coefficient, a color value shift correction is performed on the color value corresponding to each pixel block in the dermoscopic spectral image corresponding to the corresponding color channel to generate a local color shift correction matrix corresponding to the R, G, and B color channels, including the color shift value corresponding to each pixel block in the corresponding color channel; Based on the local color shift correction matrices corresponding to the R, G and B color channels, each pixel block in the dermatoscope spectral image corresponding to the corresponding color channel is subjected to pixel-by-pixel color correction and reconstruction processing to generate a dermatoscope color shift corrected image.

5. The training system for a dermatoscope image segmentation model according to claim 2, characterized in that: The performing of blur removal and pixel normalization processing on each pixel block in the dermoscopic contrast-enhanced image based on the pixel blur of the dermoscopic image comprises: Based on the pixel blur of the dermatoscope image, each pixel block in the dermatoscope contrast-enhanced image is subjected to pixel blur division, so as to compare and judge the pixel blur corresponding to each pixel block according to a preset pixel blur threshold. If the pixel blur is greater than the preset pixel blur threshold, the corresponding pixel block is determined as a scattering blurred pixel block; if the pixel blur is equal to the preset pixel blur threshold, the corresponding pixel block is determined as a noise blurred pixel block; if the pixel blur is less than the preset pixel blur threshold, the corresponding pixel block is determined as a clear pixel block; Denoising the corresponding scattering blurred pixel blocks and noise blurred pixel blocks in the dermatoscope contrast-enhanced image. For the scattering blurred pixel blocks, the light scattering degree is calculated to compensate for the light scattering loss corresponding to the pixel blocks. For the noise blurred pixel blocks, the corresponding noise blurred areas are enclosed and the noise interference of the noise blurred areas is removed by using median filtering to generate the dermatoscope de-noised image. Perform pixel mean and variance analysis on the dermoscopic blur and denoising image to obtain the dermoscopic image pixel mean and dermoscopic image pixel variance; The dermoscopic blurred denoised image is pixel-normalized based on the dermoscopic image pixel mean and dermoscopic image pixel variance to generate a dermoscopic normalized image.

6. The training system for a dermoscopic image segmentation model according to claim 5, characterized in that: The step of calculating the light scattering degree for the scattered blurred pixel block to compensate for the light scattering loss corresponding to the pixel block includes: Performing spectral scattering analysis on the scattering blur pixel block to statistically analyze the scattering wavelength and scattering blur distortion corresponding to the pixel block, and forming a feature vector based on the scattering wavelength and scattering blur distortion to generate a spectral scattering blur feature vector; Obtain the environmental factors, object surface material, and light source angle corresponding to the pixel block through the scattering blur pixel block, and perform scattering intensity prediction calculation based on the environmental factors, object surface material, and light source angle corresponding to the pixel block and combined with the spectral scattering blur feature vector to obtain the light scattering degree corresponding to the pixel block; Obtaining the theoretical light scattering intensity corresponding to the pixel block by scattering the blurred pixel block, and performing a scattering loss compensation calculation based on the light scattering degree corresponding to the pixel block and the corresponding theoretical light scattering intensity to obtain a scattering loss compensation factor; The light scattering loss corresponding to the pixel block is compensated based on the scattering loss compensation factor.

7. The training system for a dermoscopic image segmentation model according to claim 1, characterized in that: The image sample enhancement and balancing module includes the following functions: Performing image sample enhancement on the dermoscopic standardized image to enhance the corresponding dermoscopic image samples under different simulated conditions by random rotation, flipping, scaling, cropping, brightness adjustment, and contrast adjustment operations to obtain dermoscopic enhanced image samples; The lesion area ratio analysis was performed on the dermoscopic enhanced image samples to quantitatively calculate the ratio between the lesion samples and the normal samples in the dermoscopic image samples, and obtain the lesion ratio of the dermoscopic image samples; The dermoscopically enhanced image samples are subjected to over- and under-sampling balancing processing based on the lesion ratio of the dermoscopic image samples, wherein the over- and under-sampling balancing processing is specifically as follows: if the lesion ratio of the dermoscopic image samples shows that the lesion samples are much less than the normal samples, an oversampling operation is performed on the corresponding lesion samples in the dermoscopically enhanced image samples to increase the number of samples corresponding to the minority class by copying the samples corresponding to the minority class using a generative adversarial network, and an undersampling operation is performed on the corresponding normal samples in the dermoscopically enhanced image samples to reduce the number of samples corresponding to the majority class, so as to generate dermoscopic ratio-balanced image samples.

8. The training system for a dermoscopic image segmentation model according to claim 1, characterized in that: The segmentation model training and optimization module includes the following functions: The dermatoscope ratio-balanced image samples are divided into training image samples, verification image samples and test image samples according to the division ratio of 7:2:1; The training image samples are input into the dermoscopic image segmentation model for segmentation model training, and the verification image samples are input into the trained dermoscopic image segmentation model for training loss analysis to train and calculate the cross entropy loss for the lesion classification task and the Dice loss for the lesion segmentation task. The cross entropy loss and the Dice loss are weighted summed to obtain the dermoscopic image segmentation training loss. Based on the dermoscopic image segmentation training loss and combined with the adaptive learning rate adjustment strategy, the learning rate of the trained dermoscopic image segmentation model is adjusted. When the dermoscopic image segmentation training loss does not decrease significantly within 10 iteration cycles according to the adaptive learning rate adjustment strategy, the learning rate corresponding to the dermoscopic image segmentation model is reduced to 0.1 times the original value. The test image samples are used to verify the learning rate of the dermoscopic image segmentation model after learning rate adjustment. At the same time, the L2 regularization method is used to optimize the model training to generate a dermoscopic image segmentation optimization model, and the corresponding dermoscopic image lesion area segmentation result is output in the last layer of the lesion area segmentation network.

9. A training method for a dermatoscope image segmentation model, characterized in that: The method is implemented based on the training system for the dermoscopic image segmentation model according to claim 1, and the training method for the dermoscopic image segmentation model includes: Acquire a multi-source dermoscopic image; acquire corresponding dermoscopic spectral images in R, G, and B color channels through the multi-source dermoscopic image, and perform color shift correction processing on the multi-source dermoscopic image based on the corresponding dermoscopic spectral images in R, G, and B color channels to generate a dermoscopic color shift-corrected image; perform lossy blur removal and normalization processing on the dermoscopic color shift-corrected image to generate a dermoscopic normalized image; Performing image sample enhancement on the dermoscopic standardized image to obtain a dermoscopic enhanced image sample; performing over-sampling and under-sampling balancing processing on the dermoscopic enhanced image sample to generate a dermoscopic ratio-balanced image sample; A lesion area segmentation network is constructed based on a convolutional neural network combined with a multi-scale feature fusion module and an attention mechanism to generate a dermatoscope image segmentation model; The dermoscopic image segmentation model is trained and optimized based on the dermoscopic ratio-balanced image samples and combined with the adaptive learning rate adjustment strategy to generate a dermoscopic image segmentation optimization model, and the corresponding dermoscopic image lesion area segmentation result is output in the last layer of the lesion area segmentation network.

Citation Information

Patent Citations

  • Dermatoscope image segmentation method and segmentation device thereof

    CN112419286A

  • Dermoscope image segmentation method based on diffusion fuzzy learning

    CN118447031A