Neural rendering method and system based on global semantic information and local geometric perception

By using global semantic information and local geometry perception in the new view synthesis technology, extracting multi-scale features and combining it with the Transformer encoder, the problem of insufficient rendering quality and generalization ability in the existing technology is solved, and the problem of insufficient generalization ability in complex scenes is achieved. High-quality image rendering and better generalization capabilities.

CN118587340APending Publication Date: 2024-09-03COMMUNICATION UNIVERSITY OF CHINA
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410029171.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-08
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing new view synthesis technologies have shortcomings in rendering quality and generalization capabilities. Especially when processing complex scenes and high-resolution images, it is difficult to generate high-quality images, and the generalization capabilities are poor, resulting in different scenes and conditions. The composite result may exhibit color distortion or shape distortion.

Method used

A neural rendering method based on global semantic information and local geometry perception is used to extract large, medium and small scale features from multiple input images through a multi-scale feature extraction network, combined with the Transformer encoder to obtain global features, and use epipolar geometric constraints to calculate The local features of the sampling points are finally input into the view synthesis module to generate images from a new perspective.

Benefits of technology

It improves the rendering quality and generalization ability of images under new perspectives, and can generate more realistic synthetic images in complex scenes and multi-scale structures. It is suitable for the rendering needs of a variety of different scenes and perspectives, and reduces development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587340A
    Figure CN118587340A
Patent Text Reader

Abstract

The invention provides a neural rendering method and system based on global semantic information and local geometric perception. The method comprises the following steps: extracting multi-scale image features from a plurality of input images; utilizing the multi-scale image features and the three-dimensional space coordinates of the sampling points to respectively obtain local features and global features corresponding to the sampling points; and sending the local features, the global features and the position codes of the sampling points into a preset view synthesis module for view rendering, and generating an image under a new view angle. According to the method, scene information is captured on different scales by using a multi-scale feature map training model through a view synthesis model architecture with a multi-level structure, and local features are assisted by global features, so that the quality of a synthesized image is improved, and particularly, the image quality is improved under the condition that a complex scene or a multi-scale structure exists. The view consistency of the scene and generalization among different scenes can be better ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology under the field of artificial intelligence technology, and more specifically, to a neural rendering method and system based on global semantic information and local geometric perception. Background Art

[0002] Neural rendering technology is a technology that uses deep neural networks to solve the problem of new view synthesis. It has a wide range of applications in the fields of 3D reconstruction, virtual reality, and augmented reality, such as panoramic stage and metaverse scene construction. Among them, the new view synthesis task refers to the process of rendering and generating the corresponding image of the target posture based on the given source image, source posture, and target posture. Traditional view synthesis technology usually requires a lot of manual engineering and parameter adjustment, and has certain limitations in processing complex scenes and depth perception. With the continuous development of multimedia technology, people have higher and higher requirements for video quality and content, and are paying more and more attention to the interaction and visual sensory experience of videos. Two-dimensional flat videos lack the depth information of objects in nature, which will make people's vision lack of stereoscopic depth and produce distortion. Therefore, in practical applications, there is an urgent need for generalizable neural rendering methods to achieve new view generation at low cost and high quality.

[0003] The existing research on neural rendering methods for view synthesis mainly focuses on the following three directions: image rendering speed, rendered image quality, and model generalization ability. Among them, for real-time or interactive applications, the runtime latency of some neural rendering technologies may be high, resulting in a decline in user experience. Therefore, the image rendering speed is particularly important for applications such as virtual reality and augmented reality. Neural rendering technology sometimes generates artifacts or pseudo-structures. Especially when dealing with complex scenes or large changes in perspective, these artifacts may reduce the authenticity and quality of the synthesized image. Therefore, improving the quality of the rendered image is also one of the research focuses of existing neural rendering for view synthesis. Some neural rendering technologies may have poor generalization ability outside of the training data. This means that in different environments or conditions, the synthesis results may have problems, such as color distortion or shape deformation. Therefore, the generalization ability of the model is also an improvement direction that cannot be ignored in the research of neural rendering for view synthesis.

[0004] The new view synthesis task belongs to the task of combining computer vision and computer graphics, and its purpose is to generate scene images from unseen perspectives. Mildenhall et al. proposed neural radiance fields for the first time to use implicit representation to achieve photo-level new view synthesis effects, and used multi-layer perceptrons to fit a continuous function to implicitly learn a static three-dimensional scene, but it has problems such as poor generalization, large computational complexity, only for static scenes, and slow training and inference speed. Yu et al. proposed pixelNeRF, which uses convolutional neural networks to extract image features of reference views as prior conditions to achieve generalization of new scenes, but this method uses absolute position and direction as input, which greatly reduces the generalization effect of the scene. Similarly, IBRNet also uses deep features and volume rendering similar to neural radiance fields to learn to mix colors for each point in the light from adjacent views. IBRNet uses the difference between view directions as MLP input. Although it is better than absolute coordinates, the relative view direction still depends on the scene-specific global reference frame. Chen et al. proposed MVSNeRF, which constructs cost volumes from deep visual features. It is a new local representation method that takes the position and direction of spatial coordinate points as input to achieve model generalization. The SRT method proposed by Sajjadi et al. also uses a new view synthesis model based on image self-supervision. The NLF proposed by Suhail et al. uses an attention-based framework to display Figure 1 A consistent light field, where the first Transformer independently aggregates information on the epipolar lines, and the second Transformer fuses the epipolar features. A year later, the team proposed GPNR to achieve cross-view communication through an attention mechanism, adding a new Transformer for predicting the target color. In addition, the GNT method studied at the same time as GPNR also used an attention-based neural rendering architecture. Unlike GPNR, GNT optimizes the encoding method, thereby enjoying a cleaner design space. At the same time, GNT simplifies the three-stage synthesis process of GPNR and uses a two-stage synthesis method.

