WO2022007895A1 - 图像帧的超分辨率实现方法和装置 - Google Patents

图像帧的超分辨率实现方法和装置 Download PDF

Info

Publication number
WO2022007895A1
WO2022007895A1 PCT/CN2021/105235 CN2021105235W WO2022007895A1 WO 2022007895 A1 WO2022007895 A1 WO 2022007895A1 CN 2021105235 W CN2021105235 W CN 2021105235W WO 2022007895 A1 WO2022007895 A1 WO 2022007895A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
frame
image frame
image frames
resolution
Prior art date
Application number
PCT/CN2021/105235
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022007895A1 publication Critical patent/WO2022007895A1/zh
Priority to US18/151,588 priority Critical patent/US20230162323A1/en

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/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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • 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]
    • 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/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/772Determining representative reference patterns, e.g. averaging or distorting patterns; Generating dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/98Detection or correction of errors, e.g. by rescanning the pattern or by human intervention; Evaluation of the quality of the acquired patterns
    • G06V10/993Evaluation of the quality of the acquired pattern

Definitions

  • the present application provides a method and apparatus for implementing super-resolution of image frames, so as to save processing resources of a terminal, improve the processing efficiency of the terminal, and improve the effect of super-resolution processing of image frames.
  • the present application provides a method for implementing super-resolution of an image frame, including: acquiring super-score reference information, where the super-score reference information includes a quantization parameter and an image quality score set, where the image quality score set includes a plurality of The respective image quality scores of the image frames; M image frames are selected from the multiple image frames according to the set of image quality scores, where M is greater than or equal to 1; the video super-resolution network corresponding to the quantization parameter is obtained, and the The video super-resolution network has a super-resolution function; the M image frames and the first image frame are input into the video super-resolution network, and the video super-resolution network is used for pairing according to the M image frames.
  • the first image frame is subjected to super-resolution processing to obtain a second image frame, and the resolution of the second image frame is higher than that of the first image frame.
  • Mode selection is the choice of segmentation and prediction mode for image blocks. Segmentation can divide (or divide) an image frame into smaller parts, such as square or rectangular shaped image blocks; prediction mode can provide the best match or the smallest residual ( Minimal residual refers to better compression in transmission or storage), or provides minimal signaling overhead (minimal signaling overhead refers to better compression in transmission or storage), or considers or balances both.
  • the prediction modes may include, for example, intra prediction modes and/or inter prediction modes.
  • the intra-frame prediction mode is used to generate an intra-frame prediction block by using reconstructed pixel points of adjacent blocks in the same current image frame, and output intra-frame prediction parameters.
  • the inter prediction mode is used to select reconstructed pixels of the reference block from a plurality of reference blocks in a plurality of other image frames to generate an inter prediction block, and output inter prediction parameters.
  • the transmitting end obtains the reference frame indication information of the image frame from the mode selection, where the reference frame indication information is used to indicate the above-mentioned adjacent blocks or reference blocks in the frame.
  • Quantization is to quantize transform residual coefficients by, for example, scalar quantization or vector quantization, to obtain quantized residual coefficients.
  • the quantization process may reduce the bit depth associated with some or all of the transform residual coefficients.
  • n-bit transform residual coefficients may be rounded down to m-bit transform residual coefficients at quantization, where n is greater than m.
  • the degree of quantization can be modified by adjusting the quantization parameter (QP).
  • QP quantization parameter
  • a suitable quantization step size can be indicated by QP, a smaller quantization parameter may correspond to fine quantization (smaller quantization step size), a larger quantization parameter may correspond to coarse quantization (larger quantization step size), and vice versa.
  • Quantization is a lossy operation, where the larger the quantization step size, the larger the loss.
  • a video encoder can be used to output a QP so that a video decoder can receive and decode using the QP.
  • the sender obtains the quantization parameters of the image frame from the quantization.
  • Reconstruction is to inverse quantize and inverse transform the quantized residual coefficients (residual blocks obtained after transformation and quantization) to obtain a reconstructed residual block, and then add the reconstructed residual block to the prediction block to obtain the reconstructed block in the pixel domain.
  • the image frame obtained by the sender in the reconstruction process is the reconstructed frame, and then the image quality score of the image frame can be obtained according to the difference between the reconstructed frame and the original image frame.
  • the transmitting end may acquire the first image frame according to peak signal to noise ratio (peak signal to noise ratio, PSNR), structural similarity (SSIM), or video evaluation criterion of multi-feature fusion (video multimethod assessment fusion, VMAF). image quality score.
  • PSNR can be calculated using the following formula:
  • x(i,j) represents the pixel value of the ith row and jth column in the first image frame
  • x′(i,j) represents the pixel value of the ith row and jth column in the reconstructed frame of the first image frame value
  • the resolution of the first image is M ⁇ N.
  • the present application may use the calculated PSNR as the image quality score of the first image frame.
  • the calculation formula of SSIM is based on three comparison measures between the first image frame x and the reconstructed frame y of the first image frame: luminance (l(x,y), contrast (contrast) c(x,y) and structure (structure)s(x,y):
  • c 3 c 2 /2
  • ⁇ x represents the mean error of x
  • ⁇ y represents the mean error of y
  • ⁇ xy represents the covariance of x and y
  • c 1 (k 1 L) 2
  • c 2 (k 2 L) 2
  • L represents the range of pixel values
  • an N ⁇ N window can be selected from the image frame, and then the sliding window is calculated, and the average value is finally taken as the SSIM of the entire image frame.
  • the present application may use the calculated SSIM as the image quality score of the first image frame.
  • the super-resolution reference information is acquired by the sender and transmitted to the terminal.
  • the terminal can acquire M image frames based on the super-resolution reference information, and input the M image frames together with the first image frame to be processed into the video super-resolution rate network to achieve super-resolution processing of the first image frame.
  • the transmitting end may include the above-mentioned quantization parameter, image quality score and reference frame indication information in the super-score reference information, all of which are used when the terminal selects the above-mentioned M image frames.
  • M is the number of reference image frames that the video super-resolution network needs to use when performing super-resolution processing, which is related to the training data used by the sender to train the video super-resolution network, which is not specifically limited in this application.
  • M image frames are selected from a plurality of image frames whose image quality scores are known, and the image quality scores of the M image frames are all higher than the image quality score of the first image frame, which meets the requirements of super-resolution processing, that is, with the help of High-scoring image frames over-score the image frames to be over-scored.
  • the reference frame of the first image frame is an optional object, and the reference frame is a reference frame (intra-frame reference frame or inter-frame reference frame) selected when the transmitting end performs mode selection on the first image frame. Since the reference frame can be used to predict the first image frame during encoding, the reference frame can also be used as a reference image frame when performing super-resolution processing on the first image frame.
  • the super-score reference information further includes reference frame indication information of the first image frame; the selecting M images from the multiple image frames according to the image quality score set frame, further comprising: when the plurality of image frames do not include the first image frame set, judging whether the first image frame is an I frame, and the image quality scores of the image frames included in the first image frame set are all higher than the image quality score of the first image frame; if the first image frame is an I frame, the M image frames include M duplicate samples of the first image frame; if the first image frame If the frame is not an I frame, the image frame corresponding to the reference frame indication information is selected from the plurality of image frames; when the number of the image frames corresponding to the reference frame indication information is less than M, the image frame corresponding to the reference frame indication information is selected from the Selecting at least one image frame with the interval time from short to long from the first image frame from other image frames in the plurality of image frames except the image frame corresponding to the reference frame indication information, until M is selected. image frames.
  • the reference frame of the first image frame may be selected. If there are not enough M image frames at this time, you can also select from multiple image frames in order of the interval time from the first image frame from short to long, that is, start from the first image frame and start forward and backward. Image frames are selected frame by frame. For example, the serial number of the first image frame is n. If four image frames need to be selected, the four image frames may be n-2, n-1, n+1, and n+2.
  • the transmitting end After the transmitting end encodes the video stream, it obtains the code stream of the video stream.
  • the data of the image frames in the video stream and the super-score reference information such as quantization parameters, image quality scores and The reference frame indication information, etc., are encoded together to obtain a code stream containing the data of the image frame and the super-divided reference information, and the code stream is transmitted to the terminal; in another case, the sending end comprehends the data of the image frame in the video stream.
  • the video super-resolution network includes a convolutional neural network CNN, a deep neural network DNN or a recurrent neural network RNN.
  • a training data set is collected, and the training data set includes high-resolution images and low-resolution images of multiple image frames (which may include multiple low-resolution images), and multiple image frames. quantization parameter.
  • the high-resolution images of the multiple image frames all use the same downsampling method and compression method to obtain corresponding low-resolution images.
  • the training engine can learn how to process from high-resolution images to low-resolution images based on the correspondence between high-resolution images and low-resolution images based on the high-resolution images and low-resolution images of multiple image frames. rules, and the corresponding relationship between the rules and the quantization parameters, thereby forming multiple video super-resolution networks corresponding to different quantization parameters.
  • the obtaining module is further configured to obtain reference frame indication information of the first image frame; correspondingly, the super-score reference information further includes the reference frame indication information.
  • FIG. 7 is a schematic structural diagram of an embodiment of a terminal device of the present application.
  • FIG. 1 shows an exemplary schematic diagram of an architecture to which the super-resolution implementation method of an image frame of the present application is applicable.
  • the application framework includes: a sending end and a terminal, wherein the sending end may be, for example, a cloud, It can also be other devices or servers with image coding functions.
  • the sending end and the terminal can be connected through a wireless communication network, wherein the sending end includes a downsampling module and an encoding module, and the downsampling module is used for downsampling each image frame in the input source video stream respectively, and nearest neighbor interpolation can be used.
  • the training data in this application includes: a training data set, where the training data set includes high-resolution images and low-resolution images of multiple image frames (which may include multiple low-resolution images), and quantization parameters of multiple image frames.
  • the high-resolution images of the multiple image frames all use the same downsampling method and compression method to obtain corresponding low-resolution images.
  • the training engine can learn how to process from high-resolution images to low-resolution images based on the correspondence between high-resolution images and low-resolution images based on the high-resolution images and low-resolution images of multiple image frames. rules, and the corresponding relationship between the rules and the quantization parameters, thereby forming multiple video super-resolution networks corresponding to different quantization parameters.
  • the above-mentioned terminal can be, for example, a mobile phone (mobile phone), a tablet computer (pad), etc., or a computer with a wireless transceiver function, a virtual reality (virtual reality, VR) device, an augmented reality (augmented reality, AR) device, etc.
  • a virtual reality virtual reality, VR
  • augmented reality augmented reality, AR
  • W s is the weight of x s
  • b is the bias of the neural unit.
  • f is an activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer.
  • the activation function can be a sigmoid function.
  • a neural network is a network formed by connecting many of the above single neural units together, that is, the output of one neural unit can be the input of another neural unit.
  • the input of each neural unit can be connected with the local receptive field of the previous layer to extract the features of the local receptive field, and the local receptive field can be an area composed of several neural units.
  • a deep neural network also known as a multi-layer neural network, can be understood as a neural network with many hidden layers. There is no special metric for "many" here. From the division of DNN according to the position of different layers, the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the middle layers are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer.
  • DNN looks complicated, in terms of the work of each layer, it is not complicated. In short, it is the following linear relationship expression:
  • CNN Convolutional neural network
  • a convolutional neural network consists of a feature extractor consisting of convolutional and pooling layers. The feature extractor can be viewed as a filter, and the convolution process can be viewed as convolution with an input image or a convolutional feature map using a trainable filter.
  • Recurrent neural networks are used to process sequence data.
  • the layers are fully connected, and each node in each layer is unconnected.
  • this ordinary neural network solves many problems, it is still powerless for many problems. For example, if you want to predict the next word of a sentence, you generally need to use the previous words, because the front and rear words in a sentence are not independent. The reason why RNN is called a recurrent neural network is that the current output of a sequence is also related to the previous output.
  • RNN can process sequence data of any length.
  • the training of RNN is the same as the training of traditional CNN or DNN.
  • the error back-propagation algorithm is also used, but there is one difference: that is, if the RNN is expanded, the parameters, such as W, are shared; while the traditional neural network mentioned above is not the case.
  • the output of each step depends not only on the network of the current step, but also on the state of the network in the previous steps. This learning algorithm is called back propagation through time (BPTT).
  • BPTT back propagation through time
  • GANs Generative adversarial networks
  • the model includes at least two modules: one is the Generative Model, and the other is the Discriminative Model, through which the two modules learn from each other to produce better outputs.
  • Both the generative model and the discriminative model can be neural networks, specifically, deep neural networks or convolutional neural networks.
  • the basic principle of GAN is as follows: Take the GAN that generates pictures as an example, suppose there are two networks, G (Generator) and D (Discriminator), where G is a network that generates pictures, it receives a random noise z, through this noise Generate a picture, denoted as G(z); D is a discriminant network used to determine whether a picture is "real".
  • the video super-resolution network (also referred to as a neural network) will be described in detail below in conjunction with Figures 2a-2e.
  • the above block processing layer can include a 3 ⁇ 3 convolutional layer, an activation layer and a 3 ⁇ 3 convolutional layer. After the input is processed by these three layers, the result obtained after processing and the initial Add the inputs to get the output.
  • the above-mentioned block processing layer can include a 3 ⁇ 3 convolutional layer, an activation layer, a 3 ⁇ 3 convolutional layer and an activation layer, and the input is processed by the 3 ⁇ 3 convolutional layer, the activation layer and the 3 After the ⁇ 3 convolution layer is processed, the result obtained after processing is added to the initial input, and finally the output is obtained through an activation layer.
  • the input goes through a 3 ⁇ 3 convolutional layer, an activation layer, a block processing layer, ..., a block processing layer, a 3 ⁇ 3 convolutional layer, an activation layer, and a 3 ⁇ 3 convolutional layer
  • the layer processes the output.
  • FIG. 3 shows a schematic structural diagram of the terminal 300 .
  • the sensor module 380 may include a pressure sensor 380A, a gyroscope sensor 380B, an air pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, and ambient light.
  • the processor 310 may include one or more processing units, for example, the processor 310 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 310 for storing instructions and data.
  • the memory in processor 310 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 310 . If the processor 310 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 310 is reduced, thereby increasing the efficiency of the system.
  • processor 310 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • processor 310 may contain multiple sets of I2C buses.
  • the processor 310 can be respectively coupled to the touch sensor 380K, the charger, the flash, the camera 393 and the like through different I2C bus interfaces.
  • the processor 310 may couple the touch sensor 380K through the I2C interface, so that the processor 310 and the touch sensor 380K communicate with each other through the I2C bus interface, so as to realize the touch function of the terminal 300 .
  • the I2S interface can be used for audio communication.
  • processor 310 may contain multiple sets of I2S buses.
  • the processor 310 may be coupled with the audio module 370 through an I2S bus to implement communication between the processor 310 and the audio module 370 .
  • the audio module 370 can transmit audio signals to the wireless communication module 360 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 370 and the wireless communication module 360 may be coupled through a PCM bus interface.
  • the audio module 370 can also transmit audio signals to the wireless communication module 360 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 310 with the wireless communication module 360 .
  • the processor 310 communicates with the Bluetooth module in the wireless communication module 360 through the UART interface to implement the Bluetooth function.
  • the audio module 370 can transmit audio signals to the wireless communication module 360 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 310 with peripheral devices such as the display screen 394 and the camera 393 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 310 communicates with the camera 393 through a CSI interface to implement the shooting function of the terminal 300 .
  • the processor 310 communicates with the display screen 394 through the DSI interface to implement the display function of the terminal 300 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 310 with the camera 393, the display screen 394, the wireless communication module 360, the audio module 370, the sensor module 380, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the terminal 300 .
  • the terminal 300 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 340 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 340 may receive charging input from the wired charger through the USB interface 330 .
  • the charging management module 340 may receive wireless charging input through the wireless charging coil of the terminal 300. While the charging management module 340 charges the battery 432 , it can also supply power to the terminal through the power management module 341 .
  • the power management module 341 is used to connect the battery 432 , the charging management module 340 and the processor 310 .
  • the power management module 341 receives input from the battery 432 and/or the charging management module 340, and supplies power to the processor 310, the internal memory 321, the display screen 394, the camera 393, and the wireless communication module 360.
  • the power management module 341 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 341 may also be provided in the processor 310 .
  • the power management module 341 and the charging management module 340 may also be provided in the same device.
  • the wireless communication function of the terminal 300 may be implemented by the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in terminal 300 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 370A, the receiver 370B, etc.), or displays images or videos through the display screen 394 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 310, and may be provided in the same device as the mobile communication module 350 or other functional modules.
  • the wireless communication module 360 can provide applications on the terminal 300 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 360 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 360 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310 .
  • the wireless communication module 360 can also receive the signal to be sent from the processor 310 , perform frequency modulation on it, amplify it, and convert it into electromagnetic
  • the antenna 1 of the terminal 300 is coupled with the mobile communication module 350, and the antenna 2 is coupled with the wireless communication module 360, so that the terminal 300 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal 300 implements a display function through a GPU, a display screen 394, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 394 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 310 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 394 is used to display images, videos, and the like.
  • Display screen 394 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the terminal 300 may include 1 or N display screens 394 , where N is a positive integer greater than 1.
  • the terminal 300 may implement a shooting function through an ISP, a camera 393, a video codec, a GPU, a display screen 394, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 393 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 393 .
  • Camera 393 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the terminal 300 may include 1 or N cameras 393 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals.
  • the terminal 300 selects a frequency point
  • the digital signal processor is used to perform Fourier transform on the energy of the frequency point, and the like.
  • the terminal may acquire M image frames based on the super-resolution reference information, and input the M image frames and the first image frame to be processed into the video super-resolution network, so as to realize the super-resolution processing of the first image frame .
  • the terminal After acquiring a quantization parameter in the super-resolution reference information, the terminal can acquire the corresponding video super-resolution network according to the quantization parameter.
  • Super-resolution is the process of obtaining a high-resolution image frame from multiple low-resolution image frames.
  • the terminal selects the video super-resolution network to be used, and selects the reference image frame participating in the super-resolution processing, so as to realize the conversion of the first image frame (that is, the image frame to be super-resolution).
  • Super-resolution processing to increase the resolution of the first image frame.
  • the terminal selects the corresponding video super-resolution network according to the quantization parameter of the first image frame, which can better improve the resolution;
  • the third aspect uses the resources of the sender to score the image frames in the video stream, which can save the processing resources of the terminal and reduce the number of terminals. It can improve the efficiency of its super-resolution processing.
  • Video codecs are used to compress or decompress digital video.
  • Terminal 300 may support one or more video codecs.
  • the terminal 300 can play or record videos in multiple encoding formats, such as: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the terminal 300 can be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal 300.
  • the external memory card communicates with the processor 310 through the external memory interface 320 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 321 may be used to store computer executable program code, which includes instructions.
  • the internal memory 321 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal 300 and the like.
  • the internal memory 321 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 310 executes various functional applications and data processing of the terminal 300 by executing instructions stored in the internal memory 321 and/or instructions stored in a memory provided in the processor.
  • the terminal 300 may implement audio functions through an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, and an application processor. Such as music playback, recording, etc.
  • the audio module 370 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 370 may also be used to encode and decode audio signals. In some embodiments, the audio module 370 may be provided in the processor 310 , or some functional modules of the audio module 370 may be provided in the processor 310 .
  • Speaker 370A also referred to as "horn" is used to convert audio electrical signals into sound signals.
  • the terminal 300 can listen to music through the speaker 370A, or listen to a hands-free call.
  • the receiver 370B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 370B close to the human ear.
  • the microphone 370C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 370C through a human mouth, and input the sound signal into the microphone 370C.
  • the terminal 300 may be provided with at least one microphone 370C. In other embodiments, the terminal 300 may be provided with two microphones 370C, which may implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the terminal 300 can also be provided with three, four or more microphones 370C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the headphone jack 370D is used to connect wired headphones.
  • the earphone interface 370D can be a USB interface 330, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 380A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 380A may be provided on the display screen 394 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to pressure sensor 380A, the capacitance between the electrodes changes. The terminal 300 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 394, the terminal 300 detects the intensity of the touch operation according to the pressure sensor 380A.
  • the terminal 300 may also calculate the touched position according to the detection signal of the pressure sensor 380A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 380B may be used to determine the motion attitude of the terminal 300 .
  • the angular velocity of terminal 300 about three axes ie, x, y, and z axes
  • the gyro sensor 380B can be used for image stabilization.
  • the gyroscope sensor 380B detects the angle at which the terminal 300 shakes, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to counteract the shake of the terminal 300 through reverse motion to achieve anti-shake.
  • the gyro sensor 380B can also be used for navigation and somatosensory game scenarios.
  • Air pressure sensor 380C is used to measure air pressure. In some embodiments, the terminal 300 calculates the altitude through the air pressure value measured by the air pressure sensor 380C to assist in positioning and navigation.
  • Magnetic sensor 380D includes a Hall sensor.
  • the terminal 300 can detect the opening and closing of the flip holster using the magnetic sensor 380D.
  • the terminal 300 can detect the opening and closing of the flip according to the magnetic sensor 380D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 380E can detect the magnitude of the acceleration of the terminal 300 in various directions (generally three axes). When the terminal 300 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the terminal posture, and can be used in horizontal and vertical screen switching, pedometer and other applications.
  • the terminal 300 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the terminal 300 can use the distance sensor 380F to measure the distance to achieve fast focusing.
  • Proximity light sensor 380G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the terminal 300 emits infrared light to the outside through light emitting diodes.
  • Terminal 300 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the terminal 300 . When insufficient reflected light is detected, the terminal 300 may determine that there is no object near the terminal 300 .
  • the terminal 300 can use the proximity light sensor 380G to detect that the user holds the terminal 300 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 380G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 380L is used to sense ambient light brightness.
  • the terminal 300 can adaptively adjust the brightness of the display screen 394 according to the perceived brightness of the ambient light.
  • the ambient light sensor 380L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 380L can also cooperate with the proximity light sensor 380G to detect whether the terminal 300 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 380H is used to collect fingerprints.
  • the terminal 300 can use the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a picture with the fingerprint, answer the incoming call with the fingerprint, and the like.
  • the temperature sensor 380J is used to detect the temperature.
  • the terminal 300 uses the temperature detected by the temperature sensor 380J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 380J exceeds a threshold value, the terminal 300 reduces the performance of the processor located near the temperature sensor 380J, so as to reduce power consumption and implement thermal protection.
  • the terminal 300 when the temperature is lower than another threshold, the terminal 300 heats the battery 432 to avoid abnormal shutdown of the terminal 300 caused by the low temperature.
  • the terminal 300 boosts the output voltage of the battery 432 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 380K also called “touch device”.
  • the touch sensor 380K may be disposed on the display screen 394, and the touch sensor 380K and the display screen 394 form a touch screen, also called a "touch screen”.
  • the touch sensor 380K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 394 .
  • the touch sensor 380K may also be disposed on the surface of the terminal 300, which is different from the position where the display screen 394 is located.
  • the bone conduction sensor 380M can acquire vibration signals.
  • the bone conduction sensor 380M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 380M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 380M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 370 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 380M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 380M, and realize the function of heart rate detection.
  • the keys 390 include a power-on key, a volume key, and the like. Keys 390 may be mechanical keys. It can also be a touch key.
  • the terminal 300 may receive key input and generate key signal input related to user settings and function control of the terminal 300 .
  • Motor 391 can generate vibrating cues.
  • the motor 391 can be used for incoming call vibration alerts, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 391 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 394 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 392 can be an indicator light, which can be used to indicate the charging status, the change of power, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 395 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the terminal 300 by inserting into the SIM card interface 395 or pulling out from the SIM card interface 395 .
  • the terminal 300 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 395 can support Nano SIM card, Micro SIM card, SIM card and so on.
  • the same SIM card interface 395 can insert multiple cards at the same time.
  • the types of the plurality of cards may be the same or different.
  • the SIM card interface 395 can also be compatible with different types of SIM cards.
  • the SIM card interface 395 is also compatible with external memory cards.
  • the terminal 300 interacts with the network through the SIM card to realize functions such as call and data communication.
  • the terminal 300 employs an eSIM, ie an embedded SIM card.
  • the eSIM card can be embedded in the terminal 300 and cannot be separated from the terminal 300 .
  • FIG. 4 is a flowchart of an embodiment of a method for implementing super-resolution of an image frame of the present application. As shown in FIG. 4 , the method of this embodiment can be applied to the architecture shown in FIG. terminal shown.
  • the super-resolution implementation method of the image frame may include:
  • Step 401 The terminal sends a video playback request to the sender.
  • the user plays a video online on the terminal.
  • the terminal After the user selects the video to be played, for example, clicks on the thumbnail of the video or the video name, the terminal obtains the instruction triggered by the operation, and then the terminal according to This command sends a video playback request to the video sender.
  • a user uses a video application (application, APP) installed on the terminal to play a video, opens the video APP, browses the video list of the video APP, and clicks on a corresponding video to trigger the video to be played on the terminal.
  • the user's operation triggers the video APP to generate a video playback request, and the video playback request carries the identification information of the video to be played, such as a uniform resource locator (URL), a video index, and the like.
  • the terminal sends a video playing request to the sending end storing the video to be played through the communication network with the sending end.
  • Step 402 The sending end performs down-sampling processing on the first image frame, where the first image frame is any image frame in the video indicated by the video playback request.
  • the sender After receiving the video playback request from the terminal, the sender extracts the corresponding video from the video library according to the identification information carried in the video playback request. In order to reduce the bit rate of video transmission, the sender can downsample each image frame contained in the video to reduce the image data.
  • the downsampling method can include nearest neighbor interpolation, bilinear interpolation, bicubic interpolation, etc. Downsampling The scale can be one-half or one-quarter, etc. It should be noted that this application does not specifically limit the specific downsampling method or parameters used by the transmitting end.
  • Step 403 The transmitting end encodes the down-sampling processed first image frame, and simultaneously acquires the quantization parameter, image quality score, and reference frame indication information of the first image frame.
  • the encoding module at the transmitting end encodes the down-sampled first image frame to obtain a code stream of the first image frame, and the encoding process involves mode selection, quantization processing and reconstruction.
  • the sending end can determine the reference frame of the first image frame, and then obtain the reference frame indication information; during the quantization process, the sending end can obtain the quantization parameters; during the reconstruction process, the sending end can The first image frame and the reconstructed frame of the first image frame obtain the image quality score of the first image frame.
  • the sending end may perform a quality score according to the first image frame and the reconstructed frame of the first image frame, so as to obtain the image quality score of the first image frame.
  • the sender can use scoring tools such as PSNR, SSIM, and VMAF to obtain the above-mentioned image quality scores.
  • Step 404 The sending end sends a video stream and super-score reference information to the terminal, where the video stream includes a first image frame, and the super-score reference information includes quantization parameters, image quality scores, and reference frame indication information.
  • the transmitting end After the transmitting end encodes the video stream, it obtains the code stream of the video stream: in one case, when the transmitting end encodes, the data of the image frames in the video stream and the super-score reference information, such as quantization parameters, image quality scores and The reference frame indication information, etc., are encoded together to obtain a code stream containing the data of the image frame and the super-divided reference information, and the code stream is transmitted to the terminal; in another case, the sending end comprehends the data of the image frame in the video stream.
  • the transmitting end encodes, the data of the image frames in the video stream and the super-score reference information, such as quantization parameters, image quality scores and The reference frame indication information, etc.
  • Encoding is performed to obtain the code stream of the image frame, and then the super-division reference information is encoded to obtain the code stream of the super-division reference information, and the code stream of the image frame and the code stream of the super-division reference information are spliced and transmitted to the terminal.
  • This application does not specifically limit the implementation manner of the code stream.
  • Step 405 the terminal plays the video.
  • Step 406 The terminal acquires super-score reference information of the first image frame, where the super-score reference information includes quantization parameters of the first image frame, reference frame indication information, and an image quality score set corresponding to the first image frame.
  • the user may be dissatisfied with the resolution of the currently playing video, and hope to see a clearer picture.
  • the user can click the controls provided on the video APP (for the implementation process, please refer to the following examples, (Not repeated here), select a higher resolution or the highest resolution, this operation will trigger the generation of a resolution conversion instruction, which includes the resolution selected by the user, and the resolution selected by the user is higher than the current resolution. .
  • the terminal starts to perform super-resolution processing on the image frames in the video stream.
  • the video APP detects that the video stream that has been received can support higher-resolution online playback, and therefore actively triggers super-resolution processing on the image frames in the video stream.
  • the quantization parameter and reference frame indication information of the first image frame can be directly obtained from the code stream of the first image frame, and the set of image quality scores corresponding to the first image frame frame and the code stream of multiple image frames within this range.
  • the video super-resolution network In order to perform super-resolution processing on the first image frame, the video super-resolution network needs to input multiple frames of images as a reference. Therefore, the terminal can first obtain a set of image quality scores according to a preset range, and the set of image quality scores can include video streams.
  • the value of N should not be too large. If the value of N is too large, the content span of N image frames may be too large, resulting in poor super-resolution processing effect on the first image frame. It should be noted that the first image frame may be located in the middle of the N image frames, or may be located at the front end or the back end of the N image frames.
  • the specific selection method may depend on the preset selection rules, which is not covered by this application. Make specific restrictions.
  • Step 407 The terminal selects M image frames from the multiple image frames according to the image quality score set.
  • the value of M is related to the training model of the video super-resolution network.
  • the input training data includes M image frames.
  • the input training data includes M image frames. Also need to input M image frames, M ⁇ 1.
  • the four image frames of can include n-3, n-1, n+2, n+4, and the four image frames are discontinuous even if the first image frame is added.
  • the N image frames include a first image frame set (the image quality scores of the image frames included in the first image frame set are all higher than the image quality scores of the first image frame), and the image frames in the first image frame set When the number of image frames is greater than or equal to M, the M image frames with the highest image quality scores are selected from the first image frame set.
  • the N image frames include the first image frame set, but the number of image frames in the first image frame set is less than M, select all image frames from the first image frame set, and the first image frame set includes The image quality scores of the image frames are all higher than the image quality scores of the first image frame.
  • an image frame corresponding to the reference frame indication information is selected from the plurality of image frames.
  • An image frame interval time is at least one image frame from short to long, until M image frames are selected.
  • the second selection condition among other conditions may be considered until the number of selected image frames reaches M.
  • the secondary selection condition may be that among the N image frames except all the image frames in the first image frame set and the image frames corresponding to the reference frame indication information, the interval time from the first image frame is from short to long. at least one image frame.
  • the N image frames do not include the first image frame set, and it is determined whether the first image frame is an I frame. If the first image frame is an I frame, the M image frames refer to the M duplicate samples of the first image frame. ; If the first image frame is not an I frame, select an image frame corresponding to the reference frame indication information from a plurality of image frames. When the number of image frames corresponding to the reference frame indication information is less than M, select the interval time from the first image frame from short to At least one image frame is long until M image frames are selected.
  • the first image frame may have two cases. One is that the first image frame is an I frame, and the first image frame is an I frame. Scene switching may occur at the beginning of the first image frame, then the content of the previous scene is different from the scene after the switch, and the information of the image frame before the first image frame cannot be used; frame, then the quality of the first image frame is usually much higher than that of the preceding and following image frames, so that the information of the preceding and following image frames cannot be used. Therefore, the selected M image frames are the M replicated samples of the first image frame. The other is that the first image frame is not an I frame (B frame or P frame).
  • the reference frame of the first image frame is selected first, and then N image frames are selected.
  • the image frames except all the image frames in the first image frame set and the image frames corresponding to the reference frame indication information, at least one image frame with the interval time from short to long from the first image frame, until the selected image frame. The number of image frames reaches M.
  • Step 408 The terminal acquires a video super-resolution network corresponding to the quantization parameter, where the video super-resolution network has a super-resolution function.
  • Video super-resolution network is a neural network with super-resolution function obtained by training.
  • the training process of the video super-resolution network reference may be made to the relevant description of the training engine in the sender, which will not be repeated here.
  • the corresponding relationship between the video super-resolution network and the QP after the terminal obtains the QP of the first image frame from the code stream, it can obtain the corresponding video super-resolution network according to the QP, which is used for the first image frame.
  • Step 409 the terminal inputs the M image frames and the first image frame into the video super-resolution network, and the video super-resolution network is used to perform super-resolution processing on the first image frame according to the M image frames to obtain the second image frame, and the first image frame is obtained.
  • the resolution of the second image frame is higher than the resolution of the first image frame.
  • the terminal inputs the M image frames obtained in step 407 into the video super-resolution network, and obtains a second image frame after being processed by the video super-resolution network, and the resolution of the second image frame is the resolution conversion instruction in step 406. the indicated resolution.
  • the terminal of the present application selects the video super-resolution network to be used by means of the super-resolution reference information from the transmitting end, and selects the reference image frame participating in the super-resolution processing, so as to realize the analysis of the first image frame (that is, the image frame to be super-resolution) ) to increase the resolution of the first image frame.
  • the terminal selects the corresponding video super-resolution network according to the quantization parameter of the first image frame, which can better improve the resolution;
  • the third aspect uses the resources of the sender to score the image frames in the video stream, which can save the processing resources of the terminal and reduce the number of terminals. It can improve the efficiency of its super-resolution processing.
  • Figures 5a-5c show exemplary schematic diagrams of a process of playing a video online.
  • the user selects a video to be played in the video list.
  • thumbnails and titles of featured videos in the video list as well as thumbnails and titles of popular videos, titles of video categories, and more.
  • the playback interface of the video selected by the user is entered, and the video starts to be played in full screen on the screen of the terminal.
  • 6a-6c show exemplary schematic diagrams of the switching process of video resolutions.
  • the user selects a resolution among resolutions higher than the current resolution.
  • the terminal receives the resolution conversion instruction generated based on this operation, and then adopts the method in the embodiment shown in FIG. 4 to adjust the resolution of the video being played, specifically, performing super-resolution processing on the image frames in the video. .
  • the resolution of the video is switched to the resolution selected by the user, and the words "Resolution switched from 270P to 1080P" are displayed on the playback interface.
  • the current resolution such as 1080P.
  • the user can clearly see that the video played at this time is much clearer than before the resolution change.
  • Figures 5a-5c and Figures 6a-6c are all examples provided by this application, and do not constitute any limitation, including display interface, control implementation, and resolution representation (for example, standard definition, The video playback process and the video resolution switching process including high-definition, ultra-clear, etc.), resolution switching methods, etc., may also adopt other implementation methods, which are not specifically limited in this application.
  • FIG. 7 is a schematic structural diagram of an embodiment of a terminal apparatus of the present application. As shown in FIG. 7 , the apparatus may be applied to the terminal shown in FIG. 2 .
  • the terminal device in this embodiment may include: an acquisition module 701 and a processing module 702 . in,
  • Obtaining module 701 configured to obtain super-score reference information, where the super-score reference information includes a quantization parameter and a set of image quality scores, and the set of image quality scores includes respective image quality scores of multiple image frames; according to the image quality scores
  • the set selects M image frames from the plurality of image frames, where M is greater than or equal to 1; obtains a video super-resolution network corresponding to the quantization parameter, and the video super-resolution network has a super-resolution function; processing module 702, for inputting the M image frames and the first image frame into the video super-resolution network, where the video super-resolution network is configured to perform super-resolution on the first image frame according to the M image frames.
  • the resolution processing obtains a second image frame, and the resolution of the second image frame is higher than that of the first image frame.
  • the quantization parameter includes a quantization parameter used in the process of quantizing the first image frame by the transmitting end.
  • the video super-resolution network includes a convolutional neural network CNN, a deep neural network DNN or a recurrent neural network RNN.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请提供一种图像帧的超分辨率实现方法和装置。本申请图像帧的超分辨率实现方法,包括:获取超分参考信息,超分参考信息包括量化参数和图像质量分数集合,图像质量分数集合包括多个图像帧各自的图像质量分数;根据图像质量分数集合从多个图像帧中选取M个图像帧,M大于或等于1;获取与量化参数对应的视频超分辨率网络,视频超分辨率网络具有超分辨率功能;将M个图像帧和第一图像帧输入视频超分辨率网络,视频超分辨率网络用于根据M个图像帧对第一图像帧进行超分辨率处理得到第二图像帧,第二图像帧的分辨率高于第一图像帧的分辨率。本申请可以节省终端的处理资源,提高终端的处理效率,以及提升图像帧的超分辨率处理的效果。

