Facebook Patent | Systems And Methods For Generating And Transmitting Image Sequences Based On Sampled Color Information

Patent: Systems And Methods For Generating And Transmitting Image Sequences Based On Sampled Color Information

Publication Number: 20200098139

Publication Date: 20200326

Applicants: Facebook

Abstract

In one embodiment, a method for generating completed frames from sparse data may access sample datasets associated with a sequence of frames, respectively. Each sample dataset may comprise incomplete pixel information of the associated frame. The system may generate, using a first machine-learning model, the sequence of frames, each having complete pixel information, based on the sample datasets. The first machine-learning model is configured to retain spatio-temporal representations associated with the generated frames. The system may then access a next sample dataset comprising incomplete pixel information of a next frame after the sequence of frames. The system may generate, using the first machine-learning model, the next frame based on the next sample dataset. The next frame has complete pixel information comprising the incomplete pixel information of the next sample dataset and additional pixel information generated based on the next sample dataset and the spatio-temporal representations retained by the model.

PRIORITY

[0001] This application claims the benefit, under 35 U.S.C. .sctn. 119(e), of U.S. Provisional Patent Application No. 62/736,991, filed 26 Sep. 2018, which is incorporated herein by reference.

TECHNICAL FIELD

[0002] This disclosure generally relates to machine-learning, computer graphics, and image compression.

BACKGROUND

[0003] “Computer graphics” refers to computer-generated image data (including still images and videos) created using graphics hardware and software. Computer graphics, especially ones with high-resolution and/or high-frame-rate, are computationally costly to generate. For example, to generate a single image with 1920.times.1080 resolution means that the colors of more than 2 million pixels need to be determined. To generate a video with 60 frames-per-second (fps), the number of pixels needed every second quickly approaches 125 million. Moreover, typical 3-dimensional (3D) computer graphics are rendered by applying physics-based rendering models (e.g., ray tracing or ray casting techniques) on 3D models of virtual environments. The complexity of the 3D models, as well as the complexity of the physics-based rendering models, add to the rendering cost. In addition, in certain applications, the fully rendered images may need to undergo post-processing to create the desired visual effects (e.g., blurring), which further adds to the overall computational cost.

[0004] In addition to computational costs, the size of image data can also be taxing on system resources, regardless of whether the image data is computer-generated or recorded by cameras or other devices (e.g., such as movies or video clips streamed online or transmitted via a peer-to-peer connection). For example, a high-resolution image could easily exceed 10 megabytes and a high-frame-rate video that is a few minutes long could be measured in gigabytes. Thus, even for images or videos that are pre-generated (e.g., pre-generated computer graphics or pre-recorded images or videos captured using cameras), which impose less real-time computational constraints, their file sizes could still present a technical bottleneck, especially when it comes to data transmission (e.g., over the Internet, cellular data, short-range wireless communication, etc.).

[0005] As such, depending on the particular application in which computer graphics are needed, the high computational cost for generating and/or transferring the image data often restrict the level of image quality that can be used in practice. For example, in real-time applications (e.g., 360-degree videos and panoramas, gaming, virtual reality, or augmented reality) or applications where the computing environment has limited system resources (e.g., processing power, memory, storage, or transmission bandwidth), image quality may need to be sacrificed in order to meet the runtime requirements of those applications.

BRIEF DESCRIPTION OF THE DRAWINGS

[0006] FIG. 1 provides a simplified diagram showing the discrepancy of a person’s visual acuity over his field of view.

[0007] FIG. 2A illustrates the concept of foveated compression.

[0008] FIG. 2B illustrates an example of image sampling within a scene that takes advantage of a viewer’s foveated vision, in accordance with particular embodiments.

[0009] FIGS. 3A-B illustrate an example where image sampling per video frame may be further reduced due to the availability of spatial data across a sequence of frames, in accordance with particular embodiments.

[0010] FIG. 4 illustrates an example of an image and a corresponding sampling dataset, along with a visual depiction of their space-time data.