[0005] The above methods use different scene representations to make the model generalize, but except for SRT, they only use local geometric features and have weak generalization ability on complex scenes. The SRT model only uses global semantic information, and the model is limited to low-resolution images (maximum size is 178×128 pixels), which has a huge amount of computation and memory usage on high-resolution images. Therefore, how to effectively improve the rendering quality and generalization ability of new view synthesis tasks has become one of the key research directions in the field of new view synthesis. Summary of the invention

[0006] In view of the above-mentioned problems of low rendering quality and poor generalization in the current field of new view synthesis, the purpose of the present invention is to provide a generalizable neural rendering solution based on global semantic information and local geometric perception to improve the rendering quality of images under new perspectives and achieve generalization effects between different scenes.

[0007] In one aspect, the present invention provides a neural rendering method based on global semantic information and local geometric perception, comprising the following steps:

[0008] S110: extracting multi-scale image features from a plurality of input images; wherein the multi-scale includes a large scale, a medium scale and a small scale, and the plurality of input images are a preset number of images selected from a plurality of images of known viewing angles in a current scene;

[0009] S120: using the image features at the large scale, according to a preset Transformer encoder, to obtain the global features of the current scene; and using the image features at the medium scale and small scale and the three-dimensional space coordinates of the sampling points, respectively, according to epipolar geometric constraints, to obtain the local features of the sampling points at the medium scale and small scale;

[0010] S130: Sending the local features, global features and position codes of the sampling points corresponding to the sampling points to a preset view synthesis module for view rendering to generate an image under a new viewing angle; wherein the position codes of the sampling points are obtained by performing sine and cosine coding on the three-dimensional spatial coordinates of the sampling points.

[0011] Among them, an optional solution is that the multi-scale image features are extracted based on a preset multi-scale feature extraction network; wherein the multi-scale feature extraction network is constructed based on a multi-layer network hierarchy structure of downsampling layers, convolution layers, normalization layers and activation layers;

[0012] The multiple input images are sequentially passed through network layers of different resolutions to increase the receptive field layer by layer, and the feature maps of different scales output by each layer are integrated to form feature atlases at three scales: large scale, medium scale, and small scale as the multi-scale image features.

[0013] Among them, an optional solution is that the method for extracting sampling points includes: generating a light ray corresponding to each pixel point in the target view image according to the camera position information of the target view angle; and extracting sampling points at different depths of the light ray.

[0014] Among them, an optional solution is that the method for extracting the sampling points includes:

[0015] Generate a two-dimensional coordinate grid (u, v) using the width and height of the target view image, covering all pixels of the target view image;

[0016] The direction of the light corresponding to each pixel in the two-dimensional coordinate grid is calculated using the rotation matrix in the camera extrinsic matrix of the target viewing angle and the inverse matrix of the intrinsic matrix; and the origin coordinates of the light corresponding to each pixel in the two-dimensional coordinate grid are calculated using the translation matrix in the camera extrinsic matrix of the target viewing angle and the inverse matrix of the intrinsic matrix;

[0017] Uniformly sampling at different depths of the light to extract sampling points on the mesoscale; and adaptively sampling the light to extract sampling points on the small scale according to the importance distribution of a preset mesoscale network output.

[0018] Among them, an optional solution is that the local features at the mesoscale and small scale corresponding to the sampling points are obtained by respectively using the image features at the mesoscale and small scale and the three-dimensional space coordinates of the sampling points according to the epipolar geometric constraints, including:

[0019] The multi-scale image features and the three-dimensional spatial coordinates of the sampling points are used to calculate the mapping of each sampling point on different input images at medium scale and small scale according to the epipolar geometric constraints to obtain the eigenvalue corresponding to each sampling point; the eigenvalue corresponding to each sampling point is cascaded with the RGB value of each pixel to obtain the eigenvalue of each sampling point on the medium scale and small scale feature maps as the local feature corresponding to each sampling point.

[0020] Among them, an optional scheme is that the large-scale image features are used to obtain the global features of the current scene according to a preset Transformer encoder, including: using a preset global feature extraction Transformer, dividing the image features at the large scale corresponding to each input image into two-dimensional windows, and calculating the self-attention within each two-dimensional window to obtain the intermediate features of each input image; stacking the intermediate features of each input image into three-dimensional intermediate features, and dividing them into three-dimensional grids, and calculating the attention within the three-dimensional grid between each input image at a preset interval; based on the self-attention within each two-dimensional window and the attention within the three-dimensional grid, obtaining the global features of the current scene.

[0021] The present invention also provides a neural rendering system based on global semantic information and local geometric perception, which uses the neural rendering method based on global semantic information and local geometric perception as described above to perform new view synthesis, including:

[0022] A multi-scale feature extraction unit, used to extract multi-scale image features from a plurality of input images; wherein the multi-scale includes a large scale, a medium scale and a small scale, and the plurality of input images are a preset number of images selected from a plurality of images of known viewing angles in a current scene;

[0023] A local feature acquisition unit, used to respectively use the image features at the mesoscale and small scale and the three-dimensional space coordinates of the sampling points to obtain the local features at the mesoscale and small scale corresponding to the sampling points according to the epipolar geometric constraints;

[0024] A global feature acquisition unit, used to obtain the global features of the current scene according to a preset Transformer encoder using the image features at the large scale;

[0025] A view rendering unit is used to send the local features, global features and position codes of the sampling points corresponding to the sampling points to a preset view synthesis module for view rendering to generate an image under a new viewing angle; wherein the position codes of the sampling points are obtained by performing sine and cosine coding on the three-dimensional spatial coordinates of the sampling points.

