Beast intrusion detection method based on machine vision and artificial intelligence

Through a bimodal camera and photosensitive sensor combined with YOLOv8 and DeepSORT algorithm, the beast detection system in the existing technology is solved with the problems of low detection accuracy and slow response speed, and high-precision beast recognition and real-time trajectory prediction in complex environments, providing multi-level early warning, adapting to different environmental conditions, and supporting remote monitoring and expansion.

CN120259961APending Publication Date: 2025-07-04NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510311166.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing beast detection technology has low detection accuracy, slow response speed, high false alarm rate, and cannot effectively identify beasts and predict their activity trajectory in complex environments, especially under insufficient light and other factors.

Method used

The dual-mode camera is used to synchronize visible light and infrared images, combine the photosensitive sensor to sense light changes, perform feature-level fusion and target detection through the YOLOv8 backbone network, target tracking is carried out in combination with the DeepSORT algorithm, trajectory prediction is used using LSTM, and early warning level is dynamically adjusted according to the light intensity.

Benefits of technology

It realizes high-precision identification of beast targets in low-light and complex environments, monitors and predicts their activity trajectories in real time, provides multi-level early warning, improves the accuracy and timeliness of response speed and early warning, adapts to different environmental conditions, and supports remote monitoring and expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259961A_ABST
    Figure CN120259961A_ABST
Patent Text Reader

Abstract

The invention discloses a beast intrusion detection method based on machine vision and artificial intelligence. The method comprises the following steps: (1) deploying a bimodal camera and a photosensitive sensor in a monitoring area; (2) preprocessing the collected visible light image and infrared image, and performing feature level fusion by combining the illumination intensity value of the photosensitive sensor; (3) inputting the fused features into a multi-mode beast detection model, extracting effective information and similarity features based on a YOLOv8 backbone network, carrying out beast target detection through a detection head, and outputting a detection result; (4) inputting a detection result into a trajectory analysis and prediction model, and performing target tracking in combination with a DeepSORT algorithm; according to the method, the occurrence of beast can be identified, and the movement track of the beast can be accurately predicted, so that the functions of real-time monitoring, early warning, timely response, accurate tracking and the like are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for detecting wild animal intrusion based on machine vision and artificial intelligence. Background Art

[0002] In recent years, with the rapid development of technologies such as artificial intelligence and deep learning, intelligent monitoring systems have been widely used in the fields of smart security and smart cities. At the same time, with the strict implementation of wildlife protection laws and regulations and the gradual improvement of the ecological environment, the size of the wild animal population has expanded rapidly, and tigers, leopards, wild boars and other beasts have continuously entered human production and living areas, causing great crop damage and property losses, and even causing serious injuries. Therefore, in order to avoid unnecessary losses and disasters, how to use technical means to timely and effectively identify beasts entering human activity areas and issue early warnings, and at the same time track the whereabouts and trajectories of beasts in a timely manner, has become a social problem that needs to be solved urgently.

[0003] Most of the existing wild animal detection technologies are based on traditional sensors (such as infrared detectors, radars, etc.) or use only a single-mode image recognition technology. However, these technologies usually have problems such as low detection accuracy, slow response speed, and high false alarm rate. Especially in complex environments, traditional methods cannot take into account factors such as environmental changes and insufficient light. In addition, most of the existing systems are based on static monitoring of fixed areas or single modes. The monitoring range cannot cover a wide area, and there are limitations in predicting target behavior and judging activity trajectories. Summary of the invention

[0004] Purpose of the invention: The purpose of the present invention is to provide a method for detecting wild animal intrusion based on machine vision and artificial intelligence, combining visible light and infrared images to timely identify the appearance of wild animals and accurately predict their activity trajectories, thereby realizing functions such as real-time monitoring, early warning, timely response and accurate tracking.

[0005] Technical solution: The method for detecting wild animal intrusion based on machine vision and artificial intelligence described in the present invention comprises the following steps:

[0006] (1) deploying a dual-mode camera and a photosensitive sensor in the monitoring area; the dual-mode camera is used to synchronously collect visible light images and infrared images, and the photosensitive sensor is used to sense light changes in real time;

