Multi-target fusion cow oestrus behavior detection method and system

Through the PBF-YOLO algorithm, combined with image enhancement and feature aggregation module, the problems of low accuracy and insufficient multi-scale perception ability in cow estrus behavior detection are solved, and fast and accurate detection in the cow shed environment is achieved, which improves detection accuracy and Practical value.

CN119296139APending Publication Date: 2025-01-10INNER MONGOLIA UNIV OF TECH

Patent Information

Application Number
CN202411553406.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-02
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The prior art has problems such as low accuracy, insufficient multi-scale perception ability and difficult to capture spatial position relationships in the detection of cow estrus behavior, especially in the cattle shed environment, which is difficult to accurately distinguish between estrus cows and ordinary cows.

Method used

The PBF-YOLO algorithm is adopted, combined with image enhancement, lightweight module, background information enhancement module and feature aggregation module, and cow estrus behavior detection is carried out through the YOLOv8n network to improve detection accuracy and speed.

Benefits of technology

The rapid and accurate detection of cow estrus behavior in the cow shed environment is achieved, the model's ability to distinguish backgrounds and capture cross-channel information is improved, the model's complexity and computing overhead are reduced, and the detection accuracy and practical value are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296139A_ABST
    Figure CN119296139A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-target fusion dairy cow oestrus behavior detection method and system, and belongs to the technical field of target detection of deep learning. The method comprises the following steps: S1, collecting a dairy cow oestrus behavior image, and performing image enhancement on the dairy cow oestrus behavior image; s2, constructing a PBF-YOLO deep learning network model, wherein the PBF-YOLO deep learning network model comprises a lightweight module, a background information enhancement module and a feature aggregation module; and S3, identifying a dairy cow oestrus behavior region of interest through the PBF-YOLO deep learning network model, and detecting the dairy cow oestrus behavior. The invention provides a solution for the situation that the existing lightweight algorithm is low in detection precision and poor in robustness due to the fact that the cow oestrus behavior and other background features are similar and are difficult to distinguish in an actual pasture and cows with different scales appear on the same image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of deep learning target detection, and more specifically to a multi-target fusion dairy cow estrus behavior detection method and system. Background Art

[0002] In large-scale and intensive farming, timely and accurate monitoring of estrus cows and artificial breeding and reproduction management can effectively shorten the time interval between birth and calving and ensure the economic benefits of the ranch. The traditional method is to manually observe the behavioral signs of estrus cows (such as increased activity, sniffing each other, standing and jumping, etc.) and physiological status to determine whether the cows are in estrus. However, the traditional manual observation method is not only time-consuming and laborious, but also has limited accuracy, which is especially difficult in large-scale farms. Therefore, the study of real-time and accurate monitoring of individual estrus in dairy cows is of great significance to modern dairy farming.

[0003] In recent years, with the introduction of video image processing algorithms in the field of computer vision, researchers have adopted a method based on video image processing to identify animal behavior. The animal estrus behavior recognition method based on video image processing improves animal welfare, but this method requires manual feature extraction, is inefficient and has a certain degree of subjectivity. Because convolutional neural networks have good feature extraction and generalization capabilities and can learn effective feature representations from complex image data, dairy cow estrus monitoring based on deep learning technologies such as convolutional neural networks has gradually attracted attention. With the continuous development of deep learning, two-stage detection algorithms represented by RCNN, Fast-RCNN, etc. and one-stage detection algorithms represented by YOLO, SSD, etc. have achieved good results in detection accuracy and speed. Livestock target detection and recognition algorithms based on deep learning have broad application prospects. However, although the current algorithm has a certain effect on monitoring the estrus behavior of dairy cows, there are still many difficulties in practical application: first, because estrus cows are similar to ordinary cows and are difficult to distinguish, high-precision detection is required to detect the estrus behavior of dairy cows in a cowshed environment; second, dairy cows are in the growth and development stage and vary in size, which will cause cows of multiple scales to appear in the same image, requiring the detector to have a high multi-scale perception ability; finally, dairy cows have a large range of activities, changeable behavior and posture, and their position distribution in space is prone to change, so the detector needs to spatially perceive the relationship between cows in different spatial positions.

