Endometrial cancer cell detection method and system

Through visual neural network pairing images with pathological report text and self-supervised training, cell maps are constructed and cross-modal features are fused, solving the time-consuming and accurate problems of endometrial cancer cell detection and achieving efficient and interpretable detection results.

CN120544189AActive Publication Date: 2025-08-26THE SEVENTH MEDICAL CENTER OF PLA GENERAL HOSPITAL

Patent Information

Application Number
CN202510606881.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-26
Estimated Expiration
2045-05-12

AI Technical Summary

Technical Problem

The prior art has problems in the detection of endometrial cancer cells that take a long time, low inter-medical consistency, susceptible to personal experience, and difficult to accurately identify lesion areas with low contrast boundaries.

Method used

By pairing images with pathological report text, unified semantic features are obtained using multi-positive sample comparison learning, combined with semantic entropy-driven dynamic occlusion and random shuffling self-supervised training of visual neural networks, constructing cell maps and fusion of cross-modal features, using detection models and reward models for reinforcement learning, and outputting cancer region and mask information.

Benefits of technology

It realizes efficient and accurate endometrial cancer cell detection, reduces the burden of manual reading of high-resolution pathological sections, improves the robustness and generalization ability of the detection, and adapts to different staining batches and scanning equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120544189A_ABST
    Figure CN120544189A_ABST
Patent Text Reader

Abstract

According to the endometrial cancer cell detection method and system provided by the embodiment of the invention, firstly, an image block is paired with a pathological report text, and unified semantic features are obtained by utilizing multi-positive sample comparison learning; performing semantic entropy-driven dynamic shielding-random shuffling self-supervision training on the visual neural network; secondly, after cell nucleuses are positioned, a weighted cell graph is constructed with cells as nodes and proximity relations as edges, topological features are obtained, and then the topological features, visual features and semantic features are subjected to cross-scale attention and gating fusion to generate multi-modal features; a detection head jointly outputs a category, a frame and a mask, and comprehensive cross-modal consistency loss is subjected to supervision or weak supervision training; and a'cancer-normal 'preference pair is automatically generated by further utilizing high and low probability regions output by the initial model, a reward model is trained, and a PPO strategy is adopted for iterative fine tuning, so that cell-level cancer focus detection can be accurately and robustly completed without a large number of pixel-level labels, and the pathological screening efficiency and accuracy are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field

[0001] The present invention belongs to the technical field of cancer detection, and in particular relates to a method and system for detecting endometrial cancer cells. [Background Technology]

[0002] Endometrial cancer is one of the most common gynecological malignancies. Its incidence and mortality rates have continued to rise over the past decade, with a clear trend of younger patients. Large-scale clinical studies have shown that patients who receive standard treatment in the early stages of the disease have a five-year survival rate as high as 85%. However, if the disease progresses to the middle or late stages due to missed or misdiagnosis, the prognosis deteriorates dramatically. Therefore, rapid and accurate pathological screening of endometrial cytological biopsies is crucial for improving patient survival.

[0003] Currently, pathologists are still required to browse through panoramic digital slides layer by layer, zoom in on specific areas, and make detailed interpretations, making a complete image review extremely time-consuming. Furthermore, the consistency of slides from the same patient between different physicians is often low and easily affected by factors such as reading experience, fatigue, and distraction. Furthermore, the benign-malignant transition zone often presents a low-contrast, fuzzy transition zone, making it difficult for traditional fixed-scale segmentation or classification models to address both.

[0004] Therefore, there is an urgent need for a method and system for detecting endometrial cancer cells with high precision, high efficiency and high robustness to assist doctors in making rapid and accurate diagnosis of the disease. [Summary of the invention]

[0005] In view of this, an embodiment of the present invention provides a method and system for detecting endometrial cancer cells.

[0006] In a first aspect, an embodiment of the present invention provides a method for detecting endometrial cancer cells, the method comprising:

[0007] S1. Pair the image chunks with the pathology report text and obtain the visual encoder, text encoder and unified semantic features by training the multi-positive sample contrast loss function;

[0008] S2. Divide the large image into small blocks, dynamically adjust the masking ratio based on semantic entropy, perform masking processing according to the masking ratio, and optimize it by training the visual encoder with a comprehensive loss function;

[0009] S3. After locating the center of the cell nucleus using the optimized visual encoder, a cell graph is constructed with cells as nodes and neighboring relationships as edges.

[0010] S4. Construct a detection model based on unified semantic features, image features, and cell map features;

[0011] S5. Based on the current prediction results of the detection model, obtain the areas with high probability of cancer and the areas with high probability of cancer and form preference pairs. Then, construct the regional contrast loss function based on the preference to train the reward model, and then adjust the detection model through reinforcement learning.

[0012] According to the above aspects and any possible implementation, an implementation is further provided, wherein before S1, the step further includes:

[0013] Obtain panoramic digital pathology slides and pathology report texts, crop each panoramic digital pathology slide into multiple image blocks x of size H0×W0, and extract the corresponding pathology report texts t.

[0014] According to the above aspects and any possible implementation, an implementation is further provided, wherein S1 specifically includes:

[0015] S11, based on the image block x, generate two perspectives {x (1) ,x (2)}, and at the same time generate two sentence rewrites based on the corresponding pathology report text t {t (1) ,t (2)} forms a four-dimensional vector {x (i) ,t (j)}, where i,j∈{1,2};

[0016] S12, extracting the visual vector v=f of the large block of the image through a visual neural network θ (x (k) ), using text neural network to extract the text vector u=g of the text φ (t (k) ), the fusion vector z=γv+(1-γ)u is obtained by gated fusion and adding the gating coefficient, γ is the gating coefficient, γ=σ(W g [v‖u]), σ is the Sigmoid activation function, W g is the gate weight matrix, f θ For visual neural network processing, x (k) is the image feature of the k-th perspective, g φ For text neural network processing, t (k) k-th text perspective,;

[0017] S13. Construct a multi-positive sample comparison loss function for training and minimize the loss function:

