Wild animal intelligent identification method, electronic fence and fence control method

CN122821593APending Publication Date: 2026-09-25BEIJING FORESTRY UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611046261.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]针对现有技术中的上述不足,本发明提供的野生动物智能识别方法、电子围栏及围栏控制方法解决了现有电子围栏不能区分野生动物与人员,致使出现误伤的问题

Benefits of technology

[0022]本发明的有益效果为:对人构成威胁的野生动物一般出没在高原地区,而高原地区气候多变,会对摄像头采集的画面清晰度产生影响,从而影响识别模型的判断结果。本方案首先对图像帧进行质量评分,再基于该质量评分进行目标检测阈值计算,这样设置之后,当天气晴朗、能见度良好时,识别模型可以以高置信度检测出野生动物,因此可以将置信度设置得较高,从而实现在确保准确检测出野生动物出没的前提下,降低误识别率,提升识别的可靠性。而当遇到如雨雪、大雾等天气的时候,能见度降低,模型识别到的野生动物置信度较低,因此需要降低判断是否出现野生动物的置信度阈值,从而在低能见度下,优先确保安全性,避免漏检的情况。即本方案的模型能够根据视野内环境的变化,调节选择合适的识别置信度阈值,从而具备环境适应性,使电子围栏的系统更加安全可靠。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122821593A_ABST
    Figure CN122821593A_ABST
Patent Text Reader

Abstract

The application discloses a kind of wild animal intelligent identification method, electronic fence and fence control method, wherein wild animal intelligent identification method, it includes steps S1, the real-time video of the area where electronic fence is located is acquired, and image frame is extracted using sliding window, then input wild animal identification model is identified, and the detection target and confidence of each image frame are obtained;S2, the quality of each image frame is scored using image quality evaluation algorithm respectively, and the target detection threshold of each image frame is calculated using the quality score obtained;S3, whether the confidence corresponding to each image frame is less than target detection threshold is judged, if yes, then consider that detection target is invalid, otherwise consider that detection target is effective, and enter step S4;S4, when detection target is effective, and there is greater than the detection target of set threshold proportion in all image frames is target wild animal, then output target wild animal is detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of security protection technology, specifically to a method for intelligent identification of wild animals, an electronic fence, and a fence control method. Background Technology

[0002] In recent years, with the continuous increase in ecological protection efforts, the significant improvement in public awareness of ecological protection, and the marked improvement in the regional ecological environment quality, the brown bear population in the Sanjiangyuan region has been effectively restored, specifically manifested in an expanded activity range, increased frequency of sightings, and a rise in population size. However, this ecological protection achievement has also exacerbated human-bear conflict to some extent. Incidents of brown bears entering homes and damaging property, disrupting the production and lives of herders, have occurred frequently, causing serious economic losses to local herders and posing potential risks to their personal safety. As these conflicts increase, herders' tolerance for offending wild animals has gradually decreased, thus negatively impacting their enthusiasm for ecological and biodiversity conservation.

[0003] To avoid human-bear conflict, electronic fences have been introduced into areas frequented by brown bears. However, the practical application of electronic fences in the Sanjiangyuan region still faces many limitations. Firstly, the region is sparsely populated with relatively weak infrastructure. Herders' households mainly rely on solar power, but solar power generation is limited and cannot sustain the continuous operation of electronic fences for extended periods. Ideally, the electronic fences should be activated when bears are present and deactivated when bears are not active, ensuring long-term operation through solar power. However, in actual operation, traditional electronic fences lack target recognition capabilities and cannot distinguish between wild animals and humans. Herders approaching the fences during daily life and work may also suffer electric shocks, posing a risk of accidental injury.

[0004] Therefore, it is necessary to develop a safer and more efficient intelligent electronic fence system that combines new sensing and intelligent recognition technologies to address issues such as insufficient energy supply and the risk of accidental injury. This is an urgent problem to be solved to improve bear control while taking into account both ecological protection and personal safety. Summary of the Invention

[0005] In view of the above-mentioned shortcomings in the prior art, the intelligent identification method for wild animals, electronic fence and fence control method provided by the present invention solve the problem that the existing electronic fences cannot distinguish between wild animals and people, resulting in accidental injury.