[0004] Therefore, how to provide a multi-target fusion dairy cow estrus behavior detection method and system that can solve the above problems is a problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] In view of this, the present invention provides a multi-target fusion dairy cow estrus behavior detection method and system, and proposes a PBF-YOLO algorithm for monitoring the estrus behavior of dairy cows in pastures based on the lightweight network YOLOV8n, so as to achieve fast and accurate detection of dairy cow estrus behavior.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A multi-target fusion dairy cow estrus behavior detection method, comprising:

[0008] S1: collecting cow estrus behavior images, and performing image enhancement on the cow estrus behavior images;

[0009] S2: constructing a PBF-YOLO deep learning network model, wherein the PBF-YOLO deep learning network model includes: a lightweight module, a background information enhancement module, and a feature aggregation module;

[0010] S3: The PBF-YOLO deep learning network model is used to identify the cow estrus behavior interest area and detect the cow estrus behavior.

[0011] Preferably, S1: collecting cow estrus behavior images and performing image enhancement on the cow estrus behavior images, including:

[0012] Collect images of cow estrus behavior;

[0013] The cow estrus behavior image is decomposed into multiple frequency bands through wavelet transform;

[0014] Analyze the brightness distribution of the cow estrus behavior image based on the frequency band, and calculate the average, maximum and minimum brightness in the cow estrus behavior image;

[0015] By comparing the brightness values ​​of the original cow estrus behavior image and the target cow estrus behavior image, the color gain factor is calculated;

[0016] The calculated gain is applied to the color component of the image to achieve image enhancement of the cow estrus behavior image.

[0017] Preferably, the expression for calculating the color gain factor is:

[0018]

[0019] In the formula, L max , L min They represent the average, maximum and minimum brightness in the cow estrus behavior image respectively.

[0020] Preferably, the construction of the PBF-YOLO deep learning network model includes:

[0021] The YOLOv8n network is used as the backbone network of the PBF-YOLO deep learning network model;

[0022] Improve the C2F module in the YOLOv8n network using a lightweight module built using channel convolution;

[0023] Add background information enhancement module and feature aggregation module.

[0024] Preferably, the lightweight module comprises:

[0025] A channel convolution, with two 1×1 convolutional layers attached to the channel convolution;

[0026] Set up quick connections;

[0027] The normalization layer and Silu activation layer are placed between two 1×1 convolutional layers.

[0028] Preferably, the background information enhancement module includes:

[0029]

[0030] In the formula, and They represent the global average pooling based on the height direction and the width direction respectively, X is the input cow estrus behavior image, These are two sets of aggregated features obtained by encoding the coordinate information in the height direction and the width direction.

[0031] Preferably, the feature aggregation module includes:

[0032]

[0033] In the formula, (·,·) represents the aggregation of two sets of features Perform concat operation, V0 represents shared 1×1 convolution, V0∈R 1×1×C×C / r ,δ represents a nonlinear operation;

[0034] The intermediate features are batch normalized and nonlinearly activated, and two feature-transformed outputs are obtained by splitting:

[0035]

[0036] The above is the whole process of the feature aggregation module generating two sets of coordinate attention. The output of the feature aggregation module is expressed as:

[0037]

[0038] In the formula, f co (·,·) is the coordinate multiplication, Z represents the output feature map recalibrated by the feature aggregation module, and σ represents the sigmoid activation function.

[0039] A multi-target fusion dairy cow estrus behavior detection system, comprising:

[0040] Data acquisition module: collects cow estrus behavior images and performs image enhancement on the cow estrus behavior images;

[0041] Model building module: building a PBF-YOLO deep learning network model, the PBF-YOLO deep learning network model includes: a lightweight module, a background information enhancement module and a feature aggregation module;

[0042] Behavior detection module: The PBF-YOLO deep learning network model is used to identify the cow estrus behavior interest area and detect the cow estrus behavior.

