Bird monitoring method and device, electronic equipment and computer storage medium

By combining the target bird watching equipment with the target detection model and the bird recognition model for image preprocessing and feature extraction, the problem of low bird recognition accuracy is solved, the accuracy and efficiency of bird monitoring is improved, and the correctness and efficiency of bird monitoring is achieved. Interfere with the animal's expulsion.

CN119027976APending Publication Date: 2024-11-26SHENZHEN FANYING ZHILIAN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310978437.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the prior art, bird identification accuracy is low, making it difficult to accurately monitor birds in natural scenes, resulting in poor results in areas such as environmental monitoring and wildlife protection.

Method used

Using image preprocessing and feature extraction methods based on target bird watching equipment, combined with the pre-constructed object detection model and bird recognition model, anchor box category prediction and feature recognition are carried out through backbone network, connection network and detection head network to improve birds The accuracy of feature recognition and start the drive-off system to eliminate interfering animals when the recognition fails.

Benefits of technology

It improves the accuracy and accuracy of bird recognition, avoids the waste of resources for non-bird images, and realizes multiple recognition of birds and effective disengagement of animals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027976A_ABST
    Figure CN119027976A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and discloses a bird monitoring method, which comprises the following steps: acquiring a to-be-detected image based on target bird watching equipment, and preprocessing the to-be-detected image to obtain a preprocessed image; segmenting the preprocessed image according to a backbone network of the target detection model to obtain a plurality of grid images, performing feature extraction on all the grid images to obtain a plurality of grid image features, inputting all the grid image features to a connection network of the target detection model, and outputting to obtain a plurality of enhanced images, performing anchor frame category prediction on all the enhanced images through a detection head network of the target detection model to obtain a prediction category of the preprocessed image; and when it is determined that the to-be-detected image includes bird features, feature recognition is performed on the preprocessed image based on a bird recognition model, and target bird information is obtained. The invention further discloses a bird monitoring device, electronic equipment and a computer storage medium. According to the invention, the bird feature recognition precision and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and specifically to a bird monitoring method, device, electronic equipment and computer storage medium. Background Art

[0002] As people's environmental awareness is awakened, and in order to protect species diversity, it is becoming increasingly important to accurately monitor and identify wild creatures. Birds are a common target object in natural scenes. By observing, detecting and classifying birds, we can improve the recognition and protection of birds in the fields of environmental monitoring, wildlife protection, bird observation and ecological research. Target monitoring technology is an important technology in computer vision. However, when monitoring birds through traditional target monitoring technology, there is often a problem of low bird recognition accuracy. Summary of the invention

[0003] The embodiments of the present application provide a bird monitoring method, device, electronic device and computer storage medium, which can solve the technical problem of low bird identification accuracy.

[0004] The present application provides a bird monitoring method, including:

[0005] Acquire an image to be detected based on a target bird watching device, and preprocess the image to be detected to obtain a preprocessed image;

[0006] Obtain a pre-built target detection model, segment the pre-processed image according to the backbone network of the target detection model to obtain a plurality of grid images, perform feature extraction on all the grid images to obtain a plurality of grid image features, input all the grid image features into the connection network of the target detection model, output a plurality of enhanced images, perform anchor box category prediction on all the enhanced images through the detection head network of the target detection model, and obtain the predicted category of the pre-processed image;

[0007] Determine whether the image to be detected includes bird features according to the predicted category. When it is determined that the image to be detected includes the bird features, obtain a pre-constructed bird recognition model, perform feature recognition on the pre-processed image based on the bird recognition model, and obtain target bird information.

[0008] Furthermore, the anchor box category prediction is performed on all the enhanced images through the detection head network of the target detection model to obtain the predicted category of the preprocessed image, including:

[0009] Based on the convolution layer and the pooling layer of the detection head network, convolution calculation is performed on the enhanced image to obtain multiple anchor box results corresponding to each enhanced image;

[0010] The grid prediction category of each of the enhanced images is calculated according to the anchor box results, and the prediction category of the preprocessed image is obtained by non-maximum suppression calculation based on all the grid prediction categories.

[0011] Further, the calculating the grid prediction category of each enhanced image according to the anchor frame result includes:

[0012] Obtain a stored reference image, and filter the anchor frame results of the same enhanced image according to the reference image to obtain a target anchor frame;

[0013] The target anchor frame is calculated by a normalization function to obtain a grid prediction category of each enhanced image.

[0014] Furthermore, the filtering of the anchor frame results of the same enhanced image according to the reference image to obtain the target anchor frame includes:

