Vulva leukoplakia lesion image identification method

Through the processing and feature extraction methods of vulva leukoplakia lesions, the problems of inaccurate lesion details recognition and large model parameters in the prior art are solved, and the accurate recognition and recognition efficiency of lesion images are achieved.

CN120451120AInactive Publication Date: 2025-08-08JIANGSU CHUNSHENTANG PHARMA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510589550.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art cannot accurately identify the details in the vulvar lesion image, and the model parameters are large, and there are insufficient computing resources and training samples.

Method used

By collecting lesion images and performing preliminary processing, calculating and fusing the first and second processing values, dividing the grayscale mean area, calculating the segmentation threshold, marking the pixel points to be processed, equalizing the image blocks and calculating the query value, key value and positioning value, and using convolution and attention mechanisms to extract lesion features, combining average pooling to improve recognition accuracy and speed.

Benefits of technology

Accurate recognition of lesion images is achieved, the number of model parameters is reduced, the recognition efficiency and speed is improved, and the image preprocessing effect is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451120A_ABST
    Figure CN120451120A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of lesion recognition, solves the technical problem that details in an image cannot be accurately recognized in the prior art, and particularly relates to a method for recognizing a leukoplakia vulvae lesion image, which comprises the following steps of: S1, acquiring a leukoplakia vulvae lesion image at a # imgabs0 # moment, performing primary processing on the focus image to obtain a first processing value # imgabs1 #; and S2, calculating a second processing value # imgabs3 # of the lesion image at the # imgabs2 # moment, and fusing the first processing value # imgabs4 # and the second processing value # imgabs5 # to obtain a preprocessed image. According to three-value positioning of the to-be-processed image, classification of pixels in the to-be-processed image can be completed according to a query value, a key value and a positioning value, the fine-grained extraction capability is improved by means of convolution and an attention mechanism, and the accuracy of the fine-grained extraction is improved. Meanwhile, the parameter number of the model can be optimized, the model operation recognition efficiency is improved, and the accuracy and the recognition speed of focus position recognition in the to-be-processed image can be improved by combining the average pooling mode with the classification threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of lesion recognition, and in particular to a method for recognizing vulvar leukoplakia lesion images. Background Art

[0002] Vulvar leukoplakia, also known as vulvar white lesions, is a group of chronic diseases characterized by pigment changes in the skin and mucous membranes of the female vulva. Although the exact cause of vulvar white lesions is still unclear, chronic simple lichen planus of the vulva may be related to moisture and excessive stimulation of the vulva. Unexplained itching and repeated scratching can also trigger the disease. Modern medicine generally uses machine vision analysis to identify vulvar leukoplakia lesions. Although existing lesion recognition methods can identify lesions, during the recognition process, if you want to identify small features in the image, it is easy to cause smaller-sized detail features to be unable to be effectively extracted; if the image size is reduced to refine the granularity of feature extraction in the discriminable area, the number of image slices will increase by a square, resulting in a sharp increase in the number of model parameters, making the existing computing resources and training samples unable to meet the training requirements of the model. Summary of the Invention

[0003] In response to the shortcomings of the existing technology, the present invention provides a method for identifying vulvar leukoplakia lesion images, which solves the technical problem that the existing technology cannot accurately identify the details in the image, and achieves the purpose of accurately identifying the details of the image and reducing the number of model parameters to improve the recognition efficiency.

[0004] To solve the above technical problems, the present invention provides the following technical solution: a method for identifying vulvar leukoplakia lesion images, the method comprising the following steps: S1. Collection The lesion image of vulvar leukoplakia at the moment is obtained, and the lesion image is preliminarily processed to obtain a first processing value ; S2. Calculation The second processed value of the lesion image at time , and the first processed value and the second processed value Perform fusion to obtain a preprocessed image; S3, calculating the first region for dividing the pre-processed image into and the second region Gray mean , and obtain the first area respectively and the second region The number of pixels and ; S4. According to the first area and the second region Pixel value and number of pixels and Calculate segmentation threshold ; S5. According to the segmentation threshold Calculating update thresholds , and based on the update threshold Marking the pixels to be processed in the preprocessed image and obtaining the image to be processed; S6, divide the image to be processed into image blocks and calculate the query value of the image blocks , key value and positioning values ; S7. According to the query value , key value and positioning values Calculating classification thresholds , and based on the classification threshold Marking a lesion marking image in the image to be processed; S8. Transmitting the image to be processed with the lesion mark image to the display module.