[0043] Through the above technical solutions, it can be known that compared with the prior art, the present invention discloses a method and system for detecting estrus behavior of dairy cows with multi-target fusion, and proposes a method for monitoring dairy cow behavior based on multi-target in view of the problem of low accuracy of detecting estrus behavior of dairy cows in a cattle farm environment. The core idea of ​​the method is: first, the image enhancement method is used to solve the problems of insufficient image contrast, insufficient details, color deviation, etc. caused by environmental factors; secondly, in order to improve the running speed of the neural network, the C2F module in the channel convolution reconstruction YOLOv8n is designed to effectively reduce the number of parameters, thereby reducing the complexity of the overall model and building a lightweight neural network that meets the needs of real-time monitoring; then, a new background information enhancement module is proposed to fully capture the background information and spatial information around the target, more effectively distinguish the estrus behavior of dairy cows from other backgrounds, and improve the accuracy of the model. Finally, a feature aggregation module is designed to aggregate features in different directions so that the algorithm pays more attention to the location of shallow information. After obtaining the weight of each direction, it is combined with the input on both sides to better express the shallow information of the output feature map. Compared with traditional target detection methods, this method is more accurate, more effective, and has better practical value. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0045] Figure 1It is a schematic diagram of the method flow of the present invention;

[0046] Figure 2 The overall structure diagram of the PBF-YOLO deep learning network model provided by the embodiment of the present invention

[0047] Figure 3 A lightweight module framework diagram provided for an embodiment of the present invention;

[0048] Figure 4 A framework diagram of a background information enhancement module provided by an embodiment of the present invention;

[0049] Figure 5 A feature aggregation module framework diagram provided for an embodiment of the present invention;

[0050] FIG6( a ) is a first comparison diagram of feature visualization results provided by an embodiment of the present invention;

[0051] FIG6( b ) is a second comparison diagram of feature visualization results provided by an embodiment of the present invention;

[0052] Figure 7 A comparison test chart of different lightweight algorithms provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] See also Figure 1 As shown, the purpose of the present invention is to provide a multi-target fusion dairy cow estrus behavior detection method and system, wherein the method includes: S1: collecting dairy cow estrus behavior images, and performing image enhancement on dairy cow estrus behavior images; S2: constructing a PBF-YOLO deep learning network model, the PBF-YOLO deep learning network model includes: a lightweight module, a background information enhancement module and a feature aggregation module; S3: identifying the dairy cow estrus behavior interest area through the PBF-YOLO deep learning network model, and detecting the dairy cow estrus behavior. The present invention provides a solution to the situation that the estrus behavior of dairy cows in actual pastures is similar to other background features, which are difficult to distinguish, and dairy cows of different scales appear on the same image, resulting in low detection accuracy and poor robustness of existing lightweight algorithms.

[0055] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0056] The present invention adopts the following technical solution as a multi-target fusion dairy cow estrus behavior detection method, the method comprising:

[0057] A. Cow estrus behavior image enhancement stage:

[0058] 1) Automatic image enhancement design: In order to improve the accuracy of cow estrus behavior detection, the collected images can better adapt to different lighting conditions. The present invention analyzes the local contrast information of cow estrus behavior images and adaptively adjusts the parameters, so as to produce better enhancement effects for images with different backlighting levels, enhance image contrast and reduce the influence of light, and solve problems such as insufficient image contrast, insufficient details, and color deviation caused by environmental factors.

[0059] B. Cow estrus behavior detection stage:

[0060] In order to enable the detection network to infer the cow estrus behavior area of ​​interest more quickly, the present invention makes relevant improvements to the backbone network of the YOLOv8n network.

[0061] 1) Lightweight module: A new channel convolution is used to extract spatial features more efficiently by reducing redundant calculations. Based on channel convolution and 1×1 convolution as construction operators, a lightweight module is designed to effectively utilize the information of all channels. A shortcut connection is also set to reuse features. In addition, the normalization layer and activation layer are placed between two 1×1Conv layers to preserve feature diversity and achieve lower latency. The performance is improved with lower computational overhead. By learning efficient channel descriptions without dimensionality reduction in convolution operations, we can better focus on high-level feature maps, while ensuring the accuracy of the cow estrus behavior monitoring task, while achieving a lower number of parameters.

[0062] 2) Background information enhancement module: The present invention designs a new background information enhancement module, which aims to improve the model's ability to distinguish between estrus cows and the background. Considering that ordinary convolution has limited ability to capture long-distance correlations, this will hinder the detection of small targets in the image. By using parallel hole convolutions with different scales to expand the receptive field, while the parameters remain basically unchanged, the features of the target itself, the edge contour of the target, and a certain range around the target are extracted respectively to fully capture the background information around the target. Afterwards, while keeping the scale of the feature map unchanged, 1×1 convolution is used to add nonlinear features, and the three feature maps are stacked. Afterwards, in order to obtain the importance of each channel and space, the input features are globally averaged pooled based on the height and width directions to capture the global receptive field information. The formula is as follows:

[0063]

[0064] in and They represent CAP based on height direction and width direction respectively, X is the input cow estrus behavior image, These are two sets of aggregated features obtained by encoding the coordinate information in the height direction and the width direction.

[0065] 2) Feature aggregation module:

[0066] After obtaining the feature maps in two directions, the obtained features are aggregated separately, which helps to capture cross-channel information and maintain accurate position information. After that, they are passed through a 1×1 shared convolutional layer, making the interaction between the two sets of aggregated features relatively independent, thereby effectively avoiding mutual interference. The formula can be expressed as:

[0067]

[0068] Where (·,·) represents the concat operation (for two sets of aggregated features Concat operation), V0 represents a shared 1×1 convolution, and δ represents a nonlinear operation. The cross-dimensional convolution interaction is first stacked through the concat operation, and then passed through a shared 1×1 convolution kernel V0∈R 1×1×C×C / r Then, the intermediate features are batch normalized and nonlinearly activated, and two feature-transformed outputs are obtained by splitting: Using two sets of aggregated features for feature transformation avoids mutual interference of information in two directions.

[0069] The transformed features obtained from formula (6) are used to generate the attention map. Before this step, the aggregated features are encoded and interacted independently of each other. In this step, these features are transformed to have the same number of channels as the input by utilizing a 1×1 convolution operation and a sigmoid function. The entire process is described as follows:

[0070]

[0071]

[0072] The above is the whole process of the feature aggregation module generating two sets of coordinate attention. The output of the feature aggregation module is expressed as:

[0073]

[0074] Where f co(·,·) is the coordinate multiplication, Z represents the output feature map recalibrated by the feature aggregation module, and σ represents the sigmoid activation function. It can be seen that the two sets of attention maps are calculated in parallel and the feature maps are calibrated synchronously. This parallel calculation design enables the two sets of aggregated features to share cross-dimensional interaction functions, thereby greatly reducing the number of parameters.

[0075] The present invention proposes a new channel convolution structure, which uses channel convolution to reconstruct the C2F module, extracts spatial features more efficiently while reducing computational redundancy, improves network speed without sacrificing accuracy, and achieves a lower number of parameters while ensuring the accuracy of the cow estrus behavior monitoring task.

[0076] The background information enhancement module can provide additional background information and scene understanding to improve the model's ability to distinguish the background. If it is difficult to distinguish between estrus cows and non-estrus cows based only on the information in the label box, especially considering the long distance between the camera and the estrus cows and the cows blocking the view, this poses a major challenge to accurately monitoring estrus cows. Background information enhancement can solve the problem of limited feature information.

[0077] By aggregating features in different directions, the algorithm pays more attention to the location of shallow information. After obtaining the weights in each direction, it is combined with the inputs on both sides to better express the shallow information of the output feature map, which helps to capture cross-channel information and maintain accurate location information. After that, it is passed through a 1×1 shared convolutional layer, making the interaction between the two sets of aggregated features relatively independent, thereby effectively avoiding mutual interference. At the same time, the feature aggregation module enables the model to simultaneously consider the contextual information around each spatial position, allowing the model to more accurately locate the target object and obtain more valuable feature information.

[0078] The ability to express abstract features in Backbone becomes stronger as CNN becomes deeper. In order to have a larger receptive field to capture rich contextual information, the present invention adds a background information enhancement module and a feature aggregation module after the first lightweight module of the backbone network.

[0079] In a specific embodiment, the problem of poor accuracy in detecting estrus behavior of dairy cows in cattle farms is addressed. The present invention mainly uses a deep neural network constructed using the Pytorch framework and a deep learning experimental platform built using the Ubuntu system, and cooperates with a self-built dairy cow estrus behavior data set to verify the effectiveness of the algorithm. The data set contains a total of 3,000 images, all of which are labeled using labelimg. A random data enhancement algorithm is added, which includes random occlusion, flipping, scaling, color gamut conversion, changing contrast and other methods to expand the data set, and the number of images after expansion is 7,920. Finally, the enhanced data in the data set is used to construct a training set, a validation set, and a test set in an 8:1:1 ratio.

[0080] In a specific embodiment, the algorithm of the present invention uses the general evaluation indicators of target detection, namely, mean average precision (mAP), frame rate per second (FPS), precision (Precision) and recall (Recall) as the performance evaluation indicators of the model. The calculation formula is as follows:

[0081]

[0082] Precision refers to the ratio of the correctly predicted target to the predicted result, and Recall refers to the ratio of the correctly predicted target to the real target, where TP, FP, and FN represent true positive, false positive, and false negative, respectively. Through the calculated Precision and Recall, a PR curve is drawn with Precision as the ordinate and Recall as the abscissa. The area under the PR curve is the AP value. Since there is only one type of detection target in this embodiment, only AP needs to be calculated. FPS represents the speed of target detection, that is, the number of images processed per second. The FPS value can be obtained by taking the inverse of the time required to detect a picture.

[0083] Based on the above technical solution, it can be seen that the method of the present invention realizes the estrus behavior detection of dairy cows in cattle farms, which mainly includes two parts: the estrus behavior image enhancement stage of dairy cows and the estrus behavior detection stage of dairy cows. Figure 2 The overall architecture diagram of the algorithm is as follows:

[0084] A. Cow estrus behavior image enhancement stage:

[0085] Step 1: Use the prepared cow estrus behavior dataset to construct the training set, validation set and test set according to the ratio of 8:1:1.

[0086] Step 2: Enhance the images in the dataset so that the collected images can better adapt to different lighting conditions. The enhancement of image contrast reduces the impact of light and can further enhance the color significance of cows in estrus, thereby improving the accuracy of their detection.

[0087] Step 3: Input the image into the network to calculate the three evaluation indicators of the image.

[0088] B. Cow estrus behavior detection stage:

[0089] Step 1: By replacing the Bottleneck in C2F with a lightweight module, frequent memory access caused by multiple sets of deep convolutions can be effectively avoided, and a lightweight neural network that meets the needs of real-time monitoring can be constructed. The schematic diagram of the lightweight module is shown in the attached figure. Figure 3As shown in the figure, based on channel convolution and 1×1 convolution as construction operators, a lightweight module is designed. The first part of the lightweight module is a channel convolution, followed by two 1×1 convolutions attached to the channel convolution, which fully and effectively utilizes the information of all channels. A shortcut connection is also set to reuse features. In addition, the normalization layer and the activation layer are placed between the two 1×1Conv layers to preserve feature diversity and achieve lower latency. The lightweight module achieves improved performance with lower computational overhead. By learning efficient channel descriptions without dimensionality reduction in convolution operations, we can better focus on high-level feature maps, while ensuring the accuracy of the cow estrus behavior monitoring task, and achieving a lower number of parameters.

[0090] Step 2: Since the feature differences between estrus cows with mounting behavior and non-estrus cows are not significant, it is difficult to distinguish them based on the information in the label box alone, especially considering the long distance between the camera and the estrus cows and the cows blocking the view, which poses a major challenge to accurately monitoring estrus cows. As mentioned above, background information enhancement can solve the problem of limited feature information. The present invention designs a new background information enhancement module to improve the model's ability to distinguish estrus cows from the background. Figure 4 As shown in the figure, considering that ordinary convolution has limited ability to capture long-distance correlations, this will hinder the detection of small objects in the image. By using parallel dilated convolutions with different scales to expand the receptive field, the target itself, the edge contour of the target, and the features within a certain range around the target are extracted respectively while the parameters remain basically unchanged, fully capturing the background information around the target. Afterwards, while keeping the scale of the feature map unchanged, 1×1 convolution is used to increase nonlinear features, and the three feature maps are stacked. Afterwards, in order to obtain the importance of each channel and space, the input features are globally averaged pooled based on the height direction and width direction to capture the global receptive field information.

[0091] Step 3: As attached Figure 5 As shown in the figure, after obtaining the feature maps of two directions, the obtained features are aggregated separately, which helps to capture cross-channel information and maintain accurate location information, and are passed through a 1×1 shared convolutional layer, so that the interaction between the two sets of aggregated features is relatively independent, thereby effectively avoiding mutual interference. After obtaining the weights of each direction, it is combined with the inputs on both sides to better express the shallow information of the output feature map, which helps to capture cross-channel information and maintain accurate location information. At the same time, the feature aggregation module enables the model to simultaneously consider the contextual information around each spatial position, so that the model can more accurately locate the target object and obtain more valuable feature information.

