MMC chromosome fracture detection method and system based on deep learning
By employing an improved deep learning method for chromosome break detection, efficient and accurate break detection and scoring are achieved under complex noise conditions. This solves the problems of low efficiency in manual scoring and instability in automated methods in existing technologies, and provides interpretable intermediate outputs to improve the verifiability of the detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGKE YIHE INTELLIGENT MEDICAL TECHNOLOGY (GUANGXI) CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for detecting MMC-induced chromosome breakage suffer from high labor intensity, low efficiency, and high inconsistency in manual scoring. Furthermore, automated methods struggle to achieve accurate break correlation and scoring under complex noise conditions and lack interpretable intermediate outputs, resulting in insufficient detection accuracy and verifiability.
A deep learning-based MMC chromosome break detection method is adopted. Image preprocessing and instance segmentation are performed through an improved 24-class chromosome instance segmentation model. A deep learning three-class classification model is combined to remove pseudo-structures. A Siamese deep neural network is used to match break endpoints, generate break events and output scores. Global consistency constraints and interpretable evidence chains are introduced.
It improves the accuracy and stability of chromosome breakage detection, reduces false positives due to misassembly, allows for result verification for quality control, and enhances detection efficiency and result consistency.
Smart Images

Figure CN122023345A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chromosome breakage detection technology, specifically to a deep learning-based MMC chromosome breakage detection method and system. Background Technology
[0002] Mitomycin C (MMC)-induced chromosome breakage detection and scoring is a common method in cytogenetics, genetic toxicology, and DNA damage assessment, widely used in clinical screening, drug and chemical safety evaluation, environmental mutagenicity research, and cellular repair pathway function analysis. Typically, after MMC treatment, metaphase chromosome microscopic images are obtained. Professionals identify and statistically analyze breaks, fragments, and connection relationships to generate indicators such as cell-level breakage scores (e.g., breaks / cell). These indicators are closely related to the experimental batch, sample source, staining protocol, microscopic equipment parameters, and operator experience; therefore, high requirements are placed on accuracy, repeatability, and traceability in practice.
[0003] In existing technologies, the most common method is still manual image analysis and scoring. While manual methods can comprehensively judge complex backgrounds, overlapping and adhesion, and changes in fracture morphology based on experience, they have significant shortcomings: First, manual scoring is labor-intensive and time-consuming, especially in high-throughput samples or large-scale studies where efficiency requirements are difficult to meet; second, there are significant subjective differences between different operators, and the stability of the same operator at different times is also difficult to guarantee, leading to insufficient consistency of results; third, the manual process lacks structured intermediate evidence, making it difficult to verify and track the formation basis of each fracture event, resulting in high quality control costs.
[0004] To improve efficiency, some research and engineering systems have attempted to introduce automated image processing. Traditional methods typically extract candidate chromosome regions from images using techniques such as thresholding, edge detection, morphological processing, and skeleton extraction. These regions are then classified or counted based on manual features such as area, length, perimeter, aspect ratio, and grayscale distribution, or associated with fragments using distance rules or nearest neighbor strategies. However, MMC-induced samples exhibit complex chromosome breakage morphologies, a wide range of fragment sizes, and are often accompanied by noise interference such as staining granules, scratches, background debris, uneven staining, and defocusing. Traditional thresholding or edge methods are highly sensitive to imaging conditions, easily leading to problems such as missed fragment detection, false structure detection, and difficulty in separating adhered chromosomes. Especially in cases of dense fragmentation or overlapping chromosomes, relying solely on local geometric proximity or heuristic rules for fragment pairing can easily misassemble fragments from different sources into the same breakage event, resulting in increased false positives, inflated scores, or instability.
[0005] In recent years, deep learning has made progress in microscopic image segmentation and target recognition, but directly using segmentation results for chromosome breakage scoring still faces key challenges: On the one hand, it is necessary to accurately distinguish multiple chromosome instances within a single-cell field of view and simultaneously output reliable category information to assist in association; on the other hand, breakage events essentially involve "pairing and connection relationships between fragments," which is a structured association problem, and segmentation and classification alone cannot guarantee the global consistency of connection relationships; without endpoint-level unique connection constraints and nullable matching mechanisms, it is easy for one endpoint to connect to multiple endpoints simultaneously, or unreasonable connection links to be generated under noise interference, resulting in a lack of credibility in the generation of breakage events. At the same time, existing automated methods often lack interpretable intermediate outputs (such as endpoint positions, candidate connections and their confidence levels, matching constraint satisfaction, etc.), making it difficult to quickly verify the results and limiting their application in clinical quality control or high-requirement scientific research analysis. Therefore, there is an urgent need for an MMC chromosome breakage detection and scoring technology that can operate stably under complex noise and morphological change conditions, introduce global consistency constraints at the breakage association level, and output verifiable evidence chains. Summary of the Invention
[0006] To address the aforementioned problems in existing technologies, this invention proposes a deep learning-based method and system for detecting chromosome breakage in MMC (Multi-Cell Chromosome Containment). First, the single-cell field-of-view image is denoised using Gaussian filtering. The preprocessed image is then input into an improved 24-class chromosome instance segmentation model, which outputs instance masks and probabilities for classes 1-22, X, and Y. Instance ROIs are then classified using a deep learning three-class classification model to determine completeness / fragmentation / pseudo-structure and remove noise, resulting in a fragment set. The fragment masks are then skeletonized to extract the breakage endpoints. The fragment ROIs are input into a Siamese metric learning network to obtain embedding representations, and connection scores are calculated and fused with class consistency to obtain edge scores. Global matching is performed under the constraint of unique endpoint pairing and allowing empty matching to obtain the optimal association, generating breakage events and outputting scores. This method improves the accuracy of small fragment detection and association, reduces false positives, and allows for verification of results for quality control.
[0007] This application provides a deep learning-based method for detecting chromosome breakage in MMC, including the following steps: S1: Gaussian filtering is applied to a single-cell image to remove noise, resulting in a preprocessed image; S2: Input the preprocessed image into the trained improved 24-class chromosome instance segmentation model to obtain a set of chromosome instances; wherein each instance includes at least an instance mask and a corresponding chromosome class probability vector, and the chromosome classes include chromosomes 1-22 and X and Y chromosomes; S3: Construct an instance ROI for each instance in the chromosome instance set, and input the instance ROI into the trained deep learning three-class classification model to output the classification results of complete, fragmented or pseudo-structured instances. Remove pseudo-structured instances and retain fragmented instances to form a fragment set. S4: Perform skeletonization processing on the mask of each fragment instance in the fragment set to extract the coordinates of the two break endpoints; S5: Construct a fragment ROI for each fragment instance and input the fragment ROI into a trained Siamese deep neural network metric learning model to obtain a fragment embedding representation for characterizing fragment similarity; S6: Based on the spatial proximity of the fracture endpoints of fragment instances and the class consistency determined according to the chromosome class probability vector, a candidate association edge set is generated from the fragment set, and the connection score of the candidate association edge is calculated based on the fragment embedding representation. The connection score is then fused with the class consistency to obtain the fused edge score. S7: Under the constraint that each fracture endpoint is paired with at most one fracture endpoint and fracture endpoints are allowed to not be paired, the matching cost is determined by the fusion edge score and global matching is performed to obtain the optimal endpoint association set. S8: Generate a set of break events based on the optimal endpoint association set, and obtain a break score value based on the set of break events. The break score value is a score value obtained by mapping the number of break events.
[0008] Preferably, the trained improved 24-class chromosome instance segmentation model includes: a convolutional downsampling Stem, a backbone feature extraction network, a feature pyramid fusion network, and an instance prediction head; wherein the backbone feature extraction network is a window self-attention Transformer backbone, which outputs feature maps at least 4 scales; the feature pyramid fusion network is a bidirectional fusion structure, which includes both top-down and bottom-up paths to improve the ability to segment instances of chromosomes and fragments at different scales.
[0009] Preferably, the trained improved 24-class chromosome instance segmentation model further includes a small fragment enhancement branch, which preserves and enhances high-resolution shallow features, and injects fine-grained texture and boundary information of small target fragments into the instance prediction head through cross-scale fusion with the feature pyramid fusion network, thereby improving the recall rate of small fragment instances and reducing false negatives.
[0010] Preferably, the instance prediction head includes at least: a candidate instance generation branch, a mask branch, and 24 classification branches; wherein the mask branch adopts a dynamic convolution kernel generation mechanism or an instance query-driven mask prediction mechanism, and after the mask is output, the mask boundary is further refined by a point-level boundary refinement sub-network to reduce the mask adhesion error caused by chromosomes sticking together or the fragmentation of the break.
[0011] Preferably, the training loss of the trained improved 24-class chromosome instance segmentation model includes at least: (a) 24-class classification loss, which adopts class imbalance adaptive reweighting to improve the recognition of low-frequency classes and small fragments; (b) mask loss, which adopts a combination of Dice class loss and binary cross-entropy class loss; and (c) boundary consistency loss, which is based on mask boundary region or boundary point supervision to highlight the improved segmentation accuracy of the improved model at the break boundary.
[0012] Preferably, the trained deep learning tri-classification model is a mask-guided dual-stream network structure, including an image stream encoder and a mask stream encoder; wherein the image stream encoder extracts features from the instance ROI image, the mask stream encoder extracts features from the instance mask or its distance transformation map, and guides the structural prior of the mask stream to the image stream features through a cross-attention fusion module to distinguish between complete, fragmented, and pseudo-structures.
[0013] Preferably, the backbone of the trained deep learning tri-class classification model is a lightweight network, including a convolutional Stem, several residual blocks or lightweight Transformer encoding blocks, and a classification head; wherein a channel-space joint attention module is set inside the backbone to enhance the difference features between pseudo-structures and real fragments in terms of texture continuity, edge morphology, and density distribution, thereby reducing the probability of pseudo-structures mistakenly entering the fragment set; the enhanced pseudo-structures include colored particles, scratches, and background debris.
[0014] Preferably, the trained deep learning tri-class classification model is trained using multi-task training. In addition to outputting the tri-class classification result, it also outputs at least one auxiliary result, which is: boundary probability map, noise particle density score, or coloring unevenness score. The loss corresponding to the auxiliary result is jointly optimized with the tri-class classification loss to improve the separability of pseudo-structures and enhance the model's generalization ability.
[0015] Preferably, the trained twin deep neural network metric learning model includes a shared encoder and a projection head; wherein the shared encoder is a convolutional neural network or a lightweight Transformer network, and multi-scale dilated convolution or deformable convolution is introduced in at least one layer of the encoder to enhance robustness to changes in fracture morphology; the projection head is a multilayer perceptron and normalizes the output embedding vector to obtain the fragment embedding representation; the input of the twin deep neural network metric learning model, in addition to the fragment ROI image, also includes at least one structure guidance channel, which is: an instance mask channel, a skeleton channel, or an endpoint heatmap channel; and the chromosome category probability vector or its low-dimensional embedding is injected as conditional information into the shared encoder or projection head to achieve joint measurement of texture similarity, structural compatibility, and category prior.
[0016] This invention also provides a deep learning-based MMC chromosome breakage detection system, comprising: The preprocessing module performs Gaussian filtering on the single-cell image to remove noise, resulting in a preprocessed image. The instance segmentation module inputs the preprocessed image into the trained improved 24-class chromosome instance segmentation model to obtain a set of chromosome instances; wherein each instance includes at least an instance mask and a corresponding chromosome class probability vector, and the chromosome classes include chromosomes 1-22 and X and Y chromosomes; The fragment set generation module constructs an instance ROI for each instance in the chromosome instance set and inputs the instance ROI into a trained deep learning three-class classification model to output the classification results of complete, fragmented or pseudo-structured instances. Pseudo-structured instances are removed and fragmented instances are retained to form a fragment set. The fracture endpoint determination module performs skeletonization processing on the mask of each fragment instance in the fragment set to extract the coordinates of two fracture endpoints; The fragment embedding representation acquisition module constructs a fragment ROI for each fragment instance and inputs the fragment ROI into a trained Siamese deep neural network metric learning model to obtain a fragment embedding representation for representing fragment similarity. The edge score calculation module generates a candidate associated edge set from the fragment set based on the spatial proximity relationship of the fracture endpoints of the fragment instances and the category consistency determined according to the chromosome category probability vector, and calculates the connection score of the candidate associated edges based on the fragment embedding representation. The connection score is then fused with the category consistency to obtain the fused edge score. The optimal endpoint association set module determines the matching cost based on the fused edge score and performs global matching under the constraint that each broken endpoint is paired with at most one broken endpoint and broken endpoints are allowed to not be paired. The scoring calculation module generates a set of fracture events based on the optimal endpoint association set, and obtains a fracture score based on the set of fracture events. The fracture score is a score obtained by mapping the number of fracture events.
[0017] This invention provides a deep learning-based method and system for detecting chromosome breakage in MMC (Multi-Chromosome Containment), which achieves the following beneficial technical effects: 1. This invention employs an improved 24-class chromosome instance segmentation model at the fracture detection front end, achieving fine-grained instance-level separation and prior classification output for multiple chromosomes within a single-cell field of view. This model acquires long-range dependencies through a window-based self-attention Transformer backbone, combines this with a bidirectional feature pyramid to achieve multi-scale fusion, and introduces a small fragment enhancement branch to retain shallow high-resolution texture and fracture boundary information. The instance prediction head uses dynamic convolution kernel / query-driven mask prediction combined with point-level boundary refinement, enabling adhered chromosomes, weakly boundaryed fragments, and blurred fracture regions to form more complete and accurate masks. Through joint optimization of class imbalance reweighting, mask loss, and boundary consistency loss, the accuracy of small fragment recall and instance separation is improved, and the output class probability vector is stabilized, providing reliable input for subsequent association scoring and global matching, thus reducing missed detections and the propagation of adhesion errors from the source.
[0018] 2. This invention introduces a deep learning three-class classification model after instance segmentation to distinguish between "complete / fragmented / pseudo-structures" of instance ROIs, significantly suppressing noisy structures from entering the association stage. This model employs a mask-guided dual-stream structure: the image stream extracts texture and grayscale features, while the mask stream extracts morphological and structural priors. Cross-attention fusion is used to enhance edge continuity, fracture morphology, and density distribution differences. Simultaneously, channel-spatial joint attention is set in the lightweight backbone to improve the ability to distinguish pseudo-structures such as stained particles, scratches, and background debris. Furthermore, multi-task training outputs boundary probability maps or noise density / staining unevenness scores, which are jointly optimized with the three-class classification loss, ensuring the model maintains high accuracy under different staining batches, focal length variations, and background fluctuations. This filtering mechanism reduces the number of falsely detected fragments, lowers the candidate edge size and subsequent matching computation burden, and significantly reduces false positives triggered by pseudo-structures.
[0019] 3. This invention models fracture correlation as a globally optimal matching problem under endpoint constraints: fracture endpoints are extracted by skeletonizing the fragment mask, and fragment embedding representations are obtained using a Siamese deep neural network metric learning model. Connection scores are formed based on embedding similarity and fused with category consistency calculated from the category probability vector to obtain a fused edge score. Global matching is performed under the constraint that "each endpoint is paired at most once and empty matching is allowed," avoiding multiple connections at one end and chain-like mismatches caused by local nearest neighbor rules. This strategy elevates fragment correlation from a purely geometric heuristic to a joint discrimination based on "texture / fracture morphology + structural compatibility + category prior + spatial proximity," and controls mismatch propagation with global consistency constraints. A fracture event set is generated from the optimal endpoint correlation set, and a score is output. The result has an interpretable chain of evidence (endpoints, candidate edges, matching relationships), facilitating review and quality control, thereby improving fracture detection accuracy, scoring stability, and cross-sample generalization ability. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of a deep learning-based MMC chromosome breakage detection method according to the present invention. Figure 2 This is a schematic diagram of the structure of a deep learning-based MMC chromosome breakage detection system according to the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Example 1:
[0024] In view of the aforementioned problems mentioned in the prior art, and in order to solve the above technical problems, as shown in the appendix. Figure 1-2 As shown: A deep learning-based method for detecting chromosome breakage in MMC, including the following steps: S1: Gaussian filtering is applied to the single-cell image to remove noise, resulting in a preprocessed image; In some embodiments, the single-cell metaphase chromosome microscopic image applied after MMC processing can be a grayscale image or an RGB color image. Gaussian filtering is used to suppress random noise and fine particle noise, providing stable input for subsequent instance segmentation, tri-classification, and endpoint extraction while preserving chromosome edge and break details as much as possible. Input image: Single-cell field-of-view image, resolution can be 1024×1024, 2048×2048, or other. Output image: Preprocessed denoised image, output format can be floating-point image (normalized to 0 to 1) or 8-bit image (0 to 255). Image channel processing: If the input is a grayscale image, proceed directly to the next step. If the input is an RGB color image, use one of the following methods: Method A: Convert the RGB image to grayscale and then filter; Method B: Perform Gaussian filtering with the same parameters on the R, G, and B channels respectively, and then synthesize the filtered images into an RGB output. Method A is usually preferred due to its faster computation and higher stability. Intensity normalization linearly stretches image pixels to ensure the entire image falls within a uniform intensity range, such as normalizing to 0 to 1. This step reduces the impact of exposure differences between different microscopes or staining differences between batches on the filtering effect. If the subsequent model has already undergone uniform normalization at the input, this step can be combined with model input preprocessing. Parameter selection: Determine the filter intensity and kernel size. For Gaussian filtering, it is recommended to select parameters based on "resolution and noise intensity," with the following directly applicable rules: For general noise (most samples): standard deviation 1.2, kernel size 9×9; For high noise or obvious background particles: standard deviation 1.6, kernel size 11×11; For many small fragments and high requirements for edge detail (edge preservation): standard deviation 0.8, kernel size 7×7; When the resolution is higher than 2000 pixels, it is generally not recommended to exceed 2.0, to avoid excessive smoothing that can blunt the edges of small fragments and make the endpoints unclear. The above parameters can be used as default configurations and can be fine-tuned during deployment according to laboratory equipment and sample quality. Gaussian filtering denoising is performed on the image using the selected kernel size and standard deviation. For boundary handling, "mirror fill" is recommended to reduce artifacts at image edges; if the project library does not support mirror fill, "copy fill" can be used instead. For output and format conversion, if the subsequent model is input in floating-point format, the filtered, normalized image is directly output as the preprocessed image. If the subsequent model is input in 8-bit image format, the filtered result is converted to an 8-bit image in the range of 0 to 255 for output. A truncation is performed before output to prevent numerical overflow or extreme values from affecting subsequent models.
[0025] Example 1 (1024×1024, medium noise, default configuration): Input is a grayscale image or a pre-converted grayscale image; normalized to 0 to 1; standard deviation 1.2, kernel size 9×9; mirror fill; output is a floating-point preprocessed image for instance segmentation model use. Example 2 (2048×2048, high noise, denoising emphasized): Input is a grayscale image or RGB three-channel processed separately; standard deviation 1.6, kernel size 11×11; mirror fill; output is an 8-bit preprocessed image or a floating-point image for subsequent segmentation and three-class classification model inference. Example 3 (small fragments, critical break details, edge preservation emphasized): Input is first converted to grayscale and normalized; standard deviation 0.8, kernel size 7×7; mirror fill; output can use "lightweight detail-preserving fusion": the filtered result is mixed proportionally with the original normalized image to enhance the clarity of the break and small fragment edges; the mixing ratio can be 20% to 50% of the original image; the final preprocessed image is obtained for subsequent instance segmentation and endpoint extraction.
[0026] After applying the Gaussian filtering denoising method described above, random noise and fine particle noise in the image are effectively suppressed, and the grayscale of the main chromosome region is smoother and more stable, which can reduce the false detection of noise points by the instance segmentation model. At the same time, by controlling the upper limit of the filtering intensity and configuring the edge preservation parameters, excessive smoothing of the fracture edge and small fragment details can be avoided, making the skeleton endpoint extraction and subsequent fragment association scoring more stable, thereby improving the accuracy and scoring consistency of fracture event detection.
[0027] S2: Input the preprocessed image into the trained improved 24-class chromosome instance segmentation model to obtain a set of chromosome instances; wherein each instance includes at least an instance mask and a corresponding chromosome class probability vector, and the chromosome classes include chromosomes 1-22 and X and Y chromosomes; In some embodiments, a chromosome instance set is obtained based on an improved 24-class chromosome instance segmentation model. The input, output, and target are: the preprocessed single-cell field-of-view image output from step S1. The image can be grayscale or RGB; grayscale input is preferred in engineering, but if necessary, it can be copied to a three-channel format to adapt to a general network input. The output is a chromosome instance set, where each instance contains at least: an instance mask (a binary mask of the same size as the original image or a thresholded binary mask of a probability mask); a chromosome class probability vector (length 24, corresponding to 1-22, X, Y); and optionally, statistical measures such as instance bounding box, instance confidence score, and instance area / length, for use in subsequent steps S3, S4, and S5. The target is to achieve "multi-chromosome instance-level segmentation + 24-class classification" within a single-cell field of view, maintaining high recall and boundary accuracy, especially in cases of adhering, overlapping, blurred breaks, and small fragments, providing a reliable foundation for subsequent break endpoint extraction and fragment association.
[0028] In some embodiments, the overall structure and data flow of the improved 24-class chromosome instance segmentation model are as follows. The improved 24-class chromosome instance segmentation model is composed of the following modules connected sequentially (from input to output): Convolutional Downsampling Stem (input adaptation and shallow texture fidelity), the input end receives the preprocessed image and uniformly adjusts it to the network input size (for example, scaling the original image proportionally to a fixed value for the short side and filling blank areas to maintain the aspect ratio). The Stem structure uses several convolutional layers and normalization layers to perform shallow feature extraction and downsampling, and outputs a high-resolution shallow feature map. The Stem does not use excessive downsampling to avoid small fragments being "smash-up" in the early stages; at the same time, it preserves edges and band textures to provide information sources for subsequent small fragment enhancement branches. Window Self-Attention Transformer Backbone (Long-range dependency modeling, improving the separability of adjacency / overlap): The backbone network uses a window self-attention Transformer as the backbone, which is divided into multiple stages to progressively reduce the resolution and improve semantic abstraction ability; each stage outputs a feature map of one scale. Output scale: Output at least four scales of multi-layer feature maps (from high resolution to low resolution) for subsequent feature pyramid fusion. Compared to convolutional backbones only, window self-attention can model within a local window while achieving cross-regional information interaction through window shifting. It is more suitable for handling missegmentation problems caused by chromosome adhesion, overlap, and slender structures being spatially close to each other; it is also more sensitive to the long-range consistency of chromosome banding textures, which is beneficial for stabilizing classification and instance boundaries.
[0029] The Bi-directional Feature Pyramid Fusion Network (BiFPN) fusion structure simultaneously incorporates both top-down and bottom-up fusion paths, enabling bidirectional interaction between high-level semantic information and low-level detail information. Compared to unidirectional FPN, bi-directional fusion is more favorable for microscopic scenes characterized by "slender structures + small fragments + multiple scales": high-level semantics helps distinguish the main chromosome from background artifacts; low-level details help preserve break edges, fragment outlines, and fine structures; bi-directional iterative fusion can reduce the problems of "fragments being swallowed up by high-level semantics" or "low-level noise being mistaken for fragments".
[0030] The small fragment enhancement branch (high resolution preservation + fragment-sensitive injection) directly extracts high-resolution shallow features from the Stem or the first / second stage of the backbone. This branch performs fine-grained enhancement on the shallow features (e.g., using lightweight convolutional blocks and attention / gating mechanisms) and performs cross-scale fusion with the pyramid fusion network, injecting texture and boundary cues of small object fragments into the fused features before the instance prediction head. This branch specifically targets the characteristics of "small fragment area, low contrast, and weak edges" in MMC samples, avoiding information loss during the progressive downsampling of fragments in the backbone; it structurally improves small fragment recall and reduces false negatives, and does not rely on simple threshold expansion of candidate boxes, thus reducing noise-induced false positives. The instance prediction head (candidate generation + mask prediction + 24-class classification) contains at least three parallel branches: a candidate instance generation branch, which generates candidate instance locations and confidence scores on the fused feature map and outputs a candidate set (each candidate can correspond to a candidate box or candidate center / query vector). Candidate generation can use dense candidates (similar to anchor boxes / no anchor centers) or query candidates (a fixed number of query vectors).
[0031] Masking Branch (Dynamic Convolutional Kernel / Query-Driven Mask Prediction): Mask prediction methods are as follows: Method A: Dynamic Convolutional Kernel Generation Mechanism. A unique dynamic convolutional kernel is generated for each candidate instance, generating a mask for that instance on a shared feature map; Method B: Instance Query-Driven Mask Prediction Mechanism. Instance masks are generated through interaction between instance queries and fused features. Compared to fixed convolutional mask heads, the dynamic / query-driven approach is better suited for handling "long, curved, and complex boundary" chromosomal structures, especially providing a more coherent mask when the contour is incomplete near the break. 24-Class Classification Branch (Output Class Probability Vector): A 24-dimensional class probability vector is output for each candidate instance, with classes corresponding to 1-22, X, and Y. Instance confidence and class probability are also output for calculating a comprehensive score and suppressing unreliable instances in the post-processing stage.
[0032] The point-level boundary refinement subnetwork, based on the initial mask result, performs secondary discrimination and refinement on pixels near the mask boundary: first, it locates the mask boundary band (e.g., a region of a certain pixel width near the mask edge); then, it performs point-level classification or boundary offset correction on this region, outputting a more accurate boundary. Microscopic images commonly suffer from "adhesive masks" caused by adhesion, blurred breaks, and weak boundaries. Boundary refinement can significantly reduce the adhesion of adjacent chromosomes and the overflow of fragment boundaries, thereby reducing the probability of generating false endpoints during subsequent skeleton endpoint extraction.
[0033] The training implementation is as follows: The training data consists of annotations. Instance-level annotations are performed on the training images: each chromosome / fragment corresponds to an instance mask, and its category (1-22, X, Y) is labeled. Easily confused backgrounds (chromatin particles, scratches, debris) are not labeled as chromosome instances during the segmentation stage to reduce the risk of the model learning noise as "chromosomes." Noise removal is further processed by the S3 three-class classification model. The training strategy and loss design are as follows: the training loss includes at least the following three categories and is jointly optimized: 24-class classification loss: adaptive reweighting is used for class imbalance to ensure that low-frequency categories and small fragment samples are not ignored during training; Mask loss: a combination of region overlap loss and pixel-level classification loss is used to balance overall contours and local details; Boundary consistency loss: supervision is added to the mask boundary regions or boundary points to make the model pay more attention to broken boundaries and connected boundaries, highlighting the effect gain brought by boundary refinement. Geometric enhancement: rotation, flipping, slight scaling and translation to adapt to different viewing angles; Intensity enhancement: brightness / contrast perturbation, slight blur (simulating defocus), noise perturbation (simulating noise levels of different devices); Small fragment enhancement: increase the sampling probability of small instances, or crop a higher proportion of training patches from images containing small fragments.
[0034] The specific method for generating the "chromosome instance set" through inference and post-processing is as follows: The inference process inputs the preprocessed image into the model for forward inference, obtaining a candidate instance set, the mask prediction result for each candidate, and 24-class probability vectors. A comprehensive score is calculated based on the candidate confidence and class probability, and low-confidence candidates are eliminated. Deduplication is performed on the candidate instances: if bounding box candidates are used, NMS or Soft-NMS is employed for deduplication; if query candidates are used, Top-K instances are retained by score and mask overlap suppression is performed. Instance mask generation and binarization convert the probability masks output from the mask branches into binary masks based on a threshold. Morphological small hole filling and burr removal can be added to ensure mask coherence (note that only lightweight processing is performed to avoid changing the actual fracture morphology). The data structure of the output instance set is as follows: for each retained instance, a structured record is formed, including, for example,: instance ID; binary mask; 24-class probability vectors; predicted class (taking the class with the highest probability); instance bounding box / center point; instance confidence score. All instance records are combined into a chromosome instance set, which serves as the input for subsequent S3.
[0035] The improved 24-class instance segmentation structure achieves the following improvements: a window-based self-attention Transformer backbone provides long-range consistency modeling; bidirectional feature pyramid fusion enhances multi-scale semantics and detailed interactions; a small fragment enhancement branch ensures that small target fragment cues are not overwhelmed by downsampling; dynamic / query-driven mask prediction improves the adaptability to slender structures; and point-level boundary refinement and boundary consistency supervision significantly reduce mask boundary errors caused by adhesion, caking, and breakpoint blurring. The final stable output is a chromosome instance set consisting of an "instance mask + 24-class probability vectors," providing more reliable input for S3 three-class filtering, S4 endpoint extraction, and subsequent association matching, thus reducing the propagation of missed detections, adhesion, and false detections at the source.
[0036] S3: Construct an instance ROI for each instance in the chromosome instance set, and input the instance ROI into the trained deep learning three-class classification model to output the classification results of complete, fragmented or pseudo-structured instances. Remove pseudo-structured instances and retain fragmented instances to form a fragment set. In some embodiments, S3 is based on a deep learning three-class classification model for instance filtering and fragment set generation. The input, output, and target input are the chromosome instance set output from step S2. Each instance contains at least an instance mask, 24 class probability vectors, and may contain instance confidence, bounding box, or instance center point. The output fragment set consists of instances judged as "fragments"; each fragment retains at least a fragment mask, fragment ROI, class probability vector, and its confidence; optionally, a complete instance set (for statistics or visualization) and a pseudo-structure instance set (for quality control and training feedback) are output. The purpose is to remove pseudo-structures (chromatin granules, scratches, background debris, pseudo-blocks caused by uneven staining, etc.) that are "not real chromosome structures" before association, to prevent them from entering subsequent endpoint extraction and global matching and causing false positives, while separating real "fragments" from "complete chromosomes" for subsequent break association.
[0037] The instance ROI construction and ROI clipping rules (extracting local regions from the original image) are implemented as follows: For each instance, the instance ROI is clipped from the original image based on its mask or bounding box. The clipping rules can be implemented as follows: First, the minimum bounding rectangle of the instance mask is calculated as the initial ROI; then, the initial ROI is expanded outwards, with the expansion pixels ranging from 10% to 25% of the short side length of the instance or a fixed expansion of 16 to 48 pixels. The purpose of the expansion is to preserve the local background and adjacent structures around the instance, enabling the three-class classification model to distinguish between pseudo-structures and real fragments using information such as background texture, edge transition, and local density. If the expansion exceeds the image boundary, mirror padding or boundary copy padding is used to ensure the integrity of the ROI. ROI size normalization and channel construction are performed to facilitate batch inference and model stability. The instance ROI is scaled proportionally to a fixed input size, such as 224×224 or 256×256. If empty edges exist after scaling, zero padding or mean padding is used to fill them to the fixed size. To improve separability, a "mask-guided input" is constructed, and one of the following three methods is recommended: Method A: The input has three channels, namely "ROI grayscale image", "instance mask image", and "mask edge image"; Method B: The input has two channels, namely "ROI grayscale image" and "instance mask image"; Method C: The input has three channels, namely "ROI grayscale image", "mask distance transformation image", and "mask edge image". The mask edge image can be obtained by refining the mask boundary, and the mask distance transformation image reflects the distance information between the internal structure of the instance and the boundary, which helps to identify the "non-chromosome morphology" of pseudo-structures.
[0038] Normalization and enhancement: ROI intensity normalization is applied to reduce differences between different exposure / staining batches. Strong enhancement is not recommended during inference; only basic normalization consistent with training is sufficient. Three-class classification and fragment set generation: The constructed instance ROI is input into the trained deep learning three-class classification model, outputting probabilities for three categories: complete (representing nearly complete chromosome instances); fragments (representing fragmented instances resulting from breakage, requiring subsequent endpoint association); and pseudo-structures (representing noisy structures that should be removed). Decision rules and removal strategies: The "highest probability category" is used as the predicted category. A pseudo-structure confidence threshold is set; for example, pseudo-structures with a probability higher than 0.6 to 0.8 are directly removed. A minimum threshold can also be set for fragments; for example, fragments with a probability lower than 0.4 are temporarily excluded from the fragment set and placed in the "pending verification set." Complete categories can be retained for statistical or visualization purposes but are not included in the fragment set. The fragment set outputs fragment records for instances identified as fragments, including at least: fragment mask (original size or ROI inner mask); fragment ROI (normalized model input ROI, or original image cropped ROI); three-class classification results and fragment probabilities; 24 class probability vectors from S2 (for class consistency calculation in S5 / S6); and optional instance locations (bounding rectangle, center point) for subsequent endpoint proximity filtering.
[0039] This embodiment of the deep learning three-class classification model adopts a structure of "mask-guided dual-stream network + cross-attention fusion + channel-spatial joint attention + multi-task auxiliary head". This structure can achieve stable three-class classification filtering by leveraging mask priors to enhance morphological discrimination and utilizing image texture to determine chromosome banding continuity, even under complex microscopic noise and diverse pseudostructures. The overall structure of the three-class classification model includes: an image stream encoder, a mask stream encoder, a cross-attention fusion module; a backbone discriminator network (a lightweight backbone after fusion); a classification head (outputting the three-class classification probabilities of complete / fragmented / pseudostructure); and an optional multi-task auxiliary head (outputting a boundary probability map or noise density / chromosomal unevenness score). Image Stream Encoder (Texture and Band Feature Extraction): Input instance ROI grayscale or RGB image; structure: lightweight convolutional Stem followed by several residual blocks, or lightweight Transformer encoding blocks; output: image stream feature map, containing information such as texture continuity, grayscale transition, edge gradient, etc.; function: to identify the "band texture continuity" and "elongated structural features" of real chromosomes / fragments, as well as the "granular, blocky, and abrupt edge" features common in pseudo-structures. Mask Stream Encoder (Morphology and Structure Prior Extraction): Input instance mask image, mask edge image, or one or more of the mask distance transformation image; structure: lightweight convolutional encoder similar to image stream encoder, but with shallower layers; output: mask stream feature map, containing priors such as morphological contour, elongation, connectivity, and boundary complexity; function: to help distinguish between "elongated chromosome structures" and "noisy blocky structures," and to identify abnormal morphologies when the mask is unreliable.
[0040] The cross-attention fusion module takes image flow features and mask flow features as input. The mechanism uses mask flow features as a structural prior to guide the image flow features, making the model focus on the texture of the mask-covered area and structural differences near the boundary. The output is a fused feature map. Improvements compared to simple concatenation or addition include the ability to suppress background texture interference in noisy environments, enhance the consistency of chromosome texture and the differences in break edges within the mask area, thereby improving the accuracy of pseudo-structure removal and reducing the probability of falsely included fragment sets. The channel-spatial joint attention module can be inserted into the fused backbone discriminant network. Its function is to recalibrate the channels and enhance the spatial saliency of the fused features, making the model pay more attention to areas near break edges, elongated edge structures, and densely packed areas of pseudo-structures. The result is improved discrimination between fragments and pseudo-structures, especially showing better suppression of false detections caused by chromosome particle aggregation, scratch stripes, and background debris.
[0041] The classification head and multi-task auxiliary head are as follows: The classification head performs global pooling on the fused features followed by a fully connected layer, outputting the three-class classification probabilities. The multi-task auxiliary head has two tasks: Auxiliary Task 1: Outputs a boundary probability map to constrain the model's focus on edge continuity; Auxiliary Task 2: Outputs a noise particle density score or staining unevenness score to measure the imaging quality and noise level of the ROI. During training, the auxiliary task loss and the three-class classification loss are jointly optimized to give the model more stable generalization ability across different batches, focal lengths, and background noise levels.
[0042] To ensure the trainability and reproducibility of the three-class classification model, the following data was constructed and labeled for training samples: Complete samples: ROIs of complete chromosome instances manually labeled; Fragmented samples: ROIs of broken fragment instances manually labeled; Pseudo-structured samples: ROIs judged as noise by experts from segmentation candidates, including chromatin grains, scratches, background debris, and out-of-focus ghosting; Difficult example sampling: Focusing on collecting pseudo-structured samples that "look like fragments but are actually noise," as well as real fragmented samples that are "very small and have weak edges," to improve the model's ability to distinguish highly confusing samples. During training, class-balanced sampling or increasing the loss weight for pseudo-structured classes can be used to ensure high accuracy in pseudo-structure filtering.
[0043] Through the aforementioned three-classification structure of "mask-guided dual-stream + cross-attention fusion + joint attention + multi-task assistance", this step can still stably output three-classification results even under conditions of instance segmentation output errors, strong background noise, and diverse pseudo-structures. On the one hand, it significantly reduces mismatches and false positives caused by pseudo-structures entering the fragment set; on the other hand, it maintains high recall for real fragments, enabling subsequent endpoint extraction, Siamese metric learning association, and global matching to run on a cleaner and more reliable candidate set, thereby improving the accuracy and scoring consistency of fracture event detection and reducing the computational burden of the entire process.
[0044] S4: Skeletonize the mask of each fragment instance in the fragment set to extract the coordinates of the two fracture endpoints; this embodiment is used to process the mask of each fragment instance in the fragment set obtained in step S3 to extract the coordinates of the two fracture endpoints of the fragment. This embodiment focuses on solving the problem of unstable endpoints caused by burrs, holes, bifurcations, adhesions, and irregular boundaries in fragment masks in microscopic images, and ensures that the output endpoints can be used for subsequent candidate edge generation and global matching. Input a binary mask of a single fragment instance, the mask being the same size as the original image or in the fragment ROI coordinate system; the mask pixel values represent the foreground region of the fragment. Output the coordinates of the two fracture endpoints of the fragment, the endpoint coordinates can be the original image coordinates or the ROI local coordinates, and include optional endpoint confidence and endpoint local direction information (direction information is an optional extension and does not affect the endpoint coordinate output in this embodiment).
[0045] Step S4-1: Mask Pre-cleaning (Deburring, Hole Filling, Small Connected Component Removal). To avoid numerous pseudo-forks and pseudo-endpoints after skeletonization, a lightweight morphological preprocessing is performed on the fragment mask: Small connected component removal: If there are isolated small blocks in the mask with an area significantly smaller than the main fragment (e.g., area less than 1% of the main connected component area or less than a fixed threshold pixel), delete these small blocks. Hole Filling: Fill the small holes inside the mask. The hole threshold can be set to "hole area less than 2% of fragment area" or a fixed pixel threshold to avoid skeleton breakage. Deburring and Smoothing: Perform a lightweight opening / closing operation or boundary smoothing on the mask edges to remove spikes and jagged edges, preventing skeleton endpoint position drift. The intensity of the above processing should be kept "light," aiming to eliminate significant noise without changing the true fracture shape.
[0046] Step S4-2: Skeletonization. Skeletonization is performed on the cleaned fragment mask, refining the fragmented regions into a single-pixel-wide centerline skeleton. Classic thinning algorithms (such as iterative deletion of boundary pixels) can be used for skeletonization until the skeleton stabilizes.
[0047] Step S4-3: Skeleton Connectivity Refinement (Bifurcation and Short Branch Removal). Actual fragmented skeletons may exhibit forks or short branches due to residual burrs or boundary noise. To ensure stable extraction of the "two endpoints," the following refinement is performed: **Main Skeleton Connectivity Retention:** If the skeleton has multiple connected components, only the component with the most skeleton pixels is retained as the main skeleton. **Short Branch Removal:** Branches with significantly shorter lengths in the skeleton are pruned. For example, if a branch's length is less than 10% of the main skeleton's length or less than a fixed threshold pixel, that branch is deleted. **Broken Component Repair:** If the skeleton exhibits single-pixel breaks, a lightweight connection repair is performed to make the skeleton a simply connected structure, preventing false detection of multiple endpoints.
[0048] Step S4-4: Endpoint Candidate Detection. Detect endpoint candidate points on the refined skeleton. An endpoint candidate point is defined as a skeleton pixel in the skeleton graph whose surrounding neighborhood contains only one connected skeleton pixel. Collect all pixels that meet this condition into an endpoint candidate set.
[0049] Step S4-5: Endpoint Determination Strategy Due to noise, bifurcation, or branching, the number of endpoint candidates may not be 2. A stabilization strategy is needed to determine the final two endpoints: If the number of candidates is equal to 2: directly use the two points as the two break endpoints. If the number of candidates is greater than 2: use the "longest path endpoint strategy": treat skeleton pixels as graph structure nodes, establish connections between adjacent skeleton pixels; among all endpoint candidate pairs, find the pair with the longest skeleton path as the final two break endpoints; this strategy can effectively suppress false endpoints caused by bifurcation and short branches, ensuring that the output endpoints correspond to the two ends of the main axis direction. If the number of candidates is less than 2 (e.g., the skeleton is approximately circular or the skeleton is abnormal): use a backoff strategy to ensure output: Backoff Strategy A: calculate the two farthest points for the skeleton pixel set, and take the two farthest points as endpoints; Backoff Strategy B: calculate the two farthest points for the mask boundary point set as endpoints, and project them onto the skeleton to obtain the corresponding skeleton points; if two points still cannot be stably obtained, mark the fragment as "endpoint uncertain," enter the review list, or increase the empty matching penalty in subsequent matching to reduce the risk of mismatch.
[0050] Step S4-6: Coordinate Backmapping and Output. If the endpoints are obtained in the ROI coordinate system, the endpoint coordinates are mapped back to the original coordinate system by adding the top-left corner offset of the ROI. The coordinates of the two endpoints are output, and the endpoint confidence information can be output at the same time. For example, the endpoint confidence is related to indicators such as the proportion of main connected components in the skeleton, the proportion of short branches, and the number of candidate endpoints. The confidence is used for adjusting the empty matching penalty or providing a review prompt during subsequent global matching.
[0051] The default configuration (most samples) sets the small connected component removal threshold to a fixed pixel threshold or a percentage of the fragment area; the hole filling threshold is set to 2% of the fragment area for a hole area smaller than the fragment area; the short branch removal threshold is 10% of the main skeleton length; and the longest path endpoint strategy is prioritized for endpoint determination. For small fragment priority configurations (very small fragments with weak edges), the deburring intensity is reduced to avoid altering the true shape; the short branch removal threshold is increased to 15% of the main skeleton length to more strongly suppress false endpoints; when there are fewer than two candidates, the strategy of backing up to the two furthest points of the skeleton is prioritized. For configurations with high noise levels (many burrs at mask edges), deburring smoothing is enhanced; small connected components are removed before skeletonization; and a break repair is performed on the skeleton to reduce endpoint anomalies.
[0052] By employing an endpoint extraction process of "mask pre-cleaning—skeletonization—short branch pruning—longest path endpoint determination—anomaly backoff," this embodiment can stably output the coordinates of two fracture endpoints even when the mask contains burrs, holes, bifurcations, and weak boundaries; avoiding unstable endpoint numbers, endpoint drift, or false endpoint detection caused by noise or skeleton bifurcations. The extracted endpoints can serve as the spatial proximity basis for subsequent candidate associated edge generation and, in conjunction with the unique endpoint pairing constraint in global matching, reduce fragment mis-assembly and improve the stability of fracture event localization and scoring.
[0053] S5: Construct a fragment ROI for each fragment instance and input the fragment ROI into a trained Siamese deep neural network metric learning model to obtain a fragment embedding representation for characterizing fragment similarity; In some embodiments, S5 involves fragment ROI construction and Siamese metric learning embedding representation acquisition. Each fragment instance in the fragment set obtained in step S3 is input, including at least the instance mask, its position in the original image (bounding box or minimum bounding rectangle), and the 24 class probability vectors obtained in step S2. Simultaneously, the coordinates of the two fracture endpoints extracted in step S4 can be used as structural guidance information. The output is the fragment embedding representation vector (embedding vector) corresponding to each fragment, and an optional fragment confidence score. The aim is to map the texture, fracture morphology, structural contour, and class prior of fragments to a unified embedding space, making "pairable fragments from the same fracture chromosome" more similar in the embedding space, and "incompatible fragments / noisy fragments" farther apart in the embedding space, providing a robust basis for subsequent candidate association edge connection score calculation.
[0054] For each fragment instance, the minimum bounding rectangle is calculated based on its mask as the initial ROI, and expansion is performed to preserve contextual information: the expansion pixels can be "15% to 30% of the instance's short side length", or a fixed expansion of "24 to 64 pixels"; if the expanded ROI exceeds the image boundary, it is filled by mirroring or boundary copying; this expansion is used to preserve the grayscale transition and background texture near the break, enhancing the ability of metric learning to judge the compatibility of the break. ROI size unification and intensity normalization scale the ROI proportionally and fill it to a fixed input size, such as 128×128, 160×160, or 224×224; intensity normalization is performed on the ROI to reduce the brightness difference between different batches of images; if grayscale input is used during training, the grayscale input is kept consistent during inference; if three-channel input is used, grayscale can be copied to the three channels.
[0055] To improve the ability to measure the compatibility of fracture morphology with structure, this embodiment constructs at least one structural guidance channel in addition to the image channel, forming a multi-channel input. Any of the following methods can be used (preferably method A or B): Method A (Mask Channel): The fragment instance mask is cropped and scaled to the ROI size, serving as an independent channel input; Method B (Skeleton Channel): The fragment skeleton image is cropped and scaled to the ROI size, serving as the structural channel input; Method C (Endpoint Heatmap Channel): An endpoint heatmap is generated within the ROI centered on the two fracture endpoints, serving as the structural channel input; Method D (Boundary Channel): The boundary is extracted from the mask and a boundary map channel is generated to emphasize the changes in fracture edges. The input channels can be configured as: two channels: ROI grayscale image + mask channel; or three channels: ROI grayscale image + mask channel + skeleton channel; or three channels: ROI grayscale image + endpoint heatmap channel + mask boundary channel. Category prior injection utilizes the 24-class probability vectors output by S2 as prior information injected into the metric learning network. This can be achieved by: embedding the class probability vectors into low dimensions and concatenating them with the backbone output features before feeding them into the projection head; or by using the class embeddings as conditional vectors and modulating intermediate features through gating / attention. This strategy allows the model to differentiate between textures that are similar but have inconsistent classes, reducing cross-chromosome mismatches.
[0056] The twin metric learning model in this embodiment adopts a structure of "shared encoder + multi-scale morphological robust module + conditional prior injection + projection head normalization". The model consists of two identical branches with shared parameters. Each branch receives fragment ROI inputs from two fragments, which are used to learn similarity during the training phase. During the inference phase, each fragment is individually forward computed to obtain an embedding representation. The input of each branch in the input layer is a multi-channel fragment ROI, including at least a grayscale channel of the ROI, and may be supplemented with structural guidance channels such as masks / skeletons / endpoint heatmaps; the input size is fixed, for example, 160×160 or 224×224.
[0057] A shared encoder is used to extract texture, morphology, and fracture structure features. A lightweight Transformer encoder is employed: the Region of Interest (ROI) is divided into small blocks for embedding, and globally consistent features are extracted using lightweight self-attention blocks. To emphasize "fracture morphology robustness," at least one improved module is introduced into the shared encoder: a multi-scale dilated convolution module adds multi-scale dilated convolutions at mid-to-high-level features, capturing both the overall fragment morphology and local fracture details simultaneously with different receptive fields, making it more robust to changes in fragment size and fracture blurring. Alternatively, a deformable convolution module introduces deformable convolutions at at least one layer, allowing the sampling position to adapt to the morphology, improving the representation ability of curved, slender fragments and non-rigid fracture contours.
[0058] When the input includes structural channels such as masks, skeletons, and endpoint heatmaps, the structure-guided fusion module is incorporated into the encoder. First, shallow encoding is performed on both image channel features and structural channel features. Then, in the intermediate layer, gated fusion or attention fusion is used to apply structural priors to emphasize responses near the fracture points and along the skeleton's main axis. Finally, the fused main features are output. This module significantly improves the ability to discriminate the structural compatibility between fragments of the same broken chromosome, reducing mismatches caused by relying solely on texture.
[0059] The conditional prior injection module (category probability vector injection) embeds 24 category probability vectors into a low dimension to obtain conditional vectors. The conditional vector injection method can be concatenation with the encoder's global features or used to generate channel weights to modulate features. This conditional prior model tends to aggregate fragments with consistent categories in the metric space and actively separates fragments with conflicting categories. The projection head and normalized projection head adopt a multilayer perceptron structure, mapping the fused global features into fixed-dimensional embedding vectors. The embedding dimension can be 64, 128, or 256. After outputting the embedding vectors, normalization is performed to make similarity calculations more stable and more consistent with subsequent connection score mappings.
[0060] In the construction of training samples, positive sample pairs come from fragment pairs that are confirmed by experts to be related within the same cell and the same breakage event; negative sample pairs come from fragment pairs of different chromosome categories, those that are far apart, or those that are confirmed by experts to be unrelated, as well as difficult negative sample pairs that are mistakenly included due to pseudo-structures. Hard example mining prioritizes collecting fragment pairs with "similar textures but cannot be paired" as difficult negative samples to improve the model's discriminative power. The loss and optimization objective uses metric learning loss to make positive sample pairs closer in the embedding space and negative sample pairs farther apart; simultaneously, class consistency constraints can be added to make class-consistent fragments easier to aggregate in the embedding space; an intra-batch comparison strategy is used during training to improve sample utilization efficiency and stability.
[0061] In the inference output and connection score generation, each fragment only needs to pass through the single-branch encoder of the Siamese network once during the inference stage to obtain the embedding vector of the fragment; for two fragments in the candidate association edge, the embedding similarity between them is calculated and mapped to the connection score; the connection score is then fused with the category consistency to form the fused edge score, which provides the cost basis for global matching.
[0062] By employing a twin metric learning structure consisting of "multi-channel fragment ROI (image + structure guidance) + shared encoder (multi-scale dilated / deformable convolution to enhance fracture robustness) + category prior injection + projection head normalization," this embodiment can stably extract fragment embedding representations suitable for similarity measurement under conditions of large fragment size range, blurred fracture edges, unstable textures, and fluctuating background noise. This makes associative fragments closer in the embedding space and unassociative fragments more separated, thereby improving the reliability of subsequent candidate edge connection scores and reducing the probability of mis-splitting, and enhancing the accuracy and consistency of fracture event generation and scoring.
[0063] S6: Based on the spatial proximity of the fracture endpoints of fragment instances and the class consistency determined according to the chromosome class probability vector, a candidate association edge set is generated from the fragment set, and the connection score of the candidate association edge is calculated based on the fragment embedding representation. The connection score is then fused with the class consistency to obtain the fused edge score. In some embodiments, S6 generates a candidate association edge set and calculates the fused edge score. The input fragment set is the set of fragment instances obtained in step S3; each fragment instance contains a fragment mask, fragment ROI location, coordinates of the two break endpoints (from S4), and fragment embedding representation output by the Siamese metric learning model (from S5); each fragment also contains a probability vector of 24 chromosome categories from S2. The output candidate association edge set is a set of edges consisting of "endpoint-endpoint" candidate connections; each edge contains at least the starting endpoint, ending endpoint, fragment ID, and geometric distance information of the candidate edge; a fused edge score is output for each candidate edge, which is used for the global matching cost construction in the subsequent step S7.
[0064] The process involves generating candidate association edge sets (with endpoint spatial proximity constraints), constructing endpoint objects, and denoting each fragment instance in the fragment set as endpoint A and endpoint B, whereby the two break endpoints are denoted as endpoint A and endpoint B. All endpoints of the fragments are then aggregated into an endpoint set, and the following attributes are recorded for each endpoint: the fragment ID; endpoint coordinates (original image coordinates or coordinates in a unified coordinate system); the embedding representation vector of the corresponding fragment; the 24-class probability vector of the corresponding fragment; and an optional local endpoint orientation (optional if orientation estimation is implemented in S4).
[0065] To avoid excessive computation and the introduction of numerous impossible connections due to full endpoint connectivity, candidate endpoint pair filtering (spatial proximity) is implemented using spatial proximity rules. Two common methods are provided in the examples, which can be selected either one or a combination: Method A: Distance Threshold Filtering. An endpoint proximity threshold R is set, which can be a fixed or adaptive value: Fixed value example: R ranges from 30 to 120 pixels (related to imaging magnification and resolution); Adaptive value example: R ranges from 0.5 to 1.5 times the length of the shorter side of the fragment's bounding box, or from 0.3 to 1.0 times the length of the fragment's skeleton. For any two endpoints from different fragments, if their Euclidean distance is less than R, they are added to the candidate endpoint pair set. Two endpoints within the same fragment are not considered as candidate connections (to avoid fragment self-connections). Method B: K-Nearest Neighbor Filtering (Suitable for dense endpoint scenarios). For each endpoint, the K nearest endpoints are found based on spatial distance as candidate connection objects, where K can range from 3 to 10; endpoints from the same fragment are also excluded. A maximum distance limit can be used; neighbors exceeding the limit are not included in the candidates.
[0066] The candidate associated edges are organized as follows: candidate endpoint pairs are organized into a set of candidate associated edges. Each candidate edge includes: edge ID; start endpoint ID and end endpoint ID; fragment ID to which the two endpoints belong; distance between endpoints; and connection score, category consistency, and fusion edge score to be calculated later. It is recommended that the granularity of candidate associated edges be primarily "endpoint-to-endpoint," as subsequent global matching is constrained by unique endpoint pairings; if necessary, "fragment-to-fragment" relationships can also be recorded in the edge object for statistical purposes.
[0067] Category consistency calculation (based on 24-class probability vectors): For each fragment to which the two endpoints of a candidate edge belong, the probability vectors of its 24 chromosome classes are taken. The category consistency calculation method considers both "strong category certainty" and "association is still possible when the category is uncertain." This embodiment adopts one of the following rules: Rule 1: Probability similarity as consistency score. The similarity between the probability vectors of two fragments is calculated to obtain a category consistency score in the range of 0 to 1. The similarity can adopt a hybrid strategy of vector dot product, cosine similarity, or giving a high score when the Top-1 classes are consistent. In engineering, "weighted improvement if the Top-1 classes are the same" can be used to strengthen the consistency constraint. Rule 2: Top-1 consistency + threshold gating (stronger constraint). If the Top-1 predicted classes of the two fragments are the same and the probability of that class exceeds a preset threshold (e.g., 0.5 to 0.8), then the category consistency is high; otherwise, the category consistency is low or the candidate edge is directly eliminated. This rule is suitable for scenarios with reliable category discrimination and can significantly reduce cross-chromosome mismatches, but may sacrifice the recall of some uncertain samples. Category consistency is used for "pruning" to reduce impossible edges and improve efficiency. A lower consistency threshold can be set: if the category consistency is lower than the threshold (e.g., 0.2 to 0.4), the endpoint pair will not be added to the candidate associated edge set; or it will be retained but a large penalty will be imposed on the fused edge score (making it difficult to be selected in global matching).
[0068] Connection score calculation (based on fragment embedding representation): The connection score is input, and for each fragment to which the endpoints of a candidate edge belong, its fragment embedding representation vector is extracted. Similarity measurement and connection score generation: The similarity between two embedding vectors is calculated (e.g., cosine similarity or distance mapping); the similarity is converted into a connection score within the range of 0 to 1; to enhance stability, the connection score can be truncated or temperature-scaled to prevent extreme similarity or dissimilarity from causing numerical instability. The embedding representation comes from a Siamese metric learning model and has been constrained by positive and negative sample pairs during the training phase; therefore, the connection score can comprehensively reflect "texture similarity, structural compatibility, and fracture morphology consistency." A weak constraint of spatial distance is added: the connection score is mainly based on embedding similarity, but a weak constraint of "closer distance is better" can be added to reduce false connections at long distances: when the distance between endpoints is large, the connection score is reduced; the reduction strength can be relatively light to avoid over-reliance on distance leading to missed connections.
[0069] The calculation of edge scores (connection score + class consistency fusion) in this embodiment provides three fusion strategies, which can be selected according to data quality. Their common goal is to obtain higher scores for edges that simultaneously satisfy "embedding similarity" and "class consistency." Fusion Method A: Weighted Summation. The fused edge score is linearly fused from the connection score and class consistency according to weights. The weights can be set to be greater for the connection score than for class consistency, for example, 0.6 to 0.8 for the connection score and 0.2 to 0.4 for class consistency. This method is more favorable for samples with uncertain class probabilities. Fusion Method B: Product Fusion. The fused edge score is obtained by multiplying the connection score and class consistency. If class consistency is low, the fused score drops significantly, strongly suppressing cross-class mismatches. Suitable for scenarios where class prediction is relatively reliable. Fusion Method C: Gated Fusion (balancing recall and precision). When class consistency is higher than a threshold, the fused edge score is mainly determined by the connection score; when class consistency is lower than a threshold, the connection score is reduced or directly set to a lower value. This method can retain a small number of candidates in uncertain samples for unified global matching. For each candidate associated edge, output and save: connection score; category consistency score; fusion edge score; distance between endpoints and fragment ID. This information will be used in step S7 to construct the matching cost and perform global matching.
[0070] In some embodiments, Example 1: The default neighbor threshold R is set to 60 pixels; class consistency uses probabilistic vector similarity and sets a lower limit of 0.25 for pruning; the connection score is mapped from embedding cosine similarity to 0 to 1; the fusion method uses weighted summation, with a connection score weight of 0.7 and a class consistency weight of 0.3. Example 2: Dense endpoint configuration (to improve efficiency) uses K-nearest neighbor filtering, with K set to 5 and a maximum distance limit of 100 pixels; class consistency uses Top-1 consistency gating, and if Top-1 is inconsistent, no candidate edges are generated; the fusion method uses product fusion to strongly suppress mismatches. Example 3: Configuration of samples with uncertain class (to improve recall) The distance threshold R is set to "0.8 times the fragment skeleton length"; class consistency uses probabilistic similarity, without hard pruning, only reduction during fusion; the fusion method uses gated fusion, and when the class consistency is below 0.2, the connection score is reduced to 30% of the original.
[0071] By employing a candidate edge construction mechanism that combines "endpoint spatial proximity filtering + category consistency constraints + embedding similarity connection scores + fusion edge scores," this embodiment significantly reduces the number of invalid connections while ensuring candidate coverage, thereby decreasing the search space for global matching. Simultaneously, it utilizes category probability vectors to suppress cross-chromosomal false connections and leverages twin embedding similarity to enhance the ability to discriminate the morphology and structural compatibility of breakpoints. This makes it easier for subsequent global matching to obtain reasonable association results that satisfy the unique endpoint pairing constraint, reducing false positives and improving the stability of breakpoint event generation and scoring.
[0072] S7: Under the constraint that each fracture endpoint is paired with at most one other fracture endpoint, and fracture endpoints are allowed to not be paired, the matching cost is determined by the fusion edge score and global matching is performed to obtain the optimal endpoint association set; S7 solves the optimal endpoint association set based on constraint-based global matching, and inputs the candidate association edge set obtained in step S6. Each candidate edge contains: starting endpoint, target endpoint, fusion edge score, endpoint distance, etc. All endpoints constitute the endpoint set. Output the optimal endpoint association set, that is, several selected endpoint-endpoint pairing edges; each endpoint appears at most once in this set, and endpoints are allowed to not be paired. Matching problem modeling (unique endpoint pairing and empty matching) Endpoint set partitioning (for bipartite matching) Split all endpoint sets into two sets for constructing bipartite graph matching: left endpoint set: contains a copy of all endpoints; right endpoint set: contains another copy of all endpoints; the same real endpoint corresponds to a node on the left and right sides respectively. Any endpoint pair (endpoint i and endpoint j) in the candidate association edge set corresponds to a candidate connection edge "from left i to right j". This indicates that self-connections between endpoints within the same fragment have been excluded during candidate edge construction. Therefore, edges where "endpoint i connects to itself" are not generated, or are set to be unselectable. The constraint "endpoints are paired at most once" implements the selection of at most one matching edge originating from each left endpoint and at most one matching edge entering each right endpoint. This is equivalent to a "one-to-one matching constraint," which can be naturally satisfied by bipartite graph matching or network flow capacity constraints. The constraint "endpoints can be unpaired" (empty matching mechanism) introduces empty matching to allow certain endpoints to remain unpaired (e.g., isolated fragments or missing ends): an edge connecting to an "empty matching node" is added to each left endpoint; or an edge from an "empty matching node" is added to each right endpoint. An empty matching edge indicates that the endpoint is not paired with any real endpoint. An empty matching edge sets an "empty matching cost," which is used to control whether the system tends to "pair as much as possible" or "prefer not to pair to avoid mismatch."
[0073] The conversion from edge fusion score to matching cost (core): The higher the edge fusion score, the more likely it is to be a correct pairing; therefore, the matching cost should be lower. The implementation example uses the following practical strategy: mapping edge fusion scores to costs: high scores map to low costs, and low scores map to high costs. To prevent numerical instability, upper and lower limits are set for the costs, for example, limiting them to a fixed range (e.g., 0 to 1000). If a candidate edge is not in the candidate edge set, it is considered unselectable and not added to the graph.
[0074] Empty Match Cost Setting (Key Parameter) The empty match cost determines whether there will be too many "empty matches" or too many "forced matches". Three common setting methods are given: Method A: Fixed Empty Match Cost Set a fixed empty match cost, for example, the cost level corresponding to "medium confidence edge". Empirically, the empty match cost should be slightly lower than the cost of low-quality paired edges, so that the system is more inclined to empty match when the edge score is low, reducing mismatches. Method B: Endpoint Adaptive Empty Match Cost For each endpoint, count the fusion edge score of all its candidate edges; if the highest fusion edge score of the endpoint is still low, then set a lower empty match cost for the endpoint (encourage empty match); if the endpoint has a very high-scoring candidate edge, then set a higher empty match cost (encourage pairing). This method can significantly improve the stability under complex samples. Method C: Combined with Endpoint Confidence (Connecting with S4 Output) If the endpoint confidence of the S4 output is low (skeleton abnormality, endpoint instability), then reduce the empty match cost to avoid forced pairing with unreliable endpoints; when the endpoint confidence is high, increase the empty match cost to improve the pairing rate.
[0075] In some embodiments, the minimum cost matching (Hungarian algorithm) for bipartite graphs constructs a cost matrix: rows correspond to left endpoints; columns correspond to right endpoints and empty matching columns; candidate edges are filled into the matrix according to their cost values; non-candidate positions are filled with a maximum cost to indicate they are not selectable; empty matching columns are filled with empty matching costs. The minimum cost matching algorithm is used to solve the problem, minimizing the total cost; the matching results are output: if a left endpoint matches a right endpoint, an endpoint pairing is formed; if a match is found in an empty matching column, the endpoint is not paired. Symmetrical duplication is removed: because both left and right sides contain endpoint copies, the solution may result in duplicate descriptions of "i matches j" and "j matches i". In engineering, it can be specified that only one edge with "smaller endpoint ID pointing to larger one" is retained, or only unidirectional candidate edges are retained during the graph construction stage to avoid duplication. Applicable scenarios: the number of endpoints is small (e.g., tens to a couple hundred), and the implementation is simple and easy to deploy.
[0076] In some embodiments, the minimum cost flow solution constructs the network as follows: the source node is connected to each left endpoint node, and each edge has a capacity of 1; each left endpoint is connected to the corresponding candidate right endpoint edge, with a capacity of 1 and a cost equal to the candidate edge cost; each left endpoint is also connected to the "empty matching sink node" or the corresponding empty matching node, with a capacity of 1 and a cost equal to the empty matching cost; each right endpoint is connected to the sink node, with a capacity of 1; the minimum cost flow is solved to process as many endpoints as possible (including empty matches) and minimize the total cost; pairing relationships are output from candidate edges with a flow of 1; flow through empty matching edges indicates no pairing. This approach is suitable for scenarios where more constraints (such as different category capacity limits, grouping constraints, or adding directional consistency constraints) are desired for future expansion, and where the network flow is easily scalable.
[0077] Post-processing and the output of the optimal endpoint association set include mutual exclusion and validity checks. Each endpoint is checked to ensure it appears at most once. Interconnection of endpoints within the same fragment is checked (this usually does not occur if the graph has been excluded). If an abnormal pairing occurs (e.g., the distance significantly exceeds the threshold), it can be marked as low confidence and rolled back to an empty match or added to the set to be reviewed.
[0078] The confidence output provides a confidence score for each final paired edge. This score can be used directly, or it can be lightweightly integrated with endpoint confidence, distance, etc., for subsequent break event generation and visualization. Example A: Fixed Empty Matching Cost + Hungarian Algorithm. The candidate edge's fusion edge score is converted into a cost and limited to 0-1000. The empty matching cost is set to "the cost when the fusion edge score is at a moderate level." The Hungarian algorithm is used to find the minimum total cost match. The paired edges are output as the optimal endpoint association set. Example B: Adaptive Empty Matching Cost + Minimum Cost Flow. For each endpoint, the highest fusion edge score of its candidate edges is calculated. If the highest score is below a threshold, the empty matching cost is set to a lower value to encourage empty pairing; if the highest score is above the threshold, the empty matching cost is increased. The minimum cost flow is used to solve for the endpoint paired edges with a flow of 1.
[0079] By performing globally optimal matching under the constraints of "unique endpoint pairing and allowing empty matching," this embodiment avoids the common pitfalls of multiple connections at one end, chain-like mismatches, and local optima traps found in traditional nearest neighbor or locally greedy strategies. Simultaneously, by converting the fusion edge score into a matching cost and introducing an adjustable empty matching cost, the system achieves a controllable balance between "pairing rate" and "mismatch risk." With candidate edges supported by embedding similarity and category consistency, global matching can output a globally consistent and verifiable set of optimal endpoint associations, providing a stable and reliable structured basis for subsequent break event generation and scoring.
[0080] S8: Generate a set of break events based on the optimal endpoint association set, and obtain a break score value based on the set of break events. The break score value is a score value obtained by mapping the number of break events.
[0081] In some embodiments, S8 generates the fracture event set and calculates the fracture score, taking the optimal endpoint association set output in step S7 as input. This set consists of several endpoint pairings, each pairing containing at least: the IDs of the two paired endpoints, the fragment IDs to which the two endpoints belong, and the corresponding fusion edge score (or pairing confidence). Simultaneously, the mask, category probability vector, and ROI information of each fragment in the fragment set are accessible. The output fracture event set includes at least the set of participating fragment instances, the fracture endpoint pairing, the event confidence, and an optional event category; the fracture score is a score obtained by mapping the number of fracture events through pre-designed scoring rules (it can be equal to the number, or converted according to the rules).
[0082] The fragmentation event set is generated (aggregated from endpoint pairing relationships). A "fragment association graph" is constructed using fragment instances as nodes and endpoint pairing relationships to connect fragments, forming a fragment association graph: if endpoint e1 (belonging to fragment A) is paired with endpoint e2 (belonging to fragment B), an association edge is established between fragment A and fragment B; each association edge stores its paired endpoint information and fusion edge score; the same pair of fragments may form multiple edges due to different endpoint pairings, but due to the "unique endpoint pairing" constraint, each fragment usually forms at most 0 to 2 association edges with other fragments. The event candidate aggregation rule (connected component aggregation) performs connected component analysis on the fragment association graph, treating each connected component as a fragmentation event candidate: if a fragment has no association edges with any other fragment (both endpoints are empty matches), then the fragment does not constitute a fragmentation event and enters the "unpaired fragment set" for quality control; if several fragments are connected through association edges, then the connected component corresponds to a fragmentation event candidate, and the event includes all fragments and their association edges within that component.
[0083] Event Legality Check and Correction (Avoiding Abnormal Structures): Although S7 has applied endpoint uniqueness constraints, a reasonableness check is still performed at the event layer: Fragment Degree Check: If the number of edges associated with other fragments exceeds 2, it is considered abnormal (it may be mask adhesion or endpoint extraction abnormality). The event is marked as low confidence and enters the review process; Event Size Check: If an event contains too many fragments (e.g., more than 4 or exceeding a preset threshold), it usually indicates segmentation or endpoint abnormality. It can be split into multiple sub-events. The splitting method is to prioritize retaining the edges with the highest fusion edge scores, remove low-scoring edges, and recalculate the connected components; Category Consistency Check (Optional): The consistency of the 24-class probability vectors of fragments within the event is evaluated. If there is obvious cross-class conflict, the confidence of the event can be reduced or the lowest consistent fragment can be removed and the event reconstructed.
[0084] Fragmentation event attribute generation (providing structured information for scoring and visualization), event confidence calculation: For each fracture event, an event confidence score is generated for quality control or optional scoring weighting. Event confidence can be determined in one of the following ways: Method A: Take the average of the fused scores of all associated edges within the event; Method B: Take the minimum fused score of associated edges within the event; Method C: Take the weighted average of the fused scores of associated edges within the event, where the weight can be related to endpoint distance or endpoint confidence. Method A is commonly used in engineering for ease of understanding and implementation. Event category: If it is necessary to output the chromosome category corresponding to the fracture event, it can be determined in the following ways: Summarize the 24 probability vectors of each fragment within the event and take the category with the highest probability sum as the event category; or take the voting results of the Top-1 category of each fragment as the event category. This information can be used for subsequent statistical analysis of "fracture distribution of different chromosomes". Event geometry information (optional): Output the spatial location and range information of the event, such as: the bounding rectangle of the union of the event containing the fragment mask; the set of endpoint connections of the event (for overlay display); the coordinates of the endpoints involved in the event and their paired line segments.
[0085] The fracture score is calculated based on a baseline count of the number of events in the fracture event set, denoted as the event number N. This N is the most intuitive number of fracture events at the cellular level. An example of the mapping rule is that "the fracture score is a score obtained by mapping the number of fracture events." The mapping can adopt any of the following rules: Mapping Rule A: Identical mapping where the fracture score is directly equal to the number of fracture events N; suitable for laboratories that have adopted a scoring standard of "1 point per event." Mapping Rule B: Weighted mapping based on event complexity (better reflecting differences in the number of fragments): 1 point for events containing 2 fragments; 2 points for events containing 3 fragments; events containing more than 3 fragments are scored at the upper limit or enter a review process (e.g., a maximum of 2 points and marked for review). This rule is suitable for scenarios where "more complex fractures" are given higher scoring weights. Mapping Rule C: A reduction mapping based on event confidence (improving robustness) assigns 1 point to events with confidence levels above a threshold; 0.5 points or 1 point but marked as low confidence for events with confidence levels between the two thresholds; and events with confidence levels below the lower threshold are either not included in the calculation or are placed in the manual review queue. This rule is suitable for scenarios with high requirements for false positive control. Note that the three mapping rules can be included in the specification as different implementation methods, while the claims retain the term "mapping" to cover different scoring specifications.
[0086] For ease of verification, this embodiment can output visualization results: Each fragment mask boundary is overlaid on the original image; each endpoint pairing is connected by line segments, with the fusion edge score or event ID labeled at the connection point; each event is distinguished using different identifiers (e.g., different numbers or different line types); and quality control statistics are output: number of unpaired endpoints, number of unpaired fragments, number of low-confidence events, and event fragment distribution. The above output does not affect the scoring, but it significantly improves the interpretability and engineering usability of the results.
[0087] By converting the optimal endpoint association set into a fragment association graph and forming a set of break events using connected components, this embodiment can elevate endpoint-level pairing relationships to event-level structured results. Combined with event validity checks and low-confidence handling strategies, it reduces the impact of abnormal pairings on scoring results. During the scoring stage, the number of break events is mapped to break scores through pre-designed scoring rules, enabling the system to be compatible with the scoring specifications of different laboratories. At the same time, it provides visualization overlay and quality control statistics to support review and quality control, thereby improving the stability, traceability, and usability of cell-level break detection and scoring results.
[0088] Preferably, the trained improved 24-class chromosome instance segmentation model includes: a convolutional downsampling Stem, a backbone feature extraction network, a feature pyramid fusion network, and an instance prediction head; wherein the backbone feature extraction network is a window self-attention Transformer backbone, which outputs feature maps at least 4 scales; the feature pyramid fusion network is a bidirectional fusion structure, which includes both top-down and bottom-up paths to improve the ability to segment instances of chromosomes and fragments at different scales.
[0089] Preferably, the trained improved 24-class chromosome instance segmentation model further includes a small fragment enhancement branch, which preserves and enhances high-resolution shallow features, and injects fine-grained texture and boundary information of small target fragments into the instance prediction head through cross-scale fusion with the feature pyramid fusion network, thereby improving the recall rate of small fragment instances and reducing false negatives.
[0090] Preferably, the instance prediction head includes at least: a candidate instance generation branch, a mask branch, and 24 classification branches; wherein the mask branch adopts a dynamic convolution kernel generation mechanism or an instance query-driven mask prediction mechanism, and after the mask is output, the mask boundary is further refined by a point-level boundary refinement sub-network to reduce the mask adhesion error caused by chromosomes sticking together or the fragmentation of the break.
[0091] Preferably, the training loss of the trained improved 24-class chromosome instance segmentation model includes at least: (a) 24-class classification loss, which adopts class imbalance adaptive reweighting to improve the recognition of low-frequency classes and small fragments; (b) mask loss, which adopts a combination of Dice class loss and binary cross-entropy class loss; and (c) boundary consistency loss, which is based on mask boundary region or boundary point supervision to highlight the improved segmentation accuracy of the improved model at the break boundary.
[0092] Preferably, the trained deep learning tri-classification model is a mask-guided dual-stream network structure, including an image stream encoder and a mask stream encoder; wherein the image stream encoder extracts features from the instance ROI image, the mask stream encoder extracts features from the instance mask or its distance transformation map, and guides the structural prior of the mask stream to the image stream features through a cross-attention fusion module to distinguish between complete, fragmented, and pseudo-structures.
[0093] Preferably, the backbone of the trained deep learning tri-class classification model is a lightweight network, including a convolutional Stem, several residual blocks or lightweight Transformer encoding blocks, and a classification head; wherein a channel-space joint attention module is set inside the backbone to enhance the difference features between pseudo-structures and real fragments in terms of texture continuity, edge morphology, and density distribution, thereby reducing the probability of pseudo-structures mistakenly entering the fragment set; the enhanced pseudo-structures include colored particles, scratches, and background debris.
[0094] Preferably, the trained deep learning tri-class classification model is trained using multi-task training. In addition to outputting the tri-class classification result, it also outputs at least one auxiliary result, which is: boundary probability map, noise particle density score, or coloring unevenness score. The loss corresponding to the auxiliary result is jointly optimized with the tri-class classification loss to improve the separability of pseudo-structures and enhance the model's generalization ability.
[0095] Preferably, the trained twin deep neural network metric learning model includes a shared encoder and a projection head; wherein the shared encoder is a convolutional neural network or a lightweight Transformer network, and multi-scale dilated convolution or deformable convolution is introduced in at least one layer of the encoder to enhance robustness to changes in fracture morphology; the projection head is a multilayer perceptron and normalizes the output embedding vector to obtain the fragment embedding representation; the input of the twin deep neural network metric learning model, in addition to the fragment ROI image, also includes at least one structure guidance channel, which is: an instance mask channel, a skeleton channel, or an endpoint heatmap channel; and the chromosome category probability vector or its low-dimensional embedding is injected as conditional information into the shared encoder or projection head to achieve joint measurement of texture similarity, structural compatibility, and category prior.
[0096] This invention also provides a deep learning-based MMC chromosome breakage detection system, such as... Figure 2 The system hardware includes: an image acquisition unit and a microscopic imaging device: an inverted / upright biological microscope (including objectives, stage, and light source / filter assembly). An imaging sensor: a microscopic camera (CCD / CMOS) for acquiring single-cell field-of-view images. An acquisition controller: for controlling exposure, gain, frame rate, white balance, focal length, and motorized stage position. The computing processing unit includes at least: a CPU: for task scheduling, data preprocessing, post-processing, and global matching solutions. Hardware accelerators (at least one, optional combinations): a GPU (preferred): for deep learning model inference (instance segmentation, tri-class classification, twin embedding). Or an NPU / TPU / FPGA: for edge deployment or low-power accelerated inference. Main memory (RAM): for loading images, model parameters, intermediate features, and candidate edge data. Internal bus: such as PCIe / AXI, for high-speed data transfer between the CPU and GPU / NPU / storage.
[0097] Storage Unit Local Storage Media: SSD / HDD / Industrial Solid State Drive, used to store: trained model files (improved 24-class instance segmentation model, tri-class model, Siamese metric learning model); raw and preprocessed images; fracture event results, scoring results, logs, and visualization overlays; optional sample labels and quality control records. Database / File Server (Optional): For centralized management of multiple users or devices. Communication and Interface Unit Image Input Interface: USB 3.0 / GigE / CameraLink / HDMI (depending on camera type), for data transmission from camera to host. Network Interface: Ethernet / Wi-Fi, for interfacing with servers / cloud / hospital LIS systems or laboratory information systems. Peripheral Interface: USB / Serial Port / IO, for controlling the motorized stage, light source, barcode scanner, etc. Human-Machine Interaction and Output Unit Display: Used to display instance segmentation masks, endpoint pairing connections, fracture event numbers, scoring values, and quality control prompts. Input Devices: Keyboard, mouse, or touchscreen; optional foot switch for quick switching of views. Print / Report Output Device: Used to output inspection reports. Power supply and safety: Industrial power supplies and UPS uninterruptible power supplies are used to ensure stability and data security during long-term batch testing.
[0098] The hardware connectivity and data flow are integrated and locally deployed. The microscope camera connects to the computing unit via an image input interface (USB 3.0 / GigE, etc.). Inside the computing unit: the CPU connects to RAM and SSD via an internal bus; the GPU / NPU connects to the CPU / RAM via PCIe, etc., for accelerating model inference. The storage unit is directly connected to the computing unit and stores images, models, and results. A display / input device (HDMI / DP / USB) is connected to the computing unit for result display and manual review. Data flow: Camera acquires images → CPU completes S1 preprocessing and ROI cropping / skeletonization / matching solution → GPU / NPU executes S2 / S3 / S5 inference → CPU executes S6 candidate edge and fusion score, S7 global matching, S8 event generation and scoring → Results are stored / saved → Display, overlay visualization, and report export.
[0099] The preprocessing module performs Gaussian filtering on the single-cell image to remove noise, resulting in a preprocessed image. The instance segmentation module inputs the preprocessed image into the trained improved 24-class chromosome instance segmentation model to obtain a set of chromosome instances; wherein each instance includes at least an instance mask and a corresponding chromosome class probability vector, and the chromosome classes include chromosomes 1-22 and X and Y chromosomes; The fragment set generation module constructs an instance ROI for each instance in the chromosome instance set and inputs the instance ROI into a trained deep learning three-class classification model to output the classification results of complete, fragmented or pseudo-structured instances. Pseudo-structured instances are removed and fragmented instances are retained to form a fragment set. The fracture endpoint determination module performs skeletonization processing on the mask of each fragment instance in the fragment set to extract the coordinates of two fracture endpoints; The fragment embedding representation acquisition module constructs a fragment ROI for each fragment instance and inputs the fragment ROI into a trained Siamese deep neural network metric learning model to obtain a fragment embedding representation for representing fragment similarity. The edge score calculation module generates a candidate associated edge set from the fragment set based on the spatial proximity relationship of the fracture endpoints of the fragment instances and the category consistency determined according to the chromosome category probability vector, and calculates the connection score of the candidate associated edges based on the fragment embedding representation. The connection score is then fused with the category consistency to obtain the fused edge score. The optimal endpoint association set module determines the matching cost based on the fused edge score and performs global matching under the constraint that each broken endpoint is paired with at most one broken endpoint and broken endpoints are allowed to not be paired. The scoring calculation module generates a set of fracture events based on the optimal endpoint association set, and obtains a fracture score based on the set of fracture events. The fracture score is a score obtained by mapping the number of fracture events.
[0100] This invention provides a deep learning-based method and system for detecting chromosome breakage in MMC (Multi-Chromosome Containment), which achieves the following beneficial technical effects: 1. This invention employs an improved 24-class chromosome instance segmentation model at the fracture detection front end, achieving fine-grained instance-level separation and prior classification output for multiple chromosomes within a single-cell field of view. This model acquires long-range dependencies through a window-based self-attention Transformer backbone, combines this with a bidirectional feature pyramid to achieve multi-scale fusion, and introduces a small fragment enhancement branch to retain shallow high-resolution texture and fracture boundary information. The instance prediction head uses dynamic convolution kernel / query-driven mask prediction combined with point-level boundary refinement, enabling adhered chromosomes, weakly boundaryed fragments, and blurred fracture regions to form more complete and accurate masks. Through joint optimization of class imbalance reweighting, mask loss, and boundary consistency loss, the accuracy of small fragment recall and instance separation is improved, and the output class probability vector is stabilized, providing reliable input for subsequent association scoring and global matching, thus reducing missed detections and the propagation of adhesion errors from the source.
[0101] 2. This invention introduces a deep learning three-class classification model after instance segmentation to distinguish between "complete / fragmented / pseudo-structures" of instance ROIs, significantly suppressing noisy structures from entering the association stage. This model employs a mask-guided dual-stream structure: the image stream extracts texture and grayscale features, while the mask stream extracts morphological and structural priors. Cross-attention fusion is used to enhance edge continuity, fracture morphology, and density distribution differences. Simultaneously, channel-spatial joint attention is set in the lightweight backbone to improve the ability to distinguish pseudo-structures such as stained particles, scratches, and background debris. Furthermore, multi-task training outputs boundary probability maps or noise density / staining unevenness scores, which are jointly optimized with the three-class classification loss, ensuring the model maintains high accuracy under different staining batches, focal length variations, and background fluctuations. This filtering mechanism reduces the number of falsely detected fragments, lowers the candidate edge size and subsequent matching computation burden, and significantly reduces false positives triggered by pseudo-structures.
[0102] 3. This invention models fracture correlation as a globally optimal matching problem under endpoint constraints: fracture endpoints are extracted by skeletonizing the fragment mask, and fragment embedding representations are obtained using a Siamese deep neural network metric learning model. Connection scores are formed based on embedding similarity and fused with category consistency calculated from the category probability vector to obtain a fused edge score. Global matching is performed under the constraint that "each endpoint is paired at most once and empty matching is allowed," avoiding multiple connections at one end and chain-like mismatches caused by local nearest neighbor rules. This strategy elevates fragment correlation from a purely geometric heuristic to a joint discrimination based on "texture / fracture morphology + structural compatibility + category prior + spatial proximity," and controls mismatch propagation with global consistency constraints. A fracture event set is generated from the optimal endpoint correlation set, and a score is output. The result has an interpretable chain of evidence (endpoints, candidate edges, matching relationships), facilitating review and quality control, thereby improving fracture detection accuracy, scoring stability, and cross-sample generalization ability.
[0103] The above provides a detailed description of a deep learning-based MMC chromosome breakage detection method and system. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of this invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas and methods of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A deep learning-based method for detecting chromosome breakage in MMC (Multi-Chronic Chromosome) chromosomes, characterized in that, The steps include: S1: Perform Gaussian filtering on the single-cell image to remove noise, and obtain the preprocessed image; S2: Input the preprocessed image into the trained improved 24-class chromosome instance segmentation model to obtain a set of chromosome instances; wherein each instance includes at least an instance mask and a corresponding chromosome class probability vector, and the chromosome classes include chromosomes 1-22 and X and Y chromosomes; S3: Construct an instance ROI for each instance in the chromosome instance set, and input the instance ROI into the trained deep learning three-class classification model to output the classification results of complete, fragmented or pseudo-structured instances. Remove pseudo-structured instances and retain fragmented instances to form a fragment set. S4: Perform skeletonization processing on the mask of each fragment instance in the fragment set to extract the coordinates of the two break endpoints; S5: Construct a fragment ROI for each fragment instance and input the fragment ROI into a trained Siamese deep neural network metric learning model to obtain a fragment embedding representation for characterizing fragment similarity; S6: Based on the spatial proximity of the fracture endpoints of fragment instances and the class consistency determined according to the chromosome class probability vector, a candidate association edge set is generated from the fragment set, and the connection score of the candidate association edge is calculated based on the fragment embedding representation. The connection score is then fused with the class consistency to obtain the fused edge score. S7: Under the constraint that each fracture endpoint is paired with at most one fracture endpoint and fracture endpoints are allowed to not be paired, the matching cost is determined by the fusion edge score and global matching is performed to obtain the optimal endpoint association set. S8: Generate a set of break events based on the optimal endpoint association set, and obtain a break score value based on the set of break events. The break score value is a score value obtained by mapping the number of break events.
2. The deep learning-based MMC chromosome breakage detection method as described in claim 1, characterized in that, The trained improved 24-class chromosome instance segmentation model includes: convolutional downsampling Stem, backbone feature extraction network, feature pyramid fusion network, and instance prediction head; wherein the backbone feature extraction network is a window self-attention Transformer backbone, which outputs feature maps at least 4 scales; the feature pyramid fusion network is a bidirectional fusion structure, which includes both top-down and bottom-up paths to improve the ability to segment instances of chromosomes and fragments at different scales.
3. The deep learning-based MMC chromosome breakage detection method as described in claim 2, characterized in that, The trained improved 24-class chromosome instance segmentation model further includes a small fragment enhancement branch, which preserves and enhances high-resolution shallow features and injects fine-grained texture and boundary information of small target fragments into the instance prediction head through cross-scale fusion with the feature pyramid fusion network, thereby improving the recall rate of small fragment instances and reducing false negatives.
4. The deep learning-based MMC chromosome breakage detection method as described in claim 3, characterized in that, The instance prediction head includes at least: a candidate instance generation branch, a mask branch, and 24 classification branches; wherein the mask branch adopts a dynamic convolution kernel generation mechanism or an instance query-driven mask prediction mechanism, and after the mask is output, the mask boundary is further refined by a point-level boundary refinement sub-network to reduce the mask adhesion error caused by chromosomes sticking together or blurred breaks.
5. The deep learning-based MMC chromosome breakage detection method as described in claim 4, characterized in that, The training loss of the improved 24-class chromosome instance segmentation model includes at least the following: (a) 24-class classification loss, which adopts class imbalance adaptive reweighting to improve the recognition of low-frequency classes and small fragments; (b) mask loss, which adopts a combination of Dice class loss and binary cross-entropy class loss; and (c) boundary consistency loss, which is based on mask boundary region or boundary point supervision to highlight the improved segmentation accuracy of the improved model at the break boundary.
6. The deep learning-based MMC chromosome breakage detection method as described in claim 1, characterized in that, The trained deep learning tri-classification model is a mask-guided dual-stream network structure, including an image stream encoder and a mask stream encoder. The image stream encoder extracts features from the instance ROI image, and the mask stream encoder extracts features from the instance mask or its distance transformation map. The structural prior of the mask stream is guided to the image stream features through the cross-attention fusion module to distinguish between complete, fragmented, and pseudo-structures.
7. The deep learning-based MMC chromosome breakage detection method as described in claim 1, characterized in that, The backbone of the trained deep learning tri-class classification model is a lightweight network, which includes a convolutional STEM, several residual blocks or lightweight Transformer encoding blocks, and a classification head. A channel-space joint attention module is set inside the backbone to enhance the differences between pseudo-structures and real fragments in terms of texture continuity, edge morphology, and density distribution, thereby reducing the probability of pseudo-structures being mistakenly included in the fragment set. The enhanced pseudo-structures include stained particles, scratches, and background debris.
8. The deep learning-based MMC chromosome breakage detection method as described in claim 1, characterized in that, The trained deep learning tri-class classification model is trained using multi-task methods. In addition to outputting the tri-class classification result, it also outputs at least one auxiliary result, which is: boundary probability map, noise particle density score, or coloring unevenness score. The loss corresponding to the auxiliary result is jointly optimized with the tri-class classification loss to improve the separability of pseudo-structures and enhance the model's generalization ability.
9. The deep learning-based MMC chromosome breakage detection method as described in claim 1, characterized in that, The trained twin deep neural network metric learning model includes a shared encoder and a projection head; wherein the shared encoder is a convolutional neural network or a lightweight Transformer network, and multi-scale dilated convolution or deformable convolution is introduced in at least one layer of the encoder to enhance robustness to changes in fracture morphology; the projection head is a multilayer perceptron and normalizes the output embedding vector to obtain the fragment embedding representation; the input of the twin deep neural network metric learning model includes, in addition to the fragment ROI image, at least one structure guidance channel, which is: an instance mask channel, a skeleton channel, or an endpoint heatmap channel; and the chromosome category probability vector or its low-dimensional embedding is injected as conditional information into the shared encoder or projection head to achieve a joint measurement of texture similarity, structural compatibility, and category prior.
10. A deep learning-based MMC chromosome breakage detection system, characterized in that, include: The preprocessing module performs Gaussian filtering on the single-cell image to remove noise, resulting in a preprocessed image. The instance segmentation module inputs the preprocessed image into the trained improved 24-class chromosome instance segmentation model to obtain a set of chromosome instances; wherein each instance includes at least an instance mask and a corresponding chromosome class probability vector, and the chromosome classes include chromosomes 1-22 and X and Y chromosomes; The fragment set generation module constructs an instance ROI for each instance in the chromosome instance set and inputs the instance ROI into a trained deep learning three-class classification model to output the classification results of complete, fragmented or pseudo-structured instances. Pseudo-structured instances are removed and fragmented instances are retained to form a fragment set. The fracture endpoint determination module performs skeletonization processing on the mask of each fragment instance in the fragment set to extract the coordinates of two fracture endpoints; The fragment embedding representation acquisition module constructs a fragment ROI for each fragment instance and inputs the fragment ROI into a trained Siamese deep neural network metric learning model to obtain a fragment embedding representation for representing fragment similarity. The edge score calculation module generates a candidate associated edge set from the fragment set based on the spatial proximity relationship of the fracture endpoints of the fragment instances and the category consistency determined according to the chromosome category probability vector, and calculates the connection score of the candidate associated edges based on the fragment embedding representation. The connection score is then fused with the category consistency to obtain the fused edge score. The optimal endpoint association set module determines the matching cost based on the fused edge score and performs global matching under the constraint that each broken endpoint is paired with at most one broken endpoint and broken endpoints are allowed to not be paired. The scoring calculation module generates a set of fracture events based on the optimal endpoint association set, and obtains a fracture score based on the set of fracture events. The fracture score is a score obtained by mapping the number of fracture events.