Method for training image processing model, image processing method, apparatus, electronic device, and computer program product
Abstract
A method for training an image processing model includes: acquiring a to-be-corrected eye image set matching a usage environment of the image processing model; performing style transfer on to-be-corrected eye images in the to-be-corrected eye image set through a style transfer network in the image processing model, to obtain a target eye image; acquiring a training sample matching the usage environment of the image processing model based on the to-be-corrected eye images and the target eye image, the training sample including object eye images matching different gaze positions; and training a correction network in the image processing model through the training sample matching the usage environment of the image processing model, to obtain a model update parameter matching the correction network, and generating a trained image processing model based on the model update parameter.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 14 · Forward citations: 0.
Claims (16 — 3 Independent, 13 Dependent)
- Claim 1Independent Claim
A method for training an image processing model, applied to an electronic device, the method comprising: acquiring an eye image set matching a usage environment of the image processing model, the usage environment of the image processing model comprising at least one of: an image capture device, an image acquisition angle, or an image resolution; performing style transfer on eye images in the eye image set through a style transfer network comprised in the image processing model, to obtain a target eye image, the performing the style transfer on the eye image to obtain the target eye image comprising: determining a model parameter of a reference style transfer network corresponding to the usage environment of the image processing model based on the usage environment of the image processing model; adjusting a model parameter of the style transfer network comprised in the image processing model based on the model parameter of the reference style transfer network; and performing style transfer on the eye images in the eye image set through the adjusted style transfer network, to obtain the target eye image, a style feature of the target eye image matching a gaze position of a target object; acquiring a training sample matching the usage environment of the image processing model based on the eye images and the target eye image, the training sample comprising object eye images matching different gaze positions; training a correction network comprised in the image processing model through the training sample matching the usage environment of the image processing model, to obtain a model update parameter matching the correction network; and generating a trained image processing model based on the model update parameter.
- Claim 2Depends on #1
The method according to claim 1, wherein acquiring the eye image set matching the usage environment of the image processing model comprises: acquiring face images captured by a capture device; performing image augmentation on the face images to obtain a processing result of the image augmentation; determining face position coordinates in the processing result of the image augmentation, and intercepting face images comprising a complete eye image based on the face position coordinates; performing depth processing on the face images comprising the complete eye image through a depth processing network comprised in the image processing model, to obtain depth maps of the face images; and using the depth maps as first eye images matching the usage environment of the image processing model, the training sample comprising the first eye images.
- Claim 3Depends on #1
The method according to claim 1, wherein training the correction network comprised in the image processing model through the training sample matching the usage environment of the image processing model, to obtain the model update parameter matching the correction network comprises: processing the training sample through a coder and a decoder of the correction network comprised in the image processing model, to obtain initial parameters of the coder and the decoder of the correction network; processing the training sample based on the initial parameters of the coder and the decoder of the correction network, to obtain update parameters of the coder and the decoder of the correction network; and iteratively updating the parameters of the coder and the decoder of the correction network based on the update parameters of the coder and the decoder of the correction network through a training sample set, to obtain model update parameters of the coder and the decoder matching the correction network.
- Claim 4Depends on #3
The method according to claim 3, wherein processing the training sample based on the initial parameters of the coder and the decoder of the correction network, to obtain the update parameters of the coder and the decoder of the correction network comprises: substituting the training sample into loss functions corresponding to the coder and the decoder of the correction network; and determining that the coder and the decoder of the correction network correspond to the update parameters when the loss functions satisfy a corresponding convergence condition.
- Claim 5Depends on #1
The method according to claim 1, further comprising: acquiring a face image captured by a capture device and performing random augmentation on the face image; performing random distortion on the face image after the random augmentation to obtain a distorted face image; and intercepting an eye image in the distorted face image, and scaling the intercepted eye image to obtain an eye image in the eye image set, the obtained eye image matching an input resolution supported by a coder in the image processing model.
- Claim 6Depends on #5
The method according to claim 5, wherein performing the random augmentation on the face image comprises: performing random rotation around a center of the face image; performing random scaling on the face image after the random rotation; and performing random translation on the face image after the random scaling.
- Claim 7Depends on #5
The method according to claim 5, wherein performing the random distortion on the face image after the random augmentation comprises: inserting noise into the face image after the random augmentation, the noise comprising at least one of fixed noise or dynamic noise.
- Claim 8Depends on #1
The method according to claim 1, further comprising: acquiring a face image of a target object; determining a first eye image to be corrected based on the face image of the target object, the first eye image comprising a left eye image and a right eye image of the target object; correcting the first eye image through the image processing model, to obtain a corrected eye image; and replacing the first eye image in the face image with the corrected eye image.
- Claim 9Depends on #8
The method according to claim 8, further comprising: presenting an eye image correction function item on a human-computer interaction interface; acquiring and presenting a first eye image comprising the target object in response to a trigger operation on the eye image correction function item; and generating and presenting a target eye image of a target eye image template in response to a transform determination operation triggered based on the first eye image, the target eye image of the target eye image template being an image generated by replacing an eye part in the target eye image template with an eye part in the first eye image.
- Claim 10Independent Claim
An electronic device, comprising: a memory, configured to store executable instructions; and a processor, configured to implement, when executing the executable instructions stored in the memory, a method for training an image processing model, the method comprising: acquiring an eye image set matching a usage environment of the image processing model, the usage environment of the image processing model comprising at least one of: an image capture device, an image acquisition angle, or an image resolution; performing style transfer on eye images in the eye image set through a style transfer network comprised in the image processing model, to obtain a target eye image, the performing the style transfer on the eye image to obtain the target eye image comprising: determining a model parameter of a reference style transfer network corresponding to the usage environment of the image processing model based on the usage environment of the image processing model; adjusting a model parameter of the style transfer network comprised in the image processing model based on the model parameter of the reference style transfer network; and performing style transfer on the eye images in the eye image set through the adjusted style transfer network, to obtain the target eye image, a style feature of the target eye image matching a gaze position of a target object; acquiring a training sample matching the usage environment of the image processing model based on the eye images and the target eye image, the training sample comprising object eye images matching different gaze positions; and training a correction network comprised in the image processing model through the training sample matching the usage environment of the image processing model, to obtain a model update parameter matching the correction network, and generating a trained image processing model based on the model update parameter.
- Claim 11Depends on #10
The electronic device according to claim 10, wherein acquiring the eye image set matching the usage environment of the image processing model comprises: acquiring face images captured by a capture device; performing image augmentation on the face images to obtain a processing result of the image augmentation; determining face position coordinates in the processing result of the image augmentation, and intercepting face images comprising a complete eye image based on the face position coordinates; performing depth processing on the face images comprising the complete eye image through a depth processing network comprised in the image processing model, to obtain depth maps of the face images; and using the depth maps as first eye images matching the usage environment of the image processing model, the training sample comprising the first eye images.
- Claim 12Depends on #10
The electronic device according to claim 10, wherein training the correction network comprised in the image processing model through the training sample comprises: processing the training sample through a coder and a decoder of the correction network comprised in the image processing model, to obtain initial parameters of the coder and the decoder of the correction network; processing the training sample based on the initial parameters of the coder and the decoder of the correction network, to obtain update parameters of the coder and the decoder of the correction network; and iteratively updating the parameters of the coder and the decoder of the correction network based on the update parameters of the coder and the decoder of the correction network through a training sample set, to obtain model update parameters of the coder and the decoder matching the correction network.
- Claim 13Independent Claim
A non-transitory computer-readable storage medium, storing executable instructions, the executable instructions, when executed by a processor, implementing a method for training an image processing model, the method comprising: acquiring an eye image set matching a usage environment of the image processing model, the usage environment of the image processing model comprising at least one of: an image capture device, an image acquisition angle, or an image resolution; performing style transfer on eye images in the eye image set through a style transfer network comprised in the image processing model, to obtain a target eye image, the performing the style transfer on the eye image to obtain the target eye image comprising: determining a model parameter of a reference style transfer network corresponding to the usage environment of the image processing model based on the usage environment of the image processing model; adjusting a model parameter of the style transfer network comprised in the image processing model based on the model parameter of the reference style transfer network; and performing style transfer on the eye images in the eye image set through the adjusted style transfer network, to obtain the target eye image, a style feature of the target eye image matching a gaze position of a target object; acquiring a training sample matching the usage environment of the image processing model based on the eye images and the target eye image, the training sample comprising object eye images matching different gaze positions; and training a correction network comprised in the image processing model through the training sample matching the usage environment of the image processing model, to obtain a model update parameter matching the correction network, and generating a trained image processing model based on the model update parameter.
- Claim 14Depends on #13
The storage medium according to claim 13, wherein acquiring the eye image set matching the usage environment of the image processing model comprises: acquiring face images captured by a capture device; performing image augmentation on the face images to obtain a processing result of the image augmentation; determining face position coordinates in the processing result of the image augmentation, and intercepting face images comprising a complete eye image based on the face position coordinates; performing depth processing on the face images comprising the complete eye image through a depth processing network comprised in the image processing model, to obtain depth maps of the face images; and using the depth maps as first eye images matching the usage environment of the image processing model, the training sample comprising the first eye images.
- Claim 15Depends on #13
The storage medium according to claim 13, wherein training the correction network comprised in the image processing model through the training sample matching the usage environment of the image processing model, to obtain the model update parameter matching the correction network comprises: processing the training sample through a coder and a decoder of the correction network comprised in the image processing model, to obtain initial parameters of the coder and the decoder of the correction network; processing the training sample based on the initial parameters of the coder and the decoder of the correction network, to obtain update parameters of the coder and the decoder of the correction network; and iteratively updating the parameters of the coder and the decoder of the correction network based on the update parameters of the coder and the decoder of the correction network through a training sample set, to obtain model update parameters of the coder and the decoder matching the correction network.
- Claim 16Depends on #15
The storage medium according to claim 15, wherein processing the training sample based on the initial parameters of the coder and the decoder of the correction network, to obtain the update parameters of the coder and the decoder of the correction network comprises: substituting the training sample into loss functions corresponding to the coder and the decoder of the correction network; and determining that the coder and the decoder of the correction network correspond to the update parameters when the loss functions satisfy a corresponding convergence condition.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation application of PCT Patent Application No. PCT/CN2021/140902, filed on Dec. 23, 2021, which claim priority to Chinese patent application No. 202110014666.2, filed on Jan. 6, 2021, the entire content of all of which is incorporated herein by reference in their entirety. FIELD OF THE TECHNOLOGY The present disclosure relates to image processing technologies and, in particular, to a method for training an image processing model, an image processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. BACKGROUND OF THE DISCLOSURE During video processing, gaze correction includes processing pictures containing eyes of objects (such as real people, animals, or cartoon characters), which can change the gaze direction of the eyes in a video. In an example that the objects are real people, gaze correction has practical value and broad prospects in communication scenarios such as video calls. However, due to the large variations in size, resolution, viewing angle, lighting, texture, and occlusion during capture of images or videos including eyes, the images rendered based on 3D modeling are usually significantly different from the real eye images in terms of texture and material, and lack naturalness. In addition, gaze correction using 3D devices requires high hardware costs. Further, gaze correction through a deep neural network requires a large number of training samples, which requires sample collection and labeling. Therefore, the model training efficiency is relatively low, resulting in large consumption of related computing resources. SUMMARY Embodiments of the present disclosure provide a method for training an image processing model, an image processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product, to improve efficiency of training an image processing model while ensuring
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (14)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (10)
- The World Intellectual Property Organization (WIPO) International Search Report for PCT/CN2021/140902 Mar. 1, 2022 6 Pages (including translation).
- The Japan Patent Office (JPO) Notification of Reasons for Refusal for Application No. 2023-521165 and Translation Apr. 8, 2024 11 Pages.
- Harsimran Kaur et al.,
- “
- Subject guided eye image synthesis with application to gaze redirection.
- ”
- Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2021.
- Takuya Inoue et al.
- “
- Image Synthesis of Eye Areas for Perceptually Establishing Eye-contacts between Video Conference Participants.