[0015] Calculating the confidence of each anchor frame result and the reference image;

[0016] The anchor box with the largest confidence is selected as the target anchor box.

[0017] Furthermore, the backbone network includes a sub-cross-stage local network, a total cross-stage local network and a pyramid fusion network, and the feature extraction is performed on all the grid images to obtain multiple grid image features, including:

[0018] Performing preliminary feature extraction on each of the grid images based on the sub-cross-stage local network and the total cross-stage local network to obtain initial features;

[0019] The initial features are fused according to the pyramid fusion network to obtain grid image features corresponding to each grid image.

[0020] Furthermore, the performing feature recognition on the preprocessed image based on the bird recognition model to obtain target bird information includes:

[0021] The bird recognition model includes a first convolution layer, a second convolution layer, an attention calculation layer, a third convolution layer and a fully connected layer. Based on the first convolution layer, a convolution dimension-raising calculation is performed on the pre-processed image to obtain a dimension-raising feature map.

[0022] Performing channel-by-channel convolution calculation on the dimension-increased feature map according to the second convolution layer to obtain a first convolution feature;

[0023] Based on the attention calculation layer, extracting features from the first convolutional features through an attention mechanism to obtain attention features;

[0024] Performing dimension reduction and fusion calculation on the attention feature according to the third convolutional layer to obtain an attention feature map;

[0025] The attention feature map is mapped to category labels through the fully connected layer to obtain the target bird information.

[0026] Further, after determining whether the image to be detected includes bird features according to the predicted category, the method further includes:

[0027] When it is determined that the image to be detected does not include the bird feature, locating the interfering animal in the image to be detected;

[0028] The repelling system of the target bird watching device is started, and high-frequency sound waves are sent based on the repelling system to repel the interfering animals through the high-frequency sound waves.

[0029] Accordingly, an embodiment of the present application provides a bird monitoring device, comprising:

[0030] A preprocessing module, used for acquiring an image to be detected based on a target bird watching device, and preprocessing the image to be detected to obtain a preprocessed image;

[0031] A first detection module is used to obtain a pre-built target detection model, segment the pre-processed image according to the backbone network of the target detection model to obtain a plurality of grid images, perform feature extraction on all the grid images to obtain a plurality of grid image features, input all the grid image features to the connection network of the target detection model, output a plurality of enhanced images, perform anchor box category prediction on all the enhanced images through the detection head network of the target detection model, and obtain the predicted category of the pre-processed image;

[0032] The second detection module is used to determine whether the image to be detected includes bird features according to the predicted category. When it is determined that the image to be detected includes the bird features, a pre-constructed bird recognition model is obtained, and feature recognition is performed on the pre-processed image based on the bird recognition model to obtain target bird information.

[0033] In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the bird monitoring method provided in the embodiment of the present application.

[0034] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for loading by a processor to execute any bird monitoring method provided in the embodiment of the present application.

[0035] In addition, an embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements any one of the bird monitoring methods provided in the embodiments of the present application.

[0036] In an embodiment of the present application, an image to be detected is obtained based on a target bird watching device, and the image to be detected is preprocessed to obtain a preprocessed image, so that the image detection efficiency and accuracy can be further improved by preprocessing the image; then, a pre-constructed target detection model is obtained, and the pre-processed image is segmented according to the backbone network of the target detection model to obtain multiple grid images, and feature extraction is performed on all grid images to obtain multiple grid image features, and all grid image features are input into the connection network of the target detection model, and multiple enhanced images are output, and anchor frame categories are predicted for all enhanced images through the detection head network of the target detection model to obtain the predicted category of the pre-processed image, thereby realizing the initial recognition of the image to be detected; according to the predicted category, it is determined whether the image to be detected includes bird features. When it is determined that the image to be detected includes bird features, a pre-constructed bird recognition model is obtained, and feature recognition is performed on the pre-processed image based on the bird recognition model to obtain target bird information. Finally, multiple recognitions of the image to be detected are realized, the precision and accuracy of bird feature recognition are improved, and the waste of resources for non-bird image recognition is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0038] Figure 1 is a schematic diagram of a process of a bird monitoring method provided in an embodiment of the present application;

[0039] Figure 2 is a schematic diagram of the structure of a bird monitoring device provided in an embodiment of the present application;

[0040] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0042] The embodiment of the present application provides a bird monitoring method, device, electronic device and computer storage medium. The bird monitoring device can be integrated in an electronic device, which can be a server or a terminal.

