Multi-camera motion trail detection method and device and storage medium
Through the method of detecting motion trajectories by multi-camera, combined with the trajectory, behavior and temperature abnormality recognition models, the problem of inaccurate identification of injured behavior in animal feeding is solved, and accurate judgment and early warning of animal abnormalities is achieved.
Patent Information
- Application Number
- CN202411855030.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to accurately identify animal injured behavior during animal feeding, especially when hair interference and behavioral concealment, resulting in inaccurate acquisition of wound images and inaccurate acquisition of behavioral characteristics and inaccurate judgment.
The method of detecting motion trajectories by multiple cameras is used to identify the activity venue, work and rest rules and comparison data of the target animal, and multiple cameras are set up to monitor within the monitoring range to obtain trajectory data, behavioral data and temperature data. A trajectory abnormality recognition model, behavior abnormality recognition model and temperature abnormality recognition model are constructed, and animal abnormality coefficients are obtained through these models to achieve accurate judgment of animal abnormalities.
Through the comprehensive monitoring of multi-camera system and the analysis of abnormality recognition model, abnormal situations in animals can be accurately identified, which improves the accuracy of identification of animal injury behavior and ensures the safety and health of animals.
Smart Images

Figure CN120013988A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multi-camera detection technology, and specifically to a method, device and storage medium for multi-camera motion trajectory detection. Background Art
[0002] In the process of animal breeding, animals are prone to trauma due to their own behavior and fighting between animals, which affects their health.
[0003] For example, when animals run and jump, they are prone to contusions, lacerations, punctures, fractures and dislocations. If they are not discovered and treated in time, they can cause massive bleeding, infection, or even tissue necrosis, leading to visceral damage or persistent pain and dysfunction. When animals fight, they are prone to bites and scratches, leading to deep tissue damage and infection, and causing infectious diseases. Therefore, animals need to be tested and treated in a timely manner during the animal breeding process to ensure their safety and health.
[0004] With the development of image recognition technology, research on animal behavior is also advancing with the times. By combining cameras and image recognition technology, animal images can be acquired and identified quickly and simply to determine the behavioral characteristics of animals.
[0005] However, the current technology also has certain defects. The main one is that the identification method is single, which leads to inaccurate identification of animal injury behavior; during the animal injury process, due to the interference and deliberate concealment of the animal's hair, the wound is difficult to observe directly, and the acquisition of the wound image is not accurate enough; at the same time, when animals are injured, they tend to stay still and rest, reducing the time and scope of activities, resulting in inaccurate acquisition and judgment of their behavioral characteristics.
[0006] To this end, a method, device and storage medium for detecting motion trajectories using multiple cameras are proposed. Summary of the invention
[0007] The purpose of the present invention is to provide a method, device and storage medium for detecting motion trajectories with multiple cameras; identifying the activity places, work and rest rules and control data of target animals; determining the monitoring range according to the activity places, and setting multiple cameras in the monitoring range; setting the monitoring period according to the work and rest rules; monitoring the monitoring range through the camera during the monitoring period to obtain activity data; constructing a trajectory anomaly recognition model to identify the activity data and the control data to obtain a trajectory anomaly coefficient; constructing a temperature anomaly recognition model to identify the activity data and the control data to obtain a behavior anomaly coefficient; constructing a temperature anomaly recognition model to identify the activity data and the control data to obtain a temperature anomaly coefficient; weighting the trajectory anomaly coefficient by the behavior anomaly coefficient and the temperature anomaly coefficient to obtain an animal anomaly coefficient. The present invention collects and identifies the activity data of the target animal and accurately judges the abnormal situation of the target animal.
[0008] To achieve the above object, the present invention provides the following technical solutions:
[0009] A method for detecting motion trajectories using multiple cameras, comprising:
[0010] S10. Determine the target animal to be detected, identify the activity place, work and rest pattern and control data of the target animal; the control data includes trajectory control data, behavior control data and temperature control data;
[0011] S20. Determine the monitoring range of the target animal according to the activity site, and set a plurality of cameras within the monitoring range; the cameras include an optical image recognition device and an infrared image recognition device;
[0012] S30. Setting a monitoring period according to the work and rest pattern of the target animal; during the monitoring period, monitoring the monitoring range through a camera to obtain activity data; the activity data includes trajectory data, behavior data and temperature data;
[0013] S40. Constructing a trajectory anomaly recognition model, identifying the trajectory data and the trajectory control data through the trajectory anomaly recognition model, and obtaining a trajectory anomaly coefficient;
[0014] S50. Constructing a behavior abnormality recognition model, identifying the behavior data and the behavior control data through the behavior abnormality recognition model, and obtaining a behavior abnormality coefficient;
[0015] S60. Constructing a temperature anomaly recognition model, identifying the temperature data and the temperature control data through the temperature anomaly recognition model, and obtaining a temperature anomaly coefficient;
[0016] S70. The trajectory abnormality coefficient is weighted by the behavior abnormality coefficient and the temperature abnormality coefficient to obtain an animal abnormality coefficient, and threshold judgment and early warning are performed based on the animal abnormality coefficient.
[0017] The activity data includes trajectory data, behavior data and temperature data;
[0018] The acquisition process of the trajectory data is as follows: constructing three-dimensional coordinates according to the monitoring range, and acquiring the coordinate data of the camera according to the three-dimensional coordinates; setting a mark point on the target animal; within the monitoring period, the camera identifies the mark point and monitors the target animal; determining the coordinates of the target animal and obtaining the trajectory data;
[0019] The process of acquiring the behavior data is as follows: determining the coordinates of the target animal according to the marking points; photographing the target animal according to the coordinates of the target animal by an optical image recognition device in a camera to obtain image data of the target animal, and using the image data as the behavior data;
[0020] The process of acquiring the temperature data is as follows: determining the coordinates of the target animal based on the marking points; shooting the target animal based on the coordinates of the target animal through the infrared image recognition device in the camera to obtain first infrared data of the area where the target animal is located and second infrared data of the area around the target animal; and using the first infrared data and the second infrared data as temperature data.
[0021] The process of obtaining the trajectory anomaly coefficient through the trajectory anomaly recognition model is as follows:
[0022] Obtaining trajectory data and trajectory comparison data, wherein the trajectory comparison data includes first comparison data and second comparison data; the first comparison data is historical trajectory data of the target animal; and the second comparison data is trajectory data of the same type of animal;
[0023] The first comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a first comparison coefficient; the second comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a second comparison coefficient;
[0024] The trajectory anomaly coefficient is calculated by using the first comparison data and the second comparison data.
[0025] The recognition process of the first control data and trajectory data by the trajectory anomaly recognition model is as follows:
[0026] The trajectory anomaly recognition model includes a mileage recognition module, a speed recognition module and a range recognition module;
[0027] Identify the mileage difference between the trajectory data and the first comparison data by the mileage identification module to obtain a first mileage difference coefficient;
[0028] The speed identification module identifies the difference between the average speed and acceleration of the trajectory data and the first comparison data to obtain a first speed difference coefficient;
[0029] The range identification module determines a target convex hull volume according to the trajectory data, determines a first convex hull volume according to the first comparison data, and obtains a first range difference coefficient according to the target convex hull volume and the first convex hull volume;
[0030] A first comparison coefficient is obtained according to the first mileage difference coefficient, the first speed difference coefficient and the first range difference coefficient.
[0031] The recognition process of the behavior anomaly recognition model is as follows:
[0032] Acquiring the behavior control data and the behavior data, wherein the behavior control data includes stress behavior data;
[0033] Identifying the behavior data according to the stress behavior data, identifying and marking the stress behavior of the target animal in the behavior data, and obtaining stress behavior distribution data;
[0034] The stress behavior distribution data is identified, and the behavior abnormality coefficient is obtained by measuring the duration and frequency of the stress behavior.
[0035] The recognition process of the temperature anomaly recognition model is as follows:
[0036] Acquire the temperature comparison data and the temperature data; the temperature comparison data includes first temperature distribution data and second temperature distribution data; the temperature data includes first infrared data and second infrared data;
[0037] The first temperature coefficient is obtained by comparing and identifying the first infrared data and the first temperature distribution data; the second infrared data is identified based on the second temperature distribution data to obtain the coordinates of the abnormal heat source and the temperature of the abnormal heat source in the second infrared data, and the second temperature coefficient is obtained by measuring and calculating the contact time between the abnormal heat source and the target animal; the contact time is determined based on the distance between the coordinates of the abnormal heat source and the coordinates of the target animal;
[0038] The temperature anomaly coefficient is calculated based on the first temperature coefficient and the second temperature coefficient.
[0039] A device for detecting motion trajectories using multiple cameras, comprising:
[0040] A target determination module determines the target animal to be detected, identifies the activity place, work and rest pattern and control data of the target animal; the control data includes trajectory control data, behavior control data and temperature control data;
[0041] A monitoring range determination module is used to determine the monitoring range of the target animal according to the activity site, and to set a plurality of cameras within the monitoring range; the cameras include an optical image recognition device and an infrared image recognition device;
[0042] A data acquisition module sets a monitoring period according to the work and rest rules of the target animal; during the monitoring period, the monitoring range is monitored by a camera to obtain activity data; the activity data includes trajectory data, behavior data and temperature data;
[0043] A trajectory recognition module is used to construct a trajectory anomaly recognition model, and to recognize the trajectory data and the trajectory control data through the trajectory anomaly recognition model to obtain a trajectory anomaly coefficient;
[0044] A behavior recognition module constructs a behavior abnormality recognition model, and recognizes the behavior data and the behavior control data through the behavior abnormality recognition model to obtain a behavior abnormality coefficient;
[0045] A temperature recognition module is used to construct a temperature anomaly recognition model, and to recognize the temperature data and the temperature control data through the temperature anomaly recognition model to obtain a temperature anomaly coefficient;
[0046] The judgment and early warning module weights the trajectory abnormality coefficient by the behavior abnormality coefficient and the temperature abnormality coefficient to obtain the animal abnormality coefficient, and performs threshold judgment and early warning by the animal abnormality coefficient.
[0047] The process of identifying the trajectory anomaly coefficient by the trajectory anomaly identification model is as follows:
[0048] Obtaining trajectory data and trajectory comparison data, wherein the trajectory comparison data includes first comparison data and second comparison data; the first comparison data is historical trajectory data of the target animal; and the second comparison data is trajectory data of the same type of animal;
[0049] The first comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a first comparison coefficient; the second comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a second comparison coefficient;
[0050] The trajectory anomaly coefficient is calculated by using the first comparison data and the second comparison data.
[0051] The recognition process of the behavior anomaly recognition model is as follows:
[0052] Acquiring behavior control data and behavior data, wherein the behavior control data includes stress behavior data;
[0053] Identifying the behavior data according to the stress behavior data, identifying and marking the stress behavior of the target animal in the behavior data, and obtaining stress behavior distribution data;
[0054] The stress behavior distribution data is identified, and the behavior abnormality coefficient is obtained by measuring the duration and frequency of the stress behavior.
[0055] A storage medium stores a computer program, which, when executed by a processor, implements a method for detecting motion trajectories with multiple cameras.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] 1. The present invention constructs a trajectory abnormality recognition model, including a mileage recognition module, a speed recognition module and a range recognition module; the historical trajectory data of the target animal is used as the first reference data, and the trajectory data of the same type of animal as the target animal is used as the second reference data; the first reference data and the trajectory data are recognized to obtain a first reference coefficient; the second reference data and the trajectory data are recognized to obtain a second reference coefficient; and the trajectory abnormality coefficient of the target animal is accurately obtained through the first reference coefficient and the second reference coefficient.
[0058] 2. The present invention constructs a behavior abnormality recognition model based on a deep neural network model; based on the stress behavior data of the target animal, the stress behavior in the behavior data is identified through the behavior abnormality recognition model to obtain stress behavior distribution data; the behavior abnormality coefficient is calculated based on the duration and frequency of the stress behavior, and the behavior abnormality coefficient can accurately reflect the behavior abnormality of the target animal.
[0059] 3. The present invention constructs a temperature anomaly recognition model based on a deep neural network model; a first temperature coefficient is obtained by comparing and identifying the first infrared data and the first temperature distribution data of the target animal; a second temperature coefficient is obtained by comparing and identifying the second infrared data and the second temperature distribution data; a temperature anomaly coefficient is obtained through the first temperature coefficient and the second temperature coefficient to accurately reflect the temperature anomaly of the target animal.
[0060] 4. The present invention identifies the activity data of the target animal to obtain a trajectory abnormality coefficient, a behavior abnormality coefficient and a temperature abnormality coefficient; the trajectory abnormality coefficient is weighted by the behavior abnormality coefficient and the temperature abnormality coefficient to obtain an animal abnormality coefficient; the animal abnormality coefficient can accurately reflect the abnormal situation of the target animal. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic diagram of a flow chart of a method for detecting motion trajectories using multiple cameras of the present invention;
[0062] Figure 2 It is a structural schematic diagram of the trajectory anomaly recognition model of the present invention;
[0063] Figure 3 The present invention is a schematic diagram of the structure of a device for detecting motion trajectories with multiple cameras. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] In order to accurately identify potential safety hazards in the animal breeding process and ensure the health of the animals, the present invention proposes a method, device and storage medium for detecting motion trajectories with multiple cameras.
[0066] Embodiment 1
[0067] The present invention proposes a method for detecting motion trajectories with multiple cameras, the process of the method is as follows: Figure 1 As shown, including:
[0068] S10. Determine the target animal to be detected, and identify the activity place, work and rest pattern and control data of the target animal; the control data includes trajectory control data, behavior control data and temperature control data.
[0069] Wherein, the trajectory comparison data includes first comparison data and second comparison data;
[0070] The first control data is the historical trajectory data of the target animal, specifically the trajectory data of the target animal in a healthy state within a specified period; the second control data is the trajectory data of the same type of animal, which is obtained by monitoring and collecting the same type of animals as the target animal, and screening based on the body shape and development parameters of the target animal.
[0071] The behavioral control data includes the stress behavior data of the target animals, specifically the stress behavior data of the target animals when they are injured; when animals are injured, they will relieve pain and express vigilance through a series of actions, and different animals have different stress behaviors when injured; for example, when cats are injured, they will frequently lick the wound to relieve pain and become aggressive; when primates are injured, they will relieve tension and discomfort through behaviors such as combing their hair; when birds of prey are injured, they will reduce flying as much as possible and express vigilance through behaviors such as spreading their wings and showing their claws. The identification of animal stress behaviors helps to improve the accuracy of judgments.
[0072] The temperature control data includes first temperature distribution data and second temperature distribution data; wherein the first temperature distribution data is the body temperature distribution data of the target animal in a healthy state, which is used to reflect the temperature condition of the target animal itself; the second temperature distribution data is the distribution of ambient temperature acceptable to the target animal, which is used to reflect abnormal heat sources in the contact environment of the target animal.
[0073] S20. Determine the monitoring range of the target animal according to the activity place, and set up multiple cameras within the monitoring range; the cameras include an optical image recognition device and an infrared image recognition device.
[0074] When setting up a camera within the monitoring range, ensure that the entire monitoring range is covered by the camera.
[0075] S30. Setting a monitoring period according to the work and rest patterns of the target animal; within the monitoring period, identifying the monitoring range through a camera to obtain activity data; the activity data includes trajectory data, behavior data and temperature data.
[0076] The activity data includes trajectory data, behavior data and temperature data;
[0077] The acquisition process of the trajectory data is as follows: constructing three-dimensional coordinates according to the monitoring range, and acquiring the coordinate data of the camera according to the three-dimensional coordinates; setting a marking point on the target animal; during the monitoring period, the camera identifies the marking point and monitors the target animal; and determining the coordinates of the target animal to obtain the trajectory data. The marking point includes a micro positioning device, which is placed on the target animal.
[0078] The process of acquiring the behavior data is as follows: determining the coordinates of the target animal according to the marking points; photographing the target animal according to the coordinates of the target animal through an optical image recognition device in a camera to obtain image data of the target animal, and using the image data as behavior data.
[0079] The temperature data acquisition process is as follows: determine the coordinates of the target animal according to the marking points; shoot the target animal according to the coordinates through the infrared image recognition device in the camera to obtain the first infrared data of the area where the target animal is located and the second infrared data of the area around the target animal; use the first infrared data and the second infrared data as temperature data. The second infrared data is determined according to the distribution area and distance threshold of the first infrared data.
[0080] The present invention determines the activity place and work and rest pattern of the target animal; determines the monitoring range according to the activity place; determines the monitoring period according to the work and rest pattern; monitors the monitoring range according to the camera during the monitoring period, and establishes a three-dimensional coordinate system according to the monitoring range; obtains the trajectory data, behavior data and temperature data of the target animal, and provides a data basis for abnormal identification of the target animal.
[0081] S40. Constructing a trajectory anomaly recognition model, and identifying the trajectory data and the trajectory comparison data through the trajectory anomaly recognition model to obtain a trajectory anomaly coefficient.
[0082] The process of identifying the trajectory anomaly coefficient by the trajectory anomaly identification model is as follows:
[0083] Obtaining trajectory data and trajectory comparison data, wherein the trajectory comparison data includes first comparison data and second comparison data; the first comparison data is historical trajectory data of the target animal; and the second comparison data is trajectory data of the same type of animal;
[0084] The first comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a first comparison coefficient; the second comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a second comparison coefficient;
[0085] The trajectory anomaly coefficient is calculated by using the first comparison data and the second comparison data.
[0086] The calculation formula of the trajectory anomaly coefficient is:
[0087] Tra=α1*cont1+α2*cont2;
[0088] Among them, Tra represents the trajectory anomaly coefficient; cont1 represents the first control coefficient; α1 represents the first control weight; cont2 represents the second control coefficient; α2 represents the second control weight.
[0089] The present invention uses the historical trajectory data of the target animal as the first control data, and uses the trajectory data of the same type of animal as the target animal as the second control data; the first control data and the trajectory data are identified by a trajectory anomaly recognition model to obtain a first control coefficient; the second control data and the trajectory data are identified by the trajectory anomaly recognition model to obtain a second control coefficient; and the trajectory anomaly coefficient of the target animal can be accurately obtained by the first control coefficient and the second control coefficient.
[0090] The trajectory anomaly recognition model is constructed and trained based on the deep neural network model. Its structure is as follows: Figure 2 As shown, it includes a mileage identification module, a speed identification module and a range identification module.
[0091] The recognition process of the first reference data and trajectory data by the trajectory anomaly recognition model is as follows:
[0092] Identify the mileage difference between the trajectory data and the first comparison data by a mileage identification module, and obtain a first mileage difference coefficient by the total mileage of the trajectory data and the total mileage of the first comparison data;
[0093] The speed identification module identifies the difference between the average speed and acceleration of the trajectory data and the first comparison data to obtain a first speed difference coefficient;
[0094] The range identification module determines a target convex hull volume according to the trajectory data, determines a first convex hull volume according to the first comparison data, and obtains a first range difference coefficient according to the target convex hull volume and the first convex hull volume.
[0095] A first comparison coefficient is obtained according to the first mileage difference coefficient, the first speed difference coefficient and the first range difference coefficient.
[0096] The calculation formula of the first comparison coefficient is:
[0097]
[0098] Among them, β1 represents the mileage weight; Fmile i represents the first mileage difference coefficient; β2 represents the speed weight; Fpeed i represents the first speed difference coefficient; β3 represents the range weight; Frad i represents the first range difference coefficient; n represents the number of first control data.
[0099] In the range recognition module, the target convex hull volume is obtained by identifying the trajectory data using a three-dimensional convex hull algorithm, and the first convex hull volume is obtained by identifying the first comparison data using a three-dimensional convex hull algorithm.
[0100] The 3D convex hull algorithm provides an accurate method to calculate the minimum bounding volume that contains all trajectory points. It can obtain a geometric description of the animal's activity range and conduct an in-depth analysis of its behavior patterns. It can not only process 3D trajectory data, but also be used for real-time monitoring and long-term tracking analysis. Commonly used 3D convex hull algorithms include GrahamScan, Quickhull, and Incremental algorithms, which can effectively process point sets and generate 3D convex hulls.
[0101] The recognition process of the trajectory anomaly recognition model for the second reference data and trajectory data is as follows:
[0102] The mileage recognition module identifies the mileage difference between the trajectory data and the second reference data to obtain a second mileage difference coefficient; the speed recognition module identifies the difference between the average speed and acceleration of the trajectory data and the second reference data to obtain a second speed difference coefficient; the range recognition module determines the target convex hull volume according to the trajectory data, determines the second convex hull volume according to the second reference data, and obtains the second range difference coefficient according to the target convex hull volume and the second convex hull volume;
[0103] A second comparison coefficient is obtained according to the second mileage difference coefficient, the second speed difference coefficient and the second range difference coefficient.
[0104] The calculation formula of the second comparison coefficient is:
[0105]
[0106] Among them, Smile j Indicates the second mileage difference coefficient; Speed j Represents the second speed difference coefficient; Srad j represents the second range difference coefficient; m represents the number of second control data.
[0107] The present invention constructs a track anomaly recognition model, which includes a mileage recognition module, a speed recognition module and a range recognition module; the mileage anomaly of the target animal track data is recognized by the mileage recognition module, the speed anomaly of the target animal track data is recognized by the speed recognition module, and the range anomaly of the target animal track data is recognized by the range recognition module; a control anomaly coefficient is obtained through the mileage anomaly, the speed anomaly and the range anomaly; and the track anomaly of the target animal is accurately recognized.
[0108] S50. Constructing a behavior abnormality recognition model, and identifying the behavior data and the behavior control data through the behavior abnormality recognition model to obtain a behavior abnormality coefficient.
[0109] The behavior abnormality recognition model is built on the basis of a deep neural network model, and its recognition process is as follows:
[0110] Acquiring behavior control data and behavior data, wherein the behavior control data includes stress behavior data;
[0111] According to the stress behavior data, the behavior data of the target animal is compared and identified, and the stress behavior of the target animal in the behavior data is identified and marked to obtain stress behavior distribution data;
[0112] The stress behavior distribution data is identified, and the behavior abnormality coefficient is obtained by measuring the duration and frequency of the stress behavior.
[0113] The calculation formula of the abnormal behavior coefficient is:
[0114]
[0115] Among them, Abno represents the behavioral abnormality coefficient; freq represents the frequency of stress behavior; FH represents the frequency threshold; time represents the duration of stress behavior; T represents the total duration of the monitoring period; exp() represents an exponential function with a natural constant as the base.
[0116] The present invention constructs a behavior abnormality recognition model based on a deep neural network model; based on the stress behavior data of the target animal, the stress behavior in the behavior data is identified through the behavior abnormality recognition model to obtain the distribution data of the stress behavior; the behavior abnormality coefficient is calculated according to the distribution duration and distribution frequency of the stress behavior, and the behavior abnormality coefficient can accurately reflect the behavior abnormality of the target animal.
[0117] S60. Constructing a temperature anomaly recognition model, and identifying the temperature data and the temperature control data through the temperature anomaly recognition model to obtain a temperature anomaly coefficient.
[0118] The temperature anomaly recognition model is built on the basis of a deep neural network model, and its recognition process is as follows:
[0119] Acquire temperature comparison data and temperature data; the temperature data includes first infrared data and second infrared data; the temperature comparison data includes first temperature distribution data and second temperature distribution data;
[0120] The first temperature coefficient is obtained by comparing and identifying the first infrared data and the first temperature distribution data; the first temperature coefficient is used to reflect the temperature abnormality of the target animal itself; and is obtained by identifying the difference between the first infrared data and the first temperature distribution data.
[0121] The second temperature coefficient is obtained by comparing and identifying the second infrared data and the second temperature distribution data; the second temperature coefficient is used to reflect the abnormal situation of the target animal in contact with the external high-temperature object during the activity; the second infrared data is identified based on the second temperature distribution data to obtain the abnormal heat source coordinates and the abnormal heat source temperature in the second infrared data, and the second temperature coefficient is calculated in combination with the contact time between the abnormal heat source and the target animal; the contact time is determined based on the distance between the abnormal heat source coordinates and the target animal coordinates.
[0122] The temperature anomaly coefficient is calculated based on the first temperature coefficient and the second temperature coefficient.
[0123] The calculation formula of the temperature anomaly coefficient is:
[0124] Temp = γ1*pera1+γ2*pera2;
[0125] Among them, Temp represents the temperature anomaly coefficient; γ1 represents the first temperature weight; pera1 represents the first temperature coefficient; γ2 represents the second temperature weight; pera2 represents the second temperature coefficient.
[0126] The present invention constructs a temperature anomaly recognition model based on a deep neural network model; a first temperature coefficient is obtained by comparing and identifying the first infrared data and the first temperature distribution data of the target animal; a second temperature coefficient is obtained by comparing and identifying the second infrared data and the second temperature distribution data; a temperature anomaly coefficient is obtained through the first temperature coefficient and the second temperature coefficient to accurately reflect the temperature anomaly of the target animal.
[0127] S70. The trajectory abnormality coefficient is weighted by the behavior abnormality coefficient and the temperature abnormality coefficient to obtain an animal abnormality coefficient, and threshold judgment and early warning are performed based on the animal abnormality coefficient.
[0128] The calculation formula of the animal abnormality coefficient is:
[0129] Acoe=(θ1*Abno+θ2*Temp)*exp(Tra);
[0130] Among them, Acoe represents the animal abnormality coefficient; θ1 represents the behavioral abnormality weight; θ2 represents the temperature abnormality weight.
[0131] The present invention provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for detecting motion trajectories with multiple cameras is implemented.
[0132] The present invention identifies the activity place, work and rest rules and control data of the target animal; determines the monitoring range according to the activity place, and sets a plurality of cameras in the monitoring range; sets the monitoring period according to the work and rest rules; monitors the monitoring range through the camera during the monitoring period to obtain activity data; constructs a trajectory anomaly recognition model to identify the activity data and the control data to obtain the trajectory anomaly coefficient; constructs a temperature anomaly recognition model to identify the activity data and the control data to obtain the behavior anomaly coefficient; constructs a temperature anomaly recognition model to identify the activity data and the control data to obtain the temperature anomaly coefficient; weights the trajectory anomaly coefficient by the behavior anomaly coefficient and the temperature anomaly coefficient to obtain the animal anomaly coefficient, and accurately judges the abnormal situation of the target animal.
[0133] Embodiment 2
[0134] The present invention proposes a device for detecting motion trajectories with multiple cameras, the structure of which is as follows: Figure 3 As shown, it includes: a target determination module, a monitoring range determination module, a data acquisition module, a trajectory recognition module, a behavior recognition module, a temperature recognition module and a judgment and warning module.
[0135] A target determination module determines the target animal to be detected, identifies the activity place, work and rest pattern and control data of the target animal; the control data includes trajectory control data, behavior control data and temperature control data;
[0136] A monitoring range determination module determines the monitoring range of the target animal according to the activity site, and sets a plurality of cameras according to the monitoring range; the cameras include an optical image recognition device and an infrared image recognition device;
[0137] A data acquisition module sets a monitoring period according to the work and rest rules of the target animal; during the monitoring period, the monitoring range is monitored by a camera to obtain activity data; the activity data includes trajectory data, behavior data and temperature data;
[0138] The activity data includes trajectory data, behavior data and temperature data;
[0139] The acquisition process of the trajectory data is as follows: constructing three-dimensional coordinates according to the monitoring range; setting multiple cameras within the monitoring range for monitoring, and acquiring coordinate data of the cameras according to the three-dimensional coordinates; setting marking points on the target animal; within the monitoring period, identifying the marking points through the cameras and monitoring the target animal; determining the coordinates of the target animal and obtaining trajectory data;
[0140] The process of acquiring the behavior data is as follows: determining the coordinates of the target animal according to the marking points; photographing the target animal according to the coordinates of the target animal by an optical image recognition device in a camera to obtain image data of the target animal, and using the image data as the behavior data;
[0141] The process of acquiring the temperature data is as follows: determining the coordinates of the target animal based on the marking points; shooting the target animal based on the coordinates of the target animal through the infrared image recognition device in the camera to obtain first infrared data of the area where the target animal is located and second infrared data of the area around the target animal; and using the first infrared data and the second infrared data as temperature data.
[0142] A trajectory recognition module is used to construct a trajectory anomaly recognition model, and to recognize the trajectory data and the trajectory control data through the trajectory anomaly recognition model to obtain a trajectory anomaly coefficient;
[0143] The process of identifying the trajectory anomaly coefficient by the trajectory anomaly identification model is as follows:
[0144] Obtaining trajectory data and trajectory comparison data, wherein the trajectory comparison data includes first comparison data and second comparison data; the first comparison data is historical trajectory data of the target animal; and the second comparison data is trajectory data of the same type of animal;
[0145] The first comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a first comparison coefficient; the second comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a second comparison coefficient;
[0146] The trajectory anomaly coefficient is calculated by using the first comparison data and the second comparison data.
[0147] The calculation formula of the trajectory anomaly coefficient is:
[0148] Tra=α1*cont1+α2*cont2;
[0149] Among them, Tra represents the trajectory anomaly coefficient; cont1 represents the first control coefficient; α1 represents the first control weight; cont2 represents the second control coefficient; α2 represents the second control weight.
[0150] The recognition process of the first reference data and trajectory data by the trajectory anomaly recognition model is as follows:
[0151] The trajectory anomaly recognition model includes a mileage recognition module, a speed recognition module and a range recognition module;
[0152] Identify the mileage difference between the trajectory data and the first comparison data by the mileage identification module to obtain a first mileage difference coefficient;
[0153] The speed identification module identifies the difference between the average speed and acceleration of the trajectory data and the first comparison data to obtain a first speed difference coefficient;
[0154] The range identification module determines a target convex hull volume according to the trajectory data, determines a first convex hull volume according to the first comparison data, and obtains a first range difference coefficient according to the target convex hull volume and the first convex hull volume;
[0155] Obtaining a first comparison coefficient according to the first mileage difference coefficient, the first speed difference coefficient and the first range difference coefficient;
[0156] The recognition process of the behavior anomaly recognition model is as follows:
[0157] Acquiring behavior control data and behavior data, wherein the behavior control data includes stress behavior data;
[0158] Identifying the behavior data according to the stress behavior data, identifying and marking the stress behavior of the target animal in the behavior data, and obtaining stress behavior distribution data;
[0159] The stress behavior distribution data is identified, and the behavior abnormality coefficient is obtained by measuring the duration and frequency of the stress behavior.
[0160] The calculation formula of the abnormal behavior coefficient is:
[0161]
[0162] Among them, Abno represents the behavioral abnormality coefficient; freq represents the frequency of stress behavior; FH represents the frequency threshold; time represents the duration of stress behavior; T represents the total duration of the monitoring period; exp() represents an exponential function with a natural constant as the base.
[0163] A temperature recognition module is used to construct a temperature anomaly recognition model, and to recognize the temperature data and the temperature control data through the temperature anomaly recognition model to obtain a temperature anomaly coefficient;
[0164] The recognition process of the temperature anomaly recognition model is as follows:
[0165] Acquire temperature comparison data and temperature data; the temperature data includes first infrared data and second infrared data; the temperature comparison data includes first temperature distribution data and second temperature distribution data;
[0166] The first temperature coefficient is obtained by comparing and identifying the first infrared data and the first temperature distribution data; the second infrared data is identified based on the second temperature distribution data to obtain the abnormal heat source coordinates and the abnormal heat source temperature in the second infrared data, and the second temperature coefficient is calculated based on the contact time between the abnormal heat source and the target animal; the contact time is determined based on the distance between the abnormal heat source coordinates and the target animal coordinates; the temperature anomaly coefficient is calculated based on the first temperature coefficient and the second temperature coefficient.
[0167] The calculation formula of the temperature anomaly coefficient is:
[0168] Temp = γ1*pera1+γ2*pera2;
[0169] Among them, Temp represents the temperature anomaly coefficient; γ1 represents the first temperature weight; pera1 represents the first temperature coefficient; γ2 represents the second temperature weight; pera2 represents the second temperature coefficient.
[0170] The judgment and early warning module weights the trajectory abnormality coefficient by the behavior abnormality coefficient and the temperature abnormality coefficient to obtain the animal abnormality coefficient, and performs threshold judgment and early warning based on the animal abnormality coefficient.
[0171] The calculation formula of the animal abnormality coefficient is:
[0172] Acoe=(θ1*Abno+θ2*Temp)*exp(Tra);
[0173] Among them, Acoe represents the animal abnormality coefficient; θ1 represents the behavioral abnormality weight; θ2 represents the temperature abnormality weight.
[0174] The present invention identifies the activity place, work and rest rules and control data of the target animal; determines the monitoring range according to the activity place, and sets a plurality of cameras in the monitoring range; sets the monitoring period according to the work and rest rules; monitors the monitoring range through the camera during the monitoring period to obtain activity data; constructs a trajectory anomaly recognition model to identify the activity data and the control data to obtain the trajectory anomaly coefficient; constructs a temperature anomaly recognition model to identify the activity data and the control data to obtain the behavior anomaly coefficient; constructs a temperature anomaly recognition model to identify the activity data and the control data to obtain the temperature anomaly coefficient; weights the trajectory anomaly coefficient by the behavior anomaly coefficient and the temperature anomaly coefficient to obtain the animal anomaly coefficient, and accurately judges the abnormal situation of the target animal.
[0175] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for detecting motion trajectories using multiple cameras, characterized in that: include: S10. Determine the target animal to be detected, identify the activity place, work and rest pattern and control data of the target animal; the control data includes trajectory control data, behavior control data and temperature control data; S20. Determine the monitoring range of the target animal according to the activity site, and set a plurality of cameras within the monitoring range; the cameras include an optical image recognition device and an infrared image recognition device; S30. Setting a monitoring period according to the work and rest pattern of the target animal; during the monitoring period, monitoring the monitoring range through a camera to obtain activity data; the activity data includes trajectory data, behavior data and temperature data; S40. Constructing a trajectory anomaly recognition model, identifying the trajectory data and the trajectory control data through the trajectory anomaly recognition model, and obtaining a trajectory anomaly coefficient; S50. Constructing a behavior abnormality recognition model, identifying the behavior data and the behavior control data through the behavior abnormality recognition model, and obtaining a behavior abnormality coefficient; S60. Constructing a temperature anomaly recognition model, identifying the temperature data and the temperature control data through the temperature anomaly recognition model, and obtaining a temperature anomaly coefficient; S70. The trajectory abnormality coefficient is weighted by the behavior abnormality coefficient and the temperature abnormality coefficient to obtain an animal abnormality coefficient, and threshold judgment and early warning are performed based on the animal abnormality coefficient.
2. The method for detecting motion trajectories using multiple cameras according to claim 1, characterized in that: The activity data includes trajectory data, behavior data and temperature data; The acquisition process of the trajectory data is as follows: constructing three-dimensional coordinates according to the monitoring range, and acquiring the coordinate data of the camera according to the three-dimensional coordinates; setting a mark point on the target animal; within the monitoring period, the camera identifies the mark point and monitors the target animal; determining the coordinates of the target animal and obtaining the trajectory data; The process of acquiring the behavior data is as follows: determining the coordinates of the target animal according to the marking points; photographing the target animal according to the coordinates of the target animal by an optical image recognition device in a camera to obtain image data of the target animal, and using the image data as the behavior data; The process of acquiring the temperature data is as follows: determining the coordinates of the target animal based on the marking points; shooting the target animal based on the coordinates of the target animal through the infrared image recognition device in the camera to obtain first infrared data of the area where the target animal is located and second infrared data of the area around the target animal; and using the first infrared data and the second infrared data as temperature data.
3. The method for detecting motion trajectories using multiple cameras according to claim 1, characterized in that: The process of obtaining the trajectory anomaly coefficient through the trajectory anomaly recognition model is as follows: Obtaining trajectory data and trajectory comparison data, wherein the trajectory comparison data includes first comparison data and second comparison data; the first comparison data is historical trajectory data of the target animal; and the second comparison data is trajectory data of the same type of animal; The first comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a first comparison coefficient; the second comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a second comparison coefficient; The trajectory anomaly coefficient is calculated by using the first comparison data and the second comparison data.
4. The method for detecting motion trajectories using multiple cameras according to claim 3, characterized in that: The recognition process of the first control data and trajectory data by the trajectory anomaly recognition model is as follows: The trajectory anomaly recognition model includes a mileage recognition module, a speed recognition module and a range recognition module; Identify the mileage difference between the trajectory data and the first comparison data by the mileage identification module to obtain a first mileage difference coefficient; The speed identification module identifies the difference between the average speed and acceleration of the trajectory data and the first comparison data to obtain a first speed difference coefficient; The range identification module determines a target convex hull volume according to the trajectory data, determines a first convex hull volume according to the first comparison data, and obtains a first range difference coefficient according to the target convex hull volume and the first convex hull volume; A first comparison coefficient is obtained according to the first mileage difference coefficient, the first speed difference coefficient and the first range difference coefficient.
5. The method for detecting motion trajectories using multiple cameras according to claim 1, characterized in that: The recognition process of the behavior anomaly recognition model is as follows: Acquiring the behavior control data and the behavior data, wherein the behavior control data includes stress behavior data; Identifying the behavior data according to the stress behavior data, identifying and marking the stress behavior of the target animal in the behavior data, and obtaining stress behavior distribution data; The stress behavior distribution data is identified, and the behavior abnormality coefficient is obtained by measuring the duration and frequency of the stress behavior.
6. The method for detecting motion trajectories using multiple cameras according to claim 1, characterized in that: The recognition process of the temperature anomaly recognition model is as follows: Acquire the temperature comparison data and the temperature data; the temperature comparison data includes first temperature distribution data and second temperature distribution data; the temperature data includes first infrared data and second infrared data; The first temperature coefficient is obtained by comparing and identifying the first infrared data and the first temperature distribution data; the second infrared data is identified based on the second temperature distribution data to obtain the coordinates and temperature of the abnormal heat source in the second infrared data, and the second temperature coefficient is obtained by measuring and calculating the contact time between the abnormal heat source and the target animal; the contact time is determined based on the distance between the coordinates of the abnormal heat source and the coordinates of the target animal; The temperature anomaly coefficient is calculated based on the first temperature coefficient and the second temperature coefficient.
7. A device for detecting motion trajectories using multiple cameras, characterized in that: include: A target determination module determines the target animal to be detected, identifies the activity place, work and rest pattern and control data of the target animal; the control data includes trajectory control data, behavior control data and temperature control data; A monitoring range determination module is used to determine the monitoring range of the target animal according to the activity site, and to set a plurality of cameras within the monitoring range; the cameras include an optical image recognition device and an infrared image recognition device; A data acquisition module sets a monitoring period according to the work and rest rules of the target animal; during the monitoring period, the monitoring range is monitored by a camera to obtain activity data; the activity data includes trajectory data, behavior data and temperature data; A trajectory recognition module is used to construct a trajectory anomaly recognition model, and to recognize the trajectory data and the trajectory control data through the trajectory anomaly recognition model to obtain a trajectory anomaly coefficient; A behavior recognition module constructs a behavior abnormality recognition model, and recognizes the behavior data and the behavior control data through the behavior abnormality recognition model to obtain a behavior abnormality coefficient; A temperature recognition module is used to construct a temperature anomaly recognition model, and to recognize the temperature data and the temperature control data through the temperature anomaly recognition model to obtain a temperature anomaly coefficient; The judgment and early warning module weights the trajectory abnormality coefficient by the behavior abnormality coefficient and the temperature abnormality coefficient to obtain the animal abnormality coefficient, and performs threshold judgment and early warning by the animal abnormality coefficient.
8. The device for detecting motion trajectories using multiple cameras according to claim 7, characterized in that: The process of identifying the trajectory anomaly coefficient by the trajectory anomaly identification model is as follows: Obtaining trajectory data and trajectory comparison data, wherein the trajectory comparison data includes first comparison data and second comparison data; the first comparison data is historical trajectory data of the target animal; and the second comparison data is trajectory data of the same type of animal; The first comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a first comparison coefficient; the second comparison data and the trajectory data are identified by a trajectory anomaly identification model to obtain a second comparison coefficient; The trajectory anomaly coefficient is calculated by using the first comparison data and the second comparison data.
9. The device for detecting motion trajectories using multiple cameras according to claim 7, characterized in that: The recognition process of the behavior anomaly recognition model is as follows: Acquiring behavior control data and behavior data, wherein the behavior control data includes stress behavior data; Identifying the behavior data according to the stress behavior data, identifying and marking the stress behavior of the target animal in the behavior data, and obtaining stress behavior distribution data; The stress behavior distribution data is identified, and the behavior abnormality coefficient is obtained by measuring the duration and frequency of the stress behavior.
10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements a method for detecting motion trajectories with multiple cameras as described in any one of claims 1 to 6.