A method, device, storage medium and electronic device for generating virtual viewpoint

The virtual viewpoint generation model processes known viewpoint images to generate virtual viewpoints, which solves the high cost and difficulty problems of multi-camera array acquisition in the existing technology, and achieves flexibility and bandwidth relief for multi-angle display.

CN115134579BActive Publication Date: 2024-08-23DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210688177.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-16
Publication Date
2024-08-23
Estimated Expiration
2042-06-16

AI Technical Summary

Technical Problem

Existing free-viewing technology relies on multi-camera array acquisition, which results in high cost and difficulty in shooting, and puts pressure on bandwidth. The interval between viewpoints is limited, making it difficult to meet the needs of multi-angle display.

Method used

The known viewpoint image is processed through the virtual viewpoint generation model to generate a virtual viewpoint image, which replaces the physical viewpoint, reduces the number of cameras, eases the limitation of viewpoint interval angle, and realizes the generation of multiple virtual viewpoints.

Benefits of technology

It reduces shooting costs and construction difficulty, alleviates bandwidth pressure, and realizes the need for any display viewpoint, and the number of virtual viewpoints is not limited.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115134579B
    Figure CN115134579B
Patent Text Reader

Abstract

The disclosed embodiments provide a method, device, storage medium and electronic device for generating a virtual viewpoint. The method includes: receiving a first viewpoint image and a second viewpoint image; processing the first viewpoint image and the second viewpoint image based on a virtual viewpoint generation model to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint; and displaying the virtual viewpoint image. The disclosed embodiments determine the image / video of the newly added viewpoint by image processing, instead of collecting each viewpoint image / video by setting a physical viewpoint, reducing the number of physical devices to be set up, and further reducing the high cost and difficulty of construction caused by physical devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of video and image processing technology, and in particular to a method, device, storage medium and electronic device for generating a virtual viewpoint. Background Art

[0002] Evening parties and sports events are often broadcast live using free viewpoint technology, which can display videos from multiple angles, allowing viewers to have an interactive experience with multiple degrees of freedom.

[0003] Currently, free viewpoint technology uses a multi-sampling camera array to capture video, with each camera used to capture video from one viewpoint. However, the above video capture method relies on the synchronous capture of camera hardware, which is costly and difficult to capture, and also puts pressure on bandwidth load. Summary of the invention

[0004] The present disclosure provides a method, device, storage medium and electronic device for generating a virtual viewpoint, so as to generate a video of a virtual viewpoint based on a video of a known viewpoint, thereby reducing the number of physical viewpoints.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating a virtual viewpoint, comprising:

[0006] receiving a first viewpoint image and a second viewpoint image;

[0007] Based on a virtual viewpoint generation model, the first viewpoint image and the second viewpoint image are processed to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint;

[0008] The virtual viewpoint image is displayed.

[0009] In a second aspect, the embodiment of the present disclosure further provides a device for generating a virtual viewpoint, including:

[0010] An image receiving module, used for receiving a first viewpoint image and a second viewpoint image;

[0011] An image generation module, configured to process the first viewpoint image and the second viewpoint image based on a virtual viewpoint generation model to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint;

[0012] An image display module is used to display the virtual viewpoint image.

[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a virtual viewpoint as provided in the embodiment of the present invention.

[0017] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the method for generating a virtual viewpoint as provided in the embodiments of the present invention.

[0018] The technical solution provided by the embodiment of the present disclosure processes the images of two known viewpoints through a virtual viewpoint generation model to obtain a virtual viewpoint image of a virtual viewpoint located between the two known viewpoints. Correspondingly, for a video of two known viewpoints, a virtual viewpoint video of a virtual viewpoint located between the two known viewpoints can be obtained. Determining the image / video of a newly added viewpoint by image processing replaces the situation of collecting images / videos of each viewpoint by setting a physical viewpoint, reduces the number of physical devices to be set, and further reduces the problems of high cost and difficulty in construction caused by physical devices. At the same time, by generating virtual viewpoints, the limitation on the viewpoint interval angle caused by physical devices can be alleviated, multiple virtual angle viewpoints can be generated, and the number of virtual viewpoints can be unlimited, which can meet the needs of any display viewpoint. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 is a schematic top view of a shooting environment provided by an embodiment of the present disclosure;

[0021] Figure 2 is a schematic top view of a shooting environment provided by an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of a flow chart of a method for generating a virtual viewpoint provided by an embodiment of the present disclosure;

[0023] Figure 4 is a flowchart of a method for generating a virtual viewpoint provided by an embodiment of the present disclosure;

[0024] Figure 5 is a schematic diagram of a virtual viewpoint generation process provided by an embodiment of the present disclosure;

[0025] Figure 6It is a structural schematic diagram of a virtual viewpoint generation model provided by an embodiment of the invention;

[0026] Figure 7 is a structural diagram of a feature extraction submodule provided in an embodiment of the present disclosure;

[0027] Figure 8 is a schematic diagram of a fusion submodule processing process provided by an embodiment of the present disclosure;

[0028] Fig. 9 A schematic diagram of the structure of a virtual viewpoint generation device provided by an embodiment of the present disclosure;

[0029] Fig.10 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0032] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0036] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0037] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0038] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0039] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0040] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0041] In order to shoot the target object at multiple angles to support the free-viewing angle playback technology, multiple shooting points can be set circumferentially based on the display position of the object, and a camera is set at each shooting point to shoot the video of the display viewpoint. Exemplarily, the number of cameras can be determined according to the demand for the display viewpoint. In some embodiments, a display viewpoint can be set based on a fixed interval angle. For example, the fixed interval angle can be 30 degrees, etc., and the number of cameras can be 12 accordingly. Among them, the size of the fixed interval angle can be set according to the display requirements. In some embodiments, a display viewpoint can be set based on a fixed interval distance. A camera is set corresponding to each display viewpoint. Accordingly, in order to ensure the normal shooting of each display viewpoint, corresponding technicians and auxiliary equipment are required, resulting in high costs.