[0011] FIG. 5 illustrates an example sampling dataset that includes RGB pixel samples and a binary mask indicating their locations.

[0012] FIG. 6 illustrates an example training configuration for a generative adversarial network, in accordance with particular embodiments.

[0013] FIGS. 7A-D illustrate example components of a generator machine-learning model, in accordance with particular embodiments.

[0014] FIGS. 8A-C illustrate example components of a discriminator machine-learning model, in accordance with particular embodiments.

[0015] FIG. 9 illustrates an example method for generating completed images from sample datasets using the trained generator machine-learning model, in accordance with particular embodiments.

[0016] FIG. 10 illustrates an example network environment associated with a social-networking system.

[0017] FIG. 11 illustrates an example computer system.

SUMMARY OF PARTICULAR EMBODIMENTS

[0018] Embodiments described herein relate to a machine-learning approach for generating and/or compressing and reconstructing perceptively-accurate images (e.g., including video frames) based on a sequence of video frames with incomplete pixel information (e.g., sparse sample datasets of pixel color). Since perceptively-accurate images can be generated from sparse sample datasets using machine learning, the computationally more expensive rendering pipeline (e.g., using ray tracing, ray casting, or other physics-based computer-graphics techniques) may only be needed for a sparse subset of the total pixels in the image. As such, the embodiments described herein significantly reduce the overall computational cost, time, and system resources needed to generate images. In addition, since complete images can be reconstructed from their sample datasets using the embodiments descried herein, applications that need to transmit image data may transmit the corresponding sample datasets rather than complete pixel information, thereby significantly reducing transmission costs. As an example, experiments have shown that the embodiments described herein can reduce rendering cost and transmission bandwidth by roughly two orders of magnitude.

[0019] Embodiments of the invention may include or be implemented in conjunction with an artificial reality system. Artificial reality is a form of reality that has been adjusted in some manner before presentation to a user, which may include, e.g., a virtual reality (VR), an augmented reality (AR), a mixed reality (MR), a hybrid reality, or some combination and/or derivatives thereof. Artificial reality content may include completely generated content or generated content combined with captured content (e.g., real-world photographs). The artificial reality content may include video, audio, haptic feedback, or some combination thereof, and any of which may be presented in a single channel or in multiple channels (such as stereo video that produces a three-dimensional effect to the viewer). Additionally, in some embodiments, artificial reality may be associated with applications, products, accessories, services, or some combination thereof, that are, e.g., used to create content in an artificial reality and/or used in (e.g., perform activities in) an artificial reality. The artificial reality system that provides the artificial reality content may be implemented on various platforms, including a head-mounted display (HMD) connected to a host computer system, a standalone HMD, a mobile device or computing system, or any other hardware platform capable of providing artificial reality content to one or more viewers.

[0020] The embodiments disclosed herein are only examples, and the scope of this disclosure is not limited to them. Particular embodiments may include all, some, or none of the components, elements, features, functions, operations, or steps of the embodiments disclosed above. Embodiments according to the invention are in particular disclosed in the attached claims directed to a method, a storage medium, a system and a computer program product, wherein any feature mentioned in one claim category, e.g. method, can be claimed in another claim category, e.g. system, as well. The dependencies or references back in the attached claims are chosen for formal reasons only. However, any subject matter resulting from a deliberate reference back to any previous claims (in particular multiple dependencies) can be claimed as well, so that any combination of claims and the features thereof are disclosed and can be claimed regardless of the dependencies chosen in the attached claims. The subject-matter which can be claimed comprises not only the combinations of features as set out in the attached claims but also any other combination of features in the claims, wherein each feature mentioned in the claims can be combined with any other feature or combination of other features in the claims. Furthermore, any of the embodiments and features described or depicted herein can be claimed in a separate claim and/or in any combination with any embodiment or feature described or depicted herein or with any of the features of the attached claims.

DESCRIPTION OF EXAMPLE EMBODIMENTS