[0007] (2) Preprocess the collected visible light images and infrared images, and perform feature-level fusion based on the light intensity values ​​of the photosensor;

[0008] (3) Input the fused features into the multi-modal wild animal detection model, extract effective information and similarity features based on the YOLOv8 backbone network, and perform wild animal target detection through the detection head to output the detection results;

[0009] (4) Input the detection results into the trajectory analysis and prediction model, perform target tracking in combination with the DeepSORT algorithm, and use the long short-term memory network LSTM to perform temporal modeling on the historical trajectory of the target to predict the future trajectory of the target;

[0010] (5) According to the detection results and predicted trajectories, use the dynamic map drawing module to draw the current location, historical trajectory, and predicted trajectory of the wild animal on the map in real time;

[0011] (6) According to the category, location, and predicted trajectory of the wild animal, judge the warning level through the wild animal warning mechanism and response module, and take corresponding warning response measures.

[0012] Further, in step (3), the multi-modal wild animal detection model is specifically as follows: respectively perform feature extraction on the visible light image and the infrared image through the YOLOv8 backbone network to obtain their feature representations; dynamically adjust the weights of the visible light image and infrared image features according to the light intensity value of the photosensitive sensor. When the light intensity is low, increase the weight of the infrared image. When the light intensity is high, increase the weight of the visible light image; fuse the adjusted visible light image and infrared image features to form the fused features; input the fused features into the YOLOv8 detection head to perform wild animal target detection, and remove redundant detection frames through non-maximum suppression to generate the final detection results; the detection results include the wild animal category, target bounding box position, and confidence level.

[0013] Further, the multi-modal wild animal detection model also includes: a multi-modal loss function, which is optimized by combining classification loss, localization loss, confidence loss, modality difference loss, photosensitive sensor-guided weighted loss, and modality adaptive loss. The formula is as follows:

[0014] L total =L cla +L reg +L conf +α·L md +β·L w +γ·L ma

[0015] Among them, L cla represents the classification loss, L reg represents the localization loss, L conf represents the confidence loss, L md represents the modality difference loss, L wDenote the weighted loss guided by the photosensitive sensor as \(L\). ma Denote the modal adaptive loss. \(\alpha\), \(\beta\), and \(\gamma\) are hyperparameters used to control the weights of each loss term.

[0016] The modal difference loss uses cosine similarity to measure the difference between two modal features, and the calculation formula is as follows:

[0017]

[0018] where \(F\) visible and \(F\) infrafed are the feature representations of visible light and infrared images, and \(\|\cdot\|\) represents calculating the norm of the matrix.

[0019] The weighted loss guided by the photosensitive sensor, the calculation formula is as follows:

[0020] \(L\) w =\(\lambda_1\cdot|W\) visible -W\) infrared |\) 2

[0021] where \(W\) visible and \(W\) infrared are the weights of two modalities dynamically adjusted by the values of the photosensitive sensor, and \(\lambda_1\) is the hyperparameter of the weighted loss.

[0022] The calculation formula of the modal adaptive loss is as follows:

[0023]

[0024] where and are the visible light and infrared modal weights adjusted according to the contribution of each image region, \(L\) visible and \(L\) infrared are the visible light and infrared modal loss values, and \(N\) represents the number of regions.

[0025] Furthermore, step (4) includes the following steps:

[0026] (41) Use DeepSORT to track the target and obtain the position information of the target in consecutive frames;

[0027] (42) For the historical trajectory of each target, when the trajectory length is greater than or equal to the preset threshold, convert the historical trajectory into the input format of the LSTM model and input it into the LSTM model for training;

[0028] (43) Use the trained LSTM model to predict the position of the target at future time steps and form the trajectory analysis prediction result.