Description

图像帧的超分辨率实现方法和装置
本申请要求于2020年7月10日提交中国专利局、申请号为202010664759.5、申请名称为“图像帧的超分辨率实现方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及视频超分辨率技术,尤其涉及一种图像帧的超分辨率实现方法和装置。
背景技术
随着视频应用软件的兴起,人们对高清分辨率视频、甚至是超高清分辨率(ultra high definition,UHD)视频的需求日益增加,在基于发送端和移动终端之间的信息传输的视频在线播放、直播等多媒体业务中,如何既能提高编码效率和降低目标码率,又能提升视频播放效果成为一种挑战。
相关技术中,选取当前帧的前后各1帧或者各2帧,将前后连续的3帧或者5帧组成一组图像集输入到深度学习网络中,最终输出当前帧的高分辨率图像。
但是,上述方法应用于实际的流媒体业务中时,帧序列可能要经过不同程度的压缩,导致相邻帧之间的质量差异大,进而影响当前帧的超分辨率效果。
发明内容
本申请提供一种图像帧的超分辨率实现方法和装置,以节省终端的处理资源,提高终端的处理效率,以及提升图像帧的超分辨率处理的效果。
第一方面,本申请提供一种图像帧的超分辨率实现方法,包括:获取超分参考信息,所述超分参考信息包括量化参数和图像质量分数集合,所述图像质量分数集合包括多个图像帧各自的图像质量分数;根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,M大于或等于1;获取与所述量化参数对应的视频超分辨率网络,所述视频超分辨率网络具有超分辨率功能;将所述M个图像帧和第一图像帧输入所述视频超分辨率网络,所述视频超分辨率网络用于根据所述M个图像帧对所述第一图像帧进行超分辨率处理得到第二图像帧,所述第二图像帧的分辨率高于所述第一图像帧的分辨率。
发送端具备视频流的编码功能,其对视频流中的各个图像帧分别进行编码处理,通常该编码过程可以包括图像分块、模式选择、残差计算、变换、量化、反量化、逆变换、重建和滤波,与本申请相关的处理包括模式选择、量化、重建。
模式选择是为图像块选择分割和预测模式,分割可以将一个图像帧分割(或划分)为较小的部分,例如正方形或矩形形状的图像块;预测模式可以提供最佳匹配或者最小残差(最小残差是指传输或存储中更好的压缩),或者提供最小信令开销(最小信令开销是指传输或存储中更好的压缩),或者同时考虑或平衡以上两者。预测模式可以包括例如帧内预测模式和/或帧间预测模式。其中,帧内预测模式用于使用同一当前图像帧内的相邻块的重建像素点来生成帧内预测块,并输出帧内预测参数。帧间预测模式用于从多个其它图像帧中的多个参考块中选择参考块的重建像素点来生成帧间预测块,并输出帧间预测参数。 发送端从模式选择中获取图像帧的参考帧指示信息,该参考帧指示信息用于指示上述帧内相邻块或参考块。
量化是通过例如标量量化或矢量量化对变换残差系数进行量化,得到量化残差系数。量化过程可减少与部分或全部变换残差系数有关的位深度。例如,可在量化将n位变换残差系数向下舍入到m位变换残差系数,其中n大于m。可通过调整量化参数(quantization parameter,QP)修改量化程度。例如,可通过QP指示合适的量化步长,较小的量化参数可对应精细量化(较小量化步长),较大的量化参数可对应粗糙量化(较大量化步长),反之亦然。量化是有损操作,其中量化步长越大,损耗越大。在一种可能的实现方式中,视频编码器可用于输出QP,使得视频解码器可以接收并使用QP进行解码。发送端从量化中获取图像帧的量化参数。
重建是将量化残差系数(残差块在经变换和量化后得到的)进行反量化和逆变换得到重建残差块,再将重建残差块添加到预测块以在像素域中得到重建块的过程。发送端在重建过程中获取到的图像帧为重建帧,进而可以根据重建帧和原始图像帧之间的差异得到图像帧的图像质量分数。例如,发送端可以根据峰值信噪比(peak signal to noise ratio,PSNR)、结构相似度(structural similarity,SSIM)或多特征融合的视频评价标准(video multimethod assessment fusion,VMAF)获取第一图像帧的图像质量分数。
PSNR可以采用以下公式计算:
Figure PCTCN2021105235-appb-000001
其中,
Figure PCTCN2021105235-appb-000002
x(i,j)表示第一图像帧中的第i行、第j列的像素值,x′(i,j)表示第一图像帧的重建帧中的第i行、第j列的像素值,第一图像的分辨率为M×N。本申请可以将计算得到的PSNR作为第一图像帧的图像质量分数。
SSIM的计算公式基于第一图像帧x和第一图像帧的重建帧y之间的三个比较衡量:亮度(luminance)l(x,y)、对比度(contrast)c(x,y)和结构(structure)s(x,y):
Figure PCTCN2021105235-appb-000003
Figure PCTCN2021105235-appb-000004
Figure PCTCN2021105235-appb-000005
其中,c 3=c 2/2,μ x表示x的均差,μ y表示y的均差,
Figure PCTCN2021105235-appb-000006
表示x的方差,
Figure PCTCN2021105235-appb-000007
表示y的方差,σ xy表示x和y的协方差,c 1=(k 1L) 2,c 2=(k 2L) 2,L表示像素值的范围,k 1=0.01,k 2=0.03。
SSIM(x,y)=[l(x,y) α·c(x,y) β·s(x,y) γ]
假设α、β、γ均为1,可以得到:
Figure PCTCN2021105235-appb-000008
每次计算可以从图像帧上选取一个N×N的窗口,然后滑窗进行计算,最后取平均值作为整个图像帧的SSIM。本申请可以将计算得到的SSIM作为第一图像帧的图像质量分 数。
VMAF是一个机器学习训练出来的模型,可以对输入的图像帧进行评分,即输入待评分的图像帧,该模型直接输出该图像帧的图像质量分数。
本申请中超分参考信息是由发送端获取并传输给终端的,终端可以基于该超分参考信息获取M个图像帧,将该M个图像帧和待处理的第一图像帧一起输入视频超分辨率网络,以实现对第一图像帧的超分辨率处理。基于此,发送端可以在超分参考信息中包括上述量化参数、图像质量分数和参考帧指示信息,这三个信息均是给终端选取上述M个图像帧时使用的。
除上述对视频流进行编码的功能外,发送端还具备神经网络的训练能力,即本申请使用的视频超分辨率网络是由发送端训练得到的,终端在执行本申请提供的图像帧的超分辨率实现方法之前,已经从发送端下载了训练好的视频超分辨率网络。发送端可以针对一个或多个量化参数训练不同的视频超分辨率网络,这样量化参数和视频超分辨率网络具有对应关系,该对应关系可以是一对一(一个量化参数对应一个视频超分辨率网络),或者多对一(多个量化参数对应一个视频超分辨率网络)。终端在超分参考信息中获取到一个量化参数后,可以根据该量化参数获取到与之对应的视频超分辨率网络。
超分辨率是通过多个低分辨率的图像帧得到一个高分辨率的图像帧的过程,可以提高原始图像的分辨率。分辨率指图像帧中存储的信息量,用于表征每英寸图像内包含多少个像素点,分辨率的单位为像素每英寸(pixels per inch,PPI)。分辨率越高,每英寸内包含的像素点越多,超分辨率处理即为将每英寸内包含的像素点的数量增加,使得图像帧的细节变得丰富,提高其清晰度。本申请可以采用经训练的神经网络实现超分辨率功能。
可选的,本申请也可以采用图像处理算法实现超分辨率功能,还可以利用其他方法实现超分辨率功能,对此不做具体限定。
本申请终端借助来自于发送端的超分参考信息,选取要使用的视频超分辨率网络,以及选取参与超分辨率处理的参考图像帧,以实现对第一图像帧(即待超分的图像帧)的超分辨率处理,提高第一图像帧的分辨率。一方面,终端根据第一图像帧的量化参数选择对应的视频超分辨率网络,可以更好的进行分辨率的提升,另一方面,利用发送端给各图像帧评的分数选取参考图像帧,以达到多帧融合超分后质量最大化的目的,提升图像帧的超分辨率处理的效果,第三方面利用发送端的资源对视频流中的图像帧评分,可以节省终端的处理资源,减少终端的运算量,提高其超分辨率处理的效率。
在一种可能的实现方式中,所述根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,具体包括:当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数大于或等于M时,从所述第一图像帧集合中选取所述M个图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数。
M是视频超分辨率网络进行超分辨率处理时需要用到的参考图像帧的数量,其与发送端训练视频超分辨率网络时使用的训练数据相关,本申请对此不做具体限定。从多个获悉其图像质量分数的图像帧中选取M个图像帧,且M个图像帧的图像质量分数均高于第一图像帧的图像质量分数,这符合超分辨率处理的需求,即借助高分数的图像帧超分待超分的图像帧。
在一种可能的实现方式中,所述M个图像帧包括所述第一图像帧集合中的图像帧按照图像质量分数从大到小排列后的前M个图像帧。
除了上述条件外,选取的M个图像帧的分数越高,越有利于提升超分辨率的效果,因此进一步的,可以从分数高于第一图像帧的多个图像帧中选取最高分的M个图像帧。
在一种可能的实现方式中,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,还包括:当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数小于M时,从所述第一图像帧集合中选取全部图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;当所述全部图像帧的个数小于M时,从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;当所述全部图像帧和所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述全部图像帧和所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
如果图像质量分数高于第一图像帧的所有图像帧的数量不到M个,但视频超分辨率网络需要必须输入M个图像帧才能完成对第一图像帧的超分辨率处理,此时除了选取图像质量分数高于第一图像帧的所有图像帧外,还可以采用其他途径获取图像帧,以补足M个图像帧。第一图像帧的参考帧是一个可选的对象,该参考帧是发送端对第一图像帧进行模式选择时选取的参考帧(帧内参考帧或帧间参考帧)。既然编码时该参考帧可以用于对第一图像帧进行预测,那么对第一图像帧进行超分辨率处理时,也可以将该参考帧作为一个参考图像帧。如果图像质量分数高于第一图像帧的所有图像帧和第一图像帧的参考帧还不能达到M个图像帧,那么可以按照与第一图像帧间隔时间从短到长的顺序,从多个图像帧中选取,即以第一图像帧为起点,向前和向后开始逐帧选取图像帧,例如,第一图像帧的序号为n,假设还需要选取4个图像帧,那么该四个图像帧可以是n-2、n-1、n+1、n+2。如果这四个图像帧中包含已经被选取的图像帧,那么就继续选取下一个图像帧,例如,n+1和n-1已经被选取,那么可以再选取n-3和n+3;或者,n-1和n-2已经被选取,那么可以再选取n-3和n+3。
需要说明的是,存在一种可能,选取上述图像质量分数高于第一图像帧的所有图像帧时,已经包括了第一图像帧的参考帧,那么此时可以直接按照与第一图像帧间隔时间从短到长的顺序,从多个图像帧中选取图像帧。
在一种可能的实现方式中,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,还包括:当所述多个图像帧不包括第一图像帧集合时,判断所述第一图像帧是否为I帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;若所述第一图像帧为I帧,则所述M个图像帧包括所述第一图像帧的M个复制样本;若所述第一图像帧非I帧,则从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;当所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
视频编码时,根据预测类型,图像帧可以分为I帧、P帧和B帧。其中,I帧是作为 独立静态图像编码的图像帧,在视频流中提供随机存取点;P帧是由与其相邻的前一个I帧或者P帧作为参考帧预测得到的图像帧,其能作为后续的P帧或B帧的参考帧;B帧是采用最邻近的前后两帧(可以是I帧或P帧)作为参考帧,进行双向预测得到的图像帧。
如果第一图像帧为I帧,那么可能出现两种情况:一种是发生了场景切换,第一图像帧是另一个场景的开始,那么前一个场景的内容和当前场景并不一样,前一场景下的图像帧的信息利用不上;另一种是第一图像帧是固定间隔插入的I帧,那么第一图像帧的量化参数通常比周围的图像帧要低一些,其图像质量相对周围的图像帧可能会高很多,因此周围的图像帧的信息也利用不上。基于这两种情况,如果第一图像帧为I帧,很可能无法从周围的图像帧中找到可以用于超分辨率处理的参考图像帧,本申请为了符合视频超分辨率网络的输入需求,可以把第一图像帧进行多次复制,得到M个复制样本,每个复制样本的信息和数据与第一图像帧的信息和数据保持一致,然后将该M个复制样本输入视频超分辨率网络,相当于是输入了M个图像帧的信息和数据,且该M个图像帧的信息和数据相同。
若第一图像帧不是I帧,而其周围的图像帧中没有图像质量分数比它高的,因此可以采用其他途径获取图像帧,以补足M个图像帧。如上所述,可以选取第一图像帧的参考帧。如果此时还不够M个图像帧,还可以按照与第一图像帧间隔时间从短到长的顺序,从多个图像帧中选取,即以第一图像帧为起点,向前和向后开始逐帧选取图像帧,例如,第一图像帧的序号为n,假设还需要选取4个图像帧,那么该四个图像帧可以是n-2、n-1、n+1、n+2。如果这四个图像帧中包含已经被选取的图像帧,那么就继续选取下一个图像帧,例如,n+1和n-1已经被选取,那么可以再选取n-3和n+3;或者,n-1和n-2已经被选取,那么可以再选取n-3和n+3。
在一种可能的实现方式中,所述获取超分参考信息,具体包括:接收发送端发送的所述超分参考信息。
发送端对视频流编码后,得到该视频流的码流,一种情况是发送端在编码时,同时将视频流中的图像帧的数据和超分参考信息,例如量化参数、图像质量分数及参考帧指示信息等,一起进行编码得到包含图像帧的数据和超分参考信息的码流,并将该码流传输给终端;另一种情况是,发送端对视频流中的图像帧的数据进行编码,得到图像帧的码流,再对超分参考信息进行编码得到超分参考信息的码流,将图像帧的码流和超分参考信息的码流拼接后传输给终端。本申请对码流的实现方式不做具体限定。
在一种可能的实现方式中,所述多个图像帧包括所述视频流中的连续多个图像帧,所述多个图像帧包括所述第一图像帧。
备选的多个图像帧包括第一图像帧意味着该多个图像帧是视频流中排在第一图像帧之前和/或之后的,与第一图像帧的时间间隔越短,意味着图像帧之间的关联性越大,如果是慢动作、甚至是静止图像,可能出现前后两个图像帧几乎完全一样的情况。因此在选取M个图像帧时首先可以限定多个图像帧的范围,例如,第一图像帧位于多个图像帧的中间位置(正中央或中间某一设定范围内),然后无论采用哪种方法选取M个图像帧,总不会超出该范围去。也避免选取的图像帧可能图像质量分数很高,但从时间上与第一图像帧的间隔较远,失去了参考价值,导致超分辨率的效果不佳的情况。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积神经网络CNN、深度神 经网络DNN或者循环神经网络RNN。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积层和激活层。
在一种可能的实现方式中,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
第二方面,本申请提供一种图像帧的超分辨率实现方法,包括:获取第一图像帧的量化参数;根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数;向终端发送视频流和超分参考信息,所述视频流包括所述第一图像帧,所述超分参考信息包括所述量化参数和所述图像质量分数。
关于量化参数和图像质量分数的获取可以参见上述第一方面,此处不再赘述。
本申请发送端在对视频流编码的过程中,获取视频流中的第一图像帧的量化参数和图像质量分数,将其加入超分参考信息发送给终端,以实现对第一图像帧(即待超分的图像帧)的超分辨率处理,提高第一图像帧的分辨率。一方面,视频超分辨率网与量化参数相对应,可以更好的进行分辨率的提升,另一方面,发送端给各图像帧评分,并以此作为选取参考图像帧的依据,以达到多帧融合超分后质量最大化的目的,提升图像帧的超分辨率处理的效果,第三方面,利用发送端的资源对视频流中的图像帧评分,可以节省终端的处理资源,减少终端的运算量,提高其超分辨率处理的效率。
在一种可能的实现方式中,所述向终端发送视频流和超分参考信息之前,还包括:获取所述第一图像帧的参考帧指示信息;相应的,所述超分参考信息还包括所述参考帧指示信息。
在一种可能的实现方式中,所述根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数,具体包括:根据峰值信噪比PSNR、结构相似度SSIM或多特征融合的视频评价标准VMAF获取所述第一图像帧的图像质量分数。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积神经网络CNN、深度神经网络DNN或者循环神经网络RNN。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积层和激活层。
在一种可能的实现方式中,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
在一种可能的实现方式中,所述方法还包括:获取训练数据集合,其中所述训练数据集合包括多个图像帧各自的第一分辨率图像和第二分辨率图像,以及多个量化参数,所述第一分辨率图像的分辨率高于所述第二分辨率图像的分辨率;根据所述训练数据集合训练得到多个视频超分辨率网络,所述多个视频超分辨率网络与所述多个量化参数对应。
发送端训练视频超分辨率网络时,收集训练数据集合,该训练数据集合包括多个图像帧的高分辨率图像和低分辨率图像(可以包括多个低分辨率图像),以及多个图像帧的量化参数。该多个图像帧的高分辨率图像,均采用相同的下采样方法和压缩方法得到对应的低分辨率图像。训练引擎根据多个图像帧的高分辨率图像和低分辨率图像,基于高分辨率图像和低分辨率图像之间的对应关系,可以学习到如何从高分辨率图像处理成低分辨率图像的规则,并且该规则与量化参数之间的对应关系,进而形成与不同的量化参数分别对应的多个视频超分辨率网络。
第三方面,本申请提供一种图像帧的超分辨率实现方法,包括:发送端获取第一图像 帧的量化参数,并根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数;所述发送端向终端发送视频流和超分参考信息,所述视频流包括所述第一图像帧,所述超分参考信息包括所述量化参数和所述图像质量分数;所述终端根据所述视频流获取所述第一图像帧,并根据所述超分参考信息获取所述量化参数和图像质量分数集合,所述图像质量分数集合包括多个图像帧各自的图像质量分数;所述终端根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,M大于或等于1;所述终端获取与所述量化参数对应的视频超分辨率网络,所述视频超分辨率网络具有超分辨率功能;所述终端将所述M个图像帧和所述第一图像帧输入所述视频超分辨率网络,所述视频超分辨率网络用于根据所述M个图像帧对所述第一图像帧进行超分辨率处理得到第二图像帧,所述第二图像帧的分辨率高于所述第一图像帧的分辨率。
本申请终端借助来自于发送端的超分参考信息,选取要使用的视频超分辨率网络,以及选取参与超分辨率处理的参考图像帧,以实现对第一图像帧(即待超分的图像帧)的超分辨率处理,提高第一图像帧的分辨率。一方面,终端根据第一图像帧的量化参数选择对应的视频超分辨率网络,可以更好的进行分辨率的提升,另一方面,利用发送端给各图像帧评的分数选取参考图像帧,以达到多帧融合超分后质量最大化的目的,提升图像帧的超分辨率处理的效果,第三方面利用发送端的资源对视频流中的图像帧评分,可以节省终端的处理资源,减少终端的运算量,提高其超分辨率处理的效率。
第四方面,本申请提供一种终端装置,包括:获取模块,用于获取超分参考信息,所述超分参考信息包括量化参数和图像质量分数集合,所述图像质量分数集合包括多个图像帧各自的图像质量分数;根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,M大于或等于1;获取与所述量化参数对应的视频超分辨率网络,所述视频超分辨率网络具有超分辨率功能;处理模块,用于将所述M个图像帧和第一图像帧输入所述视频超分辨率网络,所述视频超分辨率网络用于根据所述M个图像帧对所述第一图像帧进行超分辨率处理得到第二图像帧,所述第二图像帧的分辨率高于所述第一图像帧的分辨率。
在一种可能的实现方式中,所述获取模块,具体用于当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数大于或等于M时,从所述第一图像帧集合中选取所述M个图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数。
在一种可能的实现方式中,所述M个图像帧包括所述第一图像帧集合中的图像帧按照图像质量分数从大到小排列后的前M个图像帧。
在一种可能的实现方式中,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述获取模块,还用于当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数小于M时,从所述第一图像帧集合中选取全部图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;当所述全部图像帧的个数小于M时,从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;当所述全部图像帧和所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述全部图像帧和所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
在一种可能的实现方式中,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述获取模块,还用于当所述多个图像帧不包括第一图像帧集合时,判断所述第一图像帧是否为I帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;若所述第一图像帧为I帧,则所述M个图像帧包括所述第一图像帧的M个复制样本;若所述第一图像帧非I帧,则从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;当所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
在一种可能的实现方式中,所述获取模块,具体用于接收发送端发送的超分参考信息。
在一种可能的实现方式中,所述量化参数包括所述发送端对所述第一图像帧进行量化处理的过程中使用的量化参数。
在一种可能的实现方式中,所述多个图像帧包括所述视频流中的连续多个图像帧,所述多个图像帧包括所述第一图像帧。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积神经网络CNN、深度神经网络DNN或者循环神经网络RNN。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积层和激活层。
在一种可能的实现方式中,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
第五方面,本申请提供一种发送端装置,包括:获取模块,用于获取第一图像帧的量化参数;根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数;发送模块,用于向终端装置发送视频流和超分参考信息,所述视频流包括所述第一图像帧,所述超分参考信息包括所述量化参数和所述图像质量分数。
在一种可能的实现方式中,所述获取模块,还用于获取所述第一图像帧的参考帧指示信息;相应的,所述超分参考信息还包括所述参考帧指示信息。
在一种可能的实现方式中,所述获取模块,具体用于根据峰值信噪比PSNR、结构相似度SSIM或多特征融合的视频评价标准VMAF获取所述第一图像帧的图像质量分数。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积神经网络CNN、深度神经网络DNN或者循环神经网络RNN。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积层和激活层。
在一种可能的实现方式中,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
在一种可能的实现方式中,还包括:训练模块;所述获取模块,还用于获取训练数据集合,其中所述训练数据集合包括多个图像帧各自的第一分辨率图像和第二分辨率图像,以及多个量化参数,所述第一分辨率图像的分辨率高于所述第二分辨率图像的分辨率;所述训练模块,用于根据所述训练数据集合训练得到多个视频超分辨率网络,所述多个视频超分辨率网络与所述多个量化参数对应。
第六方面,本申请提供一种图像处理系统,包括:发送端装置和终端装置,其中,所述发送端装置采用上述第五方面中任一项所述的装置,所述终端装置采用上述第四方面中任一项所述的装置。
第七方面,本申请提供一种终端,包括:一个或多个处理器;存储器,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述第一方面中任一项所述的方法。
第八方面,本申请提供一种发送端,包括:一个或多个处理器;存储器,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述第二方面中任一项所述的方法。
第九方面,本申请提供一种计算机可读存储介质,包括计算机程序,所述计算机程序在计算机上被执行时,使得所述计算机执行上述第一至三方面中任一项所述的方法。
附图说明
图1示出了本申请图像帧的超分辨率实现方法所适用的架构的一个示例性的示意图;
图2a-图2e示出视频超分辨率网络的示例性架构;
图3示出了终端300的结构示意图;
图4为本申请图像帧的超分辨率实现方法实施例的流程图;
图5a-图5c示出了在线播放视频过程的示例性的示意图;
图6a-图6c示出了视频分辨率的切换过程的示例性的示意图;
图7为本申请终端装置实施例的结构示意图;
图8为本申请发送端装置实施例的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获取的所有其他实施例,都属于本申请保护的范围。
本申请的说明书实施例和权利要求书及附图中的术语“第一”、“第二”等仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元。方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。
图1示出了本申请图像帧的超分辨率实现方法所适用的架构的一个示例性的示意图,如图1所示,该应用框架包括:发送端和终端,其中发送端例如可以是云端,也可以是其他具备图像编码功能的设备或服务器等。发送端和终端可以通过无线通信网络连接,其中, 发送端包括下采样模块和编码模块,下采样模块用于将输入的源视频流中的各个图像帧分别进行下采样处理,可以使用最近邻插值、双线性插值、双三次插值等方法,下采样的尺度为二分之一或者四分之一等,本申请对此均不做具体限定。编码模块用于对下采样后的图像帧的数据进行编码,得到视频码流;终端包括解码模块和超分模块,其中,解码模块用于对接收到的视频码流进行解码得到图像帧的数据,然后根据图像帧的数据进行重构得到由重构的图像帧序列组成的视频流。本申请所使用编/解码模块的种类包括但不限于H.264/265,具体的编/解码方式和参数不做具体限定。
上述发送端还包括训练引擎,训练引擎用于训练视频超分辨率网络以对重构的图像帧进行超分辨处理。
本申请中训练数据包括:训练数据集合,该训练数据集合包括多个图像帧的高分辨率图像和低分辨率图像(可以包括多个低分辨率图像),以及多个图像帧的量化参数。该多个图像帧的高分辨率图像,均采用相同的下采样方法和压缩方法得到对应的低分辨率图像。训练引擎根据多个图像帧的高分辨率图像和低分辨率图像,基于高分辨率图像和低分辨率图像之间的对应关系,可以学习到如何从高分辨率图像处理成低分辨率图像的规则,并且该规则与量化参数之间的对应关系,进而形成与不同的量化参数分别对应的多个视频超分辨率网络。
由于视频在处理成码流的过程中,其分辨率会经过下采样和编码两个退化过程,其中下采样的退化程度对视频流中的所有图像帧均一样,但是编码失真的退化程度会根据不同的量化参数而不同,因此发送端的训练引擎在训练视频超分辨率网络时会根据不同的量化参数训练不同的视频超分辨率网络,以便于终端可以更好的进行视频超分辨率的恢复。由此可见,终端在根据视频超分辨率网络对图像帧进行超分辨率处理时,需要根据对该图像帧进行量化处理时采用的QP确定对应的视频超分辨率网络。
上述训练数据可以存入数据库(未示意)中,训练引擎基于训练数据训练得到神经网络,例如视频超分辨率网络。需要说明的是,本申请实施例对于训练数据的来源不做限定,例如可以是从发送端或其他地方获取训练数据进行训练。
视频超分辨率网络能够用于实现本申请实施例提供的图像帧的超分辨率实现方法,即,终端基于发送端的相关信息将重构得到的图像帧输入该视频超分辨率网络,可以得到高分辨率图像帧。下文将结合图2a-图2e详细说明视频超分辨率网络。
训练引擎训练得到的视频超分辨率网络可以应用于图1所示的应用框架中,尤其是发送端。训练引擎可以在发送端训练得到视频超分辨率网络,然后终端从发送端下载并使用该视频超分辨率网络。例如,训练引擎训练得到视频超分辨率网络,终端从发送端下载该视频超分辨率网络,然后可以根据该视频超分辨率网络对输入的重建的图像帧进行超分辨率处理,得到高分辨率的图像帧。
上述发送端可以是服务器,例如流媒体服务器、视频网站服务器等。
上述终端可以例如是手机(mobile phone)、平板电脑(pad)等,也可以是带无线收发功能的电脑、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备等,本申请对此不作限定。
需要说明的是,发送端和终端可以是独立的设备,各自实现相应的功能。可选的,发送端和终端也可以作为一个整体,相互交互实现相应的功能。其中发送端可以采用图8所 示的装置,终端可以采用图7所示的装置。
在一种可能的实现方式中,图1所示的框架可以应用于以下应用场景:
一、发送端提供视频库,当用户在终端上打开视频播放软件,并选取要播放的视频时,终端向发送端发送播放请求,该请求中携带视频的标识信息。发送端设备根据该标识信息获取相应的视频,经编码压缩后发送给终端。为了提高码率,发送端可能会对视频流进行下采样处理,终端播放这样的视频流,当用户觉得画面不清晰时,通过视频播放软件提供的控件选择较高的分辨率。终端接收到改变分辨率的指令后,采用本申请提供的方法对视频流中的各个图像帧进行超分辨率处理,提高视频的分辨率。
二、终端播放在线视频时,发现视频还可以以更高的分辨率进行播放。此时终端主动采用本申请提供的方法对视频流中的各个图像帧进行超分辨率处理,提高视频的分辨率。
三、视频来自于其他设备,例如视频存储于其他计算机或终端上,视频播放软件提供边接收边播放的功能,即当终端接收到足够的数据量的视频流时,视频播放软件就可以开始播放该视频。此时可以通过用户选择或者终端主动触发的方式,将视频的分辨率调高,终端采用本申请提供的方法对视频流中的各个图像帧进行超分辨率处理,提高视频的分辨率。
需要说明的是,以上示例性的描述了本申请提供给的图像帧的超分辨率实现方法可以应用的几种场景,但这并非对本申请的应用场景构成限定,只要是有视频编解码、视频传输和视频播放需求的场景均可采用本申请提供的方法,对此不做具体限定。
由于本申请实施例涉及神经网络的应用,为了便于理解,下面先对本申请实施例所使用到的一些名词或术语进行解释说明,该名词或术语也作为发明内容的一部分。
(1)神经网络
神经网络(neural network,NN)是机器学习模型,神经网络可以是由神经单元组成的,神经单元可以是指以x s和截距1为输入的运算单元,该运算单元的输出可以为:
Figure PCTCN2021105235-appb-000009
其中,s=1、2、……n,n为大于1的自然数,W s为x s的权重,b为神经单元的偏置。f为神经单元的激活函数(activation functions),用于将非线性特性引入神经网络中,来将神经单元中的输入信号转换为输出信号。该激活函数的输出信号可以作为下一层卷积层的输入。激活函数可以是sigmoid函数。神经网络是将许多个上述单一的神经单元联结在一起形成的网络,即一个神经单元的输出可以是另一个神经单元的输入。每个神经单元的输入可以与前一层的局部接受域相连,来提取局部接受域的特征,局部接受域可以是由若干个神经单元组成的区域。
(2)深度神经网络
深度神经网络(deep neural network,DNN),也称多层神经网络,可以理解为具有很多层隐含层的神经网络,这里的“很多”并没有特别的度量标准。从DNN按不同层的位置划分,DNN内部的神经网络可以分为三类:输入层,隐含层,输出层。一般来说第一层是输入层,最后一层是输出层,中间的层数都是隐含层。层与层之间是全连接的,也就是说,第i层的任意一个神经元一定与第i+1层的任意一个神经元相连。虽然DNN看起来很复杂,但是就每一层的工作来说,其实并不复杂,简单来说就是如下线性关系表达式:
Figure PCTCN2021105235-appb-000010
其中,
Figure PCTCN2021105235-appb-000011
是输入向量,
Figure PCTCN2021105235-appb-000012
是输出向量,
Figure PCTCN2021105235-appb-000013
是偏移向量,W是权重矩阵(也称系数),α()是激活函数。每一层仅仅是对输入向量
Figure PCTCN2021105235-appb-000014
经过如此简单的操作得到输出向量
Figure PCTCN2021105235-appb-000015
由于DNN层数多,则系数W和偏移向量
Figure PCTCN2021105235-appb-000016
的数量也就很多了。这些参数在DNN中的定义如下所述:以系数W为例:假设在一个三层的DNN中,第二层的第4个神经元到第三层的第2个神经元的线性系数定义为
Figure PCTCN2021105235-appb-000017
上标3代表系数W所在的层数,而下标对应的是输出的第三层索引2和输入的第二层索引4。总结就是:第L-1层的第k个神经元到第L层的第j个神经元的系数定义为
Figure PCTCN2021105235-appb-000018
需要注意的是,输入层是没有W参数的。在深度神经网络中,更多的隐含层让网络更能够刻画现实世界中的复杂情形。理论上而言,参数越多的模型复杂度越高,“容量”也就越大,也就意味着它能完成更复杂的学习任务。训练深度神经网络的也就是学习权重矩阵的过程,其最终目的是得到训练好的深度神经网络的所有层的权重矩阵(由很多层的向量W形成的权重矩阵)。
(3)卷积神经网络
卷积神经网络(convolutional neuron network,CNN)是一种带有卷积结构的深度神经网络,是一种深度学习(deep learning)架构,深度学习架构是指通过机器学习的算法,在不同的抽象层级上进行多个层次的学习。作为一种深度学习架构,CNN是一种前馈(feed-forward)人工神经网络,该前馈人工神经网络中的各个神经元可以对输入其中的图像作出响应。卷积神经网络包含了一个由卷积层和池化层构成的特征抽取器。该特征抽取器可以看作是滤波器,卷积过程可以看作是使用一个可训练的滤波器与一个输入的图像或者卷积特征平面(feature map)做卷积。
卷积层是指卷积神经网络中对输入信号进行卷积处理的神经元层。卷积层可以包括很多个卷积算子,卷积算子也称为核,其在图像处理中的作用相当于一个从输入图像矩阵中提取特定信息的过滤器,卷积算子本质上可以是一个权重矩阵,这个权重矩阵通常被预先定义,在对图像进行卷积操作的过程中,权重矩阵通常在输入图像上沿着水平方向一个像素接着一个像素(或两个像素接着两个像素……这取决于步长stride的取值)的进行处理,从而完成从图像中提取特定特征的工作。该权重矩阵的大小应该与图像的大小相关,需要注意的是,权重矩阵的纵深维度(depth dimension)和输入图像的纵深维度是相同的,在进行卷积运算的过程中,权重矩阵会延伸到输入图像的整个深度。因此,和一个单一的权重矩阵进行卷积会产生一个单一纵深维度的卷积化输出,但是大多数情况下不使用单一权重矩阵,而是应用多个尺寸(行×列)相同的权重矩阵,即多个同型矩阵。每个权重矩阵的输出被堆叠起来形成卷积图像的纵深维度,这里的维度可以理解为由上面所述的“多个”来决定。不同的权重矩阵可以用来提取图像中不同的特征,例如一个权重矩阵用来提取图像边缘信息,另一个权重矩阵用来提取图像的特定颜色,又一个权重矩阵用来对图像中不需要的噪点进行模糊化等。该多个权重矩阵尺寸(行×列)相同,经过该多个尺寸相同的权重矩阵提取后的特征图的尺寸也相同,再将提取到的多个尺寸相同的特征图合并形成卷积运算的输出。这些权重矩阵中的权重值在实际应用中需要经过大量的训练得到,通过训练得到的权重值形成的各个权重矩阵可以用来从输入图像中提取信息,从而使得卷积神经网络进行正确的预测。当卷积神经网络有多个卷积层的时候,初始的卷积层往往提取较多的一般特征,该一般特征也可以称之为低级别的特征;随着卷积神经网络深度的加深,越 往后的卷积层提取到的特征越来越复杂,比如高级别的语义之类的特征,语义越高的特征越适用于待解决的问题。
由于常常需要减少训练参数的数量,因此卷积层之后常常需要周期性的引入池化层,可以是一层卷积层后面跟一层池化层,也可以是多层卷积层后面接一层或多层池化层。在图像处理过程中,池化层的唯一目的就是减少图像的空间大小。池化层可以包括平均池化算子和/或最大池化算子,以用于对输入图像进行采样得到较小尺寸的图像。平均池化算子可以在特定范围内对图像中的像素值进行计算产生平均值作为平均池化的结果。最大池化算子可以在特定范围内取该范围内值最大的像素作为最大池化的结果。另外,就像卷积层中用权重矩阵的大小应该与图像尺寸相关一样,池化层中的运算符也应该与图像的大小相关。通过池化层处理后输出的图像尺寸可以小于输入池化层的图像的尺寸,池化层输出的图像中每个像素点表示输入池化层的图像的对应子区域的平均值或最大值。
(4)循环神经网络
循环神经网络(recurrent neural networks,RNN)是用来处理序列数据的。在传统的神经网络模型中,是从输入层到隐含层再到输出层,层与层之间是全连接的,而对于每一层层内之间的各个节点是无连接的。这种普通的神经网络虽然解决了很多难题,但是却仍然对很多问题却无能无力。例如,你要预测句子的下一个单词是什么,一般需要用到前面的单词,因为一个句子中前后单词并不是独立的。RNN之所以称为循环神经网路,即一个序列当前的输出与前面的输出也有关。具体的表现形式为网络会对前面的信息进行记忆并应用于当前输出的计算中,即隐含层本层之间的节点不再无连接而是有连接的,并且隐含层的输入不仅包括输入层的输出还包括上一时刻隐含层的输出。理论上,RNN能够对任何长度的序列数据进行处理。对于RNN的训练和对传统的CNN或DNN的训练一样。同样使用误差反向传播算法,不过有一点区别:即,如果将RNN进行网络展开,那么其中的参数,如W,是共享的;而如上举例上述的传统神经网络却不是这样。并且在使用梯度下降算法中,每一步的输出不仅依赖当前步的网络,还依赖前面若干步网络的状态。该学习算法称为基于时间的反向传播算法(back propagation through time,BPTT)。
既然已经有了卷积神经网络,为什么还要循环神经网络?原因很简单,在卷积神经网络中,有一个前提假设是:元素之间是相互独立的,输入与输出也是独立的,比如猫和狗。但现实世界中,很多元素都是相互连接的,比如股票随时间的变化,再比如一个人说了:我喜欢旅游,其中最喜欢的地方是云南,以后有机会一定要去。这里填空,人类应该都知道是填“云南”。因为人类会根据上下文的内容进行推断,但如何让机器做到这一步?RNN就应运而生了。RNN旨在让机器像人一样拥有记忆的能力。因此,RNN的输出就需要依赖当前的输入信息和历史的记忆信息。
(5)损失函数
在训练深度神经网络的过程中,因为希望深度神经网络的输出尽可能的接近真正想要预测的值,所以可以通过比较当前网络的预测值和真正想要的目标值,再根据两者之间的差异情况来更新每一层神经网络的权重向量(当然,在第一次更新之前通常会有初始化的过程,即为深度神经网络中的各层预先配置参数),比如,如果网络的预测值高了,就调整权重向量让它预测低一些,不断的调整,直到深度神经网络能够预测出真正想要的目标值或与真正想要的目标值非常接近的值。因此,就需要预先定义“如何比较预测值和目标 值之间的差异”,这便是损失函数(loss function)或目标函数(objective function),它们是用于衡量预测值和目标值的差异的重要方程。其中,以损失函数举例,损失函数的输出值(loss)越高表示差异越大,那么深度神经网络的训练就变成了尽可能缩小这个loss的过程。
(6)反向传播算法
卷积神经网络可以采用误差反向传播(back propagation,BP)算法在训练过程中修正初始的超分辨率模型中参数的大小,使得超分辨率模型的重建误差损失越来越小。具体地,前向传递输入信号直至输出会产生误差损失,通过反向传播误差损失信息来更新初始的超分辨率模型中参数,从而使误差损失收敛。反向传播算法是以误差损失为主导的反向传播运动,旨在得到最优的超分辨率模型的参数,例如权重矩阵。
(7)生成式对抗网络
生成式对抗网络(generative adversarial networks,GAN)是一种深度学习模型。该模型中至少包括两个模块:一个模块是生成模型(Generative Model),另一个模块是判别模型(Discriminative Model),通过这两个模块互相博弈学习,从而产生更好的输出。生成模型和判别模型都可以是神经网络,具体可以是深度神经网络,或者卷积神经网络。GAN的基本原理如下:以生成图片的GAN为例,假设有两个网络,G(Generator)和D(Discriminator),其中G是一个生成图片的网络,它接收一个随机的噪声z,通过这个噪声生成图片,记做G(z);D是一个判别网络,用于判别一张图片是不是“真实的”。它的输入参数是x,x代表一张图片,输出D(x)代表x为真实图片的概率,如果为1,就代表100%是真实的图片,如果为0,就代表不可能是真实的图片。在对该生成式对抗网络进行训练的过程中,生成网络G的目标就是尽可能生成真实的图片去欺骗判别网络D,而判别网络D的目标就是尽量把G生成的图片和真实的图片区分开来。这样,G和D就构成了一个动态的“博弈”过程,也即“生成式对抗网络”中的“对抗”。最后博弈的结果,在理想的状态下,G可以生成足以“以假乱真”的图片G(z),而D难以判定G生成的图片究竟是不是真实的,即D(G(z))=0.5。这样就得到了一个优异的生成模型G,它可以用来生成图片。
下面将结合图2a-图2e详细地描述视频超分辨率网络(亦称为神经网络)。
如图2a所示,输入1经过一个3×3卷积层(3×3Conv)和一个激活层(Relu)处理,输入2经过另一个3×3卷积层和另一个激活层处理,然后将上述处理后得到的结果合并(concat),再经过块处理层(Res-Block)、…、块处理层、3×3卷积层、激活层、3×3卷积层得到残差值。将输入1和残差值相加后得到输出。
如图2b所示,上述块处理层可以包括一个3×3卷积层、一个激活层和一个3×3卷积层,将输入经这三层处理后,再将处理后得到的结果和初始输入相加得到输出。
如图2c所示,上述块处理层可以包括一个3×3卷积层、一个激活层、一个3×3卷积层和一个激活层,将输入经3×3卷积层、激活层和3×3卷积层处理后,再将处理后得到的结果和初始输入相加,最后经过一个激活层得到输出。
如图2d所示,输入经过一个3×3卷积层、一个激活层、一个块处理层、…、一个块处理层、一个3×3卷积层、一个激活层和一个3×3卷积层处理得到输出。
如图2e所示,输入1经过一个3×3卷积层和一个激活层处理,输入1和输入2相乘 后经过另一个3×3卷积层和另一个激活层处理,然后将上述处理后得到的结果合并(concat),再经过块处理层、…、块处理层、3×3卷积层、激活层和3×3卷积层得到残差值。将输入1和残差值相加后得到输出。
需要说明的是,如图2a-图2e所示的神经网络仅作为神经网络的几种示例,在具体的应用中,神经网络还可以以其他网络模型的形式存在,本申请对此不做具体限定。另外,视频超分辨率网络的输入和输出取决于其训练过程,上述输入和输出,及其数量并不构成限定。输入1、输入2可以分别对应于输入视频超分辨率网络的任意一个图像帧,输出可以对应于输出视频超分辨率网络的高分辨率的图像帧。
图3示出了终端300的结构示意图。
终端300可以包括处理器310,外部存储器接口320,内部存储器321,通用串行总线(universal serial bus,USB)接口330,充电管理模块340,电源管理模块341,电池432,天线1,天线2,移动通信模块350,无线通信模块360,音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,传感器模块380,按键390,马达391,指示器392,摄像头393,显示屏394,以及用户标识模块(subscriber identification module,SIM)卡接口395等。其中传感器模块380可以包括压力传感器380A,陀螺仪传感器380B,气压传感器380C,磁传感器380D,加速度传感器380E,距离传感器380F,接近光传感器380G,指纹传感器380H,温度传感器380J,触摸传感器380K,环境光传感器380L,骨传导传感器380M等。
可以理解的是,本发明实施例示意的结构并不构成对终端300的具体限定。在本申请另一些实施例中,终端300可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器310可以包括一个或多个处理单元,例如:处理器310可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器310中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器310中的存储器为高速缓冲存储器。该存储器可以保存处理器310刚用过或循环使用的指令或数据。如果处理器310需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器310的等待时间,因而提高了系统的效率。
在一些实施例中,处理器310可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口, 用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器310可以包含多组I2C总线。处理器310可以通过不同的I2C总线接口分别耦合触摸传感器380K,充电器,闪光灯,摄像头393等。例如:处理器310可以通过I2C接口耦合触摸传感器380K,使处理器310与触摸传感器380K通过I2C总线接口通信,实现终端300的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器310可以包含多组I2S总线。处理器310可以通过I2S总线与音频模块370耦合,实现处理器310与音频模块370之间的通信。在一些实施例中,音频模块370可以通过I2S接口向无线通信模块360传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块370与无线通信模块360可以通过PCM总线接口耦合。在一些实施例中,音频模块370也可以通过PCM接口向无线通信模块360传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器310与无线通信模块360。例如:处理器310通过UART接口与无线通信模块360中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块370可以通过UART接口向无线通信模块360传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器310与显示屏394,摄像头393等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器310和摄像头393通过CSI接口通信,实现终端300的拍摄功能。处理器310和显示屏394通过DSI接口通信,实现终端300的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器310与摄像头393,显示屏394,无线通信模块360,音频模块370,传感器模块380等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口330是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口330可以用于连接充电器为终端300充电,也可以用于终端300与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端300的结构限定。在本申请另一些实施例中,终端300也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块340用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块340可以通过USB接口330接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块340可以通 过终端300的无线充电线圈接收无线充电输入。充电管理模块340为电池432充电的同时,还可以通过电源管理模块341为终端供电。
电源管理模块341用于连接电池432,充电管理模块340与处理器310。电源管理模块341接收电池432和/或充电管理模块340的输入,为处理器310,内部存储器321,显示屏394,摄像头393,和无线通信模块360等供电。电源管理模块341还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块341也可以设置于处理器310中。在另一些实施例中,电源管理模块341和充电管理模块340也可以设置于同一个器件中。
终端300的无线通信功能可以通过天线1,天线2,移动通信模块350,无线通信模块360,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端300中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块350可以提供应用在终端300上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块350可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块350可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块350还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块350的至少部分功能模块可以被设置于处理器310中。在一些实施例中,移动通信模块350的至少部分功能模块可以与处理器310的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器370A,受话器370B等)输出声音信号,或通过显示屏394显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器310,与移动通信模块350或其他功能模块设置在同一个器件中。
无线通信模块360可以提供应用在终端300上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块360可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块360经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器310。无线通信模块360还可以从处理器310接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,终端300的天线1和移动通信模块350耦合,天线2和无线通信模块360耦合,使得终端300可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通 用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
终端300通过GPU,显示屏394,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏394和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器310可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏394用于显示图像,视频等。显示屏394包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端300可以包括1个或N个显示屏394,N为大于1的正整数。
终端300可以通过ISP,摄像头393,视频编解码器,GPU,显示屏394以及应用处理器等实现拍摄功能。
ISP用于处理摄像头393反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头393中。
摄像头393用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端300可以包括1个或N个摄像头393,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端300在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。本申请中终端可以基于超分参考信息获取M个图像帧,将该M个图像帧和待处理的第一图像帧一起输入视频超分辨率网络,以实现对第一图像帧的超分辨率处理。终端在超分参考信息中获取到一个量化参数后,可以根据该量化参数获取到与之对应的视频超分辨率网络。超分辨率是通过多个低分辨率的图像帧得到一个高分辨率的图像帧的过程,分辨率越高,每英寸内包含的像素点越多,超分辨率处理即为将每英寸内包含的像素点的数量增加,使得图像帧的细节变得丰富,提高其清晰度。终端借助来自于发送端的超分参考信息,选取要使用的视频超分辨率网络,以及选取参与超分辨率处理的参考图像帧,以实 现对第一图像帧(即待超分的图像帧)的超分辨率处理,提高第一图像帧的分辨率。一方面,终端根据第一图像帧的量化参数选择对应的视频超分辨率网络,可以更好的进行分辨率的提升,另一方面,利用发送端给各图像帧评的分数选取参考图像帧,以达到多帧融合超分后质量最大化的目的,提升图像帧的超分辨率处理的效果,第三方面利用发送端的资源对视频流中的图像帧评分,可以节省终端的处理资源,减少终端的运算量,提高其超分辨率处理的效率。
视频编解码器用于对数字视频压缩或解压缩。终端300可以支持一种或多种视频编解码器。这样,终端300可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端300的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口320可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端300的存储能力。外部存储卡通过外部存储器接口320与处理器310通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器321可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器321可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端300使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器321可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器310通过运行存储在内部存储器321的指令,和/或存储在设置于处理器中的存储器的指令,执行终端300的各种功能应用以及数据处理。
终端300可以通过音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块370用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块370还可以用于对音频信号编码和解码。在一些实施例中,音频模块370可以设置于处理器310中,或将音频模块370的部分功能模块设置于处理器310中。
扬声器370A,也称“喇叭”,用于将音频电信号转换为声音信号。终端300可以通过扬声器370A收听音乐,或收听免提通话。
受话器370B,也称“听筒”,用于将音频电信号转换成声音信号。当终端300接听电话或语音信息时,可以通过将受话器370B靠近人耳接听语音。
麦克风370C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风370C发声,将声音信号输入到麦克风370C。终端300可以设置至少一个麦克风370C。在另一些实施例中,终端300可以设置两个麦克风370C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端300还可以设置三个,四个或更多麦克风370C,实现采集声音信号,降噪,还可以识别声音来 源,实现定向录音功能等。
耳机接口370D用于连接有线耳机。耳机接口370D可以是USB接口330,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器380A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器380A可以设置于显示屏394。压力传感器380A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器380A,电极之间的电容改变。终端300根据电容的变化确定压力的强度。当有触摸操作作用于显示屏394,终端300根据压力传感器380A检测所述触摸操作强度。终端300也可以根据压力传感器380A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器380B可以用于确定终端300的运动姿态。在一些实施例中,可以通过陀螺仪传感器380B确定终端300围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器380B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器380B检测终端300抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端300的抖动,实现防抖。陀螺仪传感器380B还可以用于导航,体感游戏场景。
气压传感器380C用于测量气压。在一些实施例中,终端300通过气压传感器380C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器380D包括霍尔传感器。终端300可以利用磁传感器380D检测翻盖皮套的开合。在一些实施例中,当终端300是翻盖机时,终端300可以根据磁传感器380D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器380E可检测终端300在各个方向上(一般为三轴)加速度的大小。当终端300静止时可检测出重力的大小及方向。还可以用于识别终端姿态,应用于横竖屏切换,计步器等应用。
距离传感器380F,用于测量距离。终端300可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端300可以利用距离传感器380F测距以实现快速对焦。
接近光传感器380G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端300通过发光二极管向外发射红外光。终端300使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端300附近有物体。当检测到不充分的反射光时,终端300可以确定终端300附近没有物体。终端300可以利用接近光传感器380G检测用户手持终端300贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器380G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器380L用于感知环境光亮度。终端300可以根据感知的环境光亮度自适 应调节显示屏394亮度。环境光传感器380L也可用于拍照时自动调节白平衡。环境光传感器380L还可以与接近光传感器380G配合,检测终端300是否在口袋里,以防误触。
指纹传感器380H用于采集指纹。终端300可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器380J用于检测温度。在一些实施例中,终端300利用温度传感器380J检测的温度,执行温度处理策略。例如,当温度传感器380J上报的温度超过阈值,终端300执行降低位于温度传感器380J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端300对电池432加热,以避免低温导致终端300异常关机。在其他一些实施例中,当温度低于又一阈值时,终端300对电池432的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器380K,也称“触控器件”。触摸传感器380K可以设置于显示屏394,由触摸传感器380K与显示屏394组成触摸屏,也称“触控屏”。触摸传感器380K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏394提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器380K也可以设置于终端300的表面,与显示屏394所处的位置不同。
骨传导传感器380M可以获取振动信号。在一些实施例中,骨传导传感器380M可以获取人体声部振动骨块的振动信号。骨传导传感器380M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器380M也可以设置于耳机中,结合成骨传导耳机。音频模块370可以基于所述骨传导传感器380M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器380M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键390包括开机键,音量键等。按键390可以是机械按键。也可以是触摸式按键。终端300可以接收按键输入,产生与终端300的用户设置以及功能控制有关的键信号输入。
马达391可以产生振动提示。马达391可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏394不同区域的触摸操作,马达391也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器392可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口395用于连接SIM卡。SIM卡可以通过插入SIM卡接口395,或从SIM卡接口395拔出,实现和终端300的接触和分离。终端300可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口395可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口395可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口395也可以兼容不同类型的SIM卡。SIM卡接口395也可以兼容外部存储卡。终端300通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端300采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端300中,不能和终端300分离。
图4为本申请图像帧的超分辨率实现方法实施例的流程图,如图4所示,本实施例的 方法可以应用于图1所示的架构,其执行主体可以包括发送端和图2所示的终端。该图像帧的超分辨率实现方法可以包括:
步骤401、终端向发送端发送视频播放请求。
基于本申请提供的方法的应用场景,用户在终端上在线播放视频,当用户选取了要播放的视频后,例如点击视频的缩略图或者视频名称,终端获取到该操作触发的指令,然后终端根据该指令向视频的发送端发送视频播放请求。
例如,用户使用安装于终端上的视频应用程序(application,APP)播放视频,打开视频APP后,浏览视频APP的视频列表,点击相应的视频触发该视频在终端上播放。用户的操作触发视频APP生成视频播放请求,该视频播放请求中携带待播放的视频的标识信息,例如统一资源定位符(uniform resource locator,URL),视频索引等。终端通过与发送端之间的通信网络将视频播放请求发送给存储了待播放的视频的发送端。
步骤402、发送端对第一图像帧进行下采样处理,该第一图像帧是视频播放请求所指示的视频中的任意一个图像帧。
发送端接收到来自终端的视频播放请求后,根据视频播放请求中携带的标识信息从视频库中提取对应的视频。为了降低视频传输的码率,发送端可以对视频包含的各个图像帧分别进行下采样处理以减少图像数据,下采样的方法可以包括最近邻插值、双线性插值、双三次插值等,下采样的尺度可以为二分之一或者四分之一等。需要说明的是,本申请对发送端所采用的具体的下采样方法或参数等均不做具体限定。
步骤403、发送端对下采样处理后的第一图像帧进行编码,同时获取第一图像帧的量化参数、图像质量分数和参考帧指示信息。
发送端的编码模块对下采样处理后的第一图像帧进行编码得到第一图像帧的码流,该编码过程涉及到模式选择、量化处理和重建。在模式选择过程中,发送端可以确定第一图像帧的参考帧,进而获取到参考帧指示信息;在量化处理过程中,发送端可以获取到量化参数;在重建过程中,发送端可以根据原始的第一图像帧和第一图像帧的重建帧获取第一图像帧的图像质量分数。
发送端可以根据第一图像帧和第一图像帧的重建帧进行质量评分,从而获取到第一图像帧的图像质量分数。发送端可以采用PSNR、SSIM、VMAF等评分工具得到上述图像质量分数。
步骤404、发送端向终端发送视频流和超分参考信息,该视频流包括第一图像帧,超分参考信息包括量化参数、图像质量分数和参考帧指示信息。
发送端对视频流编码后,得到该视频流的码流:一种情况是发送端在编码时,同时将视频流中的图像帧的数据和超分参考信息,例如量化参数、图像质量分数及参考帧指示信息等,一起进行编码得到包含图像帧的数据和超分参考信息的码流,并将该码流传输给终端;另一种情况是,发送端对视频流中的图像帧的数据进行编码,得到图像帧的码流,再对超分参考信息进行编码得到超分参考信息的码流,将图像帧的码流和超分参考信息的码流拼接后传输给终端。本申请对码流的实现方式不做具体限定。
步骤405、终端播放视频。
终端接收到来自发送端的码流后,其中的解码装置对码流进行解码,得到视频流中的图像帧和超分参考信息,并按照图像帧的时间先后顺序在视频APP上逐帧进行播放。图 像帧的码流中携带了图像帧的时间戳信息,例如该图像帧在视频流中的时间点,或者该图像帧在视频流中的序号,或者该图像帧与视频流中的第一个图像帧之间的偏移量,等。
步骤406、终端获取第一图像帧的超分参考信息,该超分参考信息包括第一图像帧的量化参数和参考帧指示信息,以及第一图像帧对应的图像质量分数集合。
用户在视频播放的过程中,可能会对当前播放视频的分辨率不满意,希望可以看到更清晰的画面,此时用户可以点击视频APP上提供的控件(该实施过程可参见下文实施例,此处不再赘述),选择较高分辨率或者最高分辨率,该操作会触发产生分辨率变换指令,该指令中包括用户所选的分辨率,并且用户所选的分辨率高于当前分辨率。基于分辨率变换指令,终端开始对视频流中的图像帧进行超分辨率处理。
可选的,视频APP播放视频的过程中,检测到已经接收到的视频流可以支持更高分辨率的在线播放,因此主动触发对视频流中的图像帧进行超分辨率处理。
第一图像帧的量化参数和参考帧指示信息可以直接从第一图像帧的码流中获取,而第一图像帧对应的图像质量分数集合,可以根据预先设定的范围,从包含第一图像帧、且该范围下的多个图像帧的码流中获取。
为了对第一图像帧进行超分辨率处理,视频超分辨率网络需要输入多帧图像作为参考,因此终端可以根据预先设定的范围先获取图像质量分数集合,该图像质量分数集合可以包括视频流中依时间先后顺序连续N个图像帧的图像质量分数,该N个图像帧包括第一图像帧。假设第一图像帧在视频序列中的序号为n,N个图像帧的序号范围为[1,N],其中1≤n≤N。例如,N=3,N个图像帧可以包括n-1,n,n+1;又例如,N=4,N个图像帧可以包括n-2,n-1,n,n+1;又例如,N=8,N个图像帧可以包括n-3,n-2,n-1,n,n+1,n+2,n+3,n+4。N的取值不宜过大,如果N的取值过大,那么可能N个图像帧的内容跨度过大,导致对第一图像帧的超分辨率处理效果较差。需要说明的是,第一图像帧可以位于N个图像帧的中间,也可以位于N个图像帧的前端或后端,具体如何选取可以视预先设定的选区规则而定,本申请对此不做具体限定。
步骤407、终端根据图像质量分数集合从多个图像帧中选取M个图像帧。
M的取值与视频超分辨率网络的训练模型相关,例如,发送端的训练引擎在训练视频超分辨率网络时,输入的训练数据包括M个图像帧,则在使用该视频超分辨率网络时也需要输入M个图像帧,M≥1。
终端可以从N个图像帧中选取图像质量分数最高的M个图像帧,可见终端选取的M个图像帧可能是也可能不是依时间先后顺序连续的M个图像帧。例如,N=3,M=2,选取的两个图像帧包括n-1,n+1,该两个图像帧加上第一图像帧是先后连续的;又例如,N=4,M=3,选取的三个图像帧可以包括n-2,n-1,n+1,该三个图像帧加上第一图像帧是先后连续的;又例如,N=8,M=4,选取的四个图像帧可以包括n-3,n-1,n+2,n+4,该四个图像帧即使加上第一图像帧也是不连续的。
需要说明的是,为了确保对第一图像帧的超分辨率处理的效果,实际提升第一图像帧的分辨率,除上述从N个图像帧中选取图像质量分数最高的M个图像帧的条件外,还需要满足该M个图像帧的图像质量分数均高于第一图像帧的图像质量分数。因此有以下三种可能:
(1)N个图像帧包括第一图像帧集合(该第一图像帧集合中包括的图像帧的图像质 量分数均高于第一图像帧的图像质量分数),且第一图像帧集合中的图像帧的个数大于或等于M时,从第一图像帧集合中选取图像质量分数最高的M个图像帧。
该情况表明N个图像帧中有且有足够的图像帧的图像质量分数是高于第一图像帧的图像质量分数的,因此可以直接从第一图像帧集合中选取M个图像帧。
(2)N个图像帧包括第一图像帧集合,但第一图像帧集合中的图像帧的个数小于M,从第一图像帧集合中选取全部图像帧,第一图像帧集合中包括的图像帧的图像质量分数均高于第一图像帧的图像质量分数。当全部图像帧的个数小于M时,从多个图像帧中选取与参考帧指示信息对应的图像帧。当全部图像帧和与参考帧指示信息对应的图像帧的个数小于M时,从多个图像帧中除全部图像帧和与参考帧指示信息对应的图像帧外的其他图像帧中选取与第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
该情况表明N个图像帧中有但没有足够的图像帧的图像质量分数是高于第一图像帧的图像质量分数的。因此除了第一图像帧集合中的所有图像帧,还需要再选取满足其他条件的图像帧,直到选取出的图像帧的个数达到M。其他条件首选第一图像帧的参考帧,该参考帧是发送端对视频预测过程中使用的参考帧,可以通过码流中携带的参考帧指示信息获取。需要说明的是,第一图像帧的参考帧可能已经包含于第一图像帧集合中,那么就需要考虑其他条件中的次选条件。如果在选择了第一图像帧的参考帧之后仍然未达到M个图像帧,则可以考虑其他条件中的次选条件,直到选取的图像帧的个数达到M个。次选条件可以是N个图像帧中除第一图像帧集合中的全部图像帧和与参考帧指示信息对应的图像帧外的其他图像帧中,与第一图像帧间隔时间从短到长的至少一个图像帧。
(3)N个图像帧不包括第一图像帧集合,判断第一图像帧是否为I帧,若第一图像帧为I帧,则M个图像帧是指第一图像帧的M个复制样本;若第一图像帧非I帧,则从多个图像帧中选取与参考帧指示信息对应的图像帧。当与参考帧指示信息对应的图像帧的个数小于M时,从多个图像帧中除与参考帧指示信息对应的图像帧外的其他图像帧中选取与第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
该情况表明N个图像帧中没有图像帧的图像质量分数是高于第一图像帧的图像质量分数的,第一图像帧可能有两种情况,一种是第一图像帧是I帧,从第一图像帧开始可能发生场景切换,那么前一个场景的内容和切换后的场景不一样,第一图像帧之前的图像帧的信息利用不上;或者,第一图像帧是固定间隔插入的I帧,那么第一图像帧的质量通常比前后的图像帧的质量会高很多,这样前后的图像帧的信息也利用不上。因此选取的M个图像帧就是第一图像帧的M个复制样本。另一种是第一图像帧非I帧(B帧或P帧),基于图像质量分数N个图像帧中没有可选的图像帧,因此先选取第一图像帧的参考帧,再选取N个图像帧中除第一图像帧集合中的全部图像帧和与参考帧指示信息对应的图像帧外的其他图像帧中,与第一图像帧间隔时间从短到长的至少一个图像帧,直到选取的图像帧的个数达到M个。
步骤408、终端获取与量化参数对应的视频超分辨率网络,该视频超分辨率网络具有超分辨率功能。
视频超分辨率网络是经训练得到的具有超分辨率功能的神经网络。视频超分辨率网络的训练过程可参见发送端中的训练引擎的相关描述,此处不再赘述。如上所述,视频超分辨率网络与QP的对应关系,终端从码流中获取第一图像帧的QP后,即可根据该QP获 取对应的视频超分辨率网络,用作对第一图像帧进行超分辨率处理的神经网络。
步骤409、终端将M个图像帧和第一图像帧输入视频超分辨率网络,视频超分辨率网络用于根据M个图像帧对第一图像帧进行超分辨率处理得到第二图像帧,第二图像帧的分辨率高于第一图像帧的分辨率。
终端将步骤407中获取的M个图像帧输入视频超分辨率网络,经视频超分辨率网络处理后得到第二图像帧,该第二图像帧的分辨率即为步骤406中的分辨率变换指令所指示的分辨率。
本申请终端借助来自于发送端的超分参考信息,选取要使用的视频超分辨率网络,以及选取参与超分辨率处理的参考图像帧,以实现对第一图像帧(即待超分的图像帧)的超分辨率处理,提高第一图像帧的分辨率。一方面,终端根据第一图像帧的量化参数选择对应的视频超分辨率网络,可以更好的进行分辨率的提升,另一方面,利用发送端给各图像帧评的分数选取参考图像帧,以达到多帧融合超分后质量最大化的目的,提升图像帧的超分辨率处理的效果,第三方面利用发送端的资源对视频流中的图像帧评分,可以节省终端的处理资源,减少终端的运算量,提高其超分辨率处理的效率。
图5a-图5c示出了在线播放视频过程的示例性的示意图。
如图5a所示,用户点击终端的桌面上的视频APP的图标,打开视频APP。
如图5b所示,用户在视频列表中选取要播放的视频。在视频列表中包括精选视频的缩略图和名称,还包括热播视频的缩略图和名称,以及视频分类的标题等。
如图5c所示,进入用户选中的视频的播放界面,该视频开始在终端的屏幕上全屏播放。
图6a-图6c示出了视频分辨率的切换过程的示例性的示意图。
如图6a所示,在视频播放界面的右下角有用于选择分辨率的控件,此时该控件上显示的是当前采用的分辨率,例如270P。点击该控件出现一个上拉菜单,270P有下划线表示这是当前播放视频所采用的分辨率,只要该分辨率不是最高清的分辨率,用户均可以选择比当前分辨率更高清的分辨率。
如图6b所示,用户在比当前分辨率更高清的分辨率中选择了一个分辨率。此时终端接收到基于该操作产生的分辨率变换指令,进而采用图4所示实施例中的方法对正在播放的视频的分辨率进行调整,具体即对视频中的图像帧进行超分辨率处理。
如图6c所示,经超分辨率处理后,视频的分辨率被切换至用户选中的分辨率,播放界面上显示“分辨率从270P切换至1080P”的字样,此时该控件上显示的是当前采用的分辨率,例如1080P。而且用户可以很明显的看到此时播放的视频相较于分辨率变换前清晰了很多。
需要说明的是,图5a-图5c、图6a-图6c均是本申请提供的一种示例,并不构成任何限定,包括显示界面、控件实现方式、分辨率的表示方式(例如,标清、高清、超清等)、分辨率切换方式等在内的视频播放过程和视频分辨率的切换过程还可以采用其他的实现方式,本申请对此不做具体限定。
图7为本申请终端装置实施例的结构示意图,如图7所示,该装置可以应用于图2所示的终端。本实施例的终端装置可以包括:获取模块701和处理模块702。其中,
获取模块701,用于获取超分参考信息,所述超分参考信息包括量化参数和图像质量 分数集合,所述图像质量分数集合包括多个图像帧各自的图像质量分数;根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,M大于或等于1;获取与所述量化参数对应的视频超分辨率网络,所述视频超分辨率网络具有超分辨率功能;处理模块702,用于将所述M个图像帧和第一图像帧输入所述视频超分辨率网络,所述视频超分辨率网络用于根据所述M个图像帧对所述第一图像帧进行超分辨率处理得到第二图像帧,所述第二图像帧的分辨率高于所述第一图像帧的分辨率。
在一种可能的实现方式中,所述获取模块701,具体用于当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数大于或等于M时,从所述第一图像帧集合中选取所述M个图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数。
在一种可能的实现方式中,所述M个图像帧包括所述第一图像帧集合中的图像帧按照图像质量分数从大到小排列后的前M个图像帧。
在一种可能的实现方式中,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述获取模块701,还用于当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数小于M时,从所述第一图像帧集合中选取全部图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;当所述全部图像帧的个数小于M时,从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;当所述全部图像帧和所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述全部图像帧和所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
在一种可能的实现方式中,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述获取模块701,还用于当所述多个图像帧不包括第一图像帧集合时,判断所述第一图像帧是否为I帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;若所述第一图像帧为I帧,则所述M个图像帧包括所述第一图像帧的M个复制样本;若所述第一图像帧非I帧,则从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;当所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
在一种可能的实现方式中,所述获取模块701,具体用于接收发送端发送的所述超分参考信息。
在一种可能的实现方式中,所述量化参数包括所述发送端对所述第一图像帧进行量化处理的过程中使用的量化参数。
在一种可能的实现方式中,所述多个图像帧包括所述视频流中的连续多个图像帧,所述多个图像帧包括所述第一图像帧。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积神经网络CNN、深度神经网络DNN或者循环神经网络RNN。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积层和激活层。
在一种可能的实现方式中,所述卷积层的深度为2、3、4、5、6、16、24、32、48、 64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
本实施例的装置,可以用于执行图4所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图8为本申请发送端装置实施例的结构示意图,如图8所示,该装置可以应用于发送端。本实施例的发送端装置可以包括:获取模块801、发送模块802和训练模块803。其中,
获取模块801,用于获取第一图像帧的量化参数;根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数;发送模块802,用于向终端装置发送视频流和超分参考信息,所述视频流包括所述第一图像帧,所述超分参考信息包括所述量化参数和所述图像质量分数。
在一种可能的实现方式中,所述获取模块801,还用于获取所述第一图像帧的参考帧指示信息;相应的,所述超分参考信息还包括所述参考帧指示信息。
在一种可能的实现方式中,所述获取模块801,具体用于根据峰值信噪比PSNR、结构相似度SSIM或多特征融合的视频评价标准VMAF获取所述第一图像帧的图像质量分数。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积神经网络CNN、深度神经网络DNN或者循环神经网络RNN。
在一种可能的实现方式中,所述视频超分辨率网络包括卷积层和激活层。
在一种可能的实现方式中,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
在一种可能的实现方式中,还包括:训练模块803;所述获取模块801,还用于获取训练数据集合,其中所述训练数据集合包括多个图像帧各自的第一分辨率图像和第二分辨率图像,以及多个量化参数,所述第一分辨率图像的分辨率高于所述第二分辨率图像的分辨率;所述训练模块803,用于根据所述训练数据集合训练得到多个视频超分辨率网络,所述多个视频超分辨率网络与所述多个量化参数对应。
本实施例的装置,可以用于执行图4所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、特定应用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。本申请公开的方法的步骤可以直接体现为硬件编码处理器执行完成,或者用编码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
上述各实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器 (erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (41)

  1. 一种图像帧的超分辨率实现方法,其特征在于,包括:
    获取超分参考信息,所述超分参考信息包括量化参数和图像质量分数集合,所述图像质量分数集合包括多个图像帧各自的图像质量分数;
    根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,M大于或等于1;
    获取与所述量化参数对应的视频超分辨率网络,所述视频超分辨率网络具有超分辨率功能;
    将所述M个图像帧和第一图像帧输入所述视频超分辨率网络,所述视频超分辨率网络用于根据所述M个图像帧对所述第一图像帧进行超分辨率处理得到第二图像帧,所述第二图像帧的分辨率高于所述第一图像帧的分辨率。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,具体包括:
    当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数大于或等于M时,从所述第一图像帧集合中选取所述M个图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数。
  3. 根据权利要求2所述的方法,其特征在于,所述M个图像帧包括所述第一图像帧集合中的图像帧按照图像质量分数从大到小排列后的前M个图像帧。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,还包括:
    当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数小于M时,从所述第一图像帧集合中选取全部图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;
    当所述全部图像帧的个数小于M时,从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;
    当所述全部图像帧和所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述全部图像帧和所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,还包括:
    当所述多个图像帧不包括第一图像帧集合时,判断所述第一图像帧是否为I帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;
    若所述第一图像帧为I帧,则所述M个图像帧包括所述第一图像帧的M个复制样本;
    若所述第一图像帧非I帧,则从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;
    当所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中 除所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述获取超分参考信息,具体包括:
    接收发送端发送的所述超分参考信息。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述量化参数包括所述发送端对所述第一图像帧进行量化处理的过程中使用的量化参数。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述多个图像帧包括所述视频流中的连续多个图像帧,所述多个图像帧包括所述第一图像帧。
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,所述视频超分辨率网络包括卷积神经网络CNN、深度神经网络DNN或者循环神经网络RNN。
  10. 根据权利要求9所述的方法,其特征在于,所述视频超分辨率网络包括卷积层和激活层。
  11. 根据权利要求10所述的方法,其特征在于,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
  12. 一种图像帧的超分辨率实现方法,其特征在于,包括:
    获取第一图像帧的量化参数;
    根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数;
    向终端发送视频流和超分参考信息,所述视频流包括所述第一图像帧,所述超分参考信息包括所述量化参数和所述图像质量分数。
  13. 根据权利要求12所述的方法,其特征在于,所述向终端发送视频流和超分参考信息之前,还包括:
    获取所述第一图像帧的参考帧指示信息;
    相应的,所述超分参考信息还包括所述参考帧指示信息。
  14. 根据权利要求12或13所述的方法,其特征在于,所述根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数,具体包括:
    根据峰值信噪比PSNR、结构相似度SSIM或多特征融合的视频评价标准VMAF获取所述第一图像帧的图像质量分数。
  15. 根据权利要求12-14中任一项所述的方法,其特征在于,所述视频超分辨率网络包括卷积神经网络CNN、深度神经网络DNN或者循环神经网络RNN。
  16. 根据权利要求15所述的方法,其特征在于,所述视频超分辨率网络包括卷积层和激活层。
  17. 根据权利要求15或16所述的方法,其特征在于,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
  18. 根据权利要求15-17中任一项所述的方法,其特征在于,所述方法还包括:
    获取训练数据集合,其中所述训练数据集合包括多个图像帧各自的第一分辨率图像和第二分辨率图像,以及多个量化参数,所述第一分辨率图像的分辨率高于所述第二分辨率 图像的分辨率;
    根据所述训练数据集合训练得到多个视频超分辨率网络,所述多个视频超分辨率网络与所述多个量化参数对应。
  19. 一种图像帧的超分辨率实现方法,其特征在于,包括:
    发送端获取第一图像帧的量化参数,并根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数;
    所述发送端向终端发送视频流和超分参考信息,所述视频流包括所述第一图像帧,所述超分参考信息包括所述量化参数和所述图像质量分数;
    所述终端根据所述视频流获取所述第一图像帧,并根据所述超分参考信息获取所述量化参数和图像质量分数集合,所述图像质量分数集合包括多个图像帧各自的图像质量分数;
    所述终端根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,M大于或等于1;
    所述终端获取与所述量化参数对应的视频超分辨率网络,所述视频超分辨率网络具有超分辨率功能;
    所述终端将所述M个图像帧和所述第一图像帧输入所述视频超分辨率网络,所述视频超分辨率网络用于根据所述M个图像帧对所述第一图像帧进行超分辨率处理得到第二图像帧,所述第二图像帧的分辨率高于所述第一图像帧的分辨率。
  20. 一种终端装置,其特征在于,包括:
    获取模块,用于获取超分参考信息,所述超分参考信息包括量化参数和图像质量分数集合,所述图像质量分数集合包括多个图像帧各自的图像质量分数;根据所述图像质量分数集合从所述多个图像帧中选取M个图像帧,M大于或等于1;获取与所述量化参数对应的视频超分辨率网络,所述视频超分辨率网络具有超分辨率功能;
    处理模块,用于将所述M个图像帧和第一图像帧输入所述视频超分辨率网络,所述视频超分辨率网络用于根据所述M个图像帧对所述第一图像帧进行超分辨率处理得到第二图像帧,所述第二图像帧的分辨率高于所述第一图像帧的分辨率。
  21. 根据权利要求20所述的装置,其特征在于,所述获取模块,具体用于当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数大于或等于M时,从所述第一图像帧集合中选取所述M个图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数。
  22. 根据权利要求21所述的装置,其特征在于,所述M个图像帧包括所述第一图像帧集合中的图像帧按照图像质量分数从大到小排列后的前M个图像帧。
  23. 根据权利要求20-22中任一项所述的装置,其特征在于,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述获取模块,还用于当所述多个图像帧包括第一图像帧集合,且所述第一图像帧集合中的图像帧的个数小于M时,从所述第一图像帧集合中选取全部图像帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;当所述全部图像帧的个数小于M时,从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;当所述全部图像帧和所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述全部图像帧和所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长 的至少一个图像帧,直到选出M个图像帧。
  24. 根据权利要求20-23中任一项所述的装置,其特征在于,所述超分参考信息还包括所述第一图像帧的参考帧指示信息;所述获取模块,还用于当所述多个图像帧不包括第一图像帧集合时,判断所述第一图像帧是否为I帧,所述第一图像帧集合中包括的图像帧的图像质量分数均高于所述第一图像帧的图像质量分数;若所述第一图像帧为I帧,则所述M个图像帧包括所述第一图像帧的M个复制样本;若所述第一图像帧非I帧,则从所述多个图像帧中选取与所述参考帧指示信息对应的图像帧;当所述与所述参考帧指示信息对应的图像帧的个数小于M时,从所述多个图像帧中除所述与所述参考帧指示信息对应的图像帧外的其他图像帧中选取与所述第一图像帧间隔时间从短到长的至少一个图像帧,直到选出M个图像帧。
  25. 根据权利要求20-24中任一项所述的装置,其特征在于,所述获取模块,具体用于接收发送端发送的所述超分参考信息。
  26. 根据权利要求20-25中任一项所述的装置,其特征在于,所述量化参数包括所述发送端对所述第一图像帧进行量化处理的过程中使用的量化参数。
  27. 根据权利要求20-26中任一项所述的装置,其特征在于,所述多个图像帧包括所述视频流中的连续多个图像帧,所述多个图像帧包括所述第一图像帧。
  28. 根据权利要求20-27中任一项所述的装置,其特征在于,所述视频超分辨率网络包括卷积神经网络CNN.深度神经网络DNN或者循环神经网络RNN。
  29. 根据权利要求28所述的装置,其特征在于,所述视频超分辨率网络包括卷积层和激活层。
  30. 根据权利要求29所述的装置,其特征在于,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
  31. 一种发送端装置,其特征在于,包括:
    获取模块,用于获取第一图像帧的量化参数;根据所述第一图像帧和所述第一图像帧的重建帧获取所述第一图像帧的图像质量分数;
    发送模块,用于向终端装置发送视频流和超分参考信息,所述视频流包括所述第一图像帧,所述超分参考信息包括所述量化参数和所述图像质量分数。
  32. 根据权利要求31所述的装置,其特征在于,所述获取模块,还用于获取所述第一图像帧的参考帧指示信息;相应的,所述超分参考信息还包括所述参考帧指示信息。
  33. 根据权利要求31或32所述的装置,其特征在于,所述获取模块,具体用于根据峰值信噪比PSNR、结构相似度SSIM或多特征融合的视频评价标准VMAF获取所述第一图像帧的图像质量分数。
  34. 根据权利要求31-33中任一项所述的装置,其特征在于,所述视频超分辨率网络包括卷积神经网络CNN、深度神经网络DNN或者循环神经网络RNN。
  35. 根据权利要求34所述的装置,其特征在于,所述视频超分辨率网络包括卷积层和激活层。
  36. 根据权利要求34或35所述的装置,其特征在于,所述卷积层的深度为2、3、4、5、6、16、24、32、48、64或者128;所述卷积层中的卷积核的尺寸为1×1、3×3、5×5或者7×7。
  37. 根据权利要求34-36中任一项所述的装置,其特征在于,还包括:训练模块;
    所述获取模块,还用于获取训练数据集合,其中所述训练数据集合包括多个图像帧各自的第一分辨率图像和第二分辨率图像,以及多个量化参数,所述第一分辨率图像的分辨率高于所述第二分辨率图像的分辨率;
    所述训练模块,用于根据所述训练数据集合训练得到多个视频超分辨率网络,所述多个视频超分辨率网络与所述多个量化参数对应。
  38. 一种图像处理系统,其特征在于,包括:发送端装置和终端装置,其中,所述发送端装置采用权利要求31-37中任一项所述的装置,所述终端装置采用权利要求20-30中任一项所述的装置。
  39. 一种终端,其特征在于,包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-11中任一项所述的方法,或者实现如权利要求19中由终端执行的方法。
  40. 一种发送端,其特征在于,包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求12-18中任一项所述的方法,或者实现如权利要求19中由发送端执行的方法。
  41. 一种计算机可读存储介质,其特征在于,包括计算机程序,所述计算机程序在计算机上被执行时,使得所述计算机执行权利要求1-19中任一项所述的方法。
PCT/CN2021/105235 2020-07-10 2021-07-08 图像帧的超分辨率实现方法和装置 WO2022007895A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/151,588 US20230162323A1 (en) 2020-07-10 2023-01-09 Image frame super-resolution implementation method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010664759.5A CN113920010A (zh) 2020-07-10 2020-07-10 图像帧的超分辨率实现方法和装置
CN202010664759.5 2020-07-10

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/151,588 Continuation US20230162323A1 (en) 2020-07-10 2023-01-09 Image frame super-resolution implementation method and apparatus

Publications (1)

Publication Number Publication Date
WO2022007895A1 true WO2022007895A1 (zh) 2022-01-13

Family

ID=79232289

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/105235 WO2022007895A1 (zh) 2020-07-10 2021-07-08 图像帧的超分辨率实现方法和装置

Country Status (3)

Country Link
US (1) US20230162323A1 (zh)
CN (1) CN113920010A (zh)
WO (1) WO2022007895A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023133889A1 (zh) * 2022-01-17 2023-07-20 深圳市大疆创新科技有限公司 图像处理方法、装置、遥控设备、系统及存储介质
CN114650449A (zh) * 2022-03-03 2022-06-21 京东科技信息技术有限公司 一种视频数据处理方法和装置
CN116797462B (zh) * 2023-08-18 2023-10-24 深圳市优森美科技开发有限公司 基于深度学习的实时视频超分辨率重建方法
CN117061824B (zh) * 2023-10-12 2024-01-26 深圳云天畅想信息科技有限公司 流媒体视频补帧方法、装置及计算机设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015127847A1 (zh) * 2014-02-25 2015-09-03 清华大学深圳研究生院 一种深度图的超分辨率处理方法
CN108307193A (zh) * 2018-02-08 2018-07-20 北京航空航天大学 一种有损压缩视频的多帧质量增强方法及装置
CN109671023A (zh) * 2019-01-24 2019-04-23 江苏大学 一种人脸图像超分辨率二次重建方法
CN110099280A (zh) * 2019-05-24 2019-08-06 浙江大学 一种无线自组织网络带宽受限下的视频业务质量增强方法
CN110458756A (zh) * 2019-06-25 2019-11-15 中南大学 基于深度学习的模糊视频超分辨率方法及系统
CN110636312A (zh) * 2019-09-27 2019-12-31 腾讯科技(深圳)有限公司 视频编解码方法和装置及存储介质
CN110875906A (zh) * 2018-08-31 2020-03-10 中兴通讯股份有限公司 一种图像恢复方法及编码端

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015127847A1 (zh) * 2014-02-25 2015-09-03 清华大学深圳研究生院 一种深度图的超分辨率处理方法
CN108307193A (zh) * 2018-02-08 2018-07-20 北京航空航天大学 一种有损压缩视频的多帧质量增强方法及装置
CN110875906A (zh) * 2018-08-31 2020-03-10 中兴通讯股份有限公司 一种图像恢复方法及编码端
CN109671023A (zh) * 2019-01-24 2019-04-23 江苏大学 一种人脸图像超分辨率二次重建方法
CN110099280A (zh) * 2019-05-24 2019-08-06 浙江大学 一种无线自组织网络带宽受限下的视频业务质量增强方法
CN110458756A (zh) * 2019-06-25 2019-11-15 中南大学 基于深度学习的模糊视频超分辨率方法及系统
CN110636312A (zh) * 2019-09-27 2019-12-31 腾讯科技(深圳)有限公司 视频编解码方法和装置及存储介质

Also Published As

Publication number Publication date
CN113920010A (zh) 2022-01-11
US20230162323A1 (en) 2023-05-25

Similar Documents

Publication Publication Date Title
WO2022007895A1 (zh) 图像帧的超分辨率实现方法和装置
WO2021135707A1 (zh) 机器学习模型的搜索方法及相关装置、设备
CN111669515B (zh) 一种视频生成方法及相关装置
WO2022141418A1 (zh) 一种图像处理方法以及装置
CN103460250A (zh) 基于感兴趣对象的图像处理
CN113099146B (zh) 一种视频生成方法、装置及相关设备
WO2022141445A1 (zh) 一种图像处理方法以及装置
WO2022141477A1 (zh) 一种图像处理方法以及装置
WO2021077878A1 (zh) 图像处理方法、装置及电子设备
CN113705823A (zh) 基于联邦学习的模型训练方法和电子设备
CN111741303B (zh) 深度视频处理方法、装置、存储介质与电子设备
CN114710640A (zh) 基于虚拟形象的视频通话方法、装置和终端
CN112954251B (zh) 视频处理方法、视频处理装置、存储介质与电子设备
WO2022141333A1 (zh) 一种图像处理方法以及装置
CN114242037A (zh) 一种虚拟人物生成方法及其装置
WO2022141351A1 (zh) 一种视觉传感器芯片、操作视觉传感器芯片的方法以及设备
CN112580400A (zh) 图像选优方法及电子设备
CN113709464A (zh) 视频编码方法及相关设备
CN113052056A (zh) 一种视频处理的方法以及装置
CN112308202A (zh) 一种确定卷积神经网络的决策因素的方法及电子设备
WO2021233259A1 (zh) 一种评估女性情绪的方法及相关装置、设备
CN115546248A (zh) 事件数据处理方法、装置和系统
CN113923351A (zh) 多路视频拍摄的退出方法、设备、存储介质和程序产品
CN113473216A (zh) 数据传输方法、芯片系统及相关装置
WO2022156654A1 (zh) 一种文本数据处理方法及装置

Legal Events

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

Ref document number: 21837450

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21837450

Country of ref document: EP

Kind code of ref document: A1