# Lamb Behaviors Analysis Using a Predictive CNN Model and a Single Camera
###### Abstract  
Object tracking is the process of estimating in time N the location of one or more moving element through an agent (camera, sensor, or other perceptive device). An important application in object tracking is the analysis of animal behavior to estimate their health. Traditionally, experts in the field have performed this task. However, this approach requires a high level of knowledge in the area and sufficient employees to ensure monitoring quality. Another alternative is the application of sensors (inertial and thermal), which provides precise information to the user, such as location and temperature, among other data. Nevertheless, this type of analysis results in high infrastructure costs and constant maintenance. Another option to overcome these problems is to analyze an RGB image to obtain information from animal tracking. This alternative eliminates the reliance on experts and different sensors, yet it adds the challenge of interpreting image ambiguity correctly. Taking into consideration the aforementioned, this article proposes a methodology to analyze lamb behavior from an approach based on a predictive model and deep learning, using a single RGB camera. This method consists of two stages. First, an architecture for lamb tracking was designed and implemented using CNN. Second, a predictive model was designed for the recognition of animal behavior. The results obtained in this research indicate that the proposed methodology is feasible and promising. In this sense, according to the experimental results on the used dataset, the accuracy was 99.85% for detecting lamb activities with YOLO\({}_{V4}\), and for the proposed predictive model, a mean accuracy was 83.52% for detecting abnormal states. These results suggest that the proposed methodology can be useful in precision agriculture in order to take preventive actions and to diagnose possible diseases or health problems. p 2  
algorithms to generalize the problems for specific applications. The approach presented in this research [9; 10; 11; 12] analyzes animal behavior individually using in-depth information. In this research, a laser sensor to calculate the distance between the animal and the camera was used. This was implemented to perform segmentation between the objects and the environment. This approach usually has good results indoors; solar radiation affected the performance of depth sensors when implemented outdoors. This was a substantial limitation because incorrect depths affected the accurate animal analysis. Another way to implement individual behavior analysis is by using geometric analysis techniques [13; 14]. This approach used detection from object segmentation in order to extract the area of each object. Although some studies showed positive results under controlled conditions, accuracy in this project dropped dramatically in dynamic environments or multiple animals that had occlusions between them and the camera. Unfortunately, deployment in production environments was poor due to these problems. The research presented by [1; 15] showed a different approach, where performs an analysis using machine learning techniques. These projects used the detection of a previously provided set of variables. This methodology has showed good results; however, a necessary variable analysis was predefined to ensure the correct operation of these approaches; this is considered a limiting factor because an analysis of the values, which provide better results, must be carried out before its implementation. The analysis of individual behavior currently uses deep learning techniques [16; 17; 18; 19; 20; 21; 22]. These works performed detection with a previously labeled dataset with defined categories (color, texture, shape) to automate the detection of a state, object, or posture. These researches usually have good results in situations of individual analysis. However, applications with multiple target objects or without the necessary conditions for their implementation tend to result in worse efficiency.