ANN-to-SNN-based unmanned aerial vehicle flying bird detection method

By converting the artificial neural network model YOLOv5-ANN into the pulsed neural network model Spiking-YOLOv5-SNN, the problems of complex artificial neural network design and complex pulsed neural network training algorithm in drone bird detection are solved, and efficient bird detection and real-time processing capabilities are improved in complex contexts.

CN119992600AActive Publication Date: 2025-05-13SOUTHWEAT UNIV OF SCI & TECH +2
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510462362.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-05-13
Estimated Expiration
2045-04-14

AI Technical Summary

Technical Problem

Among the existing drone bird detection methods, artificial neural network design is complex and the calculation amount is huge; pulse neural network training algorithm is complex.

Method used

The drone flight bird detection method based on ANN to SNN is adopted. By obtaining the image data of low-altitude flight birds, preprocessing and training, the artificial neural network model YOLOv5-ANN is obtained, and it is converted into the pulse neural network model Spiking-YOLOv5-SNN, and the fast response characteristics and sparseness of SNN are used for detection.

Benefits of technology

Effectively detect low-altitude flying birds in complex contexts, improve the security of drones, reduce network bandwidth usage, reduce network resource consumption, and significantly improve the real-time processing capabilities of bird detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992600A_ABST
    Figure CN119992600A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle flying bird detection method based on ANN-to-SNN, and belongs to the technical field of unmanned aerial vehicle target detection, and the method comprises the steps: obtaining the image data of a low-altitude flying bird and a bird target detection data set; training according to the bird target detection data set to obtain an artificial neural network model YOLOv5-ANN; establishing a mapping relation between the activation output of the artificial neural network model YOLOv5-ANN and the pulse frequency of the pulse neurons; the artificial neural network model YOLOv5-ANN is converted into a spiking neural network model Spiking-YOLOv5-SNN, and the spiking neural network model Spiking-YOLOv5-SNN which completes training is adopted to carry out flying bird detection on the unmanned aerial vehicle. According to the method, the efficient target detection capability of the artificial neural network model YOLOv5 and the quick response characteristic of the pulse neural network model are combined, so that the low-altitude flying birds can be effectively detected in a complex background, and the safety of the unmanned aerial vehicle is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of unmanned aerial vehicle target detection, and in particular relates to a method for detecting flying birds in unmanned aerial vehicle based on ANN to SNN conversion. Background Art

[0002] With the rapid development of drone technology, drones have been widely used in agriculture, environmental monitoring, logistics and distribution, etc. However, low-flying birds pose a potential threat to the safety of drones. The collision between birds and drones may not only cause damage to the drone and affect the execution of the flight mission, but also endanger the safety of people and property on the ground.

[0003] Traditional computer vision methods rely on manually designed features, such as HOG, SIFT and other methods, which have limited effect on target detection in complex backgrounds. In contrast, deep learning, especially artificial neural networks (ANNs), has shown significant advantages in the field of bird detection due to its powerful feature learning ability. Convolutional neural networks (CNNs), as a type of ANNs, can automatically learn multi-level feature representations from raw images, greatly improving the accuracy and robustness of target detection. However, in order to obtain reliable accuracy, the network model of artificial neural networks is often designed to be more complex, resulting in huge computational complexity, which poses a major challenge for resource-constrained devices such as drones.

[0004] Spiking Neural Networks (SNNs) have been introduced as an emerging neural computing model. Compared with traditional artificial neural networks, SNNs can maintain accuracy while having lower power consumption and higher computing efficiency when processing high-speed moving objects (such as flying birds). The structure and working principle of SNNs are closer to the biological brain, which can achieve a more natural computing mode and improve the robustness and adaptability of detection. Due to the pulse emission mechanism, SNNs have lower power consumption and higher computing efficiency in hardware implementation, which is particularly suitable for resource-constrained platforms such as drones. However, the current training algorithm of SNNs is relatively complex, especially for training on large-scale data sets. Summary of the invention

[0005] The purpose of the present invention is to address the above-mentioned deficiencies in the prior art and provide a method for detecting flying birds on a UAV based on ANN to SNN, so as to solve the problems of complex artificial neural network design and huge calculation amount in the existing UAV bird detection and complex pulse neural network training algorithm.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] A method for detecting flying birds of unmanned aerial vehicle based on ANN to SNN, comprising the following steps:

[0008] S1, obtaining image data of low-flying birds;