[0005] Furthermore, in step S1, the specific implementation steps are as follows: S11, according to any pixel point in the lesion image Determine the center function of the lesion image , the expression is: in, represents the standard deviation of the center function, Indicates the A central function; S12, according to the central function Calculate the pixel brightness value used to adjust the image brightness , the calculation formula is: in, represents the input pixel brightness of the lesion image; S13, based on pixel brightness value Get the brightness image and get the random number through the random generator , calculate the scaling value of the brightness image based on the random number , the calculation formula is: in, Indicates scaling of the brightness image times, and ; S14, based on the scaling value Get the scaled image , when scaling the image Determine any pixel on As the center of the circle, Pick a reference pixel for the radius , calculate the empty weights respectively and image weight , the calculation formula is: in, Indicates a scaled image The pixels on Indicates a scaled image The reference pixel on Indicates a scaled image Pixels on and reference pixel The standard deviation of S15, according to the empty weight and image weight Calculating the responsibility factor , the calculation formula is: in, Indicates the number of pixels; S16, based on the responsibility and authority factor Calculate the first processed value , the calculation formula is: in, Indicates the The first processed value.

[0006] Furthermore, in step S2, the specific implementation steps are as follows: S21. Acquisition The brightness value of the lesion image at the moment , calculate the reduced value of the image , the calculation formula is: in, Indicates the A reduction value; S22, based on the reduced value Get the scaled image , when scaling the image Pixels As the center of the circle, Pick a comparison pixel for the radius , calculate the shrinkage value respectively and the reduction value , the calculation formula is: in, Indicates a scaled image The scaled-down coordinate value on Indicates a scaled image The contrast pixels on Indicates a scaled image Pixels on and contrast pixels The standard deviation of S23, according to the shrinking value and the reduction value Calculating the balance coefficient , the calculation formula is: in, Indicates a shrinking value and the reduction value the number of S24, according to the balance coefficient Calculate the second processed value , the calculation formula is: in, Indicates the Second processing value; S25, the first processing value and the second processed value Perform bilateral fusion to obtain the preprocessed values of the lesion image pixels , the calculation formula is: in, Represents the pixel value of the fused image; S26, integrating the fused pixels into a fused image, and performing color mapping and detail enhancement on the fused image to obtain a preprocessed image.

[0007] Furthermore, the shrinkage value and the reduction value The calculation formula is: in, Indicates a scaled image The scaled-down coordinate value on Indicates a scaled image The contrast pixels on Indicates a scaled image Pixels on and contrast pixels The standard deviation of .

[0008] Furthermore, in step S3, the specific implementation steps are as follows: S31, convert the preprocessed image into RGB space to obtain the RGB value of the preprocessed image pixel, and calculate the grayscale value of the preprocessed image based on the RGB value , the calculation formula is: in, 、 and Represent the RGB values of the original image respectively; S32, repeat step S31 to obtain the grayscale values of all pixels in the preprocessed image , the gray value Sort to get the maximum gray value and minimum grayscale value , the expression is: in, and Respectively represent the maximum grayscale value and the minimum grayscale value among multiple grayscale values; S33, according to the maximum gray value and minimum grayscale value Calculate the grayscale mean , the calculation formula is: in, Indicates the Grayscale mean; S34, through the grayscale mean Divide the preprocessed image into the first region and the second region ; like , then the pixels of the preprocessed image are divided into the first region ; like , then the pixels of the preprocessed image are divided into the second region ; S35, respectively obtain the first area by counting method and the second region The number of pixels is and .

[0009] Furthermore, in step S4, the specific implementation steps are as follows: S41, according to the first area and the second region The number of pixels is and Calculate the mean of the first region separately and the second region mean , the calculation formula is: in, and Represents the first area and the second region The grayscale value of the pixel; S42, according to the first region mean and the second region mean Determine the traversal range ; S43, obtaining the total number of pixels of the pre-processed image , defines the gray level in the preprocessed image The corresponding grayscale value is , the number of pixels is , calculate the first area respectively and the second region The pixel probability value and , the calculation formula is: in, Indicates the first area The pixel probability value, Indicates the second area Pixel probability value; S44, calculate the overall grayscale mean of all pixels in the preprocessed image , the calculation formula is: in, Indicates the The overall grayscale mean; S45, according to the overall grayscale mean Calculate segmentation threshold , the calculation formula is: in, Represents the deviation verification value of the pixel in the preprocessed image, Indicates the A segmentation threshold.