[0043] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0044] The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0045] In addition, the term "plurality" in the embodiments of the present application refers to two or more than two. The terms "first" and "second" in the embodiments of the present application are used to distinguish descriptions and should not be understood as implying relative importance.

[0046] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0047] See also Figure 1 , Figure 1 : is a flow chart of a bird monitoring method provided in an embodiment of the present application. The bird monitoring method may include:

[0048] S101. Acquire an image to be detected based on a target bird watching device, and preprocess the image to be detected to obtain a preprocessed image.

[0049] In this embodiment, the image to be detected is an image obtained by shooting through a target bird-watching device, and a camera is provided on the target bird-watching device, and the image to be detected is obtained by shooting through the target bird-watching device. In addition, an image stored in association with the target bird-watching device can also be obtained through a network connection as the image to be detected. When the image to be detected is obtained, the image to be detected is preprocessed, for example, data enhancement and other operations are performed on the image to be detected to improve the accuracy of the image to be detected, so that the image to be detected can be more easily recognized. The image to be detected that has been preprocessed is the preprocessed image.

[0050] S102, obtaining a pre-built target detection model, segmenting the preprocessed image according to the backbone network of the target detection model to obtain a plurality of grid images, performing feature extraction on all the grid images to obtain a plurality of grid image features, inputting all the grid image features into the connection network of the target detection model, outputting a plurality of enhanced images, performing anchor box category prediction on all the enhanced images through the detection head network of the target detection model, and obtaining the predicted category of the preprocessed image.

[0051] In this embodiment, the target detection model is a pre-trained detection model, through which the pre-processed image can be predicted to obtain the predicted category of the pre-processed image, and whether the image to be detected includes bird features can be determined based on the predicted category. Specifically, the target detection model includes a backbone network (Backbone network), a neck network (neck network) and a detection head network (head network), wherein the backbone network adopts the CSPDarknet53 network, the neck network adopts the SPP (Spatial Pyramid Pooling) network, and the detection head network adopts the YOLOv5 Head network.

[0052] When the preprocessed image is obtained, the preprocessed image is input into the target detection model, and the preprocessed image is segmented based on the backbone network of the target detection model to obtain multiple grid images; then, feature extraction is performed on all grid images to obtain grid image features corresponding to each grid image. Then, feature enhancement is performed on all grid image features according to the connection network, and an enhanced image corresponding to each grid image is output, in which feature information of different scales is integrated. Finally, the anchor box category prediction is performed on all enhanced images through the detection head network, and the predicted category and position information of the object contained in the image to be detected are output.

[0053] S103, determining whether the image to be detected includes bird features according to the predicted category, and when it is determined that the image to be detected includes the bird features, obtaining a pre-constructed bird recognition model, and performing feature recognition on the pre-processed image based on the bird recognition model to obtain target bird information.

[0054] In this embodiment, the predicted category of the object in the preprocessed image can be output by the target detection model, and the predicted category includes categories such as birds, non-birds, and non-animals. Therefore, when the predicted category is birds, it is determined that the image to be detected includes bird features. If the image to be detected includes bird features, a pre-constructed bird recognition model is obtained, and the preprocessed image is feature recognized according to the bird recognition model to obtain target bird information. Among them, the bird recognition model is a neural network model with an inverted residual structure. The residual structure is an hourglass-shaped structure that first performs image dimensionality reduction, then performs feature extraction, and finally performs feature dimensionality increase. However, when the high-dimensional space in the information is nonlinearly mapped to the low-dimensional space, information collapse will occur. Therefore, this embodiment proposes a neural network model with an inverted residual structure as a bird recognition model. In the inverted residual structure, the preprocessed image is first dimensionalized, and then features are extracted by channel-by-channel convolution, and finally convolution is used to achieve feature dimensionality reduction.

[0055] In addition, an attention mechanism and feature fusion are added to the inverted residual structure, and the features in the inverted residual structure are convolved by deep separable convolution to finally form a bird recognition model. When it is determined that the image to be detected includes bird features, the preprocessed image is input into the bird recognition model, and the target bird information in the image to be detected is calculated by the bird recognition model. Furthermore, in addition to performing feature recognition on the preprocessed image by the bird recognition model when it is determined that the image to be detected includes bird features, two-dimensional image feature calculation can be performed on the preprocessed image to obtain the preprocessed image; then, feature recognition is performed on the preprocessed image based on the bird recognition model to obtain the target bird information. The target bird information includes information such as the category, color, and size of the bird in the image to be detected.

