Photo relighting and background replacement based on machine learning models
Abstract
Apparatus and methods related to applying lighting models to images are provided. An example method includes receiving, via a computing device, an image comprising a subject. The method further includes relighting, via a neural network, a foreground of the image to maintain a consistent lighting of the foreground with a target illumination. The relighting is based on a per-pixel light representation indicative of a surface geometry of the foreground. The light representation includes a specular component, and a diffuse component, of surface reflection. The method additionally includes predicting, via the neural network, an output image comprising the subject in the relit foreground. One or more neural networks can be trained to perform one or more of the aforementioned aspects.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 12 · Forward citations: 0.
Claims (21 — 3 Independent, 18 Dependent)
- Claim 1Independent Claim
A computer-implemented method, comprising: receiving, by a computing device, an image comprising a subject; relighting, by a neural network, a foreground of the image to maintain a consistent lighting of the foreground with a target illumination, wherein the relighting is based on a per- pixel light representation indicative of a surface geometry of the foreground, and wherein the light representation comprises a specular component, and a diffuse component, of surface reflection, and wherein the relighting comprises: pre-filtering the target illumination to generate a plurality of candidate specular light maps, predicting, by a specular net of the neural network, a per-pixel weight image based on the plurality of candidate specular light maps, and generating a blended specular light map by taking a weighted sum of the plurality of candidate specular light maps using the per-pixel weight image; and predicting, by the neural network, an output image comprising the subject in a relit foreground.
- Claim 2Depends on #1
The computer-implemented method of claim 1, further comprising: predicting, via the neural network, a reflectance field indicative of an appearance of the subject.
- Claim 3Depends on #1
The computer-implemented method of claim 1, further comprising: predicting, via the neural network and based on the foreground and the surface geometry, a per-pixel albedo image.
- Claim 4Depends on #1
The computer-implemented method of claim 1, further comprising: pre-filtering the target illumination, wherein the pre-filtering is based on a convolved specular light map and a convolved diffuse light map, and wherein the specular component and the diffuse component of the surface reflection are determined by sampling the convolved specular light map and the convolved diffuse light map by using one or more of a surface normal or a reflection vector.
- Claim 5Depends on #1
The computer-implemented method of claim 1, further comprising: receiving, as input to the neural network, the plurality of candidate light maps, an albedo, and an initial foreground; and predicting, via the neural network, the specular component of the per-pixel lighting representation.
- Claim 6Depends on #5
The computer-implemented method of claim 5, wherein the relighting of the foreground further comprises: concatenating the specular component, the diffuse component, and the albedo; and predicting, via the neural network, the relighting of the foreground based on the concatenating.
- Claim 7Depends on #1
The computer-implemented method of claim 1, further comprising: estimating, via the neural network, the foreground of the image.
- Claim 8Depends on #7
The computer-implemented method of claim 7, wherein the estimating of the foreground comprises estimating an alpha matte.
- Claim 9Depends on #1
The computer-implemented method of claim 1, wherein the relighting of the foreground comprises inferring one or more of a low-frequency color or a shading under the target illumination.
- Claim 10Depends on #1
The computer-implemented method of claim 1, further comprising: predicting, via the neural network, a plurality of per-pixel surface normal representations.
- Claim 11Depends on #1
The computer-implemented method of claim 1, wherein an initial illumination associated with the image is different from the target illumination.
- Claim 12Depends on #1
The computer-implemented method of claim 1, wherein the target illumination is not based on controlled lighting.
- Claim 13Depends on #1
The computer-implemented method of claim 1, further comprising: identifying a target background, wherein the target illumination is associated with the target background, and wherein the predicting of the output image comprises compositing the relit foreground into the target background using an alpha matte.
- Claim 14Depends on #13
The computer-implemented method of claim 13, wherein the image comprises the subject in an initial background that is different from the target background.
- Claim 15Depends on #13
The computer-implemented method of claim 13, further comprising: receiving a second input image comprising a second subject in a second initial background; relighting a second foreground of the second image based on the target illumination; and compositing the relit foreground, the second relit foreground and the target background, and wherein the output image comprises the subject and the second subject in the target background.
- Claim 16Depends on #1
The computer-implemented method of claim 1, further comprising: training the neural network to receive a particular input image comprising a particular subject, and predict a particular output image comprising the particular subject in a relit foreground.
- Claim 17Depends on #16
The computer-implemented method of claim 16, wherein the training of the neural network comprises training a ground truth alpha matte generation model.
- Claim 18Depends on #1
The computer-implemented method of claim 1, wherein a training dataset comprises a plurality of images of subjects captured in a light stage computational illumination system, wherein the computational illumination system records one or more of: (i) a plurality of lighting conditions, (ii) a plurality of reflectance fields indicative of surface reflectance and surface geometry, or (iii) a plurality of alpha mattes.
- Claim 19Independent Claim
A computing device, comprising: one or more processors; and data storage, wherein the data storage has stored thereon computer-executable instructions that, when executed by the one or more processors, cause the computing device to carry out functions comprising: receiving, by the computing device, an image comprising a subject; relighting, by a neural network, a foreground of the image to maintain a consistent lighting of the foreground with a target illumination, wherein the relighting is based on a per-pixel light representation indicative of a surface geometry of the foreground, and wherein the light representation comprises a specular component, and a diffuse component, of surface reflection, and wherein the relighting comprises: pre-filtering the target illumination to generate a plurality of candidate specular light maps, predicting, by a specular net of the neural network, a per-pixel weight image based on the plurality of candidate specular light maps, and generating a blended specular light map by taking a weighted sum of the plurality of candidate specular light maps using the per-pixel weight image; and predicting, by the neural network, an output image comprising the subject in a relit foreground.
- Claim 20Independent Claim
An article of manufacture comprising one or more non-transitory computer readable media having computer-readable instructions stored thereon that, when executed by one or more processors of a computing device, cause the computing device to carry out functions comprising: receiving, by the computing device, an image comprising a subject; relighting, by a neural network, a foreground of the image to maintain a consistent lighting of the foreground with a target illumination, wherein the relighting is based on a per-pixel light representation indicative of a surface geometry of the foreground, and wherein the light representation comprises a specular component, and a diffuse component, of surface reflection, and wherein the relighting comprises: pre-filtering the target illumination to generate a plurality of candidate specular light maps, predicting, by a specular net of the neural network, a per-pixel weight image based on the plurality of candidate specular light maps, and generating a blended specular light map by taking a weighted sum of the plurality of candidate specular light maps using the per-pixel weight image; and predicting, by the neural network, an output image comprising the subject in a relit foreground.
- Claim 21Depends on #1
The computer-implemented method of claim 1, wherein each candidate specular light map corresponds to a different Phong exponent.
Technical Overview & Description
This application is a national stage application under 35 U.S.C. § 371 of International Application No. PCT/US2021/029634, filed Apr. 28, 2021, the disclosure of which is explicitly incorporated by reference herein in its entirety. BACKGROUND Many modern computing devices, including mobile phones, personal computers, and tablets, include image capture devices, such as still and/or video cameras. The image capture devices can capture images, such as images that include people, animals, landscapes, and/or objects. Some image capture devices and/or computing devices can correct or otherwise modify captured images. For example, some image capture devices can provide “ red-eye ” correction that removes artifacts such as red-appearing eyes of people and animals that may be present in images captured using bright lights, such as flash lighting. Also, for example, some image capture devices can provide image editing features such as relighting to modify the lighting in an image. After a captured image has been corrected and/or edited, the modified image can be saved, displayed, transmitted, printed to paper, and/or otherwise utilized. Compositing an individual into a background scene is a common practice, for example, in filmmaking, video conferencing. Such compositing is generally performed in controlled studio settings, and involves expert knowledge of the equipment, lighting, and so forth. Also, for example, compositing is sometimes based on a fixed background. In some instances, a foreground image may be superimposed onto different backgrounds. However, the foreground lighting is generally not consistent with the background lighting, and/or boundary details of objects in the foreground may be blurred, resulting in an unrealistic composition. Mobile phone users generally don't have access to such specialized studio resources, or knowledge of how to use these resources. However, users may prefer to have access to realistic, professional, and high-quality image relighting
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 (12)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (10)
- Wang, Zhibo, et al.
- “
- Single image portrait relighting via explicit multiple reflectance channel modeling.
- ”
- ACM Transactions on Graphics (ToG) 39.6 (2020): 1-13. (Year: 2020).
- International Searching Authority, International Search Report and Written Opinion mailed on Jan. 25, 2022, issued in connection with International Patent Application No. PCT/US2021/0296354, filed Apr. 28, 2021, 11 pages.
- Nestmeyer et al.,
- “
- Learning Physics
- —