[0018]

[0019] Among them, P is the set of positive sample pairs, T is the temperature coefficient, is the embedding vector of the i-th image, is the embedding vector of the j-th text, and <·,·> is the dot product operation;

[0020] S14. Output the trained visual encoder, text encoder and unified semantic features.

[0021] According to the above aspects and any possible implementation, an implementation is further provided, wherein S2 specifically includes:

[0022] S21, block the image through the visual encoder The image is divided into P×P pixel blocks to obtain a Patch sequence Where, N = (H0 / P) × (W0 / P);

[0023] S22, call the unified semantic feature v for each image block * , after projection, we get the category probability distribution p=softmax(W c v * ), and calculate the normalized semantic entropy:

[0024]

[0025] Among them, W c is the weight matrix for category prediction, p j is the predicted probability of the jth class, and C is the number of classification categories;

[0026] S23. Dynamically determine the masking ratio based on semantic entropy:

[0027]

[0028] Among them, σ is the Sigmoid function, α and τ are hyperparameters;

[0029] S24, according to the shielding ratio p mask Randomly sample from the Patch sequence to form a set will be collected The inner patch is masked, and then the token vectors of the unsampled patches are randomly permuted to obtain a disordered sequence Among them, P perm is a random permutation matrix, h vis is the token sequence of the unmasked patch;

[0030] S25, will Input the visual encoder to get the representation H enc , after global branch prediction And minimize the global branch loss function For each shaded position, the local branch predict And minimize the local branch loss function Among them, CLS is the neural network feature summary vector, t mask Token representation of the masked position. is the local reconstruction feature of the i-th position, is the true feature of the i-th position;

[0031] S26. Through comprehensive loss function Jointly optimize the visual encoder; where λ g is the weight coefficient of the global loss, λ l is the weight coefficient of local loss.

[0032] According to the above aspects and any possible implementation, an implementation is further provided, wherein S3 specifically includes:

[0033] S31, obtain the center coordinate c of each cell nucleus node through the optimized visual encoder. i =(x i ,y i ), i=1...N c , and extract the initial feature vector of the cell The graph node v i Defined as (c i ,f i (0) ), forming a node set Among them, r i is the morphological radius of the i-th cell nucleus, μ i is the average chromaticity of the ith cell nucleus, s i is the category logits of the i-th cell nucleus, e i is the visual embedding vector of the i-th cell nucleus, c i =(x i ,y i ) is the center coordinate of the i-th cell nucleus, d0 is the initial feature dimension, N c is the total number of cell nodes;

[0034] S32. Perform Delaunay triangulation on the center coordinates of all cell nucleus nodes to obtain the initial candidate adjacency set E raw , cut off the edge length exceeding the maximum connection distance threshold r max edge, and obtain the candidate adjacency set E={(i,j)|||c i -c j ||≤r max}; where ||c i -c j || is the Euclidean distance between the i-th and j-th nodes;

[0035] S33. Calculate the geometric weight of each edge (i, j)∈E and morphological weights Multiply the geometric weight and the morphological weight to get the comprehensive weight a ij , construct a sparse weighted adjacency matrix A = [a ij ];

[0036] S34. Output a cell graph containing a node set V, a candidate adjacency set E, and a weighted adjacency matrix A.

[0037] G=(V,E,A).

[0038] According to the above aspects and any possible implementation, an implementation is further provided, wherein S4 specifically includes:

[0039] S41, Patch sequence Perform ROI feature extraction:

[0040]

[0041] Among them, f roi is the ROI feature vector, F img is the image feature map, bbox is the coordinates of the region of interest;

[0042] S42. Update the cell graph G = (V, E, A) using a two-layer GraphSAGE network:

[0043]

[0044] in, is the node feature of the l-th layer GNN, W (l) is the l-th layer GNN parameter, is the set of neighbor nodes of node i, σ is the activation function;

[0045] S43. Perform graph-level pooling to obtain cell graph features:

[0046]

[0047] Among them, g tile is the graph-level pooling feature vector, f i 2 is the final layer feature of the node;

[0048] S44. Use ROI features as query: Q = W q f roi , Cell map features g tile And the unified semantic feature u are linearly mapped into key-value pairs:

[0049]

[0050] Among them, W q is the query projection weight, W g and W g ′ is g tile The weight of linear mapping to K / V space, W u and W u ′ is the weight for linearly mapping the semantic feature vector u to the K / V space, and d is the dimension of the attention latent space;

[0051] S45. Calculate attention weight Obtain attention fusion features based on attention weights

[0052] S46, calculate the dynamic gating coefficient γ=σ(W c [f roi ||z tri ]), W c ∈R 1×2d , and fuse to obtain unified ROI features

[0053] S47, construct a detection model, whose detection head includes a classification head, a bounding box regression head and a mask head, wherein the classification head is expressed by the following formula: p = softmax(W cls f * +b cls ), The bounding box regression head is expressed as follows: bbox =W reg f * +b reg , The mask head is expressed by the following formula:

[0054] The comprehensive training loss function of the detection model is expressed as follows:

[0055]

[0056] Among them, the cross-modal consistency loss function Propose network loss for the region, is the ROI level category classification loss, is the ROI level border regression loss, is the ROI level segmentation mask loss, λ box is the bounding box regression loss weight, λ mask is the mask loss weight, λ alignis the consistency loss weight, m ​​represents the hinge loss margin, d(·,·) represents the distance metric between features, and W cls represents the classification head weight, b cls represents the classification head bias, W reg represents the bounding box regression weight, b reg Represents the bounding box regression bias, Deconv (4) Denotes the deconvolution layer with upsampling 4×, Conv 1×1 Indicates that 1×1 convolution generates the mask channel.

[0057] According to the above aspects and any possible implementation, an implementation is further provided, wherein S5 specifically includes:

[0058] S51. Calculate the probability of each ROI being judged as cancerous using the detection model:

[0059] p i =Softmax(W cls ·f roi +b cls ), i=1,2,...,N;