[0042] In view of the above technical problems, the present disclosure provides a method for generating a virtual viewpoint, which replaces the physical viewpoint with a virtual viewpoint and generates a video corresponding to the virtual viewpoint based on the video captured by the camera at the physical viewpoint, that is, the shooting cost is reduced by reducing the number of cameras. At the same time, reducing the number of cameras can reduce the difficulty of setting up the shooting equipment and relieve the pressure on the bandwidth. For example, see Figure 1 Figure and Figure 2 , Figure 1 and Figure 2 is a schematic top view of a shooting environment provided by an embodiment of the present disclosure, Figure 1 and Figure 2 This is just an example. In other embodiments, physical viewpoints and virtual viewpoints can be set according to acquisition needs. The black circle position is the physical viewpoint, and the white circle position is the virtual viewpoint. The physical viewpoint and the virtual viewpoint are set at intervals, and one or more virtual viewpoints can be set between two adjacent physical viewpoints.

[0043] Figure 3 The present invention provides a flowchart of a method for generating a virtual viewpoint according to an embodiment of the present invention. The present invention is applicable to the case where a virtual viewpoint video is generated based on a video of a known viewpoint. The method can be executed by a virtual viewpoint generation device, which can be implemented in the form of software and / or hardware. Optionally, the method can be implemented by an electronic device, which can be a mobile terminal, a PC, or a server. Figure 3 As shown, the method includes:

[0044] S110 , receiving a first viewpoint image and a second viewpoint image.

[0045] S120. Process the first viewpoint image and the second viewpoint image based on a virtual viewpoint generation model to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint.

[0046] S130: Display the virtual viewpoint image.

[0047] The electronic device in this embodiment is connected to the camera provided at each physical viewpoint, can receive the video captured by the camera at each physical viewpoint, and generate the video of the virtual viewpoint based on the video of the physical viewpoint. In some embodiments, the video of the virtual viewpoint located between the two physical viewpoints can be generated based on the video of the two physical viewpoints; in some embodiments, the video of the virtual viewpoint located between the above-mentioned physical viewpoint and the virtual viewpoint can be determined based on the video of a physical viewpoint and the video of a determined virtual viewpoint; in some embodiments, the video of the new virtual viewpoint located between the above-mentioned two virtual viewpoints can be determined based on the video of the two determined virtual viewpoints. Accordingly, the first viewpoint in this embodiment can be a physical viewpoint or a determined virtual viewpoint, and the second viewpoint can be a physical viewpoint or a determined virtual viewpoint.

[0048] In some embodiments, the process of generating a virtual viewpoint may be applied in a live broadcast scenario, based on the real-time image frames of the first viewpoint and the second viewpoint, to determine the real-time image frames of the virtual viewpoint, and to display the real-time image frames in real time. In some embodiments, the process of generating a virtual viewpoint may be applied in a video post-processing scenario, based on the videos captured from at least two physical viewpoints, to determine one or more virtual viewpoint videos. Accordingly, the first viewpoint image and the second viewpoint image are image frames that match in the first viewpoint video and the second viewpoint video, for example, two image frames in the first viewpoint video and the second viewpoint video with the same timestamp, or two video frames whose timestamps satisfy an error condition.

[0049] In some embodiments, the process of generating a virtual viewpoint may be applied in an image processing scenario, and accordingly, the first viewpoint image and the second viewpoint image may be real-time images, such as images collected in real time, or virtual images generated in real time. The first viewpoint image and the second viewpoint image may also be historical images, which is not limited.

[0050] The first viewpoint image and the second viewpoint image are input into the virtual viewpoint generation model to obtain an image of a virtual viewpoint located between the first viewpoint and the second viewpoint. For example, see Figure 2 , the image of virtual viewpoint 3 can be determined based on the first viewpoint image of physical viewpoint 1 and the second viewpoint image of physical viewpoint 5; it can also be determined based on the first viewpoint image of physical viewpoint 1 and the second viewpoint image of virtual viewpoint 3, the image of virtual viewpoint 2 can be determined; it can also be determined based on the first viewpoint image of virtual viewpoint 2 and the second viewpoint image of virtual viewpoint 3, the image of a newly added virtual viewpoint located between virtual viewpoint 2 and virtual viewpoint 3.

[0051] In some embodiments, before the first view image and the second view image are processed based on the virtual view generation model to obtain the virtual view image, the first view image and the second view image are preprocessed, wherein the preprocessing includes but is not limited to denoising, cropping, separating the background, image enhancement, etc. of the first view image and the second view image, which is not limited and can be determined according to image processing requirements. Accordingly, the processed first view image and the processed second view image are processed based on the virtual view generation model to obtain the virtual view image.

