YOLOv8-based cancer cell detection method for papillary thyroid carcinoma

Through the YOLOv8 target detection model and multimodal data fusion technology, the problems of subjective differences, low efficiency and data scarcity in thyroid cancer cell detection were solved, and efficient and accurate cancer cell detection was achieved, especially the early detection of tiny cancer lesions.

CN120612285APending Publication Date: 2025-09-09安徽影联云享医疗科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510606868.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Existing technologies in thyroid cancer cell detection have problems such as subjective differences, low efficiency, insufficient positioning-classification coupling, loss of multi-scale features, and data bottlenecks, resulting in low detection accuracy and efficiency, especially difficulty in early detection of tiny cancer lesions.

Method used

The YOLOv8 target detection model is used to achieve efficient and accurate detection of cancer cells through medical image preprocessing, multimodal data fusion and training dataset construction, combined with the cross entropy loss function and IOU loss function to optimize the model.

Benefits of technology

It improves the accuracy and efficiency of detecting papillary thyroid cancer cells, enhances the sensitivity to tiny cancer lesions, reduces the misdiagnosis rate, and improves the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612285A_ABST
    Figure CN120612285A_ABST
Patent Text Reader

Abstract

The invention relates to deep learning, in particular to a cancer cell detection method for papillary thyroid carcinoma based on YOLOv8, and the method comprises the steps: collecting a related medical image, and carrying out the preprocessing of the medical image; cancer cell labeling is carried out on the preprocessed medical images, and multi-modal data fusion is carried out on various labeled medical images; constructing a training data set according to the fused data; performing model training on the YOLOv8 target detection model by using the training data set to obtain a trained YOLOv8 target detection model; acquiring a real-time medical image, inputting the real-time medical image into the trained YOLOv8 target detection model, and outputting a cancer cell detection result; according to the technical scheme provided by the invention, the defects that cancer cells of papillary thyroid carcinoma are difficult to accurately and efficiently detect and the sensitivity to minimal cancer focus is relatively low in the prior art can be effectively overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to deep learning, and in particular to a method for detecting cancer cells of papillary thyroid carcinoma based on YOLOv8. Background Art

[0002] Thyroid cancer has become a malignant solid tumor with an annual global growth rate of 7.5% in the past decade. The gold standard for its pathological diagnosis relies on histopathological evaluation. According to the 2022 WHO thyroid tumor classification system, pathologists need to systematically observe the following key morphological features through fine needle aspiration biopsy (FNAB) or microscopic analysis of postoperative specimens: Papillary carcinoma (PTC) typically presents with ground-glass nuclei, nuclear grooves, and intranuclear pseudoinclusions, with approximately 35% of cases accompanied by psammoma calcifications; eosinophilic glial protein deposits are easily formed in areas of colloid accumulation, and their refractive index overlaps with that of malignant cell nuclei; bleeding artifacts and tissue squeezing effects generated during puncture may mask micro-invasion lesions; benign follicles and malignant cells are often densely distributed in a "mosaic-like" pattern (>2000 cells / mm 2 ), particularly in follicular variant carcinoma (FVPTC), where benign follicles are distinguished from malignant cells only by nuclear membrane irregularities.

[0003] With the rapid development of computer technology and big data, deep learning has achieved remarkable results in various fields. Researchers have continuously increased the number of model parameters to improve model performance, resulting in the emergence of methods that use deep learning to automatically detect thyroid cancer cells in medical images.

[0004] Currently, thyroid cancer cell detection is mostly based on semantic segmentation using an improved U-Net architecture. However, this method has the following main drawbacks:

[0005] 1) Subjective differences: Key features such as nuclear atypia (e.g., nuclear grooves, nuclear overlap) and cytoplasmic ratios are easily influenced by observer experience, leading to a high misdiagnosis rate, especially in the differentiation of follicular carcinoma from benign lesions.

[0006] 2) Efficiency limitations: High-resolution WSI contains hundreds of millions of pixels, making manual screening time-consuming and difficult to achieve early detection of tiny cancer lesions (<1 cm);

[0007] 3) Insufficient localization-classification coupling: Although the segmentation model can extract cell regions, it is difficult to simultaneously output the classification confidence of the malignancy level;

[0008] 4) Multi-scale feature loss: Traditional convolutional neural networks do not adequately fuse features at 10×40× multi-level magnifications, resulting in missed detection of small cancer cells;