[0060] Among them, W cls and b cls The weights and biases of the classification head, f roi is the feature extracted from the image features by ROIAlign;

[0061] S52, according to the probability p output by the model i , select the area that meets the following probability range as the area A with high probability of cancer: A={ROI i |p i ≥τ high , p i ∈[0,1]}; select the region that meets the following probability range as the region B with high probability of cancer: B={ROI j |p j ≤τ low , p i ∈[0,1]}; and form a preference pair (A, B) through the high probability area A and the low probability area B;

[0062] S53. For a pair of preference pairs (A, B), the reward model is trained by constructing a regional contrast loss function, where the contrast loss function is expressed as: σ is the Sigmoid function, r(A) and r(B) are the output scores of the reward model for A and B respectively;

[0063] S54. Minimize contrast loss function Update the model parameters of the reward model through backpropagation;

[0064] S55. Fine-tune the reward model by constructing a reinforcement learning loss function. The PPO loss function is expressed as: ρ t is the ratio of the current strategy to the old strategy, A t is the advantage estimate and ∈ is the smoothing factor.

[0065] According to the aspects described above and any possible implementation methods, an implementation method is further provided, wherein the two image perspectives are selected from data enhancement types and / or geometric transformation types, and the data enhancement types are divided into five types: geometric transformation, intensity transformation, affine and nonlinear transformation, noise injection and filtering. Geometric transformation includes rotation, scaling, flipping, and cropping. Intensity transformation includes brightness, contrast, saturation and hue. Noise injection is adding random noise. Affine and nonlinear transformation includes simulating organ deformation and different forms of lesions. Filtering includes blurring filters and sharpening filters.

[0066] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the method further includes:

[0067] The large image block is divided into small image blocks of different sizes at multiple scales to obtain the corresponding multi-scale image block Patch sequence;

[0068] Generating multi-scale visual features for the multi-scale image block sequence through a visual neural network;

[0069] Clustering the cell graph nodes according to the size of the cell nucleus, and constructing cell subgraphs of multiple scales respectively;

[0070] Perform feature fusion between multi-scale visual features and corresponding scale cell sub-graph features to generate multi-scale fusion features;

[0071] The multi-scale fusion features are fused from top to bottom in a feature pyramid to form a unified multi-scale pyramid feature representation, which is used as the input feature of the detection model.

[0072] In a second aspect, an embodiment of the present invention provides a system for detecting endometrial cancer cells, the system comprising:

[0073] The preprocessing module is used to pair large image blocks with pathology report text, and obtain visual encoders, text encoders and unified semantic features by training a multi-positive sample contrast loss function;

[0074] The masking module is used to split large image blocks into small blocks, dynamically adjust the masking ratio based on semantic entropy, perform masking processing according to the masking ratio, and optimize it by training the visual encoder with a comprehensive loss function;

[0075] The construction module is used to locate the center of the cell nucleus using the optimized visual encoder, and then construct a cell graph with cells as nodes and neighboring relationships as edges;

[0076] A processing module for constructing a detection model based on unified semantic features, image features, and cell map features;

[0077] The detection module is used to obtain areas with high cancer probability and areas with low cancer probability based on the current prediction results of the detection model and form preference pairs. It then constructs a regional contrast loss function based on the preferences to train the reward model, and then adjusts the detection model through reinforcement learning.

[0078] One of the above technical solutions has the following beneficial effects:

[0079] The method of the embodiment of the present invention proposes a method and system for detecting endometrial cancer cells. First, a large block of the image is paired with the text of the pathology report, and unified semantic features are obtained by comparative learning of multiple positive samples; then, a semantic entropy-driven dynamic masking-random shuffling self-supervised training of the visual neural network is performed; after locating the cell nucleus, a weighted cell graph is constructed with cells as nodes and neighboring relationships as edges to obtain topological features, and then multimodal features are generated by cross-scale attention and gating fusion with visual features and semantic features; the detection head jointly outputs categories, bounding boxes and masks, and performs supervised or weakly supervised training by integrating cross-modal consistency losses; further, the high and low probability areas output by the initial model are used to automatically generate "cancer-normal" preference pairs, train the reward model, and iteratively fine-tune using the PPO strategy to achieve accurate and explainable detection of endometrial cancer cells. The technical solution of the present invention can automatically learn cell-level lesion features when only slice-level or weak annotations are provided, and output category, bounding box and mask information, significantly reducing the burden of manual reading of high-resolution pathology sections. At the same time, through the continuous iteration of adaptive preference pairs and reward models, the detection strategy can continuously improve itself with the data, maintaining robust generalization for different staining batches and scanning devices, thereby improving the overall efficiency and accuracy of pathology screening.

Brief Description of the Drawings

[0080] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0081] Figure 1 A schematic diagram of a process for detecting endometrial cancer cells provided by an embodiment of the present invention;

[0082] Figure 2A schematic block diagram of an endometrial cancer cell detection system provided by an embodiment of the present invention;

[0083] Figure 3 This is a schematic diagram of the hardware structure of an endometrial cancer cell detection system provided by an embodiment of the present invention. [Specific implementation method]

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

[0085] Please refer to Figure 1 , which is a flow chart of a method for detecting endometrial cancer cells provided by an embodiment of the present invention. As shown in the figure, the method includes the following steps:

[0086] S1. Pair the image chunks with the pathology report text and obtain the visual encoder, text encoder and unified semantic features by training the multi-positive sample contrast loss function;

[0087] S2. Divide the large image into small blocks, dynamically adjust the masking ratio based on semantic entropy, perform masking processing according to the masking ratio, and optimize it by training the visual encoder with a comprehensive loss function;

[0088] S3. After locating the center of the cell nucleus using the optimized visual encoder, a cell graph is constructed with cells as nodes and neighboring relationships as edges.

[0089] S4. Construct a detection model based on unified semantic features, image features, and cell map features;

[0090] S5. Based on the current prediction results of the detection model, obtain the areas with high probability of cancer and the areas with high probability of cancer and form preference pairs. Then, construct the regional contrast loss function based on the preference to train the reward model, and then adjust the detection model through reinforcement learning.

