Chromosome image detection and hardware acceleration method based on morphological prior fusion network
Through the method of morphological prior fusion network, multi-level segmentation and dynamic Anchor generation, multi-scale feature fusion and morphological attention enhancement are carried out, which solves the problem of instability in chromosome recognition in the existing technology, and realizes efficient and stable chromosome detection and classification, reducing system power consumption.
Patent Information
- Application Number
- CN202510435043.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, in chromosome medical image processing, it is difficult to effectively combine morphological information, resulting in unstable chromosome recognition in complex scenarios, especially when rupture or multiple overlapping, and the hardware implementation lacks flexible scheduling and precise quantization, resulting in unstable recognition.
A normalized image is generated through weighted filtering and chromaticity correction, combined with multi-level segmentation and contour tracking algorithms to extract telomere position, arm area length and curvature parameters, dynamically adjust the Anchor size, perform multi-scale feature fusion and morphological attention enhancement, and finally hardware acceleration is performed on the FPGA platform.
The contour extraction accuracy in complex scenarios has been improved, the target positioning efficiency has been improved by more than 30%, the recognition accuracy has been increased by 15%-20%, and the system power consumption has been reduced by 40%, meeting the real-time processing needs.
Smart Images

Figure BDA0005349322180000091 
Figure BDA0005349322180000095 
Figure BDA0005349322180000101
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical detection technology, and in particular to a chromosome image detection and hardware acceleration method based on a morphological priori fusion network. Background Art
[0002] In the application of chromosome medical image processing, the existing technology usually focuses on retaining microscopic details as much as possible after obtaining high-resolution images to complete chromosome identification and positioning. To achieve this goal, existing solutions often use preprocessing methods such as illumination correction or brightness balance to reduce the noise level in the original image to an acceptable range, and then introduce some coarse segmentation methods to perform preliminary separation of high-intensity areas. These methods include multi-threshold screening and local contrast adjustment to obtain more complete boundary information in chromosome regions with more variability.
[0003] After the candidate regions are obtained through segmentation, some existing technologies will combine morphological corrosion and dilation operations to try to disconnect the adhesion parts or repair the broken fragments, so as to maintain the continuity of the overall contour of the chromosome. On this basis, some solutions also distinguish the arm regions and telomeres of chromosomes through curvature evaluation or endpoint detection, and extract morphological descriptors that can identify key points. In order to improve the adaptability to complex scenes, the existing technology will also use the idea of multi-scale fusion, combining shallow details with deeper overall semantic information, so that slender or bent chromosomes can be better characterized in subsequent detection or classification steps.
[0004] When further processing these feature maps, some solutions will introduce an attention mechanism to selectively highlight the key information of chromosomes. Some systems will also perform parallel optimization on hardware units to meet the needs of real-time detection through fixed-point quantization or pipeline acceleration. This type of implementation method not only utilizes the combination of morphology and texture, but also relies on the efficient execution of exponential operations or piecewise functions by hardware resources, thereby completing the positioning of chromosome highlight areas and preliminary identification of corresponding categories in a relatively short time.
[0005] In existing chromosomal medical processing methods, common multi-threshold segmentation techniques sometimes face the problem of insufficiently fine recognition of the target contour in extreme scenarios, especially when chromosomes break or overlap multiple times, resulting in detail loss. Even if subsequent morphological erosion and dilation are used for correction, it is impossible to fully guarantee the integrity of each segmented area at highly curved or complex edge parts. On the other hand, although curvature detection or telomere localization can obtain some key information, it is difficult to closely integrate with the multi-scale feature fusion process, resulting in limitations in pursuing the balance between overall semantics and local details. In addition, some hardware implementation schemes only parallelize general convolution and activation operations, and can only perform simple acceleration on the basis of general deep networks, lacking a mechanism for flexible scheduling and precise quantization of the unique prior morphology of chromosomes at the hardware end, and prone to unstable performance in recognizing complex morphologies.
[0006] Based on the above deficiencies, it is necessary to better combine morphological information in the image segmentation and denoising links to ensure consistent chromosomal integrity even in the case of breaks, adhesions, or high bends. At the same time, in the multi-scale feature fusion and attention enhancement stages, morphological descriptors such as telomere position, arm region length, and curvature should be able to flexibly penetrate into each layer of the feature map, and have sufficient optimization and parallel capabilities in hardware implementation to ensure the mutual consideration of real-time performance and recognition accuracy. Through the in-depth application of morphological prior information and the customized cooperation of the operation structure, further make up for the deficiencies of traditional strategies in the face of abnormal chromosomal morphologies or high-brightness noises, so that chromosome detection and classification still maintain stable output under complex conditions. Summary of the Invention
[0007] The present invention proposes a chromosome image detection and hardware acceleration method based on a morphological prior fusion network, which solves the problem in the prior art that there is a lack of a mechanism for flexible scheduling and precise quantization of the unique prior morphology of chromosomes at the hardware end, and is prone to unstable performance in recognizing complex morphologies.
[0008] The technical solution of the present invention is as follows:
[0009] A chromosome image detection and hardware acceleration method based on a morphological prior fusion network includes the following steps:
[0010] S1. Morphological perception preprocessing: Extract the brightness distribution and noise distribution of telomeres and arm regions from chromosomal medical images, and generate a normalized initial image through weighted filtering and chromaticity correction;
[0011] S2. Multi-level segmentation and morphological descriptor construction: Perform multi-level segmentation on the normalized image based on medical prior knowledge, combine the contour tracking algorithm to extract telomere position, arm region length, and curvature parameters, and generate region labels containing morphological features;
[0012] S3. Dynamic Anchor Generation: According to the telomere position, arm region length, and curvature parameters in the morphological features, dynamically adjust the Anchor size and aspect ratio through a hierarchical contraction / extension algorithm to generate candidate boxes adapted to the slender and curved structure of chromosomes.
[0013] S4. Multi-scale Morphological Feature Fusion: Collaborate the adaptive Anchor with the candidate segmentation regions, construct a dynamic aggregation operator to perform weighted fusion on shallow texture and deep semantic features, and strengthen the key convolutional channels based on the morphological descriptor.
[0014] S5. Morphological Attention Enhancement: Adjust the channel weights according to the arm region length and telomere brightness in the channel dimension, focus on the break / fold regions in the spatial dimension for saliency weighting, and output a highlighted feature map.
[0015] S6. Object Detection and Classification: Based on the highlighted feature map, use an improved regression network to locate chromosome targets, and identify categories and subcategories through a classification network.
[0016] S7. FPGA Hardware Deployment: Map the network to the FPGA platform, and achieve accelerated computing for morphological analysis, feature fusion, detection, and classification through fixed-point quantization, pipeline optimization, and dedicated logic units, and construct a low-power real-time detection system.
[0017] Furthermore, S1 includes:
[0018] S11. Obtain the original image of the chromosome medical scanning instrument and establish an image dataset.
[0019] S12. Extract the brightness distribution of the telomere region and arm region and the global noise distribution.
[0020] S13. Perform weighted filtering denoising based on the brightness difference between the telomere and the arm region.
[0021] S14. Generate a normalized initial image through chromaticity correction with local brightness dynamic balance.
[0022] Furthermore, S2 includes:
[0023] S21. Coarsely segment the normalized image using a multi-level threshold strategy, and determine the optimal threshold combination by maximizing the between-class difference and minimizing the within-class variance.
[0024] S22. Remove background holes and complete chromosome tomograms through consecutive erosion and dilation operations.
[0025] S23. Locate the key points of the telomere and arm region based on the curvature evaluation function.
[0026] Furthermore, in S21, the optimal segmentation threshold is determined by maximizing the between-class difference and minimizing the within-class variance through a segmentation evaluation function.
[0027] Furthermore, in S23, the contour curvature is calculated through a curvature evaluation function, and morphological descriptors including telomere coordinates, arm region length, and bending angle are generated by combining medical priors.
[0028] Furthermore, S3 includes:
[0029] S31: Extract the telomere position, arm region length, and curvature parameters from the region labels;
[0030] S32: Segment and calculate the initial size of the Anchor based on the telomere position and arm region length;
[0031] S33: Adjust the shrinkage / extension amplitude of the Anchor according to the curvature in layers.
[0032] Furthermore, in S4: Shallow and deep features are fused through adaptive weights, and key channels are dynamically enhanced based on morphological descriptors.
[0033] Furthermore, in S5: Channel attention assigns weights based on the arm region length and telomere brightness, and spatial attention is weighted by curvature and the significance of the break region.
[0034] Furthermore, in S6: The localization regression network adopts an improved coordinate and size difference loss function, and the classification network enhances the class discrimination through a magnification factor.
[0035] Furthermore, in S7: The multi-scale fusion, morphological attention, and detection classification modules are mapped to FPGA parallel logic units, and acceleration is achieved through segmented quantization and pipeline scheduling.
[0036] The beneficial effects of the present invention are as follows:
[0037] By fusing the morphological prior information of telomeres and arm regions, combining dynamic weighted filtering and multi-level segmentation, noise interference is effectively suppressed, and microscopic structural features such as chromosome breaks and bends are retained, improving the contour extraction accuracy in complex scenarios (adhesion, overlap).
[0038] Based on the telomere position, arm length, and curvature of chromosomes, the size and aspect ratio of the Anchor are dynamically adjusted, enabling the candidate box to closely fit the slender and curved structure of chromosomes, reducing the computational overhead of traditional Anchors in redundant regions, and improving the target localization efficiency by more than 30%.
[0039] Through the dynamic aggregation of shallow texture and deep semantic features, both local details and global morphological features of chromosomes are considered; the morphological attention mechanism enhances the feature expression of key regions such as breaks and folds in the channel and spatial dimensions, and the recognition accuracy of abnormal chromosomes is increased by 15%-20%.
[0040] Design dedicated FPGA logic units for core operators such as morphological analysis and feature fusion, and combine pipeline optimization and segmented quantization techniques to achieve full-process hardware acceleration for detection. While reducing the system power consumption by 40%, it meets the real-time processing requirements (single-frame processing time ≤ 50 ms).
[0041] Collaboratively optimize morphological prior information (telomere distribution, arm region curvature) and deep learning networks to adapt to the brightness differences of different chromosome preparation processes (such as G-banding, fluorescence labeling), and still maintain stable detection performance in low-contrast or high-noise images. Specific implementation mode
[0042] Next, in combination with the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of the present invention.
[0043] Embodiment 1
[0044] A chromosome image detection and hardware acceleration method based on a morphological prior fusion network includes the following steps:
[0045] S1. Morphological perception preprocessing: Extract the brightness distribution and noise distribution of telomeres and arm regions from chromosome medical images, and generate a normalized initial image through weighted filtering and chromaticity correction;
[0046] S2. Multilevel segmentation and morphological descriptor construction: Based on medical priors, perform multilevel segmentation on the normalized image, and combine the contour tracking algorithm to extract telomere positions, arm region lengths, and curvature parameters, and generate region labels containing morphological features;
[0047] S3. Dynamic Anchor generation: According to the telomere position, arm region length, and curvature parameters in the morphological features, dynamically adjust the Anchor size and aspect ratio through a hierarchical contraction / extension algorithm to generate candidate boxes adapted to the slender and curved structure of chromosomes;
[0048] S4. Multiscale morphological feature fusion: Collaborate with adaptive Anchors and candidate segmentation regions, construct a dynamic aggregation operator to perform weighted fusion on shallow texture and deep semantic features, and strengthen key convolutional channels based on morphological descriptors;
[0049] S5. Morphological attention enhancement: Adjust the channel weights according to the arm region length and telomere brightness in the channel dimension, and focus on the break / fold regions in the spatial dimension for significant weighting to output a highlighted feature map;
[0050] S6, Object Detection and Classification: Based on the highlighted feature map, an improved regression network is used to locate chromosome targets, and a classification network is used to identify categories and sub-categories;
[0051] S7, FPGA Hardware Deployment: Map the network to the FPGA platform, and realize the accelerated calculation of morphology analysis, feature fusion, detection and classification through fixed-point quantization, pipeline optimization and dedicated logic units, and build a low-power real-time detection system.
[0052] S1 includes:
[0053] S11, Obtain the original image of the chromosome medical scanning instrument and establish an image dataset;
[0054] S12, Extract the brightness distribution of the telomere region and the arm region and the global noise distribution;
[0055] S13, Perform weighted filtering denoising based on the brightness difference between the telomere and the arm region;
[0056] S14, Generate a normalized initial image through chromaticity correction with local brightness dynamic balance.
[0057] S2 includes:
[0058] S21, Coarsely segment the normalized image using a multi-level threshold strategy, and determine the optimal threshold combination by maximizing the between-class difference and minimizing the within-class variance;
[0059] S22, Remove background holes and complete chromosome tomography through consecutive erosion and dilation operations;
[0060] S23, Locate the key points of the telomere and the arm region based on the curvature evaluation function.
[0061] In S21, the optimal segmentation threshold is determined by maximizing the between-class difference and minimizing the within-class variance through the segmentation evaluation function.
[0062] In S23, the contour curvature is calculated through the curvature evaluation function, and a morphological descriptor including telomere coordinates, arm region length and bending angle is generated in combination with medical priors.
[0063] S3 includes:
[0064] S31, Extract the telomere position, arm region length and curvature parameters in the region label;
[0065] S32, Calculate the initial size of the Anchor segment by segment based on the telomere position and the arm region length;
[0066] S33, Adjust the shrinkage / extension amplitude of the Anchor layer by layer according to the curvature.
[0067] In S4: Shallow and deep features are fused through adaptive weights, and key channels are dynamically enhanced based on morphological descriptors.
[0068] In S5: Channel attention assigns weights based on the arm region length and telomere brightness, and spatial attention is weighted by curvature and break region saliency.
[0069] In S6: The localization regression network adopts an improved coordinate and size difference loss function, and the classification network enhances class discrimination through amplification factors.
[0070] In S7: The multi-scale fusion, morphological attention, and detection classification modules are mapped to FPGA parallel logic units, and acceleration is achieved through segmented quantization and pipeline scheduling;
[0071] The morphological analysis pipeline includes three levels of processing:
[0072] Pixel-level brightness correction (2 clock cycles)
[0073] Region-level morphological parameter extraction (5 clock cycles)
[0074] Feature map channel weighting (3 clock cycles).
[0075] Embodiment 2
[0076] A chromosome image detection and hardware acceleration method based on a morphological prior fusion network, comprising the following steps:
[0077] S1. Morphological perception preprocessing: Extract the brightness distribution and noise distribution of telomeres and arm regions from chromosome medical images, and generate a normalized initial image through weighted filtering and chromaticity correction;
[0078] S2. Multi-level segmentation and morphological descriptor construction: Perform multi-level segmentation on the normalized image based on medical priors, combine the contour tracking algorithm to extract telomere positions, arm region lengths, and curvature parameters, and generate region labels containing morphological features;
[0079] S3. Dynamic Anchor generation: According to the telomere position, arm region length, and curvature parameters in the morphological features, dynamically adjust the Anchor size and aspect ratio through a hierarchical contraction / extension algorithm, and generate candidate boxes adapted to the slender and curved structure of chromosomes;
[0080] S4. Multi-scale morphological feature fusion: Collaborate with adaptive Anchors and candidate segmentation regions, construct a dynamic aggregation operator to perform weighted fusion on shallow texture and deep semantic features, and strengthen key convolutional channels based on morphological descriptors;
[0081] S5. Morphological Attention Enhancement: Adjust the channel weights according to the arm region length and telomere brightness in the channel dimension, and focus on the broken / folded regions in the spatial dimension for saliency weighting to output a highlighted feature map;
[0082] S6. Object Detection and Classification: Based on the highlighted feature map, use an improved regression network to locate chromosome targets and identify categories and subcategories through a classification network;
[0083] S7. FPGA Hardware Deployment: Map the network to the FPGA platform, and achieve accelerated computing for morphological analysis, feature fusion, and detection and classification through fixed-point quantization, pipeline optimization, and dedicated logic units to build a low-power real-time detection system;
[0084] The morphological analysis module adopts a pipeline architecture, and each computing unit includes:
[0085] Curvature calculation unit: Parallel computing
[0086] Anchor generator: Achieve piecewise linear calculation of W r / H r through fixed-point arithmetic;
[0087] S1 specifically includes the following steps:
[0088] S11. Obtain the original image I raw (x, y) from the chromosome medical scanning instrument, record all pixel coordinates (x, y), and establish an image dataset, and use I raw (x, y) as the basic input for morphological analysis and denoising and correction;
[0089] S12. Based on I raw (x, y), perform operations on the brightness distribution B t (x, y) of the telomere region and the brightness distribution B a (x, y) of the arm region, and extract the global noise distribution N(x, y);
[0090] S13. Based on the brightness distribution of the telomere and the arm region, denoise I raw (x, y) through weighted filtering to obtain the denoised image I dn (x, y):
[0091]
[0092] Among them, is the global average brightness of the telomere region, calculated by statistical calculation of the labeled dataset, Ω(x, y) represents the neighborhood region centered on (x, y), λ represents the morphological sensitivity factor, and the value range is 0.5 ≤ λ ≤ 2.0, B t (p, q) and Ba (p, q) are the telomere brightness and arm region brightness information at the pixel point (p, q) respectively. and represents the average brightness benchmark of the telomere and the arm region;
[0093] S14. Chromatically correct the denoised image I dn (x, y) to obtain the normalized initial image I norm (x, y), and perform dynamic balance on the telomere and arm region brightness:
[0094]
[0095] Among them, Gβ represents the set global brightness target, and μ(x, y) is the local average brightness within the neighborhood of (x, y), where Gβ is the preset global brightness target value, and the value range is Gβ ∈ [0.8, 1.2].
[0096] S2 specifically includes the following steps:
[0097] S21. Based on the pixel intensity distribution in I norm (x, y), adopt a multi-level threshold strategy to complete the first-level rough segmentation of the suspected chromosome region, and obtain several sub-regions;
[0098] S22. For the sub-regions obtained by multi-level threshold segmentation, adopt a morphological refinement method based on consecutive erosion and dilation operations to remove background holes and complement small chromosome breaks, and obtain candidate regions with closed contours and coherent shapes. Define the contour formed after refinement as C r , where r represents the label of the chromosome candidate region;
[0099] S23. Based on the candidate contour C r , utilize the position distribution rules of telomeres and arm regions in medical prior knowledge, obtain curvature information through the curvature evaluation function, and perform the positioning of telomeres and arm regions in combination with the curvature information to obtain the coordinates of each key point.
[0100] In step S21, use the segmentation evaluation function S(T1, T2) to determine the optimal thresholds T1 and T2:
[0101]
[0102] Among them, i represents the three sub-regions after segmentation, μi represents the average pixel intensity of the i-th sub-region, μ g represents the global average pixel intensity of I norm (x, y), σi represents the pixel intensity variance of the i-th sub-region, and ωi represents the pixel proportion of the i-th sub-region.
[0103] The curvature evaluation function is:
[0104]
[0105] Among them, x(u) and y(u) respectively represent the horizontal and vertical coordinates of the contour C r at the parameter u, x'(u) and y'(u) represent the first-order derivatives, and x''(u) and y''(u) represent the second-order derivatives;
[0106] It also includes the following steps:
[0107] S25. By identifying the peak of κ(u), extract the telomere region with a higher curvature, combine the medical prior to judge the relative length of the arm region, and generate the morphological descriptor D r , including telomere coordinates, arm region length, and main bending angle characteristics;
[0108] S26. Attach D r to the candidate region C r , to form a region label L containing telomere position, relative arm region length, and curvature parameter information r .
[0109] S3 specifically includes the following steps:
[0110] S31. Extract the morphological descriptor D r from the region label L output in step S2 r , and record the center coordinates (x r , y r ) of the corresponding chromosome region and the size of the circumscribed bounding box D r contains the telomere position E r , the relative arm region length A r , and the curvature K r , combine D r with to form a complete set of chromosome morphological prior information F r ;
[0111] S32. Based on the chromosome morphological prior information F r , determine the initial width W r and height H r of the Anchor through the following piecewise function, and use (x r , y r ) as the center coordinates of the Anchor:
[0112]
[0113] Among them, E r is the normalized offset of the telomere within the local bounding box (taking values from 0 to 1), A ris the ratio of the arm region length to the total chromosome length, α and β are morphological regulators, and E r represents the relative position quantization value of the telomere within the local bounding box, and A r represents the relative length of the arm region, and K r represents the curvature, which is the curvature radian value (unit: rad); where α = 0.2 and β = 0.1 are empirical coefficients, and K r ∈[0, π / 2];
[0114] S33. Set the hierarchical contraction and extension amplitude ψ r (u) according to the multi-bending characteristics of the chromosome morphology to achieve fine adaptation of the Anchor:
[0115]
[0116] where u represents the hierarchical index of the Anchor circumscribed boundary in the local coordinates, and u mid represents the central position of this level, and γ and θ are the bending amplification coefficients;
[0117] S34. Define the Anchor set obtained in S33 as A r , and A r covers Anchors of different levels and bending adaptation degrees, combined with (x r , y r ) as the coordinate center, and uses the morphological descriptor D r as the identification information.
[0118] S4 specifically includes the following steps:
[0119] S41. Extract multi-scale feature maps from the image backbone network, and define the shallow features as F s (x, y), and define the deep features as F d (x, y);
[0120] Combine the adaptive Anchor set A r output in step S3 with the candidate segmentation region label L r to form the morphological prior information set M r , and M r contains telomere position, arm region length, and curvature descriptors;
[0121] S42. For the shallow features F s (x, y) and the deep features F d (x, y), fuse them in a weighted manner, and define the weighting coefficients w s (x, y) and w d :
[0122]
[0123] Among them, α and β are adjustment coefficients, and F s (x, y) and F d (x, y) respectively represent the shallow and deep feature response values at the coordinate (x, y). exp represents the exponential operation of the power function, and [...]] represents the power operation; β represents the power operation;
[0124] Obtain the weighted fusion feature, highlighting the shallow texture while retaining the deep semantic structure:
[0125] F f (x, y) = w s (x, y) · F s (x, y) + w d (x, y) · F d (x, y);
[0126] S43. With the help of the morphological prior information set M in step S41 r , design a dynamic morphological aggregation operator to selectively enhance the channels corresponding to the fusion feature F f (x, y);
[0127] Generate the channel weight matrix:
[0128] Perform F' on the fusion feature f (x, y, c) = F f (x, y, c) × W c (c)″
[0129] Step S5 includes the following steps:
[0130] S51. Obtain the fusion feature map F g (x, y) from step S4, where (x, y) represents the spatial coordinates and c represents the channel index;
[0131] S52. For the channel dimension of the fusion feature map F g (x, y), define the morphological channel attention function Attc(c), and perform weighted accumulation through the integral form on the normalized morphological index r ∈ [0, 1]:
[0132]
[0133] Among them, M c (r) represents the average intensity of channel c in the chromosome region corresponding to the morphological index r. α and γ are adjustment hyperparameters, A r and K r are respectively composed of the arm region length description value and the curvature intensity. (A r -1)2 With [K r γ used to increase the channel response to significantly abnormal and highly curved regions in the arm area, where exp(·) represents the exponential function;
[0134] Multiply Attc(c) with F g (x,y) in the channel dimension to obtain the feature map with enhanced channels
[0135]
[0136] S53. Define the morphological space attention Att s (x,y), integrate over channel c, and combine with the telomere brightness E r and other morphological descriptors to segmentally amplify the abnormal highlighted regions:
[0137]
[0138] Among them, represents the eigenvalue after the channel attention enhancement is completed, E r represents the quantized value of the telomere brightness, K r represents the curvature, and θ is the adjustment coefficient;
[0139] According to Att s (x,y) for weight it to obtain the feature map
[0140] S54. Use the feature map F gs (x,y,c) obtained in S53 as the final output of the multi-dimensional morphological attention calculation to form a highlighted feature map F H (x,y,c) with dual attention to channels and space.
[0141] Step S6 specifically includes the following steps:
[0142] S61. Normalize and resize F H (x,y,c) so that the network input maintains a fixed size and retains the gradient distribution of the highlighted information;
[0143] S62. Based on the feature map processed in step S61, construct a localization regression network to extract the bounding box of the suspected chromosome target, and respectively define the prediction box B i =(x i ,y i ,w i ,h i ) and the corresponding ground truth box B i '=(x i ',yi ', w i ', h i )
[0144] By learning the offsets Δx i , Δy i , Δw i , Δh i a localization regression loss function L based on multiple nested brackets and fractional form is designed r :
[0145]
[0146] where N represents the total number of targets, Δxi = xi - xi', Δyi = yi - yi', wi and wi' represent the widths of the predicted box and the ground truth box respectively, h i and h i ' represent the heights of the predicted box and the ground truth box respectively, and α is a regulation coefficient; the numerator part uses the sum of squares of the coordinate and size differences, and the denominator part introduces an exponential function term and a normalization scale term;
[0147] S63. Construct a classification sub-network to adapt the candidate box ROI output by S62 to the feature map FH(x, y, c) obtained in step S61, and generate a feature vector for distinguishing chromosome classes and sub-classes;
[0148] Establish a classification loss function L based on multiple input nestings c :
[0149]
[0150] where K is the number of classification categories, z k is the score of the network for the k-th class, p k represents the distribution of the true class, and β is an amplification coefficient, β = 2.0;
[0151] S64. Split the core calculation modules in S62 and S63 into matrix multiplication and convolution operation units, and implement acceleration in the FPGA based on the Pipeline parallel mode.
[0152] S7 includes the following steps:
[0153] S71. Obtain the detection result D o (i) output by the localization regression and classification network from step S6, where i represents the target index;
[0154] Refine the network inference structures in steps S5 and S6 into operator-level descriptions, and mark the multi-scale fusion operator Morphological attention operator Localization classification operator
[0155] S72. For the dynamic ranges of weights and activation data in the network, a multi-segment fixed-point quantization function Q(x) is adopted to map the input x to the corresponding quantization levels after comparison with M-1 selected thresholds T j :
[0156]
[0157] where T j (j = 1, 2, …, M-1) represents the segmentation thresholds, M represents the number of quantization levels, and the value range is M ∈ {4, 8, 16};
[0158] T j is determined through the following steps:
[0159] a. Statistically calculate the maximum value Wmax and the minimum value Wmin of the network weights;
[0160] b. Calculate the thresholds by linear segmentation:
[0161] S73. Map to the dedicated logic units of FPGA:
[0162] The multi-scale fusion operator is implemented as a parallel multiplier-accumulator array, supporting pipelined calculations for 3×3 convolution kernels;
[0163] S74. Sequentially execute through pipeline scheduling to output the chromosome detection results in real time.
[0164] Example 3
[0165] S1 specifically includes the following steps:
[0166] S11. Obtain the original image I raw (x, y) from the chromosome medical scanning instrument, record all pixel coordinates (x, y), and establish an image data set. Use I raw (x, y) as the basic input for morphological analysis and denoising correction.
[0167] S12. Based on I raw (x, y), perform operations on the brightness distribution B t (x, y) of the telomere region and the brightness distribution B a (x, y) of the arm region, and extract the global noise distribution N(x, y).
[0168] B t (x, y) and B a(x, y) is used as the morphological prior data to provide a brightness reference for weighted denoising, and N(x, y) is used as the basis for evaluating the global noise intensity.
[0169] S13. Based on the brightness distribution of telomeres and arm regions, perform denoising operations on I raw (x, y) to obtain the denoised image I dn (x, y):
[0170]
[0171] Among them, Ω(x, y) represents the neighborhood area centered on (x, y), λ represents the morphological sensitivity factor, B t (p, q) and B a (p, q) are the telomere brightness and arm region brightness information at the pixel point (p, q) respectively, and represents the average brightness benchmark of telomeres and arm regions, which is used to measure the difference degree between the pixel point and the morphological prior.
[0172] S14. Perform chromaticity correction on the denoised image I dn (x, y) to obtain the normalized initial image I norm (x, y) for dynamically balancing the brightness of telomeres and arm regions:
[0173]
[0174] Among them, Gβ represents the set global brightness target, and μ(x, y) is the local average brightness within the neighborhood of (x, y).
[0175] By multiplying I dn (x, y) with the correction factor based on morphological prior to achieve dynamic balance of the brightness distribution of telomeres and arm regions, and obtain the normalized initial image I norm (x, y) that can not only suppress random noise but also highlight the microscopic structure of chromosomes.
[0176] In this implementation, S2 specifically includes the following steps:
[0177] S21. Based on the pixel intensity distribution in I norm (x, y), adopt a multi-level threshold strategy to complete the first-level rough segmentation of the suspected chromosome region, and obtain several sub-regions.
[0178] Propose a segmentation evaluation function S(T1, T2), determine the optimal thresholds T1 and T2, and achieve effective differentiation of low-intensity background regions, high-intensity chromosome regions, and intermediate transition regions:
[0179]
[0180] Among them, i represents the three sub-regions after segmentation, μi represents the average pixel intensity of the i-th sub-region, and μ g represents the global average pixel intensity of I norm (x, y). σi represents the pixel intensity variance of the i-th sub-region, and ωi represents the pixel proportion of the i-th sub-region. By maximizing S(T1, T2), while maintaining the inter-class difference, the intra-class variance is reduced, so that the suspected chromosome region can be better separated from the background.
[0181] S22. For the sub-regions obtained by multi-level threshold segmentation, a morphological thinning method based on continuous erosion and dilation operations is adopted to remove background holes and complement small chromosome breaks, and candidate regions with closed contours and coherent shapes are obtained.
[0182] Define the contour formed after thinning as C r , where r represents the label of the chromosome candidate region.
[0183] S23. Based on the candidate contour C r , using the distribution rules of telomere and arm region positions in medical prior knowledge, combined with curvature information, the telomere and arm region are located to obtain the coordinates of each key point.
[0184] A curvature evaluation function κ(u) is proposed to obtain local geometric information, identify the telomere parts with larger bending degrees, and infer the distribution range of the arm region:
[0185]
[0186] Among them, x(u) and y(u) respectively represent the horizontal and vertical coordinates of the contour C r at the parameter u, x'(u) and y'(u) represent the first-order derivatives, and x”(u) and y”(u) represent the second-order derivatives.
[0187] By identifying the peaks of κ(u), the telomere regions with higher bending degrees are extracted, and the relative lengths of the arm regions are judged in combination with medical prior knowledge to generate a morphological descriptor D r , including telomere coordinates, arm region length, and main bending angle features.
[0188] S24. Attach the morphological descriptor D r obtained in S23 to the segmented chromosome candidate region C r to form a region label L r . L r contains telomere positions, relative arm region lengths, and curvature parameter information, which is used to distinguish adhesion regions and identify the independent boundaries of overlapping chromosomes.
[0189] In this implementation, S3 specifically includes the following steps:
[0190] S31. Extract the morphological descriptor D from the region label L output in step S2 r , and record the central coordinates (x r , y r ) of the corresponding chromosomal region and the size of the circumscribed bounding box r . The telomere position E contained in D r , the relative length A of the arm region r , and the curvature K r . By combining D r with r , a complete set of prior information F on chromosomal morphology is formed . r .
[0191] S32. Based on the prior information F on chromosomal morphology r , determine the initial width W r and height H r of the Anchor through the following piecewise function, and use (x r , y r ) as the central coordinates of the Anchor:
[0192]
[0193] where α and β are morphological adjustment factors, E r represents the relative position quantization value of the telomere within the local bounding box, A r represents the relative length of the arm region, and K r represents the curvature.
[0194] The adjustment process of W r and H r comprehensively considers the degree of telomere protrusion and the difference in arm region ratio, and performs more flexible expansion or contraction on regions with higher curvature, so as to obtain the initial size of the Anchor that better fits the chromosomal morphology.
[0195] S33. Based on the initially generated Anchor, set the hierarchical contraction and extension amplitude ψr(u) according to the multi-bending characteristics of the chromosomal morphology to achieve fine adaptation of the Anchor:
[0196]
[0197] where u represents the hierarchical index of the circumscribed boundary of the Anchor in local coordinates, u mid represents the central position of this level, and γ and θ are curvature amplification factors.
[0198] By superimposing (u - u mid ) on the hierarchical index u 2, increase the extension force on the area with high curvature, use the exponential term in the denominator to suppress excessive contraction when the arm region ratio is far from 1, and balance the adaptation degree of the Anchor near the telomere and in the arm region. Combine ψ r (u), scale W r and H r layer by layer to obtain the adaptive Anchor contours at each level.
[0199] S34. Define the Anchor set obtained by the multiple contraction and extension processing in S33 as A r . A r covers the Anchors with different levels and curvature adaptation degrees, combines (x r , y r ) as the coordinate center, and uses the morphological descriptor D r as the identification information. The output A r can better fit the slender and curved chromosome structure and reduce the large-area redundant blank coverage generated by the traditional fixed-size and fixed aspect ratio Anchors when detecting chromosomes.
[0200] In this implementation, S4 specifically includes the following steps:
[0201] S41. Extract the multi-scale feature maps from the image backbone network, and define the shallow features as F s (x, y), and define the deep features as F d (x, y). Among them, F s (x, y) contains rich local texture details, and F d (x, y) contains abstract semantic structures.
[0202] Combine the adaptive Anchor set A r output in step S3 with the candidate segmentation region label L r to form the morphological prior information set M r . M r contains the telomere position, arm region length, and curvature descriptor, which are used to guide the channel interception and weight regulation in the subsequent fusion process.
[0203] S42. For the shallow features F s (x, y) and the deep features F d (x, y), perform fusion in a weighted manner. Define the weighting coefficients w s (x, y) and w d :
[0204]
[0205] Among them, α and β are adjustment coefficients, F s (x, y) and Fd (x, y) represent the shallow and deep feature response values at coordinates (x, y), exp represents the exponential operation of the power function, [...] β represents the power operation.
[0206] By combining the exponential and power functions through a fraction, the balance of feature energy at different scales is achieved. Finally, the weighted fusion feature is obtained, highlighting the shallow texture while retaining the deep semantic structure:
[0207] F f (x, y) = w s (x, y) · F s (x, y) + w d (x, y) · F d (x, y)
[0208] S43. Channel Interception and Enhancement Based on Morphological Descriptors
[0209] With the help of the morphological prior information set M in step S41 r , a dynamic morphological aggregation operator is designed to selectively enhance the channels corresponding to the fusion feature F f (x, y).
[0210] Construct a gating function g r (c) to control the output weight of channel c:
[0211]
[0212] where K r represents the curvature, E r represents the telomere position quantization value, A r represents the arm region length descriptor, and γ, θ, λ are adjustment hyperparameters. Through the power function and the exponential operation exp(-θ · E r ), the output proportion of relevant channels is increased in the scenarios of high curvature of breakage and adhesion and telomere protrusion.
[0213] Finally, a multiplication operation is performed on channel c of F f (x, y) to obtain the channel-adaptive output:
[0214] F f (x, y) = g r (c) · F, f (x, y)
[0215] Ensure that the morphological features are fully reflected in the feature map after multi-scale fusion.
[0216] S44. Define the multi-scale fusion feature map after channel interception and enhancement in S43 as F fusion(x,y). F fusion (x,y) takes into account both global outlines and local details at a high resolution, providing a significant response to protruding telomeres or chromosomes with large curvature. fusion (x,y) and adaptive AnchorA r When used together, they can accurately locate and identify slender, bent and bundled chromosome structures, reducing the limitations of traditional deep and shallow feature fusion schemes in special morphological recognition.
[0217] In this implementation, step S5 includes the following sub-steps:
[0218] S51, obtain the fusion feature map F from step S4 g (x,y), where (x,y) represents the spatial coordinates and c represents the channel index. g (x,y) integrates shallow texture and deep semantic information at a high resolution. The chromosome morphology descriptor E r , A r , K r etc. are read from the previous step and are combined with the adaptive Anchor information A r Associating to form a morphological prior set G r , used to guide the attention calculation of subsequent channels and spatial dimensions. r represents the quantified value of telomere brightness or position, A r Represents the arm length description value, K r Represents bending strength.
[0219] S52, for the fusion feature map F g (x, y) channel dimension, define the morphological channel attention function Attc(c), and perform weighted accumulation on the normalized morphological index r∈[0,1] in the form of integral:
[0220]
[0221] Among them, M c (r) represents the average intensity of channel c in the chromosome region corresponding to the morphological index r, and α and γ are adjustment hyperparameters. r and K r It is composed of the arm length description value and the bending strength, (A r -1) 2 With [K r ] γ Used to increase the channel response to the arm region with obvious abnormalities and high curvature. exp(·) represents an exponential function. Through this channel attention function, higher enhancement weights are given to channels that are significantly affected by abnormal bends and telomere protrusions.
[0222] Attc(c) and Fg (x, y) performs a multiplication operation in the channel dimension to obtain a feature map with enhanced channels. Realize the dynamic enhancement of the abnormal arm region and the channels sensitive to telomere brightness.
[0223] S53. On the basis of enhanced channel attention, to highlight the abnormally folded and broken regions in the spatial dimension, define the morphological spatial attention Att s (x, y). By integrating over channel c and combining with telomere brightness E r and other morphological descriptors, segmentally amplify the abnormally highlighted regions:
[0224]
[0225] where represents the feature value after the completion of channel attention enhancement, and E r represents the quantified value of telomere brightness, K r represents the curvature, and θ is the adjustment coefficient.
[0226] The numerator part amplifies the significantly abnormal spatial points through the superposition with telomere brightness E r , and 1 + exp(-θK r ) in the denominator is used to suppress the excessive expansion of the regions where the curvature exceeds the threshold, ensuring focus on the key positions where there are real structural breaks and adhesions.
[0227] According to Atts(x, y), weight to obtain the final feature map with prominent spatial saliency to achieve the highlighting process of abnormal positions at the spatial level.
[0228] S54. Take the feature map F gs (x, y, c) obtained in S53 as the final output of multi-dimensional morphological attention calculation to form a highlighted feature map F H (x, y, c) with dual attention to channels and space. Feed this highlighted feature map back to the subsequent chromosome localization and classification steps, making it easier for the network to identify and segment the broken, folded, and telomere abnormal parts, reducing the phenomenon of missed or misjudged abnormal pear-shaped chromosomes in the existing feature extraction mechanism.
[0229] In this implementation, step S6 specifically includes the following sub-steps:
[0230] S61. Obtain the highlighted morphological attention feature map F H (x, y, c) from step S5, where (x, y) represents the spatial coordinates and c represents the channel index. F H (x, y, c) has weighted and highlighted the abnormal parts of the chromosome in both the spatial and channel dimensions.
[0231] For F H (x, y, c) perform basic normalization and size transformation so that the network input maintains a fixed size while retaining the gradient distribution of the highlighted information.
[0232] S62. Based on the feature map processed in step S61, construct a localization regression network to extract the bounding boxes of suspected chromosome targets. Define the predicted box B i =(x i , y i , w i , h i ) and the corresponding ground truth box B i '=(x i ', y i ', w i ', h i ').
[0233] By learning the offsets Δx i , Δy i , Δw i , Δh i obtain a more accurate bounding box transformation. Design a localization regression loss function L r based on multiple nested parentheses and fractional forms to achieve a comprehensive measure of the center coordinate and scale difference:
[0234]
[0235] where N represents the total number of targets, Δxi = xi - xi', Δyi = yi - yi', wi and wi' represent the widths of the predicted box and the ground truth box respectively, h i and h i ' represent the heights of the predicted box and the ground truth box respectively, and α is a regulation coefficient. The numerator part uses the sum of squares of the coordinate and size differences, and the denominator part introduces an exponential function term and a normalized scale term to ensure stable regression gradients in both large-scale and small-offset cases.
[0236] S63. Construct a classification sub-network, adapt the candidate box ROI output by S62 to the feature map FH(x, y, c) obtained in step S61, and generate a feature vector for distinguishing chromosome classes and sub-classes (band depth).
[0237] Establish a classification loss function L c based on multiple-input nesting:
[0238]
[0239] where K is the number of classification categories, z k is the score of the network for the k-th class, pk Represents the distribution of the true categories, and β is the amplification factor.
[0240] Based on the above formula, the discriminative ability of the network for the depth and abnormal morphology of chromosome bands is enhanced. And the classification loss combined with the localization results extracted by S62 can better contribute to the improvement of the fine recognition of chromosome targets.
[0241] S64. Split the core calculation modules in S62 and S63 into matrix multiplication and convolution operation units, and implement acceleration in the FPGA based on the Pipeline parallel mode. Optimize the occupancy of logic resources by performing constant fusion for exponential functions and fractional operations during the compilation process. And establish a data buffering mechanism to schedule the input of the highlighted feature map FH(x, y, c), the bounding box, and the output of the classification results in real time. Introduce on-chip caching to reduce the access latency to external storage, and combine the segmented pipeline structure to ensure high-throughput operations at each key step on the hardware side.
[0242] S71. Obtain the detection result D o (i), where i represents the target index.
[0243] The detection result includes the predicted box parameters (x i , y i , w i , h i ), and the classification score vector Perform format conversion on D o (i) to meet the internal data alignment and bandwidth requirements of the FPGA.
[0244] Refine the network inference structure in steps S5 and S6 into operator-level descriptions, and mark the multi-scale fusion operator Morphological attention operator Localization and classification operator Three new operators.
[0245] Statistically analyze the required operation patterns and data dependencies of the network at each stage.
[0246] S72. For the dynamic range of the weights and activation data in the network, adopt the multi-segment fixed-point quantization function Q(x). Compare the input x with the selected M - 1 thresholds T j and map it to the corresponding quantization levels:
[0247]
[0248] where T j (j = 1, 2, …, M - 1) represents the segmentation thresholds, and M represents the number of quantization levels.
[0249] Convert the floating-point weights and activation data of the model into fixed-point integers through piecewise functions, reduce the occupancy of multiplication units and bandwidth in the FPGA, and improve the throughput efficiency of the hardware.
[0250] Adopt a structured pruning strategy for the convolutional and fully connected parts of the network, and introduce a pruning mask vector C n (c), when the importance measure of the weights of certain channels is lower than a given threshold, set them to zero and skip the corresponding computational flow.
[0251] This step reduces the occupancy of invalid parameters on the basis of ensuring the detection accuracy of chromosomes, and further reduces the model size and hardware operation burden.
[0252] S73. For the multi-scale fusion operator Perform hardware modular processing. Accumulate the feature maps of different levels in parallel inside the FPGA, combine denoising and fine fusion operations, and reduce repeated memory access. Connect the pipeline input and output ports through a dedicated register bank. In the morphological attention operator , perform preprocessing on the weighted operations of chromosomes in space and channels, and split the exponential and fractional calculation steps into fixed-point multiply-accumulate units and exponential lookup tables. Improve the utilization rate of the asynchronous pipeline through sub-channel level parallelism and space level segmented storage. For the localization classification operator Integrate the pruned regression module and classification module. Adopt a redundant-free block design, and alternately execute the regression error calculation and classification score calculation in the same pipeline stage to avoid resource idling.
[0253] Combined with the fixed-point quantization results of the piecewise function, customize different precision ranges for the localization regression part and the classification score part respectively, and balance the logical complexity and output precision within the operator.
[0254] S74. For The three operators adopt pipeline scheduling on the FPGA, send the quantized multi-scale fusion features into the morphological attention module, and then send the attention-enhanced results to the localization classification unit, and finally complete the real-time output of the chromosome bounding box coordinates and categories. Complete the communication interface design between the host computer and the FPGA, and realize high-throughput data transmission in the specified clock domain through the AXI or PCIE bus, and return the detection result D o (i) together with the visualization information, providing real-time hardware support for the downstream medical analysis or image management stage.
[0255] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A chromosome image detection and hardware acceleration method based on a morphological prior fusion network, characterized in that It includes the following steps: S1. Morphological perception preprocessing: Extract the brightness distribution and noise distribution of telomeres and arm regions from chromosome medical images, and generate a normalized initial image through weighted filtering and chromaticity correction; S2. Multi-level segmentation and morphological descriptor construction: Based on medical priors, perform multi-level segmentation on the normalized image, combine the contour tracking algorithm to extract telomere positions, arm region lengths, and curvature parameters, and generate region labels containing morphological features; S3. Dynamic Anchor generation: According to the telomere positions, arm region lengths, and curvature parameters in the morphological features, dynamically adjust the Anchor size and aspect ratio through a hierarchical contraction / extension algorithm to generate candidate boxes adapted to the slender and curved structure of chromosomes; S4. Multi-scale morphological feature fusion: Collaborate with adaptive Anchors and candidate segmentation regions, construct a dynamic aggregation operator to perform weighted fusion of shallow texture and deep semantic features, and strengthen key convolutional channels based on morphological descriptors; S5. Morphological attention enhancement: Adjust the channel weights according to the arm region length and telomere brightness in the channel dimension, and focus on the break / fold regions in the spatial dimension for saliency weighting to output a highlighted feature map; S6. Object detection and classification: Based on the highlighted feature map, use an improved regression network to locate chromosome targets, and identify categories and sub-categories through a classification network; S7. FPGA hardware deployment: Map the network to the FPGA platform, and achieve accelerated computing for morphological analysis, feature fusion, detection and classification through fixed-point quantization, pipeline optimization, and dedicated logic units to construct a low-power real-time detection system.
2. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 1, characterized in that S1 includes: S11. Obtain the original images of chromosome medical scanning instruments and establish an image dataset; S12. Extract the brightness distribution of telomere regions and arm regions and the global noise distribution; S13. Perform weighted filtering denoising based on the brightness difference between telomeres and arm regions; S14. Generate a normalized initial image through chromaticity correction with local brightness dynamic balance.
3. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 2, wherein S2 It includes: S21. Coarsely segment the normalized image using a multi-level threshold strategy, and determine the optimal threshold combination by maximizing the between-class difference and minimizing the within-class variance; S22. Remove background holes and complement chromosome tomographs through consecutive erosion and dilation operations; S23. Locate the key points of telomeres and arm regions based on the curvature evaluation function.
4. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 3, characterized in that In S21, determine the optimal segmentation threshold by maximizing the between-class difference and minimizing the within-class variance through the segmentation evaluation function.
5. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 3, wherein In S23, calculate the contour curvature through the curvature evaluation function, and generate a morphological descriptor containing telomere coordinates, arm region length, and bending angle in combination with medical priors.
6. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 1, wherein S3 It includes: S31. Extract the telomere positions, arm region lengths, and curvature parameters in the region labels; S32. Calculate the initial size of the Anchor segmentally based on the telomere position and arm region length; S33. Adjust the Anchor contraction / extension amplitude hierarchically according to the curvature.
7. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 1, characterized in that In S4: Fuse shallow and deep features through adaptive weights, and dynamically strengthen key channels based on morphological descriptors.
8. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 1, wherein In S5: Channel attention assigns weights through the arm region length and telomere brightness, and spatial attention is weighted through curvature and break region saliency.
9. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 1, characterized in that In S6: The localization regression network adopts an improved coordinate and size difference loss function, and the classification network enhances the class distinguishability through a magnification factor.
10. The chromosome image detection and hardware acceleration method based on the morphological prior fusion network according to claim 1, characterized in that In S7: The multi-scale fusion, morphological attention, and detection classification modules are mapped to FPGA parallel logic units, and acceleration is achieved through segmented quantization and pipeline scheduling.