An unmanned aerial vehicle flight bird detection method based on ANN to SNN
By converting YOLOv5-ANN to Spiking-YOLO5-SNN, and combining the integral-discharge model with an improved layer structure, the problem of high computational complexity in UAV bird detection is solved, and efficient, real-time bird detection is achieved on resource-constrained platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2026-03-24
AI Technical Summary
In existing drone bird detection methods, artificial neural networks are complex to design and require huge amounts of computation, while spiking neural network training algorithms are complex, making it difficult to efficiently detect low-flying birds on resource-constrained drone platforms.
An ANN-to-SNN conversion method was adopted, which transformed the YOLOv5-ANN model into Spiking-YOLOv5-SNN. Combining the integral-discharge model and mapping relationship, the activation function, max pooling layer, upsampling layer and batch normalization layer were improved to establish a spiking neural network model for bird detection.
It improves the safety and real-time performance of bird detection by drones, reduces computational complexity and energy consumption, is suitable for resource-constrained drone platforms, and has rapid response and efficient detection capabilities.
Smart Images

Figure CN119992600B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of unmanned aerial vehicle target detection, and particularly relates to a method for detecting flying birds of unmanned aerial vehicles based on ANN to SNN. BACKGROUND
[0002] With the rapid development of unmanned aerial vehicle technology, unmanned aerial vehicles have been widely used in the fields of agriculture, environmental monitoring, logistics distribution, etc. However, flying birds in low altitude pose a potential threat to the safety of unmanned aerial vehicles. Collision between flying birds and unmanned aerial vehicles not only may cause damage to unmanned aerial vehicles and affect the execution of flight tasks, but also may endanger the safety of ground personnel and property.
[0003] Traditional computer vision methods rely on manually designed features such as HOG, SIFT, etc. These methods have limited effectiveness in target detection under complex backgrounds. In contrast, deep learning, especially artificial neural networks (ANNs), has shown significant advantages in flying 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 precision, the network model of artificial neural networks is often designed to be complex, resulting in a huge amount of calculation, which poses a major challenge to resource-constrained devices such as unmanned aerial vehicles.
[0004] Spiking neural networks (SNNs) are introduced as a new emerging neural computing model. Compared with traditional artificial neural networks, SNNs can maintain the same accuracy while having lower power consumption and higher computational efficiency when dealing with high-speed moving objects such as flying birds. The structure and working principle of SNNs are more similar to the biological brain, enabling a more natural computing mode and improving the robustness and adaptability of detection. Due to the pulse firing mechanism, SNNs have lower power consumption and higher computational efficiency in hardware implementation, making them particularly suitable for resource-constrained platforms such as unmanned aerial vehicles. However, the training algorithm of SNNs is relatively complex, especially on large-scale data sets. SUMMARY
[0005] The purpose of the present application is to solve the problems of complex artificial neural network design and huge amount of calculation in existing unmanned aerial vehicle flying bird detection, and to provide a method for detecting flying birds of unmanned aerial vehicles based on ANN to SNN.
[0006] To achieve the above purpose, the technical solution adopted by the present application is:
[0007] An unmanned aerial vehicle flying bird detection method based on ANN to SNN, comprising the following steps:
[0008] S1, obtaining image data of low-altitude flying birds;
[0009] S2, pre-processing the image data to obtain a flying bird target detection data set;
[0010] S3, training an artificial neural network model YOLOv5-ANN according to the flying bird target detection data set;
[0011] S4, determining the pulse neuron and establishing a mapping relationship between the activation output of the artificial neural network model YOLOv5-ANN and the pulse frequency of the pulse neuron;
[0012] 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;
[0013] S6, using the trained spiking neural network model Spiking-YOLOv5-SNN to detect flying birds of unmanned aerial vehicles.
[0014] Further, 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 in S2, and the training set, the validation set and the test set are used to train the artificial neural network model YOLOv5-ANN.
[0015] Further, in S4, the integral-discharge model is used to simulate the pulse neuron, and a subtraction reset mechanism is introduced in the integral-discharge model, and when the pulse neuron discharges, the voltage part exceeding the excitation threshold will be reserved;
[0016] The dynamics equation of the integral-discharge model with the subtraction reset mechanism is:
[0017] ;
[0018] ;
[0019] In the formula, is the presynaptic membrane potential of the integral-discharge model at the tth time step, is the postsynaptic membrane potential of the integral-discharge model at the tth time step, is the postsynaptic membrane potential of the integral-discharge model at the t-1th time step, is the synaptic weight between the jth neuron in the l-1th layer and the lth neuron, is the synaptic weight between the jth neuron in the l-1th layer and the lth neuron, For the l-th layer neuron to receive input from the previous layer, The pulses fired by neurons in layer l. The firing threshold of neurons in layer l;
[0020] The neuronal impulse firing rule is expressed as:
[0021] .
[0022] Furthermore, the mapping relationship in S4 is as follows:
[0023] The pulse emission rate of the spiking neurons in the integral-firing model is equated to the activation value of the YOLOv5-ANN artificial neural network model.
[0024] Summing the dynamic equations over time steps 1 to T, we obtain the following relationship between the pulse emission rates of neurons in two adjacent layers:
[0025] ;
[0026] In the formula, is the pulse emission rate of neurons in layer l, and represents the average postsynaptic potential of neurons in layer l; is the pulse emission rate of neurons in layer l-1, represents the average postsynaptic potential of neurons in layer l-1; T is the total time step; This represents the initial postsynaptic membrane potential.
[0027] Furthermore, the dynamic equations are summed over time steps 1 to T, including:
[0028] The dynamic equations are combined to express the following:
[0029] ;
[0030] Summing the combined kinetic equations 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 max pooling layers with a stride of 2 in the YOLOv5-ANN artificial neural network model to convolutional layers with the same stride, and remove the max pooling layers with a stride of 1.
[0036] S53. Modify the upsampling layer in the YOLOv5-ANN artificial neural network model to a deconvolution layer;
[0037] S54. Integrate the parameters of the batch normalization layer in the YOLOv5-ANN artificial neural network model into the weights of the convolutional layer immediately preceding the batch normalization layer to obtain the Spiking-YOLOv5-SNN spiking neural network model.
[0038] Furthermore, the batch normalization layer in S54 is expressed as follows:
[0039] ;
[0040] ;
[0041] ;
[0042] ;
[0043] In the formula, is the average of all data in a batch; m is the number of data in a batch; This represents the i-th data point in a batch of inputs that will soon enter the activation function. The variance of all data in a batch; This is standardized data; It is a constant; The data has been normalized. This is the scaling factor; For offset.
[0044] Furthermore, in S54, the parameters of the batch normalization layer in the YOLOv5-ANN artificial neural network model are incorporated into the weights of the convolutional layer immediately preceding the batch normalization layer, specifically as follows:
[0045] ;
[0046] ;
[0047] In the formula, These are the weights after batch normalization layer folding. For the first The weight of the j-th synapse of neuron i in layer 1; For the first The scaling factor of layer neuron i. For the first variance of layer neurons i; is the offset after batch normalization layer folding processing; is the offset of the first average of layer neurons i; is the offset of the first batch normalization offset of layer neurons i; is the offset of the first layer neurons offset.
[0048] The unmanned aerial vehicle flying bird detection method based on ANN to SNN provided by the application has the following beneficial effects:
[0049] 1. The application combines the efficient target detection capability of the artificial neural network model YOLOv5 and the fast response characteristics of the pulse neural network model, which can effectively detect low-altitude flying birds in complex backgrounds and improve the safety of unmanned aerial vehicles.
[0050] 2. The application adopts the architecture of the pulse neural network SNN, which transmits information through pulse signals instead of continuous signals during the process of detecting flying birds at low altitudes of unmanned aerial vehicles, making it more difficult for other agencies to intercept data; in addition, the asynchronous working mechanism of SNN reduces the opportunity for data exposure, thereby improving data security.
[0051] 3. The application makes full use of the sparsity and event-driven mechanism of SNN during data transmission, compared to the traditional artificial neural network which needs to continuously transmit a large amount of data, SNN only transmits data when a pulse event occurs, which greatly reduces the occupation of network bandwidth and reduces the consumption of network resources, especially suitable for the needs of efficient detection of flying birds during low-altitude flight of unmanned aerial vehicles.
[0052] 4. The application combines the efficient target detection capability of YOLOv5 and the fast response characteristics of the pulse neural network, which significantly improves the real-time processing capability of flying bird detection; the network structure of YOLOv5 can quickly capture and process the detailed information of flying birds, while the pulse neural network provides faster response time and higher energy efficiency in the inference stage, so that the entire flying bird detection can be detected and responded in real time under low delay, especially suitable for flying bird detection in low-altitude flight environment of unmanned aerial vehicles and other application scenarios with high real-time requirements. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 is the flowchart of the unmanned aerial vehicle flying bird detection method based on ANN to SNN of the application.
[0054] Figure 2The pulse firing frequency of the neuron in the integral-discharge model and the relationship curve with the input, and the ReLU activation function curve in the application; Figure 2 (1) in the above is the relationship curve between the pulse firing frequency of the neuron in the integral-discharge model and the input signal; Figure 2 (2) in the above is the curve of the ReLU activation function.
[0055] Figure 3 The network architecture diagram of the spiking neural network model Spiking-YOLOv5-SNN in the application.
[0056] Figure 4 The detection effect comparison diagram of the artificial neural network model YOLOv5-ANN and the spiking neural network model Spiking-YOLOv5-SNN in the application; wherein, Figure 4 (1) in the above is the prediction result of the first picture by YOLOv5-ANN, Figure 4 (2) in the above is the prediction result of the first picture by Spiking-YOLOv5-SNN, Figure 4 (3) in the above is the prediction result of the second picture by YOLOv5-ANN, Figure 4 (4) in the above is the prediction result of the second picture by Spiking-YOLOv5-SNN, Figure 4 (5) in the above is the prediction result of the third picture by YOLOv5-ANN, Figure 4 (6) in the above is the prediction result of the third picture by Spiking-YOLOv5-SNN, Figure 4 (7) in the above is the prediction result of the fourth picture by YOLOv5-ANN, Figure 4 (8) in the above is the prediction result of the fourth picture by Spiking-YOLOv5-SNN, Figure 4 (9) in the above is the prediction result of the fifth picture by YOLOv5-ANN, Figure 4 (10) in the above is the prediction result of the fifth picture by Spiking-YOLOv5-SNN, Figure 4 (11) in the above is the prediction result of the sixth picture by YOLOv5-ANN, Figure 1 (12) in the above is the prediction result of the sixth picture by Spiking-YOLOv5-SNN. DETAILED DESCRIPTION
[0057] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0058] Example 1
[0059] This embodiment provides a method for detecting birds in flight on unmanned aerial vehicles (UAVs) based on ANN-to-SNN conversion, referencing... Figure 2 It includes the following:
[0060] Step S1: Acquire image data of birds flying at low altitudes;
[0061] This embodiment collects a large amount of image data of low-altitude flying birds through drone aerial photography, surveillance cameras, and publicly available online data. This includes flight patterns of different bird species under various environmental and weather conditions, ensuring the richness and representativeness of the data. The collected data is then filtered to remove images of low quality or containing interfering factors. Manual annotation is then used to label the filtered image data.
[0062] Step S2: Preprocess the image data to obtain a bird target detection dataset;
[0063] This embodiment's preprocessing includes techniques such as image enhancement, image augmentation, and image registration, aiming to improve image quality and information richness, thereby reducing the impact of interference factors and enhancing the ability of subsequent models to acquire important features. After image preprocessing, the final dataset is divided into training, validation, and test sets in a ratio of 7:2:1.
[0064] Step S3: Train the artificial neural network model YOLOv5-ANN based on the bird target detection dataset;
[0065] The encoding structure of the YOLOv5-ANN artificial neural network model includes convolutional and pooling modules, which extract high-dimensional abstract features from the input data through custom operations. The convolutional module mainly includes convolutional layers, batch normalization layers, and activation function layers, and obtains high-dimensional resolution feature maps through these operations.
[0066] Step S4: Identify the spiking neurons and establish a mapping relationship between the activation output of the YOLOv5-ANN artificial neural network model and the spiking frequency of the spiking neurons.
[0067] Specifically, this embodiment uses an integral-fire model to simulate spiking neurons. To reduce information loss and improve detection accuracy, a "subtraction reset" mechanism is introduced into the integral-fire model. That is, when a neuron fires, the voltage exceeding a threshold is retained instead of being completely reset. This improved integral-fire model can better simulate the behavior of actual biological neurons, thereby improving the accuracy of identifying low-flying birds when processing dynamic visual image data captured by UAVs. The dynamic equation of the improved integral-fire model is expressed as:
[0068] (1)
[0069] (2)
[0070] in, Let be the presynaptic membrane potential at time step t in the integral-discharge model. Let be the postsynaptic membrane potential at time step t in the integral-discharge model. This represents the postsynaptic membrane potential at time step t-1 in the integral-discharge model. For the first Synaptic weights between layer 1 neurons and layer l neurons. For the l-th layer neuron to receive input from the previous layer, The pulses fired by neurons in layer l. The firing threshold of neurons in layer l;
[0071] The neuronal impulse firing rule is expressed as:
[0072] (3)
[0073] For a spiking neuron, if its membrane potential exceeds the firing threshold, the neuron will fire a spiking impulse. If the presynaptic neuron in layer (l-1) fires a spiking impulse, then the... The postsynaptic neurons in the layer receive weighted postsynaptic potentials. , which is the input value ,Right now:
[0074] (4)
[0075] In this embodiment, the mapping relationship between the activation output of the artificial neural network model YOLOv5-ANN and the pulse frequency of the spiking neuron is as follows: the pulse emission rate of the spiking neuron in the integral-firing 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) and equation (2), we get:
[0077] (5)
[0078] Equation (5) is summed over time steps 1 to T to obtain:
[0079] (6)
[0080] use Let represent the average postsynaptic potential, and combine equations (4) and (6) to obtain the relationship between the pulse emission rates of neurons in two adjacent layers:
[0081] (7)
[0082] (8)
[0083] In the formula, is the pulse emission rate of neurons in layer l, and represents the average postsynaptic potential of neurons in layer l; is the pulse emission rate of neurons in layer l-1, represents the average postsynaptic potential of neurons in layer l-1; T is the total time step; This represents the initial postsynaptic membrane potential.
[0084] Equation (8) is the relationship between the pulse emission rates of neurons in two adjacent layers in the integral-discharge model.
[0085] Step S5: Based on the mapping relationship described in S4, the artificial neural network model YOLOv5-ANN is converted 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 YOLOv5-ANN basic network of the artificial neural network model, the original activation function is improved to the ReLU activation function to avoid generating negative values, thereby ensuring that the membrane potential of the spiking neurons of the spiking neural network is within a reasonable threshold.
[0087] In this embodiment, the nonlinear characteristics of the ReLU activation function are strongly correlated with the impulse firing rate of neurons in the integral-firing model. For example... Figure 3As shown, the relationship between the neuron's firing frequency and the input in the integral-firing model almost perfectly matches the ReLU activation function curve. This characteristic can effectively address 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 firing when the input current is small, and gradually activating as the input current increases. Utilizing this characteristic, the problem of negative output values in neural network models can be effectively solved, avoiding the influence of negative inputs on subsequent layers, thereby improving the accuracy and robustness of the converted spiking neural network model.
[0088] Step S52, Improvement of max pooling layers: Improve all max pooling layers with a stride of 2 in the YOLOv5-ANN basic network of the artificial neural network model to convolutional layers with the same stride to adapt to the computational properties of the integral-discharge model network, and remove all max pooling layers with a stride of 1 to reduce the accuracy loss of the network.
[0089] Since converting the max-pooling layer in the YOLOv5-ANN artificial neural network model to its corresponding layer in a spiking neural network leads to a decrease in accuracy, this embodiment uses an average pooling layer instead of a max-pooling layer, which negatively impacts the network's accuracy and energy efficiency. Furthermore, completely removing the pooling layer would lose its dimensionality reduction and redundant information removal capabilities. Convolutional layers, by adjusting their stride, can also reduce the size of feature maps and increase the receptive field. Therefore, this embodiment improves the max-pooling layer with a stride of 2 in the YOLOv5-ANN basic network by replacing it with a convolutional layer with a stride of 2, while removing the max-pooling layer with a stride of 1.
[0090] Step S53, Improvement of the upsampling layer: The upsampling layer of the artificial neural network model YOLOv5-ANN is improved into a deconvolution layer to adapt to the information transmission mechanism of the spiking neural network, thereby better processing the video stream data captured by the UAV and improving the real-time performance and reliability of bird detection.
[0091] This embodiment improves the upsampling layer in the YOLOv5-ANN artificial neural network model by replacing it with a deconvolutional layer. Because upsampling layers lack weights, converting them into a spiking neural network structure is difficult, while deconvolutional layers, functionally similar to upsampling layers, allow for a smoother conversion. In practical applications of low-altitude bird detection using UAVs, this improvement ensures high efficiency and accuracy during upsampling operations, especially when processing high-resolution images captured by UAVs.
[0092] Step S54, Improvement of Batch Normalization: The parameters of the batch normalization layer in the YOLOv5-ANN artificial neural network model are incorporated into the weights of the convolutional layer immediately preceding the batch normalization layer. This simplifies the network structure while maintaining accuracy, helps maintain model stability, and enables efficient operation in resource-constrained environments. After the above improvements to the YOLOv5-ANN artificial neural network model, the Spiking-YOLOv5-SNN spiking neural network model is obtained, and its network structure is as follows: Figure 4 As shown.
[0093] Specifically, due to the pulsatile nature of neuronal activity, the traditional application of batch normalization (BN) layers is no longer applicable. However, BN layers have a positive effect on improving model training speed and accuracy, 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 BN layers can be retained in spiking neural networks without sacrificing network performance. In the task of detecting birds flying at low altitudes on UAVs, 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] Equations (9) and (10) are used to calculate the mean and variance of a batch of input data. Equation (9) standardizes the data, and Equation (10) is used to normalize the data.
[0099] In the formula, is the average of all data in a batch; m is the number of data in a batch; This represents the i-th data point in a batch of inputs that will soon enter the activation function. The variance of all data in a batch; This is standardized data; It is a constant; The data has been normalized. This is the scaling factor; For offset.
[0100] The formulas for folding the BN layer into the Conv layer using equations (9) and (10) are shown in equations (13)-(14):
[0101] (13)
[0102] (14)
[0103] In the formula, These are the weights after batch normalization layer folding. For the first The weight of the j-th synapse of neuron i in layer 1; For the first The scaling factor of layer neuron i. For the first The variance of layer neuron i; The offset is the result of batch normalization layer folding. For the first The average value of layer neuron i; For the first Batch-normalized offset of layer neuron i; For the first Layer neurons The offset.
[0104] In the task of detecting birds flying at low altitudes from drones, this invention ensures that the model retains the normalization effect acquired during training even after the network is converted to a Service Neural Network (SNN) by folding the parameters of the Batch Normalization (BN) layer into the weights of the convolutional layer, thereby improving the stability and accuracy of detection. This improvement is particularly important for handling rapidly changing visual data captured by drones, as it helps maintain high-precision bird detection in complex flight environments.
[0105] Step S6: Use the trained Spiking-YOLOv5-SNN neural network model to detect birds in flight on the UAV, which specifically includes the following:
[0106] The Spiking-YOLOv5-SNN neural network model was deployed on the AGX development board. After training, the mean average precision (mAP), intersection over union (IoU), precision, total parameters, floating point operations per second (FLOPs), multiply-accumulate operations (MACs), frames per second (FPS), and energy efficiency were used as evaluation metrics. 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 metrics
[0108]
[0109] As shown in Table 1, Spiking-YOLOv5-SNN exhibits a slight decrease in accuracy compared to YOLOv5-ANN, specifically a 0.69% reduction in mAP (YOLOv5-ANN: 82.88%, SNN: 82.19%) and a slight decrease in IoU of 0.0002 (YOLOv5-ANN: 0.9313, Spiking-YOLOv5-SNN: 0.9311). As can be seen, this slight decrease in accuracy did not negatively impact the model's predictions; the predicted locations of the target candidate boxes remained excellent. Furthermore, Table 1 clearly demonstrates the significant advantages of Spiking-YOLOv5-SNN in inference speed and energy efficiency. Spiking-YOLOv5-SNN achieved an FPS of 11.3, a significant improvement over YOLOv5-ANN's 9.3 FPS, indicating that Spiking-YOLOv5-SNN can achieve faster inference performance under the same hardware conditions. The SNN's energy efficiency was 1.277 FPS / unit of energy, far exceeding YOLOv5-ANN's 0.865 FPS / unit of energy, showcasing Spiking-YOLOv5-SNN's ability to process more data per unit of energy consumption, thus improving the model's overall energy efficiency. In terms of energy consumption, Spiking-YOLOv5-SNN consumes 8.85J, lower than YOLOv5-ANN's 10.75J, demonstrating its low-power characteristics in high-performance inference. Spiking-YOLOv5-SNN's response time is 0.0885 seconds, shorter than YOLOv5-ANN's 0.1075 seconds, indicating that Spiking-YOLOv5-SNN has a faster response speed when performing inference tasks, making it suitable for applications with higher real-time requirements.
[0110] In summary, although Spiking-YOLOv5-SNN sacrifices a little accuracy, its significant advantages in inference speed, energy efficiency, power consumption, and response time indicate that the Spiking-YOLOv5-SNN model has higher computational efficiency and energy-saving effect, and is especially suitable for deployment in resource-constrained or real-time-critical systems.
[0111] Although specific embodiments of the invention have been described in detail with reference to the accompanying drawings, this should not be construed as limiting the scope of protection of this patent. Various modifications and variations that can be made by a person skilled in the art without inventive effort within the scope described in the claims still fall within the scope of protection of this patent.
Claims
1. A method for detecting birds in flight from unmanned aerial vehicles (UAVs) based on ANN-to-SNN conversion, characterized in that, Includes the following steps: S1. Acquire image data of birds flying at low altitudes; S2. Preprocess the image data to obtain a bird target detection dataset; S3. Train the artificial neural network model YOLOv5-ANN based on the bird target detection dataset; S4. Identify the spiking neurons and establish the mapping relationship between the activation output of the artificial neural network model YOLOv5-ANN and the spiking frequency of the spiking neurons. S5. Based on the mapping relationship described in S4, convert the artificial neural network model YOLOv5-ANN into a spiking neural network model Spiking-YOLOv5-SNN; S6. Use the trained Spiking-YOLOv5-SNN neural network model to detect birds in flight on the UAV. In S4, an integral-fire model is used to simulate a spiking neuron. A subtraction reset mechanism is introduced into the integral-fire model so that when the spiking neuron fires, the voltage portion exceeding the firing threshold will be retained. The kinetic equation of the integral-discharge model that introduces the subtraction reset mechanism is as follows: ; ; In the formula, Let be the presynaptic membrane potential at time step t in the integral-discharge model. Let be the postsynaptic membrane potential at time step t in the integral-discharge model. In the integral-discharge model, the first... t- Postsynaptic membrane potential at one time step For the first Layer neurons and the first l Synaptic weights between layer neurons For the first l Layer neurons receive input from the layer above. For the first l The pulses fired by neurons in the layer For the first l The firing threshold of layer neurons; The neuronal impulse firing rule is expressed as: The mapping relationship in S4 is as follows: The pulse emission rate of the spiking neurons in the integral-firing model is equated to the activation value of the YOLOv5-ANN artificial neural network model. The kinetic equations are subjected to a time step of 1~ T Summing these values, we obtain the relationship between the pulse emission rates of neurons in two adjacent layers as follows: ; In the formula, For the first l The pulse emission rate of neurons in layer 1 represents the pulse emission rate of the first layer of neurons. l Mean postsynaptic potential of layer neurons; For the first l The pulse emission rate of neurons in layer -1 represents the pulse emission rate of the neurons in layer -1. l The average postsynaptic potential of neurons in layer -1; T This represents the total time step. This represents the initial postsynaptic membrane potential. The kinetic equations are subjected to a time step of 1~ T The summation includes: The dynamic equations are combined to express the following: ; The combined kinetic equations were subjected to a time step of 1~ T Summation: ; in, ; S5 includes the following steps: S51. Modify the activation function in the artificial neural network model YOLOv5-ANN to the ReLU activation function; S52. Modify all max pooling layers with a stride of 2 in the YOLOv5-ANN artificial neural network model to convolutional layers with the same stride, and remove the max pooling layers with a stride of 1. S53. Modify the upsampling layer in the YOLOv5-ANN artificial neural network model 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 convolutional layer immediately preceding the batch normalization layer to obtain the spiking neural network model Spiking-YOLOv5-SNN. In S2, the bird target detection dataset is divided into a training set, a validation set, and a test set in a ratio of 7:2:1, and the artificial neural network model YOLOv5-ANN is trained using the training set, the validation set, and the test set. The characteristic feature is that the batch normalization layer in S54 is expressed as follows: ; ; ; ; In the formula, This is the average of all data in a batch. m The number of data items in a batch; For a batch of inputs about to enter the activation function, the first... i One data point; The variance of all data in a batch; This is standardized data; It is a constant; The data has been normalized. This is the scaling factor; For offset; In S54, the parameters of the batch normalization layer in the YOLOv5-ANN artificial neural network model are incorporated into the weights of the convolutional layer immediately preceding the batch normalization layer. Specifically, this is expressed as follows: ; ; In the formula, These are the weights after batch normalization layer folding. For the first Layer neurons i The j Each synaptic weight; For the first Layer neurons i scaling factor, For the first Layer neurons i The variance; The offset is the result of batch normalization layer folding. For the first Layer neurons i The average value; For the first Layer neurons i Batch normalization offset; For the first Layer neurons The offset; For a spiking neuron, if its membrane potential exceeds the firing threshold, the neuron will fire a pulse. If the presynaptic neurons of the first layer emit pulses, then the first... The postsynaptic neurons in the layer receive weighted postsynaptic potentials. , which is the input value ; 。
Citation Information
Patent Citations
Helmet wearing detection method based on pulse neural network
CN116453164A
Unmanned aerial vehicle flying bird detection method, system, equipment and medium
CN117576724A
Rapid incremental learning technology based on pulse brain-like model
CN119398132A