[0029] Further, in step (5), the dynamic map drawing module includes the cooperation of the front end and the back end. The front end uses the Leaflet.js lightweight open-source map library for map rendering, and dynamically updates the current location, historical trajectory, and predicted trajectory of the target according to the data transmitted by the back end. The back end is responsible for obtaining data from sensors, the multi-modal wild animal detection model, and the trajectory analysis and prediction model, and transmitting the data to the front end through the API for real-time update.

[0030] Further, in step (6), the wild animal warning mechanism and response module classifies wild animals into three categories: high risk, medium risk, and low risk according to their categories, and sets multiple warning levels according to the detected wild animal locations and predicted trajectories, including level one warning, level two warning, and level three warning, and takes corresponding warning response measures for different warning levels.

[0031] Further, in step (6), the wild animal warning mechanism and response module also includes a mechanism for dynamically adjusting the warning level according to the light intensity value of the photosensitive sensor. When the light intensity is weak, the sensitivity of the warning level for medium and high risk wild animals is increased; when the light intensity is strong, the warning level for low risk wild animals is appropriately lowered.

[0032] A wild animal intrusion detection system based on machine vision and artificial intelligence according to the present invention includes:

[0033] A dual-modal camera and photosensitive sensor module, where the dual-modal camera is used to synchronously collect visible light images and infrared images in the monitoring area, and the photosensitive sensor is used to sense light changes in real time;

[0034] A data preprocessing module for preprocessing the collected visible light images and infrared images;

[0035] A multi-modal wild animal detection module for receiving the features of the preprocessed visible light images and infrared images, performing feature-level fusion in combination with the light intensity value of the photosensitive sensor, and performing wild animal target detection through a detection head based on the YOLOv8 backbone network, and outputting the detection result;

[0036] A trajectory analysis and prediction module for receiving the detection result, performing target tracking in combination with the DeepSORT algorithm, and using the long short-term memory network LSTM to perform temporal modeling on the historical trajectory of the target to predict the future trajectory of the target;

[0037] A dynamic map drawing module for real-time drawing of the current location, historical trajectory, and predicted trajectory of wild animals on the map according to the detection result and predicted trajectory;

[0038] A wild animal warning mechanism and response module for judging the warning level according to the category, location, and predicted trajectory of wild animals, and taking corresponding warning response measures.

[0039] An electronic device according to the present invention includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements a method for detecting wild animal intrusion based on machine vision and artificial intelligence according to any one of the preceding claims.

[0040] A storage medium according to the present invention stores a computer program. When the computer program is executed by a processor, it implements a method for detecting wild animal intrusion based on machine vision and artificial intelligence according to any one of the preceding claims.

[0041] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages: High-precision detection: Through multi-modal image data fusion and advanced object detection algorithms, it can accurately identify and classify wild animal targets under challenging conditions such as low light and complex environments, ensuring the stability and reliability of the system in various environments. Real-time and intelligence: Combining an efficient activity trajectory prediction model and real-time target tracking technology, it can accurately capture the dynamic behavior of wild animals and predict their future behavior, providing early warning information in advance and greatly improving the response speed. Dynamic warning mechanism: According to factors such as the movement pattern of wild animals, threat level, and the relative distance between the target and humans or livestock, it can intelligently adjust the warning level to achieve a multi-level and customized alarm system, reducing false alarms and ensuring the accuracy and timeliness of warnings. Strong adaptability: This system can adapt to different environmental conditions such as weather, light, and seasonal changes, ensuring stable operation throughout the day. Remote monitoring and scalability: The system supports remote operation and monitoring and can be expanded as needed to increase the number of cameras or coverage area, with high flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a schematic diagram of the system flow of the present invention;

[0043] Figure 2 is a schematic diagram of the multi-modal wild animal detection model of the present invention;

[0044] Figure 3 is an effect diagram of the dynamic map drawing of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0045] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0046] As Figure 1 shown, an embodiment of the present invention provides a method for detecting wild animal intrusion based on machine vision and artificial intelligence, including the following steps:

[0047] S1 Multi-modal wild animal detection model

[0048] To cope with the complex field environment, visible light and infrared dual - mode cameras are used for wild animal detection to improve the accuracy and adaptability of detection. Therefore, a multi - modal wild animal detection model is designed.