[0091] Specifically, the step before S1 also includes:

[0092] Obtain panoramic digital pathology slides and pathology report texts, crop each panoramic digital pathology slide into multiple image blocks x of size H0×W0, and extract the corresponding pathology report texts t.

[0093] It should be noted that a Whole-Slide Image (WSI) is a large image file generated by scanning a complete tissue slice on a glass slide at ultra-high resolution. It preserves all spatial information of the lesion, facilitating subsequent algorithm processing and magnified viewing by the doctor. The report corresponding to each WSI is issued by the pathologist and usually includes semantic information such as the sampling site, microscopic description, diagnosis conclusion, grading / typing, etc. Because the WSI is too large, the GPU cannot process it in its entirety at once and needs to be cropped according to a fixed window.

[0094] Specifically, the S1 includes:

[0095] S11, based on the image block x, generate two perspectives {x (1) ,x (2)}, and at the same time generate two sentence rewrites based on the corresponding pathology report text t {t (1) ,t (2)} forms a four-dimensional vector {x (i) ,t (j)}, where i,j∈{1,2};

[0096] S12, extracting the visual vector v=f of the large block of the image through a visual neural network θ (x (k) ), using text neural network to extract the text vector u=g of the text φ (t (k) ), the fusion vector z=γv+(1-γ)u is obtained by gated fusion and adding the gating coefficient, γ is the gating coefficient, γ=σ(W g [v||u]), σ is the Sigmoid activation function, W g is the gate weight matrix, f θ For visual neural network processing, x (k) is the image feature of the k-th perspective, g φ For text neural network processing, t (k) k-th text perspective,;

[0097] S13. Construct a multi-positive sample comparison loss function for training and minimize the loss function:

[0098]

[0099] Among them, P is the set of positive sample pairs, T is the temperature coefficient, is the embedding vector of the i-th image, is the embedding vector of the j-th text, and <·,·> is the dot product operation;

[0100] S14. Output the trained visual encoder, text encoder and unified semantic features.

[0101] It should be noted that expanding positive samples through dual-view image and text perspectives can alleviate the problems of small samples, noise, and bias, and can also encourage the model to learn representations that are robust to medical semantics rather than relying on the details of a single viewpoint. The two image perspectives are selected from data augmentation types and / or geometric transformation types. The data augmentation types are divided into five categories: geometric transformation, intensity transformation, affine and nonlinear transformation, noise injection, and filtering. Geometric transformation includes rotation, scaling, flipping, and cropping. Intensity transformation includes brightness, contrast, saturation, and hue. Noise injection is the addition of random noise. Affine and nonlinear transformations include simulating organ deformation and the different forms of lesions. Filtering includes blurring filters and sharpening filters.

[0102] In addition, the gating coefficient γ allows the model to dynamically judge the credibility of image evidence and text evidence based on samples, overcoming the interference of possible missing / redundant information in the reported text. The resulting cross-modal shared semantic space provides a "soft label" prior for the subsequent detection network.

[0103] Compared to existing approaches, each anchor simultaneously possesses multiple positive samples, fully utilizing the four-view combination. The visual-text representation aggregates similar cases while separating different cases, eliminating empty alignments between images and text during early training. This step establishes a unified semantic coordinate system for the image and text, ensuring that all subsequent patches, ROIs, and cell nodes are consistent with pathological semantic metrics, significantly improving the robustness and interpretability of cancer cell detection.

[0104] Specifically, the S2 specifically includes:

[0105] S21, block the image through the visual encoder The image is divided into P×P pixel blocks to obtain a Patch sequence Where, N = (H0 / P) × (W0 / P);

[0106] S22, call the unified semantic feature v for each image block * , after projection, we get the category probability distribution p=softmax(W c v * ), and calculate the normalized semantic entropy:

[0107]

[0108] Among them, W c is the weight matrix for category prediction, p j is the predicted probability of the jth class, and C is the number of classification categories;

[0109] S23. Dynamically determine the masking ratio based on semantic entropy:

[0110]

[0111] Among them, σ is the Sigmoid function, α and τ are hyperparameters;

[0112] S24, according to the shielding ratio p mask Randomly sample from the Patch sequence to form a set will be collected The inner patch is masked, and then the token vectors of the unsampled patches are randomly permuted to obtain a disordered sequence Among them, P perm is a random permutation matrix, h vis is the token sequence of the unmasked patch;

[0113] S25, will Input the visual encoder to get representation H enc , after global branch prediction And minimize the global branch loss function For each shaded position, the local branch predict And minimize the local branch loss function Among them, CLS is the neural network feature summary vector, t mask Token representation of the masked position. is the local reconstruction feature of the i-th position, is the true feature of the i-th position;

[0114] S26. Through comprehensive loss function Jointly optimize the visual encoder; where λ g is the weight coefficient of the global loss, λ l is the weight coefficient of local loss.

[0115] It should be noted that the above steps discretize large WSI blocks into learnable tokens using the ViT-MAE method, paving the way for subsequent self-supervised reconstruction. The "semantically guided dynamic masking + random permutation" self-supervised strategy enables the visual encoder to adaptively focus on areas of diagnostic value. Combining global / local dual reconstruction with a unified semantic objective significantly enhances the encoder's robust representation of morphological differences, colorimetric variations, and tissue structure, providing a more precise and interpretable feature foundation for subsequent cell map modeling and detection networks, thereby improving the accuracy and reliability of endometrial cancer screening.

[0116] Specifically, the S3 includes:

[0117] S31, obtain the center coordinate c of each cell nucleus node through the optimized visual encoder. i =(x i ,yi ), i=1...N c , and extract the initial feature vector of the cell The graph node v i Defined as (c i ,f i (0) ), forming a node set Among them, r i is the morphological radius of the i-th cell nucleus, μ i is the average chromaticity of the ith cell nucleus, s i is the category logits of the i-th cell nucleus, e i is the visual embedding vector of the i-th cell nucleus, c i =(x i ,y i ) is the center coordinate of the i-th cell nucleus, d0 is the initial feature dimension, N c is the total number of cell nodes;