[0009] S2, preprocessing the image data to obtain a bird target detection data set;

[0010] S3, training an artificial neural network model YOLOv5-ANN according to the bird target detection data set;

[0011] S4. Determine the spiking neuron and establish a mapping relationship between the activation output of the artificial neural network model YOLOv5-ANN and the spiking frequency of the spiking neuron;

[0012] S5. Based on the mapping relationship in S4, the artificial neural network model YOLOv5-ANN is converted into a spiking neural network model Spiking -YOLOv5-SNN;

[0013] S6. Use the trained spiking neural network model Spiking-YOLOv5-SNN to detect flying birds in UAVs.

[0014] Furthermore, in S2, the flying bird target detection dataset is divided into a training set, a validation set, and a test set with a ratio of 7:2:1, and the training set, the validation set, and the test set are used to train the artificial neural network model YOLOv5-ANN.

[0015] Furthermore, in S4, an integration-discharge model is used to simulate spiking neurons, and a subtraction reset mechanism is introduced into the integration-discharge model. When the spiking neuron discharges, the voltage portion exceeding the excitation threshold will be retained;

[0016] Among them, the kinetic equation of the integration-discharge model with the introduction of the subtraction reset mechanism is:

[0017] ;

[0018] ;

[0019] In the formula, is the presynaptic membrane potential at the tth time step in the integrate-discharge model, is the postsynaptic membrane potential at the tth time step in the integrate-discharge model, is the postsynaptic membrane potential at the t-1th time step in the integrate-discharge model, For the The synaptic weights between the neurons in the first layer and the neurons in the first layer, The lth layer of neurons receives input from the previous layer. is the pulse emitted by the neurons in layer l, is the firing threshold of the neurons in the lth layer;

[0020] The neuron pulse firing rule is expressed as:

[0021] .

[0022] Furthermore, the mapping relationship in S4 is:

[0023] The spike firing rate of the spiking neuron in the integrate-and-discharge model is equated with the activation value of the artificial neural network model YOLOv5-ANN;

[0024] The dynamic equation is summed over time steps 1 to T, and the relationship between the pulse firing rates of neurons in two adjacent layers is obtained as follows:

[0025] ;

[0026] In the formula, is the pulse firing rate of neurons in layer l, which represents the average postsynaptic potential of neurons in layer l; is the pulse firing rate of the l-1 layer neurons, indicating the average postsynaptic potential of the l-1 layer neurons; T is the total time step; is the initial postsynaptic membrane potential.

[0027] Furthermore, the kinetic equation is summed over time steps 1 to T, including:

[0028] The kinetic equations are combined to express:

[0029] ;

[0030] The combined kinetic equations are summed over time steps 1 to T:

[0031] ;

[0032] in, .

[0033] Furthermore, in S5, the artificial neural network model YOLOv5-ANN is converted into a spiking neural network model Spiking -YOLOv5-SNN, including the following steps:

[0034] S51, modify the activation function in the artificial neural network model YOLOv5-ANN to the ReLU activation function;

[0035] S52. Modify all maximum pooling layers with a step size of 2 in the artificial neural network model YOLOv5-ANN to convolutional layers with the same step size, and remove the maximum pooling layer with a step size of 1;

[0036] S53, modify the upsampling layer in the artificial neural network model YOLOv5-ANN to a deconvolution layer;

[0037] S54. Integrate the parameters of the batch normalization layer in the artificial neural network model YOLOv5-ANN into the weights of the previous convolutional layer adjacent to the batch normalization layer to obtain the spiking neural network model Spiking -YOLOv5-SNN.

[0038] Furthermore, the batch normalization layer in S54 is expressed as:

[0039] ;

[0040] ;

[0041] ;

[0042] ;

[0043] In the formula, is the average value of all data in a batch; m is the number of data in a batch; is the i-th data of a batch of inputs that will enter the activation function; is the variance of all data in a batch; is the data after standardization; is a constant; is the normalized data; is the scaling factor; For offset.

[0044] Furthermore, in S54, the parameters of the batch normalization layer in the artificial neural network model YOLOv5-ANN are integrated into the weights of the previous convolutional layer immediately adjacent to the batch normalization layer, which is specifically expressed as:

[0045] ;

[0046] ;