[0021] Rendering and/or transmitting high-resolution and high-frame-rate videos is a costly process. To ameliorate that cost, embodiments described herein enable applications to render/transmit only a small subset of the pixels in a video according to the visual acuity of humans and generate/reconstruct the complete video using neural networks.

[0022] Particular embodiments take advantage of the visual acuity of humans. FIG. 1 provides a simplified diagram showing the discrepancy of a person’s 101 visual acuity over his field of view 150. In this diagram, the center region 110 represents the person’s 101 fovea view. The visual acuity of the person 101 decays farther away from the fovea view 110. For example, the person’s 101 visual acuity in the neighboring regions 120 and 121 is less than that of the fovea view 110, and the visual acuity in regions 130 and 131 is worse still.

[0023] Observing that the acuity of the human visual system rapidly decays towards his/her peripheral vision, embodiments described herein are designed to render/transmit high pixel densities in the fovea view, while progressively and dramatically subsampling (referred to as “corruption”) the spatio-temporal pixel volume in regions extending into the periphery. In doing so, the techniques described herein may significantly improve the time needed for generating and/or transmitting video frames. For example, in particular embodiments, rather than using traditional graphics pipelines to render every pixel of every frame, embodiments described herein allows rendering systems to generate a portion of the pixels using the more expensive rendering process (with higher concentration in the foveal region) and generate the rest using a machine-learning model (with higher concentration outside of the foveal region) that is computationally less expensive. In other embodiments, when transmitting videos, a transmitter may sample a portion of the original video frames based on the viewer’s foveal region (e.g., pixels closer to the foveal region are more densely sampled than pixels farther away from the foveal region) and transmit only those samples to avoid having to transmit every pixel of the video. On the recipient device, the sparse pixel information received from the transmitter may be used to reconstruct the full video frame using a machine-learning model.

[0024] FIGS. 2A and 2B illustrate the concept of foveated rendering and/or compression. FIG. 2A illustrates a scene 200 that is captured from or to be rendered for a particular viewpoint. The scene 200 contains a person 210 in the center of the viewpoint, a dog 220 to the left of the viewpoint, and a cat 230 to the right of the viewpoint. The dotted concentric circles are used to visually delineate the viewer’s visual acuity. The region 201 within the smallest circle represents the foveal view of the viewer; the region 202 between the two circles represents a portion of the viewer’s view that is farther from the foveal view; and the region 203 outside of the larger circle represents a portion of the viewer’s view that is even farther from the foveal view.

[0025] FIG. 2B illustrates an example of image subsampling within the scene 200 that takes advantage of the viewer’s foveated vision. In FIG. 2B, subsample locations are visually represented by the dotted squares (e.g., 299a, 299b, and 299c). As used herein, the term “subsampling” refers to the process of determining the color information for particular pixels (or sampling locations), which may be done by, for example, extracting pixel information from an existing image/frame (e.g., a pre-recorded movie or video clip) or rendering pixels of interest based on a 3D model via computer-graphics rendering. In particular embodiments, the density of the subsamples may directly correlate with the visual acuity of the viewer. For example, since the viewer’s foveal view is centered at region 201, subsampling may be highly dense within that region 201. For regions that are farther away from the center of the foveal view of the viewer, progressively fewer or less dense subsamples may be obtained. For example, in FIG. 2B, the subsamples within region 202 are less dense than those within region 201 but denser than those within region 203. Since the visual acuity of the viewer is low in the periphery, having less subsample density in such regions would have minimal effect on the viewer’s viewing experience. As will be described in further detail below, for areas where no subsamples are obtained, a machine-learning model may be used to approximate their color information. Since the viewer would not be able to see clearly in the periphery due to biological or lensing limitations anyway, having lower quality or less accurate color information in the corresponding image would not significantly impact, if at all, the viewer’s viewing experience. This allows a graphics rendering system, for example, to selectively render pixels based on the viewpoint of the viewer (e.g., the foveal view may be assumed to be in the center or detected by an eye-tracking device) and avoid having to render a complete image or frame, thereby saving significant computational resources and time. Similarly, a video transmission application (e.g., such as a video-streaming service or a video-sharing application on a mobile device) may selectively transmit a portion of the pixels based on the viewpoint of the viewer and have the rest of the pixels reconstructed on the recipient device to avoid transmitting every pixel in the video sequence.