[0026] It can be seen from the above technical solutions that the neural rendering method and system based on global semantic information and local geometric perception provided by the present invention, by providing a new model architecture with a multi-level structure for view synthesis, enables the multi-scale feature map training model to capture scene information at different scales; at the same time, the global features are used to assist the local features in view synthesis, which helps to improve the quality of the synthesized image, especially in complex scenes or in the presence of multi-scale structures, and can better ensure the view of the scene. Figure 1 Consistency allows the model to perform global reasoning, thus having better generalization capabilities. It can achieve better image rendering quality in complex scenes, occlusion of translucent objects and objects, large scale changes, etc. It is suitable for rendering needs of a variety of different scenes and perspectives, reducing repeated R&D work in different fields and reducing development costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] By referring to the following description in conjunction with the accompanying drawings, and with a more comprehensive understanding of the present invention, other objects and results of the present invention will become more clear and easy to understand. In the accompanying drawings:

[0028] Figure 1 A schematic diagram of a flow chart of a neural rendering method based on global semantic information and local geometric perception according to an embodiment of the present invention;

[0029] Figure 2 A schematic diagram of a framework of a neural rendering network based on global semantic information and local geometric perception according to an embodiment of the present invention;

[0030] Figure 3 A schematic diagram of the framework structure of a neural rendering system based on global semantic information and local geometric perception according to an embodiment of the present invention;

[0031] Figure 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In the following description, for the purpose of illustration, in order to provide a comprehensive understanding of one or more embodiments, many specific details are set forth. However, it is apparent that these embodiments may also be implemented without these specific details. In other examples, for ease of describing one or more embodiments, known structures and devices are shown in the form of block diagrams.

[0033] For the synthesis of new views, existing research has proposed many ways to represent the geometric features of scenes, such as hash grids, cost volumes, etc. These representations have their own advantages in different scenarios. However, the existing geometric feature representation methods usually only include local geometric feature representations. When synthesizing new views, objects may occlude each other, or there may be transparent objects, resulting in low image rendering quality in complex scenes (for example, objects with occlusion relationships, transparent objects, etc.). How to deal with these situations to produce realistic synthetic images is a problem that needs to be solved in the synthesis of new views. In addition, existing new view synthesis methods usually only perform feature matching at a single feature scale, lacking understanding of objects or elements of different scales in the scene, resulting in insufficient understanding of the model and low rendering quality in scenes with multi-scale structures. For the generation of objects at long and short distances, scenes with multi-scale structures, etc., how to improve visual realism is another problem that needs to be solved in the synthesis of new views.

[0034] In view of the problems existing in the above-mentioned existing new view synthesis schemes, the present invention provides a generalizable neural rendering method based on global semantic information and local geometric perception, so as to improve both generalization capability and image quality to overcome the above-mentioned technical problems and realize efficient, high-quality and generalizable new view synthesis.

[0035] In order to better illustrate the technical solution of the present invention, some technical terms involved in the present invention are briefly explained below.

[0036] Neural rendering: Neural rendering technology uses various deep neural networks for image synthesis. Through an automated process, it allows the machine to understand the actual shape and physical state (e.g. material, lighting) of objects in the photo in three-dimensional space, and realizes all or part of the modeling and rendering functions in graphics rendering, which can save a lot of time and energy of practitioners.

[0037] Artifact: Also known as artifact, refers to an image that does not exist but appears on the image. In the present invention, it can be simply understood as the difference between the rendered image and the actual image.

[0038] Epipolar geometry constraints: When two cameras are used to shoot the same scene at the same time, epipolar geometry constraints can reflect the positional relationship of points of the same object in different camera images. That is, if the position of a point in one image is known, epipolar geometry constraints can help predict its possible position in another image. And these possible positions are all on a straight line, which is also called an epipolar line.

[0039] In order to solve the problem that existing view synthesis methods are difficult to deal with complex scenes such as occlusion relationships and transparent objects, the present invention uses semantic information with a global receptive field to assist local geometric features in understanding scene information, allowing the model to perform global reasoning. This not only has the advantage of stronger generalization ability, but also makes the model more efficient. At the same time, the present invention proposes a new network model for new view synthesis. The model has three levels: large, medium and small. Image features of different scales are extracted through a multi-scale feature extraction network, which has three scales of large, medium and small. The view synthesis network is trained at multiple scales, allowing the model to capture information in the scene at different scales, from details to overall structure, so that the model can understand the scene more comprehensively. This helps to improve the quality of synthesized images, especially in complex scenes or in the presence of multi-scale structures.

[0040] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0041] It should be noted that the following description of the exemplary embodiments is merely illustrative and is not intended to limit the present invention and its application or use. Technologies and devices known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, the technologies and devices should be considered as part of the specification.

[0042] In order to illustrate the neural rendering method and system based on global semantic information and local geometric perception provided by the present invention, Figure 1 , Figure 2 The neural rendering method flow based on global semantic information and local geometric perception and the network structure adopted in the embodiments of the present invention are respectively exemplarily indicated. It should be noted that the drawings and the embodiments described below are only some implementations of the present invention and are not intended to limit the present invention. For ordinary technicians in this field, other drawings and implementations can be obtained based on these drawings and implementations without creative work.

[0043] The above steps will be described in detail below in conjunction with the network structure adopted by the present invention.

[0044] refer to Figure 1 The neural rendering method based on global semantic information and local geometric perception provided in this embodiment includes the following steps:

[0045] S110: extracting multi-scale image features from a plurality of input images; wherein the multi-scale includes a large scale, a medium scale and a small scale, and the plurality of input images are a preset number of images selected from a plurality of images of known viewing angles in a current scene;

[0046] S120: using the large-scale image features, according to a preset Transformer encoder, to obtain the global features of the current scene; and using the medium-scale and small-scale image features and the three-dimensional space coordinates of the sampling points, respectively, according to epipolar geometric constraints, to obtain the medium-scale and small-scale local features corresponding to the sampling points;