[0047] In the formula, is the weight after folding by batch normalization layer; For the The j-th synaptic weight of neuron i in layer; For the The scaling factor of layer neuron i, For the The variance of layer neuron i; is the offset after folding by the batch normalization layer; For the The average value of neurons in layer i; For the Batch normalized offset of neuron i in layer; For the Layer of neurons offset.

[0048] The method for detecting flying birds in UAV based on ANN to SNN provided by the present invention has the following beneficial effects:

[0049] 1. The present invention combines the efficient target detection capability of the artificial neural network model YOLOv5 and the rapid response characteristics of the pulse neural network model, which can effectively detect low-flying birds in complex backgrounds and improve the safety of drones.

[0050] 2. The present invention adopts the architecture of pulse neural network (SNN). During the low-altitude bird detection process of UAV, SNN transmits information through pulse signals instead of continuous signals, which makes it more difficult for other institutions to intercept data. In addition, the asynchronous working mechanism of SNN reduces the chance of data exposure, thereby improving data security.

[0051] 3. The present invention makes full use of the sparsity and event-driven mechanism of SNN in the process of data transmission. Compared with the traditional artificial neural network that needs to continuously transmit a large amount of data, SNN only transmits data when a pulse event occurs, which greatly reduces the occupancy of network bandwidth and the consumption of network resources. It is particularly suitable for the needs of UAVs to efficiently detect flying birds during low-altitude flight.

[0052] 4. The present invention significantly improves the real-time processing capability of bird detection by combining the efficient target detection capability of YOLOv5 and the fast response characteristics of the pulse neural network. The network structure of YOLOv5 can quickly capture and process the detailed information of birds, while the pulse neural network provides faster response time and higher energy efficiency in the inference stage, so that the entire bird detection can be performed in real time with low latency. Detection and response, particularly suitable for application scenarios with high real-time requirements such as bird detection in low-altitude flight environments of drones. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 This is a flow chart of the UAV flying bird detection method based on ANN to SNN conversion of the present invention.

[0054] Figure 2is a curve of the relationship between the pulse emission frequency and input of neurons in the integration-discharge model of the present invention, and a ReLU activation function curve; wherein, Figure 2 (1) is the relationship curve between the pulse firing frequency of neurons and the input signal in the integration-discharge model; Figure 2 (2) in is the curve of the ReLU activation function.

[0055] Figure 3 This is a network architecture diagram of the spiking neural network model Spiking-YOLOv5-SNN of the present invention.

[0056] Figure 4 This is a comparison chart of the detection effects of the artificial neural network model YOLOv5-ANN and the spiking neural network model Spiking -YOLOv5-SNN of the present invention; wherein, Figure 4 (1) in the figure is the prediction result of YOLOv5-ANN for the first picture. Figure 4 (2) in the figure is the prediction result of Spiking-YOLOv5-SNN for the first picture. Figure 4 (3) in the figure is the prediction result of YOLOv5-ANN for the second picture. Figure 4 (4) in the figure is the prediction result of Spiking-YOLOv5-SNN for the second picture. Figure 4 (5) in the figure is the prediction result of YOLOv5-ANN for the third picture. Figure 4 (6) in the figure is the prediction result of Spiking-YOLOv5-SNN for the third picture. Figure 4 (7) in the figure is the prediction result of YOLOv5-ANN for the fourth picture. Figure 4 (8) in the figure is the prediction result of Spiking-YOLOv5-SNN for the fourth picture. Figure 4 (9) in the figure is the prediction result of YOLOv5-ANN for the fifth picture. Figure 4 (10) in the figure is the prediction result of Spiking-YOLOv5-SNN for the fifth picture. Figure 4 (11) in the figure is the prediction result of YOLOv5-ANN for the sixth picture. Figure 4 (12) in the figure is the prediction result of Spiking-YOLOv5-SNN for the sixth picture. DETAILED DESCRIPTION

[0057] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0058] Example 1

[0059] This embodiment provides a method for detecting flying birds in a drone based on ANN to SNN, referring to Figure 1 , which includes the following:

[0060] Step S1, obtaining image data of low-flying birds;

[0061] This embodiment collects a large amount of low-altitude flying bird image data through drone aerial photography, surveillance cameras, and online public data, including the flight conditions of different types of birds in various environments and weather conditions, ensuring the richness and representativeness of the data. The collected data is screened to remove images of low quality and containing interference factors, and the screened image data is labeled using a manual labeling method.

[0062] Step S2, preprocessing the image data to obtain a bird target detection data set;

