# Progress of Machine Vision Technologies in Intelligent Dairy Farming
## 3 Application of Machine Vision in Main Behavior Recognition of Dairy Cows
added the time dimension to the Rank eXpansion Network 3D algorithm (Rexnet 3D) network, and the recognition accuracy of dairy cow motion behavior in natural scenes reached 95.00% [40]. [PERSON] et al. monitored more behaviors of calves including entering or leaving, stationary and turning behaviors in the resting area, and feeding and drinking [41]. Then, they integrated the frame difference method, background subtraction, Gaussian mixture model, and ViBe model to generate an integrated background model, which can effectively recognize the above behaviors, avoiding the defect that the previous single model has low recognition accuracy for static behavior or moving behavior. [PERSON] et al. realized accurate behavior classification in complex environments involving low-quality surveillance videos, complex illumination, and weather variations [42]. They used the VGG16 network for feature extraction, the Bi LSTM (Bidirectional Long Short-Term Memory) classification model had good stability, and even in the presence of interference, the difference in behavior recognition accuracy could still be less than 0.02.Yin et al. used four algorithms (C3D, VGG16-LSTM, ResNet50-LSTM, and DensNet169-LSTM) to recognize the five basic behaviors (lying, standing, walking, drinking, and feeding) of cows, obtaining an average accuracy of 97.87% [43]. [PERSON] et al. used the same video dataset to identify the identity information and behavior of cows. Due to being pure-colored cows, they brushed red numbers on their brown fur to distinguish their identity [44]. At the same time, they achieved recognition rates of 84.4% and 94.4% for their drinking and grazing behaviors, respectively. Deep learning has a significant drawback, which is the conflict between recognition rate and computational complexity. When it is necessary to improve recognition accuracy, the computational complexity of the computer will also increase exponentially. Thus, the algorithm cannot be used on an edge device with insufficient computing power. In response to this situation, [PERSON] et al. proposed an E3D (Efficient 3D CNN) algorithm [45]. The precision, recall, parameters, and FLOPs of the E3D were 98.17%, 97.08%, 2.35M, and 0.98G, respectively. Compared with the Improved Renext network, ACTION-Net, and C3D-ConvLSTM, the E3D algorithm is more suitable for deployment on portable mobile edge devices. The basic motion behavior of cows is closely related to their health. In addition, there are also some special behaviors that are closely related to the health and economic value of cows, such as rumination and estrus behavior. [PERSON] et al. used a compacted representation of a video in a single 2D image to capture long-term dynamic rumination behavior [46]. The average accuracy and recall rate of this method in rumination behavior recognition were 95% and 98%, respectively. [PERSON] et al. used the frame difference method to recognize the dairy cow rumination behavior [47]. To verify the feasibility of this method, the algorithm was tested on multi-object dairy cow rumination videos, the rumination time and chewing frequency were calculated, then a comparison was made with the results of manual observation. The result was a lower error rate, the rumination time average error was 5.902%, and the average error in the number of chews was 8.126%. [PERSON] et al. used the optical flow method to calculate the relative motion speed of each pixel in the video frame images, then extracted the real area of cows' mouth [48]. The author validated the feasibility of this method using six video files with a total length of 96 min. The research obtained the highest accuracy of 87.80% and an average accuracy of 76.46%. [PERSON] et al. also used the Horn-Schunck optical flow method to detect the cow's mouth area, and took the filling rate (the proportion of the observation frame to the cow's mouth area) as its detection target [49].