[0047] S130: Sending the local features, global features and position codes of the sampling points corresponding to the sampling points to a preset view synthesis module for view rendering to generate an image under a new viewing angle; wherein the position codes of the sampling points are obtained by performing sine and cosine coding on the three-dimensional spatial coordinates of the sampling points.

[0048] In addition, before extracting multi-scale image features, a step of acquiring image data of multiple input images required in acquisition step S110 may also be included. Specifically, as an example, in the image data acquisition step, multiple images of known perspectives in the current scene uploaded by the user are acquired, such as 8-10 images; in addition, it is also necessary to acquire camera pose information corresponding to the perspective of the image uploaded by the user (also provided by the user), and the camera pose information includes camera intrinsic parameters and camera extrinsic parameters.

[0049] In step S110, a preset multi-scale feature extraction network can be used to extract multi-scale image features from multiple input images. Specifically, as an example, the present invention builds a multi-scale feature extraction network based on a hierarchical structure such as a convolution layer and an activation layer, and the multi-scale feature extraction network is built based on a multi-layer network hierarchical structure of a downsampling layer, a convolution layer, a normalization layer and an activation layer. Multiple input images are used as source images and sequentially pass through network layers of different resolutions. After a convolution block (including a convolution layer, a normalization layer and an activation layer) performs convolution and other operations on the source image, an image feature f1 at a small scale is obtained, and then f1 is downsampled, and the above convolution operation is repeated using another convolution block to obtain an image feature f2 at a medium scale. Similarly, an image feature f3 at a large scale can also be obtained, so that the receptive field is increased layer by layer through the downsampling operation, and finally image features at three scales of receptive field, namely, large scale, medium scale and small scale, are obtained. Integrate the feature maps of different scales output by each layer to form feature maps at multiple resolutions at three scales: large scale, medium scale, and small scale, as multi-scale image features for subsequent feature alignment and pixel value generation. The calculation formula is as follows:

[0050]

[0051] Among them, FeatureNet is the feature extraction network, i represents the i-th level network, I t represents the t-th source image.

[0052] In this embodiment, a preset multi-scale feature extraction network is used for feature extraction, which is to extract features of the entire image only for objects of different scales in the entire image, which is recorded as feature 1 here, and its purpose is to better learn the feature information of objects of different scales in the scene through the multi-scale feature extraction network. Compared with extracting features only under one receptive field, this feature extraction method of this embodiment can better include object information at different scales in the scene with multi-scale image features.

[0053] The sampling point extraction method used in step S120 includes:

[0054] S121: Generate light corresponding to each pixel in the target view image according to the camera position information of the target view angle;

[0055] S122: Extracting sampling points at different depths of the light.

[0056] More specifically, as an example, the present invention uses the width and height of the target view to generate a two-dimensional coordinate grid (u, v), covering all pixels of the target view image. Then, the rotation matrix in the camera extrinsic matrix of the target view and the inverse matrix of the intrinsic matrix are used to calculate the direction of the light corresponding to each pixel in the two-dimensional coordinate grid, and the translation matrix in the camera extrinsic matrix of the target view and the inverse matrix of the intrinsic matrix are used to calculate the origin coordinates of the light corresponding to each pixel in the two-dimensional coordinate grid; finally, an appropriate number of sampling points are taken on these generated rays within a specified depth range. Specifically, it includes: uniformly sampling and extracting the sampling points on the mesoscale at different depths of the ray; and, according to the importance distribution of the preset mesoscale network output, adaptively sampling the ray to extract the sampling points on the small scale. Taking the three-layer network structure as an example, 192 sampling points are sampled on the large-scale layer, 96 sampling points are sampled on the mesoscale layer, and 48 sampling points are sampled on the small-scale layer. Then the three-dimensional spatial coordinates of the corresponding sampling points are calculated for subsequent feature extraction and calculation of position information.

[0057] Specifically, as an example, the three-dimensional space coordinates of the sampling point are calculated as follows:

[0058] According to the specified depth range, the farthest depth distance is recorded as d far , the nearest depth distance is recorded as d near, the number of sampling points is recorded as M, and the origin ray_o and direction ray_d of the light have been calculated in the previous step. First, M depths are uniformly sampled within the specified depth range, then the sampling interval δ=(d far -d near ) / M, the array formed by all sampling depth values ​​arranged from small to large is recorded as t, and finally the three-dimensional spatial coordinates of the sampling point are calculated by the formula x=ray_o+t*ray_d.

[0059] In step S120, using the image features at the middle scale and small scale in the multi-scale feature map set obtained in the aforementioned step S110, and according to the three-dimensional spatial coordinates of the extracted sampling points, according to the epipolar geometric constraints, first calculate the mapping of each sampling point on different input images at the middle scale and small scale to obtain the eigenvalue corresponding to each sampling point; then cascade the eigenvalue with the RGB value of each pixel point to obtain the eigenvalue of each sampling point on the feature map of different scales as the local features at the middle scale and small scale corresponding to the sampling point. The eigenvalues ​​on the feature maps of different scales will be used to train the generation networks of different resolutions. Specifically, as an example, the process of calculating the mapping of each sampling point on the feature maps of different scales is as follows:

[0060] The sampling point coordinates are x, the multiple source camera parameters are t_cs, the multiple source view images are t_ims, and the feature map is feat;

[0061] First, expand the coordinate x to the homogeneous coordinate x_h, that is, add a 1 after each point coordinate;

[0062] Next, use the source camera parameter t_cs matrix to perform matrix operations to project the coordinate point x_h from the world coordinate system to the camera coordinate system, and calculate its projection coordinate x_p under multiple views; at the same time, use the depth information of the projection coordinates to calculate a valid mask mask to mark which points are within the visible range of the camera;

[0063] Finally, the sampling function is used to sample the source image t_ims and the projection coordinate x_p of the feature map feat to obtain the eigenvalue and RGB value corresponding to each sampling point.

