Method for filling in a void in a stereoscopic virtual image
By constructing a hierarchical hole-filling framework network and utilizing generative adversarial networks and directional scene influence distribution maps, the semantic confusion problem in hole filling of stereoscopic virtual images is solved, thereby improving the rendering quality of 3D virtual images.
Patent Information
- Application Number
- CN202211225651.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2042-09-30
AI Technical Summary
Existing technologies for filling holes in stereoscopic virtual images have unrestricted hole distribution characteristics, leading to semantic confusion and affecting the rendering effect of 3D virtual images.
A hierarchical hole-filling framework network is constructed, including a scene cue extraction network and a texture reconstruction network. A generative adversarial network composed of a generator and a discriminator is used to optimize the hole-filling process of stereo composite images by using a directional scene influence distribution map as a soft feature constraint.
It effectively solves the semantic confusion problem of void-filled areas in stereoscopic composite images and improves the rendering effect of 3D virtual images.
Smart Images

Figure CN115588067B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of three-dimensional video technology, specifically relating to a method for filling holes in stereoscopic visual virtual images. Background Technology
[0002] 3D video is becoming increasingly popular and is gradually becoming a current development trend. However, the scarcity of video resources has become a major bottleneck restricting the rise of this industry. In this context, converting 2D video to 3D video is an effective way to solve this problem. DIBR rendering is an important step in the 2D / 3D conversion method based on depth maps. It can render virtual stereoscopic video with depth information, ultimately achieving a "qualitative change" from 2D to 3D. While this technology has many advantages, it still has its limitations. Because DIBR virtualizes left and right eye images from a reference image based on the mapping relationship of the depth map conversion, changes in viewpoint may cause some background areas that were occluded by foreground objects in the original image to be exposed in the new image. Since these areas do not have corresponding texture mappings during the transformation process, holes will appear in the target image.
[0003] In recent years, deep learning technology has achieved great success in some applications, including conventional image inpainting. However, since holes generated during stereo image synthesis are often distributed in the transition area between the background and foreground, conventional image inpainting methods, without special constraints, still cannot effectively prevent semantic confusion between the foreground and background regions during hole filling.
[0004] The invention patent with publication number CN114841871A discloses a method for filling holes in stereoscopic virtual images, including the following steps: constructing a framework model consisting of an edge generation network and a texture generation network; using step-by-step training to fuse scene edges and layer constraints to train the framework model for hole filling, thereby obtaining a hole filling framework network; and putting the stereoscopic composite image to be repaired and the hole mask into the hole filling framework network for repair to obtain the generated image. The core of this invention is to use layer constraints as clues. By considering the distribution characteristics of holes in stereoscopic images and using scene edges and layer constraints, the hole filling is restricted to the background image area during training, thereby effectively avoiding the semantic confusion problem of the filling content in the repair process of existing networks, thus improving the rendering effect of 3D virtual images.
[0005] CN109472764A discloses a method, apparatus, device, and medium for image synthesis and image synthesis model training, which solves the problem of limited and uncustomizable image effects and provides users with multiple image attribute options. However, it cannot fill in the missing unknown parts based on the known parts of the image, nor is it specially designed for the characteristics of stereoscopic synthesized images. The image to be filled in generally has a large missing blank area. Since filling in large blank areas involves not only the structural information of the image but also the filling in of texture information. Summary of the Invention
[0006] The purpose of this invention is to provide a method for filling holes in stereoscopic virtual images to address the problems existing in the prior art. It constructs a hierarchical hole-filling framework network to significantly improve the hole repair effect of deep learning-based network models on stereoscopic synthetic images.
[0007] The technical solution of this invention is: A method for filling holes in stereoscopic virtual images includes the following steps: S1: Construct a framework model consisting of a scene cue extraction network and a texture reconstruction network; S2: Perform end-to-end hole-filling training on the framework model to obtain the hole-filling framework network; S3: Put the stereo composite image to be repaired and the hole mask into the hole-filling framework network for repair to obtain the generated image.
[0008] Specifically, in step S1, the scene cue extraction network predicts and generates a directional scene influence distribution map based on the extracted scene layer distribution map; The texture reconstruction network is a generative adversarial network consisting of a generator network and a discriminator network. The generator network is used to fuse the directional scene influence distribution map and use it as a soft feature constraint of the scene to further optimize the final stereo composite image after filling the holes. The discriminator network is used to judge the quality of the generated image.
[0009] Specifically, the generator network in the scene cue extraction network and texture reconstruction network is an encoder-decoder network structure, including an encoding module and a decoding module; the encoding module downsamples twice, with eight dilated convolutional layers connected in between; the decoding module upsamples twice; and the discriminator in the texture generation network is composed of five stacked convolutional layers.
[0010] Specifically, step S2 involves end-to-end hole-filling training of the framework model to obtain the hole-filling framework network, which includes the following steps: S21. Input the stereo composite image with holes, the hole mask image, and the extracted scene layer distribution map into the scene cue extraction network to obtain the directional scene influence distribution map; S22. Input the stereo composite image with holes, the hole mask image, and the directional scene influence distribution map into the generator network of the texture reconstruction network to obtain the generated image. S23. The generated image, the hole mask image, and the holeless stereo composite image as the ground truth are used as inputs to the discriminator network; S24. Alternately train the generator network and discriminator network in the texture generation network. When the loss functions of the generator network and the discriminator network tend to stabilize, the hole-filling framework network for the final stereoscopic synthetic image is obtained.
[0011] Specifically, the loss function of the generator network is: LG = LG 1 + LG 2; LG 1 = λconLcon ; LG 2 = λadvLadv + λpercLperc + λstyleLstyle ; Where LG is the loss function of the generator network; LG1 is the main loss function; LG2 is the auxiliary loss function; Lcon is the content loss function; Lperc is the perceptual loss; Lstyle is the style loss; and Ladv is the adversarial loss. λcon , l adv , λperc , λstyle It is a balancing factor.
[0012] Specifically, the loss function of the discriminator network is: LD = _ [ Hey ~ P ( Y )[log D ( y , Mh )]+ Ex ~ P ( X )[log (1 _ D ( G ( x , Mh ), Mh ))]]] ; Where LD is the loss function of the discriminator network; x is the stereo composite image with holes; and y is the stereo composite image without holes, which serves as the ground truth. Mh The hole mask matrix is a binary representation. 1 represents a void area; 0 represents other areas; y ~ P ( Y () is the true image from P ( Y Obtained by sampling from the distribution; x ~ P ( X () is the true image from P ( X The samples were obtained from the distribution.
[0013] Specifically, the content loss function Lcon is defined as:
[0014] in, . Euclidean distance. L1 This represents the stereo composite image after hole filling in the output of the texture reconstruction network. Iw and the hole-free stereo composite image as the truth value Igt Euclidean distance, L2 This represents the distribution of the targeted scene influence output by the scene cue extraction network. Sw and its truth value Sgt. European distance, Y 1, Y 2 is the balance factor.
[0015] Specifically, the scene layer distribution map is defined as follows:
[0016] The scene layer distribution map is represented as follows: ξc , p For a pixel in the image, pl for p The left pixel, pr for p The right pixel, Δ (.) is the Laplacian operator, Δ ( M h) represents the extracted hole mask boundary, and sgn(.) represents the predefined sign function. When the processed stereo vision virtual image is a right-eye image, sgn( p ) = 1, when the processed stereoscopic virtual image is the left eye image, sgn( p = 0.
[0017] Specifically, the true value of the directional scene influence distribution map Sgt. Defined as the truth value of a stereo composite image Igt Joint filtering based on dimension transformation:
[0018] in, M h [ n [] represents the pixel values of a row or column in the hole mask image. a ∈ (0, 1) are the feedback coefficients of the diffusion function, and d represents the neighboring samples in the dimensionality transformation domain of the filter. xn and xn The distance between -1. ct ( u Let ) represent the dimensionality transformation domain in the joint filter. Then the dimensionality transformation process is as follows:
[0019] in, Igt ( x ) The gradient intensity represents the ground truth value of the stereo composite image. ss and σr These are the filter space and range parameters, used to adjust the effect of filtering. ss The value range is 200~2500. σr The value range is 0.1 to 10.
[0020] Generally speaking, in a classic DIBR system, the hole problem is the most critical issue currently facing DIBR technology. As the rendering baseline widens and the orientation angle between cameras increases, the hole area will increase. Therefore, filling these hole areas caused by occlusion in a visually believable way has become an important issue in virtual viewpoint compositing and a key technology affecting the compositing results.
[0021] Common algorithms for filling holes in virtual viewpoints fall into two main categories: depth preprocessing and hole filling after 3D transformation. The first category employs preprocessing strategies, filtering the depth map to reduce discontinuities in the depth mapping. This reduces the generation of holes in subsequent virtual viewpoint synthesis. Early methods used Gaussian filters to smooth the depth image. The main drawback of this method is that it may introduce additional geometric distortion. To address this, several methods have been proposed, including asymmetric smoothing and adaptive filters based on scene structure or content. Nevertheless, geometric distortion remains unavoidable in some regions with large depth gradients. The second category employs post-processing strategies, focusing on virtual image inpainting after DIBR. In these methods, traditional algorithms fill holes by utilizing auxiliary information near the missing region through texture copying or structural continuation after DIBR. However, image inpainting is inherently challenging, and content inpainting in stereo vision is even more difficult because image features need to conform to stereo constraints between the two generated views; deep learning-based inpainting strategies, which have emerged in recent years, represent another important research direction. However, current research shows that existing deep learning-based inpainting methods rely on general image inpainting techniques and are not specifically optimized for stereo composite images. To better address this issue, the method of this invention incorporates specific scene constraints, enabling these methods to better fill holes in stereo composite images.
[0022] Compared with the prior art, the beneficial effects of the present invention are: This invention addresses the insufficient constraints of existing deep learning-based image inpainting methods when dealing with holes in stereo composite images. Specifically, it proposes a hole-filling method for stereo virtual images based on a directional scene influence distribution map. First, a framework model consisting of a scene cue extraction network and a texture reconstruction network is constructed. The scene cue extraction network predicts and generates a directional scene influence distribution map based on the extracted scene layer distribution map. The texture reconstruction network is a generative adversarial network consisting of a generator network and a discriminator network. The generator network fuses the directional scene influence distribution map and uses it as a soft feature constraint to further optimize the final stereo composite image after hole filling. The discriminator network judges the quality of the generated image. The result image generated by the generator network is the final repaired image. Targeting the distribution characteristics of holes in stereo images, a progressive network structure is constructed to first extract the scene influence distribution map and then use it as explicit semantic guidance information for filling content to further optimize the hole-filling process of the stereo composite image. This effectively solves the confusion problem caused by unclear semantics of the filling region in existing networks during the repair process, improving the rendering effect of 3D virtual images. Compared with the invention patents listed in the background art, this application uses the influence diffusion map as a clue. It can construct a progressive network structure based on the distribution characteristics of holes in the stereoscopic image to first extract the scene influence distribution map, and then use it as explicit semantic guidance information for filling content to further optimize the hole filling of the stereoscopic composite image. The influence diffusion map is filtered and has a deeper level, so it will be more precise in guiding the hole filling, thereby effectively solving the confusion problem caused by the unclear semantics of the filling area in the repair process of existing networks, and improving the rendering effect of 3D virtual images. Attached Figure Description
[0023] Figure 1 is a schematic diagram of the stereoscopic vision virtual image hole filling method provided by the present invention; Figure 2 is a schematic diagram of the network framework model for hole repair in stereoscopic synthetic images provided by the present invention; Figure 3 is a schematic diagram of a stereoscopic virtual image of the right eye containing holes, synthesized using the standard DIBR algorithm; Figure 4 is a schematic diagram of the restoration effect obtained by applying a conventional image restoration method as an example; Figure 5 This is a schematic diagram of the repair effect obtained after training a model, as provided by the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0025] Figure 1 shows a schematic diagram of the principle structure of the stereoscopic vision virtual image hole filling method provided by the present invention, which specifically includes the following steps: S1: Construct a framework model consisting of a scene cue extraction network and a texture reconstruction network; S2: Perform end-to-end hole-filling training on the framework model to obtain the hole-filling framework network; S3: Put the stereo composite image that needs to be repaired and the hole mask into the hole filling framework network for repair to obtain the generated image.
[0026] The scene cue extraction network can predict and generate a directional scene influence distribution map based on the extracted scene layer distribution map; the texture reconstruction network is a generative adversarial network consisting of a generator network and a discriminator network. The generator network is used to fuse the directional scene influence distribution map and use it as a soft feature constraint of the scene to further optimize the final stereoscopic synthetic image after filling the holes. The discriminator network is used to judge the quality of the generated image.
[0027] The resulting image generated by the generator network is the final repaired image. Based on the distribution characteristics of holes in the stereo image, a progressive network structure is constructed to first extract the scene influence distribution map, and then use it as explicit semantic guidance information for filling content to further optimize the hole filling process of the stereo composite image. This effectively solves the confusion problem caused by unclear semantics of the filling area in the repair process of existing networks, and improves the rendering effect of 3D virtual images.
[0028] Specifically, the generators in the scene cue extraction network and texture reconstruction network are encoder-decoder network structures, including an encoding module and a decoding module; the encoding module downsamples twice, with eight dilated convolutional layers connected sequentially in between; the decoding module upsamples twice; and the discriminator network consists of five stacked convolutional layers. Figure 2 The diagram shows the network structure used in this invention, where the input is the stereo composite image to be repaired and the hole mask, and the output is the final repaired stereo composite image.
[0029] The network was trained and inferred using a computer. Under experimental conditions of an Intel(R) Xeon(R) Gold5122 CPU @ 3.60GHz, an NVIDIA Quadro GV100 GPU, 24GB of RAM, and an Ubuntu 18.04 operating system, the implementation used Python 3.6 and the Tensorflow 1.2.1 deep learning framework. The data used was based on the Middlebury stereo database. Each sample set in this database contains left and right eye images and their corresponding depth maps. A virtual right eye image with holes was synthesized from the left eye image and its corresponding depth map in each sample set using the standard DIBR algorithm. Simultaneously, a mask for the holes was obtained. These two types of data were used as input to the network, while the right eye image from the original dataset was used as the ground truth during network training. 27280 small-resolution samples with a resolution of 256*256 were segmented from the original dataset, thus creating the dataset.
[0030] The framework model is trained end-to-end to obtain a hole-filling framework network, including the following steps: S21. Input the stereo composite image with holes, the hole mask image, and the extracted scene layer distribution map into the scene cue extraction network to obtain the directional scene influence distribution map; S22. Input the stereo composite image with holes, the hole mask image, and the directional scene influence distribution map into the generator of the texture reconstruction network to obtain the generated image; S23. The generated image, the hole mask image, and the holeless stereo composite image as the ground truth are used as inputs to the discriminator network; S24. Alternately train the generator network and discriminator network in the texture generation network. When the loss functions of the generator network and the discriminator network tend to stabilize, the hole-filling framework network for the final stereoscopic synthetic image is obtained.
[0031] The loss functions of the generator network and the discriminator network include: LG = LG 1 + LG 2; LG 1 = λconLcon ; LG 2 = λadvLadv + λpercLperc + λstyleLstyle ; LD = _ [ Hey ~ P ( Y )[log D ( y , Mh )]+ Ex ~ P ( X )[log (1 _ D ( G ( x , Mh ), Mh ))]]] Where LG is the loss function of the generator network; LG1 is the main loss function; LG2 is the auxiliary loss function; Lcon is the content loss function; Lperc is the perceptual loss; Lstyle is the style loss; and Ladv is the adversarial loss. λcon , l adv , λperc , λstyle is the balance factor; LD is the loss function of the discriminator network; x is the stereo composite image with holes; y is the stereo composite image without holes, which serves as the ground truth. MhThis is a binary hole mask matrix; 1 represents the hole region; 0 represents other regions. y ~ P ( Y () is the true image from P ( Y (Sampling was performed in stages) x ~ P ( X () is the true image from P ( X (Sampling was performed in stages.) Balance factor λcon , λadv , λperc , λstyle The ranges are [0.5,5], [0.05,0.5], [0.05,0,5], [100,500], and the balance factors are set to 1, 0.1, 0.1, and 200, respectively, showing good robustness. The main loss function LG1 plays a dominant role in network training, primarily affecting the filling and restoration of texture structures in hole regions, while the auxiliary loss function LG2 plays a further optimization role, enabling the filled regions to achieve better visual effects. In this example, the auxiliary loss function LG2 includes three parts: perceptual loss Lperc, style loss Lstyle, and adversarial loss Ladv. Since... LG 2. It only plays an auxiliary role. In actual use, you can choose any of the three parts.
[0032] The content loss function Lcon is defined as follows:
[0033] in, . Euclidean distance. L1 This represents the stereo composite image after hole filling in the output of the texture reconstruction network. Iw and the hole-free stereo composite image as the truth value Igt Euclidean distance, L2 This represents the distribution of the targeted scene influence output by the scene cue extraction network. Sw and its truth value Sgt. Euclidean distance. Y 1, Y 2 is the balance factor, and the balance factor is set to 1:1.
[0034] The scene layer distribution map is defined as follows:
[0035] The scene layer distribution map is represented as follows: ξc , p For a pixel in the image,pl for p The left pixel, pr for p The right pixel, Δ (.) is the Laplacian operator, Δ ( M h) represents the extracted hole mask boundary, and sgn(.) represents the predefined sign function. When the processed stereo vision virtual image is a right-eye image, sgn( p ) = 1, when the processed stereoscopic virtual image is the left eye image, sgn( p = 0. The layer boundary of the foreground and background is often located on one side of the hole edge. If the stereo composite image is a right-eye composite image, the layer boundary is located on the left side of the hole edge; if the stereo composite image is a right-eye composite image, the layer boundary is located on the left side of the hole edge. This invention uses this constraint to enhance the training of the directional scene influence distribution map.
[0036] The true value of the directional scene influence distribution map Sgt. Defined as the truth value of a stereo composite image Igt Joint filtering based on dimension transformation:
[0037] in, M h [ n [] represents the pixel values of a row or column in the hole mask image. a ∈ (0, 1) are the feedback coefficients of the diffusion function, and d represents the neighboring samples in the dimensionality transformation domain of the filter. xn and xn The distance between -1. The dimensional transformation domain here is the transformation space obtained using the method proposed by Eduardo SL Gastal et al. in their 2011 paper "Domain transform for edge-aware image and video processing". Its greatest advantage is that it reduces a multi-dimensional space to a one-dimensional space while preserving image texture features, thus greatly improving computational efficiency. Specifically, ct ( u Let ) represent the dimensionality transformation domain in the joint filter. Then the dimensionality transformation process is as follows:
[0038] in, Igt ( x ) The gradient intensity represents the ground truth value of the stereo composite image. ss and σrThese are the filter space and range parameters, used to adjust the effect of filtering. ss The value range is 200~2500. σr The value range is 0.1 to 10.
[0039] As shown in Figure 3 to Figure 5 The figures show the results of a set of experimental image processing. Figure 3 shows a right-eye stereoscopic virtual image synthesized using the standard DIBR algorithm. It can be seen that the missing areas (black areas) to be filled mainly appear at the boundary between the foreground object and the background scene. The areas circled in boxes in Figures 4 and 5 are the regions of interest in this experiment. Figure 4 shows the restoration effect obtained by a general image inpainting algorithm based on deep learning. Although this method achieved good results in the image completion experiment, in this experiment, due to the lack of constraints, some missing areas were repaired using information from multiple surrounding regions, including foreground region information, within the area shown in the box in Figure 4, leading to semantic logic errors in the restoration result. Figure 5 shows the restoration effect obtained after training the model using the method of this invention. It can be seen that compared with Figure 4, the restoration effect is more stable. During training, background region information was emphasized to repair more missing areas, thus avoiding semantic logic errors. Therefore, the method proposed in this invention plays a significant role in improving the quality of 3D visual effects.
[0040] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.
Claims
1. A method for filling holes in a stereoscopic virtual image, characterized in that, Includes the following steps: S1: Construct a framework model consisting of a scene cue extraction network and a texture reconstruction network. The scene cue extraction network predicts and generates a directional scene influence distribution map based on the extracted scene layer distribution map. The texture reconstruction network is a generative adversarial network consisting of a generator network and a discriminator network. The generator network is used to fuse the directional scene influence distribution map and use it as a scene soft feature constraint to further optimize the final stereo composite image after filling the holes. The discriminator network is used to judge the quality of the generated image. S2: Perform end-to-end hole-filling training on the framework model to obtain the hole-filling framework network; S3: The stereo composite image to be repaired and the hole mask are put into the hole filling framework network for repair to obtain the generated image; Step S2 involves end-to-end hole-filling training of the framework model to obtain the hole-filling framework network, specifically including the following steps: S21. Input the stereo composite image with holes, the hole mask image, and the extracted scene layer distribution map into the scene cue extraction network to obtain the directional scene influence distribution map; S22. Input the stereo composite image with holes, the hole mask image, and the directional scene influence distribution map into the generator network of the texture reconstruction network to obtain the generated image. S23. The generated image, the hole mask image, and the holeless stereo composite image as the ground truth are used as inputs to the discriminator network; S24. Alternately train the generator network and discriminator network in the texture reconstruction network. When the loss functions of the generator network and the discriminator network tend to stabilize, the hole-filling framework network of the final stereoscopic synthetic image is obtained.
2. The method for filling holes in a stereoscopic virtual image according to claim 1, characterized in that: The generator network in the scene cue extraction network and texture reconstruction network is an encoder-decoder network structure, including an encoding module and a decoding module; the encoding module downsamples twice, with eight dilated convolutional layers connected in between; the decoding module upsamples twice; the discriminator in the texture reconstruction network is composed of five stacked convolutional layers.
3. The method for filling holes in a stereoscopic virtual image according to claim 1, characterized in that: The loss function of the generator network is: ; ; ; in, L G The loss function for the generator network; L G1 The principal loss function; L G2 As an auxiliary loss function; L con For content loss function; L perc To perceive loss; L style For style loss; L adv To combat the losses; It is a balancing factor.
4. The method for filling holes in a stereoscopic virtual image according to claim 1, characterized in that: The loss function of the discriminator network is: ; in, L D y is the loss function of the discriminator network; x is the stereo composite image with holes; y is the stereo composite image without holes, which serves as the ground truth. M h is a binary hole mask matrix; 1 represents the hole region; 0 represents other regions; y~P(Y) is the hole-free stereo composite image sampled from distribution P(Y) as the ground truth; x~P(X) is the stereo composite image with holes sampled from distribution P(X).
5. The method for filling holes in a stereoscopic virtual image according to claim 3, characterized in that: The content loss function L con Defined as: in, . For Euclidean distance, L 1 represents the stereo composite image after hole filling in the output of the texture reconstruction network. I w and the hole-free stereo composite image as the truth value I gt Euclidean distance, L 2 represents the distribution of the targeted scene influence output by the scene cue extraction network. S w and its truth value S gt Euclidean distance, It is a balancing factor.
6. The method for filling holes in a stereoscopic virtual image according to claim 1, characterized in that: The scene layer distribution map is defined as follows: The scene layer distribution map is represented as follows: , For a pixel in the image, for The left pixel, for The right pixel, For the Laplace operator, M represents the boundary of the extracted hole mask. h This is a binary hole mask matrix. This represents a predefined symbolic function, used when the processed stereoscopic virtual image is a right-eye image. When the processed stereoscopic vision virtual image is a left-eye image .
Citation Information
Patent Citations
Method, device, apparatus and medium for image synthesis and image synthesis model training
CN109472764A
Depth image fusion method applicable for depth image-based rendering (DIBR) preprocessing process
CN106791770A
Stereoscopic vision virtual image hole filling method and system
CN114841871A