[0010] Furthermore, in step S5, the specific implementation steps are as follows: S51, based on the segmentation threshold Calculate the interval and from Start, every Grayscale value to calculate the deviation verification value of the next grayscale value The calculation formula is: in, Indicates the A new deviation verification value; S52, repeat step S46 until the traversal range Deviation verification value of all gray values within The calculation is completed and a new traversal range is obtained ; S53, verify the value based on the deviation Calculating update thresholds , the expression is: in, Indicates the Update threshold; S54, according to the updated threshold Mark the pixels to be processed in the preprocessed image; like , then the gray value of the pixel is set to 0; like Then mark the pixel as a pixel to be processed; S55: synthesize the multiple pixels to be processed into an image to be processed.

[0011] Furthermore, in step S6, the specific implementation steps are as follows: S61, define the image to be processed as a wide high The number of channels is The image to be processed is divided into image blocks, calculate the mapping value of each image block , the calculation formula is: in, Indicates that the embedding dimension is The flattened image block, Represents a linear projection matrix; S62, set the pixel point in the upper left corner of the image to be processed as the coordinate origin, perform position coding on all pixels, and obtain pixel coding , the expression is: in, Represents the coordinates of the pixels in the image to be processed; S63, according to pixel encoding Calculate the mapping value Position embedding value , the calculation formula is: in, Indicates the Position embedding value; S64. Embed the value at each position The embedding dimension is of Group, calculate the refined eigenvalue , the calculation formula is: in, represents the recombinant embedding value after equal division, Express Perform depth-wise separable convolution, represents the convolution kernel size, Indicates the Refined eigenvalues; S65. Based on embedding dimension Get the projection matrix 、 and , the expression is: in, represents the preset low-rank dimension, and ; S66, according to the projection matrix 、 and Calculate query values separately , key value and positioning values , the calculation formula is: in, Indicates the query values, Indicates the key values, Indicates the Positioning values.

[0012] Furthermore, in step S7, the specific implementation steps are as follows: S71, according to the query value , key value and positioning values Calculate self-attention value , the calculation formula is: in, Indicates the self-attention value; S72, multiple self-attention values Perform linear fusion to obtain fusion feature , the expression is: in, represents the linear layer matrix; S73, fusion feature quantity Perform parameter reduction to obtain the reduced value , the calculation formula is: in, Indicates the A reduction value, and Represent the offset, and Represents the embedding dimensions and low-rank dimensionality Dimension weights of S74, according to the reduction value Calculate the average eigenvalue , the calculation formula is: in, Reduction value the number of S75, according to the average eigenvalue Calculate classification reference values , the calculation formula is: in, represents the weight coefficient, represents the average eigenvalue The third offset of S76, based on multiple classification reference values Calculating classification thresholds , the calculation formula is: in, Indicates the classification thresholds; S77, according to the classification threshold Extract lesion features from the image to be processed: like , then mark the pixel as a lesion pixel; like , then the pixel is not a lesion pixel and is not marked; S78. Synthesize the lesion pixels into a lesion marking image.

[0013] By means of the above technical solution, the present invention provides a method for identifying vulvar leukoplakia lesion images, which has at least the following beneficial effects: 1. The present invention pre-processes the relevant features of the lesion images of two adjacent frames, and uses the dynamic correlation of the pixels of the previous and next frames to perform feature value fusion processing. It can not only improve the clarity of the dynamic image and make the image clearer, but also map it in combination with the color mapping curve and enhance the details of the detail layer. The output at this time is an image after dynamic compression. The picture processed by this algorithm can retain most of the original image information while preserving the edges, thereby improving the effect of image preprocessing.

[0014] 2. The present invention optimizes the image traversal interval and determines an optimal threshold through iteration. Based on the optimal threshold, the traversal interval is reduced to improve the image traversal efficiency. At the same time, the pixel search speed is optimized, the recognition of pixel points in the image and the segmentation efficiency of the image to be processed are improved, and the segmentation time is greatly shortened.

