Cerebrospinal fluid cell microscopic image detection method and related device
By employing multi-scale feature fusion and frequency band modulation enhancement, the problems of low detection efficiency and unstable results in cerebrospinal fluid cell detection have been solved, improving the stability and reliability of detection, adapting to different imaging conditions, reducing missed detections and false detections, and increasing detection efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUYI UNIV
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies for detecting cerebrospinal fluid cells suffer from problems such as low detection efficiency, reliance on the experience of pathologists, unstable detection results, insufficient adaptability to complex imaging conditions, and inadequate fusion of multi-scale features, leading to high rates of missed and false detections.
A multi-scale feature fusion and frequency band modulation enhancement method is adopted. Multi-scale features are extracted through the backbone network, fused using a feature pyramid network, and enhanced by frequency band modulation to generate unified features for detection. Combined with the detection head and post-processing module, the detection stability and reliability are improved.
It improves the stability and reliability of cerebrospinal fluid cell detection, reduces false negatives and false positives, enhances adaptability to different staining effects and imaging conditions, and improves detection efficiency and the reliability of results.
Smart Images

Figure CN122116348A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more particularly to a method and related apparatus for detecting cerebrospinal fluid cell microscopic images. Background Technology
[0002] Cerebrospinal fluid cell morphology examination is an important standard for the diagnosis of central nervous system diseases and plays a key role in the screening of diseases such as meningeal carcinoma, autoimmune encephalitis, and cerebrovascular diseases.
[0003] In clinical practice, manual microscopy is often used, but traditional manual microscopy has problems such as low efficiency, an average single sample analysis time of more than 15 minutes, and a high dependence on the experience of pathologists, which seriously restricts the efficiency of clinical decision-making.
[0004] Object detection methods based on deep neural networks have also been applied, but they still have many shortcomings.
[0005] For example, in the practical application of cerebrospinal fluid cell detection, medical scenarios usually require outputting results at a high confidence threshold to ensure the reliability of the conclusions. However, existing detection schemes often experience a decrease in effective detection rate after increasing the confidence threshold, manifested as increased false negatives and unstable identification of small or low-contrast targets, making it difficult to simultaneously ensure both reliable output and stable detection capability.
[0006] Existing computer vision-based models for cerebrospinal fluid cell detection are not adaptable to complex imaging conditions. Due to differences in staining methods, imaging parameters, and background interference in microscopic images, the model's generalization ability for the same type of target under different conditions is limited, which can easily lead to fluctuations in detection results and affect its usability and consistency in clinical scenarios.
[0007] Existing multi-scale feature fusion methods do not sufficiently enhance features at specific detection levels. For features of different scales output by the pyramid structure, it is often difficult to enhance the key level features on which the target depends in a targeted manner, resulting in the weakening of effective information on small targets, dense targets, or fine-grained morphological features during high-confidence screening. Summary of the Invention
[0008] The following is an overview of the topics described in detail in this article.
[0009] The purpose of this application is to at least partially solve one of the technical problems existing in the related technologies. The embodiments of this application provide a method and related device for detecting cerebrospinal fluid cell microscopic images, which can improve the stability and reliability of detection.
[0010] An embodiment of the first aspect of this application provides a method for detecting cerebrospinal fluid cell microscopic images, comprising:
[0011] Obtain microscopic images of cerebrospinal fluid cells; Multi-scale features are extracted from microscopic images of cerebrospinal fluid cells, and the multi-scale features are fused to obtain fused features. The fused features are aligned to obtain aligned features, the aligned features are enhanced by frequency band modulation to obtain enhanced features, the enhanced features are fused to obtain unified features, and the target enhanced features are obtained from the unified features according to a preset output size; Detection is performed based on the target enhancement features to obtain the detection results.
[0012] According to an embodiment of the first aspect of this application, the step of enhancing the alignment features by frequency band modulation to obtain enhanced features includes: Perform a two-dimensional real-number fast Fourier transform on the alignment features to obtain the frequency domain features; Frequency coordinates are generated based on the dimensions of the frequency domain features, and a frequency index map is generated based on the frequency coordinates to distinguish different frequency regions. A frequency band mask is generated based on a preset list of frequency band division parameters to extract frequency domain components of different frequency bands; The frequency domain features are decomposed using the frequency band mask to obtain low-frequency components. The low-frequency components are then subjected to inverse Fourier transform to obtain spatial domain components corresponding to each frequency band. The spatial domain components are then subjected to adjacent frequency band difference to obtain frequency band residual components. Spatial attention weights are generated based on the alignment features; The enhanced features are obtained by summing the results of multiplying the residual components of each frequency band with their corresponding spatial attention weights.
[0013] According to an embodiment of the first aspect of this application, after acquiring a microscopic image of cerebrospinal fluid cells, the microscopic image of cerebrospinal fluid cells is preprocessed, the preprocessing including at least one of the following: size adjustment, color normalization, noise suppression, and data augmentation.
[0014] According to an embodiment of the first aspect of this application, the extraction of multi-scale features from a cerebrospinal fluid cell microscopic image includes: Multi-scale features are obtained by performing multi-layer convolution and downsampling on the microscopic images of cerebrospinal fluid cells using a backbone network.
[0015] According to an embodiment of the first aspect of this application, fusing the multi-scale features to obtain fused features includes: The multi-scale features are fused by performing top-down and lateral connection fusion processing on the feature pyramid network to obtain fused features.
[0016] According to an embodiment of the first aspect of this application, aligning the fused features to obtain aligned features includes: Spatially align the fusion features at each scale to the spatial resolution of the target level and channel align them to the channel dimensions of the target level.
[0017] According to an embodiment of the first aspect of this application, the step of detecting based on the target enhancement features to obtain a detection result includes: The detection head performs detection based on the target enhancement features to obtain candidate detection results, which include target category, bounding box regression results, and confidence scores. The candidate detection results are post-processed to obtain the detection results. The post-processing includes at least one of the following: confidence threshold screening, non-maximum suppression (NMS), coordinate mapping, and formatted output.
[0018] A second aspect of this application provides a cerebrospinal fluid cell microscopic image detection system, comprising: Image input unit, used to acquire microscopic images of cerebrospinal fluid cells; The backbone network is used to extract multi-scale features from cerebrospinal fluid cell microscopic images; A feature pyramid network is used to fuse the multi-scale features to obtain fused features; A multi-scale frequency domain enhancement and specific layer output module is used to align the fused features to obtain aligned features, enhance the aligned features by frequency band modulation to obtain enhanced features, fuse the enhanced features to obtain unified features, and obtain the target enhanced features from the unified features according to a preset output size; The detection head is used to perform detection based on the enhanced features of the target and obtain the detection result.
[0019] According to a third aspect of this application, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the cerebrospinal fluid cell microscopic image detection method as described in the first aspect of this application.
[0020] According to a fourth aspect of this application, a computer storage medium stores computer-executable instructions for performing the cerebrospinal fluid cell microscopic image detection method as described in the first aspect of this application.
[0021] The above-mentioned scheme has at least the following beneficial effects: By introducing a multi-scale feature enhancement module after the feature pyramid structure such as FPN, the network can more fully integrate effective information at different scales and perform targeted enhancement on the features of a specified detection layer, thereby improving the problems of missed detections and false detections that are prone to occur under high confidence requirements, and improving the stability and reliability of the overall detection results. At the same time, the multi-scale enhancement method can strengthen the feature expression related to fine-grained structures and small-sized targets, and has better adaptability to different staining effects, background interference, and imaging condition changes; it improves the quality of feature expression without changing the original detection process, making the model more suitable for detection scenarios with large differences in target scale and rich morphological details in cerebrospinal fluid cell microscopic images.
[0022] This detector can automatically detect targets in user-inputted cerebrospinal fluid cell morphology images, reducing the burden of manual image reading and annotation, and improving the efficiency of image analysis and result output. It can be deployed and run on devices with varying computing power, facilitating use in various application environments such as laboratory workstations and edge computing devices. Furthermore, it features comprehensive supporting functions at the result output level, enabling statistical counting of target cells based on model recognition results, and supporting high-confidence screening and presentation of detected targets to assist users in more efficiently completing target identification and quantity statistics. Attached Figure Description
[0023] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0024] Figure 1 This is a step-by-step diagram of the method for detecting cerebrospinal fluid cells using microscopic images; Figure 2 This diagram illustrates the steps involved in enhancing alignment features through frequency band modulation to obtain enhanced features. Figure 3 This is a flowchart illustrating the steps involved in frequency band modulation enhancement. Figure 4 This is a schematic diagram of a cerebrospinal fluid cell microscopic image detection system; Figure 5 This is a schematic diagram of multi-scale frequency domain enhancement and specific layer output modules; Figure 6 This is a schematic diagram of a frequency band modulation module. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0026] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0027] The following is an explanation of the terms used in this application.
[0028] (1) Cerebrospinal fluid: Cerebrospinal fluid is a colorless, transparent, weakly alkaline liquid that exists in the central nervous system (brain and spinal cord) and is an important component of the central nervous system.
[0029] (2) Cell morphology: Cell morphology is the study of the morphological structure of cells (such as size, shape, nucleus / cytoplasm ratio, staining characteristics), arrangement and abnormal changes. Its core is to reflect the physiological state or pathological changes of cells through morphological observation.
[0030] (3) Cerebrospinal fluid cell morphology: A methodological approach to assist in the diagnosis of central nervous system diseases by observing the morphology, structure, number, proportion, and abnormal changes of various cells in cerebrospinal fluid under a microscope. In this patent, it refers to the observation of the morphology, structure, number, and proportion of various cells in cerebrospinal fluid under a microscope.
[0031] (4) Features: These are information carriers that are extracted from input images after performing operations such as convolution, pooling, and activation on the input image through neural networks (such as backbone networks and feature extraction modules). They usually exist in the form of multi-dimensional feature maps, which can reflect different levels of information such as the edge, texture, and semantics of the image.
[0032] (5) Small target: refers to the target to be detected that has a pixel ratio of less than a preset threshold and a small spatial size in the input image. In this patent, the preset threshold is 32 pixels × 32 pixels.
[0033] (6) Backbone network: refers to the basic network architecture in target detection and image recognition models that is responsible for extracting multi-scale features from input images.
[0034] (7) Feature Pyramid Network: This refers to the network that connects the backbone network and the detection head (Head). It can also be abbreviated as FPN. It is used to fuse and enhance the multi-scale features output by the backbone network to generate a network module with fused features that have both high resolution and high semantic information. Its core purpose is to solve the semantic consistency problem of features at different scales and improve the detection performance of multi-scale targets (especially small targets).
[0035] (8) Attention mechanism: refers to the technical module in neural networks that strengthens key target features and suppresses background redundant features by calculating feature weights.
[0036] (9) Two-dimensional real fast Fourier transform rFFT2, a fast calculation method for frequency domain transformation of feature data in the form of two-dimensional real matrix.
[0037] (10) Two-dimensional real inverse fast Fourier transform iRFFT2: A fast calculation method for converting a two-dimensional frequency domain complex matrix into a two-dimensional spatial domain real feature map, which is adapted to the "frequency domain-spatial domain" mapping requirements of the frequency domain enhancement submodule.
[0038] (11) Module: A structured component that constitutes the target detection model, has independent technical functions, and can be implemented by hardware circuits or software code. Its core features are clear input / output interfaces, preset logical operation rules, and specific technical effects. Multiple modules work together in a preset topological relationship to complete the end-to-end task of target detection (such as feature extraction, feature fusion, target recognition and localization).
[0039] (12) Model gradient explosion: refers to the technical phenomenon that the gradient value of a deep learning model (such as the YOLO series of object detection models and the ResNet series of image classification models) increases abnormally during the backpropagation calculation of gradients during the training process (usually exceeding a preset threshold, such as the absolute value of the gradient ≥ 10³), resulting in the uncontrolled update of model parameters.
[0040] (13) Detection accuracy: refers to the comprehensive performance quantification index of the target detection model (such as YOLOv12, Faster R-CNN, etc.) in "localizing and classifying" the target to be detected in the input image. It is mainly used to evaluate the correctness of the model in identifying target categories and the accuracy of bounding box localization. Its quantification results directly reflect the reliability of the model in actual application scenarios and are the core evaluation standard for measuring the technical effect of the model.
[0041] (14) Confidence: refers to the quantitative evaluation value of the reliability of a single detection result of the target detection model. Its core characterization is "the probability of the target existing in the bounding box predicted by the model" and "the credibility of the target category prediction". The value range is [0,1] (the closer the value is to 1, the more reliable the detection result is). This indicator is used to screen effective detection results and filter false positive predictions. It is one of the core attributes of the model output results.
[0042] (15) Multi-scale: refers to the hierarchical technology system adopted by computer vision models for “targets / features of different spatial sizes” when processing tasks.
[0043] (16) Small target detection layer: refers to an independent functional layer in the target detection model that is specifically designed for "small targets" and undertakes the functions of small target feature enhancement, bounding box localization and category classification.
[0044] (17) Frequency domain transformation: is a linear transformation method that maps a two-dimensional spatial real feature map to a frequency domain complex matrix, which is suitable for the frequency domain modulation requirements of scale-by-scale features in the multi-scale frequency domain enhancement submodule.
[0045] (18) Band mask: The band mask described in this invention is a band selection and amplitude modulation tool that operates on a complex matrix in the frequency domain, which is adapted to the enhancement or suppression processing requirements of a specific frequency band in a multi-scale frequency domain enhancement submodule.
[0046] (19) Frequency band decomposition: This is a processing method in this invention that divides a two-dimensional frequency domain complex matrix into different frequency band intervals according to frequency characteristics, which is adapted to the needs of differentiated frequency band modulation in the multi-scale frequency domain enhancement submodule.
[0047] (20) Stepwise frequency band decomposition: is a processing method for multi-level progressive frequency band subdivision of frequency domain matrix, providing refined frequency band features for frequency band attention mechanism.
[0048] (21) Band attention: is an adaptive weight allocation mechanism based on frequency domain energy distribution, used to enhance the band features that are effective for cerebrospinal fluid cell detection.
[0049] (22) Spatial domain: refers to the feature data representation space with pixel coordinates as the dimension, which is the basic form of feature map in the cerebrospinal fluid cell detection system. The spatial domain feature map can be mapped to the frequency domain through two-dimensional real fast Fourier transform (rFFT2), enhanced by frequency band modulation, and then mapped back to the spatial domain through two-dimensional real inverse fast Fourier transform (iRFFT2), and the two mappings satisfy the lossless closed-loop characteristic.
[0050] (23) Band attention: is an adaptive weight allocation mechanism based on frequency domain energy distribution, used to enhance the band features that are effective for cerebrospinal fluid cell detection.
[0051] (24) Band weighted fusion is a processing method that integrates multiple sub-frequency domain matrices after attention weighting and mask modulation into a unified frequency domain matrix.
[0052] (25) Softmax: The Softmax function is a normalization mapping function used in multi-class classification scenarios.
[0053] (26) Sigmoid: The Sigmoid function is a nonlinear mapping function used for binary classification or numerical range compression.
[0054] The embodiments of this application provide a method and related apparatus for detecting cerebrospinal fluid cell microscopic images, aiming to improve the stability and reliability of detection.
[0055] It can be applied to cell detection software and applications. This software or application can run on devices such as computers, mobile phones, microscope imaging systems, and cell analysis workstations, providing users with detection and identification functions for 12 types of targets (tumor cells, monocytes, lymphocytes, eosinophils, basophils, mature granulocytes, immature cells, fungi, cryptococci, immature granulocytes, bacteria, and reactive lymphocytes) in cerebrospinal fluid cell morphology images or cerebrospinal fluid cell micrographs.
[0056] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0057] Embodiments of this application provide a cerebrospinal fluid cell microscopic image detection system.
[0058] Reference Figure 4 The cerebrospinal fluid cell microscopic image detection system includes: an image input unit, a backbone network, a feature pyramid network, a multi-scale frequency domain enhancement and specific layer output module, a detection head, and a post-processing unit.
[0059] The image input unit is used to acquire microscopic images of cerebrospinal fluid cells; The backbone network is used to extract multi-scale features from cerebrospinal fluid cell microscopic images; Feature pyramid networks are used to fuse multi-scale features to obtain fused features; The multi-scale frequency domain enhancement and specific layer output module is used to align the fused features to obtain aligned features, enhance the aligned features by frequency band modulation to obtain enhanced features, fuse the enhanced features to obtain unified features, and obtain the target enhanced features from the unified features according to the preset output size; The detection head is used to perform detection based on the enhanced features of the target and obtain the detection results.
[0060] It should be noted that a post-processing unit is also set up after the detection head. Specifically, the detection head is used to perform detection based on the target enhancement features and obtain candidate detection results, which include the target category, bounding box regression results, and confidence scores. The post-processing unit is used to perform post-processing on the candidate detection results to obtain the detection results. The post-processing includes at least one of the following: confidence threshold filtering, non-maximum suppression (NMS), coordinate mapping, and formatted output.
[0061] In addition, the microscopic image can be magnified, resampled, or cropped and magnified in the image input unit to increase the apparent size of the target cell in the input image, thereby alleviating the problem of insufficient feature expression caused by insufficient pixel information of small targets, and reducing the interference of background fine texture on detection to a certain extent.
[0062] Reference Figure 5 For the multi-scale frequency domain enhancement and specific layer output module, the multi-scale frequency domain enhancement and specific layer output module includes: multi-scale input interface sub-module, scale alignment module, frequency band modulation mechanism module, multi-scale feature fusion module and specific layer output sub-module.
[0063] The multi-scale input interface submodule is used to receive the feature set from the FPN. The number of inputs is 2 to 4 feature maps, denoted as P2, ..., PN, where N∈{2,3,4}.
[0064] The scale alignment module is used to spatially align the fused features at each scale to the spatial resolution of the target layer and to channel-align them to the channel dimensions of the target layer. Channel alignment can be achieved through 1×1 convolution, while spatial alignment can be achieved through interpolation.
[0065] The frequency band modulation mechanism module is used to perform frequency band modulation enhancement on each input feature.
[0066] The multi-scale feature fusion module is used to fuse enhanced features from various scales to obtain a unified feature representation. Specifically, a lightweight approach of "weighted fusion after normalization of scale weights based on statistics" is adopted to reduce computational and parameter overhead.
[0067] The specific layer output submodule is used to obtain the enhanced feature map Yk from the fusion result according to the preset output layer and output it to the detection head.
[0068] It can receive feature inputs from 2 to 4 layers, align and fuse multi-scale information, and enhance the output features of specified layers for subsequent detection.
[0069] Reference Figure 6 For the frequency band modulation module, the frequency band modulation module includes: frequency domain transformation unit, frequency index generation unit, frequency band mask generation unit, frequency band decomposition unit, frequency band attention weight generation unit, and frequency band weighted fusion unit.
[0070] The frequency domain transform unit is used to perform a two-dimensional real-number fast Fourier transform on the alignment features to obtain the frequency domain features; The frequency index generation unit is used to generate frequency coordinates based on the size of the frequency domain features, and to generate a frequency index map based on the frequency coordinates to distinguish different frequency regions. The frequency band mask generation unit is used to generate frequency band masks for extracting frequency domain components of different frequency bands based on a preset frequency band division parameter list; The frequency band decomposition unit is used to decompose the frequency domain features using a frequency band mask to obtain low-frequency components, perform inverse Fourier transform on the low-frequency components to obtain the spatial domain components corresponding to each frequency band, and perform adjacent frequency band difference on the spatial domain components to obtain the frequency band residual components. The frequency band attention weight generation unit is used to generate spatial attention weights based on alignment features; The frequency band weighted fusion unit is used to sum the results of multiplying the frequency band residual components of each frequency band with the corresponding spatial attention weights to obtain the enhanced features.
[0071] By introducing multi-scale feature enhancement and specific-level feature output mechanisms after multi-scale structures such as Feature Pyramid Network (FPN), the model can receive 2 to 4 layers of pyramid features and perform targeted enhancement on the specified level features. This allows the model to maintain relatively stable detection capability and recognition consistency even under high-confidence output conditions, reducing the risk of missed detections and false detections and improving the reliability and practicality of detection results.
[0072] The cerebrospinal fluid cell microscopic image detection system employs the following cerebrospinal fluid cell microscopic image detection method.
[0073] Reference Figure 1 The method for detecting cerebrospinal fluid cells using microscopic images includes the following steps: Step S100: Obtain microscopic images of cerebrospinal fluid cells; Step S200: Extract multi-scale features from cerebrospinal fluid cell microscopic images; Step S300: Fuse multi-scale features to obtain fused features; Step S400: Align the fused features to obtain aligned features, enhance the aligned features by frequency band modulation to obtain enhanced features, fuse the enhanced features to obtain unified features, and obtain the target enhanced features from the unified features according to the preset output size; Step S500: Detection is performed based on the target enhancement features to obtain the detection results.
[0074] For step S100, a microscopic image of cerebrospinal fluid cells is acquired. The microscopic image of cerebrospinal fluid cells may be obtained from a microscope imaging device or a database.
[0075] After acquiring microscopic images of cerebrospinal fluid cells, the images are preprocessed, including at least one of the following: size adjustment, color normalization, noise suppression, and data augmentation.
[0076] It should be noted that data augmentation is only performed during the training phase.
[0077] For step S200, multi-scale features of cerebrospinal fluid cell microscopic images are extracted, including: multi-layer convolution and downsampling of cerebrospinal fluid cell microscopic images through a backbone network to obtain multi-scale features.
[0078] Specifically, the preprocessed input image is input into the backbone network for multi-layer convolution and downsampling to extract features, resulting in a multi-level feature map set with 2 to 4 layers.
[0079] For step S300, fusing multi-scale features to obtain fused features includes: fusing multi-scale features through a feature pyramid network by performing top-down and lateral connections to obtain fused features. For example, at least two layers from P2, P3, P4, and P5.
[0080] For step S400, the fused features are aligned to obtain aligned features, the aligned features are enhanced by frequency band modulation to obtain enhanced features, the enhanced features are fused to obtain unified features, and the target enhanced features are obtained from the unified features according to the preset output size.
[0081] Specifically, aligning the fused features yields aligned features, including spatial alignment of the fused features at each scale to the spatial resolution of the target layer and channel alignment to the channel dimensions of the target layer. Channel alignment can be achieved through 1×1 convolution, and spatial alignment can be achieved through interpolation.
[0082] Reference Figure 2 The enhanced features are obtained by frequency band modulation enhancement of the alignment features, including the following steps: Step S410: Perform a two-dimensional real-number fast Fourier transform on the alignment features to obtain the frequency domain features; Step S420: Generate frequency coordinates based on the size of the frequency domain features, and generate a frequency index map to distinguish different frequency regions based on the frequency coordinates. Step S430: Generate a frequency band mask for extracting frequency domain components of different frequency bands based on a preset frequency band division parameter list; Step S440: Decompose the frequency domain features using a frequency band mask to obtain low-frequency components, perform inverse Fourier transform on the low-frequency components to obtain spatial domain components corresponding to each frequency band, and perform adjacent frequency band difference on the spatial domain components to obtain frequency band residual components. Step S450: Generate spatial attention weights based on alignment features; Step S460: The results of multiplying the frequency band residual components of each frequency band with the corresponding spatial attention weights are summed to obtain the enhanced features.
[0083] Through steps S410 to S460, frequency domain transformation is performed on the feature map at each scale and frequency bands are divided to obtain at least two frequency band components; each frequency band component is modulated and fused based on attention weights to obtain the frequency domain enhancement features at that scale.
[0084] Reference Figure 3 Specifically, the implementation steps of frequency band modulation (FBM) enhancement are as follows.
[0085] Input feature preparation steps: The input feature map is X∈RB×C×H×W, where B is the batch size, C is the number of channels, and H and W are the spatial dimensions. The input feature map X serves as the input for the subsequent frequency domain transformation unit and the frequency band attention weight generation unit.
[0086] Frequency domain transformation step (executed by the frequency domain transformation unit): The frequency domain transformation unit performs a two-dimensional real-number fast Fourier transform (rFFT2) on X to obtain the frequency domain feature Xf. To adapt to practical engineering, a uniform computational precision can be used in the frequency domain calculation to ensure the stability of complex number operations, and then the numerical type can be kept consistent with the input in the output stage.
[0087] Frequency index and band mask construction steps (executed by the frequency index generation unit and the band mask generation unit): The frequency index generation unit generates frequency coordinates and forms a frequency index map based on the feature map space dimensions H and W, which is used to distinguish different frequency regions. Based on this, the band mask generation unit reads the preset band division parameter list K={k1,k2,...,kn}. For each kn, a band mask Mm is constructed, such that Mm selects regions in the frequency domain that meet the threshold condition (e.g., using 0.5 / kn as the frequency threshold division basis), thereby forming a decomposition sequence from low frequency to high frequency.
[0088] The step-by-step frequency band decomposition and spatial domain reconstruction (executed by the frequency band decomposition unit): The frequency band decomposition unit applies the frequency band mask Mm to the frequency domain feature Xf to obtain the low-frequency component, and obtains the spatial domain low-frequency map through the two-dimensional real inverse fast Fourier transform iRFFT2; the frequency band residual Hm obtained by the low-frequency difference of the adjacent layers is used to characterize the high-frequency / bandpass information of the frequency band, thereby forming the frequency band residual information of the step-by-step decomposition.
[0089] The frequency band attention generation step (executed by the frequency band attention weight generation unit) is as follows: The frequency band attention weight generation unit applies a channel-wise convolution to the input feature X (or its equivalent feature) to obtain a spatial weight map Am, which is then activated by Sigmoid to obtain the frequency band attention weights.
[0090] Frequency band weighted fusion output step (executed by the frequency band weighted fusion unit): The frequency band weighted fusion unit multiplies each frequency band residual Hm with the corresponding weight Am point by point and sums them to obtain the enhanced feature Y, i.e., the FBM output.
[0091] Through the above, frequency band modulation enhancement realizes the decomposition and reconstruction enhancement of frequency band information, and can be used as a sub-unit of the multi-scale enhancement module for the scale-by-scale enhancement processing of FPN output features.
[0092] By introducing a multi-scale feature enhancement module, the network can more fully integrate effective information from different scales and perform targeted enhancement on features of specified detection layers. This improves the issues of missed detections and false detections that easily occur under high confidence requirements, thereby enhancing the stability and reliability of the overall detection results. Simultaneously, the multi-scale enhancement approach strengthens the feature representation related to fine-grained structures and small-sized targets, exhibiting better adaptability to different staining effects, background interference, and imaging condition variations. It improves feature representation quality without altering the original detection process, making the model more suitable for detection scenarios with large differences in target scale and rich morphological details in cerebrospinal fluid cell microscopic images.
[0093] For step S500, detection is performed based on the target enhancement features to obtain the detection results, including the following steps: The detection head performs detection based on the target enhancement features to obtain candidate detection results, which include the target category, bounding box regression results, and confidence scores. Post-processing is performed on the candidate detection results to obtain the detection results. The post-processing includes at least one of the following: confidence threshold screening, non-maximum suppression (NMS), coordinate mapping, and formatted output.
[0094] The final detection results include the target location, category, and confidence level.
[0095] Furthermore, after specific target detection layers such as small target detection layers or feature fusion layers, modules such as channel attention, spatial attention, or hybrid attention can be superimposed to significantly enhance the fused features, thereby improving the model's response to specific target regions. This approach can also achieve certain enhancement effects by replacing different attention mechanisms.
[0096] In this embodiment, automated target detection is performed on user-inputted cerebrospinal fluid cell morphology images, thereby reducing the burden of manual image reading and annotation and improving the efficiency of image analysis and result output. This detector can be deployed and run on devices with varying computing power, facilitating use in various application environments such as laboratory workstations and edge computing devices. Furthermore, supporting functions have been improved at the detection result output level, enabling statistical counting of target cells based on model recognition results and supporting high-confidence screening and presentation of detected targets to assist users in completing target recognition and quantity statistics more efficiently.
[0097] By introducing a multi-scale feature enhancement module after the feature pyramid structure such as FPN, the network can more fully integrate effective information at different scales and perform targeted enhancement on the features of specified detection layers. This improves the issues of missed detections and false detections that easily occur under high confidence requirements, thereby enhancing the stability and reliability of the overall detection results. Simultaneously, the multi-scale enhancement approach strengthens the feature representation related to fine-grained structures and small-sized targets, exhibiting better adaptability to different staining effects, background interference, and imaging condition variations. It improves the quality of feature representation without altering the original detection process, making the model more suitable for detection scenarios with large differences in target scale and rich morphological details in cerebrospinal fluid cell microscopic images.
[0098] Embodiments of this application provide an electronic device. The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the cerebrospinal fluid cell microscopic image detection method described above.
[0099] This electronic device can be any smart terminal, including computers.
[0100] In general, for the hardware structure of electronic devices, the processor can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, to execute relevant programs and implement the technical solutions provided in the embodiments of this application.
[0101] The memory can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory and is called and executed by the processor.
[0102] Input / output interfaces are used to implement information input and output.
[0103] The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0104] The bus transmits information between various components of a device, such as the processor, memory, input / output interfaces, and communication interfaces. The processor, memory, input / output interfaces, and communication interfaces communicate with each other within the device via the bus.
[0105] Embodiments of this application provide a computer storage medium. The computer storage medium stores computer-executable instructions for performing the cerebrospinal fluid cell microscopic image detection method described above.
[0106] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium. In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0107] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0108] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0109] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0110] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms. Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
[0112] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method for detecting cerebrospinal fluid cells using microscopic images, characterized in that, include: Obtain microscopic images of cerebrospinal fluid cells; Multi-scale features are extracted from microscopic images of cerebrospinal fluid cells, and the multi-scale features are fused to obtain fused features. The fused features are aligned to obtain aligned features, the aligned features are enhanced by frequency band modulation to obtain enhanced features, the enhanced features are fused to obtain unified features, and the target enhanced features are obtained from the unified features according to a preset output size; Detection is performed based on the target enhancement features to obtain the detection results.
2. The method for detecting cerebrospinal fluid cells using microscopic images according to claim 1, characterized in that, The step of enhancing the alignment features through frequency band modulation to obtain enhanced features includes: Perform a two-dimensional real-number fast Fourier transform on the alignment features to obtain the frequency domain features; Frequency coordinates are generated based on the dimensions of the frequency domain features, and a frequency index map is generated based on the frequency coordinates to distinguish different frequency regions. A frequency band mask is generated based on a preset list of frequency band division parameters to extract frequency domain components of different frequency bands; The frequency domain features are decomposed using the frequency band mask to obtain low-frequency components. The low-frequency components are then subjected to inverse Fourier transform to obtain spatial domain components corresponding to each frequency band. The spatial domain components are then subjected to adjacent frequency band difference to obtain frequency band residual components. Spatial attention weights are generated based on the alignment features; The enhanced features are obtained by summing the results of multiplying the residual components of each frequency band with their corresponding spatial attention weights.
3. The method for detecting cerebrospinal fluid cells using microscopic images according to claim 1, characterized in that, After acquiring the microscopic images of cerebrospinal fluid cells, the microscopic images of cerebrospinal fluid cells are preprocessed, and the preprocessing includes at least one of the following: size adjustment, color normalization, noise suppression, and data augmentation.
4. The method for detecting cerebrospinal fluid cells using microscopic images according to claim 1, characterized in that, The multi-scale features extracted from the cerebrospinal fluid cell microscopic images include: Multi-scale features are obtained by performing multi-layer convolution and downsampling on the microscopic images of cerebrospinal fluid cells using a backbone network.
5. The method for detecting cerebrospinal fluid cells using microscopic images according to claim 1, characterized in that, The fusion of the multi-scale features to obtain the fused features includes: The multi-scale features are fused by performing top-down and lateral connection fusion processing on the feature pyramid network to obtain fused features.
6. The method for detecting cerebrospinal fluid cells using microscopic images according to claim 1, characterized in that, The step of aligning the fused features to obtain aligned features includes: Spatially align the fusion features at each scale to the spatial resolution of the target level and channel align them to the channel dimensions of the target level.
7. The method for detecting cerebrospinal fluid cells using microscopic images according to claim 1, characterized in that, The detection based on the target enhancement features to obtain the detection result includes: The detection head performs detection based on the target enhancement features to obtain candidate detection results, which include target category, bounding box regression results, and confidence scores. The candidate detection results are post-processed to obtain the detection results. The post-processing includes at least one of the following: confidence threshold screening, non-maximum suppression (NMS), coordinate mapping, and formatted output.
8. A cerebrospinal fluid cell microscopic image detection system, characterized in that, include: Image input unit, used to acquire microscopic images of cerebrospinal fluid cells; The backbone network is used to extract multi-scale features from cerebrospinal fluid cell microscopic images; A feature pyramid network is used to fuse the multi-scale features to obtain fused features; A multi-scale frequency domain enhancement and specific layer output module is used to align the fused features to obtain aligned features, enhance the aligned features by frequency band modulation to obtain enhanced features, fuse the enhanced features to obtain unified features, and obtain the target enhanced features from the unified features according to a preset output size; The detection head is used to perform detection based on the enhanced features of the target and obtain the detection result.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method for detecting cerebrospinal fluid cell microscopic images as described in any one of claims 1 to 8.
10. A computer storage medium, characterized in that, The device stores computer-executable instructions for performing the cerebrospinal fluid cell microscopic image detection method as described in any one of claims 1 to 8.