[0009] 5) Data bottleneck: Samples of thyroid cancer subtypes (such as anaplastic carcinoma) are scarce, and the generalization ability of existing methods is significantly reduced under conditions of few samples. Summary of the Invention

[0010] (1) Technical problems solved

[0011] In response to the above-mentioned shortcomings of the existing technology, the present invention provides a method for detecting papillary thyroid carcinoma cancer cells based on YOLOv8, which can effectively overcome the defects of the existing technology in accurately and efficiently detecting papillary thyroid carcinoma cancer cells and having low sensitivity to tiny cancer foci.

[0012] (2) Technical solution

[0013] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0014] The method for detecting cancer cells of papillary thyroid carcinoma based on YOLOv8 includes the following steps:

[0015] S1. Collect relevant medical images and pre-process them;

[0016] S2. Label cancer cells in pre-processed medical images and perform multimodal data fusion on various labeled medical images;

[0017] S3, construct a training data set based on the fused data;

[0018] S4. Use the training data set to train the YOLOv8 target detection model to obtain a trained YOLOv8 target detection model;

[0019] S5. Obtain real-time medical images, input the real-time medical images into the trained YOLOv8 target detection model, and output the cancer cell detection results.

[0020] Preferably, S1 collects relevant medical images and pre-processes the medical images, including:

[0021] Relevant medical images including external morphology images and internal tissue detection imaging images of papillary thyroid carcinoma are collected and preprocessed.

[0022] Preferably, the preprocessing of the medical image includes:

[0023] Mosaic data enhancement is performed on medical images to improve the robustness of small object detection through random cropping, scaling, and splicing;

[0024] Mapping the pixel values ​​of medical images to the [-1,1] interval through adaptive grayscale range normalization;

[0025] Enhance data diversity using geometric transformation and color space transformation;

[0026] Among them, geometric transformation includes random flipping and rotation, and color space transformation includes HSV adjustment.

[0027] Preferably, in S2, cancer cells are annotated on the pre-processed medical images, and multimodal data fusion is performed on the annotated medical images, including:

[0028] Use the Labelme annotation tool to annotate cancer cells in preprocessed medical images, that is, to classify and locate cancer cells and obtain text labels;

[0029] The two types of medical images, including the external morphology image of papillary thyroid carcinoma and the internal tissue detection imaging image, are superimposed and fused.

[0030] Preferably, in S4, the YOLOv8 target detection model is trained using the training data set to obtain a trained YOLOv8 target detection model, including:

[0031] S41, dividing the training data set into a training set, a validation set, and a test set according to a preset ratio;

[0032] S42. Set the loss function and optimizer of the YOLOv8 target detection model;

[0033] S43, input the training set into the YOLOv8 target detection model for model training;

[0034] S44, calculating a loss value based on the loss function, and the optimizer updating the model parameters according to the loss value and the network gradient information;

[0035] S45. If the loss value is less than the preset threshold, the model training ends, and the current YOLOv8 target detection model is the trained YOLOv8 target detection model. Otherwise, return to S43 and continue to use the training set for model training;

[0036] S46. Input the validation set into the trained YOLOv8 object detection model, evaluate the generalization ability of the model by observing the performance on the validation set, and tune the model's hyperparameters and structure;

[0037] S47. Input the test set into the tuned YOLOv8 target detection model to evaluate the model performance.

[0038] Preferably, setting the loss function and optimizer of the YOLOv8 target detection model in S42 includes:

[0039] For the cancer cell classification task, the cross entropy loss function BCEWithLogitsLoss with Sigmoid function is used as the loss function:

[0040]

[0041] Among them, y i is the classification label value of the i-th medical image, y i ∈{0,1},p i is the predicted probability value of the i-th medical image, N is the number of medical images, σ(x) is the Sigmoid function,

[0042] For the cancer cell localization task, the IoU loss function in the rectangular box regression loss is used as the loss function:

[0043]

[0044] Among them, A and B are the areas of the predicted box and the real box respectively.

[0045] Preferably, in S43, the training set is input into the YOLOv8 target detection model for model training, including:

[0046] The training set is input into the YOLOv8 target detection model, which obtains image features and encodes them.

[0047] Among them, the image feature encoding includes rectangular frame coordinates, category probability and overall confidence.

[0048] Preferably, in S5, real-time medical images are acquired, the real-time medical images are input into a trained YOLOv8 target detection model, and cancer cell detection results are output, including:

[0049] Obtain real-time medical images and input them into the trained YOLOv8 object detection model to obtain the corresponding rectangular box coordinates, category probability, and overall confidence.