[0015] 3. The present invention can complete the classification of pixels in the image to be processed according to the query value, key value and positioning value through the three-value positioning of the image to be processed, and improve the fine-grained extraction capability with the help of convolution and attention mechanisms. At the same time, it can optimize the number of parameters of the model and improve the model operation and recognition efficiency. Moreover, it can improve the accuracy and recognition speed of lesion location recognition in the image to be processed by combining the classification threshold with the average pooling method. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 The present invention is a flowchart of a method for identifying vulvar leukoplakia lesion images. DETAILED DESCRIPTION

[0017] To make the above-mentioned objectives, features, and advantages of the present invention more clearly understood, the present invention is further described below in detail with reference to the accompanying drawings and specific embodiments. This will enable a full understanding of how this application uses technical means to solve technical problems and achieve technical effects, and to implement the invention accordingly.

[0018] Due to the technical problem that the existing technology cannot accurately identify the details in the image, this embodiment proposes a method for identifying vulvar leukoplakia lesions images, which can not only accurately identify the details of the image, but also reduce the number of model parameters and improve the recognition efficiency. Figure 1 As shown, the method includes the following steps: S1. Collection The lesion image of vulvar leukoplakia at the moment is obtained, and the lesion image is preliminarily processed to obtain a first processing value During the process of identifying vulvar leukoplakia lesions, the lens is generally in a moving state. During the moving process, the lesion image is blurred due to the movement of the lens, making it difficult to identify. In order to solve this problem, the specific implementation steps are as follows: S11, according to any pixel point in the lesion image Determine the center function of the lesion image , the expression is: in, represents the standard deviation of the center function, Indicates the A central function; S12, according to the central function Calculate the pixel brightness value used to adjust the image brightness , the calculation formula is: in, represents the input pixel brightness of the lesion image; S13, based on pixel brightness value Get the brightness image and get the random number through the random generator , calculate the scaling value of the brightness image based on the random number , the calculation formula is: in, Indicates scaling of the brightness image times, and ; S14, based on the scaling value Get the scaled image , when scaling the image Determine any pixel on As the center of the circle, Pick a reference pixel for the radius , calculate the empty weights respectively and image weight , the calculation formula is: in, Indicates a scaled image The pixels on Indicates a scaled image The reference pixel on Indicates a scaled image Pixels on and reference pixel The standard deviation of ; Standard deviation calculation is a commonly used data processing method and will not be described in detail here.

[0019] S15, according to the empty weight and image weight Calculating the responsibility factor , the calculation formula is: in, Indicates the number of pixels; S16, based on the responsibility and authority factor Calculate the first processed value , the calculation formula is: in, Indicates the The first processed value is obtained by processing the previous frame of the image. , which can provide calculation conditions for subsequent steps, and the subsequent steps after the festival can improve the clarity of the image, make the details clearer, and reduce the blur caused by the movement process.

[0020] S2. Calculation The second processed value of the lesion image at time , and the first processed value and the second processed value The fusion is performed to obtain the pre-processed image. Based on the previous step, in order to process the moving image, the next frame of image needs to be processed. The specific implementation steps are as follows: S21. Acquisition The brightness value of the lesion image at the moment , calculate the reduced value of the image , the calculation formula is: in, Indicates the A reduction value; S22, based on the reduced value Get the scaled image , when scaling the image Pixels As the center of the circle, Pick a comparison pixel for the radius , calculate the shrinkage value respectively and the reduction value , the calculation formula is: in, Indicates a scaled image The scaled-down coordinate value on Indicates a scaled image The contrast pixels on Indicates a scaled image Pixels on and contrast pixels The standard deviation of S23, according to the shrinking value and the reduction value Calculating the balance coefficient , the calculation formula is: in, Indicates a shrinking value and the reduction value the number of S24, according to the balance coefficient Calculate the second processed value , the calculation formula is: in, Indicates the Second processing value; S25, the first processing value and the second processed value Perform bilateral fusion to obtain the preprocessed values of the lesion image pixels , the calculation formula is: in, Represents the pixel value of the fused image; S26. Integrate the fused pixels into a fused image, perform color mapping and detail enhancement on the fused image to obtain a preprocessed image, preprocess the relevant features of the lesion images of two adjacent frames, and use the dynamic correlation of the pixels of the two frames to perform fusion processing of the feature values. This can not only improve the clarity of the dynamic image and make the image clearer, but also map it in combination with the color mapping curve, and enhance the details of the detail layer. The output at this time is an image after dynamic compression. The image processed by this algorithm can retain most of the original image information while preserving the edges, thereby improving the effect of image preprocessing.

