SYSTEM FOR IMAGE COMPLETION
20220092746 · 2022-03-24
Inventors
- Wim Abbeloos (Hove, BE)
- Gabriel Othmezouri (Ixelles, BE)
- Liqian MA (Heverlee, BE)
- Stamatios Georgoulis (Zurich, CH)
- Luc VAN GOOL (Zurich, CH)
Cpc classification
G06T3/4038
PHYSICS
G06T3/4023
PHYSICS
International classification
G06T3/40
PHYSICS
Abstract
A system for image completion is disclosed. The system comprises a coordinate generation module configured to receive past frames and a present frame having a first field-of-view and to generate a set of coordinate maps, one for each of the received past frames; and a frame aggregation module configured to receive as input the past frames, the present frame, and the coordinate maps and to synthesize, based on said input, a present frame having a second field-of-view.
Claims
1. A system for image completion, comprising: a coordinate generation module configured to receive first past frames and a first present frame, the first past frames and the first present frame having a first field-of-view, and to generate a set of coordinate maps, one for each of the received first past frames, wherein the coordinate map corresponding to a first past frame provides a spatial mapping of the first past frame to a coordinate system of the first present frame; and a frame aggregation module configured to receive as input the first past frames, the first present frame, and the coordinate maps and to synthesize, based on said input, a second present frame having a second field-of-view.
2. The system according to claim 1, wherein the coordinate generation module comprises: a depth network configured to receive the first past frames and to generate a depth map for each of the received first past frames; a pose network configured to receive frame pairs of time-adjacent frames formed from the received first past frames and the first present frame and to generate a relative camera pose for each of the received frame pairs; and a coordinate calculation module configured to generate the set of coordinate maps based on outputs of the depth network and the pose network.
3. The system according to claim 1, wherein the frame aggregation module is configured to propagate information contained in the received first past frames to the coordinate system of the first present frame using the set of coordinate maps generated by the coordinate generation module.
4. The system according to claim 1, wherein the frame aggregation module comprises: an encoder configured to generate a plurality of feature maps based on each of the first past frames and the first present frame; a warping module configured, for each of the first past frames and the first present frame, to warp the plurality of feature maps associated with said each frame, using the respective coordinate map associated with said each frame, to generate a plurality of warped feature maps for said each frame; and an attention-based feature aggregation module configured to aggregate, over all of the first past frames and the first present frame, the generated warped feature maps to generate a set of aggregated feature maps.
5. The system according to claim 4, wherein the attention-based feature aggregation module is configured in the aggregation to emphasize, for each frame of the first past frames and the first present frame, region-specific features of the frame based on a timing of the frame relative to the first present frame.
6. The system according to claim 4, wherein the attention-based feature aggregation module is configured to, for each frame of the first past frames and the first present frame: generate a respective frame-wise spatial attention map for each of the warped feature maps associated with said each frame; and multiply each of the warped feature maps associated with said each frame with the respective spatial attention map to generate a respective feature map.
7. The system according to claim 6, wherein the attention-based feature aggregation module is further configured to sum, over all of the first past frames and the first present frame, the generated respective feature maps to generate the set of aggregated feature maps.
8. The system according to claim 4, wherein the frame aggregation module further comprises a U-net module configured to generate the second present frame based on the set of aggregated feature maps, the U-net module comprising: a context normalization sub-module configured to receive the set of aggregated feature maps and to out-paint regions of the second present frame falling outside of the field-of-view of the first present frame; a decoder sub-module configured to receive feature maps output by the context normalization sub-module and to process said feature maps output by the context normalization sub-module to in-paint occluded or unobserved regions falling within the field-of-view of the first present frame; and a gated self-attention sub-module configured to receive feature maps output by the decoder sub-module and to spatially aggregate said feature maps output by the decoder sub-module.
9. The system according to claim 8, wherein the gated self-attention sub-module is configured to spatially aggregate the feature maps output by the decoder sub-module based on weights that are dynamically generated per feature vector based on a spatial location of the feature vector.
10. The system according to claim 1, comprising: a hallucination uncertainty module configured to generate an uncertainty map associated with the second present frame.
11. The system according to claim 10, wherein the hallucination uncertainty module is configured to generate the uncertainty map to minimize a loss function incorporating hallucination uncertainty.
12. The system according to claim 10, wherein the hallucination uncertainty module is configured to generate the uncertainty map based on predicting regions of the second present frame that will have high hallucinating uncertainty and those that will have low hallucinating uncertainty.
13. The system according to claim 1, wherein a portion of the first past frames received by a depth network and the frame aggregation module are replaced by second past frames having the second field-of-view generated by the frame aggregation module and corresponding to said portion of the first past frames.
14. The system according to claim 13, wherein the second past frames are each concatenated with a respective uncertainty map generated by a hallucination uncertainty module, before providing the second past frames to the frame aggregation module.
15. The system according to claim 1, wherein the second field-of-view is equal or greater than the first field-of-view.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Further features and advantages of the present disclosure will become apparent from the following description of certain embodiments thereof, given by way of illustration only, not limitation, with reference to the accompanying drawings in which:
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
DETAILED DESCRIPTION OF EMBODIMENTS
[0059]
[0060] As shown in
[0061] Coordinate generation module 102 is configured to receive first past frames 108 and a first present frame 116 and to generate a set of coordinate maps 110, one per received first past frame. The coordinate map corresponding to a first past frame provides a spatial mapping of the first past frame to the first present frame. In an embodiment, the first past frames 108 and the first present frame 116 have a first FoV (e.g., 208×128 pixels).
[0062] Frame aggregation module 104 is configured to receive the first past frames 108 and the first present frame 116, as well as the coordinate maps 110 from module 102. Frame aggregation module 104 is configured to synthesize a second present frame 112 based on the received input. In an embodiment, the second present frame 112 has a second FoV.
[0063] The second FoV may be equal to or different than the first FoV. In an embodiment, the second FoV is larger than the first FoV. For instance, the second FoV may have a greater width and/or length in pixels than the first FoV. For example, where the first FoV is 208×128 pixels, the second FoV may be 416×128 pixels.
[0064] In an embodiment, to improve temporal consistency in the generated second frames (having the second FoV), a portion of the first past frames, input into the modules 102 and 104, may be replaced with their corresponding second frames generated by frame aggregation module 104.
[0065] Frame aggregation module 104 may be configured to propagate information contained in the past frames (which include first past frames, and optionally also second past frames) to the coordinate system of the first present frame using the coordinate maps 110.
[0066] In an embodiment, frame aggregation module 104 may be configured to generate a plurality of feature maps based on each input frame. The feature maps may be multi-scale feature maps.
[0067] The frame aggregation module 104 may use the coordinate map 110 corresponding to a given past frame to warp the plurality of feature maps associated with the past frame. For the first present frame, as it is already in the correct coordinate system, no warping is necessary and the warped feature maps correspond to the original feature maps.
[0068] Subsequently, frame aggregation module 104 may be configured to aggregate the warped feature maps over all frames to generate aggregated feature maps. In an embodiment, the aggregation of the warped feature maps uses an attention-based feature aggregation scheme. The attention-based feature aggregation scheme is trained to learn to select the useful features among the frames in order to address issues caused by depth/pose errors (i.e., errors in the coordinate maps) and by frame inconsistency. This improves the fusion of the multi-frame information on the feature level.
[0069] The frame aggregation module 104 may be configured to generate the second present frame 112 based on the aggregated feature maps.
[0070] In an embodiment, the frame aggregation module 104 may use a context normalization based technique to out-paint (extrapolate) regions falling outside the first FoV.
[0071] In an embodiment, the frame aggregation module 104 may use a gated convolution technique to in-paint (complete) occluded or unobserved regions falling within the first FoV.
[0072] In an embodiment, the frame aggregation module 104 may implement a Gated Self-Attention (GSA) mechanism to allow the system to be adaptable to observations with different ambiguity levels. The GSA mechanism may be configured to spatially aggregate feature maps based on weights that are dynamically generated according to local information (ambiguity being different from region to region).
[0073] In an embodiment, the frame aggregation module 104 may implement an uncertainty mechanism. Specifically, hallucination uncertainty module 106 may be provided to generate an uncertainty map 114 associated with the second present frame 112. The uncertainty map serves to interpret the hallucination uncertainty at each pixel. During training, the uncertainty map may be used to weight a loss function spatially to reduce supervision mismatch (supervision mismatch is the mismatch between a prediction result and ground truth; spatial displacement may cause the supervision mismatch to be large even though the prediction result may be visually acceptable, causing training convergence difficulties). Specifically, the weighting of the loss function by the uncertainty map attenuates the effect of pixels with high hallucination uncertainty on the loss function value and helps temper the training objective.
[0074] In an embodiment, system 100 may be implemented on a computer system such as computer system 200 shown in
[0075] In the following, detailed operation of system 100 is presented with reference to
[0076] Without loss of generality, system 100 will be described for the particular embodiment in which the second FoV is larger (in terms of width and/or length) than the first FoV. For example, the first FoV may be 208×128 pixels and the second FoV may be 416×128 pixels. Accordingly, for simplification, the first FoV will be referred to as “narrow FoV” and the second FoV will be referred to as “wide FoV.” As would be understood by a person of skill in the art based on the teachings herein, embodiments are not limited by this particular embodiment.
[0077] For the simplification of presentation, the operation of system 100 is described from the processing perspective of a present narrow FoV frame I.sub.t to generate a present wide FoV frame O.sub.t. Accordingly, system 100 may be considered as a FoV extrapolation system. However, as described above, system 100 is not limited to FoV extrapolation.
[0078]
[0079] As shown in
[0080] Depth network 302 is configured to receive a plurality of past frames. The past frames may include narrow FoV frames and past wide FoV frames. For the purpose of illustration, it assumed in the following description that the depth network 302 receives k frames. The k frames may include (k−j) past narrow FoV frames (denoted in
[0081] The past frames may be RGB frames, depth frames, or semantic segmentation frames, for example. The frames may be derived from the same camera source or from different camera sources and translated to the same camera reference.
[0082] Depth network 302 generates a depth map d for each of the received k frames. In an embodiment, depth network 302 generates depth maps d.sub.t−k, . . . , d.sub.t−j−1 corresponding respectively to past narrow FoV frames I.sub.t−k, . . . , I.sub.t−j−1 and generates depth maps d.sub.t−j, . . . , d.sub.t−1 corresponding respectively to past wide FoV frames O.sub.t−j, . . . , O.sub.t−1.
[0083] The depth map for a given frame indicates, for every pixel in the frame, an estimate of the distance between the camera and the object represented by the pixel.
[0084] Pixel depth estimation is well-known to a person of skill in the art and will not be described herein. In an embodiment, depth network 302 may be implemented as a fully convolutional U-net as described in detail in “Clément Godard, Oisin Mac Aodha, Michael Firman, Gabriel Brostow, Digging into self-supervised monocular depth estimation, arXiv:1806.01260, in ICCV, 2019”. Specifically, the depth network 302 may include a well-known VGG16BN encoder and a decoder of several convolutional layers. The input may be a RGB image frame (3 channels), and the output is a depth map (1 channel) of the same resolution.
[0085] Pose network 304 receives as input k pairs of narrow FoV frames and generates a relative camera pose for each of the k frame pairs. In an embodiment, the k frame pairs include the frame pairs (I.sub.t−k, I.sub.t−k+1), . . . , (I.sub.t−1, I.sub.t), i.e., adjacent frame pairs over the time t (present) narrow FoV frame and the k−i past narrow FoV frames. The resulting relative camera poses are denoted as p.sub.t−k, . . . , p.sub.t−1.
[0086] The relative camera pose p.sub.t−i corresponding to adjacent narrow FoV frames I.sub.t−i, I.sub.t−i+1) represents an estimate of the relative rotation and translation of the camera position from time (t−j) to time (t−j+1).
[0087] Relative camera pose estimation is well-known to a person of skill in the art and will not be described herein. In an embodiment, pose network 304 may be implemented as described in detail in “Clément Godard, Oisin Mac Aodha, Michael Firman, Gabriel Brostow, Digging into self-supervised monocular depth estimation, arXiv:1806.01260, in ICCV, 2019”. Specifically, pose network 304 may include a ResNet18 encoder that receives as input a pair of RGB images (3+3 channels) and that produces as output a 6-channel vector.
[0088] Coordinate calculation module 306 is configured to calculate k coordinate maps 308 based on the outputs of depth network 302 and pose network 304. In an embodiment, (k−j) maps (e.sub.t−k, . . . , e.sub.t−j+1) corresponding respectively to the (k−j) past narrow FoV frames (I.sub.t−k, . . . , I.sub.t−j−1) and j maps (e.sub.t−j, . . . , e.sub.t−1) corresponding respectively to the j past wide FoV frames (O.sub.t−j, . . . , O.sub.t−1) are calculated.
[0089] The coordinate map corresponding to a past (narrow or wide FoV) frame provides a spatial mapping of the past frame to the present narrow FoV frame I.sub.t. In other words, the coordinate map indicates for each pixel of the past frame its corresponding coordinates in the present frame I.sub.t.
[0090] In an embodiment, the coordinate map for a past frame I.sub.i or O.sub.i (i=t−k, t−i) is obtained by first calculating a rigid flow matrix from the present frame I.sub.t to the past frame according to:
f.sub.t.fwdarw.i.sup.rig(e.sub.i)=KT.sub.i.fwdarw.tD.sub.i(c.sub.i)K.sup.−1c.sub.i−c.sub.i
where K denotes the intrinsic matrix of the camera, T.sub.i.fwdarw.t denotes the relative camera pose from the past frame I.sub.i to the present frame, c.sub.i represents a matrix of the homogeneous (or projective) coordinates of the pixels in the present frame I.sub.i, and D.sub.i(c.sub.i) represents the depth value of the position c.sub.i.
[0091] The rigid flow from the present frame I.sub.t to the past frame indicates respective pixel displacements that would be applied to pixels of the present frame I.sub.t to warp the present frame I.sub.t to the past frame.
[0092] Using the calculated rigid flow, a coordinate map ê.sub.t.fwdarw.i that spatially matches the present frame I.sub.t to the past frame can then be computed. The coordinate map ê.sub.t.fwdarw.i can be obtained by adding the rigid flow to a regular 2D grid (2 channels) (e.g., a 3×3 2D grid with the values [[[1,1,1], [2,2,2], [3,3,3]], [[1,2,3], [1,2,3], [1,2,3]]]). Finally, the coordinate map ê.sub.t.fwdarw.i is reversed to obtain the coordinate map coordinate map e.sub.i, which spatially matches the past frame to the present frame I.sub.t. In the reversal of the coordinate map ê.sub.t.fwdarw.i to obtain the coordinate map coordinate map e.sub.i, if a pixel (x0, y0) of the present frame I.sub.t is spatially matched to the pixel (u0, v0) of the past frame in the coordinate map ê.sub.t.fwdarw.i, then the pixel (u0, v0) of the past frame will be spatially matched to the pixel (x0, y0) of the present frame I.sub.t in the coordinate map e.sub.i.
[0093]
[0094] As shown in
[0095] Encoder 402 is configured to receive as input k+1 frames. At initialization, the k+1 frames correspond to the k past narrow FoV frames (i.e., I.sub.t−1, . . . , I.sub.t−k) and to the present narrow FoV frame I.sub.t. After j iterations, to improve temporal coherency, the inputs corresponding to the past narrow frames {I.sub.t−i}.sub.i=1, . . . j are replaced with the previous outputs {O.sub.t−i}.sub.i=1, . . . j and their associated uncertainty maps {U.sub.t−i}.sub.i=1, . . . j (O.sub.t−j and U.sub.t−j may be concatenated with each other channel by channel). For the purpose of simplification,
[0096] Encoder 402 is configured to generate a plurality (N) of feature maps 410 based on each received input frame. In an embodiment, the plurality of feature maps 410 may be multi-scale feature maps (i.e., having different spatial scales or sizes). In an embodiment, N may be equal to 3, though a greater number may be used.
[0097] In an embodiment, the encoder 402 may include a first convolutional layer configured to generate a first feature map based on the input frame. The first feature map may be a tensor of size H×W×C, where H is the frame height, W is the frame width, and C is a number of channels. For example, C may be equal to 128. The first feature map may be referred to as “level 0” feature map.
[0098] The encoder 402 may also include a second convolutional layer configured to receive the first feature map and to generate an intermediate second feature map based on the first feature map. The intermediate second feature map may be of size H1×W1×C, where at least one of H1 and W1 is lower respectively than H and W. The intermediate second feature map is then added to a downsized version of the first feature map of the same size (i.e., H1×W1×C) to generate a second feature map of size H1×W1×C. The second feature map may be referred to as “level 1” feature map.
[0099] The process described above may repeated with respect to the second feature map to obtain a third feature map of size H2×W2×C, where at least one of H2 and W2 is lower respectively than H and W. The third feature map may be referred to as “level 2” feature map.
[0100] The feature maps 410, generated for each of the k+1 input frames, are then provided to warping module 404.
[0101] Additionally, warping module 404 receives the k coordinate maps 308 from coordinate calculation module 306. As noted above, the k coordinate maps 308 include (k−j) maps (e.sub.t−k, . . . , e.sub.t−j+1) corresponding respectively to the (k−j) past narrow FoV frames (I.sub.t−k, . . . , I.sub.t−j−1) and j maps (e.sub.t−j, . . . , e.sub.t−1) corresponding respectively to the j past wide FoV frames (O.sub.t−j, . . . , O.sub.t−1).
[0102] In an embodiment, for each of the past frames (i.e., each of (k−j) past narrow FoV frames (I.sub.t−k, . . . , I.sub.t−j−1) and the j past wide FoV frames (O.sub.t−j, . . . , O.sub.t−1)), warping module 404 may be configured to use the respective coordinate map corresponding to the frame to propagate the feature maps 410 associated with the frame to the present narrow FoV frame I.sub.t. The propagation of the feature maps 410 warps the feature maps 410, according to the coordinate map, to generate a plurality of warped feature maps 412 for the frame.
[0103] In an embodiment, the warping module 404 uses bilinear sampling as described in detail in Jaderberg, Max, Karen Simonyan, and Andrew Zisserman, “Spatial transformer networks,” In NIPS. 2015. to propagate the multi-scale feature maps 410 based on the coordinate maps 308.
[0104] It is noted that the feature maps 410 corresponding to the present narrow FoV frame I.sub.t are not warped by warping module 404 because they are already in the coordinate system of the present frame. As such, the feature maps 412 are identical to the feature maps 410 for the present narrow FoV frame I.sub.t.
[0105] The warped feature maps 412 (which may be different levels, e.g., level 0, 1, and 2) are then provided to AFA module 406, which is configured to aggregate the warped feature maps 412, over all of the k+1 frames, to generate aggregated feature maps 414. Warped feature maps resulting from narrow FoV frames may be padded with zeros to have the same size as warped feature maps resulting from wide FoV frames.
[0106] In an embodiment, AFA module 406 may be implemented as shown in
[0107] As shown in
[0108] Within each channel, the warped feature maps 412 of a respective frame are each fed into a convolutional layer 502, followed by a softmax normalization module 504, to generate a respective frame-wise spatial attention map 506. In an embodiment, a level 0 spatial attention map, a level 1 spatial attention map, and a level 2 spatial attention map are generated. For the purpose of illustration,
[0109] Each of the warped feature maps 412 is then multiplied by its respective spatial attention map 506 to generate a respective feature map 508. Thus, for each frame, a plurality of feature maps 508 (e.g., level 0, level 1, and level 2) are obtained.
[0110] The use of spatial attention maps as described above allows to focus on or select specific features of each frame for subsequent aggregation with other frames. In an embodiment, the spatial attention maps 506 are configured to emphasize, for older frames of the k+1 frames (e.g., frames t−k to t−j−1), frame regions farther from the center of the frame (e.g., regions more than a predetermined distance from the center); and for later frames of the k+1 frames (e.g., frames t−j to t), frame regions near the center of the frame (e.g., regions less than a predetermined distance from the center).
[0111] The resulting feature maps 508 are then summed, across all frames, to generate the aggregated feature maps 414. In an embodiment, this includes summing, across all frames, all level 0 feature maps 508 together, all level 1 feature maps 508 together, and all level 2 feature maps 508 together.
[0112] Returning to
[0113] In an embodiment, U-net module 408 implements mechanisms for hallucinating missing regions, for example by in-painting (completing) occluded or unobserved regions falling within the narrow FoV and/or out-painting (extrapolating) regions falling outside the narrow FoV. Image in-painting and out-painting are known techniques in the art. Specifically, image in-painting aims to hallucinate the missing pixels through warping, or to generate the missing pixels conditioned on the neighboring (spatial or temporal dimensions) visible pixels. Image out-painting typically adopts 2D or 3D geometry-based image warping and stitching techniques to blend the observed pixels of adjacent narrow FoV frames in order to extend the FoV.
[0114] Optionally, U-net module 408 may include a Gated Self-Attention (GSA) mechanism. The motivation for the GSA mechanism is that, typically, the ambiguity level between an estimated wide FoV frame and the wide FoV ground truth may vary from one region to another in the wide FoV frame. For example, as illustrated in
[0115] In an embodiment, U-net module 408 may be implemented as shown in
[0116] As shown in
[0117] In an embodiment, bottleneck module 604 includes a plurality of successive layers 604-1, . . . , 604-6. 6. Layers 604-1, . . . , 604-6 may each be implemented as a residual dilated convolutional layer. Such a layer can be described by the equation y=x+conv(x), where y is the layer output, x is the layer input, and conv(x) denotes a dilated convolution of the input x.
[0118] In an embodiment, decoder module 618 includes a context normalization sub-module 608, a decoder sub-module 610, a gated self-attention (GSA) sub-module 612, and up-sampling modules 614.
[0119] Context normalization sub-module 608 may be configured to out-paint (extrapolate) regions falling outside the narrow FoV.
[0120] In an embodiment, sub-module 608 comprises a plurality of context normalization layers 608-1, 608-2, and 608-3. In an embodiment, normalization layers 608-1, 608-2, and 608-3 may each be implemented as described in Y. Wang, X. Tao, X. Shen and J. Jia, “Wide-Context Semantic Image Extrapolation,” in 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, Calif., USA, 2019 pp. 1399-1408. As such, layers 608-1, 608-2, and 608-3 may be configured to transfer the mean and the variance from the observed region features to the unobserved region features.
[0121] However, unlike in Wang et al, where the mask is given in the input, an aggregated mask that indicates the unobserved regions after propagating the past frames may be used. As such, it can be recognized that a large amount of wide view information has been observed in the past frames and this information can simply be propagated into the present wide FoV frame, rather than hallucinated.
[0122] Decoder sub-module 610 may be configured to in-paint (complete) occluded or unobserved regions falling within the narrow FoV.
[0123] In an embodiment, sub-module 610 includes a plurality of decoder layers 610-1, 610-2, 610-3, and 610-4. Decoder layers 610-1, 610-2, 610-3, and 610-4 may each be implemented as a gated convolution layer as described in Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu, Thomas S. Huang, “Free-form image inpainting with gated convolution,” in Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2019, pp. 4471-4480.
[0124] GSA sub-module 612 may be configured to perform feature aggregation with self-attention. Specifically, unlike a traditional convolution operator which performs feature aggregation using a convolution kernel of fixed pre-trained weights (to combine features from nearby locations), sub-module 612 may be configured to dynamically generate the kernel weights per feature vector (i.e., per pixel) based on the location of the feature vector. In an embodiment, as the ambiguity is directly correlated with location (as described above with respect to
[0125] In an embodiment, GSA sub-module 612 includes a plurality of GSA layers 612-1, 612-2, and 612-3. GSA layers 612-1, 612-2, and 612-3 may each be implemented as a patch-wise self-attention block as described in Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun, “Exploring self-attention for image recognition,” In Conference on Computer Vision and Pattern Recognition (CVPR), 2020. Specifically, the patch-wise self-attention block can be described by the following equation:
where α(x.sub.R(i)).sub.j=γ(δ(x.sub.R(i)), y.sub.i denotes the new aggregated feature, R(i) denotes the aggregation footprint (e.g., 3×3 or 7×7 pixels), x.sub.R(i) denotes a tensor corresponding to the patch of feature vectors in the aggregation footprint, α(x.sub.R(i)).sub.j represents the attention vector (i.e., weight vector) at location j in the tensor α(x.sub.R(i)) and which corresponds spatially to the feature vector x.sub.j in the tensor x.sub.R(i), β is a function that generates the feature vectors β(x.sub.j), and ⊙ is the Hadamard product.
[0126] The functions β and γ are mappings implemented via one convolution layer, respectively. The function δ combines the feature vectors x.sub.j from the patch x.sub.R(i) and may be implemented using a concatenation operation.
[0127] In an embodiment, to reduce the impact of vanishing gradients during training, the self-attention block may be wrapped by a residual structure: z=Conv.sub.r (y)+x, where Conv.sub.r denotes a residual convolutional layer, y is the output of the self-attention block, and x is the input of the self-attention block.
[0128] In another embodiment, the self-attention may further include a gating mechanism to deal with regions with high ambiguity, formulated as:
g=sigmoid(Conv.sub.g(z))⊙ tanh(Conv.sub.a(z))
where Conv.sub.g and Conv.sub.a denote a gating convolutional layer and an attention convolutional layer. The gating mechanism controls the path(s) through which information flows in the network. Particularly, in an embodiment, the gating mechanism may be configured to allow only feature vectors with an ambiguity above a certain level to flow through the network and/or to limit the flow of feature vectors with ambiguity above a certain level. Image quality can thus be improved.
[0129] In an embodiment, bottleneck module 604 may be configured to receive as input, via the first layer 604-1, an aggregated feature map 602-1 and to generate a modified aggregated feature map 606. Feature map 602-1 may be a level 2 aggregated feature map of size (H/4×W/4×C), where H is the frame height, W is the frame width, and C is the number of channels. Feature map 606 may be of the same size as feature map 602-1.
[0130] Context normalization layers 608-1, 608-2, and 608-3 are configured to receive respective aggregated feature maps 602-1, 602-2, and 602-3. Aggregated feature maps 602-1, 602-2, and 602-3 may correspond respectively to level 2, level 1, and level 0 aggregated feature maps. As an example, feature map 602-1 may be of size (H/4×W/4×C), feature map 602-2 may be of size (H/2×W/2×C), and feature map 602-3 may be of (H×W×C), where H is the frame height, W is the frame width, and C is the number of channels.
[0131] In an embodiment, context normalization layers 608-1, 608-2, and 608-3 are configured to feed respectively decoder layers 610-1, 610-2, and 610-3, which in turn are configured to feed respectively GSA layers 612-1, 612-2, and 612-3.
[0132] Concurrently with receiving the respective outputs of context normalization layers 608-1, 608-2, and 608-3, decoder layers 610-1, 610-2, and 610-3 further receive as input respectively the output 606 of bottleneck module 604, the output of GSA layer 612-1 (up-sampled by up-sampling module 614-1), and the output of GSA layer 612-2 (up-sampled by up-sampling module 614-2). For example, the combined inputs of decoder layers 610-1, 610-2, and 610-3 may be of size (H′×W′×2C), and the outputs of the layers may be of size (H′×W′×2C), where H′=H/4, H/2, and H respectively and W′=W/4, W/2, and W respectively for layers 610-1, 610-2, and 610-3.
[0133] Decoder layer 610-4 receives an input the output of GSA layer 612-3 and generates an output 616 comprising the present wide FoV frame O.sub.t.
[0134] Returning to
[0135] Additionally, the uncertainty map may be used to temper the training objective by attenuating the effect of pixels with high hallucinating uncertainty on the loss function value, thereby reducing supervision mismatch and speeding up training convergence.
[0136] In an embodiment, the hallucination uncertainty module 106 may be trained to generate an uncertainty map based on predicting the regions of the wide FoV frame that will have high hallucinating uncertainty and those that will have low hallucinating uncertainty. The generated uncertainty map reflects this prediction by assigning an estimated hallucination uncertainty per pixel of the wide FoV frame.
[0137] In an embodiment, hallucination uncertainty module 106 may be trained to generate the uncertainty map 114 to minimize a loss function incorporating hallucination uncertainty.
[0138] In an embodiment, the loss function incorporating hallucination uncertainty is a pixel level reconstruction L1 loss function.
[0139] In an embodiment, the loss function incorporating hallucination uncertainty is given by the equation:
where O.sub.t is the present wide FoV frame, W.sub.t is the ground truth wide FoV frame, a is the predicted uncertainty map associated with O.sub.t, M.sub.view is a mask for out-of-narrow view regions, and the ⊙ operator denotes element-wise multiplication. The loss function is computed per pixel and then averaged over all pixels.
[0140] According to the above equation, it is noted that the narrow FoV region, given by (1−M.sub.view), is not weighted by the uncertainty map U.sub.t. This is because this region corresponds to pixels that are observed in the narrow FoV frame. The right-most U.sub.t term is a regularization term that helps stabilize loss gradients.
[0141] In an embodiment, to make the uncertainty U.sub.t more interpretable and further stabilize the training process, a is constrained in the range (0, 1) using a sigmoid function.
[0142] Additionally, as shown in
[0143] Although the present disclosure has been described above with reference to certain specific embodiments, it will be understood that the disclosure is not limited by the particularities of the specific embodiments. Numerous variations, modifications and developments may be made in the above-described embodiments within the scope of the appended claims.