[0092] The ability to express abstract features in Backbone becomes stronger as CNN becomes deeper. In order to have a larger receptive field to capture rich contextual information, the present invention adds a background information enhancement module and a feature aggregation module after the first lightweight module of the backbone network.

[0093] To illustrate the effectiveness of the algorithm of the present invention, the intermediate feature layer is visualized through a heat map. The output results are shown in the attached figure. Figure 6(a)-6(b) As shown in the figure, the weights are distinguished by colors (red, yellow, green, blue). The darker the color, the greater the weight of the area, and the more attention it receives from the network. This shows the effectiveness of the algorithm of the present invention.

[0094] The above steps are the specific application of the method of the present invention to the detection of estrus behavior of dairy cows in a cattle farm. In order to verify the effectiveness of the algorithm of the present invention, an ablation experiment is first performed on a self-made data set to verify the effect. The experimental results are shown in Table 1.

[0095] Table 1 Ablation test results of different models

[0096]

[0097]

[0098] As shown in Table 1, when the lightweight module is added, the number of model parameters and floating-point operations are significantly reduced, reaching 2.31M and 6.43GFLOPs respectively; when the background information enhancement module is added, although the number of model parameters is increased, the detection accuracy is improved by 0.71%; after adding the feature aggregation module, the detection accuracy is significantly improved to 92.04% under the premise that the number of model parameters remains basically unchanged. In addition, when the lightweight module and the background information enhancement module are used at the same time, the detection accuracy is improved. Although the design of the background information enhancement module increases the computational overhead, the simultaneous application of the lightweight module can effectively reduce the model complexity. Using the lightweight module and the feature aggregation module, the network AP reaches 92.83%, which is improved compared with the baseline network YOLOv8n in terms of model accuracy and complexity. When adding the background information enhancement module + feature aggregation module, although the number of model parameters and floating-point operations is higher than the baseline network, its AP value is significantly improved to 93.44%. The combination of the lightweight module, background information enhancement module and feature aggregation module showed the best performance, reducing the number of parameters by 17.9% compared to the baseline network, while improving the AP value, Precision and Recall by 3.97%, 4.54% and 5.23%.

[0099] In order to further evaluate the model performance, the algorithm of the present invention is compared with other mainstream lightweight detection algorithms (SSD, YOLOv4-tiny, YOLOv5s, YOLOX-tiny, YOLOv7-tiny). The comparison results are shown in Table 2, and the actual detection effect is shown in the attached figure. Figure 7 shown.

[0100] Table 2 Performance comparison of different models

[0101]

[0102] As can be seen from Table 2, except for SGD, all models are lightweight detection models with less than 8M parameters. Although SSD has a higher precision value, its parameter volume and floating-point operation times are much higher than other algorithms. The model complexity is too high and is not suitable for deployment on mobile terminals. The YOLOv4-tiny algorithm has 6.06M parameters, which shows the lowest parameter volume among all the comparison models, indicating that it is suitable for deployment on mobile terminals. However, the AP value of this algorithm is low, only 91.08%. The number of floating-point operations of the YOLOv5s algorithm is slightly higher, but it is still acceptable given its higher accuracy and lower parameter volume. In addition, the YOLOX-tiny algorithm has only 5.06M parameters, which performs well in terms of model complexity, but the detection accuracy is insufficient, and the recall rate is only 88.61%. The YOLOv7-tiny algorithm is the model with the highest detection accuracy except for the PBF-YOLO algorithm, with an AP value of 92.65% and a parameter volume of 6.23M, achieving a good balance between model complexity and detection accuracy. Finally, the model proposed in this paper performs better in the task of monitoring cow estrus behavior, and all indicators have achieved good results, with an AP value of 94.73%, and the number of parameters is only 2.47M, achieving the highest accuracy and the lowest model complexity. A good balance has been achieved between model complexity and detection accuracy.

[0103] On the other hand, the embodiment of the present invention also discloses a multi-target fusion dairy cow estrus behavior detection system, comprising:

[0104] Data acquisition module: collects cow estrus behavior images and performs image enhancement on the cow estrus behavior images;

[0105] Model building module: build the PBF-YOLO deep learning network model, which includes: lightweight module, background information enhancement module and feature aggregation module;

[0106] Behavior detection module: The PBF-YOLO deep learning network model is used to identify the cow estrus behavior interest area and detect the cow estrus behavior.

