As with human communication, recent studies have revealed that animals convey a substantial amount of information through their facial expressions. In these studies, artificial intelligence (AI) technologies have been increasingly employed to analyze animal facial image data. However, collecting large amounts of facial image data for such studies has been labor-intensive. In this study, we developed a system that automatically recognizes and saves the faces of freely moving mice using AI-based object detection and image classification technologies. Through validation experiments, we confirmed that the system can detect, classify, and save a variety of mouse profiles with high accuracy. To further expand the versatility of the system for diverse research applications, the technology has been improved to include a feature for determining mouse sex based on their profiles, leveraging AI algorithms for this purpose. A small dataset was used to evaluate the performance of the sex determination system, yielding 100% accuracy for both male and female classifications. This application enables researchers to efficiently collect facial image data, providing high-quality datasets suitable for AI training. Consequently, the efficiency of facial expression analysis in mice is significantly improved. Importantly, this technology is not limited to mice and has the potential to be applied to other animal species and a wide range of research fields, offering promising potential for diverse applications.