[0052] The virtual viewpoint generation model is pre-trained and has a generation function of determining an image located at a virtual viewpoint based on two input images. The working principle of the virtual viewpoint generation model can be that based on the streamer idea, a motion vector expression from the virtual viewpoint to the left viewpoint, such as F_v2l, and a motion vector expression from the virtual viewpoint to the right viewpoint, such as F_v2r, can be determined. Accordingly, a virtual viewpoint image I_left_warp=warp(I_left, F_v2l) can be obtained from the left viewpoint image, and a virtual viewpoint image I_right_warp=warp(I_right, F_v2r) can be obtained from the right viewpoint image. The two virtual viewpoint images are fused to obtain the final virtual viewpoint image I_virtual. Based on the above working principle, a virtual viewpoint generation model is constructed. The virtual viewpoint generation model is an end-to-end network model. The input first viewpoint image and the second viewpoint image are processed and the virtual viewpoint image is output. The operation is simple and the difficulty of determining the virtual viewpoint image is reduced.

[0053] The virtual viewpoint generation model includes at least one processing module, and the structures of the processing modules are the same. In some embodiments, the virtual viewpoint generation model includes a processing module, and the fused image output by the processing module is the virtual viewpoint image. In some embodiments, the virtual viewpoint generation model includes two or more processing modules, and the fused image output by the last processing module is the virtual viewpoint image. Among the multiple processing modules in the virtual viewpoint generation model, the previous processing module outputs the first image, the second image and the fused image, wherein the first image and the second image are used as input images of the next processing module, and the next processing module processes the first image and the second image, and outputs a new first image, a second image and a fused image, and after iterative processing by multiple processing modules, the image quality of the generated virtual viewpoint image is improved. Among them, the number of processing modules can be determined according to the quality requirements and computational requirements of the virtual viewpoint image, and there is no limitation on this.

[0054] Optionally, the processing module includes a feature extraction submodule and a fusion submodule, wherein the feature extraction submodule is used to generate first feature information, second feature information and fusion information based on the input image, and the fusion submodule is used to generate a first image, a second image and a fused image based on one or more of the first feature information, the second feature information and the fusion information, until the fused image output by the last processing module is used as a virtual viewpoint image frame.

[0055] The feature extraction submodule may be a neural network module, including multiple network layers or multiple network blocks. In some embodiments, the feature extraction submodule includes multiple convolutional layers; in some embodiments, the feature extraction submodule includes a downsampling network layer and an upsampling network layer, wherein the number of downsampling network layers and upsampling network layers may be multiple. The first feature information may be a motion vector feature of a virtual viewpoint and a first viewpoint, the second feature information may be a motion vector feature of a virtual viewpoint and a second time, and the fusion information may be a mask image, the size of which is the same as the size of the first viewpoint image or the second viewpoint image.

[0056] The first feature information, the second feature information and the fusion information are used as input information of the fusion submodule. The fusion submodule performs fusion processing based on the first feature information, the second feature information and the fusion information to obtain the first image, the second image and the fusion image.

[0057] Optionally, the fusion submodule is used to obtain a first image based on the first feature information and the first input image of the processing module; to obtain a second image based on the second feature information and the second input image of the processing module, wherein the first image and the second image serve as input images of the next processing module; and to obtain a fused image based on the first image, the second image and the fusion information.

[0058] In this embodiment, image fusion can be achieved through warp operation. For example, based on the warp operation, the first feature information and the first input image of the processing module are fused to obtain the first image; based on the warp operation, the second feature information and the second input image of the processing module are fused to obtain the second image; based on the warp operation, the first image, the second image and the fusion information are fused to obtain the fused image. The fused image can be obtained by fusion in the following manner: i =M i *I i _left+(1-M i )*I i _righ, where I i is the fused image obtained by the i-th processing module, M i is the fusion information obtained by the i-th processing module, I i_left can be the first image obtained by the i-th processing module, I i _righ can be the second image obtained by the i-th processing module.

[0059] It should be noted that, when the processing module is the first processing module, the first input image of the processing module may be the first viewpoint image, and the second input image of the processing module may be the second viewpoint image; when the processing module is any processing module other than the first processing module, the first input image of the processing module may be the first image output by the previous processing module, and the second input image of the processing module may be the second image output by the previous processing module.

[0060] Each processing module performs the above processing respectively to implement iterative fusion processing of the input first viewpoint image and the second viewpoint image to obtain a virtual viewpoint image. For multiple image frames corresponding to the first viewpoint and the second viewpoint, the above processing is performed on each matching image frame to obtain a virtual viewpoint image corresponding to each pair of image frames to form a virtual viewpoint video. Each image frame in the virtual viewpoint is displayed in turn to realize the display of the virtual viewpoint video.

[0061] In some embodiments, the above processing process can be executed in a server. For example, the server can be a live broadcast server. The live broadcast server can receive a video request sent by a client. The video request can include viewpoint information to be displayed. The viewpoint information can be a physical viewpoint or a virtual viewpoint. Based on the viewpoint information, the corresponding video is sent to the client so that the client can display the video sent by the indicator server.

[0062] The technical solution provided in this embodiment processes the images of two known viewpoints through a virtual viewpoint generation model to obtain a virtual viewpoint image of a virtual viewpoint located between the two known viewpoints. Correspondingly, for a video of two known viewpoints, a virtual viewpoint video of a virtual viewpoint located between the two known viewpoints can be obtained. Determining the image / video of the newly added viewpoint by image processing replaces the situation of collecting each viewpoint image / video by setting a physical viewpoint, reduces the number of physical devices to be set, and further reduces the problems of high cost and difficulty in construction caused by physical devices. At the same time, by generating virtual viewpoints, the limitation on the viewpoint interval angle caused by physical devices can be alleviated, multiple virtual angle viewpoints can be generated, and the number of virtual viewpoints can be unlimited, which can meet the needs of any display viewpoint.