[0107] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0108] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in the present embodiments may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the present embodiment, but will conform to the widest range consistent with the principles and novel features disclosed in the present embodiment.

Claims

1. A multi-target fusion method for detecting estrus behavior of dairy cows, characterized in that: include: S1: collecting cow estrus behavior images, and performing image enhancement on the cow estrus behavior images; S2: constructing a PBF-YOLO deep learning network model, wherein the PBF-YOLO deep learning network model includes: a lightweight module, a background information enhancement module, and a feature aggregation module; S3: The PBF-YOLO deep learning network model is used to identify the cow estrus behavior interest area and detect the cow estrus behavior.

2. The multi-target fusion cow estrus behavior detection method according to claim 1, characterized in that: S1: collecting cow estrus behavior images and performing image enhancement on the cow estrus behavior images, including: Collect images of cow estrus behavior; The cow estrus behavior image is decomposed into multiple frequency bands through wavelet transform; Analyze the brightness distribution of the cow estrus behavior image based on the frequency band, and calculate the average, maximum and minimum brightness in the cow estrus behavior image; By comparing the brightness values ​​of the original cow estrus behavior image and the target cow estrus behavior image, the color gain factor is calculated; The calculated gain is applied to the color component of the image to achieve image enhancement of the cow estrus behavior image.

3. A multi-target fusion cow estrus behavior detection method according to claim 2, characterized in that: The expression for calculating the color gain factor is: In the formula, L max , L min They represent the average, maximum and minimum brightness in the cow estrus behavior image respectively.

4. The multi-target fusion cow estrus behavior detection method according to claim 1, characterized in that: The construction of the PBF-YOLO deep learning network model includes: The YOLOv8n network is used as the backbone network of the PBF-YOLO deep learning network model; Improve the C2F module in the YOLOv8n network using a lightweight module built using channel convolution; Add background information enhancement module and feature aggregation module.

5. The multi-target fusion cow estrus behavior detection method according to claim 1, characterized in that: The lightweight module includes: A channel convolution, with two 1×1 convolutional layers attached to the channel convolution; Set up quick connections; The normalization layer and Silu activation layer are placed between two 1×1 convolutional layers.

6. The multi-target fusion cow estrus behavior detection method according to claim 1, characterized in that: The background information enhancement module includes: In the formula, and They represent the global average pooling based on the height direction and the width direction respectively, X is the input cow estrus behavior image, These are two sets of aggregated features obtained by encoding the coordinate information in the height direction and the width direction.

7. The multi-target fusion cow estrus behavior detection method according to claim 1, characterized in that: The feature aggregation module includes: In the formula, (·,·) represents the aggregation of two sets of features Perform concat operation, V0 represents shared 1×1 convolution, V0∈R 1 ×1×C×Cr ,δ represents a nonlinear operation; The intermediate features are batch normalized and nonlinearly activated, and two feature-transformed outputs are obtained by splitting: The above is the whole process of the feature aggregation module generating two sets of coordinate attention. The output of the feature aggregation module is expressed as: In the formula, f co (·,·) is the coordinate multiplication, Z represents the output feature map recalibrated by the feature aggregation module, and σ represents the sigmoid activation function.

8. A multi-target fusion dairy cow estrus behavior detection system using the multi-target fusion dairy cow estrus behavior detection method according to any one of claims 1 to 7, characterized in that: include: Data acquisition module: collects cow estrus behavior images and performs image enhancement on the cow estrus behavior images; Model building module: building a PBF-YOLO deep learning network model, the PBF-YOLO deep learning network model includes: a lightweight module, a background information enhancement module and a feature aggregation module; Behavior detection module: The PBF-YOLO deep learning network model is used to identify the cow estrus behavior interest area and detect the cow estrus behavior.

Citation Information

Patent Citations

  • Method and system for realizing cow oestrus early warning based on deep learning

    CN115620231A

  • Indoor target behavior recognition method and device and computer equipment

    CN116778304A

  • Lightweight small target detection method for improving BIFPN and attention mechanism

    CN118397357A

Cited By

  • Cow oestrus monitoring method based on multi-camera data fusion

    CN120656237A

  • A multi-camera data fusion-based cow estrus monitoring method

    CN120656237B

  • Intelligent monitoring and identification method and system for oestrus climbing behavior of dairy cow

    CN120748032A