[0064] The local features in this embodiment are obtained by projection mapping under epipolar geometric constraints using a sampling point coordinate calculated in advance based on the mesoscale and small-scale features under the multi-scale image features (feature 1). Since it only includes the features at the sampling point location and can only reflect the local information of the image, it is called a local feature, which is recorded as feature 2 here.

[0065] The global features of the current scene correspond to the local features of the specific sampling points mentioned above. The global features in the present invention are image features calculated using a preset Transformer encoder based on the large-scale features under the aforementioned multi-scale image features (feature 1), which are recorded here as feature 3.

[0066] Feature 2 (local feature) and feature 3 (global feature) in the present invention will both be used as inputs of the pixel generation transformer to jointly determine the color of the final target light.

[0067] In step S120, it also includes using the large-scale features under the multi-scale image features to obtain the global features of the current scene according to a preset Transformer encoder.

[0068] The method of obtaining global features does not rely on epipolar geometric constraints. The preset global feature extraction Transformer is used to divide the image features at the large scale corresponding to each source image (input image) into two-dimensional windows, and calculate the self-attention in each two-dimensional window to obtain the intermediate features of each source image; the intermediate features of each source image are stacked into three-dimensional intermediate features and divided into three-dimensional grids, and the attention in the three-dimensional grid between each source image is calculated at a preset interval; finally, based on the self-attention in each two-dimensional window and the attention in the three-dimensional grid, the global features of the current scene are obtained, thereby achieving the purpose of calculating the self-attention of the entire image, so it is a global feature about the current scene.

[0069] In the present invention, the global feature is equivalent to the global semantic information of the source image, and the local feature is equivalent to the local geometric perception of the source image. Moreover, from the above-mentioned methods of obtaining local features and global features, it can be seen that the local features and global features are independent of each other in terms of acquisition and have no dependency. The present invention uses global semantic information to assist local geometric features as input for neural rendering and is used for new view synthesis tasks, which helps to improve the quality of the synthesized image, especially in complex scenes or in the presence of multi-scale structures, and can better ensure the visual quality of the scene. Figure 1 Consistency.

[0070] In step S130, the local features and global features corresponding to the sampling points obtained in step S120 and the position codes of the sampling points are sent to a preset view synthesis module for view rendering to generate an image under a new viewing angle.

[0071] The position coding of the sampling point is obtained by performing sine and cosine coding on the three-dimensional spatial coordinates of the sampling point. Specifically, as an example, the specific method of performing position coding on the three-dimensional spatial coordinates of the sampling point obtained above includes: for the horizontal coordinate and the vertical coordinate of each pixel, applying the sine and cosine functions to generate the position coding respectively. The mathematical expression is as shown in formula (4-2):

[0072]

[0073] in, represents the encoding value of the t-th coordinate in the sequence on the i-th dimension, t represents the position of the coordinate in the entire sequence, i represents the encoding dimension, sin(·) is the sine function, cos(·) is the cosine function, and w k Indicates the frequency used in the current encoding dimension. The positional encoding will be stored in the system in the form of a tensor, and its shape and size are (number of rays, number of sampling points on each ray, number of dimensions). Adding positional encoding helps the model better understand and utilize the positional information of the input data, thereby improving the quality and accuracy of the synthesis results. This is particularly beneficial for tasks that process multi-view, multi-scale and complex scenes. In this embodiment, the view synthesis module is a pre-trained deep neural network, specifically composed of a multi-layer Transformer network. Specifically, as an example, the multi-layer Transformer network is divided into two categories, the first category is used to aggregate image features between different input images, and the second category is used to predict the target color. These two types of Transformers are alternately stacked to form a Transformer block, the final view synthesis module, which is used for the aggregation of local features in the dimension of the number of source images and for calculating the color of light through feature and positional encoding.

[0074] Before rendering the view through the view synthesis module, the local features obtained in step S120 need to be further processed to obtain intermediate features after aggregation along the reference view dimension. The intermediate features are obtained by the local features through the feature matching transformer. Specifically, as an example, the feature dimension is standardized using the fully connected layer, and the image features corresponding to the sampling points are aggregated along the preset reference view dimension using the feature matching transformer to obtain the aggregated intermediate feature value; the calculation formula is as follows:

[0075]

[0076] Among them, F i(x, θ) represents the intermediate feature value of the point with coordinate x and direction θ in the i-th level network. FeatTransformer is a Transformer encoder. i represents the level of the network, N represents the number of input images, Π(.) is the coordinate position encoding process of the sampling point, θ is the direction of the light, and f represents the image feature corresponding to the input sampling point.

[0077] For example: Assuming that the target image has 4096 pixels, 4096 rays need to be generated under the corresponding target view, and 64 points are sampled on each ray. At this time, the dimension of the sampling point coordinates is (4096, 64, 3), where 3 represents the xyz coordinate. Assuming that there are 10 input source images in total, there will be 10 image features (for simplicity, we only discuss the case of network level 1 here). In addition, each sampling point will have a local feature at a corresponding position on each image feature. At this time, the dimension of the local feature is (4096, 64, 10, C), where C is the number of channels. The local features will be sent to the feature matching Transformer and weighted summed on the dimension of the number of 10 input views. The weights will be obtained by Transformer deep learning. The dimension of the intermediate features output by the feature matching Transformer is (4096, 64, 1, C). Finally, the aggregated intermediate feature values ​​are concatenated with the generated position encoding and sent to the pixel generation transformer together with the global features as the input of the self-attention calculation. Through the pixel generation transformer, the intermediate features, global features and position encoding are used to generate the color of the target light and realize the rendering of the view.

[0078] Specifically, as an example, the global features, intermediate features, and position encoding of the sampling points are used as the input of the pixel generation transformer, and the target light features at the current scale are output; the calculation formula is as follows:

[0079]