[0021] S3, calculating the first region for dividing the pre-processed image into and the second region Gray mean , and obtain the first area respectively and the second region The number of pixels and After image preprocessing, since a large part of the image is non-lesion area, the image segmentation is completed by distinguishing the grayscale values of the lesion area and the non-lesion area. The specific implementation steps are as follows: S31, convert the preprocessed image into RGB space to obtain the RGB value of the preprocessed image pixel, and calculate the grayscale value of the preprocessed image based on the RGB value , the calculation formula is: in, 、 and Represent the RGB values of the original image respectively; S32, repeat step S31 to obtain the grayscale values of all pixels in the preprocessed image , the gray value Sort to get the maximum gray value and minimum grayscale value , the expression is: in, and Respectively represent the maximum grayscale value and the minimum grayscale value among multiple grayscale values; S33, according to the maximum gray value and minimum grayscale value Calculate the grayscale mean , the calculation formula is: in, Indicates the Grayscale mean; S34, through the grayscale mean Divide the preprocessed image into the first region and the second region ; like , then the pixels of the preprocessed image are divided into the first region ; like , then the pixels of the preprocessed image are divided into the second region ; S35, respectively obtain the first area by counting method and the second region The number of pixels is and ,This step can preliminarily divide the image by pre-processing the ,region segmentation of the image, which provides the prerequisite for ,the processing of subsequent steps and is conducive to speeding up the determination of the ,traversal interval.

[0022] S4. According to the first area and the second region The pixel value of the pixel point is used to calculate the segmentation threshold ; In order to obtain the traversal interval more quickly and efficiently, the specific implementation steps are as follows: S41, according to the first area and the second region The number of pixels is and Calculate the mean of the first region separately and the second region mean , the calculation formula is: in, and Represents the first area and the second region The grayscale value of the pixel; S42, according to the first region mean and the second region mean Determine the traversal range ; S43, obtaining the total number of pixels of the pre-processed image , defines the gray level in the preprocessed image The corresponding grayscale value is , the number of pixels is , calculate the first area respectively and the second region The pixel probability value and , the calculation formula is: in, Indicates the first area The pixel probability value, Indicates the second area Pixel probability value; S44, calculate the overall grayscale mean of all pixels in the preprocessed image , the calculation formula is: in, Indicates the The overall grayscale mean; S45, according to the overall grayscale mean Calculate segmentation threshold , the calculation formula is: in, Represents the deviation verification value of the pixel in the preprocessed image, Indicates the The image traversal interval is optimized, and an optimal threshold is determined iteratively. The traversal interval is reduced based on the optimal threshold, which improves the image traversal efficiency. At the same time, the pixel search speed is optimized, the recognition of pixels in the image and the segmentation efficiency of the image to be processed are improved, and the segmentation time is greatly shortened.

[0023] S5. Based on segmentation threshold Calculating update thresholds , and update the threshold according to Identify the image to be processed in the preprocessed image; obtain the segmentation threshold After that, we need to use the segmentation threshold Perform the operation. The specific implementation steps are as follows: S51, according to the segmentation threshold Calculate the interval and from Start, every Grayscale value to calculate the deviation verification value of the next grayscale value The calculation formula is: in, Indicates the A new deviation verification value; by the interval To improve the efficiency and speed of image segmentation.

[0024] S52, repeat step S46 until the traversal range Deviation verification value of all gray values within The calculation is completed and a new traversal range is obtained ; S53, verify the value based on the deviation Calculating update thresholds , the expression is: in, Indicates the Update threshold; S54, according to the updated threshold Mark the pixels to be processed in the preprocessed image; like , then the gray value of the pixel is set to 0; like Then mark the pixel as a pixel to be processed; S55. Multiple pixels to be processed are synthesized into an image to be processed. The traversal interval of the image is optimized, and an optimal threshold is determined iteratively. The traversal interval is reduced based on the optimal threshold to improve the image traversal efficiency. At the same time, the pixel search speed is optimized, the recognition of pixels in the image and the segmentation efficiency of the image to be processed are improved, and the segmentation time is greatly shortened.