[0118] S32. Perform Delaunay triangulation on the center coordinates of all cell nucleus nodes to obtain the initial candidate adjacency set E raw , cut off the edge length exceeding the maximum connection distance threshold r max edge, and obtain the candidate adjacency set E={(i,j)|||c i -c j ||≤r max}; where ||c i -c j || is the Euclidean distance between the i-th and j-th nodes;

[0119] S33. Calculate the geometric weight of each edge (i, j)∈E and morphological weights Multiply the geometric weight and the morphological weight to get the comprehensive weight a ij , construct a sparse weighted adjacency matrix A = [a ij ];

[0120] S34. Output a cell graph containing a node set V, a candidate adjacency set E, and a weighted adjacency matrix A.

[0121] G=(V,E,A).

[0122] This process first locates and quantifies the morphological and semantic features of each cell nucleus, then uses a Delaunay+ distance threshold to generate candidate edges that conform to the tissue structure. The resulting sparse weighted adjacency matrix is ​​constructed by integrating geometric and morphological similarities. The resulting cell graph is both concise and biologically plausible, enabling accurate modeling of cell-cell interactions within graph neural networks, significantly improving the ability to discern endometrial cancer cell clusters, invasion boundaries, and microenvironmental heterogeneity.

[0123] According to the above aspects and any possible implementation, an implementation is further provided, wherein S4 specifically includes:

[0124] S41, Patch sequence Perform ROI feature extraction:

[0125]

[0126] Among them, f roi is the ROI feature vector, F img is the image feature map, bbox is the coordinates of the region of interest;

[0127] S42. Update the cell graph G = (V, E, A) using a two-layer GraphSAGE network:

[0128]

[0129] in, is the node feature of the l-th layer GNN, W (l) is the l-th layer GNN parameter, is the set of neighbor nodes of node i, σ is the activation function;

[0130] S43. Perform graph-level pooling to obtain cell graph features:

[0131]

[0132] Among them, g tile is the graph-level pooling feature vector, f i 2 is the final layer feature of the node;

[0133] S44. Use the ROI feature as a query: Cell map features g tile And the unified semantic feature u are linearly mapped into key-value pairs:

[0134]

[0135] Among them, W q is the query projection weight, W g and W g ′ is g tile The weight of linear mapping to K / V space, W u and W u ′ is the weight for linearly mapping the semantic feature vector u to the K / V space, and d is the dimension of the attention latent space;

[0136] S45. Calculate attention weight Obtain attention fusion features based on attention weights

[0137] S46, calculate the dynamic gating coefficient γ=σ(W c [f roi ||z tri ]), W c ∈R 1×2d , and fuse to obtain unified ROI features

[0138] S47, construct a detection model, whose detection head includes a classification head, a bounding box regression head and a mask head, wherein the classification head is expressed by the following formula: p = softmax(W cls f * +b cls ), The bounding box regression head is expressed as follows: bbox =W reg f * +b reg , The mask head is expressed by the following formula:

[0139] The comprehensive training loss function of the detection model is expressed as follows:

[0140]

[0141] Among them, the cross-modal consistency loss function Propose network loss for the region, is the ROI level category classification loss, is the ROI level border regression loss, is the ROI level segmentation mask loss, λ box is the bounding box regression loss weight, λ mask is the mask loss weight, λ align is the consistency loss weight, m ​​represents the hinge loss margin, d(·,·) represents the distance metric between features, and W cls represents the classification head weight, b cls represents the classification head bias, W reg represents the bounding box regression weight, b reg Represents the bounding box regression bias, Deconv (4) Represents the deconvolution layer with upsampling 4×, Conv 1×1 Indicates that 1×1 convolution generates the mask channel.

[0142] According to the above aspects and any possible implementation, an implementation is further provided, wherein S5 specifically includes:

[0143] S51. Calculate the probability of each ROI being judged as cancerous using the detection model:

[0144] p i =Softmax(W cls ·f roi +b cls ), i=1,2,...,N;

[0145] Among them, W cls and b cls The weights and biases of the classification head, f roi is the feature extracted from the image features by ROIAlign;

[0146] S52, according to the probability p output by the model i , select the area that meets the following probability range as the area A with high probability of cancer: A={ROI i |p i ≥τ high , p i ∈[0,1]}; select the region that meets the following probability range as the region B with high probability of cancer: B={ROI j |p j ≤τ low , p i ∈[0,1]}; and form a preference pair (A, B) through the high probability area A and the low probability area B;

[0147] S53. For a pair of preference pairs (A, B), the reward model is trained by constructing a regional contrast loss function, where the contrast loss function is expressed as: σ is the Sigmoid function, r(A) and r(B) are the output scores of the reward model for A and B respectively;

[0148] S54. Minimize contrast loss function Update the model parameters of the reward model through backpropagation;

[0149] S55. Fine-tune the reward model by constructing a reinforcement learning loss function. The PPO loss function is expressed as: ρ t is the ratio of the current strategy to the old strategy, A t is the advantage estimate and ∈ is the smoothing factor.

[0150] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the method further includes:

[0151] The large image block is divided into small image blocks of different sizes at multiple scales to obtain the corresponding multi-scale image block Patch sequence;

[0152] Generating multi-scale visual features for the multi-scale image block sequence through a visual neural network;

[0153] Clustering the cell graph nodes according to the size of the cell nucleus, and constructing cell subgraphs of multiple scales respectively;

[0154] Perform feature fusion between multi-scale visual features and corresponding scale cell sub-graph features to generate multi-scale fusion features;

[0155] The multi-scale fusion features are fused from top to bottom in a feature pyramid to form a unified multi-scale pyramid feature representation, which is used as the input feature of the detection model.

[0156] Through the above steps, the present invention achieves the following technical effects:

[0157] 1. Improve segmentation accuracy and robustness:

[0158] Fusion of shape prior: By introducing shape prior information into the graph convolutional network, the model can better capture the shape characteristics of the target object, especially in ultrasound images with blurred boundaries and high noise, effectively improving the accuracy of segmentation.

[0159] Application of graph convolutional networks: GCN can process irregular graph structure data and is suitable for combining information of pixels and shape key points to achieve modeling of complex topological structures and improve the ability to recognize target areas.

[0160] 2. Enhance the generalization ability of the model:

[0161] Self-supervised pre-training: Utilizes a large number of unlabeled ultrasound images for self-supervised learning and pre-trains the feature extraction model to obtain a universal image feature representation, reducing the dependence on large amounts of labeled data and improving the generalization performance of the model in small sample cases.

[0162] Multi-task learning framework: By performing denoising and feature extraction simultaneously, the model learns richer and more robust feature representations while sharing parameters, complementing the information between different tasks and improving overall performance.

[0163] 3. Improve the accuracy of detection and classification:

[0164] Accurate positioning of candidate areas: Extracting candidate areas through fine segmentation results ensures a high degree of overlap between the candidate areas and the actual target areas, reduces background interference, and improves the accuracy of subsequent classification.

[0165] Effective use of high-level features: Extracting regional features from high-level features fully utilizes deep semantic information and enhances the classification model's ability to identify lesion features.

[0166] Probability output: The classification model outputs the probability that the candidate region contains the target and the probability distribution of the lesion category, providing a quantitative basis for clinical diagnosis and facilitating risk assessment and decision-making for doctors.

[0167] 4. Achieve real-time requirements and improve processing efficiency:

[0168] Lightweight network architecture: Using lightweight neural network structures, such as MobileNet, reduces the computational complexity of the model and meets the requirements of real-time processing.

[0169] Model optimization and acceleration: Through technologies such as model pruning, quantization, and hardware acceleration, the model's inference speed and resource utilization efficiency are further improved, making it suitable for deployment in actual medical devices.

[0170] 5. Improved model interpretability and controllability:

[0171] Introduction of shape prior: clarifies the model's use of shape information, making the segmentation results more interpretable and helping doctors understand the basis of the model's judgment.

[0172] Adjustability of shape constraints: By adjusting the weight of the shape prior loss, the model's dependence on the shape prior can be controlled to adapt to the needs of different application scenarios.

[0173] 6. Reduced reliance on labeled data and saved labor costs:

[0174] Self-supervised learning and multi-task learning: Using unlabeled data for pre-training reduces the need for large amounts of labeled data. At the same time, within the multi-task learning framework, the learning process of denoising and feature extraction is shared, saving the cost of data labeling and model training.

[0175] In summary, the method of the embodiment of the present invention proposes a method and system for detecting endometrial cancer cells, which first pairs large blocks of images with pathology report text, and uses multi-positive sample comparative learning to obtain unified semantic features; then, semantic entropy-driven dynamic masking-random shuffling self-supervised training of the visual neural network is performed; after locating the cell nucleus, a weighted cell graph is constructed with cells as nodes and neighboring relationships as edges to obtain topological features, and then multimodal features are generated by cross-scale attention and gating fusion with visual features and semantic features; the detection head jointly outputs categories, bounding boxes and masks, and performs supervised or weakly supervised training based on comprehensive cross-modal consistency loss; further, the high and low probability areas output by the initial model are used to automatically generate "cancer-normal" preference pairs, train the reward model, and iteratively fine-tune using the PPO strategy to achieve accurate and explainable detection of endometrial cancer cells. The technical solution of the present invention can automatically learn cell-level lesion features when only slice-level or weak annotations are provided, and output category, bounding box and mask information, significantly reducing the burden of manual reading of high-resolution pathology sections. At the same time, through the continuous iteration of adaptive preference pairs and reward models, the detection strategy can continuously improve itself with the data, maintaining robust generalization for different staining batches and scanning devices, thereby improving the overall efficiency and accuracy of pathology screening.

[0176] The embodiments of the present invention further provide device embodiments for implementing the steps and methods in the above method embodiments.

[0177] Please refer to Figure 2 , which is a schematic block diagram of an endometrial cancer cell detection system provided by an embodiment of the present invention. The system includes:

[0178] A preprocessing module 210 is used to pair the image chunks with the pathology report text, and obtain a visual encoder, a text encoder, and a unified semantic feature by training a multi-positive sample contrast loss function;

[0179] The masking module 220 is used to divide the large image block into small image blocks, dynamically adjust the masking ratio based on semantic entropy, perform masking processing according to the masking ratio, and optimize it by training the comprehensive loss function visual encoder;

[0180] A construction module 230 is used to locate the center of the cell nucleus using the optimized visual encoder, and then construct a cell graph using cells as nodes and neighboring relationships as edges;

[0181] A processing module 240 is configured to construct a detection model based on unified semantic features, image features, and cell map features;

[0182] The detection module 250 is used to obtain areas with high probability of cancer and areas with high probability of cancer based on the current prediction results of the detection model and form preference pairs, then construct a regional contrast loss function based on the preferences to train the reward model, and then adjust the detection model through reinforcement learning.

[0183] Since each unit module in this embodiment can execute Figure 1 For the method shown in the embodiment, the part not described in detail in this embodiment can be referred to Figure 1 Related instructions.

[0184] Please refer to Figure 3 , which is a schematic diagram of the hardware structure of the adenomyosis ultrasound image segmentation system provided by an embodiment of the present invention. The data prediction device includes at least one processor and a memory. The at least one processor is coupled to the memory and is configured to read and execute instructions in the memory to implement the endometrial cancer cell detection method provided by an embodiment of the present invention.

[0185] In a third aspect, an embodiment of the present invention provides a computer-readable medium storing program code, which, when executed on a computer, causes the computer to execute the endometrial cancer cell detection method provided in an embodiment of the present invention.