[0026] As mentioned above, the missing or unsampled portions of an image, such as a frame in a sequence of video frames, may be reconstructed using a machine-learning model. The machine-learning model may reconstruct the missing information based on the subsamples available for the current frame (the collection of subsamples for an image may be referred to as a sample dataset of that frame). In addition, particular embodiments of the machine-learning model may also retain spatio-temporal information of the scene from previous frames processed by the machine-learning model. Spatio-temporal information from previous frames is a good source of information for reconstructing the current frame because video sequences exhibit high redundancy in space and particularly over time. Thus, if the subsamples from previous frames are at different locations (e.g., randomly or pseudo-randomly sampled) and/or the scene has changed slightly between frames, the aggregate spatio-temporal information overtime would help the machine-learning model reconstructing missing pixel information for the current frame.

[0027] FIGS. 3A-B illustrate an example where image sampling per video frame may be further reduced due to the availability of spatial data across a sequence of frames, in accordance with particular embodiments. FIG. 3A illustrates a scene 300 that contains a person 310, a dog 320 on the left, and a cat 330 on the right, similar to the one 200 shown in FIGS. 2A-B. In a similar manner, region 301 within the smallest circle represents the foveal view of the viewer; the region 302 between the two concentric circles represents a portion of the viewer’s view that is farther from the foveal view; and the region 303 outside of the larger circle represents a portion of the viewer’s view that is even farther from the foveal view. Subsample locations (e.g., 399a, 399b, and 399c) are visually represented by the dotted squares. In FIG. 3A, the subsamples are the densest within region 301, less dense in region 302, and the least dense in region 303.

[0028] FIG. 3B illustrates another scene 350 in a sequence of scenes that comprises the one 300 shown in FIG. 3A. As an example, the scene 300 shown in FIG. 3A may temporally precede the scene 350 FIG. 3B. Compared to scene 300 in FIG. 3A, the dog 320 and cat 330 in scene 350 have moved closer to the person 310 and forward towards the viewpoint. Despite these changes, the two scenes 300 and 350 contains redundant information. For example, the person 310 in both scenes 310 and 350 remained in place and may appear identical. Although the dog 320 and cat 330 moved between scenes, their appearance information is still captured in both scenes. As such, a machine-learning model in accordance with particular embodiments may be trained to use sample datasets from both scenes 300 and 350 to reconstruct any missing pixel information for a particular frame. Since the machine-learning model could obtain information from the sample datasets associated with multiple scenes, the sample dataset for each of the scene may be sparser than what would otherwise be needed. For example, compared to FIG. 2B, the subsample in FIGS. 3A and 3B are less dense. In particular embodiments, to improve coverage of different areas or objects within the scene, the subsample locations may vary from scene to scene. For example, the subsample locations for scene 350 (e.g., 399x, 399y, 399z) are different from the subsample locations for scene 300. While the example shown in FIGS. 3A-B shows objects in the scene changing positions, the same principle described above would apply equally to scene changes that are due to changes in the viewer’s viewpoint (e.g., the viewer may be moving) or a combination of changes in the viewer’s viewpoint and changes in object positions.

[0029] FIG. 4 illustrates an example of an image 410 and a visual representation of a corresponding sampling dataset 420, along with a visual depiction of their space-time data 430 and 440, respectively. In the example shown, the image 410, which may be a frame in a video sequence, contains high pixel density throughout the image. The sampling dataset 420 is generated based on subsampling of the pixels in image 410 (the sampling dataset 420 may also be referred to as a corruption of the image 410). The visual representation of the sampling dataset 420 contains color information of pixels that have been sampled, with unsampled regions painted black. The light-colored dots shown in the visual representation 420 correspond to light-colored pixels in image 410 that are in high contrast with the black unsampled regions. Dark-colored pixels may not be easily distinguishable in this particular visual representation 420 because the unsampled regions are painted black, but nevertheless, the dark-colored pixels have been sampled and exist in the sampling dataset 420. In this example, the viewer’s foveal region is centered in image 410, and consequently, the subsampling in the center region is denser, as represented by the denser pattern of dots in the center region of sampling dataset 420. The density of the dots gets progressively sparser in regions farther away from the center.

