Method for accurate counting of fluorescence in situ hybridization images across intervals and applications thereof
By using a routing network and a three-segment dynamic fusion mechanism, the problem of uneven prediction accuracy across regions and critical point jumps in fluorescence in situ hybridization images was solved, achieving accurate counting in low-value and high-value regions, and improving the continuity of counting and clinical reliability.
Patent Information
- Application Number
- CN202610639969.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-05
- Estimated Expiration
- 2046-05-11
AI Technical Summary
Existing technologies for counting fluorescence in situ hybridization image signals suffer from uneven prediction accuracy across regions and output jumps at critical points. In particular, the conflict between gradient update directions in low-value and high-value regions is difficult to resolve, making it difficult to break through the ceiling of counting accuracy.
By using a routing network to output continuous confidence scores and combining a three-segment dynamic continuous fusion mechanism, the counting tasks in the low-value and high-value intervals are optimized separately through a multi-expert divide-and-conquer network. The loss function is then reshaped using composite dynamic weights and power-scale space to achieve accurate counting across intervals.
It achieves accurate cross-region counting without jumps in fluorescence in situ hybridization images, improves the counting accuracy in low-value areas and the gradient balance in high-value areas, and ensures the continuity and clinical reliability of count values.
Smart Images

Figure CN122157257A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical image processing and artificial intelligence, and in particular to a method for accurate counting across regions in fluorescence in situ hybridization images and its application. Background Technology
[0002] Fluorescence in situ hybridization (FISH) is the gold standard for assessing the HER2 gene amplification status in breast cancer. Its core task is to accurately count the red fluorescent (HER2) and green fluorescent (CEP17) probe signals within the cell nucleus. In clinical diagnosis, the signal count values (R values) range extremely widely, from R=0 to over R=30. Adjacent critical points such as R=2 and R=3, and R=5 and R=6, directly determine the diagnostic classification of negative, borderline, and positive, placing extremely high demands on counting accuracy.
[0003] Current technologies generally employ single-head regression models based on convolutional neural networks to uniformly model the entire numerical range. This approach sets a single regression head at the end of the network and simultaneously fits all counting targets by minimizing loss functions such as mean squared error. However, since the number of samples in the low-value region is much larger than that in the high-value region, and the low-value region requires extremely small prediction errors while the high-value region has a large numerical range, the gradient update direction of the single model conflicts between the two, resulting in the problem that it is difficult to break through the accuracy ceiling in the low-value region and the prediction variance is too large in the high-value region.
[0004] Furthermore, some solutions attempt to mitigate the range problem by employing a cascaded architecture of "classification first, regression later," where a classifier determines the numerical range to which the data belongs, and then the corresponding expert model processes it. However, near the classification threshold, small fluctuations in the classifier's output probability can cause a hard switch in the backend model, resulting in drastic jumps in the output at critical boundaries such as R=9 and R=10. This violates the smoothness that count values, as continuous physiological quantities, should possess, introducing new uncertainties into the critical clinical decision-making region. Summary of the Invention
[0005] This invention provides a method for accurate cross-interval counting of fluorescence in situ hybridization images and its application. It addresses the problems of existing technologies that rely on a single model to forcibly fit the full range of data, resulting in uneven prediction accuracy across intervals, and the tendency to produce step-like output jumps at classification boundaries when using a cascaded architecture, which violate the characteristics of continuous physiological quantities.
[0006] The core technology of this invention is to output continuous confidence through a routing network, rather than directly performing discrete splitting, and use this continuous confidence as a control signal for three-stage dynamic continuous fusion—high confidence hard switching, medium confidence linear soft fusion, and low confidence smooth mapping fusion—to work with a multi-expert divide-and-conquer network that is independently optimized for different numerical ranges, thereby achieving end-to-end conversion from FISH cell images to precise count values across intervals without jumps.
[0007] In a first aspect, the present invention provides a method for accurate counting across regions in fluorescence in situ hybridization images, the method comprising the following steps:
[0008] Acquire images of the fluorescent in situ hybridization cells to be counted, and generate standardized image tensors through standardized preprocessing; The standardized image tensor is input into the routing network, and the output is the continuous confidence probability representing that the cell image belongs to the preset high value range; The standardized image tensor is input into a first counting network optimized for a first numerical range and a second counting network optimized for a second numerical range, respectively, to obtain a first refined prediction value and a second refined prediction value. Based on the comparison results between the continuous confidence probability and the preset threshold, a three-stage dynamic continuous fusion is performed: when the state is determined to be high confidence, the refined prediction value of the counting network with the corresponding dominant probability is directly output as the final count value; when the state is determined to be medium confidence, the refined prediction values of the two counting networks are linearly weighted and fused with the continuous confidence probability as the weight, and the final count value is output; when the state is determined to be low confidence, the continuous confidence probability is mapped to smoothing weights using a smoothing mapping function, and the refined prediction values of the two counting networks are nonlinearly weighted and fused with the smoothing weights, and the final count value is output.
[0009] Further, images of the fluorescence in situ hybridization cells to be counted are acquired, and normalized image tensors are generated through normalized preprocessing, including: Acquire and normalize fluorescence in situ hybridization cell images containing red, green, and blue channels; By using the input layer channel attention mechanism, learnable parameters are introduced to adaptively assign feature extraction weights to each channel, and a standardized image tensor is output.
[0010] Furthermore, the first counting network adopts a dual-head architecture with direct regression task head and ordinal regression task head running in parallel; During the training phase, a composite dynamic weight is applied to the loss function of the first counting network. The composite dynamic weight is the product of the basic weight of a single sample and the static critical interval weight, and is subject to the upper limit of the dynamic weight. Among them, the basic weight of a single sample is dynamically generated based on the cumulative total number of times the sample is sampled in the global sampling and its moving average prediction error is updated. The static critical interval weight is a segmented static constant preset according to the clinical diagnostic guidelines. The upper limit of the dynamic weight decays exponentially with the number of rounds the model traverses the training set.
[0011] Furthermore, the second counting network adopts a dual-head architecture that runs in parallel with the regression task head and the coarse-grained classification task head; During the training phase, the regression loss function of the second counting network adopts a power-scale compression transformation, which compresses the predicted value and the true label value by power respectively, and then calculates the error in the compressed space. The second method for obtaining the refined prediction value is as follows: the probability of each coarse-grained category output by the coarse-grained classification task head is weighted and summed with the corresponding preset statistical representative value to obtain the classification expectation value, and the regression prediction value output by the regression task head is weighted and fused with the classification expectation value according to a preset ratio.
[0012] Furthermore, the method for obtaining the first refined prediction value is as follows: Using the regression prediction value output by the direct regression task header in the first counting network as the anchor point, construct a mask constraint window; Within the neighborhood defined by the mask constraint window, search for the integer count value corresponding to the maximum probability in the discrete probability distribution output by the ordinal regression task header; The regression predicted value and the integer count value are weighted and merged according to a preset ratio to obtain the first refined predicted value.
[0013] Furthermore, when a low-confidence state is identified, a smoothing mapping function is used to map continuous confidence probabilities to smoothing weights, including: The continuous confidence probability is input into the sigmoid central symmetric mapping function, which includes an adjustable steepness parameter so that the output smooth weights are continuously differentiable as the continuous confidence probability fluctuates around its central symmetric point.
[0014] Furthermore, when training the first counting network, its joint loss function also includes an auxiliary supervision loss term for the green probe signal, which is composed of a combination of the smoothed L1 loss and mean square error of the predicted and true values of the green probe signal.
[0015] In a second aspect, the present invention provides a precise counting device for cross-regional fluorescence in situ hybridization images, comprising: The image preprocessing module is used to acquire images of fluorescence in situ hybridization cells to be counted, and generate standardized image tensors through standardized preprocessing. The dynamic routing module is used to input standardized image tensors into the routing network and output continuous confidence probabilities representing cell images belonging to a preset high-value range. The dual-expert divide-and-conquer module is used to input the standardized image tensor into a first counting network optimized for a first numerical range and a second counting network optimized for a second numerical range, respectively, to obtain a first refined prediction value and a second refined prediction value. The dynamic continuous fusion module performs a three-stage dynamic continuous fusion based on the comparison results between the continuous confidence probability and a preset threshold: when the state is determined to be high confidence, the refined prediction value of the counting network with the corresponding dominant probability is directly output as the final count value; when the state is determined to be medium confidence, the refined prediction values of the two counting networks are linearly weighted and fused using the continuous confidence probability as the weight, and the final count value is output; when the state is determined to be low confidence, the continuous confidence probability is mapped to smoothing weights using a smoothing mapping function, and the refined prediction values of the two counting networks are non-linearly weighted and fused using the smoothing weights, and the final count value is output.
[0016] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to execute the above-described method for precise counting of fluorescence in situ hybridization images across regions.
[0017] Fourthly, the present invention provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the above-described method for precise counting across intervals of fluorescence in situ hybridization images.
[0018] The main contributions and innovations of this invention are as follows: 1. System architecture level achieves divide-and-conquer solution to numerical span problem: By decomposing the original large span counting task into sub-tasks of different numerical ranges and processing them by independent expert networks, gradient conflicts of a single model on multi-level objectives are fundamentally avoided, so that the accuracy of low-value and high-value regions can be optimized independently.
[0019] 2. Breakthrough in the Limits of Clinical Critical Zone Counting Accuracy: By introducing composite dynamic weights into the training of the low-value expert network, the long-term difficult case tracking based on historical cumulative error is coupled with the static weights of the critical zone based on clinical diagnostic guidelines. This continuously focuses optimization resources on key clinical decision intervals such as R=5-9, significantly reducing the counting error in the critical zone.
[0020] 3. Gradient balancing in high-value regression: By applying power-scale spatial reshaping loss to the high-value expert network, the physical counting space is nonlinearly mapped to the computational error in the compressed space. This automatically weakens the gradient dominance effect of large numerical errors and relatively enhances the penalty of small numerical errors, so that the contribution of samples of different magnitudes to network training tends to be balanced.
[0021] 4. Effectively eliminates output jumps across interval boundaries: A three-stage dynamic fusion based on continuous confidence is adopted to replace the conventional discrete hard switching. In particular, an S-shaped central symmetric smoothing mapping function is introduced in the low confidence segment. When the confidence fluctuates around 0.5, the fusion weights are continuously differentiable, mathematically eliminating the output jumps that occur at key classification boundaries such as R=9 and R=10 in traditional cascade systems. This ensures the smoothness and clinical reliability of the count values as continuous diagnostic quantities.
[0022] 5. Enhanced expansion capability of open sets in high-value intervals: The high-value expert network, through a dual-head collaborative mechanism of "regression head leading prediction and coarse-grained classification head providing structural anchoring", effectively prevents regression prediction from drifting severely to the low-value region without setting a hard-coded upper limit, and endows the model with stable generalization ability for extremely high-value counts that have not been seen in the training data.
[0023] Details of one or more embodiments of the present invention are set forth in the following drawings and description, so that other features, objects and advantages of the invention will be more readily understood. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of a method for precise counting across regions in fluorescence in situ hybridization images according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0026] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0027] Example 1 This embodiment provides a method for accurate cross-interval counting of fluorescence in situ hybridization (FISH) images based on interval difficulty decoupling and critical smooth fusion. Addressing the core challenge of extremely wide signal counting spans (R values from 0 to over 30) in HER2 gene fluorescence in situ hybridization (FISH) detection for breast cancer, this method abandons the approach of forcibly fitting the full range of data using a general single-model regression. Instead, it creatively constructs a cascaded architecture of "confidence routing - dual-expert heterogeneous treatment - three-stage continuous fusion," simulating the diagnostic logic of pathologists who prioritize qualitative analysis followed by quantitative analysis and comprehensive consideration of the critical region. This method decomposes a large-span, high-precision single-objective optimization problem into two focused sub-problems: extreme precision in the low-value interval and robust regression in the high-value interval. Furthermore, it eliminates cross-interval boundary jumps through a segmented fusion mechanism based on continuous confidence, achieving end-to-end conversion from FISH cell images to non-jumping, cross-interval balanced, and accurate count values.
[0028] Specifically, the method includes the following steps: Step S1: Cell Image Acquisition and Standardization Preprocessing Acquire images of the cells to be counted via fluorescence in situ hybridization (FISH). The image is a three-channel image containing a red fluorescence channel (HER2 probe signal), a green fluorescence channel (CEP17 control probe signal), and a blue channel (DAPI nuclear staining). The red channel directly reflects the amplification status of the target gene, the green channel provides a reference benchmark for the ploidy status of the cell nucleus, and the blue channel is used to identify the nuclear region, providing structural priors for the spatial localization of signal points.
[0029] The acquired three-channel images are normalized. Specifically, based on the mean and standard deviation tensors of the pre-defined ImageNet dataset, the pixel values of each channel are mapped to a standard distribution space to eliminate image intensity differences caused by different staining batches and equipment acquisition conditions, outputting a normalized image tensor. This normalized image tensor retains complete three-channel information.
[0030] Furthermore, to avoid the loss of spatial context information caused by manual channel removal, a channel attention mechanism is introduced into the input layer of the subsequent network. This channel attention mechanism introduces learnable parameters and automatically assigns feature extraction weights adaptively to the red, green, and blue channels during training. In specific implementation, this channel attention mechanism can employ a simplified Squeeze-and-Excitation (SE) module. The SE module first performs global average pooling on each channel of the input feature map, compressing the spatial information of each channel into a scalar descriptor; Subsequently, a bottleneck structure consisting of two fully connected layers is used to learn the nonlinear dependencies between channels. The first fully connected layer undergoes dimensionality reduction (preferably by a reduction ratio of 16), and after ReLU activation, the second fully connected layer restores the original channel dimension. After Sigmoid activation, it outputs the attention weight vectors for each channel. Finally, the attention weight vectors are multiplied channel-by-channel with the original feature map to complete the channel-level recalibration of the feature map. Thus, while retaining the prior information on cell nucleus localization provided by the blue channel, the network can automatically focus the feature extraction on the channel containing the red and green fluorescence signals, outputting the final standardized image tensor.
[0031] Step S2: Dynamic routing of samples based on confidence output The normalized image tensor output from step S1 is input into a pre-constructed and trained lightweight binary classification routing network. This routing network is designed to output continuous confidence probabilities rather than discrete classification labels. The network's final stage uses a Softmax activation function to output a two-dimensional probability vector. The probability value representing the likelihood that the current sample belongs to a preset high-value interval (i.e., red fluorescence count value R ≥ 10) is taken as the continuous confidence probability. . The value range is [0,1], and its magnitude directly reflects the routing network's tendency to determine the assignment of sample intervals: when When the value approaches 1, it indicates that the routing network is highly confident that the sample belongs to the high-value range; when When the value approaches 0, it indicates that the routing network is highly confident that the sample belongs to the low value range.
[0032] The training labels for the lightweight binary classification routing network are not manually labeled, but automatically generated directly from the actual red fluorescence counts of the samples through hard thresholding: when R < 10, the training label is set to 0 (low value range); when R ≥ 10, the training label is set to 1 (high value range), where R represents the actual red fluorescence count of the sample (rounded). Considering that the number of samples in the low value range is usually much larger than that in the high value range in actual clinical data, two balancing strategies are adopted during training to prevent the routing network from developing classification bias due to data skew: First, Focal Loss with label smoothing is used as the loss function. By reducing the loss weight of easily classified samples, the network is forced to focus its optimization efforts on difficult samples near the class boundaries. At the same time, label smoothing can prevent the network from being overconfident in the training labels. Second, a preset multiple of inverse frequency-weighted random sampling is applied to the high value range samples, so that the probability of high value range samples being sampled in each training batch is inversely proportional to their frequency in the dataset, in order to balance the contribution of the two classes of samples to gradient updates. Preferably, this preset multiple is set to 8 times.
[0033] The core design of this step is that it does not perform any discrete hard-splitting decisions at this stage, but instead outputs a continuous confidence probability value. And pass it to the downstream fusion module (step S4). Meanwhile, based on Calculate absolute confidence :
[0034] The value range is [0.5, 1.0], used in step S4 to determine the degree of certainty in the routing network's judgment of the sample interval's affiliation, serving as a trigger control signal for the three-stage fusion. When When =0.5, =0.5 is the minimum value, indicating that the routing network is completely unable to determine the interval assignment of the sample, which corresponds exactly to the clinical critical boundary between R=9 and R=10; when =1.0 or When =0.0, =1.0 is the maximum value, indicating that the routing network has an absolutely certain judgment on the interval assignment of the sample.
[0035] Step S3: Refined counting based on dual-expert feature extraction and collaborative training Two independent counting expert networks are constructed, and the model architecture and loss function are customized for the data characteristics of the low value range (R<10) and high value range (R≥10) respectively. The networks output their internally refined prediction values.
[0036] S3-1: Construction, Training, and Refinement of the First Counting Network (Low-Value Expert Network) The first counting network is optimized for low-value intervals. Its core task is to achieve accurate counting in the R<10 interval, especially to break through the accuracy bottleneck in the clinical critical interval of R=5-9.
[0037] In terms of model architecture, the first counting network adopts a dual-head collaborative architecture with direct regression and ordinal regression task heads running in parallel. The shared backbone network performs multi-layer feature extraction on the input normalized image tensor, integrates the features through several fully connected layers, and then splits into two parallel head structures at the end. The direct regression task head outputs a continuous regression prediction value. Its output layer has no activation function restrictions and can output any non-negative real number. The ordinal regression task head adopts the CORAL ordinal regression framework, which contains 9 independent binary classifiers, each predicting the cumulative probability. Each binary classifier outputs a probability value between [0,1], representing the cumulative probability that the corresponding count threshold has been reached. The dual-head architecture is designed to achieve deep feature sharing and heterogeneous task decoupling: the regression head focuses on perceiving the absolute quantity information of the signal, while the ordinal regression head focuses on learning the ordered topological relationship between adjacent integer values. The two work together and complement each other by sharing features.
[0038] The joint loss function of the first counting network in the training strategy It consists of four weighted losses:
[0039] The meanings and design logic of each item are as follows: This is the CORAL ordinal regression loss. The binary cross-entropy loss is calculated for each of the nine binary classifiers and then summed to constrain the model to learn a strict ordered relationship between the count values. Its mathematical basis lies in the fact that the CORAL loss, through the monotonically decreasing property of the supervised cumulative probability, implicitly imposes an order-preserving constraint on the output space, allowing the model to naturally learn an ordered topological structure between R=0 and R=9 during training.
[0040] This is an asymmetric consistency constraint loss. A penalty term is applied only when the absolute value of the difference between the regression head predicted value and the expected count value derived from the CORAL head is greater than 2, allowing both heads to have their strengths within a reasonable range. The consistency constraint coefficient is set to 0.2 in this embodiment. The reason for the asymmetric design is that the regression head, as a continuous numerical perceptron, is affected by pixel-level features in its prediction, and may produce small deviations due to local signal density; however, if the deviation exceeds a certain tolerance range, it indicates that there is a structural divergence in the understanding of the same input by the two task heads. At this time, consistency constraints need to be introduced to correct the direction, but without excessively penalizing fine-grained differences within a reasonable range.
[0041] To apply composite dynamic weights The L1 regression loss is used. This composite dynamic weight is one of the core technical innovations of this invention, which mathematically couples "long-term difficult memory of individual samples" with "interval value orientation of clinical diagnosis". Compared with L2 loss, L1 loss has more stable gradient characteristics in the low-value region, is insensitive to outlier prediction, and is beneficial for fine-tuning in the low-value region.
[0042] Composite dynamic weights The calculation formula is:
[0043] in, The static critical interval weights are preset according to the clinical diagnostic guidelines, and are preset to have a gradient increase in the R=5-9 interval (e.g., 1.5 for R=5 and 3.0 for R=9). The individual base weights are dynamically generated based on the moving average of the historical prediction errors of this sample. A preset global dynamic weight limit (e.g., 5.0) is set to prevent the weight of a single sample from being excessively amplified, which could lead to training instability.
[0044] The system employs a dual-timescale collaborative design: the microscale tracks the long-term difficult case characteristics of a single sample, while the macroscale controls the overall course learning progress. (1) Microscale - Individual basic weights of a single sample The system maintains an error history dictionary with unique sample identifiers as keys, recording the moving average absolute prediction error for each sample. When a sample is processed by the model for the tth time (t is the total number of times the specific sample has been processed by the model throughout the entire training lifecycle, not the number of training rounds), its error record is updated according to the following formula:
[0045] in, This represents the historical value of the moving average absolute error recorded by the system when the sample is sampled for the tth time; The momentum coefficient is set to 0.9 in this embodiment, which determines the memory length of historical errors and avoids interference from single prediction fluctuations on weight calculation. This represents the predicted count value of the model at the t-th iteration; This is the true labeled count value for the sample. A high momentum coefficient ensures long-term memory of historical errors, avoiding misclassification as chronically difficult cases due to single, accidental prediction fluctuations (such as pixel-level noise caused by random diffusion of fluorescent staining). Only samples that are consistently mispredicted by the model under multiple sampling from different enhancement perspectives are considered as such. Only then will it remain at a high level.
[0046] Based on the updated Calculate the individual basic weights of this sample. :
[0047] in, The minimum guaranteed weight for all samples is set to 1.0 in this embodiment to ensure that even extremely easy samples retain the basic gradient contribution; The normalization constant is set to 2.0 in this embodiment to map the absolute error to the [0,1] interval; This represents the maximum allowed dynamic weight limit during the current training phase, and That is The specific implementation form.
[0048] Regarding data sampling for training, the first counting network employs an inverse frequency-weighted random sampling strategy. Since clinical borderline samples (R=8, R=9, etc.) are relatively scarce in the dataset, inverse frequency weighting ensures that these scarce samples are repeatedly sampled and fed into the network for computation multiple times within a single training epoch. Therefore, The updated index t can be updated multiple times rapidly within a training round, which greatly accelerates the efficiency of feature focusing and mining of chronic hard cases.
[0049] (2) Macro scale - dynamic weight upper limit Course learning declines. It is not a fixed value, but rather decays exponentially as the training progresses:
[0050] in, The initial maximum weight is set to 3.0 in this embodiment; λ is the decay rate, set to 0.98 in this embodiment; and epoch is the number of rounds in which the model fully traverses the training set. This decay mechanism assigns a large dynamic weight cap in the early stages of training, enabling the system to aggressively discover and correct chronically difficult examples. As training progresses and the overall capabilities of the model gradually improve, the weight cap decays exponentially, gradually returning the optimization power to regular samples, forming a smooth learning transition from "vigorous error correction in the early stages" to "equilibrium convergence in the later stages".
[0051] (3) Clinical prior scale – static critical interval weight This weight, based on the FISH clinical diagnostic guidelines, is a non-uniform piecewise constant function, and its value directly maps the importance of different count value intervals in clinical diagnostic decisions. Specifically, the value is: when... When R=5, the weight is 1.0 (non-critical region, maintaining normal optimization intensity); when R=5, the weight is 1.5; when R=6, the weight is 2.0; when R=7, the weight is 1.8; when R=8, the weight is 2.5; and when R=9, the weight is 3.0. The weight reaches its highest value of 3.0 at R=9 because the boundary between R=9 and R=10 (i.e., near the positive threshold for HER2 gene amplification) is the most sensitive and critical decision point in clinical diagnosis. The stepwise increase in weight mathematically forces the network to allocate the most parameter capacity and optimization resources to these intervals that determine the diagnostic conclusion.
[0052] By multiplying the weights of the three scales above and then... The truncated, composite dynamic weights achieve precise quantification of "cross-temporal and spatial clinical value difficulty": only when simultaneously satisfying "continuous prediction errors in multiple training exposures" (by...) Screened by moving average error) and "falling into the clinically high-value borderline" (by... Only samples meeting two conditions (pre-set high scores) receive the highest weight. This mechanism is fundamentally different from the general Focal Loss, which only weights based on the confidence of a single prediction: it filters out accidental errors caused by physical staining noise through moving averages, preventing the optimization direction from being constrained by unstructured random noise; and it mathematically locks optimization resources to the critical clinical decision interval through interval static weights.
[0053] This is an auxiliary supervisory loss term targeting the green (CEP17) probe signal. Its physical meaning lies in explicitly introducing regression supervision for green signal counting, implicitly constraining the shared backbone network to model the overall ploidy state of the cell through multi-task learning, preventing the model from focusing solely on red signals while ignoring the karyotype background information carried by green signals. Its mathematical expression is:
[0054] in, This is the model's predicted value for the green signal count. This is the actual labeled value for the green signal. The loss function exhibits the smoothness of L2 loss when the error is small, but degenerates into the robustness of L1 loss when the error is large; the MSE loss imposes a stronger gradient penalty for larger errors. The two are combined with equal weights, balancing robustness and convergence speed.
[0055] Obtaining the first refined prediction value: During the inference phase, the raw output of the first counting network is internally refined using a collaborative strategy of "regression anchoring + probabilistic search," as detailed below: First, the nine cumulative probabilities output from the ordinal regression head. to In the middle, the independent probability distribution P(R=k) of each discrete integer value is obtained by inverse calculation through difference operation:
[0056] Then, the continuous floating-point predictions output by the direct regression task header are used. Using the anchor point, a mask constraint window is constructed. This mask limits the effective range for searching for the maximum probability value in the discrete probability distribution, allowing only values within the specified range. Search within the neighborhood of the rounded-to-integer value ±2:
[0057] in, This represents the regression anchor mask vector; This represents the rounding function; This is an indicator function that takes the value 1 when the condition is true and 0 otherwise.
[0058] Under mask constraints, search for the integer count value corresponding to the maximum probability from the discrete probability distribution. :
[0059] Finally, the regression predictions will be used. The integer count value obtained from the search The first refined prediction value is obtained by weighted fusion according to the preset fusion ratio. :
[0060] Wherein, α is the regression fusion coefficient within the first counting network, which is set to 0.5 in this embodiment, meaning that the regression value and the discrete value each contribute 50%.
[0061] This refined mechanism effectively solves the "probability hegemony" problem that may occur in ordinal regression in the low-value region. Because the low-value region (especially R=0 and R=1) accounts for a very high proportion of the prior data in the training data, the discrete probability distribution output by the ordinal regression head often forms an overwhelming probability peak at R=0 or R=1. If the maximum value in the full probability distribution is directly taken without applying masking constraints, regardless of the actual number of fluorescence signals in the input image, the model output will always be locked at the low-value prior, losing the ability to distinguish higher count values. By introducing regression anchors and neighborhood masks, this mechanism is mathematically equivalent to telling the system that the regression network has provided a reliable coarse location estimate, and the ordinal regression head only needs to use its learned ordered probability topological information to find the most reasonable integer inflection point near this location. This collaborative strategy of "regression sets the tone, classification makes fine-tuning" retains the regression head's accurate perception of continuous values while fully utilizing the ordinal regression head's sharp cutting characteristics of integer category boundaries.
[0062] S3-2: Construction, Training, and Refinement of the Second Counting Network (High-Value Expert Network) The second counting network is optimized for the high-value range (R≥10). Its core task is to maintain robust regression ability when dealing with high-value counts with huge magnitude differences, prevent the predicted value from drifting severely to the low-value range, and at the same time have the ability to generalize to extremely high counts not covered by the training data.
[0063] In terms of model architecture, the second counting network adopts a dual-head architecture with a regression task head and a coarse-grained classification task head running in parallel. The regression task head outputs continuous predicted values without hard-coded upper bound constraints, and only uses the ReLU activation function to constrain the lower bound to 0, so as to retain the ability to respond to any high-value count. The coarse-grained classification task head further divides the high-value interval into several non-overlapping coarse-grained sub-intervals and outputs the probability distribution of the sample belonging to each sub-interval. Preferably, the coarse-grained classification can be divided into 3 classes: the first class corresponds to count values of 10-16, the second class corresponds to count values of 17-25, and the third class corresponds to count values of 26 and above. Each sub-interval is associated with a preset statistical representative value, which is used to calculate the expected value of classification in the subsequent refinement stage. Preferably, the preset statistical representative values of the above three sub-intervals are 13, 21, and 32, respectively. These representative values can be set based on the prior statistical distribution of FISH clinical test data in the high-value interval, and the best option is a fixed anchor constant. The advantage of using a fixed anchor constant instead of dynamic clustering centers based on the current training dataset is that: To avoid model prediction baseline drift caused by differences in training sample distribution due to different data batches and hospital equipment acquisition conditions, the method's generalization stability and reproducibility are guaranteed under different deployment environments. Specifically, the representative value of 32 for the third sub-interval "26 and above" is set based on a prior estimate of the empirical mean signal distribution of extremely high amplification samples (R>26) in FISH testing: in clinical practice, R>26 is usually considered extremely high amplification, and its precise value has limited impact on diagnostic conclusions; a stable representative value is sufficient as a structural anchor point to prevent regression prediction collapse.
[0064] In terms of training strategy, to address the problem of large numerical errors dominating gradient optimization direction due to the large span of count values in the high-value range, a power-scale space reshaping mechanism is applied to the regression loss function of the second counting network. Specifically, the regression predicted values and the true label values are mapped to a compressed space through power-scale compression transformation, and then the mean squared error is calculated in this compressed space. Power-scale compression loss function. The calculation formula is:
[0065] Where N is the total number of samples in the current training batch; i is the sample index within the batch; This represents the original continuous regression prediction value output by the model for the i-th sample; γ is the label of the true count value of the i-th sample; γ is the power compression exponent, which is set to a fixed value of 0.4 in this embodiment based on experimental testing. The formula adds a constant 1 to both the predicted and true values. Its mathematical necessity lies in the fact that if the true or predicted value tends towards 0, directly raising 0 to the power of 0.4 will cause numerical overflow during backpropagation differentiation because the derivative of the power function tends towards infinity at 0. After adding 1, the minimum base becomes 1, and any power of 1 is always 1, with its derivative being a finite value, thus ensuring the numerical stability of the entire optimization process.
[0066] The physical significance of power-scale compression transformation lies in its nonlinear mapping of the original "physical count value space" to an "isogradient-sensitive space." This is because the power function... ( The loss function is concave throughout its domain, and its rate of increase decreases as the base increases. Therefore, after compression, the absolute difference between large values is relatively compressed, while the absolute difference between small values is relatively amplified. The mean squared error calculated in the compressed space is equivalent to applying an adaptive gradient adjustment mechanism in the original space: the contribution of large numerical errors (such as misclassifying 30 as 25) to the gradient is nonlinearly weakened, while the contribution of small numerical errors (such as misclassifying 12 as 10) to the gradient is relatively enhanced. Thus, the network can automatically learn an error distribution that matches clinical importance—clinically, the focus is not on the precise difference between extremely high values, but on the existence and approximate magnitude of high-value amplification. This loss function naturally guides the network to allocate its optimization focus to these critical regions.
[0067] The coarse-grained classifier head of the second counting network is trained using the standard cross-entropy loss function. The core function of the classifier head is not to accurately predict extremely high values, but rather to provide a structural constraint during the inference phase. Since the final refined second prediction is generated by proportionally fusing the regression value and the classification expectation value (with regression dominating the weight), the expected value output by the classifier head acts as a stable anchor point. When the fluorescence signal is extremely dense, exceeding the distribution range of the training data and causing a decrease in the confidence of the regression network's prediction, it provides a structural pull to prevent the regression value from drifting severely into the low-value range. This achieves a dual-head collaborative mechanism of "regression-dominated free prediction and classification providing structural anchoring as a fallback."
[0068] Obtaining the second refined prediction value: During the inference phase, the raw output of the second counting network is internally refined. The class probabilities of each sub-interval output by the coarse-grained classification task head are weighted and summed with the preset statistical representative values associated with each sub-interval to obtain the classification expectation value. Taking a 3-class classification as an example, if the probability vector output by the classifier is... The corresponding values are [13, 21, 32].
[0069] The regression prediction values output by the regression task header With classification expectation The second refined prediction value is obtained by weighted fusion according to the preset fusion ratio. :
[0070] Among them, here The regression fusion coefficient within the second counting network is set to 0.7 in this embodiment. This ratio reflects the design principle of "regression-led, classification as a fallback": the regression head, due to its continuous numerical output capability, accounts for 70% of the main contribution weight, while the classification head provides 30% of the structural constraints. This weight allocation has been experimentally verified, achieving an optimal balance between regression degrees of freedom and prediction stability on multiple independent test sets.
[0071] Step S4: Three-stage dynamic continuous fusion based on route confidence Receive the continuous confidence probability output by the routing network in step S2 The absolute confidence level Conf derived therefrom, and the first refined prediction values output by the first counting network and the second counting network in step S3, respectively. Second Refining Prediction The process involves a three-stage dynamic continuous fusion to generate the final count value. This step is another core innovation of the invention, which upgrades the discrete hard switching at the classification boundary of the traditional cascaded system to a continuous, conditionally dependent probabilistic fusion, mathematically eliminating the output jump across interval boundaries.
[0072] The fusion process is divided into the following three sections based on the relationship between Conf and the preset threshold: S4-1: High-confidence hard handover segment when hour( The preset high confidence threshold (set to 0.8 in this embodiment) indicates that the routing network has a high degree of confidence in the interval assignment of the sample. At this point, the model's decision logic is direct and explicit, directly outputting the refined prediction value of the counting network with the dominant probability as the final count value. :
[0073] This section simulates the diagnostic psychology of a pathologist making a decisive judgment when the signal characteristics are extremely typical. When the interval assignment of a sample is extremely clear, there is no reason to introduce the prediction of another interval model to interfere with the judgment; directly using the result of the corresponding model can ensure the clarity and efficiency of decision-making.
[0074] S4-2: Medium-confidence soft fusion segment when hour( The preset low confidence threshold (set to 0.6 in this embodiment) indicates that the routing network's judgment has a certain bias, but does not reach a high level of certainty. In this case, the continuous confidence probability is directly used. As fusion weights, a linear weighted fusion is performed on the refined predictions of the two counting networks:
[0075] This section simulates the decision-making process of a pathologist when the signal characteristics have a certain directionality but still have uncertainty, and the pathologist comprehensively weighs the two judgment criteria according to the degree of tendency and proportion.
[0076] S4-3: Low-confidence boundary smoothing segment when At this point, the sample falls into the region where the router's height is uncertain. The value hovers around 0.5, precisely corresponding to the clinical critical classification boundary between R=9 and R=10. Directly applying linear weighting (such as S4-2) within this interval would lead to a serious boundary jump problem: when... When the input image experiences a slight perturbation from 0.49 to 0.51, the linearly weighted fusion weights instantly reverse (the weight of low-value experts jumps from 51% to 49%, and the weight of high-value experts jumps from 49% to 51%). This causes the final count value to jump drastically between the predictions of the two experts, forming a sharp, non-differentiable angle on the output curve. This mathematical discontinuity completely violates the smooth transition characteristic that FISH counts should have as continuous diagnostic quantities.
[0077] Therefore, this embodiment introduces an S-shaped central symmetric smoothing mapping function pair in the low confidence segment. Perform mapping and calculate smooth transition weights. :
[0078] Where λ is the kurtosis adjustment factor, which is set to 10 in this embodiment. This Sigmoid function possesses the following excellent mathematical properties: (1) Strictly centrally symmetric about (0.5, 0.5), that is, when When =0.5, Strictly equal to 0.5, achieving unbiased fusion at the point of maximum uncertainty; (2) It is continuous and infinitely differentiable over the entire real number field, and its derivative is . It converges to 0 at both ends; (3) The λ value controls the steepness of the curve near the center point. In this embodiment, it is set to 10 so that the curve has a moderate slope near 0.5, which is neither as abrupt as a step function nor as indistinguishable as a linear function with a very low slope.
[0079] With the above smooth transition weights Replace the original confidence probability Perform weighted fusion:
[0080] The mathematical effect of this S-shaped mapping is that it replaces the step function introduced by discrete hard switching in traditional cascaded architectures with a continuously differentiable smooth function. When When small fluctuations occur around 0.5 (e.g., from 0.49 to 0.51), the change in fusion weights is stretched into an extremely gentle S-shaped transition curve. This piecewise function fits the psychological process of a pathologist at critical junctures: the high-confidence segment fits "decisive judgment," the medium-confidence segment fits "probability-based allocation," and the low-confidence segment fits "a smooth trade-off between hesitation and indecision." Mathematically, this three-segment fusion logic ensures that the output signal remains consistent across all... All values are continuous and differentiable, completely eliminating hard cascade jump artifacts at the boundaries of intervals, and ensuring the topological smoothness and clinical reliability of FISH count values as continuous physiological quantities across intervals.
[0081] S4-4: Explanation of the mathematical completeness of extreme probability states This invention sets It is 0.8 if and only if When = 0.5, Conf = 0.5. Because Therefore, the extreme state with Conf=0.5 will deterministically enter the low-confidence boundary smoothing segment (S4-3) and be unbiasedly fused by the Sigmoid mapping function with a symmetric weight of 0.5. In any possible Under the given values, all three-stage fusion logic can be triggered uniquely and deterministically, and there is no state of logical deadlock or decision ambiguity.
[0082] Step S5: Output the final count value The fusion count value output in step S4 This result will be output as the final prediction. It can be directly used to assist pathologists in the diagnosis and classification of HER2 gene status in breast cancer.
[0083] Example 2 This embodiment, based on Embodiment 1, further explains the applicability of the fusion mechanism of the present invention as an independent technical solution.
[0084] As exemplified by the three-stage dynamic continuous fusion mechanism based on continuous confidence in Embodiment 1, its applicable scenarios are not limited to the specific dual-expert architecture described in Embodiment 1. In other embodiments, the first and second counting networks may employ different network structures, internal loss functions, or training strategies than those described in Embodiment 1, as long as they can output predicted values with corresponding interval characteristics for the first and second numerical intervals, respectively, they can be used as inputs to the three-stage fusion mechanism. The fusion mechanism achieves seamless and smooth integration of predicted values from different sources by comparing the continuous confidence probability with a preset threshold.
[0085] For example, in a simplified implementation scenario, the first counting network can be a single-head regression network without an ordinal regression head, and the second counting network can be a single-head regression network without a coarse-grained classification head. The outputs of the two networks are directly used as the first and second refined predicted values as inputs to the fusion module. In this case, the three-stage fusion mechanism can still effectively perform its core function of eliminating boundary jumps, proving that the fusion mechanism itself constitutes a technical solution independent of the specific front-end model architecture.
[0086] Example 3 This embodiment is an ablation experiment designed to verify the independent contributions and synergistic effects of the various technical components of the present invention. The experiment is based on a clinical FISH cell sample dataset covering the full range of R=0 to R=35, divided into a training set and a validation set according to a preset ratio, ensuring the consistent distribution of each R value range in both sets. All experiments were conducted in the same hardware environment and under random seeds.
[0087] I. Experimental Setup 1. Baseline Method Two sets of baselines are set: (1) SimpleResNet: Standard ResNet18 backbone network combined with single-head L1 regression, representing a general single-model scheme; (2) Cascade-Baseline: The cascaded architecture skeleton of this invention (routing network + first counting network + second counting network) is adopted, but no innovative training strategies and fusion mechanisms are enabled. The first counting network adopts standard L1 loss, the second counting network adopts standard MSE loss, and the inference stage adopts 0.5 hard threshold switching.
[0088] 2. Ablation variants Based on the Cascade-Baseline, the three core innovative components of this invention—composite dynamic weighting mechanism (DW), power-scale compression loss (PL), and three-stage dynamic continuous fusion (F)—are gradually added to form the following variants: V1 is the cascaded skeleton baseline (no DW, no PL, no F); V2 is DW only enabled; V3 is PL only enabled; V4 is F only enabled; V5 is DW+PL enabled; V6 is DW+F enabled; V7 is PL+F enabled; V8 is the complete method of this invention (DW+PL+F enabled).
[0089] 3. Evaluation Indicators The following indicators were used to evaluate the performance of each variant: (1) Overall MAE: Mean absolute error over the entire range; (2) Interval MAE: Independent MAE of three clinical key intervals: R<5, R[5,10), and R≥10; (3) Precise matching rate: The proportion of predicted values that are completely consistent with the actual values after rounding; (4) R=9 / 10 boundary jump amplitude: The difference between the predicted mean of the actual R=9 and R=10 samples, and the ideal value should be close to 1.0.
[0090] II. Experimental Results and Data Comparison The performance of each model variant on the validation set is shown in Table 1.
[0091] Table 1: Comparison of counting performance of various ablation variants across the full range and critical intervals.
[0092] III. Independent Contribution Analysis of Each Innovative Component 1. Ablation validation of composite dynamic weighting mechanism (DW) Comparing the data of V1 and V2 in Table 1, the MAE in the critical interval of R[5,10) significantly decreased from 0.882 to 0.721, an improvement of 18.3%, and the overall accurate matching rate increased by nearly 3%. This result verifies the effectiveness of the composite dynamic weighting mechanism: by using momentum moving average (momentum coefficient 0.9) to track historical errors over a long period, high weights are assigned only to structurally difficult cases that consistently make prediction errors under multiple enhancement perspectives, effectively filtering out accidental noise caused by random diffusion of fluorescent staining; at the same time, the static critical interval weights set the weights of the R=5-9 interval to a step distribution of 1.5 to 3.0, mathematically forcing optimization resources to be locked in the clinical critical decision interval.
[0093] 2. Ablation Verification of Power-Scale Spatial Reshaping (PL) Comparing the data from V1 and V3, the MAE in the high-value region (R≥10) drops significantly from 1.653 to 1.285, a decrease of 22.2%. This result verifies the gradient balancing mechanism of the power-law compression loss: by mapping the physical count space to an equal-gradient sensitive space through a power-law transformation of γ=0.4, the gradient contribution of large numerical errors is nonlinearly weakened, while the penalty for small numerical errors is relatively enhanced, thus balancing the contribution of samples of different magnitudes to network training. The addition of a constant 1 to both the predicted and true values in the formula avoids the generation of infinite gradients during backpropagation when zero powers are raised to power, ensuring numerical stability.
[0094] 3. Ablation verification of three-stage dynamic continuous fusion (F) Comparing the data of V1 and V4, the most significant change is reflected in the boundary jump index R=9 / 10: the jump amplitude of V1 is as high as 3.215, indicating that the output value at the classification boundary undergoes a drastic step jump between the prediction results of low-value experts and high-value experts, which seriously violates the continuous physiological quantity characteristics; after introducing F, the jump amplitude of V4 is smoothed and repaired to 0.921, which is extremely close to the ideal value of 1.0. This result verifies the mathematical effectiveness of the S-shaped central symmetric smoothing mapping function in the low-confidence segment of the three-stage fusion mechanism: when the continuous confidence probability fluctuates slightly around 0.5, the change of fusion weight is extended into a gentle S-shaped transition curve, which is globally differentiable, and mathematically eliminates the discretization artifacts introduced by the cascaded architecture.
[0095] IV. Component Collaboration Effect The combination of DW and PL (V5) outperformed either component (V2, V3) alone in the R<5 (0.341), R[5,10) (0.684), and R≥10 (1.224) ranges, indicating that the two components work in different numerical ranges with complementary positive and negative effects. The complete method V8 integrates all three innovative components and achieves absolute optimality across all metrics: compared to the SimpleResNet baseline, the overall MAE is reduced by 38.2%; compared to the cascaded baseline V1, the boundary smoothness is improved from 3.215 to 0.985. These results validate the effectiveness of the "clinically driven end-to-end innovative closed-loop" design concept of this invention.
[0096] Example 4 This embodiment provides a precise cross-region counting device for fluorescence in situ hybridization images based on interval difficulty decoupling and critical smooth fusion, used to implement any one of the methods in Embodiment 1 or Embodiment 2. The device mainly includes the following modules: The image preprocessing module is used to acquire images of fluorescence in situ hybridization cells to be counted. After normalization preprocessing in step S1 and channel attention mechanism processing, a normalized image tensor is generated.
[0097] The dynamic routing module has a built-in lightweight binary classification routing network that is pre-trained and deployed. It receives the normalized image tensor from the image preprocessing module and outputs continuous confidence probabilities. and based on Calculate the absolute confidence level (Conf).
[0098] The dual-expert divide-and-conquer module comprises a first counting network submodule and a second counting network submodule. The first counting network submodule adopts the dual-head architecture, training strategy, and refinement method of step S3-1 to output a first refined prediction value for the input image tensor; the second counting network submodule adopts the dual-head architecture, training strategy, and refinement method of step S3-2 to output a second refined prediction value for the input image tensor.
[0099] The dynamic continuous fusion module receives the output from the dynamic routing module. The two refined prediction values output by the Conf and the dual-expert divide-and-conquer module are dynamically and continuously fused according to the three-stage decision logic from S4-1 to S4-3 to output the final count value.
[0100] The internal operating logic, parameter configuration, and formula calculation of each of the above modules correspond one-to-one with the detailed description of the corresponding steps in Example 1, and will not be repeated here.
[0101] Example 5 This embodiment also provides an electronic device, see reference. Figure 2 It includes a memory 404 and a processor 402, the memory 404 storing a computer program and the processor 402 being configured to run the computer program to perform the steps in any of the above method embodiments.
[0102] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.
[0103] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0104] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.
[0105] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the fluorescence in situ hybridization image cross-regional accurate counting methods in the above embodiments.
[0106] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.
[0107] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0108] Input / output device 408 is used to input or output information.
[0109] Example 6 This embodiment also provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the fluorescence in situ hybridization image cross-regional accurate counting method according to Embodiment 1.
[0110] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0111] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0112] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 1 Any box in the logical flow can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0113] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0114] The above embodiments are merely illustrative of several implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the appended claims.
Claims
1. A method for accurate cross-region counting of fluorescence in situ hybridization images, characterized in that, Includes the following steps: Acquire images of the fluorescent in situ hybridization cells to be counted, and generate standardized image tensors through standardized preprocessing; The standardized image tensor is input into the routing network, and the output is a continuous confidence probability representing that the cell image belongs to a preset high value range; The standardized image tensor is input into a first counting network optimized for a first numerical range and a second counting network optimized for a second numerical range, respectively, to obtain a first refined prediction value and a second refined prediction value. Based on the comparison result between the continuous confidence probability and the preset threshold, a three-stage dynamic continuous fusion is performed: when the state is determined to be high confidence, the refined prediction value of the counting network with the corresponding probability dominance is directly output as the final counting value. When the state is determined to be of medium confidence, the refined prediction values of the two counting networks are linearly weighted and fused using the continuous confidence probability as the weight, and the final count value is output. When a low-confidence state is determined, the continuous confidence probability is mapped to a smoothing weight using a smoothing mapping function, and the refined prediction values of the two counting networks are nonlinearly weighted and fused using the smoothing weight to output the final count value.
2. The method for accurate counting across regions in fluorescence in situ hybridization images according to claim 1, characterized in that, The process of acquiring images of fluorescence in situ hybridization cells to be counted, and generating standardized image tensors through standardized preprocessing, includes: Acquire and normalize fluorescence in situ hybridization cell images containing red, green, and blue channels; By using the input layer channel attention mechanism, learnable parameters are introduced to adaptively assign feature extraction weights to each channel, and the standardized image tensor is output.
3. The method for accurate counting across regions in fluorescence in situ hybridization images according to claim 1, characterized in that, The first counting network adopts a dual-head architecture that runs in parallel with the direct regression task head and the ordinal regression task head; During the training phase, a composite dynamic weight is applied to the loss function of the first counting network. The composite dynamic weight is the product of the basic weight of a single sample and the static critical interval weight, and is subject to the upper limit of the dynamic weight. The individual basic weight of a single sample is dynamically generated based on the cumulative total number of times the sample is sampled in the global sampling, and its moving average prediction error is updated. The static critical interval weight is a segmented static constant preset according to the clinical diagnostic guidelines. The upper limit of the dynamic weight decays exponentially with the number of rounds the model traverses the training set.
4. The method for accurate counting across regions in fluorescence in situ hybridization images according to claim 1, characterized in that, The second counting network adopts a dual-head architecture that runs in parallel with the regression task head and the coarse-grained classification task head; During the training phase, the regression loss function of the second counting network adopts a power-scale compression transformation, which compresses the predicted value and the true label value by power respectively, and then calculates the error in the compressed space. The second refined prediction value is obtained by weighting and summing the probabilities of each coarse-grained category output by the coarse-grained classification task head with the corresponding preset statistical representative value to obtain the classification expectation value, and then weighting and fusing the regression prediction value output by the regression task head with the classification expectation value according to a preset ratio.
5. The method for accurate counting across regions in fluorescence in situ hybridization images according to claim 1, characterized in that, The method for obtaining the first refined prediction value is as follows: Using the regression prediction value output by the direct regression task header in the first counting network as the anchor point, a mask constraint window is constructed; Within the neighborhood defined by the mask constraint window, search for the integer count value corresponding to the maximum probability in the discrete probability distribution output by the ordinal regression task header; The regression predicted value and the integer count value are weighted and fused according to a preset ratio to obtain the first refined predicted value.
6. The method for accurate counting across regions in fluorescence in situ hybridization images according to claim 1, characterized in that, When a low-confidence state is determined, the continuous confidence probability is mapped to smooth weights using a smoothing mapping function, including: The continuous confidence probability is input into a sigmoid central symmetric mapping function, which includes an adjustable steepness parameter such that the output smoothing weight is continuously differentiable when the continuous confidence probability fluctuates around its central symmetric point.
7. The method for accurate counting across regions in fluorescence in situ hybridization images according to claim 3, characterized in that, When training the first counting network, its joint loss function also includes an auxiliary supervision loss term for the green probe signal, which is composed of a combination of the smoothed L1 loss and mean square error of the predicted and true values of the green probe signal.
8. A precise counting device for cross-regional fluorescence in situ hybridization images, characterized in that, include: The image preprocessing module is used to acquire images of fluorescence in situ hybridization cells to be counted, and generate standardized image tensors through standardized preprocessing. The dynamic routing module is used to input the standardized image tensor into the routing network and output the continuous confidence probability representing that the cell image belongs to a preset high value range. The dual-expert divide-and-conquer module is used to input the standardized image tensor into a first counting network optimized for a first numerical interval and a second counting network optimized for a second numerical interval, respectively, to obtain a first refined prediction value and a second refined prediction value. The dynamic continuous fusion module is used to perform three-stage dynamic continuous fusion based on the comparison result between the continuous confidence probability and the preset threshold: when the state is determined to be high confidence, the refined prediction value of the counting network with the corresponding probability dominance is directly output as the final count value. When the state is determined to be of medium confidence, the refined prediction values of the two counting networks are linearly weighted and fused using the continuous confidence probability as the weight, and the final count value is output. When a low-confidence state is determined, the continuous confidence probability is mapped to a smoothing weight using a smoothing mapping function, and the refined prediction values of the two counting networks are nonlinearly weighted and fused using the smoothing weight to output the final count value.
9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the precise counting method for fluorescence in situ hybridization images across regions as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program code for controlling a process to execute the process, the process including the precise counting method for cross-regional fluorescence in situ hybridization images according to any one of claims 1 to 7.
Citation Information
Patent Citations
Artificial intelligence grading classification-regression combination prediction method for multi-class materials
CN121171399A
Method for automatically determining content of main elements in lithium battery black powder
CN121499469A
Dual-network medical image segmentation method for high-value region
CN121505273A