[0186] At the hardware level, the device may include a processor and, optionally, an internal bus, a network interface, and memory. The memory may include internal memory, such as high-speed random-access memory (RAM), and may also include non-volatile memory, such as at least one disk drive. Of course, the device may also include other hardware required for the service.

[0187] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like.

[0188] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.

[0189] The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software modules can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the method described above.

[0190] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0191] For the convenience of description, the above device is described as being divided into various units or modules according to their functions. Of course, when implementing the present invention, the functions of each unit or module can be implemented in the same or multiple software and / or hardware.

[0192] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0193] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0194] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0196] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0197] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0198] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0199] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0200] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0201] The present invention may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0202] The various embodiments of the present invention are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so its description is relatively simple. For relevant portions, refer to the description of the method embodiment.

[0203] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A method for detecting endometrial cancer cells, characterized in that: The method comprises: S1. Pair the image chunks with the pathology report text and obtain the visual encoder, text encoder and unified semantic features by training the multi-positive sample contrast loss function; S2. Divide the large image into small blocks, dynamically adjust the masking ratio based on semantic entropy, perform masking processing according to the masking ratio, and optimize it by training the visual encoder with a comprehensive loss function; S3. After locating the center of the cell nucleus using the optimized visual encoder, a cell graph is constructed with cells as nodes and neighboring relationships as edges. S4. Construct a detection model based on unified semantic features, image features, and cell map features; S5. Based on the current prediction results of the detection model, obtain the areas with high probability of cancer and the areas with high probability of cancer and form preference pairs. Then, construct the regional contrast loss function based on the preference to train the reward model, and then adjust the detection model through reinforcement learning.

2. The method for detecting endometrial cancer cells according to claim 1, wherein: The S1 also includes: Obtain panoramic digital pathology slides and pathology report texts, crop each panoramic digital pathology slide into multiple image blocks x of size H0×W0, and extract the corresponding pathology report texts t.

3. The method for detecting endometrial cancer cells according to claim 2, wherein: Said S1 specifically includes: S11, based on the image block x, generate two perspectives {x (1) ,x (2) }, and at the same time generate two sentence rewrites based on the corresponding pathology report text t {t (1) ,t (2) } forms a four-dimensional vector {x (i) ,t (j) }, where i,j∈{1,2}; S12, extracting the visual vector v=f of the large block of the image through a visual neural network θ (x (k) ), using text neural network to extract the text vector u=g of the text φ (t (k) ), the fusion vector z=γv+(1-γ)u is obtained by gated fusion and adding the gating coefficient, γ is the gating coefficient, γ=σ(W g [v||u]), σ is the Sigmoid activation function, W g is the gate weight matrix, f θ For visual neural network processing, x (k) is the image feature of the k-th perspective, g φ For text neural network processing, t (k) k-th text perspective,; S13. Construct a multi-positive sample comparison loss function for training and minimize the loss function: Among them, P is the set of positive sample pairs, T is the temperature coefficient, is the embedding vector of the i-th image, is the embedding vector of the j-th text, and <·,·> is the dot product operation; S14. Output the trained visual encoder, text encoder and unified semantic features.

4. The method for detecting endometrial cancer cells according to claim 3, wherein: The S2 specifically includes: S21, block the image through the visual encoder The image is divided into P×P pixel blocks to obtain a Patch sequence Where, N = (H0 / P) × (W0 / P); S22, call the unified semantic feature v for each image block * , after projection, we get the category probability distribution p=softmax(W c v * ), and calculate the normalized semantic entropy: Among them, W c is the weight matrix for category prediction, p j is the predicted probability of the jth class, and C is the number of classification categories; S23. Dynamically determine the masking ratio based on semantic entropy: Among them, σ is the Sigmoid function, α and τ are hyperparameters; S24, according to the shielding ratio p mask Randomly sample from the Patch sequence to form a set will be collected The inner patch is masked, and then the token vectors of the unsampled patches are randomly permuted to obtain a disordered sequence Among them, P perm is a random permutation matrix, h vis is the token sequence of the unmasked patch; S25, will Input the visual encoder to get the representation H enc , after global branch prediction And minimize the global branch loss function For each shaded position, the local branch predict And minimize the local branch loss function Among them, CLS is the neural network feature summary vector, t mask Token representation of the masked position. is the local reconstruction feature of the i-th position, is the true feature of the i-th position; S26. Through comprehensive loss function Jointly optimize the visual encoder; where λ g is the weight coefficient of the global loss, λ l is the weight coefficient of local loss.

5. The method for detecting endometrial cancer cells according to claim 4, wherein: The S3 specifically includes: S31, obtain the center coordinate c of each cell nucleus node through the optimized visual encoder. i =(x i ,y i ), i=1...N c , and extract the initial feature vector of the cell The graph node v i Defined as (c i ,f i (0) ), forming a node set Among them, r i is the morphological radius of the i-th cell nucleus, μ i is the average chromaticity of the ith cell nucleus, s i is the category logits of the i-th cell nucleus, e i is the visual embedding vector of the i-th cell nucleus, c i =(x i ,y i ) is the center coordinate of the i-th cell nucleus, d0 is the initial feature dimension, N c is the total number of cell nodes; S32. Perform Delaunay triangulation on the center coordinates of all cell nucleus nodes to obtain the initial candidate adjacency set E raw , cut off the edge length exceeding the maximum connection distance threshold r max edge, and obtain the candidate adjacency set E={(i,j)|||c i -c j ||≤r max }; where ||c i -c j || is the Euclidean distance between the i-th and j-th nodes; S33. Calculate the geometric weight of each edge (i, j)∈E and morphological weights Multiply the geometric weight and the morphological weight to get the comprehensive weight a ij , construct a sparse weighted adjacency matrix A = [a ij ]; S34. Output a cell graph G = (V, E, A) including a node set V, a candidate adjacency set E, and a weighted adjacency matrix A.

