WO2023070448A1 - 视频处理方法、装置、电子设备和可读存储介质 - Google Patents

视频处理方法、装置、电子设备和可读存储介质 Download PDF

Info

Publication number
WO2023070448A1
WO2023070448A1 PCT/CN2021/127079 CN2021127079W WO2023070448A1 WO 2023070448 A1 WO2023070448 A1 WO 2023070448A1 CN 2021127079 W CN2021127079 W CN 2021127079W WO 2023070448 A1 WO2023070448 A1 WO 2023070448A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
output
video
input
dimensional
Prior art date
Application number
PCT/CN2021/127079
Other languages
English (en)
French (fr)
Inventor
那彦波
卢运华
Original Assignee
京东方科技集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to US17/927,148 priority Critical patent/US20240135488A1/en
Application filed by 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Priority to CN202180003120.5A priority patent/CN116368511A/zh
Priority to PCT/CN2021/127079 priority patent/WO2023070448A1/zh
Publication of WO2023070448A1 publication Critical patent/WO2023070448A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4046Scaling of whole images or parts thereof, e.g. expanding or contracting using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4053Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • Embodiments of the present disclosure relate to the technical field of image processing, and in particular, to a video processing method, device, electronic device, and readable storage medium.
  • Image processing technology supports the generation of certain images to meet specific requirements through model training, for example, through continuous training of the model to generate images with higher resolution or different sizes based on the original image.
  • an embodiment of the present disclosure provides a video processing method, including the following steps:
  • the input data includes picture data and/or video data
  • the video processing model includes a plurality of generators arranged in sequence and corresponding to different image resolutions, each generator includes A three-dimensional convolution unit and a plurality of first three-dimensional convolution layers are arranged, and the transposed three-dimensional convolution unit is used to generate first output data according to the input data and intermediate processing data of the generator, and the output video data is according to The first output data is obtained, and the intermediate processing data is obtained after inputting the input data into the plurality of first three-dimensional convolutional layers.
  • the generator further includes a second three-dimensional convolutional layer, the second three-dimensional convolutional layer is used to adjust the first output data to obtain second output data, and the second three-dimensional convolutional layer
  • the stride of at least one dimension of is larger than the stride of the transposed 3D convolutional unit.
  • the second 3D convolutional layer includes a first step size corresponding to the time dimension, and a second step size corresponding to the output size dimension
  • each of the transposed 3D convolution units includes a step size corresponding to the time dimension The corresponding third step size, and the fourth step size corresponding to the output size dimension.
  • the ratio of the first step size to the third step size is not equal to the ratio of the second step size to the fourth step size.
  • the number of the first three-dimensional convolutional layers is four.
  • each of the first three-dimensional convolutional layers includes a three-dimensional convolutional unit and a residual layer arranged in sequence.
  • multiple first images correspond to the same second image, wherein the multiple The first image is a plurality of different frames of images in the input data, and the second image is a frame of images in the output video data.
  • the input video processing model is obtained by generating a confrontation network for model training, and the generation confrontation network includes the generator and a discriminator;
  • the generator is a model with a low-resolution image as input and a high-resolution video sequence as output;
  • the discriminator is a model that takes an image as an input and outputs a discrimination result for the image
  • the loss function for model training is determined from the adversarial loss between the generator and the discriminator, and the input and output reconstruction losses of the generator.
  • the method when the input data includes video data, before inputting the input data into a video processing model to obtain output video data, the method further includes:
  • Extracting a 3D patch of the video sequence wherein each pixel in the video sequence exists in at least one of the 3D patches, and at least some of the pixels are located in a plurality of the 3D patches;
  • the three-dimensional patch is used as an input of the video processing model.
  • an embodiment of the present disclosure provides a video processing device, including:
  • An input data acquisition module configured to acquire input data, wherein the input data includes picture data and/or video data;
  • An input module configured to input the input data into a video processing model to obtain output video data
  • the video processing model includes a plurality of generators arranged in sequence and corresponding to different image resolutions, each of the generators includes a transposed three-dimensional convolution unit and a plurality of first three-dimensional convolution layers, and the transposed three-dimensional
  • the convolution unit is used to generate first output data according to the input data of the generator and intermediate processing data, the output video data is obtained according to the first output data, and the intermediate processing data is the input data obtained after inputting the plurality of first three-dimensional convolutional layers.
  • the generator further includes a second three-dimensional convolutional layer, the second three-dimensional convolutional layer is used to adjust the first output data to obtain second output data, and the second three-dimensional convolutional layer
  • the stride of at least one dimension of is larger than the stride of the transposed 3D convolutional unit.
  • the second 3D convolutional layer includes a first step size corresponding to the time dimension, and a second step size corresponding to the output size dimension
  • each of the transposed 3D convolution units includes a step size corresponding to the time dimension The corresponding third step size, and the fourth step size corresponding to the output size dimension.
  • the ratio of the first step size to the third step size is not equal to the ratio of the second step size to the fourth step size.
  • the number of the first three-dimensional convolutional layers is four.
  • each of the first three-dimensional convolutional layers includes a three-dimensional convolutional unit and a residual layer arranged in sequence.
  • multiple first images correspond to the same second image, wherein the multiple The first image is a plurality of different frames of images in the input data, and the second image is a frame of images in the output video data.
  • the input video processing model is obtained by generating a confrontation network for model training, and the generation confrontation network includes the generator and a discriminator;
  • the generator is a model with a low-resolution image as input and a high-resolution video sequence as output;
  • the discriminator is a model that takes an image as an input and outputs a discrimination result for the image
  • the loss function for model training is determined from the adversarial loss between the generator and the discriminator, and the input and output reconstruction losses of the generator.
  • the input data includes video data
  • it further includes:
  • a video sequence division module configured to divide the input data into multiple video sequences according to preset time intervals
  • a three-dimensional patch extraction module configured to extract three-dimensional patches of the video sequence, wherein each pixel in the video sequence exists in at least one of the three-dimensional patches, and at least some pixels are located in multiple of the three-dimensional patches. in the dough;
  • the input data determination module is configured to use the 3D mesh as the input of the video processing model.
  • an embodiment of the present disclosure provides an electronic device, including: a memory, a processor, and a program stored in the memory and operable on the processor; the processor is configured to read The program in the memory implements the steps in the method described in the aforementioned first aspect.
  • embodiments of the present disclosure provide a readable storage medium for storing a program, and when the program is executed by a processor, the steps in the method described in the aforementioned first aspect are implemented.
  • FIG. 1 is a schematic flowchart of a video processing method provided by an embodiment of the present disclosure
  • Fig. 2 is a schematic diagram of a model of a convolutional neural network provided by an embodiment of the present disclosure
  • Fig. 3 is a schematic diagram of the training of the generative confrontation network provided by an embodiment of the present disclosure
  • Fig. 4 is a schematic structural diagram of a generator in an embodiment of the present disclosure.
  • Fig. 5 is another schematic diagram of the training of the generative confrontation network provided by an embodiment of the present disclosure.
  • Fig. 6 is a schematic structural diagram of another generator in an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a video sequence in an embodiment of the present disclosure.
  • Fig. 8 is a schematic structural diagram of a three-dimensional mesh in an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of an application scenario in an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a video processing device provided by an embodiment of the present disclosure.
  • Fig. 11 is a schematic structural diagram of an electronic device provided by an implementation of the present disclosure.
  • first”, “second” and the like in the embodiments of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.
  • the terms “comprising” and “having”, as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
  • the embodiment of the present disclosure provides a video processing method.
  • the video processing method includes the following steps:
  • Step 101 Obtain input data.
  • the input data in this embodiment includes picture data and/or video data.
  • Step 102 Input the input data into a video processing model to obtain output video data.
  • the video processing model is obtained through model training, and the video processing model may be a convolutional neural network model.
  • a Convolutional Neural Network is a neural network structure that uses images as input/output and replaces scalar weights with filters (convolutions).
  • Figure 2 exemplarily shows a 3-layer convolutional neural network.
  • This convolutional neural network takes 4 input images on the left, has 3 units (output images) in the hidden layer in the middle, and 2 units in the output layer, producing 2 output images.
  • Each weighted box corresponds to a filter (for example, it can be a 3x3x3 or 5x5x5 kernel), where the superscript of each parameter is the label indicating the input layer number, and the subscript is the label of the input and output units in turn.
  • the bias b is a scalar added to the output of the convolution.
  • the result of adding multiple convolutions and biases is then passed through an activation box, which typically corresponds to a rectified linear unit (ReLU), sigmoid function, or hyperbolic tangent, etc. Filters and biases are fixed during system operation, obtained through a training process using a set of input/output example images, and adjusted according to the application to meet certain optimization criteria.
  • a convolutional neural network with 3 layers is called a shallow convolutional neural network
  • a convolutional neural network with more than 5 layers is usually called a deep convolutional neural network.
  • the video processing model is obtained through model training using a Generative Adversarial Network (GAN).
  • GAN Generative Adversarial Network
  • the training process of GAN use generator to obtain output data based on input data, the output result of generator is marked as false (Fake), will satisfy the training target
  • the real data is marked as Real
  • the discriminator is used to discriminate the output result of the generator and the real data, and the parameters of the generator are further adjusted according to the discriminant result, and the generator and the discriminator are alternately trained according to the established loss function , until the loss function converges or reaches a certain number of iterations.
  • the training of GAN is completed, and the trained generator is regarded as the trained model.
  • the generation confrontation network includes a generator and a discriminator;
  • the generator is a model with a low-resolution image as an input and a high-resolution video sequence as an output;
  • the discriminator is an image as an input, with The discriminant result of the image is the output model;
  • the loss function of the model training includes the confrontation loss Ladv between the generator and the discriminator, and the input and output reconstruction loss Lrec of the generator.
  • the generator is used to remove noise based on the image added with the noise map zn, obtain an output result, compare the output result with the real image, and construct a loss function for model training.
  • the constructed loss function includes:
  • ⁇ in formula (1) is a preset coefficient
  • Gn represents the nth generator
  • Dn represents the nth discriminator
  • the value range of n is from 0 to N.
  • the first line is the reconstruction loss Lrec when n is not equal to N
  • the second line is the reconstruction loss Lrec when n is equal to N.
  • xn is Corresponding to the real result
  • z is the noise map.
  • the video processing model includes multiple generators that are arranged in sequence and correspond to different image resolutions, as shown in Figures 3 and 5.
  • the output is scaled up, higher resolution noise is added, and a new generator is learned to create higher resolution images.
  • the resolution of the output is the same as the resolution of the real image corresponding to the training target, complete Model training.
  • the noise inputs corresponding to different resolutions are independent and identically distributed samples, so each pixel value is independent of other pixel values.
  • the resolution of the noise input can be changed to generate images of arbitrarily different resolutions.
  • each generator G includes a transposed three-dimensional convolution unit 602 and a plurality of first three-dimensional convolution layers 601, and the transposed three-dimensional convolution unit 602 is used for input data and intermediate processing data according to the generator G
  • the first output data is generated, the output video data is obtained according to the first output data, and the intermediate processing data is obtained after inputting the input data into multiple first three-dimensional convolutional layers 601 .
  • each first three-dimensional convolutional layer 601 includes a three-dimensional convolution unit 6011 and a residual Layer 6012.
  • the existing pyramid-structured generation confrontation network (SinGAN) is only suitable for adjusting two-dimensional images.
  • the transposed three-dimensional convolution unit 602 can maintain A one-to-many mapping, so as to increase the dimension of the data that can be processed, so that the processing of three-dimensional images can be realized, that is, it is possible to output the image as a video file.
  • the generator G further includes a second three-dimensional convolutional layer 603.
  • the second three-dimensional convolutional layer 603 is used to adjust the second output data obtained according to the first output data.
  • the second three-dimensional convolutional layer 603 The stride of at least one dimension of the convolution layer 603 is larger than the stride of the transposed 3D convolution unit 602 .
  • the step size of each dimension of the second 3D convolution layer 603 is greater than the step size of the transposed 3D convolution unit 602 .
  • the step size of the second 3D convolutional layer 603 By controlling the step size of the second 3D convolutional layer 603 to be larger than the step size of the transposed 3D convolution unit 602, it is possible to use the second 3D convolutional layer 603 to perform an upsampling operation, thereby realizing the enlargement of the size of the image or the time compression of the image .
  • adjusting the first output data specifically refers to adjusting the duration or resolution of the first output data, for example, it may be adjusting the length or width of the first output data, or compressing the duration of the first video,
  • the adjusted first output data is used as the second output data.
  • a second three-dimensional convolution layer 603 is further added, and the second three-dimensional convolution layer 603 adjusts the step size of the dimension to realize the time or space dimension adjustment.
  • the second three-dimensional convolutional layer 603 includes a first step size corresponding to the time dimension, and a second step size corresponding to the output size dimension
  • the transposed three-dimensional convolution unit 602 includes a step size corresponding to the time dimension A third step, and a fourth step corresponding to the output size dimension.
  • the first step length of the second three-dimensional convolutional layer 603 corresponding to the time dimension T is A
  • the second step lengths corresponding to the output dimension dimensions H and W are B and C
  • the third step size corresponding to the time dimension T is X
  • the fourth step size corresponding to the output size dimensions H and W are Y and Z for illustration.
  • the time dimension T corresponds to the duration of the video data
  • the output dimension dimensions H and W respectively correspond to the width and height of the video data to represent the resolution information of the video data.
  • the output result of the transposed three-dimensional convolution unit 602 can be amplified by 1.5 times, that is, by a ratio of 3/2.
  • the ratio of the first step to the third step is equal to or not equal to the ratio of the second step to the fourth step.
  • the ratio of A to X can be equal to the ratio of B to Y or not, In this way, it is possible to realize zooming in different proportions for the time dimension and the space dimension.
  • high-frequency textures in space may be stationary, which means that these textures have very low frequency in the temporal dimension. In this way, it can be compressed in the time dimension. Since the frequency of the texture in the time dimension is low, even if the time dimension is compressed, useful information will not be lost.
  • the adaptability can be improved to meet the display requirements of different sizes.
  • the spatial dimension of the input data By adjusting the spatial dimension of the input data, the duration of the output video data can be controlled while avoiding information loss, so that specific The content can meet the playback duration requirements in different scenarios, thus improving the processing effect of video data and meeting a wider range of needs.
  • the time dimension and the space dimension are adjusted in different proportions, it can cope with more scenarios and fully meet the requirements for video duration and video size.
  • the method when the input data includes video data, before inputting the input data into a video processing model to obtain output video data, the method further includes:
  • Extracting a 3D patch of the video sequence wherein each pixel in the video sequence exists in at least one of the 3D patches, and at least some of the pixels are located in a plurality of the 3D patches;
  • the three-dimensional patch is used as an input of the video processing model.
  • the input data is converted into a three-dimensional patch (3D-Patch).
  • Figure 7 shows a schematic structural diagram of a video sequence, which includes a time dimension T, corresponding to the duration of the video sequence, and two spatial dimensions H and W, respectively corresponding to the video The width and height of the sequence.
  • the 3D patches in the video sequence are extracted. Since each pixel in the video sequence exists in at least one 3D patch, the method of all 3D patches actually includes the corresponding video All information in the sequence. By adjusting the size of the three-dimensional patch, it can meet the processing requirements of the device processor, reduce the data dimension, and make full use of the performance of the processor.
  • the 3D patch processed by the first 3D convolution layer and the transposed 3D convolution unit can be understood as the above-mentioned first output data.
  • the 3D patch Based on the relative positional relationship between the 3D patches, the 3D patch can be synthesized into a continuous video Data, the obtained video data can be understood as the above-mentioned output video data.
  • a second three-dimensional convolution layer can also be set to process the first output data to obtain the second output data, and generate output video data according to the second output data.
  • At least some of the pixels are located in multiple 3D patches. It can be understood that there is a certain overlap between the 3D patches, so that blocking shadows can be reduced. Since the time dimension and size dimension of the 3D patches are adjustable, by adding The video data is divided into three-dimensional patches, which can support the processing of video data in any time dimension and size dimension.
  • multiple first images correspond to the same second image, wherein the multiple first images are more than one second image in the input data.
  • the second image is a frame of image in the output video data.
  • the technical solution of this embodiment can also be used to adjust the image or duration of video data, as shown in Figure 9, in one of the embodiments, the technical solution of this embodiment is used to compress video sequences, for example, For the video data whose original length is 10 seconds (sec), by adjusting the time scale parameter, the video data can be compressed to 5 seconds. It can be understood that the two cars originally displayed in two different frames are adjusted to be displayed in the same frame.
  • the contents of multiple frames of images in the input data are displayed in one frame of images of the output video data, so that the duration of the video is compressed, but the content to be displayed will not be lost.
  • the embodiment of the present disclosure also provides a video processing device.
  • the video processing device 1000 includes:
  • the input data acquisition module 1001 is configured to acquire input data, wherein the input data includes picture data and/or video data;
  • An input module 1002 configured to input the input data into a video processing model to obtain output video data
  • the video processing model includes a plurality of generators arranged in sequence and corresponding to different image resolutions, each of the generators includes a transposed three-dimensional convolution unit and a plurality of first three-dimensional convolution layers, and the transposed three-dimensional
  • the convolution unit is used to generate first output data according to the input data of the generator and intermediate processing data, the output video data is obtained according to the first output data, and the intermediate processing data is the input data obtained after inputting the plurality of first three-dimensional convolutional layers.
  • the generator further includes a second three-dimensional convolutional layer, the second three-dimensional convolutional layer is used to adjust the second output data obtained according to the first output data, and the second three-dimensional convolutional layer
  • the stride of at least one dimension of the layer is larger than the stride of the transposed 3D convolutional unit.
  • the second 3D convolutional layer includes a first step size corresponding to the time dimension, and a second step size corresponding to the output size dimension
  • each of the transposed 3D convolution units includes a step size corresponding to the time dimension The corresponding third step size, and the fourth step size corresponding to the output size dimension.
  • the ratio of the first step size to the third step size is not equal to the ratio of the second step size to the fourth step size.
  • the number of the first three-dimensional convolutional layers is four.
  • each of the first three-dimensional convolutional layers includes a three-dimensional convolutional unit and a residual layer arranged in sequence.
  • multiple first images correspond to the same second image, wherein the multiple The first image is a plurality of different frames of images in the input data, and the second image is a frame of images in the output video data.
  • the input video processing model is obtained by generating a confrontation network for model training, and the generation confrontation network includes the generator and a discriminator;
  • the generator is a model with a low-resolution image as input and a high-resolution video sequence as output;
  • the discriminator is a model that takes an image as an input and outputs a discrimination result for the image
  • the loss function for model training is determined from the adversarial loss between the generator and the discriminator, and the input and output reconstruction losses of the generator.
  • the input data includes video data
  • it further includes:
  • a video sequence division module configured to divide the input data into multiple video sequences according to preset time intervals
  • a three-dimensional patch extraction module configured to extract three-dimensional patches of the video sequence, wherein each pixel in the video sequence exists in at least one of the three-dimensional patches, and at least some pixels are located in multiple of the three-dimensional patches. in the dough;
  • the input data determination module is configured to use the 3D mesh as the input of the video processing model.
  • the video processing apparatus 1000 of this embodiment can implement each step of the above-mentioned video processing method embodiment, and can achieve basically the same technical effect, which will not be repeated here.
  • the embodiment of the present disclosure also provides an electronic device.
  • the electronic device may include a processor 1101 , a memory 1102 and a program 11021 stored in the memory 1102 and executable on the processor 1101 .
  • any steps in the method embodiment corresponding to FIG. 1 can be implemented and the same beneficial effect can be achieved, which will not be repeated here.
  • the electronic device is a network-side device
  • the program 11021 when executed by the processor 1101, any steps in the method embodiment corresponding to FIG. 11 can be implemented and the same beneficial effect can be achieved, and details are not repeated here.
  • An embodiment of the present disclosure further provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any step in the above method embodiment corresponding to FIG. 1 can be implemented, and The same technical effect can be achieved, so in order to avoid repetition, details will not be repeated here.
  • the storage medium is, for example, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • magnetic disk or an optical disk and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本公开提供一种视频处理方法、装置、电子设备和可读存储介质。视频处理方法,包括以下步骤:获取输入数据,所述输入数据包括图片数据和/或视频数据;将所述输入数据输入视频处理模型获得输出视频数据;其中,所述输出视频数据和所述输入数据的分辨率和/或时长不相等,所述视频处理模型包括多个依次设置且对应不同图像分辨率的生成器,每一所述生成器包括转置三维卷积单元和多个第一三维卷积层,所述转置三维卷积单元用于根据所述生成器的输入数据和中间处理数据生成第一输出数据,所述输出视频数据是根据所述第一输出数据得到的,所述中间处理数据是将所述输入数据输入所述多个第一三维卷积层后得到的。本公开实施例能够提高视频处理效果。