[0063] See also Figure 4 , Figure 4It is a flow chart of a method for generating a virtual viewpoint provided by an embodiment of the present disclosure. Based on the above embodiment, the embodiment of the present disclosure is optimized. Optionally, after receiving the first viewpoint image and the second viewpoint image, the method further includes: extracting a first foreground image of the first viewpoint image and a second foreground image in the second viewpoint image; accordingly, based on a virtual viewpoint generation model, processing the first viewpoint image and the second viewpoint image to obtain a virtual viewpoint image, including: based on a virtual viewpoint generation model, processing the first foreground image and the second foreground image to obtain a virtual viewpoint image. The method specifically includes:

[0064] S210: Receive a first viewpoint image and a second viewpoint image, and extract a first foreground image from the first viewpoint image and a second foreground image from the second viewpoint image.

[0065] S220: Based on a virtual viewpoint generation model, the first foreground image and the second foreground image are processed to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint.

[0066] S230: Display the virtual viewpoint image.

[0067] Each image captured by the camera at the physical viewpoint may include a foreground and a background, wherein the foreground may include but is not limited to a human body, an animal body, etc., and is not limited to this. In order to avoid interference of background information on the foreground, in this embodiment, a first foreground image is extracted from the received first viewpoint image, and a second foreground image is extracted from the second viewpoint image, and the first foreground image and the second foreground image are used as processing objects of the virtual viewpoint generation model to obtain a virtual viewpoint image. Correspondingly, the virtual viewpoint image is a foreground image corresponding to the virtual viewpoint.

[0068] In some embodiments, the portrait in the image is used as a foreground image, and accordingly, the first foreground image of the first viewpoint image and the second foreground image of the second viewpoint image are extracted, including extracting the first portrait image of the first viewpoint image and the second portrait image of the second viewpoint image. Further, the first portrait image and the second portrait image are processed based on the virtual viewpoint generation model to obtain the portrait image corresponding to the virtual viewpoint.

[0069] In this embodiment, the generation method of the first foreground image and the second foreground image is not limited. In some embodiments, the extraction of the foreground image can be realized based on the foreground segmentation model. For example, the first viewpoint image is input into the foreground segmentation model to obtain the first foreground image, and the second viewpoint image is input into the foreground segmentation model to obtain the second foreground image. For example, the foreground segmentation model may include a portrait segmentation model, and the input first viewpoint image or the second viewpoint image is processed to obtain the first portrait image or the second portrait image. In some embodiments, foreground recognition can be performed on the input image based on the contour recognition model, and the foreground contour can be obtained, and the corresponding foreground image can be extracted based on the foreground contour. Correspondingly, the contour recognition model can also be a portrait contour recognition model, which is not limited to this.

[0070] In this embodiment, by performing foreground extraction on an image of a known viewpoint, interference of background information on the foreground processing process is reduced, thereby reducing the amount of processed data and improving the foreground processing quality.

[0071] On the basis of the above-mentioned embodiment, before the first foreground image and the second foreground image are processed based on the virtual viewpoint generation model to obtain the virtual viewpoint image, it also includes extracting key point features from the first foreground image and the second foreground image respectively to obtain the first key point feature and the second key point feature; accordingly, based on the virtual viewpoint generation model, the first foreground image and the second foreground image are processed to obtain the virtual viewpoint image, including: based on the virtual viewpoint generation model, the first foreground image, the second foreground image, the first key point feature and the second key point feature are processed to obtain the virtual viewpoint image.

[0072] In this embodiment, by extracting the first key point features of the first foreground image and the second key point features of the second foreground image, the first key point features and the second key point features are used as auxiliary information in the process of processing the first foreground image and the second foreground image by the virtual viewpoint generation model to improve the image quality of the virtual viewpoint image.

[0073] Among them, the key point features of the foreground image can be features that can characterize the key positions of the object movement in the foreground image. For example, in the case of a portrait image, the key point features can be a thermal feature map of the key points of the human body. The key points of the human body can include but are not limited to the key positions of the human body such as elbows, shoulders, head, knees, feet, and crotch.

[0074] The extraction of key point features can be achieved through a preset key point feature extraction model, which can be a neural network model, such as a recurrent neural network model RNN, a long short-term memory network model LSTM, etc. The first foreground image is input into the key point feature extraction model to obtain the first key point feature, and the second foreground image is input into the key point feature extraction model to obtain the second key point feature.

[0075] In the process of the virtual viewpoint generation model processing the first foreground image and the second foreground image, the first key point feature and the second key point feature are input into the virtual viewpoint generation model as auxiliary information, so that the virtual viewpoint generation model processes the first foreground image, the second foreground image, the first key point feature and the second key point feature to obtain a virtual viewpoint image. For example, see Figure 5 , Figure 5 It is a schematic diagram of the generation process of the virtual viewpoint provided by the embodiment of the present disclosure.

