Skin microscope image segmentation model training, skin microscope image recognition method and device
By introducing a dilated convolutional layer and a self-attention module into the dermoscopic image segmentation model, the problems of low efficiency and poor accuracy in dermoscopic image lesion identification in existing technologies are solved, and efficient and accurate automatic lesion region segmentation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2026-03-31
AI Technical Summary
Existing methods for determining the shape and size of lesions based on manual analysis of dermoscopic images are inefficient and inaccurate.
A dermoscopic image segmentation model training method was adopted, which uses dilated convolutional layers and self-attention modules to train the dermoscopic image segmentation model. The dilated convolutional layers extract lesion-related features, and the self-attention modules learn global semantic features, thereby improving the accuracy of lesion region identification.
It improves the accuracy and efficiency of lesion region identification in dermoscopy images, reduces human subjective misjudgment, and realizes automated lesion contour segmentation.
Smart Images

Figure CN114693703B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology, specifically relating to a dermoscopic image segmentation model training, dermoscopic image recognition method and apparatus. Background Technology
[0002] Dermoscopy images are medical images obtained using non-invasive microscopic imaging techniques, which can clearly show the lesions of skin diseases. Doctors can make diagnoses based on the patient's dermoscopy images and determine the type of disease. In related techniques, doctors also need to analyze the contour shape and size of the lesions in the dermoscopy images to prepare for subsequent surgical treatment.
[0003] However, existing methods for determining the shape and size of dermoscopy images based on manual analysis are inefficient and inaccurate. Summary of the Invention
[0004] To address the aforementioned problems in the prior art, this application provides a dermoscopic image segmentation model training method and apparatus for dermoscopic image recognition.
[0005] In a first aspect, this application provides a method for training a dermoscopic image segmentation model, the method comprising:
[0006] Obtain a first sample dataset; the first sample dataset includes: at least one subset of sample data; the subset of sample data includes: sample dermoscopic images, and lesion region labels in the sample dermoscopic images;
[0007] A first preset model is trained using the first sample dataset to obtain a dermoscopic image segmentation model; wherein, the first preset model includes a dilated convolutional layer and a self-attention module; the dilated convolutional layer is located before the self-attention module; the dilated convolutional layer is used to extract features related to the lesion in the sample dermoscopic image, and the self-attention module is used to output global semantic features of the sample dermoscopic image based on the features related to the lesion; the dermoscopic image segmentation model is used to determine the lesion region in the dermoscopic image to be identified based on the dermoscopic image to be identified.
[0008] Secondly, this application provides a dermoscopic image recognition method, which is applied to a dermoscopic image recognition system, and the method includes:
[0009] Receive a dermoscopic image to be identified; the dermoscopic image to be identified includes: lesions of skin diseases;
[0010] In response to a user-triggered dermoscopic image segmentation request, the dermoscopic image to be identified is input into a dermoscopic image segmentation model to determine the lesion region in the dermoscopic image to be identified; the dermoscopic image segmentation model is trained using the method described in claim 1.
[0011] Based on the lesion area in the dermoscopic image to be identified, a segmented image corresponding to the dermoscopic image to be identified is generated;
[0012] Output the segmented image corresponding to the dermoscopy image to be identified.
[0013] Optionally, generating a segmented image corresponding to the dermoscopic image to be identified based on the lesion region in the dermoscopic image to be identified includes:
[0014] Based on the preset image visualization processing method and the lesion area in the dermoscopic image to be identified, a segmented image corresponding to the dermoscopic image to be identified is generated.
[0015] Optionally, generating a segmented image corresponding to the dermoscopic image to be identified based on the lesion region in the dermoscopic image to be identified includes:
[0016] Based on the preset image visualization processing method and the lesion area in the dermoscopic image to be identified, an initial segmentation image corresponding to the dermoscopic image to be identified is generated and displayed;
[0017] In response to a user-input request for segmented image visualization, a segmented image corresponding to the dermoscopic image to be identified is generated based on the lesion region in the dermoscopic image to be identified, which matches the request for segmented image visualization.
[0018] Optionally, the dermoscopic image segmentation request carries an identifier of the image visualization processing method, and the step of generating a segmented image corresponding to the dermoscopic image to be identified based on the lesion region in the dermoscopic image to be identified includes:
[0019] Based on the identifier of the image visualization processing method and the lesion area in the dermoscopic image to be identified, a segmented image corresponding to the dermoscopic image to be identified is generated.
[0020] Optionally, after generating the segmented image corresponding to the dermoscopy image to be identified, the method further includes:
[0021] Output the image identifier corresponding to the segmented image, and store the segmented image.
[0022] Optionally, the method further includes:
[0023] In response to the user-triggered dermoscopic image recognition request, the dermoscopic image to be recognized is input into the dermoscopic image recognition model to determine the disease type to which the lesions included in the dermoscopic image to be recognized belong;
[0024] Based on the disease identifier, determine the relevant disease information corresponding to the disease;
[0025] Output the relevant information for the disease.
[0026] Optionally, the method further includes:
[0027] In response to the user-triggered dermoscopic image generation request, at least one virtual dermoscopic image of target resolution is generated according to the target dermoscopic image generation model; the dermoscopic image generation request carries the target resolution and the target disease; the virtual dermoscopic image includes lesions of the target disease;
[0028] Output the virtual dermoscopy image.
[0029] Thirdly, this application provides a dermoscopic image segmentation model training device, the device comprising:
[0030] An acquisition module is used to acquire a first sample dataset; the first sample dataset includes: at least one subset of sample data; the subset of sample data includes: sample dermoscopic images, and lesion region labels in the sample dermoscopic images;
[0031] The training module is used to train a first preset model using the first sample dataset to obtain a dermoscopic image segmentation model; wherein, the first preset model includes a dilated convolutional layer and a self-attention module; the dilated convolutional layer is located before the self-attention module; the dilated convolutional layer is used to extract features related to the lesion in the sample dermoscopic image, and the self-attention module is used to output global semantic features of the sample dermoscopic image based on the features related to the lesion; the dermoscopic image segmentation model is used to determine the lesion region in the dermoscopic image to be identified based on the dermoscopic image to be identified.
[0032] Fourthly, this application provides a dermoscopic image recognition device, which is applied to a dermoscopic image recognition system, and the device includes:
[0033] A receiving module is used to receive a dermoscopic image to be identified; the dermoscopic image to be identified includes lesions of skin diseases;
[0034] A response module is used to respond to a user-triggered dermoscopic image segmentation request, input the dermoscopic image to be identified into a dermoscopic image segmentation model, and determine the lesion region in the dermoscopic image to be identified; the dermoscopic image segmentation model is trained using the method described in claim 1.
[0035] The processing module is used to generate a segmented image corresponding to the dermoscopic image to be identified based on the lesion area in the dermoscopic image to be identified;
[0036] The output module is used to output the segmented image corresponding to the dermoscopy image to be identified.
[0037] Fifthly, this application provides an electronic device, including: at least one processor and a memory;
[0038] The memory stores computer-executed instructions;
[0039] The at least one processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method described in either the first aspect or the second aspect.
[0040] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method as described in either the first or second aspect.
[0041] In a seventh aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in either the first or second aspect.
[0042] The dermoscopic image segmentation model training, dermoscopic image recognition method, and apparatus provided in this application, by adding a dilated convolutional layer to a first preset model, extracts lesion-related features from sample dermoscopic images through the dilated convolutional layer. This expands the feature receptive field of feature extraction without sacrificing the feature space resolution of lesion-related features, thereby improving the accuracy of extracting lesion-related features from sample dermoscopic images. Based on a self-attention module, training the first preset model allows it to learn lesion-related features and global semantic features of sample dermoscopic images, improving the accuracy of the trained dermoscopic image segmentation model in identifying lesions and non-lesion regions from dermoscopic images, and thus enhancing the accuracy of dermoscopic image recognition. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a schematic diagram of a dermoscopy image;
[0045] Figure 2 This application provides a schematic diagram illustrating an application scenario for a dermoscopy image recognition system.
[0046] Figure 3 A schematic diagram illustrating an application scenario for another dermoscopic image recognition system provided in this application;
[0047] Figure 4 A schematic diagram of an electronic device structure is provided in this application;
[0048] Figure 5 A flowchart illustrating a dermoscopic image segmentation model training method provided in this application;
[0049] Figure 6 A schematic diagram of the structure of a first pre-designed model provided in this application;
[0050] Figure 7 A flowchart illustrating a dermoscopy image recognition method provided in this application;
[0051] Figure 8 This application provides a schematic diagram of the interface of a dermoscopy image recognition system.
[0052] Figure 9 A schematic diagram of a segmented image provided in this application;
[0053] Figure 10 Another schematic diagram of image segmentation provided in this application;
[0054] Figure 11 Another schematic diagram of image segmentation provided in this application;
[0055] Figure 12 A schematic diagram of the interface of another dermoscopic image recognition system provided in this application;
[0056] Figure 13 A schematic diagram of the interface of another dermoscopy image recognition system provided in this application;
[0057] Figure 14 A schematic diagram of the interface of another dermoscopy image recognition system provided in this application;
[0058] Figure 15 A schematic diagram of the interface of another dermoscopy image recognition system provided in this application;
[0059] Figure 16 A schematic diagram of the interface of another dermoscopy image recognition system provided in this application;
[0060] Figure 17 A schematic diagram of the structure of a dermoscopic image segmentation model training device 300 provided in this application;
[0061] Figure 18 This is a schematic diagram of the structure of a dermoscopic image recognition device 400 provided in this application. Detailed Implementation
[0062] First, those skilled in the art should understand that these embodiments are merely for explaining the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make adjustments as needed to adapt to specific application scenarios.
[0063] Secondly, it should be noted that in the description of the embodiments of the present invention, the terms "inner" and "outer", etc., which indicate the direction or positional relationship, are based on the direction or positional relationship shown in the drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or component must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of the present invention.
[0064] Furthermore, it should be noted that, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present invention according to the specific circumstances.
[0065] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] Figure 1 This is a schematic diagram of a dermoscopy image. (Example) Figure 1As shown, dermoscopy images can include lesions. Doctors and researchers can analyze these lesions in the dermoscopy images to make diagnoses and determine the type of disease a patient has.
[0067] In related technologies, doctors and other researchers also need to analyze dermoscopic images to determine the contours, shapes, sizes, and other characteristics of lesions in the dermoscopic images in preparation for subsequent surgical treatment.
[0068] However, existing methods for determining the contour shape and size of lesions in dermoscopic images based on manual analysis are inefficient and inaccurate.
[0069] Considering the aforementioned problems with existing dermoscopic image recognition methods, which require manual identification of dermoscopic images, this application proposes an automated method for identifying dermoscopic images and segmenting lesion contours from them. This method eliminates the need for manual identification of dermoscopic images to determine lesion contours, thus improving the efficiency and accuracy of dermoscopic image recognition.
[0070] The above method is implemented in a dermoscopy image recognition system. For example, Figure 2 This is a schematic diagram illustrating an application scenario for a dermoscopy image recognition system provided in this application. For example... Figure 2 As shown, in one embodiment, the dermatoscopy image recognition system can be entirely deployed in a cloud environment. A cloud environment is an entity that provides cloud services to users using basic resources under a cloud computing model. A cloud environment includes cloud data centers and cloud service platforms. The cloud data center includes a large amount of basic resources (including computing resources, storage resources, and network resources) owned by the cloud service provider. The computing resources included in the cloud data center can be a large number of electronic devices (e.g., servers). For example, taking the computing resources included in the cloud data center as servers running virtual machines, the dermatoscopy image recognition system can be deployed independently on servers or virtual machines in the cloud data center. Alternatively, the dermatoscopy image recognition system can be distributed across multiple servers in the cloud data center, or distributed across multiple virtual machines in the cloud data center, or distributed across servers and virtual machines in the cloud data center.
[0071] like Figure 2As shown, a dermoscopic image recognition system can be abstracted into a dermoscopic image recognition service by a cloud service provider on a cloud service platform and offered to users. After purchasing this cloud service on the cloud service platform (e.g., pre-payment with settlement based on final resource usage), the cloud environment utilizes the dermoscopic image recognition system deployed in the cloud data center to provide the dermoscopic image recognition service to the user. When using the dermoscopic image recognition service, the user can specify the task to be completed by the dermoscopic image recognition system through an application program interface (API) or GUI, and upload the dermoscopic image to be recognized to the cloud environment. The dermoscopic image recognition system in the cloud environment receives the user's request and the dermoscopic image to be recognized, performs the dermoscopic image recognition operation, and returns the dermoscopic image recognition result to the user through the API or GUI.
[0072] Figure 3 This is a schematic diagram illustrating an application scenario for another dermoscopic image recognition system provided in this application. The dermoscopic image recognition system provided in this application has relatively flexible deployment, such as... Figure 3 As shown, in another embodiment, the dermoscopy image recognition system provided in this application can also be deployed in a distributed manner in different environments. The dermoscopy image recognition system provided in this application can be logically divided into multiple parts, each with different functions. Each part of the dermoscopy image recognition system can be deployed in any two or three of the following: a terminal electronic device (located on the user side), an edge environment, and a cloud environment. The terminal electronic device located on the user side can include, for example, at least one of the following: a terminal server, a smartphone, a laptop, a tablet computer, a personal desktop computer, etc. The edge environment is an environment including a set of edge electronic devices located close to the terminal electronic devices, such as edge servers and edge stations with computing power. The various parts of the dermoscopy image recognition system deployed in different environments or devices work together to provide the user with the function of dermoscopy image recognition. It should be understood that this application does not restrict the specific environments in which the parts of the dermoscopy image recognition system are deployed. In practical applications, the deployment can be adaptively made according to the computing power of the terminal electronic device, the resource availability of the edge environment and cloud environment, or specific application requirements. Figure 3 This is a schematic diagram illustrating application scenarios using a dermoscopy image recognition system deployed in both edge and cloud environments.
[0073] The dermoscopy image recognition system can also be deployed independently on an electronic device in any environment (e.g., deployed independently on an edge server in an edge environment). Figure 4 This is a schematic diagram of an electronic device structure provided in this application. Figure 4As shown, the electronic device 10 may include at least one processor 11 and a memory 12.
[0074] The memory 12 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions.
[0075] The memory 12 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage.
[0076] The processor 11 is used to execute computer execution instructions stored in the memory 12 to implement the dermoscopic image segmentation model training method or the dermoscopic image recognition method described in the following method embodiments. The processor 11 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0077] Optionally, the electronic device 10 may also include a communication interface 13. In specific implementations, if the communication interface 13, memory 12, and processor 11 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.
[0078] Optionally, in a specific implementation, if the communication interface 13, memory 12 and processor 11 are integrated on a single chip, then the communication interface 13, memory 12 and processor 11 can communicate through an internal interface.
[0079] The technical solutions of this application will be described in detail below with reference to specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0080] Figure 5 This is a flowchart illustrating a dermoscopic image segmentation model training method provided in this application. Figure 5 As shown, the method includes:
[0081] S101. Obtain the first sample dataset.
[0082] The aforementioned first sample dataset may include at least one subset of sample data. For any subset of sample data, the subset may include: sample dermoscopic images, and lesion region labels within the sample dermoscopic images.
[0083] It should be understood that this application does not limit the type of disease to which the lesions included in the aforementioned sample dermoscopic images belong. Furthermore, this application does not limit the number of lesion types in the sample dermoscopic images included in the aforementioned first sample dataset.
[0084] Optionally, the electronic device may receive a first sample dataset input by the user, for example, via an API or GUI. Alternatively, the first sample dataset may be pre-stored by the user on the electronic device. Or, the electronic device may retrieve the aforementioned first sample dataset from a target database.
[0085] S102. Use the first sample dataset to train the first preset model to obtain the dermoscopy image segmentation model.
[0086] The aforementioned first preset model may include a dilated convolutional layer and a self-attention module. The dilated convolutional layer is located before the self-attention module. The dilated convolutional layer is used to extract lesion-related features from the sample dermoscopic image. The lesion-related features output by the dilated convolutional layer from the sample dermoscopic image can be input into the self-attention module.
[0087] This self-attention module is used to output global (long-range) semantic features of the sample dermoscopic image based on the aforementioned lesion-related features. These global semantic features can be used to characterize the relationships between pixels in the sample dermoscopic image.
[0088] It should be understood that this application does not limit the number of dilated convolutional layers or the number of self-attention modules in the first preset model.
[0089] The aforementioned dermoscopic image segmentation model is used to output a segmented image corresponding to the dermoscopic image to be identified. This segmented image includes the outline of the lesion in the dermoscopic image to be identified.
[0090] It should be understood that this application does not limit the preset parameters such as the learning rate or the loss function used when training the first preset model. Furthermore, it should be understood that this application does not limit whether the first preset model includes other layers. For example, the first preset model may also include convolutional layers, downsampling layers, etc. In this implementation, this application does not limit the number of downsampling layers, the number of convolutional layers, or the order in which convolutional layers, downsampling layers, and dilated convolutional layers are arranged in the first preset model.
[0091] In this embodiment, by adding a dilated convolutional layer to the first preset model, and extracting lesion-related features from the sample dermoscopic image through the dilated convolutional layer, the feature receptive field of feature extraction can be expanded without sacrificing the feature space resolution of lesion-related features, thereby improving the accuracy of extracting lesion-related features from the sample dermoscopic image. Based on the self-attention module, the first preset model can be trained to learn the lesion-related features and the global semantic features of the sample dermoscopic image, improving the accuracy of the trained dermoscopic image segmentation model in identifying lesions and non-lesion regions from dermoscopic images, and thus improving the accuracy of dermoscopic image recognition.
[0092] For example, taking the first preset model mentioned above, which includes a dilated convolutional layer, as an example, Figure 6 This is a schematic diagram of a first pre-defined model provided in this application. The first pre-defined model may include multiple convolutional layers and multiple downsampling layers. For example... Figure 6 As shown, any one of Layers 1-5 can be a convolutional layer or a downsampling layer. Here, "cat" indicates that the outputs of the layers on either side of the "cat" arrow are added together. For example, the lesion-related features output by Layer 1 can be added to the lesion-related features output by Layer 5.
[0093] For example, such as Figure 6 As shown, the first preset model may include two self-attention modules. The functions of these two self-attention modules may differ.
[0094] For example, the self-attention module 1 can be a positional attention module. This positional attention module can generate a positional attention matrix based on lesion-related features in the sample dermoscopic image output by the dilated convolutional layer. This positional attention matrix can be used to characterize the relationship between any two points in the sample dermoscopic image. The first global semantic feature of the sample dermoscopic image is obtained by performing matrix multiplication on the positional attention matrix and the feature matrix corresponding to the lesion-related features output by the dilated convolutional layer in the sample dermoscopic image. Then, the result of the multiplication is added element-wise to the feature matrix corresponding to the lesion-related features output by the convolutional layer or downsampling layer preceding this attention module.
[0095] For example, the self-attention module 2 can be a channel attention module. The functions and implementation methods of this channel attention module are similar to those of the position attention module described above. The difference is that the channel attention module performs the matrix multiplication and element-wise addition in the channel dimension to obtain the second global semantic features of the sample dermoscopic image.
[0096] Then, the electronic device can aggregate the global semantic features of the sample dermoscopic image output by the self-attention module 1 and the global semantic features of the sample dermoscopic image output by the self-attention module 2 to obtain the global semantic features of the sample dermoscopic image.
[0097] In some embodiments, the basic architecture of the first preset model can be, for example, a Residual Network (ResNet). In this implementation, the last two modules of the ResNet network can be removed, and the aforementioned dilated convolutional layer and a self-attention module can be added to obtain the first preset model. By designing the kernel size of the dilated convolutional layer, the size of the feature map output by the dilated convolutional layer can be made one-eighth the size of the sample dermoscopy image.
[0098] For example, when training the first preset model, the loss function used to train the first preset model can be, for example, the focal loss function.
[0099] After obtaining the dermoscopic image segmentation model, it can be used for dermoscopic image recognition. The following detailed description, with reference to specific embodiments, illustrates how this application uses the dermoscopic image segmentation model for dermoscopic image recognition. These specific embodiments can be combined with each other, and similar concepts or processes may not be repeated in some embodiments.
[0100] The dermoscopic image recognition method is executed by the aforementioned dermoscopic image recognition system. It should be understood that the electronic device executing the training method for the dermoscopic image segmentation model can belong to the dermoscopic image recognition system or can be an electronic device independent of the dermoscopic image recognition system.
[0101] Figure 7 This is a flowchart illustrating a dermoscopy image recognition method provided in this application. Figure 7 As shown, the method includes the following steps:
[0102] S201. Receive the dermoscopy image to be identified.
[0103] The dermoscopic image to be identified includes lesions of skin diseases. It should be understood that this application does not limit the type of skin disease to which the lesions included in the dermoscopic image to be identified belong.
[0104] For example, the dermoscopy image recognition system can receive a dermoscopy image to be recognized input by the user through a GUI interface displayed on a user terminal. For example, taking a computer as the user terminal... Figure 8 This is a schematic diagram of the interface of a dermoscopy image recognition system provided in this application. Figure 8 As shown, the dermoscopy image recognition system can respond to the user's click on the "upload image" control and receive the dermoscopy image to be recognized input by the user.
[0105] S202. In response to the user-triggered dermoscopic image segmentation request, input the dermoscopic image to be identified into the dermoscopic image segmentation model to determine the lesion area in the dermoscopic image to be identified.
[0106] The dermoscopic image segmentation model is trained using the dermoscopic image segmentation model training method described in any of the foregoing embodiments.
[0107] For example, such as Figure 8 As shown, users can trigger a dermoscopic image segmentation request by clicking the "Start Segmentation" control.
[0108] S203. Generate a segmented image corresponding to the dermoscopic image to be identified based on the lesion area in the dermoscopic image to be identified.
[0109] In some embodiments, the dermoscopic image segmentation model can determine a first pixel belonging to a lesion region and a second pixel belonging to a non-lesion region in the dermoscopic image to be identified. The dermoscopic image recognition system can generate a segmented image corresponding to the dermoscopic image to be identified based on the values corresponding to the first pixel and the second pixel.
[0110] S204. Output the segmented image corresponding to the dermoscopy image to be identified.
[0111] After generating the segmented image corresponding to the dermoscopic image to be recognized, the dermoscopic image recognition system can output the segmented image through a user terminal. Optionally, taking a terminal device equipped with a display device as an example, the dermoscopic image recognition system can control the display device of the user terminal to output and display the segmented image. Alternatively, the user terminal may not be equipped with a display device; in this implementation, the dermoscopic image recognition system can control the display device connected to the user terminal to output and display the segmented image.
[0112] In this embodiment, after receiving the dermoscopic image to be identified, the dermoscopic image recognition system can determine the lesion region in the image using a dermoscopic image segmentation model. Then, based on the lesion region in the dermoscopic image, the system can generate and output a segmented image corresponding to the dermoscopic image. This method achieves automatic image segmentation of the dermoscopic image without requiring manual analysis to determine the lesion outline, thus improving the efficiency of dermoscopic image recognition. Furthermore, this automatic recognition method avoids misjudgments caused by subjective human factors, thereby improving the accuracy of identifying lesion regions in dermoscopic images.
[0113] The following section details how a dermoscopic image recognition system generates a segmented image corresponding to the lesion region in a dermoscopic image to be identified:
[0114] As a first possible implementation, the dermoscopy image recognition system can pre-store an image visualization processing method. In this implementation, the dermoscopy image recognition system can generate a segmented image corresponding to the dermoscopy image to be recognized based on the pre-set image visualization processing method and the lesion region in the aforementioned dermoscopy image to be recognized.
[0115] For example, the image visualization processing method can be any one of internal segmentation visualization, external segmentation visualization, and edge segmentation visualization.
[0116] Taking the internal segmentation visualization method as an example, Figure 9 This is a schematic diagram of a segmented image provided in this application. For example... Figure 9 As shown, when the preset image visualization processing method is internal segmentation visualization, the dermoscopic image recognition system can set the value of each first pixel point belonging to the lesion area to the value of the corresponding pixel point in the dermoscopic image to be recognized, and set the value of the second pixel point belonging to the non-lesion area to the value corresponding to black, thereby generating a segmented image.
[0117] Taking external segmentation visualization as an example of this image visualization processing method, Figure 10 This is another schematic diagram of a segmented image provided for this application. For example... Figure 10 As shown, when the preset image visualization processing method is external segmentation visualization, the dermoscopic image recognition system can set the value of each first pixel point belonging to the lesion area to the value corresponding to black, and set the value of each second pixel point belonging to the non-lesion area to the value of the corresponding pixel point in the dermoscopic image to be recognized, thereby generating a segmented image.
[0118] Taking edge segmentation visualization as an example, this image visualization processing method is used. Figure 11 This is another schematic diagram of image segmentation provided in this application. For example... Figure 11 As shown, when the preset image visualization processing method is edge segmentation visualization, the dermoscopic image recognition system can, for example, determine the pixel values of the pixels at the critical positions of the lesion area and the non-lesion area. Then, the dermoscopic image recognition system can obtain a segmented image based on the pixel values of the pixels at the critical positions of the two areas, as well as the pixel values of each pixel in the dermoscopic image to be recognized.
[0119] It should be understood that the above-described image visualization processing method is a possible image visualization processing method provided by this application. The dermoscopy image recognition system may also use other image visualization processing methods as preset image visualization processing methods to obtain the segmented image corresponding to the dermoscopy image to be recognized, and this application does not limit this.
[0120] Optionally, the aforementioned preset image visualization processing method can be pre-stored by the user in the dermoscopy image recognition system. In some embodiments, the dermoscopy image recognition system can also receive an updated image visualization processing method and store it in the dermoscopy image recognition system, so as to use the updated image visualization processing method to generate a segmented image corresponding to the dermoscopy image to be recognized.
[0121] For example, still in the form of Figure 8 Taking the dermoscopy image recognition system interface shown as an example, the dermoscopy image recognition system can directly display the segmented image corresponding to the dermoscopy image to be recognized on this interface after generating the segmented image corresponding to the dermoscopy image to be recognized.
[0122] In this implementation, the dermoscopy image recognition system can directly generate segmented images corresponding to the dermoscopy images to be recognized based on preset image visualization processing methods, thereby improving the efficiency of segmented image generation.
[0123] As a second possible implementation, the dermoscopy image recognition system can first generate and display an initial segmented image corresponding to the dermoscopy image to be recognized based on a preset image visualization processing method and the lesion area in the dermoscopy image to be recognized.
[0124] Then, in response to the user's input request for segmented image visualization, the dermoscopy image recognition system can generate a segmented image corresponding to the dermoscopy image to be identified, based on the lesion area in the dermoscopy image to be identified.
[0125] For example, Figure 12 A schematic diagram of the interface of another dermoscopic image recognition system provided in this application. Figure 12 As shown, the dermoscopy image recognition system can first generate and display an initial segmented image obtained by a preset image visualization processing method. This interface can also display controls labeled with at least one image visualization processing method, allowing users to input segmented image visualization processing requests by clicking on the control labeled with that method.
[0126] The dermoscopy image recognition system, based on the user's input request for segmented image visualization, can generate a segmented image corresponding to the dermoscopy image to be recognized, matching the request. For example, such as... Figure 12 As shown, if the user clicks the "Internal Segmentation" control, the dermoscopy image recognition system can generate a segmented image corresponding to the dermoscopy image to be recognized based on the internal segmentation visualization processing method.
[0127] It should be understood that Figure 12 This is merely an example of an interface for a dermoscopic image recognition system, and this application does not limit the image visualization processing methods that the dermoscopic image recognition system can provide.
[0128] In this implementation, the dermoscopy image recognition system can output the segmented image that the user wants to view according to the user's needs, which improves the diversity of services provided by the dermoscopy image recognition system and enhances the user experience.
[0129] As a third possible implementation, the aforementioned dermoscopy image segmentation request can carry an identifier of the image visualization processing method. Therefore, when the dermoscopy image recognition system responds to the user-triggered dermoscopy image segmentation request in step S202, it can receive the identifier of the image visualization processing method. This application does not limit the specific form of the identifier of the image visualization processing method. For example, the identifier of the image visualization processing method can be text, letters, numbers, etc.
[0130] In this implementation, the dermoscopy image recognition system can generate a segmented image corresponding to the dermoscopy image to be recognized based on the identifier of the above-mentioned image visualization processing method and the lesion area in the dermoscopy image to be recognized.
[0131] Optionally, the dermoscopy image recognition system can determine the image visualization processing method based on the identifier of the image visualization processing method, and then use the image visualization processing method to generate a segmented image corresponding to the dermoscopy image to be identified based on the lesion area in the dermoscopy image to be identified. The specific implementation method can refer to the method described in the foregoing embodiments, and will not be repeated here.
[0132] For example, Figure 13 This is a schematic diagram of the interface of another dermoscopy image recognition system provided in this application. Figure 13 As shown, users can first select an image visualization processing method, such as clicking the "Internal Segmentation" control, and then click the "Start Segmentation" control to trigger a dermoscopic image segmentation request carrying the identifier of the image visualization processing method. The dermoscopic image recognition system can then respond to this segmentation request, obtain the segmented image corresponding to the dermoscopic image to be recognized, and display it.
[0133] In this implementation, users can select the image visualization processing method before triggering the dermoscopy image segmentation request, so that the dermoscopy image segmentation request can carry the identifier of the image visualization processing method, thereby improving the efficiency of the dermoscopy image recognition system in generating segmented images.
[0134] In some embodiments, after generating a segmented image corresponding to the dermoscopy image to be recognized, the dermoscopy image recognition system can also output an image identifier corresponding to the segmented image and store the segmented image. By outputting the image identifier corresponding to the segmented image, the user can record the image identifier. By storing the segmented image, the user can retrieve the segmented image from the dermoscopy image recognition system based on the recorded image identifier, further improving the user experience.
[0135] Optionally, the dermatoscope image recognition system can, for example, obtain the time point of image segmentation of the dermatoscope image to be recognized, and generate a string as the image identifier corresponding to the segmented image based on the time point. Alternatively, the dermatoscope image recognition system can, for example, randomly generate a string as the image identifier corresponding to the segmented image.
[0136] Optionally, the dermoscopy image recognition system can, for example, convert the segmented image data into binary data for storage to improve storage efficiency.
[0137] Furthermore, Figure 14This is a schematic diagram of the interface of another dermoscopy image recognition system provided in this application. Figure 14 As shown, the dermoscopy image recognition system can also provide a segmented image download service. Users can enter the image identifier corresponding to the segmented image and then click the "Download Segmented Image" control to download the segmented image.
[0138] As one possible implementation, the dermoscopic image recognition system can also be used to determine the type of disease to which the lesion in the dermoscopic image to be recognized belongs and output relevant information based on the dermoscopic image to be recognized input by the user.
[0139] Optionally, the dermoscopic image recognition system can respond to a user-triggered dermoscopic image recognition request by inputting the dermoscopic image to be recognized into the dermoscopic image recognition model to determine the disease type to which the lesions included in the dermoscopic image to be recognized belong.
[0140] The aforementioned dermoscopy image recognition model can be pre-trained and stored in the dermoscopy image recognition system.
[0141] For example, Figure 15 This is a schematic diagram of the interface of another dermoscopy image recognition system provided in this application. Figure 15 As shown, the dermatoscope image recognition system can respond to the user clicking the "Select File" control by displaying an interface for receiving the dermatoscope image to be recognized by the user. The user can then select the dermatoscope image to be recognized. The dermatoscope image recognition system can then respond to the user clicking the "Upload" control by receiving the aforementioned dermatoscope image and triggering a dermatoscope image recognition request.
[0142] After obtaining the disease identifier, the dermoscopy image recognition system can determine the relevant disease information corresponding to the disease based on the disease identifier.
[0143] Optionally, the dermoscopic image recognition system may pre-store disease identifiers and their mapping relationships with relevant disease information. The dermoscopic image recognition system can determine the relevant disease information of the lesions included in the dermoscopic image to be identified based on the disease identifier of the lesion included in the dermoscopic image to be identified, and the mapping relationship.
[0144] Alternatively, the dermoscopy image recognition system can also search for relevant information about a disease from the internet based on the disease identifier.
[0145] After obtaining relevant information about the disease, the dermoscopy image recognition system can output relevant information about that disease.
[0146] It should be understood that this application does not limit the specific content of the above-mentioned disease-related information. For example, such as... Figure 15As shown, the relevant information for this disease may include, for example, the Chinese and English scientific names of the disease to which the lesion belongs, as well as other relevant information. Among them, the other relevant information may include at least one of the following: a brief introduction to the disease, its etiology, and its clinical manifestations.
[0147] In this embodiment, the dermoscopic image recognition system can input the dermoscopic image to be identified into the dermoscopic image recognition model, automatically identifying the type of disease to which the lesions included in the dermoscopic image belong. This method avoids the need for manual observation and analysis of lesion features in dermoscopic images to diagnose pigmented skin diseases. Since the differences between lesions in different cases are very small, it is extremely difficult to manually analyze and determine the type of lesions through naked-eye observation. Therefore, the above method can provide auxiliary diagnosis, alleviate the pressure on manual diagnosis, and improve the efficiency and accuracy of diagnosis.
[0148] The following example demonstrates how to train the dermoscopy image recognition model, using any electronic device with processing capabilities as the execution subject:
[0149] As one possible implementation, the electronic device can acquire a second sample dataset and then use the second sample dataset to train at least one second preset model to obtain a dermoscopy image recognition model.
[0150] The second sample dataset mentioned above may include: a subset of virtual sample data and a subset of actual sample data. The virtual sample data subset may include at least one virtual dermoscopic image and a corresponding disease label for that virtual dermoscopic image. The actual sample data subset may include at least one actual dermoscopic image and a corresponding disease label for that actual dermoscopic image.
[0151] The aforementioned virtual dermoscopic image is generated based on a dermoscopic image generation model. The electronic device that performs the generation of the virtual sample dermoscopic image using the dermoscopic image generation model can be the same device as the electronic device that performs the method for training the aforementioned dermoscopic image recognition model, or it can be a different device.
[0152] For example, the aforementioned second preset model may include at least one of the following: a ResNet network, a DenseNet network, or a ResNeXt network. Taking the example of an electronic device training the above three second preset models using a second sample dataset, optionally, the second sample dataset may be divided into three equal parts: k1, k2, and k3, where any one set of samples may include virtual sample dermoscopic images and actual sample dermoscopic images. The electronic device may use k1 and k2 to form the training set for the ResNet network; use k1 and k3 to form the training set for the ResNeXt network; and use k2 and k3 to form the training set for the DenseNet network.
[0153] Taking the example of an electronic device training the three pre-defined second models using the second sample dataset, the electronic device can obtain three dermoscopic image recognition models corresponding to these three pre-defined second models. Then, based on the recognition results of a dermoscopic image to be recognized by these three dermoscopic image recognition models, the dermoscopic image recognition system can determine the disease type to which the lesions included in the dermoscopic image to be recognized belong.
[0154] In some embodiments, before training the second preset model using the second sample dataset described above, the electronic device may also pre-train the second preset model using the ImageNet (a publicly available image dataset) image dataset to improve the efficiency of training the second preset model using the second sample dataset.
[0155] In this embodiment, by training a second preset model using actual sample dermoscopic images and virtual sample dermoscopic images generated based on the dermoscopic image generation model, the problems of insufficient training sample image data and uneven distribution of the number of lesion types included in the sample image data are solved, thereby improving the accuracy of the dermoscopic image recognition model.
[0156] As one possible implementation, the dermoscopy image recognition system can also generate virtual dermoscopy images.
[0157] In some embodiments, the dermoscopic image recognition system can respond to a user-triggered dermoscopic image generation request and generate at least one virtual dermoscopic image of a target resolution based on a target dermoscopic image generation model. The dermoscopic image generation request may include the target resolution and the target disease. The virtual dermoscopic image includes lesions of the target disease.
[0158] Optionally, the target dermoscopy image generation model described above can be pre-trained and stored in the dermoscopy image recognition system.
[0159] Optionally, the third sample dataset used to train the third preset model can be different for different diseases and different resolutions of virtual dermoscopic images. Taking N diseases and M different resolutions as an example, the dermoscopic image recognition system can store N×M initial dermoscopic image generation models. In this implementation, the dermoscopic image recognition system can also store the mapping relationship between the disease, resolution, and the identifier of the initial dermoscopic image generation model. The dermoscopic image recognition system can determine the target dermoscopic image generation model required to generate a virtual dermoscopic image with the target resolution including the lesions of the target disease based on the target resolution, the target disease, and the above mapping relationship.
[0160] After acquiring the virtual dermoscopic image, the dermoscopic image recognition system can output the virtual dermoscopic image so that the user can view it.
[0161] For example, Figure 16 This is a schematic diagram of the interface of another dermoscopy image recognition system provided in this application. Figure 16 As shown, users can click to view a virtual dermoscopic image of the desired resolution, triggering a request to generate a dermoscopic image with the target resolution. For example, a low-resolution image could have a resolution of 96×96, and a high-resolution image could have a resolution of 192×192.
[0162] by Figure 16 For example, the dermatoscope image recognition system can respond to a user-triggered dermatoscope image generation request, generate high-resolution virtual dermatoscope images, and output them for display. Optionally, this application does not limit the number of virtual dermatoscope images that the dermatoscope image recognition system can output. Furthermore, the number of virtual dermatoscope images of different resolutions generated by the dermatoscope image recognition system can be the same or different.
[0163] like Figure 16 As shown, the interface may also include a "zoom-in control," which allows users to zoom in on the virtual dermoscopic image to view its details. Furthermore, as... Figure 16 As shown, the interface can also include controls for triggering a dermoscopic image generation request. Users can click on this interface, and the dermoscopic image recognition system can regenerate a high-resolution virtual dermoscopic image and output it for display.
[0164] In this embodiment, virtual dermoscopic images for various diseases are generated using a dermoscopic image recognition system, increasing the number of dermoscopic medical images that users can study. This solves the problem of insufficient medical images due to patient privacy protection and limited existing data, thus improving the user experience.
[0165] The following example demonstrates how to train the aforementioned target dermoscopy image generation model, using any electronic device with processing capabilities as the executing entity.
[0166] As one possible implementation, the electronic device can acquire a third sample dataset and then use the third sample dataset to train a third preset model to obtain a target dermoscopic image generation model.
[0167] Optionally, taking N diseases and M different resolutions as an example, N×M third sample datasets can be used to train N×M third preset models, thereby obtaining N×M target dermoscopic image generation models. The lesions in the sample dermoscopic images within the same third sample dataset belong to the same disease, and the sample dermoscopic images within the same third sample dataset have the same resolution. Optionally, in some embodiments, before training the third preset model using the third sample dataset, the electronic device can also perform data augmentation processing such as flipping and random cropping on the sample dermoscopic images in the third sample dataset to improve the robustness of the dermoscopic image generation model.
[0168] These multiple third preset models can be the same model or different models. For example, taking different third preset models for different resolutions as an example, the third preset model corresponding to the model used to generate dermoscopic images at the first resolution can be a Deep Convolutional Generative Adversarial Network (DCGAN). The third preset model corresponding to the model used to generate dermoscopic images at the second resolution can be a DCGAN with a self-attention mechanism. Here, the first resolution is smaller than the second resolution.
[0169] Figure 17 This is a schematic diagram of the structure of a dermoscopic image segmentation model training device 300 provided in this application. Figure 17 As shown, the device may include: an acquisition module 301 and a training module 302. Wherein,
[0170] The acquisition module 301 is used to acquire a first sample dataset. The first sample dataset includes at least one subset of sample data; the subset of sample data includes: sample dermoscopic images, and lesion region labels in the sample dermoscopic images.
[0171] Training module 302 is used to train a first preset model using the first sample dataset to obtain a dermoscopic image segmentation model. The first preset model includes a dilated convolutional layer and a self-attention module; the dilated convolutional layer is located before the self-attention module; the dilated convolutional layer is used to extract features related to the lesion in the sample dermoscopic image; the self-attention module is used to output global semantic features of the sample dermoscopic image based on the lesion-related features; the dermoscopic image segmentation model is used to determine the lesion region in the dermoscopic image to be identified.
[0172] The dermoscopic image segmentation model training device provided in this embodiment is used to execute the aforementioned dermoscopic image segmentation model training method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0173] Figure 18 This is a schematic diagram of the structure of a dermoscopic image recognition device 400 provided in this application. Figure 18 As shown, the device may include: a receiving module 401, a response module 402, a processing module 403, and an output module 404. Among them,
[0174] The receiving module 401 is used to receive a dermoscopic image to be identified. The dermoscopic image to be identified includes lesions of skin diseases.
[0175] The response module 402 is configured to respond to a user-triggered dermoscopic image segmentation request by inputting the dermoscopic image to be identified into a dermoscopic image segmentation model to determine the lesion region in the dermoscopic image. The dermoscopic image segmentation model is trained using the dermoscopic image segmentation model training method described in any of the foregoing embodiments.
[0176] The processing module 403 is used to generate a segmented image corresponding to the dermoscopic image to be identified based on the lesion area in the dermoscopic image to be identified.
[0177] The output module 404 is used to output the segmented image corresponding to the dermoscopy image to be identified.
[0178] Optionally, the processing module 403 is specifically used to generate a segmented image corresponding to the dermoscopic image to be identified based on a preset image visualization processing method and the lesion area in the dermoscopic image to be identified.
[0179] Optionally, the processing module 403 is specifically used to generate and display an initial segmentation image corresponding to the dermoscopic image to be identified, based on a preset image visualization processing method and the lesion area in the dermoscopic image to be identified.
[0180] In response to a user-input request for segmented image visualization, a segmented image corresponding to the dermoscopic image to be identified is generated based on the lesion region in the dermoscopic image to be identified, which matches the request for segmented image visualization.
[0181] Optionally, the dermoscopic image segmentation request carries an identifier of the image visualization processing method. Optionally, the processing module 403 is specifically used to generate a segmented image corresponding to the dermoscopic image to be identified based on the identifier of the image visualization processing method and the lesion region in the dermoscopic image to be identified.
[0182] Optionally, the output module 404 is further configured to output an image identifier corresponding to the segmented image after generating the segmented image corresponding to the dermoscopy image to be identified.
[0183] In this implementation, the device 400 may further include a storage module 405 for storing the segmented image.
[0184] Optionally, the processing module 403 is further configured to respond to the user-triggered dermoscopic image recognition request, input the dermoscopic image to be recognized into the dermoscopic image recognition model, determine the disease type identifier of the lesions included in the dermoscopic image to be recognized, and determine the disease-related information corresponding to the disease type based on the disease type identifier. The output module 404 is further configured to output the disease-related information.
[0185] Optionally, the processing module 403 is further configured to respond to the user-triggered dermoscopic image generation request and generate at least one virtual dermoscopic image of target resolution according to the target dermoscopic image generation model. The output module 404 is further configured to output the virtual dermoscopic image. The dermoscopic image generation request carries the target resolution and the target disease; the virtual dermoscopic image includes lesions of the target disease.
[0186] The dermoscopic image recognition device provided in this embodiment is used to execute the aforementioned dermoscopic image recognition method embodiment. Its implementation principle and technical effect are similar, and will not be described again.
[0187] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program instructions, which are used in the methods described in the above embodiments.
[0188] This application also provides a program product including executable instructions stored in a readable storage medium. At least one processor of a terminal device can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the terminal device to implement the dermoscopic image segmentation model training and the dermoscopic image recognition method provided in the various embodiments described above.
[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for training a dermoscopy image segmentation model, characterized in that, The method comprises: obtaining a first sample data set; the first sample data set comprises at least one sample data subset; the sample data subset comprises a sample dermoscope image and a lesion region label in the sample dermoscope image; training a first preset model using the first sample data set to obtain a dermoscope image segmentation model; wherein the first preset model comprises a cavity convolution layer and a self-attention module; the cavity convolution layer is located before the self-attention module; the cavity convolution layer is used to extract features related to the lesion in the sample dermoscope image while keeping the feature space resolution of the lesion-related features unchanged; the self-attention module is used to output global semantic features of the sample dermoscope image according to the lesion-related features; the dermoscope image segmentation model is used to determine a lesion region in a to-be-identified dermoscope image based on the to-be-identified dermoscope image; the global semantic features are first global semantic features of the sample dermoscope image output by a self-attention module 1 and second global semantic features of the sample dermoscope image output by a self-attention module 2, which are aggregated; wherein the basic architecture of the first preset model is a residual learning network, and the size of the convolution kernel of the cavity convolution layer is set to make the size of the feature map output by the cavity convolution layer be one-eighth of the sample dermoscope image; the first preset model comprises two self-attention modules; the self-attention module 1 generates a position attention matrix according to the features related to the lesion in the sample dermoscope image output by the cavity convolution layer; the position attention matrix is used to represent the relationship between any two points in the sample dermoscope image; the position attention matrix and a feature matrix corresponding to the features related to the lesion in the sample dermoscope image output by the cavity convolution layer are multiplied by matrix multiplication, and then the multiplication result and a feature matrix corresponding to the features related to the lesion output by a convolution layer or a down-sampling layer before the attention module are added element by element to obtain the first global semantic features of the sample dermoscope image; the self-attention module 2 is a channel attention module; the channel attention module performs the above-mentioned matrix multiplication and element-wise addition in the channel dimension to obtain the second global semantic features of the sample dermoscope image.
2. A dermoscopy image recognition method characterized by, The method is applied to a dermoscope image recognition system, and the method comprises: receiving a to-be-identified dermoscope image; the to-be-identified dermoscope image comprises a lesion of a skin disease; in response to a dermoscope image segmentation request triggered by a user, inputting the to-be-identified dermoscope image into a dermoscope image segmentation model to determine a lesion region in the to-be-identified dermoscope image; the dermoscope image segmentation model is trained using the method of claim 1; generating a segmentation image corresponding to the to-be-identified dermoscope image according to the lesion region in the to-be-identified dermoscope image; outputting the segmentation image corresponding to the to-be-identified dermoscope image. The method further comprises: in response to the user-triggered dermoscope image generation request, generating at least one virtual dermoscope image of a target resolution according to a target dermoscope image generation model; the dermoscope image generation request carries the target resolution and a target disease type; the virtual dermoscope image includes a lesion of the target disease type; and outputting the virtual dermoscope image.
3. The method of claim 2, wherein, The generating the segmentation image corresponding to the to-be-identified dermoscope image according to the lesion area in the to-be-identified dermoscope image comprises: According to a preset image visualization processing mode and the lesion area in the to-be-identified dermoscope image, generating the segmentation image corresponding to the to-be-identified dermoscope image.
4. The method of claim 2, wherein, The generating the segmentation image corresponding to the to-be-identified dermoscope image according to the lesion area in the to-be-identified dermoscope image comprises: According to a preset image visualization processing mode and the lesion area in the to-be-identified dermoscope image, generating the initial segmentation image corresponding to the to-be-identified dermoscope image and displaying; In response to a segmentation image visualization processing request input by a user, generating the segmentation image corresponding to the to-be-identified dermoscope image according to the lesion area in the to-be-identified dermoscope image and matching the segmentation image visualization processing request.
5. The method of claim 2, wherein, The dermoscope image segmentation request carries an identification of an image visualization processing mode, and the generating the segmentation image corresponding to the to-be-identified dermoscope image according to the lesion area in the to-be-identified dermoscope image comprises: According to the identification of the image visualization processing mode and the lesion area in the to-be-identified dermoscope image, generating the segmentation image corresponding to the to-be-identified dermoscope image.
6. The method according to any one of claims 2-5, characterized in that, After the generating the segmentation image corresponding to the to-be-identified dermoscope image, the method further comprises: Outputting an image identification corresponding to the segmentation image and storing the segmentation image.
7. The method according to any one of claims 2-5, characterized in that, The method further comprises: In response to the user-triggered dermoscope image identification request, inputting the to-be-identified dermoscope image into a dermoscope image identification model to determine an identification of a disease type to which a lesion included in the to-be-identified dermoscope image belongs; According to the identification of the disease type, determining disease type related information corresponding to the disease type; Outputting the disease type related information. 8.A dermoscope image segmentation model training apparatus, applied to the dermoscope image segmentation model training method of claim 1, characterized in that, The device comprises: The acquisition module is configured to acquire a first sample data set; the first sample data set comprises at least one sample data subset; the sample data subset comprises a sample dermoscope image and a lesion area label in the sample dermoscope image; The training module is configured to train a first preset model using the first sample dataset to obtain a dermoscope image segmentation model; the first preset model comprises a cavity convolution layer and a self-attention module; the cavity convolution layer is located before the self-attention module; the cavity convolution layer is configured to extract features related to the lesion in the sample dermoscope image while keeping the feature space resolution of the lesion-related features unchanged; the self-attention module is configured to output global semantic features of the sample dermoscope image according to the lesion-related features; and the dermoscope image segmentation model is configured to determine a lesion area in a to-be-identified dermoscope image based on the to-be-identified dermoscope image.
9. A dermoscopy image recognition apparatus, characterized by, The device is applied to a dermoscope image recognition system, and the device comprises: A receiving module is configured to receive a to-be-identified dermoscope image; the to-be-identified dermoscope image comprises a lesion of a skin disease; A response module is configured to input the to-be-identified dermoscope image into a dermoscope image segmentation model in response to a dermoscope image segmentation request triggered by a user to determine a lesion area in the to-be-identified dermoscope image; the dermoscope image segmentation model is trained using the method of claim 1; A processing module is configured to generate a segmentation image corresponding to the to-be-identified dermoscope image according to the lesion area in the to-be-identified dermoscope image; An output module is configured to output the segmentation image corresponding to the to-be-identified dermoscope image; The processing module is further configured to generate at least one virtual dermoscope image of a target resolution in response to a dermoscope image generation request triggered by the user according to a target dermoscope image generation model; the dermoscope image generation request carries the target resolution and a target disease; the virtual dermoscope image comprises a lesion of the target disease; and the virtual dermoscope image is output.
Citation Information
Patent Citations
Context pyramid fusion network and image segmentation method
CN110689083A