Golden-snub monkey face recognition method based on visual language model

Through a method based on the visual language model, GPT and CLIP models are used to obtain the description text data set, and combined with the fine-tuned CLIP model and classifier, the problem of difficult fine-grained feature extraction in golden monkey facial recognition is solved, achieving high accuracy and stability. Personalized facial recognition reduces data labeling costs.

CN118865441APending Publication Date: 2024-10-29NORTHWEST UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410899115.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

In the facial recognition task of golden monkeys, due to the similar appearance of individual faces and the hair characteristics that are easily affected by the environment, it is difficult for the existing technology to effectively extract fine-grained features that are not affected by the environment, resulting in insufficient recognition stability and accuracy.

Method used

Using a method based on the visual language model, the description text data set is obtained through the GPT and CLIP models, and the facial recognition model is constructed using the fine-tuned CLIP model, MLP and classifier, and the Arcface loss function is used for training to reduce the need for fine annotation of images. Improve the model's ability to extract fine-grained features.

Benefits of technology

It achieves golden monkey facial recognition that does not rely on fine annotations, improves the stability and accuracy of recognition, enhances the model's ability to understand fine-grained features by correlating text information with image content, and reduces data collection costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865441A_ABST
    Figure CN118865441A_ABST
Patent Text Reader

Abstract

The invention relates to a golden-nosed monkey face recognition method based on a visual language model, and the method does not need to carry out the fine marking of a golden-nosed monkey face image, but introduces additional text information, and the text information exists in a weak supervision form, and is easier to collect and obtain. And the description text can be associated with image contents, so that the understanding capability of the model on image semantics is improved, and the extraction capability on fine-grained features is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular, to a golden monkey face recognition method based on a visual language model. Background Art

[0002] Due to the influence of inbreeding, individuals of the same sex and similar age in the golden monkey population show highly similar features in facial appearance. Therefore, golden monkey face recognition is considered to be a challenging fine-grained recognition task.

[0003] The facial area of ​​the golden monkey is covered by hair with weak discriminant characteristics, and these hair features are easily affected by environmental factors such as light and wind. The difference in hair color is not obvious, but the hair area accounts for a large proportion of the image and contains unique texture features. Therefore, hair features can help when there are large individual differences. However, relying solely on facial hair features for individual identification is not reliable because these features are easily affected by the environment. Therefore, it is urgent to find features that are not affected by the environment in the model to improve the stability and accuracy of individual identification.

[0004] The facial features and features of golden snub-nosed monkeys are unique, and these features are less affected by environmental factors, showing strong robustness in facial recognition tasks. Therefore, extracting the facial features and features of golden snub-nosed monkeys is crucial for facial recognition. However, these features have a similar overall appearance, and distinguishing them requires attention to subtle local features. Traditional convolutional neural networks perform well in extracting global features, but for tasks that classify these subtle differences, more attention needs to be paid to local features, and there are limitations in this regard.

[0005] Most of the existing fine-grained classification methods adopt the strategy of localization-classification sub-network to capture local areas with fine-grained information in the image. By introducing the localization sub-network, these methods can effectively focus on the local features related to fine-grained classification in the image and perform well in fine-grained recognition tasks, but they require a large amount of local annotation, which is time-consuming, labor-intensive and costly, limiting their practicality. Summary of the invention

[0006] In order to overcome at least one deficiency in the prior art, the present application provides a golden monkey face recognition method based on a visual language model.

[0007] In a first aspect, a method for golden monkey face recognition based on a visual language model is provided, comprising:

[0008] Obtain a model training data set, where samples are golden monkey pictures;

[0009] Based on the GPT model and CLIP model, the description text corresponding to each sample is obtained according to the feature information in the golden monkey corpus and the model training data set to form a description text data set;

[0010] Fine-tune the CLIP model based on the model training data set and the description text data set to obtain a fine-tuned CLIP model;

[0011] Build a facial recognition model, which includes the image encoder, MLP, and classifier in the fine-tuned CLIP model;