[0049] Since visible - light images have rich color and texture details but are easily affected by light, while infrared images are not affected by adverse conditions such as light, fog, and heavy snow, and can highlight humans and animals but do not have color information, the multi - modal wild animal detection model uses the data of these two modalities for information complementation. It adopts the mid - term fusion based on the YOLOv8 model, that is, the feature - level fusion strategy. First, the effective information and similarity features of infrared and visible light are extracted through the network, and then, under the dynamic weighting of the photosensitive sensor, through the designed fusion network, the modal information of the two is fused, and finally, it serves the task of object detection.

[0050] As Figure 2 shown, the multi - modal wild animal detection model first extracts features from the input visible - light image and infrared image respectively through the backbone network of YOLOv8. Then, the features of the visible - light and infrared images are input into a feature fusion module for feature - level fusion. The weights of the two - modal features are dynamically adjusted according to the value of the photosensitive sensor. When the sensor detects that the environmental brightness is low, the proportion of the infrared image is increased, and when the brightness is high, the proportion of the visible - light image is increased. Finally, the fused features are input into the detection head of YOLOv8 for wild animal target detection, generating target bounding boxes, categories, and confidences. In the target detection results, non - maximum suppression (NMS) is applied to remove redundant detection boxes to ensure the accuracy of the final detection boxes, and a multi - modal loss function is used to continuously optimize the model training performance.

[0051] By combining object - detection loss, modal - difference loss, weighted loss, and modal - adaptive loss, a multi - modal loss function is designed, and its calculation formula is as follows:

[0052] L total =L cla +L reg +L conf +α·L md +β·L w +γ·L ma

[0053] Among them, L cla represents the classification loss, L reg represents the localization loss, L conf represents the confidence loss, L md represents the modal - difference loss, L w represents the weighted loss guided by the photosensitive sensor, L maDenote the modality adaptive loss. α, β, and γ are hyperparameters used to control the weights of each loss. In the multi-modal loss function, the classification loss uses the standard cross-entropy loss to calculate the difference between the predicted class and the actual class. The localization loss uses the Smooth L1 loss to calculate the regression error of the bounding box, and the confidence loss uses binary cross-entropy to calculate. The modality difference loss uses cosine similarity to measure the difference between two modality features, and its calculation formula is as follows:

[0054]

[0055] where, F visible and F infrafed are the feature representations of visible light and infrared images, and ‖·‖ represents calculating the norm of the matrix. In the multi-modal wild animal detection model, the fused features are affected by the respective characteristics of visible light and infrared images. The addition of the modality difference loss can penalize the fused features for over-relying on a single modality and force a certain degree of difference between the two modalities. In addition, since the numerical value of the photosensitive sensor is introduced in this model to control the weight of feature fusion, in order to enable the input numerical value to better dynamically adjust the weights of the two modalities, a photosensitive sensor-guided weighted loss is designed, and its calculation formula is as follows:

[0056] L w = λ1·|W visible - W infrared | 2

[0057] where, W visible and W infrared are the weights of the two modalities dynamically adjusted by the numerical value of the photosensitive sensor, and λ1 is the hyperparameter of the weighted loss. The weighted loss is introduced as a regularization term, enabling the model to adaptively learn how to fuse the two modalities under different lighting conditions. Considering that the contribution degree of each image region to the target detection task is different in different modalities, a modality adaptive loss is designed to optimize the contribution of different modalities to target detection in certain regions, and its calculation formula is as follows:

[0058]

[0059] where, and are the weights of the visible light and infrared modalities adjusted according to the contribution of each image region, L visible and L infrared are the loss values of the visible light and infrared modalities, and N represents the number of regions. The addition of the modality adaptive loss enables the model to increase the contribution of the infrared image in the target region during training and improve the dependence of the background region on the visible light image.

[0060] S2 Trajectory Analysis and Prediction Model

[0061] By combining the Deep Learning-based SORT (DeepSORT) visual object tracking algorithm and the Long Short-Term Memory (LSTM) network, the present invention designs a trajectory analysis and prediction model to predict the future movement trajectory of target wild animals.