[0030] As discussed above, video sequences typically exhibit high redundancy in space and particularly over time. Image 430 illustrates this by plotting the pixels across a horizontal line of the scene shown in image 410 over time (the vertical axis). The seemingly elongated, albeit distorted, color information across time provides a visual indication that the same pixel information is available across different times. The corresponding sampling dataset 440 for the image 430 shows that the subsample locations, when aggregated over time, provide adequate sampling coverage of each spatial region. By leveraging the redundant information encoded within a sequence of frames, subsamples–even when sparse–provide sufficient information for a machine-learning model to reconstruction or in-paint the missing video content in such a way that the reconstruction appears plausible to indistinguishable when observed under peripheral vision.

[0031] Efficiency is a desirable feature of the reconstruction algorithm used by the machine-learning model. In particular, the execution of the algorithm should significantly save computation and power compared to the naive solution of rendering/transmitting the full video content. Rendering full video content means that each pixel of each video frame needs to be rendered (e.g., via ray tracing visibility tests, shading, etc.) and transmitting full video content means that every pixel information (whether or not it is encoded or compressed) is transmitted. Both of these operations could be resource-intensive in terms of processing power and time, memory, storage, transmission bandwidth, etc. The reconstruction algorithm described herein provides significant savings in these areas by reducing the number of pixels that need to be rendered/transmitted and using a machine-learning model to reconstruct the rest.

[0032] Particular embodiments may be designed to have access to current and past information. For example, as described with reference to FIGS. 3A-B, sampling datasets associated with past frames (e.g., corresponding to scene 300) may be used along with the current sampling dataset (e.g., corresponding to scene 350) to reconstruct the missing unsampled portions of the current frame of interest. In particular embodiments, the reconstruction system may be communicatively coupled to an eye-tracking system and therefore could dynamically determine the current eye position of the viewer to determine which areas to sample more and which areas to sample less.

[0033] In particular embodiments, the machine-learning model may be a recurrent neural network that is trained to perform the reconstruction task. In particular embodiments, the network may be a generative adversarial network (GAN). Deep learning algorithms continually show results of unprecedented quality in the realm of image synthesis and analysis. Due to their fixed-function pipeline, they are highly amenable to execution on hardware. Therefore, they are a natural choice for the problem at hand.

[0034] Before describing the machine-learning model in detail, the input to the model will be described. FIG. 5 illustrates an example sampling dataset that includes RGB pixel samples 510 and a binary mask 520 indicating their locations. Both the pixel samples 510 and the binary mask 520 may be derived from or associated with the same frame. The RGB pixel samples 510 may be generated by sampling an existing frame or rendering particular pixel samples via any suitable computer-graphics rendering pipeline. The subsample locations may depend on the viewing direction of the viewer and/or the configuration of the optics used for viewing the image (e.g., the optics used in a virtual-reality or augmented-reality headset). Regions that are closer to the viewer’s foveal view or gaze direction may be more densely sampled, whereas regions farther away may be less densely (or more sparsely) sampled. In particular embodiments, based on the desired subsample density for each region, the system may randomly determine the subsample locations and determine the corresponding colors. In particular embodiments, the subsample locations may be stored using a binary mask 520. The binary mask 520 may have pixel locations that correspond to the RGB pixel samples 510. Each pixel in the binary mask 520 may indicate whether that pixel is sampled or unsampled (e.g., 0 may indicate an unsampled pixel and 1 may indicate a sampled pixel, or vice versa). Since a sampled pixel may have the same color value as that of an unsampled region, the binary mask may be used to disambiguate such scenarios (e.g., a sampled color of black may have an associated value of 0, which would conflate with the default 0 value of an unsampled region). In particular embodiments, the sampled RGB colors and the binary mask may be stored in four channels of an image (e.g., the RGB color information may be stored in the RGB channels of the image, and the binary mask information may be stored in the alpha channel of the image).