[0012] The facial recognition model is trained based on the model training data set to obtain a trained facial recognition model;

[0013] The golden monkey picture to be identified is input into the trained facial recognition model to obtain the golden monkey identification result.

[0014] In one embodiment, based on the GPT model and the CLIP model, according to the feature information in the golden monkey corpus and the model training data set, the description text corresponding to each sample is obtained to form a description text data set; including:

[0015] Get feature information from the golden monkey corpus;

[0016] Input feature information into the GPT model to obtain multiple description texts;

[0017] Inputting multiple description texts and samples into the CLIP model to obtain at least one description text matching the sample;

[0018] The description texts corresponding to all samples constitute the description text dataset.

[0019] In one embodiment, the facial recognition model is trained based on the model training data set to obtain the trained facial recognition model, and the loss function used is the Arcface loss function.

[0020] In one embodiment, the image encoder in the fine-tuned CLIP model is a ViT model.

[0021] In a second aspect, a golden monkey face recognition device based on a visual language model is provided, comprising:

[0022] A model training data set acquisition module is used to acquire a model training data set, where samples in the model training data set are golden monkey pictures;

[0023] The description text dataset acquisition module is used to obtain the description text corresponding to each sample based on the GPT model and the CLIP model, according to the feature information in the golden monkey corpus and the model training dataset, to form a description text dataset;

[0024] A fine-tuning module is used to fine-tune the CLIP model based on the model training data set and the description text data set to obtain a fine-tuned CLIP model;

[0025] A model building module for building a facial recognition model, which includes the image encoder, MLP, and classifier in the fine-tuned CLIP model;

[0026] A model training module is used to train the facial recognition model based on the model training data set to obtain a trained facial recognition model;

[0027] The recognition module is used to input the golden monkey picture to be identified into the trained facial recognition model to obtain the golden monkey recognition result.

[0028] In one embodiment, the text data set acquisition module is described, and is also used

[0029] Get feature information from the golden monkey corpus;

[0030] Input feature information into the GPT model to obtain multiple description texts;

[0031] Inputting multiple description texts and samples into the CLIP model to obtain at least one description text matching the sample;

[0032] The description texts corresponding to all samples constitute the description text dataset.

[0033] In one embodiment, the facial recognition model is trained based on the model training data set to obtain the trained facial recognition model, and the loss function used is the Arcface loss function.

[0034] In one embodiment, the image encoder in the fine-tuned CLIP model is a ViT model.

[0035] In a third aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the golden monkey face recognition method based on the visual language model is implemented.

[0036] In a fourth aspect, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned golden monkey face recognition method based on a visual language model.

[0037] Compared with the prior art, the present application has the following beneficial effects: the golden monkey face recognition method based on the visual language model of the present application does not require fine annotation of the golden monkey face image, but introduces additional text information, which exists in a weakly supervised form and is easier to collect and obtain; and by associating the descriptive text with the image content, the model's ability to understand the image semantics is improved, thereby improving the ability to extract fine-grained features. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The present application may be better understood by referring to the following description given in conjunction with the accompanying drawings, which together with the following detailed description are included in this specification and form a part of this specification. In the drawings:

[0039] Figure 1 A flowchart of a golden monkey face recognition method based on a visual language model according to an embodiment of the present application is shown;

[0040] Figure 2 A flow chart for generating description text is shown;

[0041] Figure 3 A disparity map of the golden monkey face is shown;

[0042] Figure 4 The number and proportion of golden snub-nosed monkey individuals in different age groups are shown;

[0043] Figure 5 shows a schematic diagram of a facial recognition model;

[0044] Figure 6 A structural block diagram of a golden monkey face recognition device based on a visual language model according to an embodiment of the present application is shown;

[0045] Figure 7 The experimental performance under different loss functions is shown, where (a) is the performance on Accuracy and (b) is the performance on F1-score. DETAILED DESCRIPTION

[0046] The exemplary embodiments of the present application will be described below in conjunction with the accompanying drawings. For the sake of clarity and conciseness, not all features of the actual embodiments are described in the specification. However, it should be understood that many implementation-specific decisions can be made in the process of developing any such actual embodiments in order to achieve the specific goals of the developer, and these decisions may vary from embodiment to embodiment.

[0047] It is also necessary to explain here that, in order to avoid obscuring the present application due to unnecessary details, only the device structure closely related to the scheme according to the present application is shown in the drawings, while other details that are not closely related to the present application are omitted.

[0048] It should be understood that the present application is not limited to the described implementation forms due to the following description with reference to the accompanying drawings. In this embodiment, where feasible, the embodiments can be combined with each other, features between different embodiments can be replaced or borrowed, and one or more features can be omitted in one embodiment.

[0049] The present application embodiment provides a golden monkey face recognition method based on a visual language model. Figure 1 A flowchart of a method for golden monkey face recognition based on a visual language model according to an embodiment of the present application is shown, see Figure 1 , methods include:

[0050] Step S1, obtaining a model training data set, where samples in the model training data set are golden monkey pictures.

[0051] During the data collection process, due to the high facial similarity of golden monkeys, misjudgment is easy to occur during identification, so professional researchers are needed to assist in identifying individuals to avoid duplicate collection. In order to ensure that the data collected meets the experimental requirements, a series of data collection specifications need to be formulated before data collection to avoid taking too much invalid data and effectively carry out data collection.

[0052] The following are the specific data collection specifications:

[0053] 1. Equipment requirements: Use high-resolution cameras and professional photography techniques to ensure image clarity and detail.

[0054] 2. Shooting angle requirements: Try to take frontal photos during the shooting process, and try to avoid shooting from above or sideways.

[0055] 3. Diversity requirements: Ensure the diversity of data sources to cover facial data of golden snub-nosed monkeys of different genders, age groups and environmental conditions.

[0056] 4. Data recording requirements: The name or number of the corresponding golden monkey needs to be recorded when the data is captured. The facial image data of the golden monkeys collected was sorted at the individual level, and repeated, blurred, low-quality, and occluded image data were eliminated. The goal of the sorting process is to ensure the consistency and high quality of the data set to meet the subsequent scientific research requirements for the golden monkey facial recognition task.

[0057] To ensure the reliability and stability of the experiment, the experimental data was balanced as much as possible to ensure that the number of samples for each golden monkey facial image category was about 216, and the sample label was the name of the golden monkey.

[0058] Step S2, based on the GPT (Generative Pre-Trained) model and the CLIP (Constrastive Language-Image Pre-training) model, according to the feature information in the golden monkey corpus and the model training data set, obtain the description text corresponding to each sample to form a description text data set. Here, the CLIP model is a pre-trained model.

[0059] Step S3, fine-tuning the CLIP model based on the model training data set and the description text data set to obtain a fine-tuned CLIP model.

[0060] Step S4, constructing a facial recognition model, the facial recognition model includes an image encoder, MLP (Multilayer Perceptron) and a classifier in the fine-tuned CLIP model. Here, the image encoder in the fine-tuned CLIP model is frozen, and the parameters are no longer updated in subsequent model training. The classifier outputs the probability that the golden monkey belongs to each category, and the category with the largest probability can be selected as the golden monkey category, where each category corresponds to the name of a golden monkey.

[0061] Step S5, training the facial recognition model based on the model training data set to obtain a trained facial recognition model.

[0062] Step S6, inputting the golden monkey picture to be identified into the trained facial recognition model to obtain the golden monkey identification result, that is, determining the name of the golden monkey in the golden monkey picture.

[0063] In this embodiment, there is no need to perform detailed annotation of the golden monkey facial image. Instead, additional text information is introduced. This text information exists in a weakly supervised form and is easier to collect and obtain. In addition, the descriptive text can be associated with the image content to improve the model's ability to understand the image semantics, thereby improving the ability to extract fine-grained features.

[0064] In one embodiment, Figure 2 The flowchart of generating description text is shown. In step S2, based on the GPT model and the CLIP model, according to the feature information in the golden monkey corpus and the model training data set, the description text corresponding to each sample is obtained to form a description text data set, including:

[0065] First, obtain the feature information in the golden monkey corpus.

[0066] The faces of golden snub-nosed monkeys are highly similar, and how to accurately obtain the differentiated information characteristics of each golden snub-nosed monkey requires professional knowledge of biology or zoology. Therefore, when writing a description, you need to ensure that you have sufficient understanding of the facial features of golden snub-nosed monkeys, including the facial structure, facial features, skin texture, presence of mouth corner tumors, head spot color, head spot shape, facial hair color, cheek skin color, and other obvious appearance characteristics of golden snub-nosed monkeys. Figure 3 A golden monkey facial disparity map is shown.

[0067] In order to obtain distinctive facial features, this embodiment divides the golden snub-nosed monkey individuals into age groups and genders, and refers to the age classification standards of captive golden snub-nosed monkeys and the method of estimating the age of unknown-age individuals of primates based on appearance characteristics. This embodiment divides all golden snub-nosed monkey individuals into five age groups, and then describes them according to some characteristics specific to each age group and gender to ensure the accuracy, reliability, and applicability of the corpus.

[0068] The following are characteristics specific to different age groups and genders:

[0069] 1. Juvenile golden monkeys: individuals aged 1-3 years old, with a small body size, and the size difference between males and females is not large, and the gender cannot be clearly distinguished from the appearance. The fur color is light, and the younger the age, the whiter the fur color, and the more obvious the wrinkles on the snout. The head spot is milky yellow, and the hair on the back is grayish yellow. The cheek color is blue, the nostrils are parallel to the face, the forehead has clear erector pili muscles, the erector pili muscles have black hair, and the snout is also covered with white whiskers.

[0070] 2. Subadult female golden monkeys: Individuals aged 4-5 years old, slightly smaller than adult females, with lighter body hair than adult females, with hair color between yellowish white and yellow; there is no golden hair on the back, the cheeks are smooth, the skin color is pink-blue, there is a tuft of yellowish-white hair at the root of the nose, and no obvious tumor at the corner of the mouth.

[0071] 3. Sub-adult male golden monkeys: 4-6 years old, smaller than adult males, with lighter hair color than adult males, ranging from yellow to golden yellow, and the needle-like hair on the back and neck is not yet obvious. The tumor at the corner of the mouth begins to grow and is smaller than that of the adult. The tumor at the corner of the mouth is pink, the face is pink-blue, and the skin is smooth.

[0072] 4. Adult female golden monkeys: Individuals over 5 years old have yellow fur, which is darker than that of adult males. Their faces are narrower than those of males, their skin is blue, they have erector pili muscles on their foreheads, and they have no or only a small tumor at the corner of their mouths, or a tumor the size of a corn kernel. Compared with males, females are significantly smaller. Some individuals have long and golden back hair, but it is shorter and sparser than that of adult males.

[0073] 5. Adult male golden monkeys: individuals over 7 years old, large and strong, with a wide face, obvious mouth corner tumors on both sides of the mouth, accompanied by molting, nostrils facing up, against the root of the nose, and a bulging snout. The cheek skin is blue, and sharp canine teeth can be clearly seen. The fur is golden yellow, and the fur on the face and front shoulders is scarlet. There are long needle-like hairs on the neck, and the back is covered with bright golden long hair.

[0074] According to the above standards, 70 golden monkey individuals were classified in this example. Figure 4 The number of golden snub-nosed monkeys in different age groups is shown. For these 70 golden snub-nosed monkeys, the unique characteristics of each age group are described. The specific corpus compilation specifications are as follows:

[0075] (1) The description of each golden monkey should be accurate and avoid using vague or misleading language.

[0076] (2) For each feature, a specific and clear description should be provided so that others can understand and identify the facial features of the golden monkey in the image.

[0077] (3) The description should be sufficient but not lengthy to avoid making it more difficult to understand and process.

[0078] (4) The description style should be consistent. For example, if a feature is described as “reddish-brown head spots” in one image, similar terms should be used when describing other images.

[0079] (5) To facilitate subsequent data processing and analysis, the JSON file format is used for storage.

[0080] Then, the feature information is input into the GPT model to obtain multiple description texts.

[0081] Then, multiple description texts and samples are input into the CLIP model to obtain at least one description text matching the sample. The CLIP model includes a text encoder and an image encoder. The text encoder is used to extract features from the description text to obtain text features, and the image encoder is used to extract features from the image to obtain image features.

[0082] Then, the description texts corresponding to all samples constitute the description text dataset.

[0083] In this embodiment, after obtaining at least one description text matching the sample, the GPT model is used to summarize the description text so that it is presented in a more concise and easy-to-understand form.

[0084] In one embodiment, Figure 5The schematic diagram of the face recognition model is shown. The image encoder in the face recognition model is used to extract image features. Here, the image encoder adopts the ViT model. The ViT model has the following advantages:

[0085] (1) Global feature capture capability: The ViT model uses a self-attention mechanism to process images, which enables the model to effectively capture global feature relationships in images. Compared with traditional convolutional neural networks, ViT performs better in processing fine-grained features.

[0086] (2) Modeling long-range dependencies: The self-attention mechanism allows the ViT model to capture long-range dependencies when processing images, which is very important for the recognition of fine-grained features, especially when distinguishing images with subtle differences.

[0087] (3) Good transfer learning effect: The ViT model has strong transfer learning ability when dealing with different datasets and tasks, which makes it an ideal choice for handling various fine-grained recognition tasks.

[0088] This embodiment selects to freeze the image encoder in the fine-tuned visual language model when implementing the golden monkey facial recognition task, and uses it as the feature extractor for the facial recognition task, using its fine-tuned generalization ability and feature extraction ability to provide reliable feature representation for the golden monkey facial recognition task.

[0089] In one embodiment, in step S5, the facial recognition model is trained based on the model training data set to obtain a trained facial recognition model, and the loss function used is the Arcface loss function.

[0090] The fine-tuned image encoder of the golden monkey facial image can generate a one-dimensional abstract feature representation, providing a more intuitive input for network classification. In image classification, the Softmax loss function is usually used, which can map the output of the network to the interval (0, 1) to represent the probability that the sample belongs to each category. However, the Softmax loss function does not take into account the relationship between the intra-class distance and the inter-class distance, which may affect the accuracy of the golden monkey facial recognition task. Especially when facing fine-grained facial recognition problems, there may be small differences between different categories.

[0091] To solve this problem, this embodiment introduces the ArcFace loss function, which takes into account the angle information when measuring the distance between feature vectors, thereby improving the recognition performance. Arcface loss consists of two parts: the transformation of the angle cosine value and the cross entropy loss function. First, for each training sample, Arcface associates the feature vector with the category label and maps them to the feature vector space on the unit hypersphere through a set of learnable parameters. Then, the cosine function is used to measure the similarity between feature vectors, that is, the angle between the feature vectors on the unit hypersphere. By considering the cosine value instead of the direct Euclidean distance, Arcface adds the angular margin m directly to the angle, which can affect the angle more directly than adding it to the cosine value, thereby improving the discrimination between feature vectors.

[0092] Using the same inventive concept as the golden monkey face recognition method based on the visual language model, this embodiment also provides a corresponding golden monkey face recognition device based on the visual language model. Figure 6 FIG. 1 shows a structural block diagram of a golden monkey face recognition device based on a visual language model according to an embodiment of the present application, see Figure 6 , the device comprises:

[0093] A model training data set acquisition module 61 is used to acquire a model training data set, where samples in the model training data set are golden monkey pictures;

[0094] A description text data set acquisition module 62 is used to acquire the description text corresponding to each sample based on the GPT model and the CLIP model according to the feature information in the golden monkey corpus and the model training data set to form a description text data set;

[0095] A fine-tuning module 63, used to fine-tune the CLIP model based on the model training data set and the description text data set to obtain a fine-tuned CLIP model;

[0096] A model building module 64 is used to build a facial recognition model, the facial recognition model includes an image encoder, an MLP and a classifier in the fine-tuned CLIP model;

[0097] A model training module 65 is used to train the facial recognition model based on the model training data set to obtain a trained facial recognition model;

[0098] The recognition module 66 is used to input the golden monkey picture to be recognized into the trained facial recognition model to obtain the golden monkey recognition result.

[0099] The golden monkey facial recognition device based on a visual language model of this embodiment has the same inventive concept as the golden monkey facial recognition method based on a visual language model mentioned above. Therefore, the specific implementation method of the device can be seen in the embodiment part of the golden monkey facial recognition method based on a visual language model mentioned above, and its technical effect corresponds to the technical effect of the above method, which will not be repeated here.

[0100] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned golden monkey face recognition method based on the visual language model is implemented.

[0101] An embodiment of the present application provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the above-mentioned golden monkey face recognition method based on the visual language model is implemented.

[0102] In order to further verify the effectiveness of the method of this application, the following experimental analysis was carried out.

[0103] 1. Experimental settings and evaluation indicators

[0104] A golden monkey facial image dataset was used, which contains 70 individuals, with an average of 216 instance images per individual. The full sample dataset is divided into a training set and a test set in a ratio of 7:3. During the experiment, the sample data of the training set was used to fine-tune the pre-trained CLIP model. The data in the test set was used to evaluate the performance of the model after fine-tuning. It is worth noting that ViT-L / 14@336px was used as the CLIP model and the Arcface loss function in the experiment.

[0105] In the experiment of this embodiment, Python was selected as the programming language of the algorithm, and PyTorch was used as the deep learning framework. In order to evaluate the feasibility and reliability of the method, data preprocessing, network training and testing were carried out on the same server. The server is equipped with a TITAN graphics card with 24GB video memory and runs the Ubuntu-18.04 operating system. In the experiment, a stochastic gradient descent optimizer (Stochastic Gradient Descent, SGD) was used to fine-tune the model and optimize the loss function. The pixel resolution of the picture is set to 336*336, the batchsize size is set to 20, the initial learning rate is set to 1e-3, and weight_decay is set to 5e-4 during the training process, and a total of 100 epochs of training are carried out.

[0106] In order to evaluate the performance of the method, accuracy and F1-score were selected as the main measurement indicators. These two indicators can fully reflect the performance of the model in the recognition task. Accuracy measures the proportion of samples correctly classified by the model, while F1-score combines precision and recall and is more sensitive to the balance of different categories.

[0107] (II) Experiment and Conclusion

[0108] The CLIP model was fine-tuned using the created golden monkey facial image description text dataset, and then the golden monkey facial images were recognized by the classifier, and the performance of the model was evaluated using Accuracy. In terms of experimental comparison, the description text data generated by the existing method was selected to fine-tune the CLIP model, and the experimental results after fine-tuning were compared.

[0109] First, we compared the golden monkey face recognition method based on the visual language model with the pure image method and found that the method based on fine-tuning the pre-trained CLIP model achieved the best experimental results in all experimental settings. This result confirms the important role of text in helping the model understand discriminative features. In addition, we compared this method with the CLIP-ZS method without any fine-tuning of the pre-trained CLIP. The experimental results show that the classification effect of the CLIP-ZS method is poor.

[0110] Finally, the accuracy of the facial recognition method based on the visual language model on the full sample dataset was improved by 3.3% compared with the baseline method. The advancedness of the proposed method and the reliability of the golden monkey facial image description dataset were verified through experiments.

[0111] (3) Performance under three different k-shot samples

[0112] The average accuracy of the model performance of different methods is compared under three different k-shot samples and full sample data conditions. For each k-shot condition, k training images in five samples are tested and their average accuracy is calculated.

[0113] The CLIP model was fine-tuned using an original golden monkey facial image description text dataset, and the golden monkey facial images were then identified using a classifier, and the performance of the model was evaluated using Accuracy. In terms of experimental comparison, this embodiment selected the description text data generated by the existing method to fine-tune the CLIP model, and compared the experimental results after fine-tuning. This experiment compared the average accuracy of the model performance of different methods under three different k-shot samples and full sample data conditions. For each k-shot condition, the study will test k training images in five samples and calculate their average accuracy.

[0114] Table 1 Experimental performance

[0115]

[0116] As shown in Table 1, in the experiment of fine-tuning for golden monkey face recognition, the method achieved the best top-1 and top-3 accuracy in the full sample dataset, 70-way 5-shot and 70-way 3-shot settings. The facial recognition method based on the visual language model outperformed all baseline methods in all cases except the 70-way 1-shot evaluation setting. This result also verifies the reliability and accuracy of the constructed golden monkey image text description dataset. Compared with the existing image description generation method, the image description text generation method used can generate text that highlights the subclass differences, thereby achieving an improvement in recognition performance.

[0117] This embodiment first compared with the pure image method, and found that the method based on fine-tuning the pre-trained CLIP model achieved the best experimental results in all experimental settings. This result verifies the important role of text in helping the model understand discriminative features. This embodiment is also compared with the CLIP-ZS method without any fine-tuning of the pre-trained CLIP. The experimental results show that the classification effect of the CLIP-ZS method is poor. This is mainly because the alignment with the golden monkey facial image in the pre-trained CLIP embedding space is relatively low. In order to understand this phenomenon more deeply, it is also compared with the CLIP-LP method that only fine-tunes the linear layer. Although the CLIP-LP method has a significant improvement in performance compared to the CLIP-ZS model, its effect is still inferior to the method of fine-tuning the pre-trained CLIP model. This further proves the problem of low alignment between images and texts in the pre-trained CLIP embedding space. Due to insufficient alignment, it is difficult for the linear classification layer to extract enough discriminative information from the features encoded by the pre-trained CLIP model to identify the identity of an individual.

[0118] (4) Impact of different CLIP models on performance

[0119] In order to explore the impact of different CLIP models on the performance of this method, this embodiment conducted experiments on the golden monkey full sample dataset. In the experiment, different CLIP models were used for comparative analysis for each method.

[0120] Table 2 Experimental performance under different CLIP models

[0121]

[0122]

[0123] It can be observed from Table 2 that there are significant differences in the classification performance of the baseline method and the method of this embodiment under different CLIP models. Specifically, when the ResNet50 model with fewer parameters is used, the performance is relatively poor compared to other models. This is because the large parameter model has more parameters, and thus has a more powerful representation ability, which can better capture the complex features of the input data. In addition, the large parameter model also has better generalization ability, that is, it performs well on unseen data. However, no matter which CLIP model is used, the impact on the performance of this method is relatively small. Compared with other baseline methods, the performance of the fine-tuning model using the image description method generated by this method is improved, further demonstrating the superiority of this method. This shows that the golden monkey face recognition method based on the visual language model can achieve robust performance under different CLIP models, and has strong generalization ability and adaptability.

[0124] (5) Impact of different loss functions on performance

[0125] In order to verify the influence of different loss functions on the model performance, this embodiment conducted an experimental analysis on the golden monkey full sample data set. During the experiment, only the loss function used in the training was changed, while other training parameters remained the same.

[0126] Figure 7 The experimental performance under different loss functions is shown, where (a) is the performance on Accuracy and (b) is the performance on F1-score. Figure 7 The results show that the Softmax method performs worse than other methods in terms of Accuracy and F1-score. CosFace and SphereFace are comparable in classification results. The ArcFace loss function achieves the highest accuracy in both Accuracy and F1-score on the test set, with a classification accuracy of 96.58%. SphereFace, CosFace, and ArcFace all belong to Margin-based Loss functions, which are a special type of loss function mainly used for face recognition and image classification. They can enhance the model's ability to distinguish between categories and standardize features within a larger angular range. ArcFace introduces the angular cosine interval of cosine values, making the difference in cosine values ​​between adjacent categories more obvious, which helps the model better learn the relationship between categories and improves the discriminability of features, so it performs best in classification results.

[0127] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A golden monkey face recognition method based on a visual language model, characterized in that: include: Obtain a model training data set, wherein samples in the model training data set are golden monkey pictures; Based on the GPT model and CLIP model, the description text corresponding to each sample is obtained according to the feature information in the golden monkey corpus and the model training data set to form a description text data set; Fine-tune the CLIP model based on the model training data set and the description text data set to obtain a fine-tuned CLIP model; Constructing a facial recognition model, the facial recognition model comprising the image encoder, MLP and classifier in the fine-tuned CLIP model; Training the facial recognition model based on the model training data set to obtain a trained facial recognition model; The golden monkey picture to be identified is input into the trained facial recognition model to obtain the golden monkey identification result.

2. The method according to claim 1, characterized in that in, Based on the GPT model and CLIP model, according to the feature information in the golden monkey corpus and the model training data set, the description text corresponding to each sample is obtained to form a description text data set; including: Get feature information from the golden monkey corpus; Inputting the feature information into the GPT model to obtain multiple description texts; Inputting the plurality of description texts and the sample into the CLIP model to obtain at least one description text matching the sample; The description texts corresponding to all samples constitute the description text dataset.

3. The method according to claim 1, characterized in that in, The facial recognition model is trained based on the model training data set to obtain a trained facial recognition model, and the loss function adopted is the Arcface loss function.

4. The method according to claim 1, characterized in that The image encoder in the fine-tuned CLIP model is a ViT model.

5. A golden monkey face recognition device based on a visual language model, characterized in that: include: A model training data set acquisition module is used to acquire a model training data set, wherein the samples in the model training data set are golden monkey pictures; The description text dataset acquisition module is used to obtain the description text corresponding to each sample based on the GPT model and the CLIP model, according to the feature information in the golden monkey corpus and the model training dataset, to form a description text dataset; A fine-tuning module, used for fine-tuning the CLIP model based on the model training data set and the description text data set to obtain a fine-tuned CLIP model; A model building module, used to build a facial recognition model, wherein the facial recognition model includes the image encoder, MLP and classifier in the fine-tuned CLIP model; A model training module, used to train the facial recognition model based on the model training data set to obtain a trained facial recognition model; The recognition module is used to input the golden monkey picture to be recognized into the trained facial recognition model to obtain the golden monkey recognition result.

6. The device according to claim 5, characterized in that The description text data set acquisition module is also used to Get feature information from the golden monkey corpus; Inputting the feature information into the GPT model to obtain multiple description texts; Inputting the plurality of description texts and the sample into the CLIP model to obtain at least one description text matching the sample; The description texts corresponding to all samples constitute the description text dataset.

7. The device according to claim 5, characterized in that in, The facial recognition model is trained based on the model training data set to obtain a trained facial recognition model, and the loss function adopted is the Arcface loss function.

8. The device according to claim 5, characterized in that The image encoder in the fine-tuned CLIP model is a ViT model.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the golden monkey face recognition method based on a visual language model according to any one of claims 1 to 4 is implemented.

10. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the golden monkey face recognition method based on a visual language model as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Golden monkey face image recognition method, device and equipment and storage medium

    CN111950362A

  • New golden-nosed monkey individual identification method

    CN115331134A

  • Using intrinsic multimodal features of image for domain generalized

    US20240153258A1