Cell segmentation and adaptive cascade inference method and system based on prior box guidance

CN122265210APending Publication Date: 2026-06-23NANYANG NORMAL UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANYANG NORMAL UNIV
Filing Date
2026-03-24
Publication Date
2026-06-23

Smart Images

  • Figure CN122265210A_ABST
    Figure CN122265210A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of cell image analysis and medical artificial intelligence, and discloses a cell segmentation and adaptive cascade reasoning method and system based on prior frame guidance. The method comprises: acquiring a multi-modal cell image with a detection frame; performing adaptive histogram equalization preprocessing on the image and executing global preliminary screening segmentation; calculating a multi-dimensional weighted score of the mask and the detection frame, if the score is lower than a first matching threshold, extracting a local image block to dynamically adjust a flow field threshold and an estimated diameter for cascade retry; if the score after retrying is lower than a second threshold, triggering a label consistency protection mechanism to discard or back up poor samples; finally, performing connected domain purification on the retained mask, and calculating a topological solidity, and performing convex hull reconstruction on the mask with low solidity. Through two-stage reasoning, double-track quality filtering and topological constraint, the present application effectively improves the segmentation effect of dense and irregular cells and improves the generalization performance of downstream analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of cell image analysis, medical image processing and artificial intelligence, and in particular to a cell segmentation and adaptive cascade reasoning method and system based on prior box guidance. Background Technology

[0002] Cells are the basic building blocks of living organisms. In recent years, with the continuous advancement of microscopic imaging technology and the development of high-throughput screening equipment, massive amounts of multimodal cell image data have been generated. Accurate cell segmentation and morphological analysis of these cell images play an important role in computational pathology, targeted drug development, and spatial multi-omics analysis.

[0003] Traditional cell image segmentation typically relies on manual annotation, requiring pathologists to manually delineate the pixel-level boundaries of each cell on a full-slide image. This labor-intensive task is not only time-consuming and labor-intensive, but also prone to introducing significant annotation errors due to annotator fatigue and subjective judgment differences. With the development of deep learning technology, automated medical image object detection (such as the YOLO series algorithms) and instance segmentation models (such as Cellpose, Mask R-CNN, etc.) are widely used.

[0004] However, existing mainstream technologies have certain limitations when processing complex medical images: First, while object detection models can quickly provide the bounding box of a cell, they cannot provide the pixel-level edge contour of the cell, making it difficult to support subsequent detailed quantitative analysis of topological morphology such as area and perimeter.

[0005] Secondly, existing global instance segmentation models are highly sensitive to preset hyperparameters when dealing with high-density, heavily adhered cell populations. For example, model performance is significantly affected when cell distribution is dense or image resolution is limited. Single static inference parameters often cannot simultaneously accommodate tiny apoptotic debris and large atypical cells within the field of view, easily leading to missed detections or excessive adhesion in local areas.

[0006] Furthermore, conventional segmentation systems often lack effective local self-evaluation and error correction mechanisms. When the model generates poor-quality masks containing holes or broken edges under complex imaging conditions, the system often fails to automatically repair them, leading to inaccuracies in downstream data analysis.

[0007] Therefore, there is an urgent need to provide a technical solution that can improve the segmentation quality of complex cell images by using easily obtainable detection boxes as prior guidance and through an adaptive parameter adjustment mechanism, while reducing the cost of manual pixel-level annotation. Summary of the Invention

[0008] The purpose of this invention is to address the problems of insufficient generalization of single models in dense regions, sensitivity to parameters, and high cost of manual annotation in existing technologies. This invention proposes a cell segmentation and adaptive cascaded inference method and system based on prior box guidance.

