An image processing method that is performed by a terminal, comprising: obtaining a trained pixel classification model that is used for determining a classification identifier of each pixel in any image, the classification identifier at least including a head classification identifier that is used for indicating that a corresponding pixel is located in a head region; classifying each pixel in a target image based on the pixel classification model to obtain a classification identifier of the pixel in the target image; and determining a head region in the target image according to a head classification identifier in the classification identifier, and editing the head region, wherein before classifying each pixel in the target image based on the pixel classification model to obtain the classification identifier of the pixel in the target image, the method further comprises: performing face detection on the target image to obtain a face region in the target image; obtaining a trained expression recognition model; performing recognition on the face region based on the expression recognition model to obtain an expression class of the face region; and performing the operation of classifying each pixel in the target image based on the pixel classification model when the expression class of the face region is a target expression class, wherein each pixel in the target image is classified to determine the head region in the target image. obtaining a trained pixel classification model that is used for determining a classification identifier of each pixel in any image, the classification identifier at least including a head classification identifier that is used for indicating that a corresponding pixel is located in a head region; classifying each pixel in a target image based on the pixel classification model to obtain a classification identifier of the pixel in the target image; and determining a head region in the target image according to a head classification identifier in the classification identifier, and editing the head region, wherein before classifying each pixel in the target image based on the pixel classification model to obtain the classification identifier of the pixel in the target image, the method further comprises: performing face detection on the target image to obtain a face region in the target image; obtaining a trained expression recognition model; performing recognition on the face region based on the expression recognition model to obtain an expression class of the face region; and performing the operation of classifying each pixel in the target image based on the pixel classification model when the expression class of the face region is a target expression class, wherein each pixel in the target image is classified to determine the head region in the target image. performing face detection on the target image to obtain a face region in the target image; obtaining a trained expression recognition model; performing recognition on the face region based on the expression recognition model to obtain an expression class of the face region; and performing the operation of classifying each pixel in the target image based on the pixel classification model when the expression class of the face region is a target expression class, wherein each pixel in the target image is classified to determine the head region in the target image.