[0062] DeepSORT is used to perform object tracking in consecutive video frames to obtain the identity ID and position information corresponding to each object, that is, the bounding box coordinates (x, y), while LSTM is used to perform temporal modeling on the position information of the object in consecutive frames to predict the future trajectory of the object. The overall algorithm flow of the trajectory analysis and prediction model is shown in Algorithm 1, and the entire process can be divided into three steps: object tracking, feature extraction and temporal modeling, and trajectory prediction. First, use DeepSORT for object tracking to obtain the position information (position, speed, acceleration, etc.) of the object in consecutive frames. By extracting the position features of each object in the time series and then inputting them into the LSTM model for training. After training, use LSTM to predict the position of the object at future time steps to form trajectory analysis and prediction.

[0063]

[0064] When converting the historical trajectory of the object into the input format (x, y, v x , v y ) that can be accepted by the LSTM model, assume that the historical trajectory data of the object is:

[0065] history = {(x1, y1), (x2, y2), …, (x n , y n )}

[0066] Among them, (x t , y t ) represents the position of the object at time step t, where t = 1, 2, …, n. Set the initial frame speed at t = 1 to 0, and calculate the speed of the object at time step t. The calculation formula is as follows:

[0067]

[0068] Among them, and respectively represent the components of the speed in the x and y directions. The converted trajectory sequence is:

[0069]

[0070] The input for each time step includes the current position of the target and the velocity information relative to the previous frame. By combining the position and velocity data of the target into a feature vector, it helps the LSTM model perform temporal modeling.

[0071] S3 Dynamic Map Drawing

[0072] To more intuitively monitor the activities of wild animals in the area, a dynamic map drawing module is designed, and its rendering effect is as Figure 3 shown.

[0073] The dynamic map drawing module works collaboratively between the front end and the back end to achieve real-time data transmission, update, and display. The main task of the front end is to display the map and dynamically update the current location, historical trajectory, and predicted trajectory of the target according to the data passed from the back end. The lightweight open-source map library Leaflet.js is used as the map rendering library to initialize the map when the front-end page is loaded and set the initial view of the map. Then, according to the output result of the multi-modal wild animal detection model, a marker is created through the Marker class in Leaflet to mark the current location of the target, and the setInterval function is used to obtain the latest location of the target from the back end every 10 seconds and update the marker position on the map. The historical trajectory of the target is drawn by connecting the position of the target updated each time with a polyline, and according to the output result of the trajectory analysis and prediction model, different styles are used to draw the predicted trajectory of the target. As can be seen from Figure 2 it, the initialized map deploys hardware devices according to the regional population density and sets the system control center at the population-intensive activity center for timely response according to early warnings later. Different icons are used to mark the current location of the target according to the detected wild animal category, the historical trajectory is represented by a straight line, and the predicted trajectory and its dangerous activity range are represented by a dotted line. The value of the photosensitive sensor is displayed by the number of battery grids.

[0074] The back end is mainly responsible for obtaining data from sensors, the multi-modal wild animal detection model, and the trajectory analysis and prediction model, and passing the data to the front end through the API for real-time update. To reduce the load on the back end, the Redis cache system is used to cache the calculated historical trajectory and predicted trajectory data.

[0075] S4 Wild Animal Early Warning Mechanism and Response

[0076] According to the categories of wild animals, we set different risk levels for each wild animal, and roughly divide them into three categories: high risk, medium risk, and low risk according to the different threats to humans and the environment. Among them, high-risk wild animals mainly include tigers, bears, leopards, wild elephants and other animals that move fast and pose a greater threat. Medium-risk wild animals include wolves, wild boars and other animals that pose a certain threat but are less dangerous than large wild animals. Low-risk wild animals are some small wild animals with less threat, such as foxes and hares.

[0077] Table 1 Warning levels corresponding to different distances from different risk beast areas

[0078]