[0063] The preprocessing in this embodiment includes technical means such as image enhancement, image augmentation, and image registration, which aims to enhance image quality and image information richness, thereby reducing the impact of interference factors and improving the ability of subsequent models to obtain important features. After completing the image preprocessing, the final data set is divided into a training set, a validation set, and a test set in a ratio of 7:2:1.

[0064] Step S3, training an artificial neural network model YOLOv5-ANN according to a bird target detection data set;

[0065] The encoding structure in the artificial neural network model YOLOv5-ANN includes convolution and pooling modules, which are used to extract high-dimensional abstract features from input data through customized operations. The convolution module mainly includes convolution layer, batch normalization layer and activation function layer, and obtains high-dimensional resolution feature maps through these operations.

[0066] Step S4, determining the spiking neuron, and establishing a mapping relationship between the activation output of the artificial neural network model YOLOv5-ANN and the spiking frequency of the spiking neuron;

[0067] Specifically, this embodiment uses an integration-discharge model to simulate pulse neurons. In order to reduce information loss and improve detection accuracy, a "subtraction reset" mechanism is introduced into the integration-discharge model, that is, when the neuron discharges, the voltage that exceeds the threshold is retained instead of being completely reset. This improved integration-discharge model can better simulate the behavior of actual biological neurons, thereby improving the recognition accuracy of low-flying birds when processing dynamic visual image data taken by drones. The dynamic equation of the improved integration-discharge model is expressed as:

[0068] (1)

[0069] (2)

[0070] in, is the presynaptic membrane potential at the tth time step in the integrate-discharge model, is the postsynaptic membrane potential at the tth time step in the integrate-discharge model, is the postsynaptic membrane potential at the t-1th time step in the integrate-discharge model, For the The synaptic weights between the neurons in the first layer and the neurons in the first layer, The lth layer of neurons receives input from the previous layer. is the pulse emitted by the neurons in layer l, is the firing threshold of the neurons in the lth layer;

[0071] The neuron pulse firing rule is expressed as:

[0072] (3)

[0073] For a spiking neuron, if its membrane potential exceeds the excitation threshold, the neuron will emit a pulse. If the presynaptic neuron in layer l-1 emits a pulse, then The postsynaptic neurons in the layer receive the weighted postsynaptic potential , which is the input value ,Right now:

[0074] (4)

[0075] The mapping relationship between the activation output of the artificial neural network model YOLOv5-ANN and the pulse frequency of the spiking neuron in this embodiment is: the pulse firing rate of the spiking neuron in the integrate-discharge model is equal to (or approximately equal to) the activation value of the artificial neural network model YOLOv5-ANN; in this way, high accuracy can be maintained when processing dynamic visual data while reducing computational complexity;

[0076] Combining equation (1) with equation (2), we can get:

[0077] (5)

[0078] Formula (5) is summed over time steps 1 to T to obtain:

[0079] (6)

[0080] use To represent the average postsynaptic potential, and combining equation (4) with equation (6), the relationship between the pulse firing rate of neurons in two adjacent layers is obtained as follows:

[0081] (7)

[0082] (8)

[0083] In the formula, is the pulse firing rate of neurons in layer l, which represents the average postsynaptic potential of neurons in layer l; is the pulse firing rate of the l-1 layer neurons, indicating the average postsynaptic potential of the l-1 layer neurons; T is the total time step; is the initial postsynaptic membrane potential.

[0084] Equation (8) is the relationship between the pulse firing rates of neurons in two adjacent layers in the integrate-and-discharge model.

[0085] Step S5, based on the mapping relationship in S4, converting the artificial neural network model YOLOv5-ANN into a spiking neural network model Spiking -YOLOv5-SNN, which specifically includes the following sub-steps:

[0086] Step S51, improvement of activation function: in the activation function of the artificial neural network model YOLOv5-ANN basic network, the original activation function is improved to the ReLU activation function to avoid generating negative values, so as to ensure that the membrane potential of the spiking neuron of the spiking neural network is within a reasonable threshold;