[0009] To achieve the above objectives, the present invention adopts the following technical solution: This invention provides a priori-guided cell segmentation and adaptive cascaded inference method, comprising the following steps: Acquire multimodal cell images with prior information of detection boxes; The cell image is preprocessed, and the preprocessed image is input into the adaptive inference engine to perform global initial screening and segmentation to obtain a global initial mask; Calculate the multidimensional weighted score of the global initial mask and the detection box; determine whether the multidimensional weighted score is lower than the preset first matching degree threshold; if so, extract local image patches based on the detection box, adjust the inference parameters according to the dynamic strategy, and trigger the cascade retry mechanism to generate an updated cell mask. A dual-track judgment mechanism is set up. If the score is still lower than the second matching degree threshold after cascading retries, the label consistency protection mechanism is triggered. Finally, the final preserved cell mask is subjected to geometric connected component purification and topological morphological analysis. When the physical morphology of the mask satisfies the set topological constraints, the geometric boundary is reconstructed, and the final cell pixel-level mask is output.

[0010] Preferably, the specific steps for preprocessing the cell image include: converting the input multimodal color image to the LAB color space and separating and extracting the luminance L channel; applying contrast-limited adaptive histogram equalization (CLAHE) to the L channel, wherein the contrast clipping limit parameter (ClipLimit) is set to 2.0.

[0011] Preferably, the adaptive inference engine employs a cell flow field prediction network based on the U-Net architecture, which reconstructs the cell instance mask by predicting the gradient space vector of pixels pointing to the cell center.

[0012] Preferably, the evaluation equation for calculating the multidimensional weighted score is: .

[0013] The fixed configurations of the weight parameter space are as follows: .

[0014] Preferably, in the step of adjusting inference parameters according to a dynamic strategy and triggering a cascaded retry mechanism: the first matching degree threshold is set to 0.5; when a cascaded retry is triggered, the maximum allowable flow field error threshold of the network is changed according to... The sequence is incremented sequentially for iterative retry, and the estimated diameter parameter is dynamically reduced according to the size of the detection box.

[0015] Preferably, in the label consistency protection mechanism, the second matching degree threshold is set to 0.10; the protection mechanism includes: when the final score is lower than the second matching degree threshold, actively discarding the mask sample corresponding to the detection box, or backtracking to generate an inscribed polygon that matches the detection box as a fallback mask.

[0016] Preferably, the specific operation of the geometric connected component purification is as follows: performing connected component analysis on the segmentation mask, and when there are two or more independent foreground regions, retaining only the main connected component with the largest area and removing isolated fragments; in the topological morphological analysis step, calculating the topological solidity discriminant of the mask. The threshold value is set to 0.65. When this occurs, a forced convex hull reconstruction is triggered.

[0017] Compared with the prior art, the beneficial effects of the present invention are mainly reflected in:

[0018] Effectively reduce data annotation costs: By using easily obtainable target detection boxes (such as YOLO output) as prior guidance for local mask generation, combined with AI-assisted inference methods, the annotation process can be significantly accelerated, greatly reducing the amount of manual work required for pixel-level outlining of the entire image.

[0019] Improved detection of long-tailed, difficult samples: A two-stage architecture of "global initial screening + local retry" and an adaptive cascaded retry mechanism are adopted to dynamically relax the network flow field threshold for regions with poor initial segmentation. This dynamic adaptive mechanism can effectively take into account both well-defined regular cells and long-tailed cell populations with blurred staining and irregular shapes.

[0020] To improve the purity and noise resistance of the dataset, a dual-track evaluation and label protection mechanism was introduced. Extremely low-quality samples caused by extreme lighting abnormalities or false positives in the detection box were actively discarded or polygons were backed up. Combined with connected component descrambling, this effectively prevented noisy labels from flowing into downstream analysis and significantly improved the overall quality of the dataset.

[0021] To improve the reliability of quantitative morphological analysis, a topological solidity constraint based on convex hull operation is introduced. Preservation of complete cell morphology is crucial for downstream quantitative biological research. This invention effectively repairs internal voids and edge breaks in the mask caused by uneven illumination or staining artifacts, outputting cell contours that more closely resemble natural physiological morphology. Attached Figure Description