[0079] As shown in Table 1, multiple corresponding warning categories are set according to the detected beast categories and location information. The first-level warning is that the beast is approaching a dangerous area or a densely populated area of ​​human activities, and an immediate response is required. When the first-level warning is triggered, the system center will start an emergency broadcast or alarm in the nearby area to remind people in the area to take corresponding preventive measures, and start the animal repellent system placed around the area, and link the animal control department to track the beast in real time until the threat disappears. The second-level warning is that the beast enters a distant monitoring area, but does not directly threaten people or property. After the second-level warning is triggered, relevant information will be pushed to relevant personnel active in the area through SMS and APP, suggesting that people in the area be alert, and notifying regional security personnel to strengthen monitoring and continue to track the location of the beast. The third-level warning is that the beast is at the edge of the monitoring and will not pose a threat in a short time. After being triggered, a warning message will be sent to the system staff to increase the staff's attention to the monitoring of the area so that they can respond as soon as possible after the warning is upgraded.

[0080] In addition, considering that wild animals are more active at night and it takes more time for humans to respond when visibility is low, we dynamically adjust the trigger mechanism based on the values ​​of the light sensor. When the light is weak, the warning level sensitivity of medium- and high-risk wild animals is increased, and when the light is strong, the warning level of low-risk wild animals is appropriately lowered. At the same time, when the system receives multiple detection results of wild animals of the same category in a short period of time, it will appropriately increase the urgency of the response based on the risk category of the wild animal.

Claims

1. A method for detecting the invasion of fierce beasts based on machine vision and artificial intelligence, characterized in that, It includes the following steps: (1) Deploy a bimodal camera and a photosensitive sensor inside the monitoring area; the bimodal camera is used to synchronously collect visible light images and infrared images, and the photosensitive sensor is used to sense the light change in real time; (2) Preprocess the collected visible light images and infrared images, and perform feature-level fusion by combining the light intensity values of the photosensitive sensor; (3) Input the fused features into a multi-modal wild animal detection model, extract effective information and similarity features based on the YOLOv8 backbone network, and perform wild animal target detection through the detection head to output the detection result; (4) Input the detection result into a trajectory analysis and prediction model, perform target tracking by combining the DeepSORT algorithm, and use the long short-term memory network LSTM to perform temporal modeling on the historical trajectory of the target to predict the future trajectory of the target; (5) According to the detection result and the predicted trajectory, use the dynamic map drawing module to draw the current location, historical trajectory and predicted trajectory of the wild animal on the map in real time; (6) According to the category, location and predicted trajectory of the wild animal, judge the early warning level through the wild animal early warning mechanism and response module, and take corresponding early warning response measures.

2. The method for detecting wild animal intrusion based on machine vision and artificial intelligence according to claim 1, wherein, In step (3), the multi-modal wild animal detection model is specifically as follows: respectively perform feature extraction on the visible light image and the infrared image through the YOLOv8 backbone network to obtain their feature representations; dynamically adjust the weights of the visible light image and infrared image features according to the light intensity value of the photosensitive sensor; fuse the visible light image and infrared image features after adjusting the weights to form the fused features; input the fused features into the YOLOv8 detection head to perform wild animal target detection, and remove redundant detection frames through non-maximum suppression to generate the final detection result; the detection result includes the wild animal category, target bounding box position and confidence level.

3. The method for detecting the invasion of fierce beasts based on machine vision and artificial intelligence according to claim 2, characterized in that, The multi-modal wild animal detection model also includes: a multi-modal loss function, and the multi-modal loss function is optimized by combining classification loss, localization loss, confidence loss, modal difference loss, photosensitive sensor-guided weighted loss and modal adaptive loss. The formula is as follows: L total = L cla + L reg + L conf + α·L md + β·L w + γ·L ma Among them, L cla represents the classification loss, L reg represents the localization loss, L conf represents the confidence loss, L md represents the modality difference loss, L w represents the weighted loss guided by the photosensitive sensor, L ma represents the modality adaptive loss, and α, β, γ are hyperparameters used to control the weights of each loss; The modal difference loss uses cosine similarity to measure the difference between two modal features. The calculation formula is as follows: Among them, F visible and F infrafed are the feature representations of visible light and infrared images, and ‖·‖ represents the norm of the calculation matrix; The photosensitive sensor-guided weighted loss, the calculation formula is as follows: L w = λ1·|W visible -W infrared | 2 Among them, W visible and W infrared are the weights of two modes dynamically adjusted by the values of the photosensitive sensor, and λ1 is the hyperparameter of the weighted loss; The calculation formula of the modal adaptive loss is as follows: Among them, W i visible and W i infrared are the visible light and infrared modality weights adjusted according to the contributions of each image region, L visible and L infrared are the visible light and infrared modality loss values, and N represents the number of regions.