[0056] This embodiment obtains an image to be detected based on a target bird watching device, preprocesses the image to be detected, and obtains a preprocessed image; obtains a pre-constructed target detection model, segments the pre-processed image according to the backbone network of the target detection model to obtain multiple grid images, extracts features of all grid images to obtain multiple grid image features, inputs all grid image features into the connection network of the target detection model, outputs multiple enhanced images, predicts anchor box categories for all enhanced images through the detection head network of the target detection model, and obtains predicted categories of the pre-processed image; determines whether the image to be detected includes bird features according to the predicted category, and when it is determined that the image to be detected includes bird features, obtains a pre-constructed bird recognition model, performs feature recognition on the pre-processed image based on the bird recognition model, and obtains target bird information, thereby realizing multiple recognitions of the image to be detected, improving the precision and accuracy of bird feature recognition, and avoiding waste of resources for non-bird image recognition.

[0057] In some embodiments of the present application, the above-mentioned prediction of anchor box categories for all the enhanced images by the detection head network of the target detection model to obtain the predicted category of the preprocessed image includes:

[0058] Based on the convolution layer and the pooling layer of the detection head network, convolution calculation is performed on the enhanced image to obtain multiple anchor box results corresponding to each enhanced image;

[0059] The grid prediction category of each of the enhanced images is calculated according to the anchor box results, and the prediction category of the preprocessed image is obtained by non-maximum suppression calculation based on all the grid prediction categories.

[0060] In this embodiment, the detection head network adopts the YOLOv5 (single-stage target detection algorithm) Head network, which includes multiple convolutional layers and pooling layers. Feature extraction of each grid image can obtain the grid image features corresponding to each grid image, and then the grid image features corresponding to each grid image are processed by connecting the network to obtain the enhanced image corresponding to each grid image. The preprocessed image is segmented to obtain multiple grid images. Therefore, by processing the preprocessed image through the target detection model, multiple grid image features and multiple enhanced images can be obtained. When the enhanced images corresponding to all grid images are obtained, the convolutional layer and pooling layer of the detection head network are used to predict and calculate each enhanced image, that is, to obtain multiple anchor box results corresponding to each enhanced image. Among them, each anchor box result includes object category and position information, and multiple anchor box results of the same enhanced image are calculated to determine the grid prediction category corresponding to each enhanced image, thereby calculating the grid prediction category of all enhanced images. Finally, according to the grid prediction category, the prediction category of the preprocessed image is obtained by non-maximum suppression calculation.

[0061] This embodiment calculates the anchor box results through the detection head network to obtain the predicted category of the preprocessed image, thereby achieving accurate prediction of the object category in the preprocessed image and improving the prediction accuracy and prediction efficiency.

[0062] In some embodiments of the present application, the above-mentioned calculating the grid prediction category of each enhanced image according to the anchor box result includes:

[0063] Obtain a stored reference image, and filter the anchor frame results of the same enhanced image according to the reference image to obtain a target anchor frame;

[0064] The target anchor frame is calculated by a normalization function to obtain a grid prediction category of each enhanced image.

[0065] In this embodiment, when the enhanced image is predicted by the detection head network, multiple anchor box results are predicted for the same enhanced image. The stored reference image is obtained, and the multiple anchor box results of the same enhanced image are screened according to the reference image to obtain the target anchor box; then, the target anchor box is calculated by a normalization function (such as a softmax function) to obtain the grid prediction category of each enhanced image.

[0066] This embodiment filters the anchor box results of the same enhanced image through a reference image to obtain a target anchor box, and then performs a normalization function calculation on the target anchor box to obtain a grid prediction category for each enhanced image, thereby achieving accurate detection of the object category in the image to be detected.

[0067] In some embodiments of the present application, the above-mentioned filtering of the anchor frame results of the same enhanced image according to the reference image to obtain the target anchor frame includes:

[0068] Calculating the confidence of each anchor frame result and the reference image;

[0069] The anchor box with the largest confidence is selected as the target anchor box.

[0070] In this embodiment, when the anchor box results of the same enhanced image are screened according to the reference image, the confidence of each anchor box result and the reference image is calculated, and the confidence can be obtained by calculating the similarity between the anchor box result and the reference image. When the confidence of each anchor box result and the reference image is obtained, the anchor box result with the largest confidence is selected as the target anchor box.

[0071] This embodiment calculates the confidence of each anchor frame result and the reference image, and screens the anchor frame results according to the confidence, thereby improving the recognition efficiency and accuracy of the image content.