[0050] The coordinates of the rectangular box, category probability, and overall confidence are saved in txt format, and a visual rectangular box is drawn on the real-time medical image to output the cancer cell detection results of the real-time medical image.

[0051] (3) Beneficial effects

[0052] Compared with the existing technology, the YOLOv8-based thyroid papillary carcinoma cancer cell detection method provided by the present invention is based on the YOLOv8 target detection model, and simultaneously inputs the external morphology image and internal tissue detection imaging image of thyroid papillary carcinoma. It enhances the image features required by the model through multimodal data fusion, incorporates more detailed information for learning, and can effectively improve the target detection effect and efficiency of cancer cells. At the same time, the fusion process takes into account details, making the model more sensitive to tiny cancer foci in the input medical images. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.

[0054] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0055] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0056] Cancer cell detection method for papillary thyroid carcinoma based on YOLOv8, such as Figure 1 As shown, S1, collect relevant medical images and pre-process the medical images, specifically including:

[0057] Relevant medical images including external morphology images and internal tissue detection imaging images of papillary thyroid carcinoma are collected and preprocessed.

[0058] Specifically, preprocessing of medical images includes:

[0059] Mosaic data enhancement is performed on medical images to improve the robustness of small object detection through random cropping, scaling, and splicing;

[0060] Mapping the pixel values ​​of medical images to the [-1,1] interval through adaptive grayscale range normalization;

[0061] Enhance data diversity using geometric transformation and color space transformation;

[0062] Among them, geometric transformation includes random flipping and rotation, and color space transformation includes HSV adjustment.

[0063] S2: Label cancer cells in pre-processed medical images and perform multimodal data fusion on various labeled medical images, including:

[0064] Use the Labelme annotation tool to annotate cancer cells in preprocessed medical images, that is, classify and locate cancer cells and obtain text labels (voc format);

[0065] The two types of medical images, including the external morphology image of papillary thyroid carcinoma and the internal tissue detection imaging image, are superimposed and fused.

[0066] S3. Construct a training dataset based on the fused data.

[0067] S4. Use the training data set to train the YOLOv8 target detection model to obtain a trained YOLOv8 target detection model, specifically including:

[0068] S41, dividing the training data set into a training set, a validation set, and a test set according to a preset ratio (7:2:1);

[0069] S42. Set the loss function and optimizer of the YOLOv8 target detection model;

[0070] S43, input the training set into the YOLOv8 target detection model for model training;

[0071] S44, calculating a loss value based on the loss function, and the optimizer updating the model parameters according to the loss value and the network gradient information;

[0072] S45. If the loss value is less than the preset threshold, the model training ends, and the current YOLOv8 target detection model is the trained YOLOv8 target detection model. Otherwise, return to S43 and continue to use the training set for model training;

[0073] S46. Input the validation set into the trained YOLOv8 object detection model, evaluate the generalization ability of the model by observing the performance on the validation set, and tune the model's hyperparameters and structure;

[0074] S47. Input the test set into the tuned YOLOv8 target detection model to evaluate the model performance.

[0075] Specifically, S42 sets the loss function and optimizer of the YOLOv8 target detection model, including:

[0076] For the cancer cell classification task, the cross entropy loss function BCEWithLogitsLoss with Sigmoid function is used as the loss function:

[0077]

[0078] Among them, yi is the classification label value of the i-th medical image, y i ∈{0,1}, pi is the predicted probability value of the i-th medical image, N is the number of medical images, σ(x) is the Sigmoid function,

[0079]

[0080] For the cancer cell localization task, the IoU loss function in the rectangular box regression loss is used as the loss function:

[0081]

[0082] Among them, A and B are the areas of the predicted box and the real box respectively.

[0083] Specifically, in S43, the training set is input into the YOLOv8 target detection model for model training, including:

[0084] The training set is input into the YOLOv8 target detection model, which obtains image features and encodes them.

[0085] Among them, the image feature encoding includes rectangular frame coordinates, category probability and overall confidence.

[0086] S5. Obtain real-time medical images, input them into the trained YOLOv8 target detection model, and output cancer cell detection results, including:

[0087] Obtain real-time medical images and input them into the trained YOLOv8 object detection model to obtain the corresponding rectangular box coordinates, category probability, and overall confidence.

[0088] The coordinates of the rectangular box, category probability, and overall confidence are saved in txt format, and a visual rectangular box is drawn on the real-time medical image to output the cancer cell detection results of the real-time medical image.