6. The method for detecting endometrial cancer cells according to claim 5, wherein: The S4 specifically includes: S41, Patch sequence Perform ROI feature extraction: Among them, f roi is the ROI feature vector, F img is the image feature map, bbox is the coordinates of the region of interest; S42. Update the cell graph G = (V, E, A) using a two-layer GraphSAGE network: in, is the node feature of the l-th layer GNN, W (l) is the l-th layer GNN parameter, is the set of neighbor nodes of node i, σ is the activation function; S43. Perform graph-level pooling to obtain cell graph features: Among them, g tile is the graph-level pooling feature vector, f i 2 is the final layer feature of the node; S44. Use ROI features as query: Q = W q f roi , Cell map features g tile And the unified semantic feature u are linearly mapped into key-value pairs: Among them, W q is the query projection weight, W g and W g ′ is g tile The weight of linear mapping to K / V space, W u and W u ′ is the weight for linearly mapping the semantic feature vector u to the K / V space, and d is the dimension of the attention latent space; S45. Calculate attention weight Obtain attention fusion features based on attention weights S46, calculate the dynamic gating coefficient γ=σ(W c [f roi ‖z tri ]), W c ∈R 1×2d , and fuse to obtain unified ROI features S47, construct a detection model, whose detection head includes a classification head, a bounding box regression head and a mask head, wherein the classification head is expressed by the following formula: p = softmax(W cls f * +b cls ), The bounding box regression head is expressed as follows: bbox =W reg f * +b reg , The mask head is expressed by the following formula: M = Conv 1×1 ○Deconv (4) (f * ); The comprehensive training loss function of the detection model is expressed as follows: Among them, the cross-modal consistency loss function Propose network loss for the region, is the ROI level category classification loss, is the ROI level border regression loss, is the ROI level segmentation mask loss, λ box is the bounding box regression loss weight, λ mask is the mask loss weight, λ align is the consistency loss weight, m ​​represents the hinge loss margin, d(·,·) represents the distance metric between features, and W cls represents the classification head weight, b cls represents the classification head bias, W reg represents the bounding box regression weight, b reg Represents the bounding box regression bias, Deconv (4) Represents the deconvolution layer with upsampling 4×, Conv 1×1 Indicates that 1×1 convolution generates the mask channel.

7. The method for detecting endometrial cancer cells according to claim 6, wherein: The S5 specifically includes: S51. Calculate the probability of each ROI being judged as cancerous using the detection model: p i =Softmax(W cls ·f roi +b cls ),i=1,2,...,N; Among them, W cls and b cls The weights and biases of the classification head, f roi is the feature extracted from the image features by ROIAlign; S52, according to the probability p output by the model i , select the area that meets the following probability range as the area A with high probability of cancer: The region that meets the following probability range is selected as the region B with high probability of cancer: B = {ROI j |p j ≤τ low , p i ∈[0,1]}; and form a preference pair (A, B) through the high probability area A and the low probability area B; S53. For a pair of preference pairs (A, B), the reward model is trained by constructing a regional contrast loss function, where the contrast loss function is expressed as: σ is the Sigmoid function, r(A) and r(B) are the output scores of the reward model for A and B respectively; S54. Minimize contrast loss function Update the model parameters of the reward model through backpropagation; S55. Fine-tune the reward model by constructing a reinforcement learning loss function. The PPO loss function is expressed as: ρ t is the ratio of the current strategy to the old strategy, A t is the advantage estimate and ∈ is the smoothing factor.

8. The method for detecting endometrial cancer cells according to claim 7, wherein: The two image perspectives are selected from data enhancement types and / or geometric transformation types. The data enhancement types are divided into five types: geometric transformation, intensity transformation, affine and nonlinear transformation, noise injection and filtering. Geometric transformation includes rotation, scaling, flipping, and cropping. Intensity transformation includes brightness, contrast, saturation and hue. Noise injection is adding random noise. Affine and nonlinear transformation includes simulating organ deformation and different forms of lesions. Filtering includes blurring filters and sharpening filters.

9. The method for detecting endometrial cancer cells according to claim 8, wherein: The method further comprises: The large image block is divided into small image blocks of different sizes at multiple scales to obtain the corresponding multi-scale image block Patch sequence; Generating multi-scale visual features for the multi-scale image block sequence through a visual neural network; Clustering the cell graph nodes according to the size of the cell nucleus, and constructing cell subgraphs of multiple scales respectively; Perform feature fusion between multi-scale visual features and corresponding scale cell sub-graph features to generate multi-scale fusion features; The multi-scale fusion features are fused from top to bottom in a feature pyramid to form a unified multi-scale pyramid feature representation, which is used as the input feature of the detection model.

10. A system for detecting endometrial cancer cells, characterized in that: The system comprises: The preprocessing module is used to pair large image blocks with pathology report text, and obtain visual encoders, text encoders and unified semantic features by training a multi-positive sample contrast loss function; The masking module is used to split large image blocks into small blocks, dynamically adjust the masking ratio based on semantic entropy, perform masking processing according to the masking ratio, and optimize it by training the visual encoder with a comprehensive loss function; The construction module is used to locate the center of the cell nucleus using the optimized visual encoder, and then construct a cell graph with cells as nodes and neighboring relationships as edges; A processing module for constructing a detection model based on unified semantic features, image features, and cell map features; The detection module is used to obtain areas with high cancer probability and areas with low cancer probability based on the current prediction results of the detection model and form preference pairs. It then constructs a regional contrast loss function based on the preferences to train the reward model, and then adjusts the detection model through reinforcement learning.

Citation Information

Patent Citations

  • Lung cancer cell morphological analysis and identification method and computer readable storage medium

    CN117496276A

  • Multi-task semantic communication system resource allocation method based on deep reinforcement learning

    CN119342608A

  • Pathological image cell classification method based on visual language large model and prompt learning

    CN119478937A

  • Text image matching method and system based on large language model entropy increase

    CN119646528A

  • Single stream multi-level alignment for vision-language pretraining

    US20230281963A1

Cited By

  • Prediction model and device for large B-cell lymphoma gene rearrangement

    CN121121241A

  • Post-plastic-surgery infection early warning method and system based on multi-modal data fusion

    CN121237414A