[0076] Optionally, the virtual viewpoint generation model includes a feature extraction submodule and a fusion submodule, wherein the feature extraction submodule includes a first network block, a feature fusion block and a second network block, wherein the first network block performs feature extraction on the input first image and the second image to obtain intermediate features; the feature fusion block performs feature fusion on the intermediate features, the first key point features and the second key point features to obtain fused features; the second network block processes the fused features to obtain the first feature information, the second feature information and the fused information of the current processing module.

[0077] The first network block may include at least one downsampling network layer and at least one convolutional layer, and the second network block may include at least one convolutional layer and at least one upsampling network layer. The feature fusion block is located between the first network block and the second network block, and is used to fuse the intermediate features generated by the first network block with the first key point features and the second key point features input externally, wherein the feature fusion method may be, for example, weighting the corresponding pixels in the intermediate features, the first key point features, and the second key point features to obtain the fused features. Each network layer in the second network block processes the fused features in turn, and outputs the first feature information, the second feature information, and the fused information. By fusing the first key point features and the second key point features during the processing, the accuracy of the generated feature information is improved.

[0078] The fusion submodule further obtains high-quality first images, second images and fused images based on the high-precision first feature information, second feature information and fused information, thereby improving the image processing quality.

[0079] For example, see Figure 6 , Figure 6 It is a structural schematic diagram of a virtual viewpoint generation model provided by an embodiment of the invention. Figure 6 The virtual viewpoint generation model may include 4 processing modules, among which: Figure 6This is only an example. In other embodiments, the number of processing modules can be set according to processing requirements. Each processing module includes a feature extraction submodule block and a fusion submodule warp, wherein the first network block in the feature extraction submodule block includes a 2x downsampling network layer 2 n- i times resize and 5 convolutional layers. The second network block includes 5 convolutional layers and a 2x upsampling network layer. Figure 7 , Figure 7 is a structural diagram of a feature extraction submodule provided by an embodiment of the present disclosure. The fusion submodule warp includes three fusion parts, namely, a first image fusion part, a second image fusion part, and a fusion part of a fused image. Figure 8 , Figure 8 It is a schematic diagram of a fusion submodule processing process provided by an embodiment of the present disclosure.

[0080] Combination Figure 5 It can be seen that the input information of the virtual viewpoint generation model is the first foreground image and the second foreground image obtained by the cutout processing. At the same time, the first key point feature of the first foreground image and the second key point feature of the second foreground image are extracted and input into the fusion feature block of the feature extraction submodule block in each processing module. The feature extraction submodule block0 in the first processing module processes the first foreground image and the second foreground image, and fuses the first key point feature and the second key point feature to output the first feature information F 0 mind-left , the second feature information F 0 mind-right and fusion information M 0 , the fusion submodule warp0 performs the first feature information F 0 mind-left Fuse with the first foreground image to obtain the first image I 0 _left_warp, for the second feature information F 0 mind-right Fuse with the second foreground image to obtain the second image I 0 _right_warp, for the first image I 0 _left_warp, second image I 0 _right_warp and fusion information M 0 Fusion is performed to obtain the fused image I 0 , where the first image I 0 _left_warp, second image I 0 _right_warp is used as the input information of the second processing module, and so on, until the last processing module outputs the fused image I n, as a virtual viewpoint image.

[0081] In some embodiments, the input information of the virtual viewpoint generation model is the first portrait image and the second portrait image, and accordingly, the obtained virtual viewpoint image is the portrait image.

[0082] On the basis of the above-mentioned embodiment, displaying the virtual viewpoint image includes: setting a background for the foreground image of the virtual viewpoint, obtaining a target display image of the virtual viewpoint, and displaying the target display image. The background content is not limited here, for example, it can be the real background information corresponding to the virtual viewpoint, it can be the background information collected from any physical viewpoint, it can also be the background information of the virtual viewpoint generated based on the background information collected from each physical viewpoint, it can also be the background information of augmented reality, and the background information of augmented reality can be virtual background information, or background information collected from other environments. The background content can be set according to the display requirements. In some embodiments, the background content can be set according to the display object. For example, the display object can be an infant, a teenager, an adult, etc.

[0083] By setting background information for the foreground image of the virtual viewpoint, the integrity of the image is improved. At the same time, the background information can be set according to the display requirements, which improves the diversity of the image.

[0084] Based on the above embodiments, the training process of the virtual viewpoint generation model includes: respectively acquiring a first training image of the left physical viewpoint, a second training image of the right physical viewpoint, and a verification image of the middle physical viewpoint; processing the first training image and the second training image based on the virtual viewpoint generation model to be trained to obtain a fused image output by each processing module in the virtual viewpoint generation model; determining a loss function based on the verification image and at least part of the fused image, and adjusting model parameters of the virtual viewpoint generation model based on the loss function, iterating the training process until the training conditions are met to obtain a trained virtual viewpoint generation model.

[0085] The images captured at the left physical viewpoint and the right physical viewpoint are used as training images, and the images captured at the middle physical viewpoint are used as verification images in the training process. It should be noted that the first training image of the left physical viewpoint, the second training image of the right physical viewpoint and the verification image of the middle physical viewpoint are images captured synchronously at different viewpoints of the same photographed object. For example, they can be matching images in the videos captured synchronously at the above viewpoints, or images captured at the same time at the above viewpoints, without limitation.