[0080] Among them, PixelTransformer i is the Transformer encoder under the i-th level network, i represents the level of the network, Π(.) is the coordinate position encoding of the sampling point, It represents the intermediate eigenvalue of the point with coordinate x and direction θ under the i-th level network. It is a global feature.

[0081] Finally, the target light features at the current scale are upsampled and concatenated with the high-resolution features and passed through a fully connected layer to obtain the color of the target light.

[0082] Since position encoding, global features, and intermediate features are stored in the form of tensors in the program, tensors can also be regarded as multidimensional matrices. Their shapes are (number of rays, number of sampling points, number of channels 1) and (number of rays, number of sampling points, number of channels 2), respectively. Cascading is to concatenate two tensors on the number of channels into a tensor, whose shape and size are (number of rays, number of sampling points, number of channels 1 + number of channels 2).

[0083] In the present invention, the introduction of position encoding helps the neural network to better understand the geometric structure and spatial arrangement of the input data, thereby improving the network's resistance to transformation of the input data and improving the generalization performance. In addition, it can be seen from the above embodiments that, unlike other existing rendering methods that generally only use local features, the present invention additionally uses global features, so it is a method based on global semantic information and local geometric perception.

[0084] In the above embodiment, three types of Transformers are used, namely, Transformer for global feature generation, feature matching Transformer, and pixel generation Transformer; the first type of Transformer is used in the feature extraction stage, and there is only one, that is, global features are extracted only once for the image. The method for generating global features is shown above. The latter two types of Transformers are used in the view synthesis module. These two types of Transformers will cross-stack multiple Transformer blocks to form a Transformer block, which are used for aggregation of local features in the dimension of the number of source images and calculation of light color through feature and position encoding.

[0085] It can be seen from the above embodiments that, in order to solve the above technical problems existing in the prior art, the present invention mainly realizes neural rendering based on global semantic information and local geometric perception by combining a feature extraction network with a view generation network. Figure 2 FIG. 4 shows a neural rendering network structure based on global semantic information and local geometric perception according to an embodiment of the present invention. Figure 2 As shown, the present invention uses a multi-level network architecture to perform view synthesis. The source image is subjected to layer-by-layer feature extraction by the feature extraction network, and the extracted features are input into the view synthesis network for multi-scale training, and finally the target image is output.

[0086] As an example, after the target image is output, an image / video saving step is also included, which is used to save the final result using a preset image / video so that the user can apply the above output result according to his own image rendering needs. The neural rendering method based on global semantic information and local geometric perception provided by the present invention provides a new model architecture with a multi-level structure for view synthesis, so that the multi-scale feature map training model captures scene information at different scales, which helps to improve the quality of the synthesized image, especially in complex scenes or in the presence of multi-scale structures, and can better ensure the view of the scene. Figure 1 In addition, the method of using global features to assist local features in view synthesis allows the model to perform global reasoning, thereby having better generalization ability. It can also achieve better image rendering quality in complex scenes, occlusion of translucent objects and objects, large scale changes, etc., and can be applied to rendering needs of a variety of different scenes and perspectives.

[0087] Corresponding to the above-mentioned neural rendering method based on global semantic information and local geometric perception, the present invention also provides a neural rendering system based on global semantic information and local geometric perception. Figure 3 The framework structure of the neural rendering system based on global semantic information and local geometric perception according to an embodiment of the present invention is shown. Figure 3 As shown, the neural rendering system 600 based on global semantic information and local geometric perception of this embodiment mainly includes three parts: a multi-scale feature extraction unit 610, a local feature acquisition unit 621, a global feature acquisition unit 622 and a view rendering unit 630. The corresponding system architecture is a universal procedural system, which is divided into three stages: feature extraction, model training and view generation.

[0088] The multi-scale feature extraction unit 610 is used to extract multi-scale image features from multiple input images; wherein the multi-scale includes large scale, medium scale and small scale, and the multiple input images are a preset number of images selected from multiple images of known viewing angles in the current scene;

[0089] A local feature acquisition unit 621 is used to obtain the local features at the mesoscale and small scale corresponding to the sampling points according to the epipolar geometric constraints by using the image features at the mesoscale and small scale and the three-dimensional space coordinates of the sampling points respectively;

[0090] A global feature acquisition unit 622 is used to obtain the global features of the current scene by using the image features at the large scale and extracting the global features according to a preset global feature extraction Transformer encoder;

[0091] The view rendering unit 630 is used to send the local features, global features and position codes of the sampling points corresponding to the sampling points to a preset view synthesis module for view rendering to generate an image under a new viewing angle; wherein the position codes of the sampling points are obtained by performing sine and cosine coding on the three-dimensional spatial coordinates of the sampling points.

[0092] In addition, as an example, the neural rendering system 600 based on global semantic information and local geometric perception may further include a multi-scale feature extraction network training unit and a sampling point extraction unit (not shown in the figure).

[0093] Among them, as an example, the scale feature extraction network training unit is used to train a multi-scale feature network, which is used to extract multi-scale image features from multiple input images. The multi-scale feature extraction network is built based on a multi-layer network hierarchy structure of downsampling layer, convolution layer, normalization layer and activation layer; the multiple input images pass through network layers of different resolutions in turn, increasing the receptive field layer by layer, integrating feature maps of different scales output by each layer, and forming a feature atlas set at multiple resolutions as the multi-scale image features.

[0094] The sampling point extraction unit is used to generate a ray corresponding to each pixel point in the target view image according to the camera position information of the target view angle; and then extract sampling points at different depths of the ray.

[0095] More specifically, as an example, the sampling point extraction unit further includes:

[0096] A two-dimensional coordinate grid generating subunit, used to generate a two-dimensional coordinate grid (u, v) by using the width and height of the target view image, covering all pixels of the target view image;

