An egg target detection method and system based on fuzzy theory and time sequence correction
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN MUTUAL UNITED TECH CO LTD
- Filing Date
- 2026-06-09
- Publication Date
- 2026-08-07
AI Technical Summary
[0005]本发明提出了一种基于模糊理论与时序矫正的卵子目标检测方法及系统,以解决现有检测方法针对卵子视频中运动模糊导致的特征不确定性以及帧间运动导致的特征缺失导致检测精度不足、鲁棒性差的技术问题
(1)针对卵子目标检测中因运动模糊特征干扰导致检测精度不足的问题,本发明基于模糊理论与时序矫正理论构建端到端检测模型,通过Bi-TCN模块矫正运动模糊带来的特征偏差,利用高斯隶属函数量化并缓解特征不确定性,有效提升了卵子目标检测的准确性。
Smart Images

Figure CN122347591B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oocyte target detection technology, specifically to an oocyte target detection method and system based on fuzzy theory and temporal correction. Background Technology
[0002] Assisted Reproductive Technology (ART) is a crucial method for addressing human infertility. Accurate assessment of oocyte quality is an indispensable and critical step in the entire ART workflow, directly impacting oocyte retrieval efficiency and fertilization success rates. Oocyte target detection, as a fundamental step in the assessment process, plays a decisive role in subsequent oocyte retrieval operations. Vision-based target detection technology can significantly improve the machine's ability to identify and locate oocytes, providing reliable technical support for oocyte quality assessment.
[0003] However, in actual oocyte retrieval, the device needs to synchronously follow the oocyte's movement trajectory. Due to the combined effects of multiple factors, including the oocyte's own movement, device vibration, and image focal plane jitter, the acquired oocyte videos generally exhibit motion blur. This poses a severe challenge to visual detection models and exacerbates the difficulty of real-time detection and retrieval. Traditional oocyte detection methods primarily rely on single-frame image information for target recognition, ignoring the correlation between the oocyte's movement path and the effective oocyte region across consecutive frames. Therefore, stable and reliable target detection is difficult to achieve under motion blur interference. While some deep learning-based detection methods introduce feature fusion mechanisms to enhance the model's detection capabilities, they often overlook the interference of blurred features on the detection results in practical applications, failing to perform targeted deblurring at the feature level.
[0004] Existing technologies fail to effectively balance the demands for lightweight feature extraction and high detection accuracy, and lack specific design for the motion characteristics and morphological changes of oocytes under motion fuzziness conditions. This results in limited detection accuracy and makes it difficult to guarantee the precision and stability of real-time oocyte target detection and grasping. Therefore, developing a method that can fully utilize the temporal information of the oocyte target, possess strong anti-fuzziness capabilities, and balance detection accuracy and real-time performance, to provide reliable technical support for precise oocyte target grasping devices, has become a key technical requirement for optimizing the ART process. Summary of the Invention
[0005] This invention proposes an egg target detection method and system based on fuzzy theory and temporal correction to solve the technical problems of insufficient detection accuracy and poor robustness caused by feature uncertainty due to motion blur in egg videos and feature loss due to inter-frame motion in existing detection methods.
[0006] To address the aforementioned technical problems, this invention provides a method for oocyte target detection based on fuzzy theory and temporal correction, comprising the following steps: Step S1: Construct an oocyte target detection model, which sequentially includes a YOLOv8-based backbone network module, a fuzzy feature extraction module, a multi-scale fuzzy fusion module, a fuzzy attention enhancement module, and a detection and classification module; The backbone network module outputs three feature maps with different spatial resolutions: a large-scale feature map, a medium-scale feature map, and a small-scale feature map. The fuzzy feature extraction module includes a global pooling enhancement module GPBlock and a temporal correction module Bi-TCN. The multi-scale fuzzy fusion module and the fuzzy attention enhancement module are both implemented based on the Gaussian membership function. Step S2: Obtain the oocyte video and split it into multiple oocyte images. After labeling the oocyte bounding boxes, divide it into training set, validation set and test set. Use the total loss function, which includes fuzzy feature loss and detection loss, to train the oocyte target detection model end-to-end. Step S3: Input the video of the oocyte to be detected frame by frame into the trained oocyte target detection model, and output the detection result after deblurring and temporal feature fusion processing.
[0007] Preferably, the global pooling enhancement module GPBlock consists of three cascaded feature pooling enhancement units, which respectively receive feature maps of three scales output by the backbone network module; each feature pooling enhancement unit consists of a lightweight feature reuse module GhostBlock and a pooling enhancement layer PE; the oocyte features are first subjected to feature dimensionality reduction to generate feature maps by the lightweight feature reuse module GhostBlock, and then the global and local features are fused and enhanced by the pooling enhancement layer PE.
[0008] Preferably, the expression for generating the feature map by the lightweight feature reuse module GhostBlock is: ; in, Indicates the first The feature pooling enhancement unit. The features are obtained by performing a 1×1 convolution on the egg features output from the pre-module. For the first A 3×3 depthwise separable convolution This represents the number of depthwise separable convolutions. Indicates the first Feature mapping; The expression for the pooling enhancement layer PE is: ; in, Indicates the first k Pooling is used to enhance each feature map. Indicates global average pooling. This is the activation function.
[0009] Preferably, the temporal correction module Bi-TCN consists of three sets of forward branches and backward branches, as well as a feature buffer. The forward branches and backward branches of each set share three layers of 3×3 depthwise separable convolutions. The first set of forward branches and backward branches are applied to the large-scale feature map, the second set is applied to the medium-scale feature map, and the third set is applied to the small-scale feature map. When processing the egg features of the first frame, the three groups of branches respectively receive the large-scale feature map, the medium-scale feature map and the small-scale feature map of the current frame after being processed by the global pooling enhancement module GPBlock, and store them in the feature buffer as historical frame features after processing by the forward branch; Starting from the second frame, the Bi-TCN retrieves the historical features of the previous frame from the feature buffer as a reference benchmark. The forward branch uses the egg region of the historical frame as a reference feature mask, calculates the pixel-level Euclidean distance between the current frame features and the reference feature mask to obtain the deviation, and fills the current frame with the effective features of the historical frame according to the deviation ratio to obtain the calibrated current frame features. The backward branch uses historical frame features as a verification benchmark, inputs the calibrated current frame features in reverse into the convolutional layer, calculates the temporal consistency deviation and generates a reverse calibration matrix to correct the position of the egg region in the current frame; finally, it supplements the original feature information through residual connections and stores the corrected current frame features in the feature buffer as historical features for the next frame.
[0010] Preferably, the workflow of the multi-scale fuzzy fusion module includes: The system receives the large-scale feature map, the medium-scale feature map, and the small-scale feature map output by the fuzzy feature extraction module, and unifies the number of channels through a 1×1 convolution. It then uses three independent Gaussian membership functions to map the large-scale, medium-scale, and small-scale feature maps to the fuzzy domain. The fuzzified feature maps are then subjected to a 3×3 convolution to achieve information interaction, and the response values of each channel are calculated through spatial aggregation. Finally, based on the principle of maximum membership, oocyte features are selected, and a fused feature map is output.
[0011] Preferably, the expression for calculating the Gaussian membership function is: ; in, For the current scale index, The range is the adjacent scale indices of the current scale index. Indicates the first The first channel The membership function for the th... Membership degree of each scale feature map The first one after processing by the pre-module Each scale feature map and The first The first channel Learnable mean and variance of Gaussian membership functions; After calculating the response values of each channel through spatial aggregation, a fuzzy weight matrix is generated by selecting the index of the maximum response based on the maximum membership principle using argmax. Finally, reliable oocyte characteristics are output. .
[0012] Preferably, the fuzzy attention enhancement module includes a fuzzy channel attention submodule (FCA) and a fuzzy spatial attention submodule (FSA), and its workflow includes: The FCA performs global average pooling on the input oocyte features to generate channel confidence vectors. After passing through two layers of 1×1 convolution and a Sigmoid activation function, the channel weights are output. The channel weights are then multiplied element-wise with the original oocyte features to obtain the oocyte channel enhancement features. The FSA divides the egg channel enhancement features into H×W feature groups according to pixel position. Each feature group is spatially blurred by three shared Gaussian membership functions. The blurred features are then sequentially passed through 3×3 group convolution, 1×1 convolution and Softmax activation function to output spatial weights. The fuzzy attention enhancement feature map is obtained by multiplying the channel weights and spatial weights element by element and then weighting the egg channel enhancement features.
[0013] Preferably, the total loss function in step S2 The calculation expression is: ; in, and To balance constants, The weighted cross-entropy loss is used to constrain the discriminative power of the oocyte fuzzy domain features. The weighted sum of the detection loss and classification loss is used to optimize the accuracy of bounding box detection and category classification.
[0014] Preferably, in step S2, the SGD optimizer and cosine learning rate scheduler are used to train the egg target detection model.
[0015] This invention also provides an oocyte target detection system based on fuzzy theory and temporal correction, implemented using the above method, comprising: The backbone network module based on YOLOv8 is used to extract features from oocyte frames and output three feature maps with different spatial resolutions: large-scale feature map, medium-scale feature map, and small-scale feature map. The fuzzy feature extraction module is connected to the backbone network module. It captures global and local features of the egg through the global pooling enhancement module GPBlock and captures the inter-frame positional relationship and motion features of the egg target through the temporal correction module Bi-TCN. A multi-scale fuzzy fusion module, connected to the fuzzy feature extraction module, maps multi-scale oocyte features to the fuzzy domain through three independent Gaussian membership functions, and selects effective features based on the principle of maximum membership. The fuzzy attention enhancement module, connected to the multi-scale fuzzy fusion module, includes a fuzzy channel attention submodule FCA and a fuzzy spatial attention submodule FSA, used to generate defuzzified egg features; The detection and classification module is connected to the fuzzy attention enhancement module to achieve accurate detection of the egg target based on the defuzzified egg features.
[0016] The beneficial effects of the present invention include at least the following: (1) To address the problem of insufficient detection accuracy caused by motion fuzzy features in oocyte target detection, this invention constructs an end-to-end detection model based on fuzzy theory and temporal correction theory. The Bi-TCN module corrects the feature deviation caused by motion fuzziness, and the Gaussian membership function is used to quantify and alleviate feature uncertainty, effectively improving the accuracy of oocyte target detection.
[0017] (2) In view of the problem that existing technologies are difficult to balance the requirements of lightweight and high detection accuracy, this invention uses the collaborative design of the lightweight feature reuse module GhostBlock and the pooling enhancement unit PE in GPBlock to enhance the ability to capture global and local features of the egg target while ensuring the real-time performance of the model, thus achieving an effective balance between real-time detection and accuracy.
[0018] (3) To address the problem of high uncertainty in oocyte features caused by motion blur, this invention designs a multi-dimensional loss function that includes fuzzy feature loss and target detection loss to optimize the model in a coordinated manner. This not only improves the feature discrimination of the oocyte fuzzy domain, but also enhances the accuracy of the model's bounding box detection and category classification. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention; Figure 2This is a schematic diagram of the structure of the timing correction module Bi-TCN, the global pooling enhancement module GPBlock, the multi-scale fuzzy fusion module FFM, and the detection network in an embodiment of the present invention; Figure 3 This is a schematic diagram of the detection head and its internal fuzzy attention enhancement module in an embodiment of the present invention; Figure 4 This is a schematic diagram of the fuzzy oocyte target detection results provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0021] like Figure 1 As shown, this embodiment of the invention provides a method for oocyte target detection based on fuzzy theory and temporal correction. The method includes the following steps: Step S1: Construct an oocyte target detection model, which includes a YOLOv8-based backbone network module, a fuzzy feature extraction module, a multi-scale fuzzy fusion module, a fuzzy attention enhancement module, and a detection and classification module.
[0022] The oocyte target detection model constructed in this invention adopts an end-to-end architecture, comprising five core components: a YOLOv8-based backbone network module, a fuzzy feature extraction module, a multi-scale fuzzy fusion module, a fuzzy attention enhancement module, and a detection and classification module. The backbone network module is responsible for extracting basic features from the input oocyte image frames and outputting three feature maps with different spatial resolutions: large-scale, medium-scale, and small-scale feature maps, providing multi-level feature representations for subsequent deblurring and enhancement processing. The fuzzy feature extraction module consists of two sub-modules: a global pooling enhancement module (GPBlock) and a temporal correction module (Bi-TCN). Both the multi-scale fuzzy fusion module and the fuzzy attention enhancement module use Gaussian membership functions to perform fuzzification and enhancement of features. The overall network structure is as follows: Figure 2 As shown, the synergistic effect of each module enables the effective capture of fuzzy oocyte features, thereby improving the accuracy and robustness of detection.
[0023] like Figure 2As shown, the global pooling enhancement module GPBlock consists of three cascaded feature pooling enhancement units, which respectively receive large-scale, medium-scale, and small-scale feature maps output by the backbone network module. Each feature pooling enhancement unit consists of two parts: a lightweight feature reuse module GhostBlock and a pooling enhancement layer PE. This design can effectively improve the model's ability to capture oocyte feature context information while reducing the number of model parameters.
[0024] During feature processing, the egg features are first subjected to lightweight convolution in GhostBlock for dimensionality reduction, generating a compact feature map. The expression for GhostBlock generating feature maps in each feature pooling enhancement unit is: in, Indicates the first The feature pooling enhancement unit. The features are obtained by performing a 1×1 convolution on the egg features output from the pre-module. For the first A 3×3 depthwise separable convolution This represents the number of depthwise separable convolutions. Indicates the first Each feature mapping, This indicates a feature splicing operation.
[0025] Subsequently, the generated first Feature mapping The pooling enhancement layer (PE) is used to fuse and enhance global and local features to improve the discriminative power of oocyte features. The processing expression for the pooling enhancement layer (PE) is as follows: ; in, Indicates the first k The output of each feature map is enhanced by pooling. GAP represents global average pooling, and Sigmoid is the activation function used to generate channel weights. This design obtains global statistical information for each channel through global average pooling, generates adaptive channel weights using the Sigmoid function, and then performs weighted fusion with the original features, thereby achieving synergistic enhancement of global and local features.
[0026] After the three feature pooling enhancement units process the feature maps at the three scales respectively, the outputs of each unit are... 、 and The final output of GPBlock is obtained by channel fusion using 1×1 convolution. : ; This provides enhanced multi-scale feature representations for subsequent temporal correction processing.
[0027] The temporal correction module Bi-TCN aims to correct oocyte feature deviations caused by motion by capturing inter-frame temporal information from oocyte videos. For example... Figure 2 As shown, Bi-TCN consists of three sets of forward and backward branches, as well as a feature buffer. Each set of forward and backward branches shares three 3×3 depthwise separable convolutional layers, and the number of input and output channels is adapted to GPBlock. The three sets of branches operate on feature maps of different scales: the first set operates on large-scale feature maps, the second set operates on medium-scale feature maps, and the third set operates on small-scale feature maps.
[0028] When processing the features of the first frame of eggs, the three branches respectively receive the large-scale feature map, medium-scale feature map, and small-scale feature map of the current frame after processing by the global pooling enhancement module GPBlock. After the features of the first frame are processed by the forward branch, the three scale feature maps of the frame are stored in the feature buffer and marked as historical frame features, which serve as a reference benchmark for subsequent frame processing.
[0029] Starting from the second frame, Bi-TCN first retrieves three scales of historical features from the previous frame as reference benchmarks from the feature buffer. Each reference benchmark is paired with the new input features of the same scale in the current frame, and the paired features are then input into their corresponding bidirectional convolutional branches. In the forward branch, the egg region obtained from the convolutional processing of the historical frame is used as a reference feature mask. The pixel-level Euclidean distance between the current frame features and the reference feature mask is calculated to quantize the deviation, thereby obtaining the missing feature information of the egg region caused by motion blur. By calculating the deviation ratio, the effective features from the historical frames are filled into the current frame according to the deviation ratio, thus achieving the calibration of the current frame features.
[0030] The backward branch uses historical frame features as a verification benchmark. It inputs the current frame features, calibrated by the forward branch, into the convolutional layer and calculates the temporal consistency deviation between the two based on the temporal trajectory of the historical frame features. For the detected deviation regions, the backward branch generates a reverse calibration matrix to perform position correction calibration on the egg region of the current frame, ensuring that the calibrated features maintain temporal consistency.
[0031] Finally, residual connections are used to supplement the original feature information of each branch, resulting in temporally corrected oocyte features at three scales. Simultaneously, the corrected current frame features are stored in the feature buffer, replacing the original historical frame features, and used as a reference for the next frame. This rolling update mechanism ensures that Bi-TCN can continuously track the motion trajectory of the oocyte target, effectively correcting feature biases caused by motion blur.
[0032] like Figure 2 As shown, the multi-scale fuzzy fusion module FFM receives the large-scale feature map, medium-scale feature map, and small-scale feature map output by the fuzzy feature extraction module. First, it unifies the number of channels of the three scale feature maps to 256 through 1×1 convolution to facilitate subsequent fuzzification processing and feature fusion.
[0033] FFM employs three independent Gaussian membership functions to map large-scale, medium-scale, and small-scale feature maps to the fuzzy domain, respectively, to quantify and explicitly represent the uncertainty of each feature point. The Gaussian membership functions are initialized according to a standard normal distribution and are used to calculate the feature reliability of each channel of the oocyte feature in a motion-fuzzy scenario. The expression for calculating the Gaussian membership function is as follows: ; in, For the current scale index, The range is the adjacent scale indices of the current scale index. Indicates the first The first channel The membership function for the th... Membership degree of each scale feature map The first one after processing by the pre-module Each scale feature map and The first The first channel Learnable mean and variance parameters of a Gaussian membership function; ; in, Indicates the first The first scale, the first Membership matrix of membership functions This indicates splicing by channel dimension.
[0034] The calculated fuzzy feature maps are convolved using 3×3 to achieve information interaction, and the response values of each channel are calculated through spatial aggregation. ; ; in, Indicates the first A fuzzy map at various scales, This represents a 3×3 convolution; ; in, Indicates the first The first scale, the first Spatial aggregated response value of each channel Indicates the total number of channels. , Represents the spatial coordinates of the feature map. and Indicates the height of the feature map; Based on the principle of maximum membership, the maximum response index of each channel is selected through the argmax operation to generate a fuzzy weight matrix. ; in It is a fuzzy weight matrix, where argmax represents selecting the maximum index. This is an index mapping function.
[0035] Finally, the output is processed by the fuzzy weight matrix. Weighted reliable oocyte characteristics This effectively reduces the interference of uncertainty in egg features caused by motion blur, and yields a multi-scale deblurred fusion feature map.
[0036] like Figure 3 As shown, the fuzzy attention enhancement module (FA) includes two sub-modules: the fuzzy channel attention sub-module (FCA) and the fuzzy spatial attention sub-module (FSA). It enhances the recognizability of oocyte features through a dual-dimensional attention mechanism of channel and space.
[0037] The FCA submodule first performs global average pooling on the input oocyte features to generate a channel confidence vector, which represents the importance of each channel feature. Then, the channel confidence vector is processed through two layers of 1×1 convolutions and a sigmoid activation function to output the channel weights of the original oocyte features. In the generated channel weights, high-weight channels correspond to the oocyte's detailed texture features, while low-weight channels correspond to the oocyte's background and noise features. Finally, the channel weights are multiplied element-wise with the original oocyte features to obtain an oocyte channel enhancement feature of shape 256×H×W, where H is the height of the feature map and W is the width of the feature map.
[0038] The FSA submodule receives the enhanced oocyte channel features processed by FCA and divides them into H×W feature groups based on pixel location, with each feature group containing 256 feature points. Each feature group undergoes spatial blurring using three shared Gaussian membership functions, mapping the oocyte features to the blur domain to quantify the uncertainty of spatial location. The blurred features are then sequentially passed through 3×3 grouped convolution, 1×1 convolution, and a Softmax activation function to output the spatial weights of the oocyte features. In the spatial weight distribution, high-weight spatial regions represent the target region where the oocyte is located, and low-weight spatial regions represent the background region where the oocyte is located.
[0039] Finally, the channel weights generated by FCA and the spatial weights generated by FSA are multiplied element-wise to obtain the joint attention weights. These joint weights are then weighted onto the oocyte channel enhancement features to obtain the fuzzy attention-enhanced feature map. Through a dual-dimensional attention mechanism of channel and space, the fuzzy attention enhancement module improves the model's ability to capture oocyte targets from both the feature dimension and the spatial dimension, effectively enhancing the recognition of oocyte features.
[0040] The detection and classification module is connected to the fuzzy attention enhancement module, receiving defuzzified oocyte features to achieve accurate detection of the oocyte target. This module is based on the YOLOv8 detection head design and includes bounding box regression and class classification branches, which output the oocyte target's location coordinates and class confidence scores, respectively, completing the final oocyte target detection task.
[0041] Step S2: Obtain the oocyte video and split it into multiple oocyte images. After labeling the oocyte bounding boxes, divide it into training set, validation set and test set. Use the total loss function, which includes fuzzy feature loss and detection loss, to train the oocyte target detection model end-to-end.
[0042] Specifically, oocyte video data is acquired, the video is split into multiple oocyte images, and bounding boxes are annotated for the oocyte targets in each frame. The annotated data is then divided into training, validation, and test sets according to a preset ratio for model training and performance evaluation.
[0043] This invention employs a total loss function, including fuzzy feature loss and detection loss, to perform end-to-end training of the oocyte target detection model. Total loss function The calculation expression is: ; in, and This is a tradeoff constant used to balance the contributions of the two types of losses. The weighted cross-entropy loss is used to constrain the discriminative power of the fuzzy domain features of the egg, prompting the model to learn more discriminative fuzzy feature representations. This is a weighted sum of the detection box loss and the classification loss, used to optimize the model's bounding box detection accuracy and class classification accuracy. Through collaborative optimization of multi-task losses, it addresses issues such as feature uncertainty caused by motion blur and missing features between frames in oocyte videos, achieving a comprehensive improvement in model detection accuracy.
[0044] During training, the SGD optimizer is used for parameter updates, and a cosine learning rate scheduler is used to dynamically adjust the learning rate. Specifically, the initial learning rate is set to 1×10⁻⁶. -4The batch size is 16, and the training epochs are 1000. The cosine learning rate scheduler can maintain a large learning rate in the early stage of training for fast convergence, and gradually reduce the learning rate in the later stage of training for fine-tuning, which helps the model reach a better convergence state.
[0045] Step S3: Input the video of the oocyte to be detected frame by frame into the trained oocyte target detection model, and output the detection result after deblurring and temporal feature fusion processing.
[0046] Finally, the video of the oocytes to be detected is input frame by frame into the trained oocyte target detection model. The input video frames first pass through the backbone network module to extract multi-scale basic features, then sequentially through the fuzzy feature extraction module for global feature enhancement and temporal correction, the multi-scale fuzzy fusion module for feature fuzzification and fusion, and the fuzzy attention enhancement module for channel and spatial attention enhancement. Finally, the detection and classification module outputs the oocyte target detection results, as shown below. Figure 4 As shown, this includes the target bounding box coordinates and class confidence.
[0047] To verify the effectiveness of the proposed method, a comparative experiment was conducted between the detection model of this invention and mainstream detection networks. Experimental results show that the accuracy of the classic convolutional network ResNet50 is 75.3%, the detection accuracy of the mainstream visual Transformer model is 80.6%, while the detection accuracy of the method of this invention reaches 89.2%, significantly outperforming both of these mainstream approaches.
[0048] To clarify the contribution of each core module to the overall performance, further ablation experiments were designed for analysis. Removing the fuzzy feature extraction module reduced the model accuracy to 87.8%, indicating that the fuzzy feature extraction module effectively improved the model's ability to extract fuzzy oocyte features. Removing the multi-scale fuzzy fusion module reduced the accuracy to 80.5%, indicating that this module significantly improved the model's detection level for small-scale targets. Removing the fuzzy attention enhancement module from the detection head reduced the accuracy to 84.5%, indicating that this module significantly improved the model's detection accuracy. The ablation experiment results fully validated the rationality and effectiveness of the design of each core module in this invention.
[0049] This invention also provides an oocyte target detection system based on fuzzy theory and temporal correction, implemented using the above method. The system includes: The YOLOv8-based backbone network module is used to extract features from oocyte frames and output three feature maps with different spatial resolutions: large-scale feature map, medium-scale feature map, and small-scale feature map.
[0050] The fuzzy feature extraction module is connected to the backbone network module. It captures the global and local features of the egg through the feature pooling enhancement unit in the global pooling enhancement module GPBlock, and captures the inter-frame positional relationship and motion features of the egg target through the temporal correction module Bi-TCN, making the egg information output by the module more robust.
[0051] The multi-scale fuzzy fusion module, connected to the fuzzy feature extraction module, maps multi-scale oocyte features to the fuzzy domain using three independent Gaussian membership functions for features at different scales of the oocyte, and selects effective features based on the principle of maximum membership degree to obtain multi-scale defuzzified oocyte features.
[0052] The fuzzy attention enhancement module, connected to the multi-scale fuzzy fusion module, includes the fuzzy channel attention submodule FCA and the fuzzy spatial attention submodule FSA. FCA enhances the detailed texture feature channels of the oocyte and suppresses noise channels through a channel attention mechanism, while FSA accurately locates the spatial region where the oocyte is located through a Gaussian membership function. Based on the channel weights and spatial weights generated by the two submodules, defuzzified oocyte features are generated, improving the recognizability of oocyte features.
[0053] The detection and classification module, connected to the fuzzy attention enhancement module, achieves accurate detection of oocyte targets based on defuzzified oocyte features.
[0054] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described; only preferred embodiments of the present invention are illustrated. The descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. As long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0055] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this invention should be determined by the appended claims.
Claims
1. A method for detecting oocytes based on fuzzy theory and temporal correction, characterized in that, Includes the following steps: Step S1: Construct an oocyte target detection model, which sequentially includes a YOLOv8-based backbone network module, a fuzzy feature extraction module, a multi-scale fuzzy fusion module, a fuzzy attention enhancement module, and a detection and classification module; The backbone network module outputs three feature maps with different spatial resolutions: a large-scale feature map, a medium-scale feature map, and a small-scale feature map. The fuzzy feature extraction module includes a global pooling enhancement module GPBlock and a temporal correction module Bi-TCN. The multi-scale fuzzy fusion module and the fuzzy attention enhancement module are both implemented based on the Gaussian membership function. Step S2: Obtain the oocyte video and split it into multiple oocyte images. After labeling the oocyte bounding boxes, divide it into training set, validation set and test set. Use the total loss function, which includes fuzzy feature loss and detection loss, to train the oocyte target detection model end-to-end. Step S3: Input the video of the oocyte to be detected frame by frame into the trained oocyte target detection model, and output the detection result after deblurring and temporal feature fusion processing; The global pooling enhancement module GPBlock consists of three cascaded feature pooling enhancement units, which respectively receive feature maps of three scales output by the backbone network module; each feature pooling enhancement unit consists of a lightweight feature reuse module GhostBlock and a pooling enhancement layer PE; the oocyte features are first processed by the lightweight feature reuse module GhostBlock to perform feature dimensionality reduction to generate feature maps, and then the global and local features are fused and enhanced by the pooling enhancement layer PE; The lightweight feature reuse module GhostBlock generates the following expression for the feature mapping: ; in, Indicates the first The feature pooling enhancement unit. The features are obtained by performing a 1×1 convolution on the egg features output from the pre-module. For the first A 3×3 depthwise separable convolution This represents the number of depthwise separable convolutions. Indicates the first Each feature mapping, Indicates feature concatenation operation; The expression for the pooling enhancement layer PE is: ; in, Indicates the first k Pooling is used to enhance each feature map. Indicates global average pooling. For activation functions; The timing correction module Bi-TCN consists of three sets of forward branches and backward branches, as well as a feature buffer. Each set of forward and backward branches shares three 3×3 depthwise separable convolutional layers. The first set of forward and backward branches operates on the large-scale feature map, the second set operates on the medium-scale feature map, and the third set operates on the small-scale feature map. When processing the egg features of the first frame, the three groups of branches respectively receive the large-scale feature map, the medium-scale feature map and the small-scale feature map of the current frame after being processed by the global pooling enhancement module GPBlock, and store them in the feature buffer as historical frame features after processing by the forward branch; Starting from the second frame, the Bi-TCN retrieves the historical features of the previous frame from the feature buffer as a reference benchmark. The forward branch uses the egg region of the historical frame as a reference feature mask, calculates the pixel-level Euclidean distance between the current frame features and the reference feature mask to obtain the deviation, and fills the current frame with the effective features of the historical frame according to the deviation ratio to obtain the calibrated current frame features. The backward branch uses historical frame features as a verification benchmark, inputs the calibrated current frame features in reverse into the convolutional layer, calculates the temporal consistency deviation and generates a reverse calibration matrix to correct the position of the egg region in the current frame; finally, it supplements the original feature information through residual connections and stores the corrected current frame features in the feature buffer as historical features for the next frame.
2. The oocyte target detection method based on fuzzy theory and temporal correction according to claim 1, characterized in that, The workflow of the multi-scale fuzzy fusion module includes: The system receives the large-scale feature map, the medium-scale feature map, and the small-scale feature map output by the fuzzy feature extraction module, and unifies the number of channels through a 1×1 convolution. It then uses three independent Gaussian membership functions to map the large-scale, medium-scale, and small-scale feature maps to the fuzzy domain. The fuzzified feature maps are then subjected to a 3×3 convolution to achieve information interaction, and the response values of each channel are calculated through spatial aggregation. Finally, based on the principle of maximum membership, oocyte features are selected, and a fused feature map is output.
3. The oocyte target detection method based on fuzzy theory and temporal correction according to claim 2, characterized in that, The expression for calculating the Gaussian membership function is as follows: ; in, For the current scale index, The range is the adjacent scale indices of the current scale index. Indicates the first The first channel The membership function for the th... Membership degree of feature maps at each scale. The first one after processing by the pre-module Each scale feature map and The first The first channel Learnable mean and variance of Gaussian membership functions; After calculating the response values of each channel through spatial aggregation, a fuzzy weight matrix is generated by selecting the index of the maximum response based on the maximum membership principle using argmax. Finally, reliable oocyte characteristics are output. .
4. The oocyte target detection method based on fuzzy theory and temporal correction according to claim 1, characterized in that, The fuzzy attention enhancement module includes a fuzzy channel attention submodule FCA and a fuzzy spatial attention submodule FSA. Its workflow includes: The FCA performs global average pooling on the input oocyte features to generate channel confidence vectors. After passing through two layers of 1×1 convolution and a Sigmoid activation function, the channel weights are output. The channel weights are then multiplied element-wise with the original oocyte features to obtain the oocyte channel enhancement features. The FSA divides the egg channel enhancement features into H×W feature groups according to pixel position. Each feature group is spatially blurred by three shared Gaussian membership functions. The blurred features are then sequentially passed through 3×3 group convolution, 1×1 convolution and Softmax activation function to output spatial weights. The fuzzy attention enhancement feature map is obtained by multiplying the channel weights and spatial weights element by element and then weighting the egg channel enhancement features.
5. The oocyte target detection method based on fuzzy theory and temporal correction according to claim 1, characterized in that, The total loss function described in step S2 The calculation expression is: ; in, and To balance constants, The weighted cross-entropy loss is used to constrain the discriminative power of the oocyte fuzzy domain features. The weighted sum of the detection loss and classification loss is used to optimize the accuracy of bounding box detection and category classification.
6. The oocyte target detection method based on fuzzy theory and temporal correction according to claim 1, characterized in that, In step S2, the SGD optimizer and cosine learning rate scheduler are used to train the oocyte target detection model.
7. An oocyte target detection system based on fuzzy theory and temporal correction, characterized in that, Based on the method described in any one of claims 1 to 6, it includes: The backbone network module based on YOLOv8 is used to extract features from oocyte frames and output three feature maps with different spatial resolutions: large-scale feature map, medium-scale feature map, and small-scale feature map. The fuzzy feature extraction module is connected to the backbone network module. It captures global and local features of the egg through the global pooling enhancement module GPBlock and captures the inter-frame positional relationship and motion features of the egg target through the temporal correction module Bi-TCN. A multi-scale fuzzy fusion module, connected to the fuzzy feature extraction module, maps multi-scale oocyte features to the fuzzy domain through three independent Gaussian membership functions, and selects effective features based on the principle of maximum membership. The fuzzy attention enhancement module, connected to the multi-scale fuzzy fusion module, includes a fuzzy channel attention submodule FCA and a fuzzy spatial attention submodule FSA, used to generate defuzzified egg features; The detection and classification module is connected to the fuzzy attention enhancement module to achieve accurate detection of the oocyte target based on the defuzzified oocyte features.
Citation Information
Patent Citations
ESB-YOLO model cultured fish school detection method based on channel non-dimensionality reduction attention mechanism and improved YOLOv5
CN115690675A
Dam hidden danger troubleshooting method and system
CN121999437A