[0035] FIG. 6 illustrates an example training configuration for a generative adversarial network (GAN), in accordance with particular embodiments. The GAN may include a generator 640 and a discriminator 660. At a high-level, the generator 640 may be configured to generate or reconstruct a “fake” image that has portions in-painted for missing pixel information. The discriminator 660, on the other hand, may be configured to assess whether a given image is “fake” (or generated by the generator 640) or “real” (or not generated by the generator 640). During training, the high-level goal is to improve the generator’s 640 ability to generate “fake” images that can fool the discriminator 660 and concurrently improve the discriminator’s 660 ability to detect “fake” images generated by the generator 640. The goal at the end of training is for the generator 640 to generate realistic “fake” images. Thus, once training is complete, the generator 640 (and not the discriminator 660) could be put into operation during inference time and generate or reconstruct video frames.

[0036] In particular embodiments of the training process, the training samples used for training the GAN network may be a sequence of frames 610, each having complete pixel information (such as 410 in FIG. 4). The sequence of frames 610 may be a temporal sequence of views of a scene as captured by a video camera or rendered using computer graphics. In particular embodiments, the sequence of frames 610 may be processed by a corruption module 620. The corruption module 620 may sample each frame 610 and output a corresponding sample dataset 630 (such as 420 in FIG. 4 or the RGB image 510 and binary mask 520 shown in FIG. 5). Each sample dataset 630 for a frame may contain sparse, incomplete pixel information, with regional densities dependent on the viewer’s gaze direction (or foveal region).

[0037] In particular embodiments, the sample datasets 630 may be used to train a GAN network. The sample datasets 630 may be input into a generator 640. The generator 640 may comprise neural networks whose parameters may be updated/trained during the training process. The generator 640 may output a sequence of generated frames 650 (or reconstructed frames) that correspond to the original sequence of frames 610 as well as the associated sample datasets 630 of those frames. As previously mentioned, each sample dataset 630 includes sparse, incomplete pixel information. The corresponding generated frame 650 may have the missing pixel information filled in by the generator 640. Each of the generated frame 650 may also be considered as a “fake” image.

[0038] In particular embodiments, the generated frames are tested by the discriminator 670 and the results are used to train or update the neural networks of both the generator 640 and the discriminator 670. In particular embodiments, each frame of the original sequence of frames 610 may be processed by a pre-trained neural network, such as VGG convolutional neural networks or any other suitable network (e.g., ResNet), to extract image features. Similarly, each of the generated frames 650 may be processed by a pre-trained neural network 660 to extract their image features. In particular embodiments, the extracted image feature (by VGG network 615) of each original frame 610 may be compared with the extracted image feature (by VGG network 660) of the corresponding generated frame 650 to determine the content loss 690 (represented by L.sub.c) of the generated frame 650. For example, if the generated frame 650 is very similar to the corresponding original frame 610, then the content loss 690 may be small (a desirable result). On the other hand, if the generated frame 650 is dissimilar to the corresponding original frame 610, the content loss 690 may be large (an undesirable result). In particular embodiments, the extracted feature of each generated frame 650 may be input into the discriminator 670, which would determine a likelihood of the input frame being “fake” (or generated by the generator 640). If the generated frame 650 looks natural (or not in-painted), the discriminator may be “fooled” into a determination that the generated frame 650 is “real” (or not generated by the generator 640). Similarly, the original frames 610 may also be input into the discriminator 670 so that it can determine whether the original frame 610 is “real” or “fake.” The output of the discriminator 670 may be used to determine the adversarial loss 680 of the GAN network (represented by L.sub.a). The adversarial loss 680 and the corresponding content loss 690 for the sequence of frames may be iteratively used as the loss function (represented by L=L.sub.c+L.sub.a) to update the generator 640 and discriminator 670 so that each gets better performing their respective tasks (in other words, the parameters of the two networks are updated to reduce the loss in subsequent iterations). Once training completes (e.g., when the loss function is below a certain threshold or a sufficiently large set of training samples has been used to train the GAN network), the generator 640 may be used in inference time to generate or in-paint the missing pixel information of sparse frames.