[0097] A pixel parameter calculation subunit, used to calculate the direction of the light corresponding to each pixel in the two-dimensional coordinate grid using the rotation matrix in the camera extrinsic matrix of the target viewing angle and the inverse matrix of the intrinsic matrix; and to calculate the origin coordinates of the light corresponding to each pixel in the two-dimensional coordinate grid using the translation matrix in the camera extrinsic matrix of the target viewing angle and the inverse matrix of the intrinsic matrix;

[0098] The extraction subunit is used to uniformly sample and extract the sampling points on the mesoscale at different depths of the light; and to adaptively sample and extract the sampling points on the small scale of the light according to the importance distribution of the preset mesoscale network output.

[0099] The local feature acquisition unit 621 further includes:

[0100] The epipolar geometric constraint subunit is used to calculate the mapping of each sampling point on different input images at medium scale and small scale according to the epipolar geometric constraint by using the multi-scale image features and the three-dimensional spatial coordinates of the sampling points, so as to obtain the eigenvalue corresponding to each sampling point;

[0101] The cascade subunit is used to cascade the feature value corresponding to each sampling point with the RGB value of each pixel point to obtain the feature value of each sampling point on the feature map of different scales as the local feature corresponding to each sampling point.

[0102] The global feature acquisition unit 622 further includes:

[0103] A window division subunit is used to use a preset global feature extraction Transformer to divide the image features at the large scale corresponding to each input image into two-dimensional windows, and calculate the self-attention in each two-dimensional window to obtain the intermediate features of each input image;

[0104] A grid division unit stacks the intermediate features of each input image into three-dimensional intermediate features and divides them into three-dimensional grids, calculates the attention within the three-dimensional grid between each input image at a preset interval; based on the self-attention within each two-dimensional window and the attention within the three-dimensional grid, obtains the global features of the current scene.

[0105] As an example, the neural rendering system 600 based on global semantic information and local geometric perception further includes an intermediate feature value acquisition unit, which is used to normalize the feature dimension using a fully connected layer, and to aggregate the image features corresponding to the sampling points along the dimension of a preset reference view using a feature matching Transformer to obtain an aggregated intermediate feature value; the calculation formula is as follows:

[0106]

[0107] Among them, F i (x, θ) represents the intermediate feature value of the point with coordinate x and direction θ in the i-th level network. FeatTransformer is a Transformer encoder. i represents the level of the network, N represents the number of input images, Π(.) is the coordinate position encoding process of the sampling point, θ is the direction of the light, and f represents the image feature corresponding to the input sampling point.

[0108] For other implementation details of the neural rendering system based on global semantic information and local geometric perception, reference may be made to the aforementioned description of the embodiment of the neural rendering method based on global semantic information and local geometric perception, which will not be described in detail here.

[0109] like Figure 4 As shown, the present invention also provides an electronic device, the electronic device comprising:

[0110] at least one processor; and,

[0111] a memory communicatively connected to at least one processor; wherein,

[0112] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the steps in the aforementioned neural rendering method based on global semantic information and local geometric perception.

[0113] It can be understood by those skilled in the art that Figure 4 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0114] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0115] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0116] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0117] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0118] The neural rendering program 12 based on global semantic information and local geometric perception stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0119] S110: extracting multi-scale image features from a plurality of input images; wherein the multi-scale includes a large scale, a medium scale and a small scale, and the plurality of input images are a preset number of images selected from a plurality of images of known viewing angles in a current scene;

[0120] S120: using the large-scale image features, according to a preset Transformer encoder, to obtain the global features of the current scene; and using the medium-scale and small-scale image features and the three-dimensional space coordinates of the sampling points, respectively, according to epipolar geometric constraints, to obtain the medium-scale and small-scale local features corresponding to the sampling points;

[0121] S130: Sending the local features, global features and position codes of the sampling points corresponding to the sampling points to a preset view synthesis module for view rendering to generate an image under a new viewing angle; wherein the position codes of the sampling points are obtained by performing sine and cosine coding on the three-dimensional spatial coordinates of the sampling points.

[0122] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0123] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0124] As described above with reference to the accompanying drawings, the neural rendering method and system based on global semantic information and local geometric perception proposed according to the present invention are described by way of example. However, those skilled in the art should understand that various improvements can be made to the neural rendering method and system based on global semantic information and local geometric perception proposed in the present invention without departing from the content of the present invention. Therefore, the scope of protection of the present invention should be determined by the content of the attached claims.

Claims

1. A neural rendering method based on global semantic information and local geometric perception, characterized in that: The steps include: S110: extracting multi-scale image features from a plurality of input images; wherein the multi-scale includes a large scale, a medium scale and a small scale, and the plurality of input images are a preset number of images selected from a plurality of images of known viewing angles in a current scene; S120: using the large-scale image features, according to a preset Transformer encoder, to obtain the global features of the current scene; and using the medium-scale and small-scale image features and the three-dimensional space coordinates of the sampling points, respectively, according to epipolar geometric constraints, to obtain the medium-scale and small-scale local features corresponding to the sampling points; S130: Sending the local features, global features and position codes of the sampling points corresponding to the sampling points to a preset view synthesis module for view rendering to generate an image under a new viewing angle; wherein the position codes of the sampling points are obtained by performing sine and cosine coding on the three-dimensional spatial coordinates of the sampling points.

2. The neural rendering method based on global semantic information and local geometric perception as claimed in claim 1, characterized in that: The multi-scale image features are extracted based on a preset multi-scale feature extraction network; wherein the multi-scale feature extraction network is constructed based on a multi-layer network hierarchy structure of downsampling layers, convolution layers, normalization layers and activation layers; The multiple input images are sequentially passed through network layers of different resolutions to increase the receptive field layer by layer, and the feature maps of different scales output by each layer are integrated to form feature atlases at three scales: large scale, medium scale, and small scale as the multi-scale image features.