[0072] In some embodiments of the present application, the backbone network includes a sub-cross-stage local network, a total cross-stage local network and a pyramid fusion network, and performs feature extraction on all the grid images to obtain multiple grid image features, including:

[0073] Performing preliminary feature extraction on each of the grid images based on the sub-cross-stage local network and the total cross-stage local network to obtain initial features;

[0074] The initial features are fused according to the pyramid fusion network to obtain grid image features corresponding to each grid image.

[0075] In this embodiment, the backbone network includes a sub-cross-stage partial network, a total cross-stage partial network and a pyramid fusion network, wherein the sub-cross-stage partial network is a Cross-Stage Partial Network (CSP) Block (CBS, cross-stage partial network block), the total cross-stage partial network is a Cross-Stage Partial Network (CSP, cross-stage partial network), and the pyramid fusion network is a Spatial Pyramid Pooling Fusion (SPPF, spatial pyramid pooling fusion). The sub-cross-stage partial network includes an initial convolutional layer (Convolutional Layer), a quasi-normalization layer (Batch Normalization) and an activation layer (SiLU). When a grid image after pre-processing image segmentation is obtained, the grid image is convolved by the initial convolutional layer to extract the convolution features of the grid image; then, the convolution features are normalized according to the quasi-normalization layer so that the convolution results are distributed in a standard normal distribution with a mean of 0 and a variance of 1; finally, the total features are output through the activation function of the activation layer. The total span-order local network is composed of multiple sub-span-order local networks. The multiple sub-span-order local networks and the total span-order local network are connected to perform preliminary feature extraction on the preprocessed image, that is, to obtain the initial features of the preprocessed image. After obtaining the initial features, the initial features are fused through the pyramid fusion network to obtain the grid image features corresponding to each grid image in the preprocessed image. Specifically, when the initial features are obtained, the initial features are divided into multiple scales based on the pyramid fusion network, and then the maximum pooling operation is performed on each divided area to obtain a feature vector of fixed length; finally, the feature vectors are concatenated and the global feature vectors are fused to obtain the final feature vector representation, which is the grid image feature corresponding to the grid image.

[0076] This embodiment extracts features from the grid image through the sub-span-stage local network, the total span-stage local network and the pyramid fusion network of the backbone network, thereby achieving accurate extraction of information in the image to be detected and further improving the image recognition accuracy.

[0077] In some embodiments of the present application, the above-mentioned performing feature recognition on the pre-processed image based on the bird recognition model to obtain target bird information includes:

[0078] The bird recognition model includes a first convolution layer, a second convolution layer, an attention calculation layer, a third convolution layer and a fully connected layer. Based on the first convolution layer, a convolution dimension-raising calculation is performed on the pre-processed image to obtain a dimension-raising feature map.

[0079] Performing channel-by-channel convolution calculation on the dimension-increased feature map according to the second convolution layer to obtain a first convolution feature;

[0080] Based on the attention calculation layer, extracting features from the first convolutional features through an attention mechanism to obtain attention features;

[0081] Performing dimension reduction and fusion calculation on the attention feature according to the third convolutional layer to obtain an attention feature map;

[0082] The attention feature map is mapped to category labels through the fully connected layer to obtain the target bird information.

[0083] In this embodiment, the bird recognition model is a neural network model with an inverted residual structure, including a first convolutional layer, a second convolutional layer, an attention calculation layer, a third convolutional layer and a fully connected layer. The input feature map is calculated in sequence according to the first convolutional layer, the second convolutional layer, the attention calculation layer, the third convolutional layer and the fully connected layer, and finally the bird information in the original bird image is recognized.

[0084] Specifically, the first convolution layer is the first layer of the inverted residual structure of the bird recognition model, and its convolution kernel size is 1X1. The first convolution layer performs 1X1 convolution dimension increase calculation on the preprocessed image to obtain the dimension increase feature map. Then, the dimension increase feature map is input to the second convolution layer, and the second convolution layer performs channel-by-channel convolution (Depthwise Convolution, DW) calculation of 3X3 convolution kernel on the dimension increase feature map to extract the first convolution feature. Among them, channel-by-channel convolution is a kind of depthwise separable convolution. Unlike the conventional convolution kernel that operates each channel of the input image at the same time, a convolution kernel is only responsible for one channel in the channel-by-channel convolution, so that while ensuring the accuracy of the model, the number of parameters and computing costs are reduced, so that the model can be better deployed on mobile devices.

