Multi-scene multi-view image generation model, method and equipment and storage medium

By modifying the position coding and loss function of the NeRF neural network to support multi-scene image modeling, it solves the problem of only single-scene modeling in the existing technology, achieves efficient generation of multi-scene and multi-view images, and is suitable for multi-scene image modeling. Scene architectural design and other applications.

CN118736133APending Publication Date: 2024-10-01SICHUAN COLLEGE OF ARCHITECTURAL TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410903422.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing NeRF neural network can only be used for 3D reconstruction of a single scene and cannot achieve image modeling of multiple scenes. This results in the need to train multiple networks when needed in fields such as architectural design, which increases costs and workload.

Method used

By modifying the position encoding and loss functions of NeRF to ensure that the position encoding vectors of multiple scenes are orthogonal, and introducing a multi-scene differential loss function, the same NeRF neural network can generate images of multiple scenes.

Benefits of technology

It is possible to use the same set of neural networks and weights to generate multi-view images of multiple scenes, reducing training costs and improving efficiency, and is suitable for multi-scene architectural design and other applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736133A_ABST
    Figure CN118736133A_ABST
Patent Text Reader

Abstract

The invention provides a multi-scene multi-view image generation model, method and device and a storage medium. The model building method comprises the following steps: training a neural network based on multi-scene multi-view image data; wherein in the processing of the position coding of the neural network, the position coding vectors of the plurality of scenes are orthogonal; the difference between the pictures generated by the neural network and the target scene is as small as possible and the difference between the pictures and the non-target scene is as large as possible; and after the training is qualified, obtaining the multi-scene multi-view image generation model. The multi-scene multi-view image generation method is realized based on the established model. The computer equipment comprises a processor, instructions used for executing the method are stored, and the program instructions are executed by the processor. The storage medium stores computer program instructions for implementing the method when the computer program instructions are executed by the processor. According to the method, the capability of an original NeRF algorithm / neural network is expanded, and pictures of multiple scenes can be generated through the same NeRF neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a multi-scene and multi-view image generation model, method, device and storage medium. Background Art

[0002] In the fields of architectural design and construction, interior decoration, etc., it is often necessary to obtain 3D digital information of a space or scene or images from a specific perspective. Traditional solutions often involve manual measurement and drawing, or using equipment such as laser radar to scan the precise 3D position and size information of the scene, and then digitize the space and scene in 3D to obtain images from multiple perspectives. However, such solutions often require a huge workload, high investment and cost, and poor usability.

[0003] In recent years, with the rapid development of neural network technology, the powerful representation ability of neural networks can be used to reconstruct three-dimensional space using less multi-view image information. In 2020, Google proposed a method that uses scene information taken by multiple cameras of the same camera, combined with the position and orientation (pose) information of the camera when shooting, to implicitly represent the three-dimensional information of the scene using a neural network. Specifically, the input of the network is the pose of the camera, and the output is the two-dimensional projection of the three-dimensional space seen by the camera. That is, for the trained network, any camera pose information can be input to output the corresponding three-dimensional perspective image. Using this method in interior design can greatly reduce the cost of scene digitization and achieve rapid three-dimensional reconstruction of the scene.

[0004] Neural network radiation field (NeRF) technology mainly inputs any camera posture and outputs a two-dimensional image under the camera lens. The neural network includes a training phase, which trains the neural network based on the posture and the two-dimensional image under the posture. The existing NeRF neural network training process is as follows: Figure 1 As shown. The input is a limited number of camera poses and the corresponding real images in the poses. After the NeRF neural network is calculated, the predicted RGBS values ​​are obtained. The predicted RGBS values ​​are then compared with the RGBS of the real image to obtain the loss of this round, and the loss is fed back to the neural network module for weight update. When the NeRF neural network training is completed, any camera pose is input to output the scene image in the pose. At this point, the NeRF neural network can be considered as a three-dimensional implicit modeling of the scene.

[0005] It should be noted that the input set of a limited number of poses and corresponding images need to be obtained in the same scene, such as different images of the same object taken at different positions by a camera. Therefore, the NeRF neural network model obtained by the existing NeRF neural network training method can only be used to model the information of a certain scene, and it is impossible to achieve the same NeRF neural network modeling of multiple scenes. Summary of the invention

[0006] The purpose of the present invention is to solve at least one of the above-mentioned deficiencies in the prior art. For example, one of the purposes of the present invention is to expand the NeRF neural network to support multi-scene and multi-view images.