[0087] There is a strong correlation between the nonlinear characteristics of the ReLU activation function in this embodiment and the pulse firing rate of neurons in the integrate-discharge model. Figure 2As shown in the figure, the curve of the relationship between the pulse emission frequency and input of the neuron in the integral-discharge model is almost consistent with the curve of the ReLU activation function. This feature can be used to effectively solve the problem of negative output values ​​and improve the accuracy of the converted SNN model. The nonlinear characteristics of the ReLU activation function can simulate the behavior of neurons suppressing pulse emission when the input current is small, and gradually activating after the input current increases. Using this feature, the problem of negative output values ​​in the neural network model can be effectively solved, and the influence of negative input on subsequent layers can be avoided, thereby improving the accuracy and robustness of the converted spiking neural network model.

[0088] Step S52, improvement of the maximum pooling layer: improve all maximum pooling layers with a step size of 2 in the artificial neural network model YOLOv5-ANN basic network to convolutional layers with the same step size to adapt to the computational properties of the integration-discharge model network, and remove all maximum pooling layers with a step size of 1 to reduce the accuracy loss of the network;

[0089] Since the maximum pooling layer in the artificial neural network model YOLOv5-ANN will cause a decrease in accuracy when converted to the corresponding layer in the pulse neural network, the use of the average pooling layer instead of the maximum pooling layer in this embodiment will have a negative impact on the accuracy and energy efficiency of the network. At the same time, completely removing the pooling layer will lose the function of dimensionality reduction and removing redundant information. The convolution layer can also reduce the size of the feature map and increase the receptive field by adjusting the step size. Therefore, this embodiment improves the maximum pooling layer with a step size of 2 in the artificial neural network model YOLOv5-ANN basic network to a convolution layer with a step size of 2, and removes the maximum pooling layer with a step size of 1.

[0090] Step S53, improvement of upsampling layer: improving the upsampling layer of the artificial neural network model YOLOv5-ANN into a deconvolution layer to adapt to the information transmission mechanism of the pulse neural network, so as to better process the video stream data shot by the drone and improve the real-time and reliability of bird detection;

[0091] For the upsampling layer in the artificial neural network model YOLOv5-ANN, this embodiment improves it into a deconvolution layer. Because the upsampling layer does not have weights, it is difficult to convert it into a pulse neural network structure, while the deconvolution layer has similar functions to the upsampling layer and can complete this conversion more smoothly. In the actual application of low-altitude bird detection in drones, this improvement can ensure that the upsampling operation remains efficient and accurate, especially when processing high-resolution images taken by drones.

[0092] Step S54, batch normalization improvement: The parameters of the batch normalization layer in the artificial neural network model YOLOv5-ANN are integrated into the weights of the previous convolutional layer immediately adjacent to the batch normalization layer to simplify the network structure and maintain accuracy, which helps to maintain the stability of the model and achieve efficient operation in a resource-constrained environment. After the above improvements to the network artificial neural network model YOLOv5-ANN, a spiking neural network model Spiking -YOLOv5-SNN is obtained, and its network structure is as follows Figure 3 shown.

[0093] Specifically, due to the impulse nature of neuronal activity, the traditional application of batch normalization (BN) layers is no longer applicable. However, the BN layer has a positive effect on improving the speed and accuracy of model training, and direct removal may lead to a decrease in network performance. Therefore, this embodiment adopts the method of folding the parameters of the BN layer into the weights of the previous convolutional layer. This method ensures that the advantages of the BN layer are retained in the spiking neural network without sacrificing network performance. In the task of detecting low-altitude flying birds on drones, this improvement helps to improve the robustness and detection accuracy of the model. The calculation formula of the BN layer is shown in equations (9)-(12):

[0094] (9)

[0095] (10)

[0096] (11)

[0097] (12)

[0098] Formula (9) and Formula (10) are used to calculate the mean and variance of a batch of input data. Formula (9) standardizes the data, and Formula (10) is the normalized data.

[0099] In the formula, is the average value of all data in a batch; m is the number of data in a batch; is the i-th data of a batch of inputs that will enter the activation function; is the variance of all data in a batch; is the data after standardization; is a constant; is the normalized data; is the scaling factor; For offset.

[0100] The formula for folding the BN layer into the Conv layer from equations (9) and (10) is shown in equations (13)-(14):

[0101] (13)

[0102] (14)

[0103] In the formula, is the weight after folding by batch normalization layer; For the The j-th synaptic weight of neuron i in layer; For the The scaling factor of layer neuron i, For the The variance of layer neuron i; is the offset after folding by the batch normalization layer; For the The average value of neurons in layer i; For the Batch normalized offset of neuron i in layer; For the Layer of neurons offset.