[0085] Afterwards, in order to better capture the spatial correlation between features and further extract the global information of the image, when the first convolution feature is obtained, the first convolution feature is input into the attention calculation layer, and the first convolution feature is adjusted and extracted through the attention mechanism of the attention calculation layer to obtain the attention feature. Finally, the attention feature is reduced in dimension through the third convolution layer to obtain the attention feature map, wherein the third convolution layer is a 1X1 pointwise convolution (PointwiseConvolution, PW) calculation layer, and the attention feature is reduced in dimension and fused through the pointwise convolution to obtain the attention feature map. When the attention feature map is obtained, the attention feature map is input into the fully connected layer, and the category label mapping is performed through the fully connected layer to extract the target bird information.

[0086] This embodiment performs fine-grained recognition on the preprocessed image through the first convolutional layer, the second convolutional layer, the attention calculation layer, the third convolutional layer and the fully connected layer of the bird recognition model, thereby achieving accurate recognition of the bird information in the image. While improving the feature extraction and expression capabilities of the model, the model performance and accuracy are improved, making the extracted bird information more accurate.

[0087] In some embodiments of the present application, after determining whether the image to be detected includes bird features according to the predicted category, the method further includes:

[0088] When it is determined that the image to be detected does not include the bird feature, locating the interfering animal in the image to be detected;

[0089] The repelling system of the target bird watching device is started, and high-frequency sound waves are sent based on the repelling system to repel the interfering animals through the high-frequency sound waves.

[0090] In this embodiment, after determining whether there are bird features in the image to be detected according to the predicted category, if the image to be detected does not include bird features, the interfering animals in the image to be detected are located. Specifically, when the category prediction is performed on the preprocessed image through the target detection model, the position information of the object in the image is also output, and the interfering animals in the image to be detected are located according to the position information; then, the expulsion system of the target bird watching device is started, and high-frequency sound waves are sent based on the expulsion system, and the interfering animals in the field of view of the current target bird watching device are expelled by the high-frequency sound waves. In addition, after the interfering animals in the image to be detected are located, the odor expulsion device or mechanical expulsion device of the target bird watching device can also be started, and the interfering animals are expelled according to the odor expulsion device or the mechanical expulsion device.

[0091] This embodiment locates interfering animals in the image to be detected when it is determined that the image to be detected does not include bird features; then, activates the repelling system of the target bird watching device, sends high-frequency sound waves based on the repelling system, and drives away the interfering animals through the high-frequency sound waves, thereby achieving efficient repelling of non-bird animals and avoiding interference from non-bird animals.

[0092] In order to better implement the bird monitoring method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above bird monitoring method. The meanings of the terms are the same as those in the above bird monitoring method, and the specific implementation details can refer to the description in the method embodiment.

[0093] For example, Figure 2 As shown, the bird monitoring device may include: a pre-processing module 201, a first detection module 202, and a second detection module 203.

[0094] A preprocessing module 201 is used to obtain an image to be detected based on a target bird watching device, and preprocess the image to be detected to obtain a preprocessed image;

[0095] The first detection module 202 is used to obtain a pre-built target detection model, segment the pre-processed image according to the backbone network of the target detection model to obtain a plurality of grid images, perform feature extraction on all the grid images to obtain a plurality of grid image features, input all the grid image features to the connection network of the target detection model, output a plurality of enhanced images, perform anchor box category prediction on all the enhanced images through the detection head network of the target detection model, and obtain the predicted category of the pre-processed image;

[0096] The second detection module 203 is used to determine whether the image to be detected includes bird features according to the predicted category. When it is determined that the image to be detected includes the bird features, a pre-built bird recognition model is obtained, and feature recognition is performed on the pre-processed image based on the bird recognition model to obtain target bird information.

[0097] In one embodiment of the present application, the first detection module 202 includes:

[0098] A first prediction unit, configured to perform convolution calculation on the enhanced image based on the convolution layer and the pooling layer of the detection head network, to obtain a plurality of anchor box results corresponding to each of the enhanced images;

[0099] The second prediction unit is used to calculate the grid prediction category of each of the enhanced images according to the anchor box results, and obtain the prediction category of the preprocessed image through non-maximum suppression calculation based on all the grid prediction categories.

[0100] In an embodiment of the present application, the second prediction unit includes:

[0101] A screening unit, used to obtain a stored reference image, and screen the anchor frame results of the same enhanced image according to the reference image to obtain a target anchor frame;

[0102] The third prediction unit is used to calculate the target anchor frame through a normalization function to obtain a grid prediction category of each enhanced image.

[0103] In one embodiment of the present application, the screening unit includes:

[0104] A first screening subunit, used to calculate the confidence of each anchor box result and the reference image;

[0105] The second screening subunit is used to screen the anchor box result with the largest confidence as the target anchor box.

[0106] In an embodiment of the present application, the first detection module 202 further includes:

[0107] An extraction unit, configured to perform preliminary feature extraction on each of the grid images based on the sub-cross-stage local network and the total cross-stage local network to obtain initial features;

[0108] A fusion unit is used to perform feature fusion on the initial features according to the pyramid fusion network to obtain a grid image feature corresponding to each of the grid images.

[0109] In one embodiment of the present application, the second detection module 203 includes:

[0110] A first computing unit, for the bird recognition model, comprising a first convolutional layer, a second convolutional layer, an attention computing layer, a third convolutional layer and a fully connected layer, performs convolution dimensionality increase computing on the preprocessed image based on the first convolutional layer to obtain a dimensionality increase feature map;

[0111] A second calculation unit is used to perform channel-by-channel convolution calculation on the dimension-increased feature map according to the second convolution layer to obtain a first convolution feature;

[0112] A third computing unit, configured to extract features from the first convolutional features through an attention mechanism based on the attention computing layer to obtain attention features;

[0113] a fourth computing unit, configured to perform dimension reduction and fusion calculation on the attention feature according to the third convolutional layer to obtain an attention feature map;

[0114] A mapping unit is used to map the attention feature map to a category label through the fully connected layer to obtain the target bird information.

[0115] In one embodiment of the present application, the bird monitoring device further includes:

[0116] A positioning module, used for positioning the interfering animal in the image to be detected when it is determined that the image to be detected does not include the bird feature;

[0117] The driving away module is used to start the driving away system of the target bird watching device, send high-frequency sound waves based on the driving away system, and drive away the interfering animals through the high-frequency sound waves.

[0118] The bird monitoring device proposed in the present application realizes multiple recognitions of the images to be detected, improves the precision and accuracy of bird feature recognition, and avoids the waste of resources for non-bird image recognition.

[0119] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0120] The present application also provides an electronic device, which may be a server or a terminal, etc. Figure 3 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0121] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will appreciate that Figure 3 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0122] The processor 601 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing computer programs and / or modules stored in the memory 602, and calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.

[0123] The memory 602 can be used to store computer programs and modules. The processor 601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0124] The electronic device also includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 603 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0125] The electronic device may further include an input unit 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0126] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 602 according to the following instructions, and the processor 601 will run the computer programs stored in the memory 602, thereby realizing various functions, such as:

[0127] Acquire an image to be detected based on a target bird watching device, and preprocess the image to be detected to obtain a preprocessed image;

[0128] Obtain a pre-built target detection model, segment the pre-processed image according to the backbone network of the target detection model to obtain a plurality of grid images, perform feature extraction on all the grid images to obtain a plurality of grid image features, input all the grid image features into the connection network of the target detection model, output a plurality of enhanced images, perform anchor box category prediction on all the enhanced images through the detection head network of the target detection model, and obtain the predicted category of the pre-processed image;

[0129] Determine whether the image to be detected includes bird features according to the predicted category. When it is determined that the image to be detected includes the bird features, obtain a pre-constructed bird recognition model, perform feature recognition on the pre-processed image based on the bird recognition model, and obtain target bird information.

[0130] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the bird monitoring method above, which will not be elaborated here.

[0131] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0132] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any bird monitoring method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0133] Acquire an image to be detected based on a target bird watching device, and preprocess the image to be detected to obtain a preprocessed image;

[0134] Obtain a pre-built target detection model, segment the pre-processed image according to the backbone network of the target detection model to obtain a plurality of grid images, perform feature extraction on all the grid images to obtain a plurality of grid image features, input all the grid image features into the connection network of the target detection model, output a plurality of enhanced images, perform anchor box category prediction on all the enhanced images through the detection head network of the target detection model, and obtain the predicted category of the pre-processed image;

[0135] Determine whether the image to be detected includes bird features according to the predicted category. When it is determined that the image to be detected includes the bird features, obtain a pre-constructed bird recognition model, perform feature recognition on the pre-processed image based on the bird recognition model, and obtain target bird information.

[0136] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0137] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0138] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the bird monitoring methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the bird monitoring methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0139] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned bird monitoring method.

