A method for training an image processing model, executed by an electronic device, the method comprising: obtaining a predicted recognition result of a first sample face image and first occlusion indication information based on an image processing model, the first occlusion indication information being used for indicating an image feature of a face occlusion area of the first sample face image, the first sample face image being an image including a face; obtaining a recognition error based on the predicted recognition result and a true recognition result corresponding to the first sample face image; obtaining a classification error based on the first occlusion indication information and a true occlusion pattern corresponding to the first sample face image, the true occlusion pattern corresponding to the first sample face image being used for indicating a position and a size of the face occlusion area in the first sample face image; and updating a model parameter of the image processing model according to the recognition error and the classification error; wherein the obtaining a classification error based on the first occlusion indication information and a true occlusion pattern corresponding to the first sample face image comprises: determining a predicted occlusion pattern of the first sample face image based on the first occlusion indication information; and obtaining the classification error based on the predicted occlusion pattern and the true occlusion pattern, characterized in that the obtaining a predicted recognition result of a first sample face image and first occlusion indication information based on an image processing model comprises: obtaining a first overall image feature of the first sample face image and the first occlusion indication information corresponding to the first overall image feature based on the image processing model; and performing face recognition based on the first overall image feature and the first occlusion indication information to obtain the predicted recognition result of the first sample face image. obtaining a predicted recognition result of a first sample face image and first occlusion indication information based on an image processing model, the first occlusion indication information being used for indicating an image feature of a face occlusion area of the first sample face image, the first sample face image being an image including a face; obtaining a recognition error based on the predicted recognition result and a true recognition result corresponding to the first sample face image; obtaining a classification error based on the first occlusion indication information and a true occlusion pattern corresponding to the first sample face image, the true occlusion pattern corresponding to the first sample face image being used for indicating a position and a size of the face occlusion area in the first sample face image; and updating a model parameter of the image processing model according to the recognition error and the classification error; wherein the obtaining a classification error based on the first occlusion indication information and a true occlusion pattern corresponding to the first sample face image comprises: determining a predicted occlusion pattern of the first sample face image based on the first occlusion indication information; and obtaining the classification error based on the predicted occlusion pattern and the true occlusion pattern, characterized in that the obtaining a predicted recognition result of a first sample face image and first occlusion indication information based on an image processing model comprises: obtaining a first overall image feature of the first sample face image and the first occlusion indication information corresponding to the first overall image feature based on the image processing model; and performing face recognition based on the first overall image feature and the first occlusion indication information to obtain the predicted recognition result of the first sample face image. obtaining a first overall image feature of the first sample face image and the first occlusion indication information corresponding to the first overall image feature based on the image processing model; and performing face recognition based on the first overall image feature and the first occlusion indication information to obtain the predicted recognition result of the first sample face image.