[0086] According to the object relationship image group of each image, for example, the first training image, the second training image and the verification image corresponding to the same timestamp are determined as an image group, and the virtual viewpoint generation model to be trained is iteratively trained based on each image group. Wherein, in each iteration, the first training image and the second training image can be used as input images and input into the virtual viewpoint generation model to obtain multiple fused images processed by the virtual viewpoint generation model during the processing, that is, the fused image output by each processing module in the virtual viewpoint generation model, wherein the last fused image is a virtual viewpoint image of the intermediate virtual viewpoint predicted by the virtual viewpoint generation model, and the intermediate virtual viewpoint corresponds to the intermediate physical viewpoint. The loss function is determined based on the verification image of the intermediate physical viewpoint and one or more fused images to adjust the model parameters of the virtual viewpoint generation model. In some embodiments, the loss function is determined based on the verification image of the intermediate physical viewpoint and the last fused image (that is, the virtual viewpoint generation model predicts the virtual viewpoint generation model). In some embodiments, the loss function is determined based on the verification image of the intermediate physical viewpoint and multiple fused images to improve the accuracy of the model parameter adjustment. For example, determining a loss function based on the verification image and at least part of the fused image includes: generating loss terms based on the verification image and the fused image output by each processing module in the virtual viewpoint generation model, and determining a loss function based on each loss term. The loss function may be determined as the mean of each loss term or the sum of each loss term. The loss term generated by the fused image and the verification image may be generated based on a cross entropy function, a square loss function, an exponential loss function, etc. There is no limitation on this and it can be determined according to needs.

[0087] The model parameters of the virtual viewpoint generation model are adjusted based on the loss function, which can be achieved through the gradient descent method. The virtual viewpoint generation model is trained once, and the above training process is iterated until the training conditions are met to obtain a trained virtual viewpoint generation model.

[0088] In this embodiment, the virtual viewpoint generation model is trained by real images based on physical viewpoints to obtain a virtual viewpoint generation model with virtual viewpoint image generation function, which is convenient for generating virtual viewpoint images or virtual viewpoint videos based on images or videos of known viewpoints in image processing scenarios or live broadcast scenarios, thereby reducing the number of acquisition devices and acquisition costs.

[0089] Fig. 9 A schematic diagram of a virtual viewpoint generation device provided by an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, the device includes: an image receiving module 310, an image generating module 320 and an image display module 330.

[0090] An image receiving module 310 is used to receive a first viewpoint image and a second viewpoint image;

[0091] An image generation module 320, configured to process the first viewpoint image and the second viewpoint image based on a virtual viewpoint generation model to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint;

[0092] The image display module 330 is used to display the virtual viewpoint image.

[0093] The technical solution provided by the embodiment of the present disclosure processes the images of two known viewpoints through a virtual viewpoint generation model to obtain a virtual viewpoint image of a virtual viewpoint located between the two known viewpoints. Correspondingly, for a video of two known viewpoints, a virtual viewpoint video of a virtual viewpoint located between the two known viewpoints can be obtained. Determining the image / video of the newly added viewpoint by image processing replaces the situation of collecting each viewpoint image / video by setting a physical viewpoint, reduces the number of physical devices to be set, and further reduces the problems of high cost and difficulty in construction caused by physical devices. At the same time, by generating virtual viewpoints, the limitation on the viewpoint interval angle caused by physical devices can be alleviated, multiple virtual angle viewpoints can be generated, and the number of virtual viewpoints can be unlimited, which can meet the needs of any display viewpoint.

[0094] Based on the above embodiment, optionally, the device further includes:

[0095] a foreground image extraction module, configured to extract a first foreground image of the first viewpoint image and a second foreground image of the second viewpoint image after receiving the first viewpoint image and the second viewpoint image;

[0096] The image generation module 320 is used to process the first foreground image and the second foreground image based on a virtual viewpoint generation model to obtain a virtual viewpoint image.

[0097] Based on the above embodiment, optionally, the device further includes:

[0098] A key point feature extraction module, used to extract key point features from the first foreground image and the second foreground image respectively to obtain a first key point feature and a second key point feature;

[0099] The image generation module 320 is used to: process the first foreground image, the second foreground image, the first key point feature and the second key point feature based on a virtual viewpoint generation model to obtain a virtual viewpoint image.

[0100] Based on the above embodiment, optionally, the virtual viewpoint image is a foreground image;

[0101] The image display module 330 is used to set a background for the foreground image of the virtual viewpoint, obtain a target display image of the virtual viewpoint, and display the target display image.

[0102] On the basis of the above embodiment, optionally, the virtual viewpoint generation model includes at least one processing module, the processing module includes a feature extraction submodule and a fusion submodule, wherein the feature extraction submodule is used to generate first feature information, second feature information and fusion information based on the input image, and the fusion submodule is used to generate a first image, a second image and a fused image based on one or more of the first feature information, the second feature information and the fusion information, until the fused image output by the last processing module is used as a virtual viewpoint image frame.

[0103] Based on the above embodiment, optionally, the feature extraction submodule includes a first network block, a feature fusion block and a second network block, wherein the first network block extracts features from the input first image and the second image to obtain intermediate features;

[0104] The feature fusion block performs feature fusion on the intermediate feature, the first key point feature and the second key point feature to obtain a fused feature;

[0105] The second network block processes the fused features to obtain the first feature information of the current processing module, the second feature information and the fused information.

[0106] Based on the above embodiment, optionally, the fusion submodule is used to obtain a first image by fusing the first feature information with the first input image of the processing module;

[0107] A second image is obtained by fusing the second feature information and the second input image of the processing module, wherein the first image and the second image are used as input images of a next processing module;