[0039] In particular embodiments, the adversarial loss L.sub.a may be defined based on the Wasserstein distance and used to perform spectral normalization of the discriminator. In particular embodiments, the content loss L.sub.c may compare the extracted features (e.g., using VGG networks) per frame and perform additional temporal regularization. Content loss may be represented by the equation:

L c ( .theta. ) = f ( l .lamda. l .PHI. l ( I f ) – .PHI. l ( g ( I f ’ , .theta. ) ) 1 + .lamda. t t .lamda. l d .PHI. l ( g ( I f ’ , .theta. ) ) dt 1 ) ##EQU00001##

where, I.sub.f represents the original frame at frame f; I’.sub.f represents the sample dataset or corrupted frame at frame f; .theta. represents the trainable network parameters of the neural network; .PHI..sub.l represents VGG network layer l; g represents the generator network; .lamda..sub.l represents the weights of the individual VGG layers; and .lamda..sub.t represents the weight of the temporal regularization.

[0040] Conceptually, the loss function L.sub.c(.theta.) can be divided into two parts. The first part, delineated by the first summation over the range of 1 values, represents content comparisons between the original frame I.sub.f and its corresponding generated frame g(I’.sub.f, .theta.). More specifically, the equation computes the difference between each VGG layer l of the original frame I.sub.f and the corresponding VGG layer l output of the generated frame g(I’.sub.f, .theta.), multiply the difference by the .DELTA..sub.l weight of that VGG layer l, and sum the results for each VGG layer. Conceptually, the result represents how different the generated frame is from the corresponding original frame, and large differences should be penalized. The loss function further takes into temporal regularization using the portion of the equation delineated by the second summation over the range of 1 values. There, changes in the generated frame g(I’.sub.f, .theta.) over time is measured. More specifically, changes in the generated frame g(I’.sub.f, .theta.) over time as output by each VGG layer l are weighted by their respective .DELTA..sub.l weights and aggregated. Conceptually, since the frames are sequences in a video, excessive differences between sequentially generated frames should be penalized. During training, the network parameters .theta. may be updated to minimize the content loss defined in this manner.

[0041] After training completes, the generator 640 may be used in operation (or at inference time) to complete full video frames based on sparse pixel data. In particular embodiments, the generator 640 may be used to optimize foveated rendering for computer graphics applications and/or foveated compression for image transmission applications. With respect to foveated rendering, the generator 640 may be used to improve the speed at which computer graphics are generated. For example, a computer-graphics application (e.g., an AR/VR application, game, etc.) may render sparse pixel data using any suitable rendering technique (e.g., physics-based rendering algorithms, such as ray tracing). The density of rendered pixels may be higher in regions closer to the foveal area than regions farther away from the foveal area (e.g., the foveal area may be determined based on an eye-tracking device or pre-determined based on the device’s lens parameters or by the application). Instead of rendering the rest of the pixels in the same manner, the application may use the trained generator 640 to fill-in the missing pixel information. Even though the pixels generated by the machine-learning model (or generator 640) may be less accurate than what could be generated by the traditional rendering algorithm, there would be little or no perceptive difference to the viewer due to the viewer’s foveal viewing limitations.