4. The method for detecting wild animal intrusion based on machine vision and artificial intelligence according to claim 1, characterized in that, Step (4) includes the following steps: (41) Use DeepSORT to track the target to obtain the position information of the target in consecutive frames; (42) For the historical trajectory of each target, when the trajectory length is greater than or equal to the preset threshold, convert the historical trajectory into the input format of the LSTM model and input it into the LSTM model for training; (43) Use the trained LSTM model to predict the position of the target in the future time step to form the trajectory analysis and prediction result.

5. A method for detecting wild animal intrusion based on machine vision and artificial intelligence according to claim 1, characterized in that, In step (5), the dynamic map drawing module includes the cooperation of the front-end and the back-end. The front-end uses the Leaflet.js lightweight open-source map library for map rendering, and dynamically updates the current location, historical trajectory, and predicted trajectory of the target according to the data transmitted by the back-end. The back-end is responsible for obtaining data from sensors, multi-modal wild animal detection models, and trajectory analysis and prediction models, and transmitting the data to the front-end through the API for real-time update.

6. The method for detecting the invasion of fierce beasts based on machine vision and artificial intelligence according to claim 1, characterized in that, In step (6), the wild animal warning mechanism and response module classifies wild animals into three categories: high risk, medium risk, and low risk according to their categories, and sets multiple warning levels according to the detected wild animal location and predicted trajectory, including level 1 warning, level 2 warning, and level 3 warning, and takes corresponding warning response measures for different warning levels.

7. A method for detecting the invasion of fierce beasts based on machine vision and artificial intelligence according to claim 6, characterized in that, In step (6), the wild animal warning mechanism and response module also includes a mechanism for dynamically adjusting the warning level according to the light intensity value of the photosensitive sensor. When the light intensity is weak, the sensitivity of the warning level for medium and high-risk wild animals is increased; when the light intensity is strong, the warning level for low-risk wild animals is appropriately lowered.

8. A wild animal intrusion detection system based on machine vision and artificial intelligence, characterized in that, Including: The dual-modal camera and photosensitive sensor module, where the dual-modal camera is used to synchronously collect visible light images and infrared images in the monitoring area, and the photosensitive sensor is used to sense the light change in real time; The data preprocessing module, which is used to preprocess the collected visible light images and infrared images; The multi-modal wild animal detection module, which is used to receive the features of the preprocessed visible light images and infrared images, perform feature-level fusion in combination with the light intensity value of the photosensitive sensor, and perform wild animal target detection through the detection head based on the YOLOv8 backbone network, and output the detection results; The trajectory analysis and prediction module, which is used to receive the detection results, perform target tracking in combination with the DeepSORT algorithm, use the long short-term memory network LSTM to perform temporal modeling on the historical trajectory of the target, and predict the future trajectory of the target; The dynamic map drawing module, which is used to draw the current location, historical trajectory, and predicted trajectory of wild animals on the map in real time according to the detection results and predicted trajectories; The wild animal warning mechanism and response module, which is used to judge the warning level according to the category, location, and predicted trajectory of wild animals, and take corresponding warning response measures.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the computer program is loaded into the processor, it implements a wild animal intrusion detection method based on machine vision and artificial intelligence according to any one of claims 1-7.

10. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a wild animal intrusion detection method based on machine vision and artificial intelligence according to any one of claims 1-7.