[0108] A fused image is obtained based on the first image, the second image and the fusion information.

[0109] Based on the above embodiment, optionally, the device further includes:

[0110] A model training module is used to respectively obtain a first training image of a left physical viewpoint, a second training image of a right physical viewpoint, and a verification image of a middle physical viewpoint; based on a virtual viewpoint generation model to be trained, the first training image and the second training image are processed to obtain a fused image output by each processing module in the virtual viewpoint generation model; based on the verification image and at least part of the fused image, a loss function is determined, and model parameters of the virtual viewpoint generation model are adjusted based on the loss function, and the training process is iteratively performed until the training conditions are met to obtain a trained virtual viewpoint generation model.

[0111] The device for generating a virtual viewpoint provided in the embodiments of the present disclosure can execute the method for generating a virtual viewpoint provided in any embodiment of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution method.

[0112] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0113] Fig.10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig.10 , which shows an electronic device (eg, Fig.10 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0114] like Fig.10 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0115] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0116] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0117] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0118] The electronic device provided in the embodiment of the present disclosure and the method for generating a virtual viewpoint provided in the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, reference can be made to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0119] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the method for generating a virtual viewpoint provided in the above embodiments is implemented.

[0120] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0121] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0122] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0123] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0124] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device receives a first viewpoint image and a second viewpoint image; processes the first viewpoint image and the second viewpoint image based on a virtual viewpoint generation model to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint; and displays the virtual viewpoint image.

[0125] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0127] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0128] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0129] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0130] [In the detailed description section, after the full text is finished, please repeat all the contents that you want to protect in the form of claims in the following form:]

[0131] According to one or more embodiments of the present disclosure, [Example 1] provides a method for generating a virtual viewpoint, including:

[0132] Receive a first viewpoint image and a second viewpoint image; based on a virtual viewpoint generation model, process the first viewpoint image and the second viewpoint image to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint; and display the virtual viewpoint image.

[0133] According to one or more embodiments of the present disclosure, [Example 2] provides a method for generating a virtual viewpoint, further comprising:

[0134] After receiving the first viewpoint image and the second viewpoint image, the method further includes: extracting a first foreground image of the first viewpoint image and a second foreground image of the second viewpoint image;

[0135] Correspondingly, based on the virtual viewpoint generation model, the first viewpoint image and the second viewpoint image are processed to obtain a virtual viewpoint image, including: based on the virtual viewpoint generation model, the first foreground image and the second foreground image are processed to obtain a virtual viewpoint image.

[0136] According to one or more embodiments of the present disclosure, [Example 3] provides a method for generating a virtual viewpoint, further comprising:

[0137] The method further includes: extracting key point features from the first foreground image and the second foreground image respectively to obtain first key point features and second key point features;

[0138] Correspondingly, based on the virtual viewpoint generation model, the first foreground image and the second foreground image are processed to obtain a virtual viewpoint image, including: based on the virtual viewpoint generation model, the first foreground image, the second foreground image, the first key point feature and the second key point feature are processed to obtain a virtual viewpoint image.

[0139] According to one or more embodiments of the present disclosure, [Example 4] provides a method for generating a virtual viewpoint, further comprising: the virtual viewpoint image is a foreground image;

[0140] The displaying of the virtual viewpoint image includes: setting a background for a foreground image of the virtual viewpoint, obtaining a target display image of the virtual viewpoint, and displaying the target display image.

[0141] According to one or more embodiments of the present disclosure, [Example 5] provides a method for generating a virtual viewpoint, further comprising:

[0142] The virtual viewpoint generation model includes at least one processing module, which includes a feature extraction submodule and a fusion submodule, wherein the feature extraction submodule is used to generate first feature information, second feature information and fusion information based on an input image, and the fusion submodule is used to generate a first image, a second image and a fused image based on one or more of the first feature information, the second feature information and the fusion information, until the fused image output by the last processing module is used as a virtual viewpoint image frame.

[0143] According to one or more embodiments of the present disclosure, [Example 6] provides a method for generating a virtual viewpoint, further comprising:

[0144] The feature extraction submodule includes a first network block, a feature fusion block, and a second network block, wherein the first network block extracts features from the input first image and the second image to obtain intermediate features;

[0145] The feature fusion block performs feature fusion on the intermediate feature, the first key point feature and the second key point feature to obtain a fused feature;

[0146] The second network block processes the fused features to obtain the first feature information of the current processing module, the second feature information and the fused information.

[0147] According to one or more embodiments of the present disclosure, [Example 7] provides a method for generating a virtual viewpoint, further comprising:

[0148] The fusion submodule is used to obtain a first image by fusing the first feature information with the first input image of the processing module;

[0149] A second image is obtained by fusing the second feature information and the second input image of the processing module, wherein the first image and the second image are used as input images of a next processing module;

[0150] A fused image is obtained based on the first image, the second image and the fusion information.

[0151] According to one or more embodiments of the present disclosure, [Example 8] provides a method for generating a virtual viewpoint, further comprising:

[0152] The training process of the virtual viewpoint generation model includes: respectively acquiring a first training image of a left physical viewpoint, a second training image of a right physical viewpoint, and a verification image of a middle physical viewpoint; processing the first training image and the second training image based on the virtual viewpoint generation model to be trained to obtain a fused image output by each processing module in the virtual viewpoint generation model; determining a loss function based on the verification image and at least part of the fused image, and adjusting model parameters of the virtual viewpoint generation model based on the loss function, iterating the training process until the training conditions are met to obtain a trained virtual viewpoint generation model.

