The open set facial recognition problem has always been a major challenge in applying deep learning from theory to practice. In this paper, we propose to treat a pet individual as a class, build a multi-classification model and train a feature extraction network in the training phase; use the trained feature extraction network to extract features in the testing phase, use statistical learning methods to rank the feature similarity, and finally achieve the purpose of querying pet identity information by pet face. Finally, to verify the effectiveness of the proposed method in this study, we built an image dataset containing dogs and cats as the main subjects. The results show that the method using improved feature extraction of ResNet50 with KNN algorithm feature matching achieves 94.4% accuracy for open-set animal facial recognition under certain conditions. The method has good performance in terms of recognition accuracy and speed, and provides important technical support for individual recognition of open set animal faces.