Description

视频处理方法、装置、电子设备和可读存储介质 技术领域
本公开实施例涉及图像处理技术领域,尤其涉及一种视频处理方法、装置、电子设备和可读存储介质。
背景技术
图像处理技术支持通过模型训练通过一定的图像生成满足特定要求的,例如,通过对于模型的不断训练,以基于原始图像生成分辨率更高或尺寸不同的图像。
发明内容
在其中一些方面,本公开实施例提供了一种视频处理方法,包括以下步骤:
获取输入数据,其中,所述输入数据包括图片数据和/或视频数据;
将所述输入数据输入视频处理模型获得输出视频数据;
其中,所述输出视频数据和所述输入数据的分辨率和/或时长不相等,所述视频处理模型包括多个依次设置且对应不同图像分辨率的生成器,每一所述生成器包括转置三维卷积单元和多个第一三维卷积层,所述转置三维卷积单元用于根据所述生成器的输入数据和中间处理数据生成第一输出数据,所述输出视频数据是根据所述第一输出数据得到的,所述中间处理数据是将所述输入数据输入所述多个第一三维卷积层后得到的。
在一些实施例中,所述生成器还包括第二三维卷积层,所述第二三维卷积层用于调整所述第一输出数据获得第二输出数据,所述第二三维卷积层的至少一个维度的步长大于所述转置三维卷积单元的步长。
在一些实施例中,所述第二三维卷积层包括与时间维度对应的第一步长,以及与输出尺寸维度对应的第二步长,所述转置三维卷积单元均包括与时间维度对应的第三步长,以及与输出尺寸维度对应的第四步长。
在一些实施例中,所述第一步长和所述第三步长的比值与所述第二步长 和所述第四步长的比值不相等。
在一些实施例中,所述第一三维卷积层的数量为四个。
在一些实施例中,每一所述第一三维卷积层包括依次设置的一个三维卷积单元和一个残差层。
在一些实施例中,在所述输入数据包括视频数据且所述输出视频数据和所述输入数据的时长不相等的情况下,多个第一图像对应同一第二图像,其中,所述多个第一图像为所述输入数据中多帧不同的图像,所述第二图像为所述输出视频数据中的一帧图像。
在一些实施例中,所述输入视频处理模型是通过生成对抗网络进行模型训练得到的,所述生成对抗网络包括所述生成器和判别器;
其中,所述生成器是以低分辨率图像为输入,以高分辨率视频序列为输出的模型;
所述判别器是以图像为输入,以对于图像的判别结果为输出的模型;
模型训练的损失函数是根据所述生成器和所述判别器之间的对抗损失,以及所述生成器的输入和输出重构损失确定的。
在一些实施例中,在所述输入数据包括视频数据的情况下,所述将所述输入数据输入视频处理模型获得输出视频数据之前,所述方法还包括:
将所述输入数据按照预设时间间隔划分为多个视频序列;
提取所述视频序列的三维面片,其中,所述视频序列中的每一像素至少存在于一个所述三维面片中,且至少部分像素位于多个所述三维面片中;
将所述三维面片作为所述视频处理模型的输入。
在其中一些方面,本公开实施例提供了一种视频处理装置,包括:
输入数据获取模块,用于获取输入数据,其中,所述输入数据包括图片数据和/或视频数据;
输入模块,用于将所述输入数据输入视频处理模型获得输出视频数据;
其中,所述视频处理模型包括多个依次设置且对应不同图像分辨率的生成器,每一所述生成器包括转置三维卷积单元和多个第一三维卷积层,所述转置三维卷积单元用于根据所述生成器的输入数据和中间处理数据生成第一输出数据,所述输出视频数据是根据所述第一输出数据得到的,所述中间处 理数据是将所述输入数据输入所述多个第一三维卷积层后得到的。
在一些实施例中,所述生成器还包括第二三维卷积层,所述第二三维卷积层用于调整所述第一输出数据获得第二输出数据,所述第二三维卷积层的至少一个维度的步长大于所述转置三维卷积单元的步长。
在一些实施例中,所述第二三维卷积层包括与时间维度对应的第一步长,以及与输出尺寸维度对应的第二步长,所述转置三维卷积单元均包括与时间维度对应的第三步长,以及与输出尺寸维度对应的第四步长。
在一些实施例中,所述第一步长和所述第三步长的比值与所述第二步长和所述第四步长的比值不相等。
在一些实施例中,所述第一三维卷积层的数量为四个。
在一些实施例中,每一所述第一三维卷积层包括依次设置的一个三维卷积单元和一个残差层。
在一些实施例中,在所述输入数据包括视频数据且所述输出视频数据和所述输入数据的时长不相等的情况下,多个第一图像对应同一第二图像,其中,所述多个第一图像为所述输入数据中多帧不同的图像,所述第二图像为所述输出视频数据中的一帧图像。
在一些实施例中,所述输入视频处理模型是通过生成对抗网络进行模型训练得到的,所述生成对抗网络包括所述生成器和判别器;
其中,所述生成器是以低分辨率图像为输入,以高分辨率视频序列为输出的模型;
所述判别器是以图像为输入,以对于图像的判别结果为输出的模型;
模型训练的损失函数是根据所述生成器和所述判别器之间的对抗损失,以及所述生成器的输入和输出重构损失确定的。
在一些实施例中,在所述输入数据包括视频数据的情况下,还包括:
视频序列划分模块,用于将所述输入数据按照预设时间间隔划分为多个视频序列;
三维面片提取模块,用于提取所述视频序列的三维面片,其中,所述视频序列中的每一像素至少存在于一个所述三维面片中,且至少部分像素位于多个所述三维面片中;
输入数据确定模块,用于将所述三维面片作为所述视频处理模型的输入。
在其中一些方面,本公开实施例提供了一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序;所述处理器,用于读取存储器中的程序实现如前述第一方面所述方法中的步骤。
在其中一些方面,本公开实施例提供了一种可读存储介质,用于存储程序,所述程序被处理器执行时实现如前述第一方面所述方法中的步骤。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对本公开实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本公开一实施例提供的视频处理方法的流程示意图;
图2是本公开一实施例提供的卷积神经网络的模型示意图;
图3是本公开一实施例提供的生成对抗网络的训练示意图;
图4是本公开一实施例中生成器的结构示意图;
图5是本公开一实施例提供的生成对抗网络的又一训练示意图;
图6是本公开一实施例中又一生成器的结构示意图;
图7是本公开一实施例中视频序列的结构示意图;
图8是本公开一实施例中三维面片的结构示意图;
图9是本公开一实施例中的应用场景示意图;
图10是本公开一实施例提供的视频处理装置的结构示意图;
图11是本公开一实施提供的电子设备的结构示意图。
具体实施方式
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
本公开实施例中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。此外,本申请中使用“和/或”表示所连接对象的至少其中之一,例如A和/或B和/或C,表示包含单独A,单独B,单独C,以及A和B都存在,B和C都存在,A和C都存在,以及A、B和C都存在的7种情况。
本公开实施例提供了一种视频处理方法。
如图1所示,在其中一些实施例中,该视频处理方法包括以下步骤:
步骤101:获取输入数据。
本实施例中的输入数据包括图片数据和/或视频数据。
步骤102:将所述输入数据输入视频处理模型获得输出视频数据。
本公开实施例的技术方案中,视频处理模型是通过模型训练获得的,该视频处理模型可以是卷积神经网络模型。
卷积神经网络是一种使用图像作为输入/输出并用滤波器(卷积)代替标量权重的神经网络结构。
如图2所示,图2示例性的展示了一个3层卷积神经网络。该卷积神经网络在左侧获取4个输入图像,在中间的隐藏层有3个单元(输出图像),在输出层有2个单元,生成2个输出图像。
每个带权重的框对应一个过滤器(示例性的,可以是3x3x3或5x5x5内核),其中各参数的上标是表示输入层编号的标签,下标依次为输入和输出单位的标签。偏差b是加在卷积输出上的标量。添加多个卷积和偏置的结果随后通过激活盒,激活盒通常对应于整流线性单元(ReLU)、sigmoid函数或双曲正切等。滤波器和偏置在系统运行期间固定,通过使用一组输入/输出示例图像的训练过程获得,并根据应用程序进行调整以符合某些优化标准。一般来说,3层的卷积神经网络被称作浅层卷积神经,而大于5层的卷积神经网络通常被称作深层卷积神经。
进一步的,在一些实施例中,视频处理模型是通过生成对抗网络(GAN)进行模型训练得到的。
如图3所示,GAN的模型训练过程中,需要建立生成器(Generator,记做G)和判别器(Discriminator,记做D)。其中,生成器用于执行生成任务,判别器用于判定生成结果是否正确。
示例性的,如图3所示,在一个实施例中,GAN的训练过程中,利用生成器基于输入数据获得输出数据,将生成器的输出结果标记为假(Fake),将满足训练目标的真实数据标记为真(Real),利用判别器对生成器的输出结果和真实数据进行判别,根据判别结果进一步调整生成器的参数,根据所建立的损失函数,对生成器和判别器进行交替训练,直至损失函数收敛或达到一定的迭代此处,完成GAN的训练,其中,训练完成的生成器即作为训练完成的模型。
在一些实施例中,具体的,生成对抗网络包括生成器和判别器;生成器是以低分辨率图像为输入,以高分辨率视频序列为输出的模型;判别器是以图像为输入,以对于图像的判别结果为输出的模型;模型训练的损失函数包括根据生成器和判别器之间的对抗损失Ladv,以及生成器的输入和输出重构损失Lrec。
如图4所示,可以理解为,生成器用于基于添加了噪声图zn的图像去除噪声,获得输出结果,将该输出结果与真实图像对比,构建损失函数以进行模型训练。
在其中一些实施例中,所构建的损失函数包括:
Figure PCTCN2021127079-appb-000001
Figure PCTCN2021127079-appb-000002
Figure PCTCN2021127079-appb-000003
其中,公式(1)中α为预设系数,Gn为代表第n个生成器,Dn为代表第n个判别器,n的取值范围为0至N。公式(2)中第一行为n不等于N时的重构损失Lrec,第二行为n等于N时的重构损失Lrec。式中,
Figure PCTCN2021127079-appb-000004
为第n个生成器的输出结果,xn为
Figure PCTCN2021127079-appb-000005
对应的真实结果,z为噪声图。
视频处理模型包括多个依次设置且对应不同图像分辨率的生成器,如图 3和5所示,本实施例中,首先学习从低分辨率噪声生成最小分辨率图像。该学习任务完成之后,将放大输出,添加更高分辨率的噪波,并学习新的生成器以创建更高分辨率的图像。按照图3和图5中从下到上的顺序,不断进行上述训练过程,如图3和图5最上方一行所示,直到输出的分辨率与训练目标对应的真实图像的分辨率相同,完成模型训练。
不同分辨率对应的噪声输入为独立且相同分布的样本,因此每个像素值独立于其他像素值。同时,由于生成器是完全卷积的,可以改变噪声输入的分辨率来生成任意不同分辨率的图像。
如图6所示,每一生成器G包括转置三维卷积单元602和多个第一三维卷积层601,转置三维卷积单元602用于根据生成器G的输入数据和中间处理数据生成第一输出数据,输出视频数据是根据第一输出数据得到的,中间处理数据是将输入数据输入多个第一三维卷积层601后得到的。
在一些实施例中,第一三维卷积层601的数量为四个,进一步的,在一些实施例中,每一第一三维卷积层包括依次设置的一个三维卷积单元6011和一个残差层6012。
需要理解的是,现有的金字塔结构的生成对抗网络(SinGAN)仅适用于调整二维图像,本实施例中,通过增加转置三维卷积单元602,能够通过转置三维卷积单元602维护一个一对多的映射,从而增加所能处理的数据的维度,从而能够实现对三维图像的处理,即使得输出图像为视频文件成为可能。
请继续参阅图6,在一些实施例中,生成器G还包括第二三维卷积层603,第二三维卷积层603用于调整根据第一输出数据获得第二输出数据,第二三维卷积层603的至少一个维度的步长大于转置三维卷积单元602的步长。在一些实施例中,第二三维卷积层603的各维度的步长均大于转置三维卷积单元602的步长。
通过控制第二三维卷积层603的步长大于转置三维卷积单元602的步长,能够实现利用第二三维卷积层603执行上采样操作,从而实现放大图像的尺寸或压缩图像的时间。
这里,调整第一输出数据具体指的是对第一输出数据的时长或分辨率进行调整,示例性的,可以是调整第一输出数据的长或宽,也可以是压缩第一 视频的时长,调整后的第一输出数据作为第二输出数据。
可以理解的是,由于引入了时间维度,因此,时间和空间(图像分辨率)的放大因子需要基于不同的调整实现。可选的,当需要调整时间维度和空间维度中的至少一项时,进一步增加了第二三维卷积层603,第二三维卷积层603通过调整维度步长,以实现对于时间或空间维度的调整。
在一些实施例中,第二三维卷积层603包括与时间维度对应的第一步长,以及与输出尺寸维度对应的第二步长,转置三维卷积单元602均包括与时间维度对应的第三步长,以及与输出尺寸维度对应的第四步长。
本实施例中,第二三维卷积层603与时间维度T对应的第一步长为A,与输出尺寸维度H、W对应的第二步长为B和C,转置三维卷积单元与时间维度T对应的第三步长为X,与输出尺寸维度H、W对应的第四步长为Y和Z做示例性说明。可以理解,时间维度T对应视频数据的持续时间,输出尺寸维度H、W分别对应视频数据的宽度和高度,以表征视频数据的分辨率信息。
当A=B=C=3,且X=Y=Z=2时,可以将转置三维卷积单元602的输出结果按照1.5倍放大,即按照3/2的比例放大。
第一步长和第三步长的比值与第二步长和第四步长的比值相等或不相等,换句话说,A和X的比值可以等于B和Y的比值,也可以不相等,这样,能够实现针对时间维度和空间维度进行不同比例的放大。
示例性的,空间中的高频纹理可能是静止的,这意味着这些纹理在时间维度上的频率非常低。这样,可以对其在时间维度上压缩,由于纹理在时间维度上的频率较低,因此,即使对时间维度进行压缩,也不会导致有用的信息丢失。
通过调整输入数据的时间维度,能够提高适应性,满足不同尺寸的显示需求,同时,通过调整输入数据的空间维度,能够在避免信息丢失的情况下,控制输出视频数据的时长,从而可以使得特定的内容能够满足不同场景下的播放时长要求,这样,提高了对于视频数据的处理效果,能够满足更广泛的需求。进一步的,由于时间维度和空间维度分别进行不同比例的调节,能够应对更多的场景,充分满足对于视频时长和视频尺寸的需求。
在一些实施例中,在所述输入数据包括视频数据的情况下,所述将所述输入数据输入视频处理模型获得输出视频数据之前,所述方法还包括:
将所述输入数据按照预设时间间隔划分为多个视频序列;
提取所述视频序列的三维面片,其中,所述视频序列中的每一像素至少存在于一个所述三维面片中,且至少部分像素位于多个所述三维面片中;
将所述三维面片作为所述视频处理模型的输入。
需要理解的是,现有方式在进行三维文件处理时,需要在处理器中,具体可以是中央处理器CPU或图形处理器GPU中,提供五维张量,五个维度分别对应批处理、通道、时间、宽度和高度,这导致对于视频处理的数据量远高于一般设备所能承受的能力,从而导致视频延迟较高且处理速度较慢。
本实施例中,将输入数据转换为三维片面(3D-Patch)。
如图7所示,本实施例中,图7示出了一个视频序列的结构示意图,该视频序列包括一个时间维度T,对应视频序列的持续时间,两个空间维度H和W,分别对应视频序列的宽度和高度。
如图8所示,本实施例中,提取视频序列中的三维面片,由于视频序列中的每一像素至少存在于一个三维面片中,所以全部三维面片的方式实际上包括了相应视频序列中的全部信息。通过调整三维面片尺寸,能够满足设备处理器的处理需求,减少数据维度的同时,也充分利用了处理器的性能。
经过第一三维卷积层和转置三维卷积单元处理的三维面片可以理解为上述第一输出数据,基于该三维面片之间的相对位置关系,能够将三维面片合成为连续的视频数据,所获得的视频数据可以理解为上述输出视频数据。
可以理解,当需要调整输出视频数据的尺寸或市场时,还可以设置第二三维卷积层对第一输出数据进行处理获得第二输出数据,并根据第二输出数据生成输出视频数据。
至少部分像素位于多个三维面片中,可以理解为,三维面片之间存在一定的重叠,这样,能够减少阻塞阴影,由于三维面片的时间维度和尺寸维度均是可调整的,通过将视频数据划分为三维面片,能够支持处理任意时间维度及尺寸维度的视频数据。
在一些实施例中,在输入数据包括视频数据且输出视频数据和输入数据 的时长不相等的情况下,多个第一图像对应同一第二图像,其中,多个第一图像为输入数据中多帧不同的图像,第二图像为输出视频数据中的一帧图像。
可以理解为,本实施例的技术方案还可以用于调整视频数据的图像或持续时间,如图9所示,在其中一个实施例中,本实施例的技术方案用于压缩视频序列,例如,针对原本长度为10秒(sec)的视频数据,通过调整时间尺度参数,能够将视频数据压缩为5秒。可以理解为,将原本分别在两个不同画面中显示的两辆汽车调整为在同一画面中显示。
也就是说,输入数据中的多帧图像的内容在输出视频数据的一帧图像中显示,这样,视频的时长被压缩,但是所需显示的内容并不会丢失。
本公开实施例还提供了一种视频处理装置。
如图10所示,在一个实施例中,该视频处理装置1000包括:
输入数据获取模块1001,用于获取输入数据,其中,所述输入数据包括图片数据和/或视频数据;
输入模块1002,用于将所述输入数据输入视频处理模型获得输出视频数据;
其中,所述视频处理模型包括多个依次设置且对应不同图像分辨率的生成器,每一所述生成器包括转置三维卷积单元和多个第一三维卷积层,所述转置三维卷积单元用于根据所述生成器的输入数据和中间处理数据生成第一输出数据,所述输出视频数据是根据所述第一输出数据得到的,所述中间处理数据是将所述输入数据输入所述多个第一三维卷积层后得到的。
在一些实施例中,所述生成器还包括第二三维卷积层,所述第二三维卷积层用于调整根据所述第一输出数据获得第二输出数据,所述第二三维卷积层的至少一个维度的步长大于所述转置三维卷积单元的步长。
在一些实施例中,所述第二三维卷积层包括与时间维度对应的第一步长,以及与输出尺寸维度对应的第二步长,所述转置三维卷积单元均包括与时间维度对应的第三步长,以及与输出尺寸维度对应的第四步长。
在一些实施例中,所述第一步长和所述第三步长的比值与所述第二步长和所述第四步长的比值不相等。
在一些实施例中,所述第一三维卷积层的数量为四个。
在一些实施例中,每一所述第一三维卷积层包括依次设置的一个三维卷积单元和一个残差层。
在一些实施例中,在所述输入数据包括视频数据且所述输出视频数据和所述输入数据的时长不相等的情况下,多个第一图像对应同一第二图像,其中,所述多个第一图像为所述输入数据中多帧不同的图像,所述第二图像为所述输出视频数据中的一帧图像。
在一些实施例中,所述输入视频处理模型是通过生成对抗网络进行模型训练得到的,所述生成对抗网络包括所述生成器和判别器;
其中,所述生成器是以低分辨率图像为输入,以高分辨率视频序列为输出的模型;
所述判别器是以图像为输入,以对于图像的判别结果为输出的模型;
模型训练的损失函数是根据所述生成器和所述判别器之间的对抗损失,以及所述生成器的输入和输出重构损失确定的。
在一些实施例中,在所述输入数据包括视频数据的情况下,还包括:
视频序列划分模块,用于将所述输入数据按照预设时间间隔划分为多个视频序列;
三维面片提取模块,用于提取所述视频序列的三维面片,其中,所述视频序列中的每一像素至少存在于一个所述三维面片中,且至少部分像素位于多个所述三维面片中;
输入数据确定模块,用于将所述三维面片作为所述视频处理模型的输入。
本实施例的视频处理装置1000能够实现上述视频处理方法实施例的各个步骤,并能实现基本相同的技术效果,此处不再赘述。
本公开实施例还提供一种电子设备。请参见图11,电子设备可以包括处理器1101、存储器1102及存储在存储器1102上并可在处理器1101上运行的程序11021。
在电子设备为终端的情况下,程序11021被处理器1101执行时可实现图1对应的方法实施例中的任意步骤及达到相同的有益效果,此处不再赘述。
在电子设备为网络侧设备的情况下,程序11021被处理器1101执行时可实现图11对应的方法实施例中的任意步骤及达到相同的有益效果,此处不再 赘述。
本领域普通技术人员可以理解实现上述实施例方法的全部或者部分步骤是可以通过程序指令相关的硬件来完成,所述的程序可以存储于一可读取介质中。
本公开实施例还提供一种可读存储介质,所述可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时可实现上述图1对应的方法实施例中的任意步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。
所述的存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
以上所述是本公开实施例的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本公开所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本公开的保护范围。