[0025] S6, divide the image to be processed into image blocks and calculate the query value of the image blocks , key value and positioning values The image to be processed is a smaller image containing a lesion. In order to accurately identify the lesion in this smaller image, the specific implementation steps are as follows: S61, define the image to be processed as a wide high The number of channels is The image to be processed is divided into image blocks, calculate the mapping value of each image block , the calculation formula is: in, Indicates that the embedding dimension is The flattened image block, Represents the linear projection matrix; the linear projection matrix can be obtained by the PCA method.

[0026] S62, set the pixel point in the upper left corner of the image to be processed as the coordinate origin, perform position coding on all pixels, and obtain pixel coding , the expression is: in, Represents the coordinates of the pixels in the image to be processed; since the image is two-dimensional, the origin of the coordinates is the origin of the two-dimensional coordinates, and a two-dimensional coordinate system is established.

[0027] S63, according to pixel encoding Calculate the mapping value Position embedding value , the calculation formula is: in, Indicates the Position embedding value; embedding position information into the image can increase the processing accuracy of pixel points.

[0028] S64. Embed the value at each position The embedding dimension is of Group, calculate the refined eigenvalue , the calculation formula is: in, represents the recombinant embedding value after equal division, Express Perform depth-wise separable convolution, represents the convolution kernel size, Indicates the Refined eigenvalues; S65. Based on embedding dimension Get the projection matrix 、 and , the expression is: in, represents the preset low-rank dimension, and ; S66, according to the projection matrix 、 and Calculate query values separately , key value and positioning values , the calculation formula is: in, Indicates the query values, Indicates the key values, Indicates the Positioning values, in order to improve the accuracy of lesion recognition, the image is divided into equal parts, and then the position encoding of the pixel blocks is fused to improve the accuracy of detail recognition in subsequent steps. The pixels in the image to be processed can be classified according to the query value, key value and positioning value. The convolution and attention mechanisms are used to improve the fine-grained extraction capability. At the same time, the number of model parameters can be optimized, the model operation and recognition efficiency can be improved, and the average pooling method combined with the classification threshold can improve the accuracy of lesion position recognition in the image to be processed.

[0029] S7. According to the query value , key value and positioning values Calculating classification thresholds , and based on the classification threshold Mark the lesion image in the image to be processed; based on step S6, the query value, key value and positioning value need to be further processed. The specific implementation steps are as follows: S71, according to the query value , key value and positioning values Calculate self-attention value , the calculation formula is: in, Indicates the self-attention value; S72, multiple self-attention values Perform linear fusion to obtain fusion feature , the expression is: in, represents the linear layer matrix; S73, fusion feature quantity Perform parameter reduction to obtain the reduced value , the calculation formula is: in, Indicates the A reduction value, and Represent the offset, and Represents the embedding dimensions and low-rank dimensionality Dimension weights of S74, according to the reduction value Calculate the average eigenvalue , the calculation formula is: in, Reduction value the number of S75, according to the average eigenvalue Calculate classification reference values , the calculation formula is: in, represents the weight coefficient, represents the average eigenvalue The third offset of S76, based on multiple classification reference values Calculating classification thresholds , the calculation formula is: in, Indicates the classification thresholds; S77, according to the classification threshold Extract lesion features from the image to be processed: like , then mark the pixel as a lesion pixel; like , then the pixel is not a lesion pixel and is not marked; S78. The lesion pixels are synthesized into a lesion marking image. By positioning the three-value of the image to be processed, the pixels in the image to be processed can be classified according to the query value, key value and positioning value. The convolution and attention mechanisms are used to improve the fine-grained extraction capability. At the same time, the number of model parameters can be optimized, and the model operation and recognition efficiency can be improved. In addition, the average pooling method combined with the classification threshold can improve the accuracy and speed of lesion location recognition in the image to be processed.

[0030] S8. Transmitting the image to be processed with the lesion mark image to the display module.

[0031] Those skilled in the art will appreciate that all or part of the steps in the above-described embodiment methods can be accomplished by programming related hardware. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0032] Each embodiment in this specification is described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the same or similar parts between the embodiments. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiments.

[0033] The above embodiments provide a detailed introduction to the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

Claims