[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: Firstly, a method for intelligent identification of wild animals is provided, which includes the following steps: S1. Obtain real-time video of the area where the electronic fence is located, and extract image frames using a sliding window. Then, input the images into the wildlife recognition model for recognition to obtain the detection target and confidence level of each image frame. S2. The image quality assessment algorithm is used to score the quality of each image frame, and the target detection threshold of each image frame is calculated using the obtained quality scores. S3. Determine whether the confidence level of each image frame is less than the target detection threshold. If so, the target detection is considered invalid, and the confidence level of the next image frame is determined. Otherwise, the target detection is considered valid, and the process proceeds to step S4. S4. When the detected target is valid, and all image frames contain more than a set threshold proportion of detected targets that are wild animals, then output that the wild animal has been detected.

[0007] In one possible implementation, the expression used by the image quality assessment algorithm to score the quality of the acquired image is:

[0008] in, Image quality score; B is contour span; T is edge toughness value; L is texture activity; , and These are the baseline values ​​obtained through experimental calibration. For light health; The expression for calculating the target detection threshold of the current image frame using quality scoring is as follows:

[0009] in, The threshold value is the target detection threshold.

[0010] In one possible implementation, the expression for calculating the profile span B is:

[0011] Where M and N are the width and height of the image frame, respectively; For image frames in The grayscale value at that location; For image frames in coordinates The grayscale value at that location.

[0012] In one possible implementation, the expression for calculating the edge toughness value T is:

[0013] in, and Coordinates Gradient response at; Calculate gradient response and The expression is: , , in, and These are 3x3 Sobel convolution kernels.

[0014] In one possible implementation, the expression for calculating texture activity L is: , in, coordinates Response diagram at the location; For response diagram The average value; It has a 3x3 Laplace kernel; calculate The expression is:

[0015] in, The average grayscale value of the image pixels; To take the absolute value.

[0016] In one possible implementation, the real-time video is processed at a frame rate of 10fps, and a decision window of 40 frames is constructed. Within the decision window, if the percentage of frames in which the detected target is valid and all of them are the same wild animal exceeds 60%, then the detection of the wild animal is output.

[0017] In one possible implementation, the wildlife identification model is a network model formed by fusing hybrid aggregation network modules in the YOLO11 basic network architecture, and a full-scale feature aggregation network is added to the head part of the network model; The wildlife dataset used to train the network model consists of an integration of LoTE-Animal data and a featured wildlife dataset, which comprises multiple photos of herders, brown bears, and other wildlife from various angles.

[0018] In a second aspect, an electronic fence is provided, comprising a wire fence, an intelligent pulse generator, and a Jetson Nano controller with a built-in wildlife intelligent identification method according to any one of claims 1-6. A camera and a solar panel are mounted on the wire fence; the solar panel is connected to a battery pack via a solar controller; the intelligent pulse generator and the camera are connected to the battery pack via wires; the intelligent pulse generator is connected to the wire fence and a ground wire via a terminal clamp; the Jetson Nano controller is connected to the camera and a relay; and the relay is connected to the intelligent pulse generator.

[0019] Thirdly, a method for controlling an electronic fence is provided, which includes the following steps: A1. The camera captures real-time video of the area where the electronic fence is located and sends it to the Jetson Nano controller; A2. The Jetson Nano controller receives real-time video and executes a wildlife intelligent identification method to determine whether the target wildlife exists in the area where the electronic fence is located; A3. When the target wild animal is present, the Jetson Nano controller sends a high-level signal to the relay, which drives the relay to close and activates the intelligent pulse host to power the wire fence. A4. When there are no wild animals, the Jetson Nano controller determines whether there are X consecutive sliding windows in which there are no target wild animals. If so, proceed to step A5; otherwise, keep the wire fence powered on. A5. The Jetson Nano controller sends a low-level signal to the relay, which drives the relay to open, causing the intelligent pulse host to disconnect the circuit between the wire fence and the battery assembly, and then returns to step A1.

[0020] In one possible implementation, the expression for calculating the preset quantity is:

[0021] Where T is the safety buffer time; X is the number of consecutive sliding windows.

[0022] The beneficial effects of this invention are as follows: Wild animals that pose a threat to humans generally inhabit high-altitude areas, where the climate is changeable, affecting the clarity of images captured by cameras and thus impacting the judgment results of the recognition model. This solution first scores the image frames for quality, then calculates the target detection threshold based on this score. With this setting, when the weather is clear and visibility is good, the recognition model can detect wild animals with high confidence. Therefore, the confidence level can be set relatively high, thereby reducing the false recognition rate and improving the reliability of recognition while ensuring accurate detection of wild animals. However, in weather conditions such as rain, snow, or heavy fog, visibility decreases, and the confidence level of the model in recognizing wild animals is lower. Therefore, it is necessary to lower the confidence threshold for judging the presence of wild animals, prioritizing safety in low visibility conditions and avoiding missed detections. In other words, the model of this solution can adjust and select an appropriate recognition confidence threshold according to changes in the environment within the field of view, thus possessing environmental adaptability and making the electronic fence system safer and more reliable.

[0023] The proposed electronic fence, with its built-in intelligent wildlife identification method, enables it to adaptively adjust identification criteria based on environmental conditions and reliably switch intelligently between active and dormant states. It activates its protective function only when a target wild animal is detected, effectively reducing overall system energy consumption. Simultaneously, this mechanism, while ensuring effective protection, also reduces the safety risks associated with accidental human contact with the fence, demonstrating excellent energy efficiency and safety.

[0024] Due to significant differences in biological species and ecological environments across different regions, especially in plateau areas where distinct regional species characteristics exist, directly training wildlife identification models using general open-source datasets often results in insufficient adaptability when recognizing local organisms, thus affecting identification performance. To address this issue, this invention constructs a regionally specific dataset based on image data of typical wild animals and livestock from the Sanjiangyuan region, making it highly targeted. The identification model trained on this dataset can effectively identify common plateau species such as Tibetan brown bears and wild yaks, significantly improving target recognition accuracy and further enhancing the reliability and security of intelligent fencing systems in practical applications.

[0025] This solution integrates the Hybrid Aggregation Network Module (MANet) proposed by Hyper-Yolo into the YOLO11 basic network architecture and adds a full-scale feature aggregation network. Through comparative experiments with the YOLO11 model on the dataset of this solution, the improved model has higher recognition and localization accuracy. Attached Figure Description

[0026] Figure 1 This is a flowchart of a method for intelligent identification of wild animals.

[0027] Figure 2 This is a block diagram illustrating the principle of a wildlife identification model.

[0028] Figure 3 This is a simplified structural diagram of an electronic fence.

[0029] Figure 4 This is a flowchart of the control method for an electronic fence.

[0030] The components include: 1. Intelligent pulse generator; 2. Battery; 3. Camera; 4. Jetson Nano controller; 5. Wire fence; 6. Relay; 7. Wiring clamp. Detailed Implementation

[0031] 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.

[0032] refer to Figure 1 , Figure 1 A flowchart of a wildlife intelligent identification method is shown; as follows: Figure 1 As shown, the method S includes steps S1 to S4.

[0033] In step S1, real-time video of the area where the electronic fence is located is acquired, and image frames are extracted using a sliding window. These frames are then input into a wildlife recognition model for identification, resulting in the detection target and confidence level for each image frame.

[0034] In implementation, this scheme preferably uses a real-time video processing frame rate of 10fps and constructs a decision window with a length of 40 frames. Within the decision window, if the percentage of frames in which the detected target is valid and all of them are the same wild animal exceeds 60%, then the target wild animal is detected.

[0035] like Figure 2 As shown, the wildlife recognition model is a network model formed by integrating a hybrid aggregation network module in the YOLO11 basic network architecture. The full-scale feature aggregation network is added to the head part of the network model. The full-scale feature aggregation network directly aggregates the features of each scale in the backbone network to the MANet layer for global semantic extraction. Then, these features are distributed to different detection branches, giving the model a strong ability to perceive targets across scales and understand complex contexts.

[0036] exist Figure 2In this diagram, Conv is a convolutional layer, C3k2 is a double convolutional cross-layer local bottleneck layer, MANet is a hybrid aggregation layer, SPPF is a fast spatial pyramid pooling layer, C2PSA is a self-attention enhanced feature fusion layer, nn.AvgPool2d is an average pooling layer, nn.Upsample is an upsampling layer, Concat is a feature concatenation layer, and Detect is a detection head.

[0037] Layer number 0 represents [-1, 1, Conv, [64, 3, 2]], where -1 bias receives the output of the previous layer (i.e., the original input image); 1 indicates that the basic layer is repeated once; it is a convolutional layer; 64 indicates the number of output channels; 3 indicates the kernel size is 3×3; and 2 indicates that the stride is 2 (which serves to downsample by 1 / 2).

[0038] Layer number 1 represents [-1, 1, Conv, [128, 3, 2]], where -1 indicates receiving the output of the previous layer; 1 indicates repeating once; it is a convolutional layer; 128 indicates the number of output channels; 3 indicates the convolutional kernel size is 3×3; and 2 indicates a stride of 2 (downsampling to 1 / 4).

[0039] Layer number 2 represents [-1, 2, C3k2, [256, False, 0.25]], where -1 indicates receiving the output of the previous layer; 2 indicates that the basic layer is repeated twice; it is a bottleneck layer across stages; 256 indicates the number of output channels; False indicates that the shortcut connection is not used; and 0.25 indicates the hidden layer channel expansion ratio (e×pansion ratio).

[0040] Layer number 3 represents [-1, 1, Conv, [256, 3, 2]], where -1 indicates receiving the output of the previous layer; 1 indicates repeating once; it is a convolutional layer; 256 indicates the number of output channels; 3 indicates the convolutional kernel size is 3×3; and 2 indicates the stride is 2 (downsampled to 1 / 8).

[0041] Layer number 4 represents [-1, 3, MANet, [256, True, 2, 3]], where -1 indicates receiving the output of the previous layer; 3 indicates that the basic layer is repeated 3 times; it is a hybrid aggregation layer; 256 indicates the number of output channels; True indicates that the shortcut connection is enabled; 2 indicates the channel dilation factor; and 3 indicates that the convolution kernel size is 3×3.

[0042] Layer number 5 represents [-1, 1, Conv, [512, 3, 2]], where -1 indicates receiving the output of the previous layer; 1 indicates repeating once; it is a convolutional layer; 512 indicates the number of output channels; 3 indicates a 3×3 convolutional kernel; and 2 indicates a stride of 2 (downsampling to 1 / 16).

[0043] Layer number 6 represents [-1, 3, MANet, [512, True, 2, 3]], where -1 indicates receiving the output of the previous layer; 3 indicates that the basic layer is repeated 3 times; it is a hybrid aggregation layer; 512 indicates the number of output channels; True indicates that residual connections are enabled; 2 indicates the channel dilation factor; and 3 indicates that the convolution kernel size is 3×3.

[0044] Layer number 7 represents [-1, 1, Conv, [1024, 3, 2]], where -1 indicates receiving the output of the previous layer; 1 indicates repeating once; it is a convolutional layer; 1024 indicates the number of output channels; 3 indicates a 3×3 convolutional kernel; and 2 indicates a stride of 2 (downsampling to 1 / 32).

[0045] Layer number 8 represents [-1, 2, C3k2, [1024, False]], where -1 indicates receiving the output of the previous layer; 2 indicates that the basic layer is repeated twice; it is a bottleneck layer across stages; 1024 indicates the number of output channels; and False indicates that residual connections are not used.

[0046] Layer number 9 represents [-1, 1, SPPF, [1024, 5]], where -1 indicates receiving the output of the previous layer; 1 indicates repeating once; it is a spatial pyramid pooling layer; 1024 indicates the number of output channels; and 5 indicates that the kernel size of the max pooling (Ma×Pool) is 5.

[0047] Layer number 10 represents [-1, 2, C2PSA,

[1024] ], where -1 indicates receiving the output of the previous layer; 2 indicates that the basic layer is repeated twice; it is a cross-stage spatial attention layer; and 1024 indicates the number of output channels.

[0048] Layer number 11 represents [0, 1, nn.AvgPool2d, [8, 8, 0]], where 0 indicates that the feature map of layer 0 is directly extracted as input; 1 indicates that it is repeated once; it is an average pooling layer; 8 indicates that the pooling kernel size is 8×8; 8 indicates that the stride is 8; and 0 indicates that the padding is 0.

[0049] Layer number 12 represents [2, 1, nn.AvgPool2d, [4, 4, 0]], where 2 indicates that the feature map of the second layer is extracted; 1 indicates that it is repeated once; it is an average pooling layer; 4 indicates that the pooling kernel is 4×4; 4 indicates that the stride is 4; and 0 indicates that it is padded with 0.

[0050] Layer number 13 represents [4, 1, nn.AvgPool2d, [2, 2, 0]], where 4 indicates that the feature map of the 4th layer is extracted; 1 indicates that it is repeated once; it is an average pooling layer; 2 indicates that the pooling kernel is 2×2; 2 indicates that the stride is 2; and 0 indicates that it is padded with 0.

[0051] Layer number 14 represents [10, 1, nn.Upsample, [None, 2, 'nearest']], where 10 indicates that the feature map of the 10th layer is extracted; 1 indicates that it is repeated once; it is an upsampling layer; None indicates that the target output size is adaptive; 2 indicates that the magnification factor is 2; and 'nearest' indicates that the nearest neighbor interpolation algorithm is used.

[0052] Layer number 15 represents [[11, 12, 13, 6, 14], 1, Concat, [1]], where [11, 12, 13, 6, 14] means that feature maps from these 5 specified layers are received simultaneously; 1 means repeat once; feature concatenation layer; 1 means concatenation is performed on the channel dimension (dimension = 1).

[0053] Layer number 16 represents [-1, 1, Conv, [512, 1, 1]], where -1 indicates receiving the output of the previous layer (15 layers); 1 indicates repeating once; it is a convolutional layer; 512 indicates that the number of output channels is compressed to 512; 1 indicates that the convolutional kernel is 1×1; and 1 indicates that the stride is 1.

[0054] Layer number 17 represents [-1, 3, MANet, [512, True, 2, 3]], where -1 indicates receiving the output of the previous layer; 3 indicates that the basic layer is repeated 3 times; it is a hybrid aggregation layer; 512 indicates the number of output channels; True indicates that residuals are enabled; 2 indicates the channel dilation factor parameter p; and 3 indicates the convolution kernel size is 3×3.

[0055] Layer number 18 represents [-1, 1, nn.AvgPool2d, [2, 2, 0]], where -1 indicates receiving the output of the previous layer; 1 indicates repeating once; it is an average pooling layer; 2 indicates a 2×2 kernel; 2 indicates a stride of 2; and 0 indicates padding with 0.

[0056] Layer number 19 represents [[-1, 10], 1, Concat, [1]], where [-1, 10] means receiving the output of the previous layer (18 layers) and the 10th layer; 1 means repeating once; feature concatenation layer; 1 means concatenating in the channel dimension.

[0057] Layer number 20 represents [-1, 1, Conv, [1024, 1, 1]], where -1 indicates receiving the output of the previous layer; 1 indicates repeating once; it is a convolutional layer; 1024 indicates the number of output channels; 1 indicates a 1×1 convolutional kernel; and 1 indicates a stride of 1.

[0058] Layer number 21 represents [[17, 6], 1, Concat, [1]], where [17, 6] indicates receiving the outputs of layer 17 and layer 6; 1 indicates repeating once; feature concatenation layer; 1 indicates concatenation in the channel dimension.

[0059] Layer number 22 represents [-1, 3, MANet, [512, False, 2, 3]], where -1 indicates receiving the output of the previous layer; 3 indicates repeating 3 times; it is a hybrid aggregation layer; 512 indicates the number of output channels; False indicates that residual connections are not enabled; 2 indicates the channel dilation factor; and 3 indicates the convolution kernel size is 3×3.

[0060] Layer number 23 represents [17, 1, nn.Upsample, [None, 2, 'nearest']], where 17 indicates that the feature map of the 17th layer is extracted; 1 indicates that it is repeated once; it is an upsampling layer; None indicates that the size is adaptive; 2 indicates that it is magnified by 2 times; and 'nearest' indicates that it is the nearest neighbor interpolation.

[0061] Layer number 24 represents [[-1, 4], 1, Concat, [1]], where [-1, 4] means receiving the output of the previous layer (layer 23) and the 4th layer; 1 means repeating once; feature concatenation layer; 1 means concatenating the channel dimensions.

[0062] The wildlife dataset used to train the network model consists of an integration of LoTE-Animal data and a featured wildlife dataset, which comprises multiple photos of herders, brown bears, and other wildlife from various angles.

[0063] This scheme compares the improved YOLO model with several existing traditional YOLO series benchmark models. The comparison results are shown in Table 1. In the table, P, R, map50 and map50-95 represent the mean precision, recall and average precision under different crossover ratio thresholds, respectively.

[0064] As shown in Table 1, the improved model proposed in this solution performs excellently in all evaluations. In particular, it achieves a significant improvement in the more stringent comprehensive evaluation index mAP50-95. This improvement conclusively demonstrates the superior performance of this model in high-precision bounding box positioning and regression. Based on these technical advantages, this invention can effectively overcome interference from complex outdoor environments, achieving precise targeting of key targets such as brown bears, thereby ensuring that the intelligent fence system has a faster response speed and higher operational reliability.

[0065] Table 1. Model Comparison Results

[0066] In step S2, an image quality assessment algorithm is used to score the quality of each image frame, and the target detection threshold for each image frame is calculated using the obtained quality scores.

[0067] In one embodiment of the present invention, the expression used by the image quality assessment algorithm to score the quality of the acquired image is:

[0068] in, The image quality score is given by: B is the outline span, which measures the sharpness of large-scale outlines and reflects the intensity of grayscale changes in the image; T is the edge toughness value, which measures the contrast intensity of lines; and L is the texture activity, which measures the richness of small details (such as hair) in the image. The variance of the Laplacian response map is used as the score for texture activity. , and These are the baseline values ​​of B, T, and L obtained through experimental calibration, respectively. For light health; Profile span reference value The calculation method is as follows: Suppose the system collects N (usually N≥100) standard outdoor background images during the prime time of clear weather and excellent visibility, forming an ideal sample set. The original contour span B of each image in the sample set is calculated and sorted in ascending order:

[0069] If the cutoff ratio is set to p = 10%, then the number of samples participating in the baseline calculation is K = N * p. The final... The calculation formula is the arithmetic mean of the top K highest resolution performances:

[0070] in, The first of the K highest resolution background images One outline span.

[0071] Similarly, the baseline value for edge strength is... The calculation method is as follows:

[0072] in, The first of the K highest resolution background images Each edge strength value.

[0073] Similarly, the baseline value for texture activity The calculation method is as follows:

[0074] in, The first of the K highest resolution background images Texture activity.

[0075] The expression for calculating the target detection threshold of the current image frame using quality scoring is as follows:

[0076] in, The threshold value is the target detection threshold.

[0077] In implementation, the preferred expression for calculating the profile span B in this scheme is:

[0078] Where M and N are the width and height of the image frame, respectively; For image frames in The grayscale value at that location; For image frames in coordinates The grayscale value at that location; The expression for calculating the edge strength value T is:

[0079] in, and Coordinates The gradient response at that point.

[0080] The expression for calculating texture activity L is: , in, coordinates Response diagram at the location; For response diagram The average value; The Laplace kernel is 3x3, and its expression is: .

[0081] calculate The expression is:

[0082] in, The average grayscale value of the image pixels; To take the absolute value.

[0083] Calculate gradient response and The expression is: , , in, and These are 3x3 Sobel convolution kernels.

[0084] In step S3, it is determined whether the confidence level corresponding to each image frame is less than the target detection threshold. If so, the target detection is considered invalid, and the confidence level of the next image frame is judged. Otherwise, the target detection is considered valid, and the process proceeds to step S4.

[0085] In this scheme, real-time video is collected, and image frames are continuously entering. Therefore, when the target is deemed invalid, the algorithm will not terminate and will continue to judge the next image frame. When the target wild animal is detected in the subsequent step S4, the algorithm will not terminate. It will continue to judge the confidence of the incoming image frames and continue to detect the target wild animal.

[0086] In step S4, when the detected target is valid, and all image frames contain more than a set threshold proportion of detected targets that are wild animals, the output "Detected wild animal" is generated. The preferred wild animals for this scheme are brown bears and wild yaks.

[0087] like Figure 3 As shown, the electronic fence provided by this solution includes a wire fence 5, an intelligent pulse generator 1, and a Jetson Nano controller 4 with a built-in intelligent wildlife recognition method. A camera 3 and a solar panel are installed on the wire fence 5. The solar panel is connected to a battery bank 2 via the solar controller. The intelligent pulse generator 1 and the camera 3 are connected to the battery bank 2 via wires. The intelligent pulse generator 1 is connected to the wire fence 5 and the ground wire via a connector 7. The Jetson Nano controller 4 is connected to the camera 3 and a relay 6. The relay 6 is connected to the intelligent pulse generator 1.

[0088] After the electronic fence is powered on, most of its components are in a normal dormant state, while camera 3 and Jetson nano controller 4 remain continuously operational. At this time, Jetson nano controller 4 outputs a low-level control signal to relay 6, causing relay 6 to be in a normally open / disconnected state, cutting off the power supply circuit between battery bank 2 and intelligent pulse host 1, and the wire fence 5 is not energized.

[0089] During the operation of the electronic fence, camera 3 captures video streams in real time and transmits them to Jetson nano controller 4. Jetson nano controller 4 inputs the video frames into a preset wildlife recognition model for inference. If the presence of the target wildlife is detected, Jetson nano controller 4 will send a high-level signal to drive relay 6 to close, activating the intelligent pulse generator 1 to power the wire fence 5. If the target wildlife is detected to have left, a low-level signal will be output to cut off the power supply to the fence, thereby avoiding unnecessary power consumption and harm to the electronic fence system.

[0090] like Figure 4 As shown, this solution also provides a control method for an electronic fence, which includes the following steps: A1. Camera 3 collects real-time video of the area where the electronic fence is located and sends it to Jetson Nano controller 4; A2, Jetson Nano Controller 4 receives real-time video and executes a wildlife intelligent identification method to determine whether the target wildlife exists in the area where the electronic fence is located; A3. When the target wild animal is present, the Jetson Nano controller 4 sends a high-level signal to the relay 6, which drives the relay 6 to close and activates the intelligent pulse host 1 to power the wire fence 5. A4. When there are no wild animals, the Jetson Nano controller determines whether there are X consecutive sliding windows in which there are no target wild animals. If so, proceed to step A5; otherwise, keep the wire fence 5 powered on. In implementation, the preferred expression for calculating the preset quantity in this scheme is:

[0091] Where T is the safety buffer time; X is the number of consecutive sliding windows.

[0092] A5. The Jetson Nano controller 4 sends a low-level signal to the relay 6, which drives the relay 6 to open, causing the intelligent pulse host 1 to disconnect the circuit between the wire fence 5 and the battery assembly, and then returns to step A1.

[0093] When controlling the electronic fence, a preset number of image frames are continuously used for judgment, which not only ensures the sufficiency of judgment samples to filter out transient false detections, but also realizes high-frequency dynamic detection response.

[0094] To ensure the target is completely removed from the protected area and to prevent premature power outages caused by short-term obstruction, the electronic fence system sets a safety buffer time of 5 minutes. After the safety buffer time is set to 5 minutes, X is approximately 87; that is, the system determines that the environment has returned to an absolutely safe state, and then disconnects relay 6, causing the wire fence 5 of the electronic fence to close safely.

[0095] In summary, this solution offers better environmental adaptability and execution reliability, enabling adaptive identification and reliable judgment of plateau creatures such as brown bears and yaks. By introducing a quality-based target detection threshold into the intelligent wildlife identification method, this solution improves the accuracy of wildlife identification under special weather conditions on the plateau, making the electronic fence safer, more reliable, and more stable during operation, thus possessing significant practical value.

Claims

1. A method for intelligent identification of wild animals, characterized in that, Including the following steps: S1. Obtain real-time video of the area where the electronic fence is located, and extract image frames using a sliding window. Then, input the images into the wildlife recognition model for recognition to obtain the detection target and confidence level of each image frame. S2. The image quality assessment algorithm is used to score the quality of each image frame, and the target detection threshold of each image frame is calculated using the obtained quality scores. S3. Determine whether the confidence level of each image frame is less than the target detection threshold. If so, the target detection is considered invalid, and the confidence level of the next image frame is determined. Otherwise, the target detection is considered valid, and the process proceeds to step S4. S4. When the detected target is valid, and all image frames contain more than a set threshold proportion of detected targets that are wild animals, then output that the wild animal has been detected.

2. The intelligent identification method for wild animals according to claim 1, characterized in that, The expression used to score the quality of acquired images using an image quality assessment algorithm is as follows: in, Image quality score; B is contour span; T is edge toughness value; L is texture activity; , and These are the baseline values ​​of B, T, and L obtained through experimental calibration, respectively. For light-related health; The expression for calculating the target detection threshold of the current image frame using quality scoring is as follows: in, The threshold value is the target detection threshold.

3. The intelligent identification method for wild animals according to claim 2, characterized in that, The expression for calculating the profile span B is: Where M and N are the width and height of the image frame, respectively; For image frames in The grayscale value at that location; For image frames in coordinates The grayscale value at that location.

4. The intelligent identification method for wild animals according to claim 2, characterized in that, The expression for calculating the edge strength value T is: in, and Coordinates Gradient response at; Calculate gradient response and The expression is: , , in, and These are 3x3 Sobel convolution kernels.

5. The intelligent identification method for wild animals according to claim 2, characterized in that, The expression for calculating texture activity L is: , in, coordinates Response diagram at the location; For response diagram The average value; It has a 3x3 Laplace kernel; calculate The expression is: in, The average grayscale value of the image pixels; To take the absolute value.

6. The intelligent identification method for wild animals according to claim 1, characterized in that, The real-time video is processed at a frame rate of 10fps, and a decision window of 40 frames is constructed. Within the decision window, if the percentage of frames in which the detected target is valid and all of them are the same wild animal exceeds 60%, then the detection of the wild animal is output.

7. The intelligent identification method for wild animals according to claim 1, characterized in that, The wildlife identification model is a network model formed by integrating a hybrid aggregation network module into the YOLO11 basic network architecture, and a full-scale feature aggregation network is added to the head part of the network model. The wildlife dataset used to train the network model consists of an integration of LoTE-Animal data and a featured wildlife dataset, which comprises multiple photos of herders, brown bears, and other wildlife from various angles.

8. An electronic fence, characterized in that, The device includes a wire fence, an intelligent pulse generator, and a Jetson Nano controller with a built-in wildlife intelligent identification method according to any one of claims 1-6. The wire fence is equipped with a camera and a solar panel; the solar panel is connected to a battery pack via a solar controller; the intelligent pulse generator and the camera are connected to the battery pack via wires; the intelligent pulse generator is connected to the wire fence and a ground wire via a terminal clamp; the Jetson Nano controller is connected to the camera and a relay; and the relay is connected to the intelligent pulse generator.

9. A control method for an electronic fence as described in claim 8, characterized in that, Including the following steps: A1. The camera captures real-time video of the area where the electronic fence is located and sends it to the Jetson Nano controller; A2. The Jetson Nano controller receives real-time video and executes the wildlife intelligent identification method according to any one of claims 1-7 to determine whether the target wildlife exists in the area where the electronic fence is located; A3. When the target wild animal is present, the Jetson Nano controller sends a high-level signal to the relay, which drives the relay to close and activates the intelligent pulse host to power the wire fence. A4. When there are no wild animals, the Jetson Nano controller determines whether there are X consecutive sliding windows in which there are no target wild animals. If so, proceed to step A5; otherwise, keep the wire fence powered on. A5. The Jetson Nano controller sends a low-level signal to the relay, which drives the relay to open, causing the intelligent pulse host to disconnect the circuit between the wire fence and the battery assembly, and then returns to step A1.

10. The control method for an electronic fence according to claim 9, characterized in that, The expression for calculating the preset quantity is: Where T is the safety buffer time; X is the number of consecutive sliding windows.