[0022] Figure 1The overall flowchart of a priori-guided cell segmentation and adaptive cascaded reasoning method provided in an embodiment of the present invention; Figure 2 Example images of multimodal cell images and prior detection boxes are extracted, where (a) is the original multimodal cell image and (b) is a cell image with prior detection box information; Figure 3 This is the initial cell mask effect image generated after image differentiation preprocessing and global initial screening and segmentation in an embodiment of the present invention; Figure 4 This is the final fine-grained cell pixel-level segmentation mask effect generated after adaptive cascaded retry and topological morphological constraints in this embodiment of the invention. Figure 5 The method steps provided in the embodiments of the present invention are broken down into flowcharts (S1-S6). Detailed Implementation

[0023] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0024] Step 1: Multimodal Image Acquisition

[0025] First, the system acquires multimodal cell images with prior detection boxes. These prior detection boxes can be generated by target detection algorithms such as YOLO. Since raw RGB cell images captured under a microscope often have autofluorescence backgrounds and uneven illumination, directly inputting them into the segmentation network may introduce a lot of noise. Therefore, they need to be sent as raw input data to a preprocessing module for further enhancement.

[0026] Step 2: Image Differentiation Preprocessing and Global Initial Screening

[0027] The cell image obtained in step 1 is preprocessed to obtain a region-enhanced image. Specifically, the system converts the original image from the RGB color space to the LAB color space and extracts the luminance L channel separately to decouple color and luminance information. Subsequently, Contrast-Limited Adaptive Histogram Equalization (CLAHE) is applied to the L channel. In this embodiment, the contrast clipping limit parameter (ClipLimit) of CLAHE is set to 2.0. This restrained parameter setting can moderately improve the contrast of cell texture while effectively suppressing the excessive amplification of speckle noise in dark backgrounds, providing a clear image base for subsequent flow field calculations.

[0028] After preprocessing, this invention employs a two-stage segmentation architecture. First, the region-enhanced image is directly input into an adaptive inference engine to perform global initial screening and segmentation, obtaining a global initial mask for the entire image. In this embodiment, the adaptive inference engine uses a cell flow dynamics prediction model based on the U-Net architecture (such as the Cellpose network). This network reconstructs cell instances by predicting the gradient space vector (Flow) from pixels pointing to the cell center. Through global initial screening, the system can quickly segment most well-defined regular cells.

[0029] Step 3: Local evaluation and adaptive cascade retry

[0030] To accurately evaluate the fit between the generated global mask and the prior detection box, this invention constructs a multi-dimensional weighted scoring formula: ; in: (1) Spatial overlap is used to evaluate the intersection-union ratio (IoU) between the generated local mask and the prior detection box. Its calculation formula is: ; in, This represents the area of ​​the foreground pixel region covered by the cell mask generated by the model. This represents the area of ​​the rectangular pixel region enclosed by the corresponding prior detection box. This represents the spatial intersection area between the mask region and the detection box region, i.e., the overlapping part of the two. This represents the area of ​​the spatial union of the two. When the area of ​​the spatial union is 0, this is defined as... The value is 0.

[0031] (2) For consistency of form, the calculation formula is as follows: It is used to apply nonlinear penalties to oversegmentation or undersegmentation.

[0032] (3) This is the normalized centroid distance. The system calculates the absolute Euclidean distance between the geometric centroid of the non-zero pixels in the mask and the center of the detection box. And using the diagonal length of the detection box Normalize: This ensures fairness in cross-scale cell assessment.

[0033] This invention establishes a dual-track evaluation system. A first matching threshold (e.g., 0.5) is set. When the Score calculated in step 3 is lower than the first threshold, it indicates that the global initial screening effect is poor, and the system triggers a cascaded retry. At this time, the system adaptively expands the boundary according to the obtained detection box coordinates at a set ratio (e.g., expanding outward by 0.25 times the pixel distance) and extracts the local region of interest (ROI) image patch as input.