[0140] The above is a detailed introduction to a bird monitoring method, device, electronic device and computer storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A bird monitoring method, characterized in that: include: Acquire an image to be detected based on a target bird watching device, and preprocess the image to be detected to obtain a preprocessed image; Obtain a pre-built target detection model, segment the pre-processed image according to the backbone network of the target detection model to obtain a plurality of grid images, perform feature extraction on all the grid images to obtain a plurality of grid image features, input all the grid image features into the connection network of the target detection model, output a plurality of enhanced images, perform anchor box category prediction on all the enhanced images through the detection head network of the target detection model, and obtain the predicted category of the pre-processed image; Determine whether the image to be detected includes bird features according to the predicted category. When it is determined that the image to be detected includes the bird features, obtain a pre-constructed bird recognition model, perform feature recognition on the pre-processed image based on the bird recognition model, and obtain target bird information.

2. The bird monitoring method according to claim 1, characterized in that: The method of performing anchor box category prediction on all the enhanced images through the detection head network of the target detection model to obtain the predicted category of the preprocessed image includes: Based on the convolution layer and the pooling layer of the detection head network, convolution calculation is performed on the enhanced image to obtain multiple anchor box results corresponding to each enhanced image; The grid prediction category of each of the enhanced images is calculated according to the anchor box results, and the prediction category of the preprocessed image is obtained by non-maximum suppression calculation based on all the grid prediction categories.

3. The bird monitoring method according to claim 2, characterized in that: The calculating the grid prediction category of each enhanced image according to the anchor frame result comprises: Obtain a stored reference image, and filter the anchor frame results of the same enhanced image according to the reference image to obtain a target anchor frame; The target anchor frame is calculated by a normalization function to obtain a grid prediction category of each enhanced image.

4. The bird monitoring method according to claim 3, characterized in that: The step of screening the anchor frame results of the same enhanced image according to the reference image to obtain the target anchor frame includes: Calculating the confidence of each anchor frame result and the reference image; The anchor box with the largest confidence is selected as the target anchor box.

5. The bird monitoring method according to claim 1, characterized in that: The backbone network includes a sub-cross-stage local network, a total cross-stage local network and a pyramid fusion network. The feature extraction is performed on all the grid images to obtain multiple grid image features, including: Performing preliminary feature extraction on each of the grid images based on the sub-cross-stage local network and the total cross-stage local network to obtain initial features; The initial features are fused according to the pyramid fusion network to obtain grid image features corresponding to each grid image.

6. The bird monitoring method according to claim 1, characterized in that: The step of performing feature recognition on the preprocessed image based on the bird recognition model to obtain target bird information includes: The bird recognition model includes a first convolution layer, a second convolution layer, an attention calculation layer, a third convolution layer and a fully connected layer. Based on the first convolution layer, a convolution dimension-raising calculation is performed on the pre-processed image to obtain a dimension-raising feature map. Performing channel-by-channel convolution calculation on the dimension-increased feature map according to the second convolution layer to obtain a first convolution feature; Based on the attention calculation layer, extracting features from the first convolutional features through an attention mechanism to obtain attention features; Performing dimension reduction and fusion calculation on the attention feature according to the third convolutional layer to obtain an attention feature map; The attention feature map is mapped to category labels through the fully connected layer to obtain the target bird information.

7. The bird monitoring method according to claim 1, characterized in that: After determining whether the image to be detected includes bird features according to the predicted category, the method further includes: When it is determined that the image to be detected does not include the bird feature, locating the interfering animal in the image to be detected; The repelling system of the target bird watching device is started, and high-frequency sound waves are sent based on the repelling system to repel the interfering animals through the high-frequency sound waves.

8. A bird monitoring device, characterized in that: include: A preprocessing module, used for acquiring an image to be detected based on a target bird watching device, and preprocessing the image to be detected to obtain a preprocessed image; A first detection module is used to obtain a pre-built target detection model, segment the pre-processed image according to the backbone network of the target detection model to obtain a plurality of grid images, perform feature extraction on all the grid images to obtain a plurality of grid image features, input all the grid image features to the connection network of the target detection model, output a plurality of enhanced images, perform anchor box category prediction on all the enhanced images through the detection head network of the target detection model, and obtain the predicted category of the pre-processed image; The second detection module is used to determine whether the image to be detected includes bird features according to the predicted category. When it is determined that the image to be detected includes the bird features, a pre-constructed bird recognition model is obtained, and feature recognition is performed on the pre-processed image based on the bird recognition model to obtain target bird information.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the bird monitoring method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the bird monitoring method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Wetland natural reserve migrant bird real-time distribution mapping method and system

    CN119941899A