3. The neural rendering method based on global semantic information and local geometric perception as claimed in claim 1, characterized in that: The method for extracting the sampling points comprises: Generate light corresponding to each pixel in the target view image according to the camera position information of the target view angle; Sample points are extracted at different depths of the ray.

4. The neural rendering method based on global semantic information and local geometric perception as claimed in claim 3, characterized in that: The method for extracting the sampling points comprises: Generate a two-dimensional coordinate grid (u, v) using the width and height of the target view image, covering all pixels of the target view image; The direction of the light corresponding to each pixel point in the two-dimensional coordinate grid is calculated using the rotation matrix in the camera extrinsic matrix of the target viewing angle and the inverse matrix of the intrinsic matrix; and the origin coordinates of the light corresponding to each pixel in the two-dimensional coordinate grid are calculated using the translation matrix in the camera extrinsic matrix of the target viewing angle and the inverse matrix of the intrinsic matrix; Uniformly sampling at different depths of the light to extract sampling points on the mesoscale; and adaptively sampling the light to extract sampling points on the small scale according to the importance distribution of a preset mesoscale network output.

5. The neural rendering method based on global semantic information and local geometric perception as claimed in claim 4, characterized in that: The method of respectively using the image features at the mesoscale and small scale and the three-dimensional space coordinates of the sampling points to obtain the mesoscale and small scale local features corresponding to the sampling points according to the epipolar geometric constraints includes: Using the multi-scale image features and the three-dimensional spatial coordinates of the sampling points, the mapping of each sampling point on different input images at medium and small scales is calculated according to the epipolar geometric constraints to obtain the eigenvalue corresponding to each sampling point; The characteristic value corresponding to each sampling point is cascaded with the RGB value of each pixel point to obtain the characteristic value of each sampling point on the small and medium scale feature map as the local feature corresponding to each sampling point.

6. The neural rendering method based on global semantic information and local geometric perception as claimed in claim 4, characterized in that: The utilizing the large-scale image features and obtaining the global features of the current scene according to a preset Transformer encoder includes: Using a preset global feature extraction Transformer, the image features at the large scale corresponding to each input image are divided into two-dimensional windows, and the self-attention in each two-dimensional window is calculated to obtain the intermediate features of each input image; The intermediate features of each input image are stacked into three-dimensional intermediate features, and divided into three-dimensional grids, and the attention within the three-dimensional grid between each input image is calculated at a preset interval; Based on the self-attention within each two-dimensional window and the attention within the three-dimensional grid, a global feature of the current scene is obtained.

7. The neural rendering method based on global semantic information and local geometric perception according to claim 5 or 6, characterized in that: The sine-cosine encoding of the three-dimensional spatial coordinates of the sampling points includes: For the horizontal and vertical coordinates of each pixel, the sine and cosine functions are applied to generate the position code respectively; the mathematical expression is as follows: in, represents the encoding value of the t-th coordinate in the sequence on the i-th dimension, t represents the position of the coordinate in the entire sequence, i represents the encoding dimension, sin(·) is the sine function, cos(·) is the cosine function, and w k Indicates the frequency of the current coding dimension; The generated position encoding will be used as input for the self-attention computation.

8. The neural rendering method based on global semantic information and local geometric perception as claimed in claim 7, characterized in that: Before using the preset view synthesis module for view rendering, it also includes: The fully connected layer is used to normalize the feature dimension, and the feature matching Transformer is used to aggregate the image features corresponding to the sampling points along the dimension of the preset reference view to obtain the aggregated intermediate feature value; the calculation formula is as follows: Among them, F i (x,θ) represents the intermediate feature value of the point with coordinate x and direction θ in the i-th level network. FeatTransformer is a Transformer encoder. i represents the level of the network, N represents the number of input images, Π(.) is the coordinate position encoding process of the sampling point, θ is the direction of the light, and f represents the image feature corresponding to the input sampling point.

9. The neural rendering method based on global semantic information and local geometric perception as claimed in claim 8, characterized in that: The global feature, the intermediate feature value and the position encoding of the sampling point are used as the input of the pixel generation transformer, and the target light feature at the current scale is output; The calculation formula is as follows: Among them, PixelTransformer i is the Transformer encoder under the i-th level network, i represents the level of the network, Π(.) is the coordinate position encoding of the sampling point, It represents the intermediate eigenvalue of the point with coordinate x and direction θ under the i-th level network. It is a global feature; The target light features at the current scale are upsampled and concatenated with the high-resolution features, and then pass through a fully connected layer to obtain the color of the target light.

10. A neural rendering system based on global semantic information and local geometric perception, using the neural rendering method based on global semantic information and local geometric perception as described in any one of claims 1 to 9 to perform new view synthesis, comprising: A multi-scale feature extraction unit, used to extract multi-scale image features from a plurality of input images; wherein the multi-scale includes a large scale, a medium scale and a small scale, and the plurality of input images are a preset number of images selected from a plurality of images of known viewing angles in the current scene; A local feature acquisition unit, used to respectively use the image features at the mesoscale and small scale and the three-dimensional space coordinates of the sampling points to obtain the local features at the mesoscale and small scale corresponding to the sampling points according to the epipolar geometric constraints; A global feature acquisition unit, used to obtain the global features of the current scene by using the image features at the large scale and extracting the global features of the current scene according to a preset global feature extraction Transformer encoder; A view rendering unit is used to send the local features, global features and position codes of the sampling points corresponding to the sampling points to a preset view synthesis module for view rendering to generate an image under a new viewing angle; wherein the position codes of the sampling points are obtained by performing sine and cosine coding on the three-dimensional spatial coordinates of the sampling points.

Citation Information

Cited By

  • Sparse new view angle image synthesis method based on multi-scale feature fusion

    CN119762358A

  • Dynamic three-dimensional scene reconstruction and rendering system, method and related equipment

    CN120198601A