[0153] According to one or more embodiments of the present disclosure, [Example 9] provides a method for generating a virtual viewpoint, further comprising:

[0154] The determining of the loss function based on the verification image and at least part of the fused image includes: generating loss terms based on the verification image and the fused image output by each processing module in the virtual viewpoint generation model, and determining the loss function based on each loss term.

[0155] According to one or more embodiments of the present disclosure, [Example 10] provides a device for generating a virtual viewpoint, including: an image receiving module, configured to receive a first viewpoint image and a second viewpoint image;

[0156] An image generation module, configured to process the first viewpoint image and the second viewpoint image based on a virtual viewpoint generation model to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint;

[0157] An image display module is used to display the virtual viewpoint image.

[0158] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0159] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0160] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for generating a virtual viewpoint, It is characterized in that include: receiving a first viewpoint image and a second viewpoint image; Based on a virtual viewpoint generation model, the first viewpoint image and the second viewpoint image are processed to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint; Displaying the virtual viewpoint image; The virtual viewpoint generation model includes at least one processing module, and the processing module includes a feature extraction submodule and a fusion submodule; The feature extraction submodule includes a first network block, a feature fusion block and a second network block, wherein the first network block extracts features from the first input image and the second input image to obtain intermediate features; The feature fusion block fuses the intermediate feature, the first key point feature and the second key point feature to obtain a fused feature; the first key point feature is obtained by extracting the key point feature of the first foreground image in the first viewpoint image, and the second key point feature is obtained by extracting the key point feature of the second foreground image in the second viewpoint image; The second network block processes the fused features to obtain the first feature information, the second feature information and the fused information of the feature extraction submodule; The fusion submodule is used to generate a first image, a second image and a fused image based on one or more of the first feature information, the second feature information and the fusion information, until the fused image output by the last processing module is used as a virtual viewpoint image; The first input image and the second input image are a first foreground image of a first viewpoint image and a second foreground image of a second viewpoint image, or are a first image and a second image generated by the fusion submodule.

2. The method according to claim 1, It is characterized in that After receiving the first viewpoint image and the second viewpoint image, the method further includes: A first foreground image of the first viewpoint image and a second foreground image of the second viewpoint image are extracted.

3. The method according to claim 2, It is characterized in that The virtual viewpoint image is a foreground image; The presenting of the virtual viewpoint image comprises: A background is set for the foreground image of the virtual viewpoint, a target display image of the virtual viewpoint is obtained, and the target display image is displayed.

4. The method according to claim 1, It is characterized in that The fusion submodule is used to obtain a first image by fusing the first feature information with the first input image of the processing module; A second image is obtained by fusing the second feature information and the second input image of the processing module, wherein the first image and the second image are used as input images of a next processing module; A fused image is obtained based on the first image, the second image and the fusion information.

5. The method according to claim 1, It is characterized in that The training process of the virtual viewpoint generation model includes: Respectively obtain a first training image of a left physical viewpoint, a second training image of a right physical viewpoint, and a verification image of a middle physical viewpoint; Processing the first training image and the second training image based on the virtual viewpoint generation model to be trained to obtain a fused image output by each processing module in the virtual viewpoint generation model; A loss function is determined based on the verification image and at least part of the fused image, and model parameters of the virtual viewpoint generation model are adjusted based on the loss function. The training process is iteratively performed until the training conditions are met, thereby obtaining a trained virtual viewpoint generation model.

6. The method according to claim 5, It is characterized in that The determining of the loss function based on the verification image and at least part of the fused image comprises: Loss terms are generated based on the verification image and the fused image output by each processing module in the virtual viewpoint generation model, and a loss function is determined based on each loss term.

7. A device for generating a virtual viewpoint, It is characterized in that include: An image receiving module, used for receiving a first viewpoint image and a second viewpoint image; An image generation module, configured to process the first viewpoint image and the second viewpoint image based on a virtual viewpoint generation model to obtain a virtual viewpoint image, wherein the virtual viewpoint is an intermediate viewpoint between the first viewpoint and the second viewpoint; The virtual viewpoint generation model includes at least one processing module, and the processing module includes a feature extraction submodule and a fusion submodule; The feature extraction submodule includes a first network block, a feature fusion block and a second network block, wherein the first network block extracts features from the first input image and the second input image to obtain intermediate features; The feature fusion block fuses the intermediate feature, the first key point feature and the second key point feature to obtain a fused feature; the first key point feature is obtained by extracting the key point feature of the first foreground image in the first viewpoint image, and the second key point feature is obtained by extracting the key point feature of the second foreground image in the second viewpoint image; The second network block processes the fused features to obtain the first feature information, the second feature information and the fused information of the feature extraction submodule; The fusion submodule is used to generate a first image, a second image and a fused image based on one or more of the first feature information, the second feature information and the fusion information, until the fused image output by the last processing module is used as a virtual viewpoint image; The first input image and the second input image are a first foreground image of a first viewpoint image and a second foreground image of a second viewpoint image, or are the first image and the second image generated by the fusion submodule; An image display module is used to display the virtual viewpoint image.

8. An electronic device, It is characterized in that The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a virtual viewpoint as described in any one of claims 1-6.

9. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the method for generating a virtual viewpoint as claimed in any one of claims 1 to 6 when executed by a computer processor.