[0104] In the task of detecting low-altitude flying birds on drones, by folding the parameters of the BN layer into the weights of the convolutional layer, the present invention ensures that even after the network is converted to an SNN, the model can still maintain the normalization effect obtained during training, thereby improving the stability and accuracy of detection. This improvement is particularly important for processing rapidly changing visual data captured by drones, as it helps to maintain high-precision bird detection in complex flight environments.

[0105] Step S6: Use the trained spiking neural network model Spiking-YOLOv5-SNN to detect flying birds in UAVs, which specifically includes the following contents:

[0106] The spiking neural network model Spiking -YOLOv5-SNN is deployed on the AGX development board. After training, mean Average Precision (mAP), Intersection over Union (IoU), Precision, Total Parameters, Floating Point Operations Per Second (FLOPs), Multiply-Accumulate Operations (MACs), FPS, energy efficiency and energy consumption are used as evaluation indicators. The prediction results are as follows: Figure 4 As shown, Figure 4The comparison between YOLOv5-ANN and Spiking-YOLOv5-SNN is also shown, and the evaluation index results are shown in Table 1.

[0107] Table 1 Comparison of ANN and SNN indicators

[0108]

[0109] As shown in Table 1, Spiking-YOLOv5-SNN has a slight decrease in accuracy compared to YOLOv5-ANN, specifically, mAP is reduced by 0.69% (YOLOv5-ANN: 82.88%, SNN: 82.19%) and IoU is slightly reduced by 0.0002 (YOLOv5-ANN: 0.9313, Spiking-YOLOv5-SNN: 0.9311), but Figure 4 It can be seen that this slight drop in accuracy has no negative impact on the model's prediction, and the predicted position of the target candidate box is also excellent. It can be clearly seen from Table 1 that Spiking-YOLOv5-SNN shows significant advantages in reasoning speed and energy efficiency. The FPS of Spiking-YOLOv5-SNN reaches 11.3 FPS, which is significantly higher than the 9.3 FPS of YOLOv5-ANN, indicating that Spiking-YOLOv5-SNN can achieve faster reasoning performance under the same hardware environment. The energy efficiency of SNN is 1.277FPS / unit energy, which is much higher than the 0.865 FPS / unit energy of YOLOv5-ANN, showing the ability of Spiking-YOLOv5-SNN to process more data under unit energy consumption, thereby improving the overall energy efficiency of the model. In terms of energy consumption, the energy consumption of Spiking-YOLOv5-SNN is 8.85J, which is lower than the 10.75J of YOLOv5-ANN, showing the low power consumption characteristics of Spiking-YOLOv5-SNN in high-performance reasoning. The response time of Spiking-YOLOv5-SNN is 0.0885 seconds, which is shorter than the 0.1075 seconds of YOLOv5-ANN, indicating that Spiking-YOLOv5-SNN has a faster response speed when performing reasoning tasks and is suitable for application scenarios with higher real-time requirements.

[0110] Based on the above indicators, although Spiking-YOLOv5-SNN has a slight sacrifice in accuracy, its significant advantages in reasoning speed, energy efficiency, energy consumption and response time indicate that the Spiking-YOLOv5-SNN model has higher computing efficiency and energy-saving effects, and is especially suitable for deployment in systems with limited resources or high real-time requirements.

[0111] Although the specific implementation of the invention is described in detail in conjunction with the drawings, it should not be understood as limiting the scope of protection of this patent. Within the scope described in the claims, various modifications and variations that can be made by those skilled in the art without creative work still fall within the scope of protection of this patent.

Claims

1. A method for detecting flying birds in UAV based on ANN to SNN, characterized in that: The following steps are involved: S1, obtaining image data of low-flying birds; S2, preprocessing the image data to obtain a bird target detection data set; S3, training an artificial neural network model YOLOv5-ANN according to the bird target detection data set; S4. Determine the spiking neuron and establish a mapping relationship between the activation output of the artificial neural network model YOLOv5-ANN and the spiking frequency of the spiking neuron; S5. Based on the mapping relationship in S4, the artificial neural network model YOLOv5-ANN is converted into a spiking neural network model Spiking -YOLOv5-SNN; S6. Use the trained spiking neural network model Spiking-YOLOv5-SNN to detect flying birds in UAVs.

2. The method for detecting flying birds of unmanned aerial vehicles based on ANN to SNN according to claim 1, characterized in that: In S2, the flying bird target detection data set is divided into a training set, a validation set and a test set in a ratio of 7:2:1, and the training set, the validation set and the test set are used to train the artificial neural network model YOLOv5-ANN.