1. A method for identifying vulvar leukoplakia lesion images, characterized in that: The method comprises the following steps: S1. Collection The lesion image of vulvar leukoplakia at the moment is obtained, and the lesion image is preliminarily processed to obtain a first processing value ; S2. Calculation The second processed value of the lesion image at time , and the first processed value and the second processed value Perform fusion to obtain a preprocessed image; S3, calculating the first region for dividing the pre-processed image into and the second region Gray mean , and obtain the first area respectively and the second region The number of pixels and ; S4. According to the first area and the second region Pixel value and number of pixels and Calculate segmentation threshold ; S5. According to the segmentation threshold Calculating update thresholds , based on the update threshold Marking the pixels to be processed in the preprocessed image and obtaining the image to be processed; S6, divide the image to be processed into image blocks and calculate the query value of the image blocks , key value and positioning values ; S7. According to the query value , key value and positioning values Calculating classification thresholds , and based on the classification threshold Marking a lesion marking image in the image to be processed; S8. Transmitting the image to be processed with the lesion mark image to the display module.

2. The method for recognizing lesion images according to claim 1, wherein: In step S1, the specific implementation steps are as follows: S11, according to any pixel point in the lesion image Determine the center function of the lesion image , the expression is: in, represents the standard deviation of the center function, Indicates the A central function; S12, according to the central function Calculate the pixel brightness value used to adjust the image brightness , the calculation formula is: in, represents the input pixel brightness of the lesion image; S13, based on pixel brightness value Get the brightness image and get the random number through the random generator , calculate the scaling value of the brightness image based on the random number , the calculation formula is: in, Indicates scaling of the brightness image times, and ; S14, based on the scaling value Get the scaled image , when scaling the image Determine any pixel on As the center of the circle, Pick a reference pixel for the radius , calculate the empty weights respectively and image weight , the calculation formula is: in, Indicates a scaled image The pixels on Indicates a scaled image The reference pixel on Indicates a scaled image Pixels on and reference pixel The standard deviation of S15, according to the empty weight and image weight Calculating the responsibility factor , the calculation formula is: in, Indicates the number of pixels; S16, based on the responsibility and authority factor Calculate the first processed value , the calculation formula is: in, Indicates the The first processed value.

3. The method for recognizing lesion images according to claim 1, wherein: In step S2, the specific implementation steps are as follows: S21. Acquisition The brightness value of the lesion image at the moment , calculate the reduced value of the image , the calculation formula is: in, Indicates the A reduction value; S22, based on the reduced value Get the scaled image , when scaling the image Pixels As the center of the circle, Pick a comparison pixel for the radius , calculate the shrinkage value respectively and the reduction value , the calculation formula is: in, Indicates a scaled image The scaled-down coordinate value on Indicates a scaled image The contrast pixels on Indicates a scaled image Pixels on and contrast pixels The standard deviation of S23, according to the shrinking value and the reduction value Calculating the balance coefficient , the calculation formula is: in, Indicates a shrinking value and the reduction value the number of S24, according to the balance coefficient Calculate the second processed value , the calculation formula is: in, Indicates the Second processing value; S25, the first processing value and the second processed value Perform bilateral fusion to obtain the preprocessed values of the lesion image pixels , the calculation formula is: in, Represents the pixel value of the fused image; S26, integrating the fused pixels into a fused image, and performing color mapping and detail enhancement on the fused image to obtain a preprocessed image.

4. The method for recognizing lesion images according to claim 3, wherein: The shrinkage value and the reduction value The calculation formula is: in, Indicates a scaled image The scaled-down coordinate value on Indicates a scaled image The contrast pixels on Indicates a scaled image Pixels on and contrast pixels The standard deviation of .

5. The method for recognizing lesion images according to claim 1, wherein: In step S3, the specific implementation steps are as follows: S31, convert the preprocessed image into RGB space to obtain the RGB value of the preprocessed image pixel, and calculate the grayscale value of the preprocessed image based on the RGB value , the calculation formula is: in, 、 and Represent the RGB values of the original image respectively; S32, repeat step S31 to obtain the grayscale values of all pixels in the preprocessed image , the gray value Sort to get the maximum gray value and minimum grayscale value , the expression is: in, and Respectively represent the maximum grayscale value and the minimum grayscale value among multiple grayscale values; S33, according to the maximum gray value and minimum grayscale value Calculate the grayscale mean , the calculation formula is: in, Indicates the Grayscale mean; S34, through the grayscale mean Divide the preprocessed image into the first region and the second region ; like , then the pixels of the preprocessed image are divided into the first region ; like , then the pixels of the preprocessed image are divided into the second region ; S35, respectively obtain the first area by counting method and the second region The number of pixels is and .