[0007] In order to achieve the above objectives, the present invention provides a method for establishing a multi-scene and multi-view image generation model.

[0008] The establishment method may include the steps of: training a neural network based on multi-scene and multi-perspective image data; wherein, in the processing of position coding of the neural network, the position coding vectors of the multiple scenes are orthogonal; the image generated by the neural network is not only as different from the target scene as possible but also as different from the non-target scene as possible; after the training is qualified, the multi-scene and multi-perspective image generation model is obtained.

[0009] In this embodiment, the image data of each viewing angle of each scene may include: posture data and a real image in a corresponding relationship.

[0010] In this embodiment, the set of pose data for each scene can be expressed as (x k ,y k , z k , m k , n k ); where, for the position parameter (x k ,y k , z k ), use formula 1 to process the position encoding:

[0011] Formula 1 is: k (p)=(sin((K t 0 +k)πp), cos((K t 1 +k)πp),...,(sin((K t L-1 +k)πp), cos((K t L-1 +k)πp);

[0012] Among them, p∈(x k ,yk , z k ), k is the phase shift, γ k (p) is the encoded position vector; L is a positive integer, indicating the dimension to be expanded; the base K t Take any value greater than the number of scenes K, K t 0 , K t 1 , …, K t L-1 is the fundamental frequency of the tth group.

[0013] In this embodiment, the direction parameter (m k , n k The process of position encoding may include: using the following formula to convert the polar coordinates (m k , n k ) is converted into space coordinates:

[0014] x′ k = sin(m k )*cos(n k ),

[0015] y′ k = sin(m k )*sin(n k ),

[0016] z′ k =cos(m k );

[0017] The transformed spatial coordinates are then encoded using the formula 1.

[0018] Furthermore, the value of L in Formula 1 used in this step may be the same as or different from the value of L in Formula 1 used to encode the position parameter.

[0019] In this embodiment, the loss function L2 can be used to achieve the maximum possible difference between the image generated by the neural network and the non-target scene, wherein the loss function L2 is:

[0020]

[0021] Among them, r and r t are the perspective data of any two different scenes; R1 and R2 are the perspective data sets of any two different scenes; and Respectively represent the rough prediction value and fine prediction value after the neural network; C(r t ) is the actual pixel value, including RGB and transparency.

[0022] In this embodiment, the neural network may be a neural network commonly used in the art, for example, a ResNet / fully connected NeRF neural network, or may be implemented based on other neural network structures, such as Transformer, Swin-Transformer, etc.

[0023] Another aspect of the present invention provides a multi-scene and multi-view image generation model.

[0024] The model is obtained by the establishment method described above.

[0025] Another aspect of the present invention provides a method for generating multi-scene and multi-view images.

[0026] The method can be implemented based on the multi-scene multi-view image generation model as described above.

[0027] Yet another aspect of the present invention provides a computer device.

[0028] The device includes: at least one processor; a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing a method for establishing a multi-scene multi-view image generation model according to the above-mentioned multi-scene multi-view image generation model, or instructions for executing the above-mentioned multi-scene multi-view image generation method.

[0029] Yet another aspect of the present invention provides a computer-readable storage medium.

[0030] A computer program is stored on the medium, and when the computer program is executed by the processor, it implements the method for establishing the multi-scene multi-view image generation model or the multi-scene multi-view image generation method.

[0031] Compared with the prior art, the beneficial effects of the present invention include: the present invention expands the capabilities of the original NeRF algorithm / neural network by modifying the original NeRF position encoding and the form of the loss function, so that pictures of multiple scenes can be generated using the same NeRF neural network. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and other objects and / or features of the present invention will become more apparent through the following description in conjunction with the accompanying drawings, in which:

[0033] Figure 1 A schematic diagram of the existing NeRF neural network training process is shown.

[0034] Figure 2 Another schematic diagram of the existing NeRF neural network training process is shown.

[0035] Figure 3 A schematic diagram of the NeRF neural network training process of the present invention is shown. DETAILED DESCRIPTION

[0036] Hereinafter, the present invention will be described in detail with reference to exemplary embodiments.

[0037] Exemplary Embodiment 1

[0038] NeRF neural network has a powerful ability for 3D reconstruction. By inputting several pictures of the same scene taken by the same camera from different perspectives, the scene can be reconstructed. However, the existing NeRF network can only correspond one NeRF neural network to one 3D scene. In actual architectural design applications, it is often necessary to quickly generate pictures of different perspectives of multiple scenes. The traditional method can only be achieved by training multiple NeRF neural networks. The present invention improves the structure of the existing NeRF neural network to support the generation of multi-scene and multi-perspective perspective pictures under the same set of neural network structures and weights.

[0039] This exemplary embodiment mainly expands the existing NeRF neural network, mainly including the expansion of position encoding, the expansion of input and output, and the expansion of loss function, so that it can support multi-scene and multi-perspective images, expand the capacity of the neural network model, and facilitate practical applications.

[0040] This exemplary embodiment provides a method for establishing a multi-scene multi-view image generation model, the method comprising the steps of:

[0041] Image data of multiple scenes and multiple perspectives are collected, wherein the image data of each perspective of each scene includes posture data and a real image in a corresponding relationship.

[0042] Based on the collected image data, the NeRF neural network is used for training; in the processing of the position coding of the NeRF neural network, the position coding vectors of multiple scenes are orthogonal, that is, the coding vectors of different scenes are mutually orthogonal. The coding vector specifically refers to the vector obtained by the position coding, which is γ in the following text. k (p) The generated multidimensional vector corresponding to the spatial position xyz and the angle mn. The image generated by the NeRF neural network is not only as small as possible from the target scene but also as different as possible from the non-target scene.

[0043] After the training is qualified, the model is obtained.

[0044] In this embodiment, the multi-scene multi-view image data can be acquired by a camera. The camera's position and posture can be represented by a quinary number (x, y, z, m, n), where (x, y, z) represents a three-dimensional coordinate point, and (m, n) represents the azimuth and pitch angle of the camera. The image seen in this position and posture can be represented by a pixel set, and each pixel can be represented by (R, G, B, S), where R, G, and B represent the three color components of red, green, and blue, and S represents the opacity of the pixel.

[0045] In this embodiment, each scene includes multiple perspective data, and the pose data set of each scene is represented as (x k ,y k ,z k ,m k ,n k ), namely each perspective data included in the k-th scene, the subscript k represents the index of the scene, and each scene includes multiple perspective data.

[0046] For position parameters (x k, y k , z k ), use the following formula to process the position encoding:

[0047] γ k (p)=(sin((K t 0 +k)πp), cos((K t 0 +k)πp),...,(sin((K t L-1 +k)πp), cos((K t L-1 +k)πp);

[0048] Among them, p∈(x k ,y k , z k ), k is the phase shift, γ k (p) is the encoded position vector; L is a positive integer, indicating the dimension to be expanded; the base K t , can take any value greater than the number of scenes K, K t 0 , K t 1 , …, K t L-1 Represents the tth group of fundamental frequencies. Compared with the 2^x exponential fundamental frequencies of the existing NeRF, the fundamental frequencies are expanded here, and t represents the index of the fundamental frequency group.

[0049] In this embodiment, for the direction parameter (m k , nk ), the process of position encoding includes:

[0050] First, the polar coordinates (m k , n k ) into space coordinates:

[0051] x′ k = sin(m k )*cos(n k ),

[0052] y′ k = sin(m k )*sin(n k ),

[0053] z′ k =cos(m k );

[0054] Then for each x k ,y k and z k Using the above γ k (p) is encoded.

[0055] The value of L is consistent with the above γ k (p) L in the formula may be different or the same.

[0056] In this embodiment, the loss function L2 is used to ensure that the image generated by the NeRF neural network is as different from the non-target scene as possible.

[0057]

[0058] Among them, r and rt are the perspective data of two different scenes; R1 and R2 are any two different scene perspective data sets; and Respectively represent the rough prediction value and fine prediction value after the neural network, C(r t ) is the actual pixel value, including RGB and transparency.

[0059] In this embodiment, the loss function L1 is used to ensure that the difference between the image generated by the NeRF neural network and the target scene is as small as possible. L1 may be a loss function in an existing NeRF neural network.

[0060]

[0061] Among them, r is a ray in R1, which can be represented by quinary numbers and corresponds to a pixel point in the image; R1 is the set of rays from the camera to the object corresponding to all pixel points; and They represent the coarse prediction value and fine prediction value after the neural network respectively, and C(r) is the actual pixel value, including RGB and transparency.

[0062] The loss function L1 represents minimizing the difference between the pixel value predicted by the neural network and the actual pixel value. After learning processes such as back propagation of the neural network, the output of the neural network continues to approach the true value.

[0063] Exemplary Embodiment 2

[0064] Compared to Figure 2 The training process of the existing NeRF neural network shown in the figure is mainly different from the present exemplary embodiment in that the position coding and loss function are two links. Among them, the position coding is used in both the training and reasoning (image generation) stages, and the loss function is only used in the training stage. Among them, reasoning mainly refers to the process of generating the corresponding image using the neural network after the model is trained, and the position coding part of the present invention can be applied.

[0065] Taking four scenarios as an example, the NeRF neural network training process scheme for processing multiple scenarios of the present invention is as follows: Figure 3 As shown. It includes the pose sets corresponding to the four scenes and the image sets under the corresponding poses. It should be noted that the poses correspond to the images under the poses one by one, and the pose of a certain scene corresponds to the image set of a certain scene. Taking the four scenes as an example, the NeRF neural network training process of this exemplary embodiment includes the steps of: inputting the camera poses of multiple scenes and the corresponding real images under different poses, Figure 3 The NeRF neural network shown in the figure calculates the predicted RGBS value, compares the predicted RGBS value with the RGBS of the real image, obtains the loss of this round, and feeds the loss back to Figure 3 The neural network shown in the figure is used to update the weights; after training, the accuracy of the model is verified. If the accuracy is above the predetermined value, the model is a multi-scene multi-view image generation model, otherwise, the model is returned to continue training until it is qualified.

[0066] Compared with the existing NeRF neural network training process, the present invention has two main differences:

[0067] (1) Positional encoding

[0068] The existing NeRF position encoding mainly expands the traditional 3D position vector to 60 dimensions, increasing the neural network's ability to resolve high-frequency components of images.

[0069] The position encoding scheme proposed in this invention is mainly to achieve the orthogonality of the camera pose vectors in different scenes, so that the features of each scene can be effectively separated in the subsequent network processing. Assuming that there are K scenes in total, the pose set of each scene is represented by (x k ,y k , z k , m k , n k ), with positional parameters (x k ,y k , z k ) as an example, the position encoding is processed as follows:

[0070] γ k (p)=(sin((K t 0 +k)πp), cos((K t 1 +k)πp),...,(sin((K t L-1

[0071] +k)πp), cos((K t L-1 +k)πp)

[0072] Where L is a positive integer, indicating the dimension to be expanded. The base K in the above formula t , can take any value greater than the number of scenes K.

[0073] For the direction parameter (m k , n k ) is processed similarly to the position parameter, that is, the direction parameter / polar coordinate is first converted into the spatial x, y, z coordinate, and then the position encoding is performed. The L values ​​corresponding to the direction parameter and the position parameter can be the same or different.

[0074] (2) Loss Function

[0075] The loss function in the existing NeRF only includes the recovery performance. The present invention will introduce another item, namely the difference between multiple scene images. That is, it is hoped that the image generated by the neural network will have as little difference as possible with the target scene and as much difference as possible with the non-target scene. Specifically, the difference with the target scene is as small as possible, and the existing loss function can be used, namely

[0076]

[0077] The difference between non-target scenes is as large as possible, which can be expressed by the following formula:

[0078]

[0079] The overall loss function of the neural network is: L=L1+L2.

[0080] Exemplary Embodiment 3

[0081] This exemplary embodiment provides a multi-scene multi-view image generation model, which is obtained by the establishment method described in exemplary embodiment 1 or 2.

[0082] Example 4

[0083] This exemplary embodiment provides a multi-scene multi-view image generation method, characterized in that the method is implemented based on the multi-scene multi-view image generation model described in exemplary embodiment 3.

[0084] Exemplary Embodiment 5

[0085] This exemplary embodiment provides a multi-scene multi-view image generation method, characterized in that the method is implemented based on a NeRF neural network, wherein in the position coding process of the NeRF neural network, the position coding vectors of multiple scenes are orthogonal.

[0086] Specifically, the pose data set of each scene is represented as (x k ,y k ,z k ,m k ,n k );in,

[0087] For position parameters (x k ,y k ,z k ) and direction parameters (m k ,n k ), the encoding process can be performed using the same method as in exemplary embodiment 1 or 2.

[0088] The method for establishing a multi-scene multi-view image generation model or the multi-scene multi-view image generation method according to the present invention can be programmed as a computer program and the corresponding program code or instructions can be stored in a computer-readable storage medium. When the program code or instructions are executed by a processor, the processor executes the above method. The following processor and memory can be included in a computer device.

[0089] Exemplary Embodiment 6

[0090] This exemplary embodiment provides a computer device, including:

[0091] at least one processor;

[0092] A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for executing the method for establishing a multi-scene multi-view image generation model according to exemplary embodiment 1 or 2, or instructions for executing the multi-scene multi-view image generation method according to exemplary embodiment 4 or 5.

[0093] Example 7

[0094] The present exemplary embodiment provides a computer-readable storage medium.

[0095] A computer program is stored on the storage medium, and when the computer program instructions are executed by the processor, the method for establishing a multi-scene multi-view image generation model as described in exemplary embodiment 1 or 2 is implemented, or the multi-scene multi-view image generation method as described in exemplary embodiment 4 or 5 is implemented.

[0096] The computer-readable storage medium may be any data storage device that stores data that can be read by a computer system. For example, examples of computer-readable storage media may include: read-only memory, random access memory, read-only optical disk, magnetic tape, floppy disk, optical data storage device, and carrier wave (such as data transmission via the Internet via a wired or wireless transmission path).

[0097] It should be noted that the present invention can be applied to any scenario where it is necessary to quickly generate two-dimensional images of other positions based on multiple two-dimensional images, and is not limited to application fields such as architectural design and artistic rendering.

[0098] Although the present invention has been described above in conjunction with the exemplary embodiments and the accompanying drawings, it should be apparent to those skilled in the art that various modifications may be made to the above-described embodiments without departing from the spirit and scope of the claims.

Claims

1. A method for establishing a multi-scene multi-view image generation model, characterized in that: The method comprises the steps of: The neural network is trained based on multi-scene and multi-view image data; in the processing of the position encoding of the neural network, the position encoding vectors of the multiple scenes are orthogonal; the image generated by the neural network is not only as different from the target scene as possible but also as different from the non-target scene as possible; After the training is qualified, the multi-scene multi-view image generation model is obtained.

2. The method for establishing a multi-scene multi-view image generation model according to claim 1, characterized in that: The image data of each viewing angle of each scene includes: posture data and a real image in a corresponding relationship.

3. The method for establishing a multi-scene multi-view image generation model according to claim 2, characterized in that: The set of pose data for each scene is represented as (x k ,y k ,z k ,m k ,n k );in, For the position parameter (x k ,y k ,z k ), use formula 1 to process the position encoding: Equation 1 is: γ k (p) = (sin((K t 0 +k)πp), cos((K t 1 +k)πp), …, (sin((K t L-1 +k)πp), cos((K t L-1 +k)πp); Among them, p∈(x k ,y k ,z k ), k is the phase shift, γ k (p) is the encoded position vector; L is a positive integer, indicating the dimension to be expanded; the base K t Take any value greater than the number of scenes K, K t 0 , K t 1 , …, K t L-1 is the fundamental frequency of the tth group.

4. The method for establishing a multi-scene multi-view image generation model according to claim 3, characterized in that: The direction parameter (m k ,n k ) The process of position encoding include: The polar coordinates (m) of the azimuth parameter are converted into k ,n k ) is converted into space coordinates: x′ k =sin(m k )*cos(n k ), and' k =sin(m k )*sin(n k ), z′ k =cos(m k ); The transformed spatial coordinates are then encoded using the formula 1.

5. The method for establishing a multi-scene multi-view image generation model according to claim 1, characterized in that: The loss function L2 is used to make the image generated by the neural network as different from the non-target scene as possible, where the loss function L2 is: Among them, r and r t are the perspective data of any two different scenes; R1 and R2 are the perspective data sets of any two different scenes; and Respectively represent the rough prediction value and fine prediction value after the neural network; C(r t ) is the actual pixel value, including RGB and transparency.

6. A multi-scene and multi-view image generation model, characterized in that: The model is obtained by the establishment method described in any one of claims 1 to 5.

7. A method for generating multi-scene and multi-view images, characterized in that: The method is implemented based on the multi-scene multi-view image generation model of claim 6.

8. A method for generating multi-scene and multi-view images, characterized in that: The method is implemented based on the NeRF neural network, wherein, in the processing of position coding of the neural network, the position coding vectors of multiple scenes are orthogonal.

9. A computer device, characterized in that: include: at least one processor; A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1 to 5, or instructions for executing the method according to claim 7 or 8.

10. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements any one of the methods 1 to 5, or implements the method of claim 7 or 8.