[0034] The inference engine abandons the globally static diameter estimation and uses the estimated diameter calculated from the current detection box. At the same time, the engine follows The flow error threshold is dynamically increased using a stepped step size. Relaxing the threshold essentially allows the network to accept locally cluttered gradient vectors, thereby effectively incorporating poorly stained or blurred cell populations into the mask. If relaxing the threshold still fails, the system shrinks the estimated diameter to 0.9. The flow field threshold was tightened to 0.3 in an attempt to isolate tiny, independent cells from extremely dense, adherent regions. After each local retry, the system recalculated the score and saved the mask with the highest score.

[0035] Step 4: Dual-track judgment and label consistency protection

[0036] Based on the first matching threshold, the system further sets a second matching threshold (e.g., 0.10). If, after all the above local cascading retries, the optimal score of the generated mask is still lower than the second matching threshold, it indicates that the signal in that area is extremely weak or is a false positive detection box, and the system will trigger the label consistency protection mechanism.

[0037] Users can configure two protection strategies according to their needs: one is to actively discard the extremely low-quality sample and its corresponding bounding box to ensure the high purity of the final dataset and avoid introducing noisy labels; the other is to fall back and use the inscribed polygon of the original bounding box as a fallback mask to ensure statistically high recall. Masks with scores higher than the second matching threshold will proceed to the next trimming stage.

[0038] Step 5: Geometric Refinement and Topological Morphological Constraints

[0039] Cell images are often affected by factors such as lighting artifacts, resulting in voids, broken edges, or abnormal connectivity (adhesion and debris) inside the generated mask due to dense distribution.

[0040] To address the aforementioned issues, this invention first performs a geometric purification operation (distance-guided correction): the segmentation mask is analyzed using an eight-adjacent connected component analysis. When there are two or more independent foreground regions, only the main connected component with the largest area is retained, and isolated cell fragments introduced by local retries are removed.

[0041] Then, topology repair is performed using the geometric properties of the convex hull. The system extracts the pixel set of the mask's connected components. And calculate the area of ​​its minimum circumscribed convex polygon envelope matrix. The topological solidity criterion is defined as follows:

[0042] In this embodiment, the judgment threshold is set to 0.65. When the system detects... When a non-physiological break occurs in the mask, a forced convex hull reconstruction unit is triggered. The rendering function then forcibly fills the polygonal region enclosed by the convex hull and sets it as the foreground. Setting it to 0.65 effectively repairs unnatural holes caused by artifacts while preserving natural physical depressions such as those produced when macrophages extend pseudopodia.

[0043] Step 6: Summarize and Output

[0044] Finally, the system merges all verified and refined cell masks, outputting a finely detailed pixel-level segmentation and annotation map file.

[0045] The above embodiments are preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A cell segmentation and adaptive cascade reasoning method based on prior box guidance, characterized in that, Includes the following steps: Acquire multimodal cell images with prior information of detection boxes; The cell image is preprocessed, and the preprocessed image is input into the adaptive inference engine to perform global initial screening and segmentation to obtain a global initial mask; Calculate the multidimensional weighted score of the global initial mask and the detection box; Determine whether the multidimensional weighted score is lower than a preset first matching degree threshold. If so, extract local image patches based on the detection box, adjust the inference parameters according to the dynamic strategy, and trigger the cascade retry mechanism to generate an updated cell mask. If, after the cascading retry mechanism, the final weighted score of the updated mask is still lower than the set second matching degree threshold, the label consistency protection mechanism is triggered. The final preserved cell mask is subjected to geometric connected component purification and topological morphological analysis. When the physical morphology of the mask satisfies the set topological constraints, the geometric boundary is reconstructed, and the final cell pixel-level mask is output.