6. The method for recognizing lesion images according to claim 1, wherein: In step S4, the specific implementation steps are as follows: S41, according to the first area and the second region The number of pixels is and Calculate the mean of the first region separately and the second region mean , the calculation formula is: in, and Represents the first area and the second region The grayscale value of the pixel; S42, according to the first region mean and the second region mean Determine the traversal range ; S43, obtaining the total number of pixels of the pre-processed image , defines the gray level in the preprocessed image The corresponding grayscale value is , the number of pixels is , calculate the first area respectively and the second region The pixel probability value and , the calculation formula is: in, Indicates the first area The pixel probability value, Indicates the second area Pixel probability value; S44, calculate the overall grayscale mean of all pixels in the preprocessed image , the calculation formula is: in, Indicates the The overall grayscale mean; S45, according to the overall grayscale mean Calculate segmentation threshold , the calculation formula is: in, Represents the deviation verification value of the pixel in the preprocessed image, Indicates the A segmentation threshold.

7. The method for recognizing lesion images according to claim 1, wherein: In step S5, the specific implementation steps are as follows: S51, according to the segmentation threshold Calculate the interval and from Start, every Grayscale value to calculate the deviation verification value of the next grayscale value The calculation formula is: in, Indicates the A new deviation verification value; S52, repeat step S46 until the traversal range Deviation verification value of all gray values within The calculation is completed and a new traversal range is obtained ; S53, verify the value based on the deviation Calculating update thresholds , the expression is: in, Indicates the Update threshold; S54, according to the updated threshold Mark the pixels to be processed in the preprocessed image; like , then the gray value of the pixel is set to 0; like Then mark the pixel as a pixel to be processed; S55: synthesize the multiple pixels to be processed into an image to be processed.

8. The method for recognizing lesion images according to claim 1, wherein: In step S6, the specific implementation steps are as follows: S61, define the image to be processed as a wide high The number of channels is The image to be processed is divided into image blocks, calculate the mapping value of each image block , the calculation formula is: in, Indicates that the embedding dimension is The flattened image block, represents the linear projection matrix; S62, set the pixel point in the upper left corner of the image to be processed as the coordinate origin, perform position coding on all pixels, and obtain pixel coding , the expression is: in, Represents the coordinates of the pixels in the image to be processed; S63, according to pixel encoding Calculate the mapping value Position embedding value , the calculation formula is: in, Indicates the Position embedding value; S64. Embed the value at each position The embedding dimension is of Group, calculate the refined eigenvalue , the calculation formula is: in, represents the recombinant embedding value after equal division, Express Perform depth-wise separable convolution, represents the convolution kernel size, Indicates the Refined eigenvalues; S65. Based on embedding dimension Get the projection matrix 、 and , the expression is: in, represents the preset low-rank dimension, and ; S66, according to the projection matrix 、 and Calculate query values separately , key value and positioning values , the calculation formula is: in, Indicates the query values, Indicates the key values, Indicates the Positioning values.

9. The method for recognizing lesion images according to claim 1, wherein: In step S7, the specific implementation steps are as follows: S71, according to the query value , key value and positioning values Calculate self-attention value , the calculation formula is: in, Indicates the self-attention value; S72, multiple self-attention values Perform linear fusion to obtain fusion feature , the expression is: in, represents the linear layer matrix; S73, fusion feature quantity Perform parameter reduction to obtain the reduced value , the calculation formula is: in, Indicates the A reduction value, and Represent the offset, and Represents the embedding dimensions and low-rank dimensionality Dimension weights of S74, according to the reduction value Calculate the average eigenvalue , the calculation formula is: in, Reduction value the number of S75, according to the average eigenvalue Calculate classification reference values , the calculation formula is: in, represents the weight coefficient, represents the average eigenvalue The third offset of S76, based on multiple classification reference values Calculating classification thresholds , the calculation formula is: in, Indicates the classification thresholds; S77, according to the classification threshold Extract lesion features from the image to be processed: like , then mark the pixel as a lesion pixel; like , then the pixel is not a lesion pixel and is not marked; S78. Synthesize the lesion pixels into a lesion marking image.