# AI-Enabled Animal Behavior Analysis with High Usability: A Case Study on Open-Field Experiments
## 4 High Availability of Animal Behavior Recognition
Researchers can use the search and filter functions to select appropriate algorithms for behavioral analysis experiments. To realize this design, we define the structure of an algorithm library containing storage paths of algorithms, service interface paths, metadata formats, etc. The platform provides a module to manage the algorithm library, which contains functions such as adding, deleting, searching, and loading algorithms. The application of the algorithm library enables the platform to centrally manage decentralized algorithm plug-ins and remote services, which is convenient for researchers to find and select and improves the usability of the platform. Unlike commercial tools, the platform uses a more flexible architecture that allows it to change different behavior recognition methods according to user needs, such as skeleton keypoint-based methods, optical flow information-based methods, depth image-based methods, and appearance contour-based methods. Among them, the skeleton keypoint-based method needs to rely on a posture estimation algorithm to obtain information about the key points of the animal's skeleton. The timing information of these key points can reliably describe the subtle changes in the animal's posture and serve as the basic data for analyzing other motion indicators. The behavior recognition algorithm based on skeleton key points can identify specific categories of behaviors based on the key point sequence information. Combining posture estimation with key point-based behavior recognition algorithms satisfies the reliability of behavior recognition in animal experiments and increases the flexibility of adapting to different experimental needs. The key points must be accurately mapped onto the animal limbs to recognize the animal-generated pose data during the experiment. The accuracy of the key point information of experimental animals has an extremely important impact on subsequent behavior recognition and other experimental tasks. The platform currently provides two pose estimation algorithm plug-ins, one of which is the DeepLabCut pose estimation algorithm, which combines target detection, target tracking, and semantic segmentation algorithms to accurately locate key points on the limbs of experimental animals without the need for labeling [24]. DeepLabCut reduces the computational cost of the pose estimation algorithm by transforming the complex pose estimation task into key point detection and tracking, significantly reducing the computational cost. The network architecture of DeepLabCut is based on a convolutional neural network, as shown in Figure 3. DeepLabCut consists of the following main components: a feature extraction layer for extracting features from the input image, a fully connected layer for key point regression, a loss function that measures the difference between the predicted key point position and the actual calibrated position, and the optimizer that adjusts the network parameters to minimize the prediction error. Overall, the network structure of DeepLabCut is a convolutional neural network based on a backbone network such as ResNet, which implements key point localization and tracking through a feature extraction layer and a key point regression layer. Another plug-in for various pose estimation algorithms provided by the platform is YOLOX-Pose [25], an algorithm for multi-person pose estimation based on the popular YOLO target detection framework [26]. The algorithm combines the advantages of top-down and bottom-up approaches by simultaneously detecting the bounding boxes and corresponding 2D poses of multiple people through a forward propagation process. Unlike traditional heatmap-based two-stage approaches, YOLO-Pose is end-to-end trainable and optimized to evaluate the metric of object key point similarity (OKS) instead of using L1 loss as a proxy for training.