Claims (20)

  1. 一种视频处理方法,包括以下步骤:
    获取输入数据,其中,所述输入数据包括图片数据和/或视频数据;
    将所述输入数据输入视频处理模型获得输出视频数据;
    其中,所述输出视频数据和所述输入数据的分辨率和/或时长不相等,所述视频处理模型包括多个依次设置且对应不同图像分辨率的生成器,每一所述生成器包括转置三维卷积单元和多个第一三维卷积层,所述转置三维卷积单元用于根据所述生成器的输入数据和中间处理数据生成第一输出数据,所述输出视频数据是根据所述第一输出数据得到的,所述中间处理数据是将所述输入数据输入所述多个第一三维卷积层后得到的。
  2. 根据权利要求1所述的方法,其中,所述生成器还包括第二三维卷积层,所述第二三维卷积层用于调整所述第一输出数据获得第二输出数据,所述第二三维卷积层的至少一个维度的步长大于所述转置三维卷积单元的步长。
  3. 根据权利要求2所述的方法,其中,所述第二三维卷积层包括与时间维度对应的第一步长,以及与输出尺寸维度对应的第二步长,所述转置三维卷积单元均包括与时间维度对应的第三步长,以及与输出尺寸维度对应的第四步长。
  4. 根据权利要求3所述的方法,其中,所述第一步长和所述第三步长的比值与所述第二步长和所述第四步长的比值不相等。
  5. 根据权利要求1所述的方法,其中,所述第一三维卷积层的数量为四个。
  6. 根据权利要求5所述的方法,其中,每一所述第一三维卷积层包括依次设置的一个三维卷积单元和一个残差层。
  7. 根据权利要求1所述的方法,其中,在所述输入数据包括视频数据且所述输出视频数据和所述输入数据的时长不相等的情况下,多个第一图像对应同一第二图像,其中,所述多个第一图像为所述输入数据中多帧不同的图像,所述第二图像为所述输出视频数据中的一帧图像。
  8. 根据权利要求1所述的方法,其中,所述输入视频处理模型是通过生成对抗网络进行模型训练得到的,所述生成对抗网络包括所述生成器和判别器;
    其中,所述生成器是以低分辨率图像为输入,以高分辨率视频序列为输出的模型;
    所述判别器是以图像为输入,以对于图像的判别结果为输出的模型;
    模型训练的损失函数是根据所述生成器和所述判别器之间的对抗损失,以及所述生成器的输入和输出重构损失确定的。
  9. 根据权利要求1至8中任一项所述的方法,其中,在所述输入数据包括视频数据的情况下,所述将所述输入数据输入视频处理模型获得输出视频数据之前,所述方法还包括:
    将所述输入数据按照预设时间间隔划分为多个视频序列;
    提取所述视频序列的三维面片,其中,所述视频序列中的每一像素至少存在于一个所述三维面片中,且至少部分像素位于多个所述三维面片中;
    将所述三维面片作为所述视频处理模型的输入。
  10. 一种视频处理装置,包括:
    输入数据获取模块,用于获取输入数据,其中,所述输入数据包括图片数据和/或视频数据;
    输入模块,用于将所述输入数据输入视频处理模型获得输出视频数据;
    其中,所述视频处理模型包括多个依次设置且对应不同图像分辨率的生成器,每一所述生成器包括转置三维卷积单元和多个第一三维卷积层,所述转置三维卷积单元用于根据所述生成器的输入数据和中间处理数据生成第一输出数据,所述输出视频数据是根据所述第一输出数据得到的,所述中间处理数据是将所述输入数据输入所述多个第一三维卷积层后得到的。
  11. 根据权利要求10所述的装置,其中,所述生成器还包括第二三维卷积层,所述第二三维卷积层用于调整所述第一输出数据获得第二输出数据,所述第二三维卷积层的至少一个维度的步长大于所述转置三维卷积单元的步长。
  12. 根据权利要求11所述的装置,其中,所述第二三维卷积层包括与时 间维度对应的第一步长,以及与输出尺寸维度对应的第二步长,所述转置三维卷积单元均包括与时间维度对应的第三步长,以及与输出尺寸维度对应的第四步长。
  13. 根据权利要求12所述的装置,其中,所述第一步长和所述第三步长的比值与所述第二步长和所述第四步长的比值不相等。
  14. 根据权利要求10所述的装置,其中,所述第一三维卷积层的数量为四个。
  15. 根据权利要求14所述的装置,其中,每一所述第一三维卷积层包括依次设置的一个三维卷积单元和一个残差层。
  16. 根据权利要求10所述的装置,其中,在所述输入数据包括视频数据且所述输出视频数据和所述输入数据的时长不相等的情况下,多个第一图像对应同一第二图像,其中,所述多个第一图像为所述输入数据中多帧不同的图像,所述第二图像为所述输出视频数据中的一帧图像。
  17. 根据权利要求10所述的装置,其中,所述输入视频处理模型是通过生成对抗网络进行模型训练得到的,所述生成对抗网络包括所述生成器和判别器;
    其中,所述生成器是以低分辨率图像为输入,以高分辨率视频序列为输出的模型;
    所述判别器是以图像为输入,以对于图像的判别结果为输出的模型;
    模型训练的损失函数是根据所述生成器和所述判别器之间的对抗损失,以及所述生成器的输入和输出重构损失确定的。
  18. 根据权利要求10至17中任一项所述的装置,其中,在所述输入数据包括视频数据的情况下,还包括:
    视频序列划分模块,用于将所述输入数据按照预设时间间隔划分为多个视频序列;
    三维面片提取模块,用于提取所述视频序列的三维面片,其中,所述视频序列中的每一像素至少存在于一个所述三维面片中,且至少部分像素位于多个所述三维面片中;
    输入数据确定模块,用于将所述三维面片作为所述视频处理模型的输入。
  19. 一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序;其特征在于,所述处理器,用于读取存储器中的程序实现如权利要求1至9中任一项所述的视频处理方法中的步骤。
  20. 一种可读存储介质,用于存储程序,其特征在于,所述程序被处理器执行时实现如权利要求1至9中任一项所述的视频处理方法中的步骤。