3. The method for detecting flying birds of unmanned aerial vehicles based on ANN to SNN according to claim 1, characterized in that: In S4, an integration-discharge model is used to simulate spiking neurons, and a subtraction reset mechanism is introduced into the integration-discharge model. When the spiking neuron discharges, the voltage portion exceeding the excitation threshold will be retained; Among them, the kinetic equation of the integration-discharge model with the introduction of the subtraction reset mechanism is: ; ; In the formula, is the presynaptic membrane potential at the tth time step in the integrate-discharge model, is the postsynaptic membrane potential at the tth time step in the integrate-discharge model, is the postsynaptic membrane potential at the t-1th time step in the integrate-discharge model, For the The synaptic weights between the neurons in the first layer and the neurons in the first layer, The lth layer of neurons receives input from the previous layer. is the pulse emitted by the neurons in layer l, is the firing threshold of the neurons in the lth layer; The neuron pulse firing rule is expressed as: 。 4. The method for detecting flying birds in UAV based on ANN to SNN according to claim 3 is characterized in that: The mapping relationship in S4 is: The spike firing rate of the spiking neuron in the integrate-and-discharge model is equated with the activation value of the artificial neural network model YOLOv5-ANN; The dynamic equation is summed over time steps 1 to T, and the relationship between the pulse firing rates of neurons in two adjacent layers is obtained as follows: ; In the formula, is the pulse firing rate of neurons in layer l, which represents the average postsynaptic potential of neurons in layer l; is the pulse firing rate of the l-1 layer neurons, indicating the average postsynaptic potential of the l-1 layer neurons; T is the total time step; is the initial postsynaptic membrane potential.

5. The method for detecting flying birds in UAV based on ANN to SNN according to claim 4 is characterized in that: The kinetic equation is summed over time steps 1 to T, including: The kinetic equations are combined to express: ; The combined kinetic equations are summed over time steps 1 to T: ; in, .

6. The method for detecting flying birds in UAV based on ANN to SNN according to claim 1, characterized in that: In S5, the artificial neural network model YOLOv5-ANN is converted to the spiking neural network model Spiking -YOLOv5-SNN, including the following steps: S51, modify the activation function in the artificial neural network model YOLOv5-ANN to the ReLU activation function; S52. Modify all maximum pooling layers with a step size of 2 in the artificial neural network model YOLOv5-ANN to convolutional layers with the same step size, and remove the maximum pooling layer with a step size of 1; S53, modify the upsampling layer in the artificial neural network model YOLOv5-ANN to a deconvolution layer; S54. Integrate the parameters of the batch normalization layer in the artificial neural network model YOLOv5-ANN into the weights of the previous convolutional layer adjacent to the batch normalization layer to obtain the spiking neural network model Spiking -YOLOv5-SNN.

7. The method for detecting flying birds in UAV based on ANN to SNN according to claim 6, characterized in that: The batch normalization layer in S54 is expressed as: ; ; ; ; In the formula, is the average value of all data in a batch; m is the number of data in a batch; is the i-th data of a batch of inputs that will enter the activation function; is the variance of all data in a batch; is the data after standardization; is a constant; is the normalized data; is the scaling factor; For offset.

8. The method for detecting flying birds in UAV based on ANN to SNN according to claim 7, characterized in that: In S54, the parameters of the batch normalization layer in the artificial neural network model YOLOv5-ANN are integrated into the weights of the convolutional layer immediately before the batch normalization layer, which is specifically expressed as: ; ; In the formula, is the weight after folding by batch normalization layer; For the The j-th synaptic weight of neuron i in layer; For the The scaling factor of layer neuron i, For the The variance of layer neuron i; is the offset after folding by the batch normalization layer; For the The average value of neurons in layer i; For the Batch normalized offset of neuron i in layer; For the Layer of neurons offset.

Citation Information

Patent Citations

  • Helmet wearing detection method based on pulse neural network

    CN116453164A

  • Pulse neural network reasoning method and system

    CN116523005A

  • Method and system for performing target detection on pulse signal

    CN117252239A

  • Unmanned aerial vehicle flying bird detection method, system, equipment and medium

    CN117576724A

  • Trusted low-slow small unmanned aerial vehicle detection method based on dynamic adaptive feature perception

    CN117635904A