[0042] With respect to foveated transmission, particular embodiments may be used by a transmitter to effectively transmit less image data than would otherwise be required, thereby reducing transmission time. For example, a transmitter may be instructed to transmit a video to a receiver. The video may be a pre-stored video (e.g., a video captured by a camera, computer-generated animation, etc.) and contains a sequence of frames. The transmitter may sample each video frame based on the viewer’s foveal region and only transmit the sampled pixel data to the receiver. Upon receiving the sampled pixel data, the receiver may reconstruct the full video frame using the trained generator 640. Again, even though the pixels generated by the machine-learning model (or generator 640) may be less accurate than the actual pixels in the original video frame, there would be little or no perceptive difference to the viewer due to the viewer’s foveal viewing limitations.

[0043] Further details of the network architecture of the generator and discriminator are now described. FIGS. 7A-D illustrate example components of a generator 640, in accordance with particular embodiments. FIG. 7A illustrates the high-level architecture of the generator 640. In particular embodiments, the generator 640 of the system may be an autoencoder that includes four matching encoders (e.g., 702, 703, 704, and 705) and decoder (e.g., 707, 708, 709, 710) blocks and a bottleneck block 706. While four pairs of matching encoders and decoders are illustrated in this example, any other number of pairs of matching encoders and decoders may also be used, such as three, five, seven, nine, etc. The wedge-shaped blocks indicate down-sampling and up-sampling. For example, the encoder blocks 702, 703, 704, and 705 are each represented by a wedge that starts wider on the left side than on the right, thereby representing down-sampling of the feature map. As a feature map is down-sampled, its spatial dimensions are reduced but gets deeper in the feature count. On the other hand, the decoder blocks 707, 708, 709, 710 are each represented by a wedge that starts narrower on the left side than on the right, thereby representing up-sampling of the feature map. The up-sampling process returns the reduced dimensionality of the feature maps to their original dimensions.

[0044] In particular embodiments, the generator 640 may take as input an image 701 containing a sample dataset of a frame (e.g., RGB and binary mask information). Four consecutive encoder blocks 702, 703, 704, 705 downscale the input RGB information in the spatial dimensions and increase the feature count. The input masks are handled using masked convolutions. The bottleneck block 706 processes the output of the last encoder layer 705 at low spatial resolution. The four matching decoder blocks 707, 708, 709, 710 perform spatial up-sampling, while decreasing the feature count. In particular embodiments, the matching encoders and decoders are connected with skip connections (e.g., represented by the arrows between symmetrical matching blocks, such as blocks 702 and 710, blocks 703 and 709, blocks 704 and 708, and blocks 705 and 707). Thus, the input to each decoder block (e.g., 709) is the output of the previous block (e.g., 708) and the masked output of the corresponding encoder block (e.g., 703). Conceptually, the skip connections help each decoding block retain the features of the sampled pixel information (as isolated using the mask). Furthermore, the decoder blocks 707, 708, 709, 710 may be recurrent networks that retain their final activations over time (represented by the circular loop on each block), so that their previous output can be concatenated with their current input, establishing a recurrent system. This feature helps the network retain spatio-temporal representations learned from previous frames and use them to generate the current frame. Finally, the output of the last decoder block 710 is the generated frame 711.

[0045] FIG. 7B provides details of an encoder block 730 (e.g., 702, 703, 704, 705), in accordance with particular embodiments. The black arrows represent the processing flow of RGB information and the dotted arrows represent the processing flow of binary mask information. In particular embodiments, the RGB information (such as the feature map extracted from the input RGB sample) and the associated binary mask information may be processed by masked convolutional layer 732. The output feature map associated with RGB information is then processed by an activation layer 734. The output of the activation layer 734, along with the mask features output by the masked convolution layer 732, is then down-sampled by the masked convolution layer 736. From that layer 736, the output feature maps associated with RGB information is processed by another activation layer 738. The output of the activation layer 738 and the down-sampled mask features from the masked convolution layer 736 are then passed to the next encoder block or the bottleneck block 740. The pre-down-sampling output of the activation layer 734 and the mask features from the masked convolution layer 732 are passed, via a skip connection, to the corresponding matching decoder block, as shown in FIG. 7A.