PCT/CN2021/127079 2021-10-28 2021-10-28 视频处理方法、装置、电子设备和可读存储介质 WO2023070448A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US17/927,148 US20240135488A1 (en) 2021-10-28 2021-10-27 Video processing method and device, electronic apparatus, and readable storage medium
CN202180003120.5A CN116368511A (zh) 2021-10-28 2021-10-28 视频处理方法、装置、电子设备和可读存储介质
PCT/CN2021/127079 WO2023070448A1 (zh) 2021-10-28 2021-10-28 视频处理方法、装置、电子设备和可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/127079 WO2023070448A1 (zh) 2021-10-28 2021-10-28 视频处理方法、装置、电子设备和可读存储介质

Publications (1)

Publication Number Publication Date
WO2023070448A1 true WO2023070448A1 (zh) 2023-05-04

Family

ID=86160367

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/127079 WO2023070448A1 (zh) 2021-10-28 2021-10-28 视频处理方法、装置、电子设备和可读存储介质

Country Status (3)

Country Link
US (1) US20240135488A1 (zh)
CN (1) CN116368511A (zh)
WO (1) WO2023070448A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118430A (zh) * 2018-08-24 2019-01-01 深圳市商汤科技有限公司 超分辨率图像重建方法及装置、电子设备及存储介质
CN111340711A (zh) * 2020-05-21 2020-06-26 腾讯科技(深圳)有限公司 一种超分辨率重建方法、装置、设备和存储介质
CN111429355A (zh) * 2020-03-30 2020-07-17 新疆大学 一种基于生成对抗网络的图像超分辨率重建方法
CN111739635A (zh) * 2020-06-10 2020-10-02 四川大学华西医院 一种用于急性缺血性卒中的诊断辅助模型及图像处理方法
WO2020234449A1 (en) * 2019-05-23 2020-11-26 Deepmind Technologies Limited Generative adversarial networks with temporal and spatial discriminators for efficient video generation
US20210209459A1 (en) * 2017-05-08 2021-07-08 Boe Technology Group Co., Ltd. Processing method and system for convolutional neural network, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210209459A1 (en) * 2017-05-08 2021-07-08 Boe Technology Group Co., Ltd. Processing method and system for convolutional neural network, and storage medium
CN109118430A (zh) * 2018-08-24 2019-01-01 深圳市商汤科技有限公司 超分辨率图像重建方法及装置、电子设备及存储介质
WO2020234449A1 (en) * 2019-05-23 2020-11-26 Deepmind Technologies Limited Generative adversarial networks with temporal and spatial discriminators for efficient video generation
CN111429355A (zh) * 2020-03-30 2020-07-17 新疆大学 一种基于生成对抗网络的图像超分辨率重建方法
CN111340711A (zh) * 2020-05-21 2020-06-26 腾讯科技(深圳)有限公司 一种超分辨率重建方法、装置、设备和存储介质
CN111739635A (zh) * 2020-06-10 2020-10-02 四川大学华西医院 一种用于急性缺血性卒中的诊断辅助模型及图像处理方法

