This application provides a method, apparatus, device, and storage medium for training a
deep learning model for face recognition. The method includes: inputting a face
sample image into a dual-
branch basic unit; extracting a first feature map and a second feature map using a first
branch and a second
branch respectively; concatenating the first and second feature maps to obtain a transformed feature map;
processing the feature map output from the target stage in the
backbone network to obtain a
feature vector for each target stage; aggregating the feature vectors to obtain a target
feature vector; determining the angle between the target
feature vector and the class center of each face category; determining an additive margin parameter based on the number of samples corresponding to the face category in the face
sample image and the maximum number of samples in the largest category; inputting the angle and the additive margin parameter into a
loss function to calculate the loss value; and training the face recognition
deep learning model using the loss value. This application improves the accuracy and performance of the face recognition model.