[0089] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for detecting papillary thyroid cancer cells based on YOLOv8, characterized by: The following steps are involved: S1. Collect relevant medical images and pre-process them; S2. Label cancer cells in pre-processed medical images and perform multimodal data fusion on various labeled medical images; S3, construct a training data set based on the fused data; S4. Use the training data set to train the YOLOv8 target detection model to obtain a trained YOLOv8 target detection model; S5. Obtain real-time medical images, input the real-time medical images into the trained YOLOv8 target detection model, and output the cancer cell detection results.

2. The method for detecting papillary thyroid carcinoma cancer cells based on YOLOv8 according to claim 1, wherein: S1 collects relevant medical images and pre-processes them, including: Relevant medical images including external morphology images and internal tissue detection imaging images of papillary thyroid carcinoma are collected and preprocessed.

3. The method for detecting papillary thyroid carcinoma cancer cells based on YOLOv8 according to claim 2, wherein: The preprocessing of medical images includes: Mosaic data enhancement is performed on medical images to improve the robustness of small object detection through random cropping, scaling, and splicing; Mapping the pixel values ​​of medical images to the [-1,1] interval through adaptive grayscale range normalization; Enhance data diversity using geometric transformation and color space transformation; Among them, geometric transformation includes random flipping and rotation, and color space transformation includes HSV adjustment.

4. The method for detecting papillary thyroid carcinoma cancer cells based on YOLOv8 according to claim 2, wherein: S2 labels cancer cells in pre-processed medical images and performs multimodal data fusion on various labeled medical images, including: Use the Labelme annotation tool to annotate cancer cells in preprocessed medical images, that is, to classify and locate cancer cells and obtain text labels; The two types of medical images, including the external morphology image of papillary thyroid carcinoma and the internal tissue detection imaging image, are superimposed and fused.

5. The method for detecting papillary thyroid carcinoma cancer cells based on YOLOv8 according to claim 1, wherein: In S4, the YOLOv8 target detection model is trained using the training dataset to obtain a trained YOLOv8 target detection model, including: S41, dividing the training data set into a training set, a validation set, and a test set according to a preset ratio; S42. Set the loss function and optimizer of the YOLOv8 target detection model; S43, input the training set into the YOLOv8 target detection model for model training; S44, calculating a loss value based on the loss function, and the optimizer updating the model parameters according to the loss value and the network gradient information; S45. If the loss value is less than the preset threshold, the model training ends, and the current YOLOv8 target detection model is the trained YOLOv8 target detection model. Otherwise, return to S43 and continue to use the training set for model training; S46. Input the validation set into the trained YOLOv8 object detection model, evaluate the generalization ability of the model by observing the performance on the validation set, and tune the model's hyperparameters and structure; S47. Input the test set into the tuned YOLOv8 target detection model to evaluate the model performance.

6. The method for detecting papillary thyroid carcinoma cancer cells based on YOLOv8 according to claim 5, characterized in that: In S42, the loss function and optimizer of the YOLOv8 target detection model are set, including: For the cancer cell classification task, the cross entropy loss function BCEWithLogitsLoss with Sigmoid function is used as the loss function: Among them, y i is the classification label value of the i-th medical image, y i ∈{0,1},p i is the predicted probability value of the i-th medical image, N is the number of medical images, σ(x) is the Sigmoid function, For the cancer cell localization task, the IoU loss function in the rectangular box regression loss is used as the loss function: Among them, A and B are the areas of the predicted box and the real box respectively.

7. The method for detecting papillary thyroid carcinoma cancer cells based on YOLOv8 according to claim 5, characterized in that: In S43, the training set is input into the YOLOv8 target detection model for model training, including: The training set is input into the YOLOv8 target detection model, which obtains image features and encodes them. Among them, the image feature encoding includes rectangular frame coordinates, category probability and overall confidence.

8. The method for detecting papillary thyroid cancer cells based on YOLOv8 according to claim 1, wherein: S5 obtains real-time medical images, inputs them into the trained YOLOv8 target detection model, and outputs cancer cell detection results, including: Obtain real-time medical images and input them into the trained YOLOv8 object detection model to obtain the corresponding rectangular box coordinates, category probability, and overall confidence. The coordinates of the rectangular box, category probability, and overall confidence are saved in txt format, and a visual rectangular box is drawn on the real-time medical image to output the cancer cell detection results of the real-time medical image.