Cervical cancer cell image recognition method and device
Through image recognition technology based on the semantic segmentation model, the cross-entropy function and pixel-level intersection and comparison are used to identify cervical cancer cells, which solves the problem of traditional cervical cancer screening relying on professionals, improves the accuracy and efficiency of identification, and reduces the cost of error rate, enabling faster and more consistent diagnosis.
Patent Information
- Application Number
- CN202410803147.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-08-23
AI Technical Summary
Traditional cervical cancer screening relies on professionals and lacks accurate and automated auxiliary detection methods, resulting in a high false negative rate and a serious shortage of cytopathologists unable to meet global demand.
Image recognition technology based on semantic segmentation model is used to train and correct the model through cross-entropy function and pixel-level intersection and comparison to achieve accurate identification of cervical cancer cells and reduce the impact of human factors on diagnostic results.
It improves the accuracy and efficiency of cervical cancer cell identification, reduces the error rate, reduces the work pressure of doctors, shortens the diagnosis time, improves the accuracy and consistency of diagnosis, and solves the shortcomings of traditional methods that rely on professionals.
Smart Images

Figure CN118537855A
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of data recognition technology, and more specifically, to a method and device for recognizing cervical cancer cell images. Background Art
[0002] Early screening plays a vital role in the effective prevention of cervical cancer. Timely detection and intervention to prevent the progression of precancerous cervical lesions are essential. Therefore, an accurate screening platform for early cervical cancer detection is urgently needed. At present, screening methods mainly include cervical cytology, HPV testing, and DNA ploidy testing. Screening methods represented by cervical cytology screening are recommended for population screening because of their simplicity and affordability. However, the severe shortage of cytopathologists worldwide has led to a false negative rate in routine diagnosis. Therefore, there is an urgent need to develop auxiliary tools for cervical cancer screening. Summary of the invention
[0003] The purpose of the present disclosure is to provide a method and device for recognizing cervical cancer cell images, so as to solve the problem that traditional cervical cancer screening relies on professionals and lacks accurate and automated auxiliary detection methods.
[0004] A first aspect of the embodiments of the present disclosure provides a method for recognizing cervical cancer cell images, comprising: A semantic segmentation model is trained based on a first data set to determine an intermediate model, where the first data set includes a plurality of cervical cancer cell images.
[0005] The intermediate model is updated based on the first function and the first ratio to determine the first model, where the first function is a cross entropy function, and the first ratio is a pixel-level intersection-over-union ratio of predicted positives and labeled positives in the prediction results of the intermediate model.
[0006] The first model is corrected to determine the target recognition model.
[0007] The cervical cancer cell images to be identified are identified based on the target recognition model.
[0008] A second aspect of the embodiments of the present disclosure provides a cervical cancer cell image recognition device, comprising: The first computing module is used to train the semantic segmentation model based on the first data set to determine the intermediate model, and the first data set includes multiple cervical cancer cell images.
[0009] The second calculation module is used to update the intermediate model based on the first function and the first ratio to determine the first model, where the first function is a cross entropy function, and the first ratio is a pixel-level intersection-over-union ratio of predicted positives and labeled positives in the prediction results of the intermediate model.
[0010] The third calculation module is used to correct the first model and determine the target recognition model.
[0011] The image recognition module is used to recognize the cervical cancer cell image to be recognized based on the target recognition model.
[0012] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned method for recognizing cervical cancer cell images when executing the computer program.
[0013] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for identifying cervical cancer cell images are implemented.
[0014] The beneficial effect of a cervical cancer cell image recognition method and device provided by the embodiment of the present disclosure is that by using the image recognition technology based on the semantic segmentation model, cervical cancer cells and other tissues or cells in the image can be finely distinguished, thereby greatly improving the accuracy of recognition. The introduction of the first function (cross entropy function) and the first ratio (pixel-level intersection-over-union ratio of predicted positive and labeled positive) enables the model to more accurately capture the key features in the image during the training process, further improving the recognition accuracy. Updating and correcting the intermediate model can further reduce the overfitting phenomenon of the model on a specific data set and improve its performance in practical applications. When processing an image, the semantic segmentation model can directly output the category information of each pixel, thereby realizing the rapid positioning of cervical cancer cells. The target recognition model finally obtained can quickly and efficiently process a large number of cervical cancer cell images to be identified, greatly improving the recognition efficiency. Compared with traditional visual inspection, the image recognition method based on machine learning can reduce the influence of human factors on the diagnosis results and reduce the error rate. By automatically processing and analyzing image data, the accuracy and consistency of diagnosis can be greatly improved. Efficient image recognition technology can speed up diagnosis, shorten patient waiting time, and reduce doctors' workload, thereby making better use of limited medical resources and solving the problem that traditional cervical cancer screening relies on professionals and lacks accurate and automated auxiliary detection methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A schematic diagram of a flow chart of a method for recognizing cervical cancer cell images provided in one embodiment of the present disclosure; Figure 2 A schematic diagram of a flow chart of another cervical cancer cell image recognition method provided by an embodiment of the present disclosure; Figure 3 A schematic diagram of a model training process provided by an embodiment of the present disclosure; Figure 4 A schematic diagram of a model prediction process provided by an embodiment of the present disclosure; Figure 5 A schematic diagram of a splicing process provided by an embodiment of the present disclosure; Figure 6 A structural block diagram of a cervical cancer cell image recognition device provided by an embodiment of the present disclosure; Figure 7 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0018] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0019] Please refer to Figure 1 , Figure 1 This is a flow chart of a method for recognizing cervical cancer cell images provided in one embodiment of the present disclosure. The method may include S101 to S104.
[0020] S101: Training a semantic segmentation model based on a first data set to determine an intermediate model, where the first data set includes a plurality of cervical cancer cell images.
[0021] In this embodiment, before training the semantic segmentation model based on the first data set, a third data set may be obtained based on the second data set. The second data set may include digital cell images, and the third data set may include annotated digital cell images.
[0022] The third data set is expanded to obtain the first data set.
[0023] In this embodiment, obtaining the third data set based on the second data set may include obtaining a first contour based on the second data set, where the first contour is a contour of a cancer cell.
[0024] A cell mask is generated based on the first contour to obtain a third data set.
[0025] For example, Figure 2 As shown, a data annotation module can be constructed. The data annotation module can be used for manual annotation of cervical cancer cells, and the cancerous cells in the digital pathology image (i.e., the second data set) are manually annotated for model training. Data annotation may include using a curve to outline the outer contour of the cancerous cell, wherein a curve can be drawn along the boundary between the cancerous cell and the normal cell or the background with a stylus until a closed curve is formed along the outer contour of the entire cancerous cell, thereby generating a mask covering the entire cell. When the cancerous cells are distributed in clusters, that is, there are overlapping parts of more than two cancerous cells in the image, the entire outer contour of the entire cell cluster is outlined to form a mask. The images annotated with the mask constitute the third data set.
[0026] In this embodiment, expanding the third data set to obtain the first data set may include: The third data set is respectively flipped upside down, flipped left side to right side, flipped upside down, flipped left side to right side and flipped simultaneously, rotated at a first angle, rotated at a second angle, rotated at a third angle, and scaled and cut at a first resolution to obtain the first data set.
[0027] The amount of data in the first data set is eight times the amount of data in the third data set.
[0028] Exemplarily, the data expansion method may include flipping the image upside down, flipping left side to right, and flipping the image upside down, left side to right, and left side to right, respectively, to generate three times the number of images. Rotate the original image by 90, 180, and 270 degrees, respectively, to generate three times the number of images. Use the bilinear interpolation method to enlarge the resolution of the original image to 1-1.3 times the original, and intercept an image with the same resolution as the original image from the enlarged image along the center point to generate one times the original number of images. After the above data expansion operation, the number of images in the data set will increase to 8 times the original number, and the first data set is obtained.
[0029] In this embodiment, the semantic segmentation model is trained based on the first data set, and determining the intermediate model may include cutting the first data set and the second data set, and inputting the cut data into the semantic segmentation model for training to obtain the intermediate model. The semantic segmentation model is a deep learning model that can identify different areas in an image and segment them into different categories. During the training process, the model learns to extract features from the image and identify the cervical cancer cell area.
[0030] For example, Figure 3 As shown, the process includes cutting the digital pathology image into patches, selecting a portion of verification data therefrom, inputting the cut patches and verification data into the DeepLab model for training respectively, selecting the optimal model based on the verification result of the model based on the data, and storing the optimal model.
[0031] Exemplarily, by collecting multiple image samples containing cervical cancer cell images, annotating and expanding them, a rich dataset (i.e., the first dataset) containing multiple image features (such as cell morphology, texture, color, etc.) is constructed. This dataset can be used to train a semantic segmentation model so that it can learn and identify cervical cancer cell areas in the image. Since the digital pathology images (i.e., cervical cancer cell images) have a high resolution and need to be segmented, the semantic segmentation model can cut each digital pathology image and the corresponding digital pathology image after mask annotation into a Patch image with a resolution of 320*320. The cut Patch image data is input into the DeepLabv3 model for semantic segmentation training.
[0032] S102: The intermediate model is updated based on the first function and the first ratio to determine the first model, where the first function is a cross entropy function, and the first ratio is a pixel-level intersection-over-union ratio of predicted positives and labeled positives in the prediction results of the intermediate model.
[0033] In this embodiment, in machine learning and deep learning, model training usually involves the optimization of a loss function. A cross entropy function (i.e., the first function) can be used as a loss function, and the cross entropy function is usually used to measure the similarity between two probability distributions. In the context of image processing or computer vision, it can be used to compare the similarity between the model's prediction results (i.e., the probability that the model believes that a certain pixel is positive or negative) and the true annotation (i.e., the true state of the pixel), and then measure the difference between the probability distribution predicted by the model and the true distribution. The first ratio, i.e., the pixel-level intersection and union ratio (IoU) of the predicted positive and the labeled positive in the intermediate model prediction results, is introduced as a guide for model updating. This ratio can reflect the accuracy of the model in pixel-level prediction. During the training process, the model can update the weights according to the cross entropy loss and the IoU ratio, thereby gradually optimizing the model performance and making its prediction results closer to the true annotation.
[0034] Exemplarily, the loss between the model prediction result and the true label is calculated by the cross entropy function, which helps the model to continuously reduce the prediction error during the training process. The pixel-level intersection over union (IoU) is used to evaluate the accuracy of the model in predicting the contour of cervical cancer cells. The higher the IoU value, the closer the contour predicted by the model is to the true annotation. During the training process, the parameters of the intermediate model can be continuously updated iteratively to optimize the model performance by minimizing the cross entropy loss and improving the IoU value. When the model reaches the preset performance index on the validation set, we determine it as the first model for subsequent cervical cancer cell image recognition tasks. This method can significantly improve the recognition accuracy and generalization ability of the model, and provide strong support for the early diagnosis and treatment of cervical cancer.
[0035] S103: Correct the first model to determine the target recognition model.
[0036] In this embodiment, in order to determine a first model with the best performance, an iterative optimization method can be used. This method can evaluate the intermediate model based on the cross entropy function (first function) and the pixel-level intersection-over-union ratio of predicted positives to labeled positives (first ratio).
[0037] Exemplarily, the cross entropy function can be used to calculate the difference between the probability distribution predicted by the model and the true label. The smaller the difference, the more accurate the model prediction. The pixel-level intersection over union (IoU) can measure the degree of overlap between the cervical cancer cell contour predicted by the model and the true labeled contour. The higher the IoU value, the more accurate the model's prediction of the cell contour. During the training process, the intermediate model can continuously adjust and optimize parameters based on these two indicators until the preset performance requirements or the upper limit of the number of iterations are met. Through this iterative optimization method, we can select the model with the best performance from multiple intermediate models as the first model.
[0038] S104: Identify the cervical cancer cell image to be identified based on the target recognition model.
[0039] In this embodiment, the target recognition model can learn and extract feature information in the image by training a large amount of labeled cervical cancer cell image data, and then predict and classify the new image to be recognized. When the cervical cancer cell image to be recognized is input into the target recognition model, the target recognition model can extract features from it and compare and match these features with the features learned during the training process. The target recognition model can output a prediction result, including whether there are cervical cancer cells in the image and information such as the location and outline of the cells.
[0040] For example, the image to be identified can be input into a trained target recognition model, and the model will automatically extract and compare features of the image and output a prediction result. Based on the prediction results of the model, doctors can quickly determine whether there are cervical cancer cells in the image and determine the location and outline of the cells. This not only greatly improves the efficiency and accuracy of screening, but also reduces the workload of doctors, making the early detection and treatment of cervical cancer more timely and effective.
[0041] For example, Figure 2 As shown, multiple modules can be constructed, including data annotation, model training, model deployment prediction, prediction data correction, model fine-tuning and model update. The data obtained by the data annotation module can be input into the model training module for model training, the optimal model obtained by the model training module can be input into the model deployment prediction module for model prediction deployment, the test data can be input into the deployed model to obtain the prediction data, the predicted prediction data can be input into the data correction module for manual correction of the data, the corrected data can be input into the model fine-tuning module to fine-tune the current model, the fine-tuned model can be input into the model update module to update the current model, and the updated model can be input into the model deployment prediction module for deployment.
[0042] It can be concluded from the above that this embodiment can finely distinguish cervical cancer cells and other tissues or cells in the image by using the image recognition technology based on the semantic segmentation model, thereby greatly improving the accuracy of recognition. The introduction of the first function (cross entropy function) and the first ratio (pixel-level intersection-over-union ratio of predicted positive and labeled positive) enables the model to more accurately capture the key features in the image during the training process, further improving the recognition accuracy. Updating and correcting the intermediate model can further reduce the overfitting phenomenon of the model on a specific data set and improve its performance in practical applications. When processing images, the semantic segmentation model can directly output the category information of each pixel, thereby realizing the rapid positioning of cervical cancer cells. The target recognition model finally obtained can quickly and efficiently process a large number of cervical cancer cell images to be identified, greatly improving the recognition efficiency. Compared with traditional visual inspection, the image recognition method based on machine learning can reduce the influence of human factors on the diagnosis results and reduce the error rate. By automatically processing and analyzing image data, the accuracy and consistency of diagnosis can be greatly improved. Efficient image recognition technology can speed up diagnosis, shorten patient waiting time, and reduce doctors' workload, thereby making better use of limited medical resources and solving the problem that traditional cervical cancer screening relies on professionals and lacks accurate and automated auxiliary detection methods.
[0043] In one embodiment of the present disclosure, updating the intermediate model based on the first function and the first ratio to determine the first model includes: The intermediate model is updated based on the first function to obtain multiple intermediate models.
[0044] A first model is determined based on the first ratio and the plurality of intermediate models, the first model being an optimal model among the plurality of intermediate models.
[0045] In this embodiment, updating the intermediate model based on the first function to obtain multiple intermediate models may include using the first function (such as the cross entropy function) to evaluate the performance of the intermediate model. The cross entropy function is a common method for measuring the difference between the model prediction result and the true annotation. Through the back propagation algorithm, the parameters of the model are adjusted according to the calculation result of the cross entropy function to optimize the performance of the model on the training set. This process is repeated multiple times, and a new intermediate model is obtained each time.
[0046] In this embodiment, determining the first model based on the first ratio and multiple intermediate models may include, after obtaining multiple intermediate models, using the first ratio (i.e., the pixel-level intersection-over-union ratio of predicted positive and labeled positive, referred to as IoU) to evaluate the performance of these intermediate models in identifying cervical cancer cells. IoU is a commonly used evaluation indicator used to measure the degree of overlap between the model prediction results and the actual annotations. By calculating the IoU value of each intermediate model on the validation set, the model with the highest IoU value is selected as the first model, i.e., the optimal model.
[0047] For example, an initial semantic segmentation model can be trained using a large number of annotated cervical cancer cell images as an intermediate model. The intermediate model is iteratively updated multiple times using the cross entropy function, and a new intermediate model is obtained after each update. In this process, they used an independent validation set to evaluate the performance of each intermediate model. The IoU value of each intermediate model on the validation set was calculated, and the model with the highest IoU value was selected as the first model. This first model showed the best performance in identifying cervical cancer cells.
[0048] This embodiment can continuously optimize the parameters of the model and improve the performance of the model in identifying cervical cancer cells by updating the intermediate model multiple times based on the first function. This iterative optimization method helps the model to better fit the training data and improve the accuracy and reliability of recognition. Using the first ratio (such as IoU) as an evaluation indicator, the best model can be selected from multiple intermediate models as the first model. This model selection method based on performance evaluation can ensure that the final model shows the best performance on the validation set, so that it has better generalization ability and robustness in practical applications.
[0049] In one embodiment of the present disclosure, the intermediate model is updated based on the first function to obtain multiple intermediate models, including: A first prediction loss of the intermediate model is calculated based on the first function.
[0050] The parameters of the intermediate model are adjusted based on the first prediction loss.
[0051] Calculate the intermediate prediction loss of the adjusted intermediate model and repeat the previous step to obtain multiple intermediate models. Each intermediate model corresponds to an intermediate prediction loss.
[0052] Stop updating the intermediate model until the currently calculated intermediate prediction loss is equal to the intermediate prediction loss of the previous intermediate model.
[0053] The first function is:
[0054] Among them, loss represents the first prediction loss, y represents the true label, positive is 1, negative is 0, and p represents the probability of positive cancer cells in the model prediction results.
[0055] In this embodiment, the first function may include a loss function.
[0056] Exemplarily, during the training process, the cervical cancer cell image will output the positive probability value p of each pixel in the image through the DeepLabv3 model. Substituting p and the true label y of the pixel into the formula of the first function above, the loss value of the current predicted pixel can be obtained. The average loss value of all pixel points obtained in an image is the total loss value. During the training process, the loss value can be used to dynamically adjust the parameters in the intermediate model, so that the loss value predicted by the adjusted model for the next batch of cervical cancer cell images is reduced, and the parameters in the intermediate model are further adjusted according to the current loss value. This cycle is repeated until the loss value is no longer reduced, and the training and updating of the intermediate model can be stopped. Multiple intermediate models can be obtained in this process. During the training process, the amplitude of parameter adjustment in the intermediate model can also be controlled by the learning rate. In this embodiment, the learning rate used for training is 0.001, and the optimizer used is the adam optimizer. During the training process, the learning rate decays by 10% after each epoch (all cervical cancer cell image samples used for training are trained once as one epoch). After each epoch in the training, the intermediate model will be stored for testing.
[0057] This embodiment continuously calculates and adjusts the intermediate prediction loss until it stops updating when it is equal to the prediction loss of the previous model. This can effectively prevent the model from overfitting while ensuring the generalization ability of the model, providing more reliable and accurate results for cervical cancer cell image recognition.
[0058] In one embodiment of the present disclosure, determining a first model based on a first scale and a plurality of intermediate models includes: A plurality of intermediate models are tested based on the validation data set to obtain a first ratio.
[0059] The middle model with the largest first scale is taken as the first model.
[0060] The first ratio calculation formula is:
[0061] Among them, IoU represents the first ratio, TP represents the number of true positive pixels, FP represents the number of false positive pixels, and FN represents the number of false negative pixels.
[0062] In this embodiment, IoU is an indicator used to evaluate the performance of the model in the image segmentation task. It calculates the ratio of the intersection and union between the predicted result and the true annotation. The higher the IoU value, the closer the model's predicted result is to the true annotation, and the better the performance.
[0063] Exemplarily, multiple intermediate models are tested using a validation dataset. The validation dataset is independent of the training dataset and is used to evaluate the performance of the model on unseen data. During the test, the model can predict each pixel in the validation dataset and generate a prediction result. Based on the prediction result and the true annotation, the IoU value of each intermediate model is calculated. The intermediate model with the largest IoU value is selected as the first model, i.e., the optimal model.
[0064] This embodiment can objectively and accurately evaluate the model performance by quantifying the evaluation index IoU, so as to select the model with the best performance for practical application. This method helps to improve the accuracy and reliability of cervical cancer cell image recognition and provide strong support for medical diagnosis.
[0065] In one embodiment of the present disclosure, correcting the first model to determine the target recognition model includes: The first model is tested based on the first test set to obtain a cell prediction result, wherein the cell prediction result includes a predicted contour of cervical cancer cells, and the first test set includes a plurality of cervical cancer cell images.
[0066] Corrected data to determine predicted contours of cervical cancer cells.
[0067] The parameters of the first model are modified based on the correction data to determine the target recognition model.
[0068] Exemplarily, a prediction data correction model can be constructed, which can manually correct cells that are incorrectly segmented by the model. The predicted contours of cancer cells can be included in the model prediction results. A manual review method is used to review whether the predicted contours are correct, and incorrectly predicted contours are manually corrected, and the corrected data is added to the training set for the next step of model fine-tuning.
[0069] For example, a model fine-tuning module can be constructed, which can use the corrected data to fine-tune the model. The corrected data is input into the optimal model (i.e., the first model) obtained by the previous training to perform parameter fine-tuning training, the model is loaded into the memory, and the corrected data is input into the model to perform model parameter training adjustment. The learning rate used should be The number of training rounds should not be too many, and should be within 30 epochs. The performance of the model after fine-tuning will be further improved. The performance improvement is mainly reflected in the improvement of the model's accuracy in identifying cervical cancer cells. The model is determined to be a target recognition model.
[0070] This embodiment can improve the prediction ability of the model in specific scenarios and improve the accuracy of cervical cancer cell contour prediction by determining and applying correction data to modify the model parameters.
[0071] In one embodiment of the present disclosure, testing the first model based on the first test set to obtain a cell prediction result includes: Perform image segmentation on the first test set, and record the coordinates of the image after segmentation corresponding to the image before segmentation. The first resolution of the image before segmentation is greater than the second resolution of the image after segmentation.
[0072] The cut image is predicted based on the first model to obtain a heat map.
[0073] The heat maps are spliced based on the coordinates to obtain a heat map of the first resolution, and the heat map of the first resolution is used as the cell prediction result.
[0074] In this embodiment, the first model can predict the predicted positive probability of each pixel in each cervical cancer cell image, and then form a heat map for display. At the same time, the contour of the predicted heat map can be extracted.
[0075] For example, Figure 4As shown, the digital pathology image (i.e., cervical cancer cell image) can be cut into Patch images with a resolution of 2000*2000, and the coordinate position of each Patch image corresponding to the original image is recorded. After these images are predicted by the first model selected above, a series of image heat maps with a resolution of 2000*2000 can be obtained. According to the coordinate position of each Patch image recorded in the original image, the predicted results can be spliced into the original resolution to obtain the corresponding predicted heat map of the original cervical cancer cell image, and the outline of the predicted heat map is extracted for display.
[0076] Specific splicing methods such as Figure 5 As shown, during the prediction process, the coordinate position of the patch image in the original image (i.e., the row and column where it is located when cutting) can be recorded. The coordinate position is as follows Figure 5 As shown in the subscript of the Patch in , according to the position coordinates of each Patch, it is spliced together with the upper, lower, left and right Patches. After all the Patch images cut from the original image are spliced together, a spliced image with a resolution of 2000m*2000k can be obtained, which has the same resolution as the original cervical cancer cell image.
[0077] This embodiment reduces the amount of calculation for model processing by image cutting while ensuring prediction accuracy. Secondly, the coordinate splicing technology is used to restore the resolution of the original image, making the prediction result more comprehensive. This embodiment generates a heat map by predicting the positive probability, which not only intuitively displays the predicted probability of each pixel, but also facilitates the extraction of cell contours, providing a more accurate basis for clinical diagnosis and treatment.
[0078] Corresponding to a cervical cancer cell image recognition method in the above embodiment, Figure 6 This is a structural block diagram of a cervical cancer cell image recognition device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 6 , the cervical cancer cell image recognition device 20 comprises: The first computing module 21 is used to train the semantic segmentation model based on the first data set to determine the intermediate model, and the first data set includes a plurality of cervical cancer cell images.
[0079] The second calculation module 22 is used to update the intermediate model based on the first function and the first ratio to determine the first model, where the first function is a cross entropy function, and the first ratio is a pixel-level intersection-over-union ratio of predicted positives and labeled positives in the prediction results of the intermediate model.
[0080] The third calculation module 23 is used to correct the first model and determine the target recognition model.
[0081] The image recognition module 24 is used to recognize the cervical cancer cell image to be recognized based on the target recognition model.
[0082] In one embodiment of the present disclosure, the second calculation module 22 includes: The first calculation unit is used to update the intermediate model based on the first function to obtain multiple intermediate models.
[0083] The second calculation unit is used to determine a first model based on the first ratio and multiple intermediate models, where the first model is an optimal model among the multiple intermediate models.
[0084] In one embodiment of the present disclosure, the first calculation unit is specifically configured to calculate a first prediction loss of the intermediate model based on a first function.
[0085] The parameters of the intermediate model are adjusted based on the first prediction loss.
[0086] Calculate the intermediate prediction loss of the adjusted intermediate model and repeat the previous step to obtain multiple intermediate models. Each intermediate model corresponds to an intermediate prediction loss.
[0087] Stop updating the intermediate model until the currently calculated intermediate prediction loss is equal to the intermediate prediction loss of the previous intermediate model.
[0088] The first function is:
[0089] Among them, loss represents the first prediction loss, y represents the true label, positive is 1, negative is 0, and p represents the probability of positive cancer cells in the model prediction results.
[0090] In one embodiment of the present disclosure, the second computing unit is specifically configured to test a plurality of intermediate models based on a validation data set to obtain a first ratio.
[0091] The middle model with the largest first scale is taken as the first model.
[0092] The first ratio calculation formula is:
[0093] Among them, IoU represents the first ratio, TP represents the number of true positive pixels, FP represents the number of false positive pixels, and FN represents the number of false negative pixels.
[0094] In one embodiment of the present disclosure, the third calculation module 23 includes: The third computing unit is used to test the first model based on the first test set to obtain a cell prediction result. The cell prediction result includes a predicted outline of cervical cancer cells, and the first test set includes a plurality of cervical cancer cell images.
[0095] Corrected data to determine predicted contours of cervical cancer cells.
[0096] The parameters of the first model are modified based on the correction data to determine the target recognition model.
[0097] In one embodiment of the present disclosure, the third computing unit is specifically used to perform image segmentation on the first test set and record the coordinates of the segmented image corresponding to the pre-segmented image. The first resolution of the pre-segmented image is greater than the second resolution of the segmented image.
[0098] The cut image is predicted based on the first model to obtain a heat map.
[0099] The heat maps are spliced based on the coordinates to obtain a heat map of the first resolution, and the heat map of the first resolution is used as the cell prediction result.
[0100] In an embodiment of the present disclosure, the first computing module 21 is specifically used to segment the first data set and the second data set, input the segmented data into the semantic segmentation model for training, and determine the intermediate model. The second data set includes original cervical cancer cell images.
[0101] See also Figure 7 , Figure 7 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 7 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, such as Figure 6 The functions of modules 21 to 24 are shown.
[0102] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0103] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
[0104] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0105] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of a cervical cancer cell image recognition method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.
[0106] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0107] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0108] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0110] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.
[0111] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.
[0112] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0113] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for recognizing cervical cancer cell images, characterized in that: include: Training a semantic segmentation model based on a first data set to determine an intermediate model, wherein the first data set includes a plurality of cervical cancer cell images; The intermediate model is updated based on a first function and a first ratio to determine a first model, wherein the first function is a cross entropy function, and the first ratio is a pixel-level intersection-over-union ratio of predicted positives and labeled positives in the prediction result of the intermediate model; Correcting the first model to determine a target recognition model; The cervical cancer cell image to be identified is identified based on the target recognition model.
2. A cervical cancer cell image recognition method as claimed in claim 1, characterized in that: The updating of the intermediate model based on the first function and the first ratio to determine the first model includes: Updating the intermediate model based on the first function to obtain multiple intermediate models; A first model is determined based on the first ratio and the plurality of intermediate models, the first model being an optimal model among the plurality of intermediate models.
3. A method for recognizing cervical cancer cell images as claimed in claim 2, characterized in that: The updating of the intermediate model based on the first function to obtain multiple intermediate models includes: Calculating a first prediction loss of the intermediate model based on a first function; adjusting parameters of the intermediate model based on the first prediction loss; Calculate the intermediate prediction loss of the adjusted intermediate model, and repeat the previous step to obtain the multiple intermediate models; each intermediate model corresponds to an intermediate prediction loss; Until the currently calculated intermediate prediction loss is equal to the intermediate prediction loss of the previous intermediate model, stop updating the intermediate model; The first function is: Among them, loss represents the first prediction loss, y represents the true label, positive is 1, negative is 0, and p represents the probability of positive cancer cells in the model prediction results.
4. A method for recognizing cervical cancer cell images as claimed in claim 2, characterized in that: The determining the first model based on the first ratio and the plurality of intermediate models comprises: Testing the multiple intermediate models based on a validation data set to obtain the first ratio; taking the intermediate model with the largest first ratio as the first model; The first ratio calculation formula is: Among them, IoU represents the first ratio, TP represents the number of true positive pixels, FP represents the number of false positive pixels, and FN represents the number of false negative pixels.
5. The method for recognizing cervical cancer cell images according to claim 1, characterized in that: The correcting the first model to determine the target recognition model includes: The first model is tested based on a first test set to obtain a cell prediction result; the cell prediction result includes a predicted outline of cervical cancer cells, and the first test set includes a plurality of cervical cancer cell images; Determining corrected data of the predicted contour of the cervical cancer cells; The parameters of the first model are modified based on the correction data to determine the target recognition model.
6. A method for recognizing cervical cancer cell images as claimed in claim 5, characterized in that: The step of testing the first model based on the first test set to obtain a cell prediction result includes: Performing image segmentation on the first test set, and recording coordinates of the image after segmentation corresponding to the image before segmentation; the first resolution of the image before segmentation is greater than the second resolution of the image after segmentation; Predicting the cut image based on the first model to obtain a heat map; The heat maps are spliced based on the coordinates to obtain a heat map with a first resolution, and the heat map with the first resolution is used as the cell prediction result.
7. The method for recognizing cervical cancer cell images according to claim 1, characterized in that: The step of training the semantic segmentation model based on the first data set to determine the intermediate model includes: The first data set and the second data set are segmented, and the segmented data are input into the semantic segmentation model for training to determine the intermediate model; the second data set includes original cervical cancer cell images.
8. A cervical cancer cell image recognition device, characterized in that: include: A first computing module, configured to train a semantic segmentation model based on a first data set to determine an intermediate model, wherein the first data set includes a plurality of cervical cancer cell images; A second calculation module is used to update the intermediate model based on a first function and a first ratio to determine the first model, wherein the first function is a cross entropy function, and the first ratio is a pixel-level intersection-over-union ratio of predicted positives and labeled positives in the prediction results of the intermediate model; A third calculation module, used to correct the first model and determine a target recognition model; The image recognition module is used to recognize the cervical cancer cell image to be recognized based on the target recognition model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Medical image classification method, device and equipment, computer equipment and storage medium
CN111310841A
Method and device for acquiring training sample data set of image segmentation model
CN112949648A
Hair information recognition method and device, equipment and storage medium
CN113255561A
Image recognition model training and image recognition method and device
CN113688887A
Image segmentation method, device, equipment, program product and medium
CN115965785A