2. The cell segmentation and adaptive cascaded reasoning method based on prior box guidance according to claim 1, characterized in that: The specific steps for preprocessing the cell images include: The input multimodal color image is converted to the LAB color space and the luminance L channel is extracted. Contrast-limited adaptive histogram equalization (CLAHE) is applied to the L channel, where the contrast clipping limit parameter is set to 2.

0.

3. The cell segmentation and adaptive cascaded reasoning method based on prior box guidance according to claim 1, characterized in that: The adaptive inference engine employs a cell flow field prediction network based on the U-Net architecture, which reconstructs cell instance masks by predicting the gradient space vectors of pixels pointing to the cell center.

4. The cell segmentation and adaptive cascaded reasoning method based on prior box guidance according to claim 1, characterized in that: The specific expression of the evaluation equation for the step of calculating the multidimensional weighted score is as follows: in, The intersection-union ratio (IoU) of the mask and the detection bounding box; This is the penalty ratio between the relative areas of the mask and the detection box; The weight parameter space is configured as follows: (1) The centroid geometric offset distance is based on the normalized diagonal of the detection box; (2) The weight parameter space is configured as follows: .

5. The cell segmentation and adaptive cascaded reasoning method based on prior box guidance according to claim 1, characterized in that: In the step of adjusting inference parameters according to a dynamic strategy and triggering a cascading retry mechanism: The first matching threshold is set to 0.5; when extracting local image blocks, the boundary of the detection box is adaptively expanded according to a set ratio; When a cascaded retry is triggered, the maximum permissible flow field error threshold of the flow field dynamics network is changed according to... The sequence is incremented sequentially for iterative retry, and the estimated diameter parameter is dynamically reduced according to the size of the detection box.

6. The cell segmentation and adaptive cascaded reasoning method based on prior box guidance according to claim 1, characterized in that: In the label consistency protection mechanism, the second matching degree threshold is set to 0.10; the protection mechanism includes: when the final score is lower than the second matching degree threshold, actively discarding the mask sample corresponding to the detection box, or backtracking to generate an inscribed polygon that matches the detection box as a fallback mask.

7. The cell segmentation and adaptive cascaded reasoning method based on prior box guidance according to claim 1, characterized in that: The step of performing topological morphological analysis on the final preserved cell mask further includes: Perform connected component analysis on the segmentation mask. When there are two or more independent foreground regions, only the main connected component with the largest area is retained, and isolated fragments are removed. Calculate the topological solidity discriminant of the mask. : in, This represents the total pixel area of ​​the currently connected regions of the mask. To determine the minimum convex hull area of ​​the connected components of the mask; set the solidity threshold to 0.65, when the solidity is determined... When the forced convex hull reconstruction unit is triggered, the mask region where structural breakage occurs is reconstructed into a convex cell-like morphology.

8. A priori-frame-guided cell segmentation and adaptive cascaded reasoning system, applied to the method described in any one of claims 1-7, characterized in that, include: Input module: Used to receive multimodal cell images with prior information of detection boxes as raw data; Preprocessing and global initial screening module: used to perform color space conversion and adaptive histogram equalization on the input image, and to perform global initial screening and segmentation on the enhanced image input inference engine to obtain the global initial mask; Local evaluation and retry module: used to calculate the multi-dimensional weighted score of the mask and the detection box. When the score is lower than the set first matching degree threshold, it adaptively expands the edge of the detection box to extract local image patches and dynamically adjusts the flow field error threshold and the estimated diameter to perform cascaded retry. Label consistency protection module: This module is used to trigger a protection mechanism when the final mask score is still lower than the set second matching degree threshold after cascading retries, actively discarding low-quality samples or backtracking to generate an inscribed fitting polygon. The geometric purification and topology shaping module is used to perform connected component purification on the final retained segmentation mask to remove isolated fragments, and to calculate the topological solidity of the mask. When the solidity is lower than a set threshold, a forced convex hull operation is performed to repair the shape. Visualization output module: Used to summarize the final cell pixel-level masks after verification and output a visual annotation map.