A method for generating a three-dimensional face model, comprising: obtaining a two-dimensional face image; invoking a face model generation model; inputting the two-dimensional face image into the face model generation model; extracting, by using the face model generation model, global features and local features of the two-dimensional face image, wherein the global features are all features obtained by performing feature extraction on the two-dimensional face image, and characterize an entire region of the two-dimensional face image, the local features are obtained by performing feature extraction on local regions of the two-dimensional face image, and characterize the local regions of the two-dimensional face image; obtaining, by using the face model generation model, a three-dimensional face model parameter based on the global features and the local features; and outputting, by using the face model generation model, a three-dimensional face model corresponding to the two-dimensional face image based on the three-dimensional face model parameter, wherein the extracting the global features and the local features of the two-dimensional face image comprises: performing feature extraction on the two-dimensional face image based on a plurality of convolutional layers, to obtain the global features of the two-dimensional face image; obtaining a central position of landmarks of the two-dimensional face image; and extracting, based on the central position, partial features as the local features of the two-dimensional face image from features obtained by at least one target convolutional layer among the plurality of convolutional layers, comprising: obtaining, from a feature map obtained by each of the at least one target convolutional layer, a feature map of a target size corresponding to the target convolutional layer as the local features of the two-dimensional face image by using the central position as a center. obtaining a two-dimensional face image; invoking a face model generation model; inputting the two-dimensional face image into the face model generation model; extracting, by using the face model generation model, global features and local features of the two-dimensional face image, wherein the global features are all features obtained by performing feature extraction on the two-dimensional face image, and characterize an entire region of the two-dimensional face image, the local features are obtained by performing feature extraction on local regions of the two-dimensional face image, and characterize the local regions of the two-dimensional face image; obtaining, by using the face model generation model, a three-dimensional face model parameter based on the global features and the local features; and outputting, by using the face model generation model, a three-dimensional face model corresponding to the two-dimensional face image based on the three-dimensional face model parameter, wherein the extracting the global features and the local features of the two-dimensional face image comprises: performing feature extraction on the two-dimensional face image based on a plurality of convolutional layers, to obtain the global features of the two-dimensional face image; obtaining a central position of landmarks of the two-dimensional face image; and extracting, based on the central position, partial features as the local features of the two-dimensional face image from features obtained by at least one target convolutional layer among the plurality of convolutional layers, comprising: obtaining, from a feature map obtained by each of the at least one target convolutional layer, a feature map of a target size corresponding to the target convolutional layer as the local features of the two-dimensional face image by using the central position as a center. performing feature extraction on the two-dimensional face image based on a plurality of convolutional layers, to obtain the global features of the two-dimensional face image; obtaining a central position of landmarks of the two-dimensional face image; and extracting, based on the central position, partial features as the local features of the two-dimensional face image from features obtained by at least one target convolutional layer among the plurality of convolutional layers, comprising: obtaining, from a feature map obtained by each of the at least one target convolutional layer, a feature map of a target size corresponding to the target convolutional layer as the local features of the two-dimensional face image by using the central position as a center.