Also Published As

Publication number Publication date
CN116368511A (zh) 2023-06-30
US20240135488A1 (en) 2024-04-25

Similar Documents

Publication Publication Date Title
WO2022267641A1 (zh) 一种基于循环生成对抗网络的图像去雾方法及系统
Fadnavis Image interpolation techniques in digital image processing: an overview
US10325346B2 (en) Image processing system for downscaling images using perceptual downscaling method
US11900567B2 (en) Image processing method and apparatus, computer device, and storage medium
US8565554B2 (en) Resizing of digital images
JP5555706B2 (ja) 高解像度映像獲得装置およびその方法
CN113034358B (zh) 一种超分辨率图像处理方法以及相关装置
CN110533594B (zh) 模型训练方法、图像重建方法、存储介质及相关设备
CN112801904B (zh) 一种基于卷积神经网络的混合退化图像增强方法
CN110958469A (zh) 视频处理方法、装置、电子设备及存储介质
Guan et al. Srdgan: learning the noise prior for super resolution with dual generative adversarial networks
CN112927137A (zh) 一种用于获取盲超分辨率图像的方法、设备及存储介质
CN114830168A (zh) 图像重建方法、电子设备和计算机可读存储介质
US20240202886A1 (en) Video processing method and apparatus, device, storage medium, and program product
CN113674154B (zh) 一种基于生成对抗网络的单幅图像超分辨率重建方法及系统
Wolter et al. Wavelet-packet powered deepfake image detection
CN117745541A (zh) 一种基于轻量级混合注意力网络的图像超分辨率重建方法
WO2023070448A1 (zh) 视频处理方法、装置、电子设备和可读存储介质
KR20220056399A (ko) 확장 합성곱 신경망을 이용한 군중 장면 이미지 실시간 분석 장치 및 방법
US20230110393A1 (en) System and method for image transformation
CN115471736A (zh) 基于注意力机制和知识蒸馏的伪造图像检测方法和装置
CN115049558A (zh) 模型训练、人脸图像处理方法及装置、电子设备及可读存储介质
KR20220158540A (ko) 영상 처리 장치 및 그 동작방법
CN103077396B (zh) 一种彩色图像的向量空间特征点提取方法及装置
CN106204445A (zh) 基于结构张量全变差的图像视频超分辨率方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 17927148

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21961814

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE