[go: up one dir, main page]

CN111612105A - Image prediction method, apparatus, computer equipment and storage medium - Google Patents

Image prediction method, apparatus, computer equipment and storage medium Download PDF

Info

Publication number
CN111612105A
CN111612105A CN202010619576.1A CN202010619576A CN111612105A CN 111612105 A CN111612105 A CN 111612105A CN 202010619576 A CN202010619576 A CN 202010619576A CN 111612105 A CN111612105 A CN 111612105A
Authority
CN
China
Prior art keywords
image
prediction model
sequence
image sequence
sample
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010619576.1A
Other languages
Chinese (zh)
Inventor
周康明
姚广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Eye Control Technology Co Ltd
Original Assignee
Shanghai Eye Control Technology Co Ltd
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 Shanghai Eye Control Technology Co Ltd filed Critical Shanghai Eye Control Technology Co Ltd
Priority to CN202010619576.1A priority Critical patent/CN111612105A/en
Publication of CN111612105A publication Critical patent/CN111612105A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)

Abstract

本申请涉及一种图像预测方法、装置、计算机设备和存储介质。所述方法包括:获取待测图像序列;待测图像序列中包括至少两个待测图像;将待测图像序列输入预设的图像预测模型,得到预测图像序列;其中,图像预测模型为根据预设的损失函数训练得到的,预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。采用本方法能够通过调整图像预测模型的损失函数各子函数的权重,得到比较准确地损失函数对预设的图像预测模型进行准确地训练,提高了得到的图像预测模型的准确度,进而可以根据得到的准确度较高的图像预测模型,得到准确地预测图像序列,从而提高了得到的预测图像序列的一致性。

Figure 202010619576

The present application relates to an image prediction method, apparatus, computer equipment and storage medium. The method includes: acquiring a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested; inputting the sequence of images to be tested into a preset image prediction model to obtain a predicted image sequence; wherein, the image prediction model is based on the prediction method. The preset loss function is obtained by training, and the preset loss function is obtained by adjusting the weight of each sub-function according to the image loss value between the standard image sequence and the sample prediction image sequence. By using this method, a relatively accurate loss function can be obtained by adjusting the weights of the sub-functions of the loss function of the image prediction model, and the preset image prediction model can be accurately trained, which improves the accuracy of the obtained image prediction model, and can be used according to The obtained image prediction model with higher accuracy can obtain an accurately predicted image sequence, thereby improving the consistency of the obtained predicted image sequence.

Figure 202010619576

Description

图像预测方法、装置、计算机设备和存储介质Image prediction method, apparatus, computer equipment and storage medium

技术领域technical field

本申请涉及图像预测技术领域,特别是涉及一种图像预测方法、装置、计算机设备和存储介质。The present application relates to the technical field of image prediction, and in particular, to an image prediction method, apparatus, computer equipment and storage medium.

背景技术Background technique

随着机器学习技术的发展,机器学习在各行各业的应用方面取得了很大的进步,其中基于大数据的深度学习是机器学习领域中的一个新的方向。With the development of machine learning technology, great progress has been made in the application of machine learning in all walks of life, among which deep learning based on big data is a new direction in the field of machine learning.

深度学习中的循环神经网络是一类以序列数据为输入,在序列的演进方向进行递归且所有节点按链式连接的递归神经网络。循环神经网络具有记忆性、参数共享并且图灵完备,因此在对序列的非线性特征进行学习时具有一定的优势,在一些图片序列预测的任务中有着非常亮眼的表现。The recurrent neural network in deep learning is a type of recurrent neural network that takes sequence data as input, performs recursion in the evolution direction of the sequence, and connects all nodes in a chain. Recurrent neural network has memory, parameter sharing and Turing completeness, so it has certain advantages in learning the nonlinear characteristics of sequences, and has a very bright performance in some image sequence prediction tasks.

但是,循环神经网络在处理这些序列生成任务时,存在生成的图像序列一致性较差的问题。However, when dealing with these sequence generation tasks, the recurrent neural network has the problem of poor consistency of the generated image sequences.

发明内容SUMMARY OF THE INVENTION

基于此,有必要针对上述技术问题,提供一种能够提高生成的图像序列一致性的图像预测方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide an image prediction method, apparatus, computer equipment and storage medium that can improve the consistency of the generated image sequence in response to the above technical problems.

一种图像预测方法,所述方法包括:An image prediction method, the method comprising:

获取待测图像序列;所述待测图像序列中包括至少两个待测图像;acquiring a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested;

将所述待测图像序列输入预设的图像预测模型,得到预测图像序列;其中,所述图像预测模型为根据预设的损失函数训练得到的,所述预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。Input the image sequence to be tested into a preset image prediction model to obtain a predicted image sequence; wherein, the image prediction model is obtained by training according to a preset loss function, and the preset loss function is based on a standard image sequence The image loss value between the sample prediction image sequence and the weight of each sub-function is adjusted.

在其中一个实施例中,所述图像预测模型的训练方法包括:In one embodiment, the training method of the image prediction model includes:

将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列;Input the sample image sequence into the preset image prediction model to be trained to obtain the sample prediction image sequence;

根据标准图像序列和所述样本预测图像序列之间的图像损失值,调整所述待训练图像预测模型的损失函数中各子函数的权重;Adjust the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence;

并根据调整后的损失函数的值对所述待训练图像预测模型进行训练,得到所述图像预测模型。The image prediction model to be trained is trained according to the adjusted value of the loss function to obtain the image prediction model.

在其中一个实施例中,所述根据调整后的损失函数的值对所述待训练图像预测模型进行训练,得到所述图像预测模型,包括:In one embodiment, the image prediction model to be trained is trained according to the value of the adjusted loss function to obtain the image prediction model, including:

根据所述调整后的损失函数的值,对所述待训练图像预测模型的参数进行调整,得到新的待训练图像预测模型;According to the value of the adjusted loss function, the parameters of the image prediction model to be trained are adjusted to obtain a new image prediction model to be trained;

将所述新的待训练图像预测模型作为预设的待训练图像预测模型,并返回执行所述将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列的步骤,直至达到预设的收敛条件时得到所述图像预测模型。Taking the new image prediction model to be trained as the preset image prediction model to be trained, and returning to the step of inputting the sample image sequence into the preset image prediction model to be trained to obtain the sample prediction image sequence, until the preset image sequence is obtained. The image prediction model is obtained when the set convergence conditions are met.

在其中一个实施例中,所述预设的收敛条件包括所述调整后的损失函数的值达到稳定值或达到预设的迭代次数。In one embodiment, the preset convergence condition includes that the value of the adjusted loss function reaches a stable value or reaches a preset number of iterations.

在其中一个实施例中,所述根据标准图像序列和所述样本预测图像序列之间的图像损失值,调整所述待训练图像预测模型的损失函数中各子函数的权重,包括:In one embodiment, according to the image loss value between the standard image sequence and the sample prediction image sequence, adjusting the weight of each sub-function in the loss function of the image prediction model to be trained includes:

获取所述样本预测图像序列中每个样本预测图像与对应的标准预测图像之间的图像损失值;Obtain the image loss value between each sample predicted image and the corresponding standard predicted image in the sample predicted image sequence;

根据所述每个样本预测图像与对应的标准预测图像之间的图像损失值,调整所述损失函数中对应子函数的权重。According to the image loss value between the predicted image of each sample and the corresponding standard predicted image, the weight of the corresponding sub-function in the loss function is adjusted.

在其中一个实施例中,所述图像损失值越大,对应的子函数的权重越大。In one of the embodiments, the larger the image loss value is, the larger the weight of the corresponding sub-function is.

一种图像预测模型的训练方法,所述方法包括:A training method for an image prediction model, the method comprising:

将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列;Input the sample image sequence into the preset image prediction model to be trained to obtain the sample prediction image sequence;

根据标准图像序列和所述样本预测图像序列之间的图像损失值,调整所述待训练图像预测模型的损失函数中各子函数的权重;Adjust the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence;

根据调整后的损失函数的值对所述待训练图像预测模型进行训练,得到所述图像预测模型。The image prediction model to be trained is trained according to the value of the adjusted loss function to obtain the image prediction model.

一种图像预测装置,所述装置包括:An image prediction apparatus, the apparatus includes:

第一获取模块,用于获取待测图像序列;所述待测图像序列中包括至少两个待测图像;a first acquisition module, configured to acquire a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested;

预测模块,用于将所述待测图像序列输入预设的图像预测模型,得到预测图像序列;其中,所述图像预测模型为根据预设的损失函数训练得到的,所述预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。a prediction module, configured to input the image sequence to be tested into a preset image prediction model to obtain a predicted image sequence; wherein, the image prediction model is obtained by training according to a preset loss function, and the preset loss function It is obtained by adjusting the weight of each sub-function to predict the image loss value between the standard image sequence and the sample image sequence.

一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

获取待测图像序列;所述待测图像序列中包括至少两个待测图像;acquiring a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested;

将所述待测图像序列输入预设的图像预测模型,得到预测图像序列;其中,所述图像预测模型为根据预设的损失函数训练得到的,所述预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。Input the image sequence to be tested into a preset image prediction model to obtain a predicted image sequence; wherein, the image prediction model is obtained by training according to a preset loss function, and the preset loss function is based on a standard image sequence The image loss value between the sample prediction image sequence and the weight of each sub-function is adjusted.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

获取待测图像序列;所述待测图像序列中包括至少两个待测图像;acquiring a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested;

将所述待测图像序列输入预设的图像预测模型,得到预测图像序列;其中,所述图像预测模型为根据预设的损失函数训练得到的,所述预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。Input the image sequence to be tested into a preset image prediction model to obtain a predicted image sequence; wherein, the image prediction model is obtained by training according to a preset loss function, and the preset loss function is based on a standard image sequence The image loss value between the sample prediction image sequence and the weight of each sub-function is adjusted.

上述图像预测方法、装置、计算机设备和存储介质,通过调整图像预测模型的损失函数各子函数的权重,能够得到比较准确地损失函数,这样可以根据得到的损失函数对预设的图像预测模型进行准确地训练,提高了得到的图像预测模型的准确度,进而可以根据得到的准确度较高的图像预测模型,得到准确地预测图像序列,从而提高了得到的预测图像序列的一致性。The above image prediction method, device, computer equipment and storage medium can obtain a relatively accurate loss function by adjusting the weight of each sub-function of the loss function of the image prediction model, so that the preset image prediction model can be performed according to the obtained loss function. Accurate training improves the accuracy of the obtained image prediction model, and then an accurately predicted image sequence can be obtained according to the obtained image prediction model with higher accuracy, thereby improving the consistency of the obtained predicted image sequence.

附图说明Description of drawings

图1为一个实施例提供的计算机设备的内部结构示意图;1 is a schematic diagram of the internal structure of a computer device provided by an embodiment;

图2为一个实施例提供的图像预测方法的流程示意图;2 is a schematic flowchart of an image prediction method provided by an embodiment;

图3为另一个实施例提供的图像预测方法的流程示意图;3 is a schematic flowchart of an image prediction method provided by another embodiment;

图4为一个实施例提供的图像预测模型的训练方法的流程示意图;4 is a schematic flowchart of a training method for an image prediction model provided by an embodiment;

图5为一个实施例提供的图像预测方法的流程示意图;5 is a schematic flowchart of an image prediction method provided by an embodiment;

图6为一个实施例提供的图像预测装置结构示意图;6 is a schematic structural diagram of an image prediction apparatus provided by an embodiment;

图7为一个实施例提供的图像预测模型的训练装置结构示意图。FIG. 7 is a schematic structural diagram of an apparatus for training an image prediction model according to an embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

本申请实施例提供的图像预测方法,可以适用于如图1所示的计算机设备。该计算机设备包括通过系统总线连接的处理器、存储器,该存储器中存储有计算机程序,处理器执行该计算机程序时可以执行下述方法实施例的步骤。可选的,该计算机设备还可以包括网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器,该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。可选的,该计算机设备可以是服务器,可以是个人计算机,还可以是个人数字助理,还可以是其他的终端设备,例如平板电脑、手机等等,还可以是云端或者远程服务器,本申请实施例对计算机设备的具体形式并不做限定。The image prediction method provided in the embodiment of the present application can be applied to the computer device as shown in FIG. 1 . The computer device includes a processor and a memory connected through a system bus, where a computer program is stored in the memory, and the processor can execute the steps of the following method embodiments when the processor executes the computer program. Optionally, the computer equipment may further include a network interface, a display screen and an input device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium storing an operating system and a computer program, and an internal memory. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. Optionally, the computer device may be a server, a personal computer, a personal digital assistant, or other terminal devices, such as a tablet computer, a mobile phone, etc., or a cloud or a remote server, which is implemented in this application. The example does not limit the specific form of the computer equipment.

在一个实施例中,如图2所示,提供了一种图像预测方法,以该方法应用于图1中的计算机设备为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2, an image prediction method is provided, and the method is applied to the computer device in FIG. 1 as an example for description, including the following steps:

S201,获取待测图像序列;待测图像序列中包括至少两个待测图像。S201 , acquiring a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested.

其中,待测图像序列是由一组连续的待测图片组成的,包括至少两个待测图像。具体地,计算机设备获取包括至少两个待测图像的待测图像序列。可选的,计算机设备可以对一段视频进行帧提取得到待测图像序列,也可以通过摄像设备拍摄一组连续的待测图片,得到待测图像序列。Wherein, the image sequence to be tested is composed of a group of continuous images to be tested, including at least two images to be tested. Specifically, the computer device acquires a sequence of images to be tested including at least two images to be tested. Optionally, the computer equipment can perform frame extraction on a video to obtain the image sequence to be tested, or a set of continuous images to be tested can be captured by a camera device to obtain the image sequence to be tested.

S202,将待测图像序列输入预设的图像预测模型,得到预测图像序列。其中,图像预测模型为根据预设的损失函数训练得到的,预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。S202: Input the image sequence to be tested into a preset image prediction model to obtain a predicted image sequence. The image prediction model is obtained by training according to a preset loss function, and the preset loss function is obtained by adjusting the weight of each sub-function according to the image loss value between the standard image sequence and the sample predicted image sequence.

具体地,计算机设备将上述获取的待测图像序列输入预设的图像预测模型,得到预测图像序列。其中,图像预测模型为根据预设的损失函数训练得到的,预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整该损失函数的各子函数的权重后的得到的。可选的,图像预测模型可以为循环神经网络模型。示例性地,假设待测图像序列为(K1,K2,…,K10),预测图像序列为(T1,T2,…,T10),则该图像预测模型的预设的损失函数为

Figure BDA0002564731550000051
式中,L表示该图像预测模型的预设的损失函数,Li表示该损失函数的各子函数,Wi表示该损失函数的各子函数的权重,计算机设备根据得到的预设的损失函数的值对初始图像预测模型进行训练,从而得到该图像预测模型。Specifically, the computer device inputs the acquired image sequence to be tested into a preset image prediction model to obtain a predicted image sequence. The image prediction model is obtained by training according to a preset loss function, and the preset loss function is the image loss value between the standard image sequence and the sample prediction image sequence, after adjusting the weight of each sub-function of the loss function. owned. Optionally, the image prediction model can be a recurrent neural network model. Exemplarily, assuming that the image sequence to be tested is (K1, K2,..., K10) and the predicted image sequence is (T1, T2,..., T10), then the preset loss function of the image prediction model is
Figure BDA0002564731550000051
In the formula, L represents the preset loss function of the image prediction model, Li represents each sub-function of the loss function, Wi represents the weight of each sub-function of the loss function, and the computer equipment obtains the preset loss function according to The value of , trains the initial image prediction model to obtain the image prediction model.

在本实施例中,通过调整图像预测模型的损失函数各子函数的权重,能够得到比较准确地损失函数,这样可以根据得到的损失函数对预设的图像预测模型进行准确地训练,提高了得到的图像预测模型的准确度,进而可以根据得到的准确度较高的图像预测模型,得到准确地预测图像序列,从而提高了得到的预测图像序列的一致性。In this embodiment, by adjusting the weights of the sub-functions of the loss function of the image prediction model, a relatively accurate loss function can be obtained, so that the preset image prediction model can be accurately trained according to the obtained loss function, and the result is improved. The accuracy of the obtained image prediction model can then be used to obtain an accurately predicted image sequence according to the obtained image prediction model with higher accuracy, thereby improving the consistency of the obtained predicted image sequence.

在一个实施例中,如图3所示,在上述实施例的基础上,作为一种可选的实施方式,上述图像预测模型的训练方法,包括:In one embodiment, as shown in FIG. 3 , on the basis of the foregoing embodiment, as an optional implementation manner, the training method of the foregoing image prediction model includes:

S301,将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列。S301, input the sample image sequence into a preset image prediction model to be trained to obtain the sample prediction image sequence.

具体地,计算机设备将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列。可选的,预设的待训练图像预测模型可以为循环神经网络模型。示例性地,假设将样本图像序列为前10帧图像表示为(S1,S2,…,S10),则可以将待预测的后10帧图像表示为(H1,H2,…,H10),那么计算机设备可以将样本图像序列(S1,S2,…,S10)输入预设的待训练图像预测模型,得到样本预测图像序列(H1,H2,…,H10)。Specifically, the computer device inputs the sample image sequence into a preset image prediction model to be trained, and obtains the sample prediction image sequence. Optionally, the preset image prediction model to be trained may be a recurrent neural network model. Exemplarily, assuming that the sample image sequence is represented as the first 10 frames of images as (S1, S2, ..., S10), the next 10 frames of images to be predicted can be represented as (H1, H2, ..., H10), then the computer The device can input the sample image sequence (S1, S2, ..., S10) into the preset image prediction model to be trained, and obtain the sample predicted image sequence (H1, H2, ..., H10).

S302,根据标准图像序列和样本预测图像序列之间的图像损失值,调整待训练图像预测模型的损失函数中各子函数的权重。S302, according to the image loss value between the standard image sequence and the sample prediction image sequence, adjust the weight of each sub-function in the loss function of the image prediction model to be trained.

具体地,计算机设备根据标准图像序列和样本预测图像序列之间的图像损失值,调整待训练图像预测模型的损失函数中各子函数的权重。可选的,计算机设备可以获取样本预测图像序列中每个样本预测图像与对应的标准预测图像之间的图像损失值,根据样本预测图像序列中每个样本预测图像与对应的标准预测图像之间的图像损失值,调整该待训练图像预测模型的损失函数中对应子函数的权重。Specifically, the computer device adjusts the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence. Optionally, the computer device can obtain the image loss value between each sample predicted image in the sample predicted image sequence and the corresponding standard predicted image, and based on the difference between each sample predicted image in the sample predicted image sequence and the corresponding standard predicted image. , adjust the weight of the corresponding sub-function in the loss function of the image prediction model to be trained.

S303,根据调整后的损失函数的值对待训练图像预测模型进行训练,得到图像预测模型。S303 , train the image prediction model to be trained according to the value of the adjusted loss function to obtain an image prediction model.

具体地,计算机设备根据待训练图像预测模型的调整后的损失函数的值,对待训练图像预测模型进行训练,得到上述图像预测模型。可选的,计算机设备可以根据调整后的损失函数的值,对待训练图像预测模型的参数进行调整,得到新的待训练图像预测模型,然后将新的待训练图像预测模型作为预设的待训练图像预测模型,并返回执行将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列的步骤,直至达到预设的收敛条件时得到上述图像预测模型。可选的,预设的收敛条件可以包括待训练图像预测模型调整后的损失函数的值达到稳定值或达到预设的迭代次数,示例性地,预设的迭代次数可以为10次,或者20次等。示例性地,计算机设备可以根据待训练图像预测模型调整后的损失函数的值,对待训练图像预测模型的参数进行调整,得到新的待训练图像预测模型,然后再将样本图像序列输入新的待训练图像预测模型,得到新的样本预测图像序列,根据标准图像序列和新的样本预测图像序列之间的图像损失值,调整待训练图像预测模型的损失函数中各子函数的权重,并根据调整后的损失函数的值对新的待训练图像预测模型进行训练,重复执行此步骤,直至达到预设的收敛条件时得到图像预测模型。Specifically, the computer device trains the image prediction model to be trained according to the value of the adjusted loss function of the image prediction model to be trained, to obtain the above image prediction model. Optionally, the computer device can adjust the parameters of the image prediction model to be trained according to the value of the adjusted loss function to obtain a new image prediction model to be trained, and then use the new image prediction model to be trained as the preset to be trained. The image prediction model is returned, and the step of inputting the sample image sequence into the preset image prediction model to be trained to obtain the sample prediction image sequence is performed, and the above image prediction model is obtained when the preset convergence condition is reached. Optionally, the preset convergence condition may include that the value of the loss function after the adjustment of the image prediction model to be trained reaches a stable value or reaches a preset number of iterations, for example, the preset number of iterations may be 10 times, or 20 times. inferior. Exemplarily, the computer device can adjust the parameters of the image prediction model to be trained according to the value of the loss function adjusted by the image prediction model to be trained, obtain a new image prediction model to be trained, and then input the sample image sequence into the new image prediction model to be trained. Train the image prediction model, obtain a new sample prediction image sequence, predict the image loss value between the standard image sequence and the new sample image sequence, adjust the weight of each sub-function in the loss function of the image prediction model to be trained, and adjust according to the The new image prediction model to be trained is trained with the value of the lost loss function, and this step is repeated until the image prediction model is obtained when a preset convergence condition is reached.

在本实施例中,计算机设备将样本图像序列输入预设的待训练图像预测模型,能够得到样本预测图像序列,这样可以准确地得到标准图像序列和样本预测图像序列之间的图像损失值,进而可以根据标准图像序列和样本预测图像序列之间的图像损失值,准确地调整待训练图像预测模型的损失函数中各子函数的权重,并根据调整后的损失函数的值对待训练图像预测模型进行准确地训练,提高了得到的图像预测模型的准确度,进而可以根据得到的准确度较高的图像预测模型,得到准确地预测图像序列,从而提高了得到的预测图像序列的一致性。In this embodiment, the computer device inputs the sample image sequence into the preset image prediction model to be trained, and can obtain the sample prediction image sequence, so that the image loss value between the standard image sequence and the sample prediction image sequence can be accurately obtained, and then According to the image loss value between the standard image sequence and the sample prediction image sequence, the weight of each sub-function in the loss function of the image prediction model to be trained can be accurately adjusted, and the image prediction model to be trained can be adjusted according to the value of the adjusted loss function. Accurate training improves the accuracy of the obtained image prediction model, and then an accurately predicted image sequence can be obtained according to the obtained image prediction model with higher accuracy, thereby improving the consistency of the obtained predicted image sequence.

在上述根据每个样本预测图像与对应的标准预测图像之间的图像损失值,调整损失函数中对应子函数的权重的场景中,在上述实施例的基础上,作为一种可选的实施方式,图像损失值越大,对应的子函数的权重越大。In the above scenario of adjusting the weight of the corresponding sub-function in the loss function according to the image loss value between each sample predicted image and the corresponding standard predicted image, on the basis of the above embodiment, as an optional implementation , the greater the image loss value, the greater the weight of the corresponding sub-function.

具体地,计算机设备根据得到的每个样本预测图像与对应的标准预测图像之间的图像损失值,将较大的图像损失值对应的子函数的权重调大,将较小的图像损失值对应的子函数的权重调小。可选的,计算机设备可以将较大的图像损失值对应的子函数的权重调整的大于1,将较小的图像损失值对应的子函数的权重调整的小于1。Specifically, according to the obtained image loss value between each sample predicted image and the corresponding standard predicted image, the computer device increases the weight of the sub-function corresponding to the larger image loss value, and the smaller image loss value corresponds to the weight of the sub-function. The weights of the sub-functions are adjusted down. Optionally, the computer device may adjust the weight of the sub-function corresponding to the larger image loss value to be greater than 1, and adjust the weight of the sub-function corresponding to the smaller image loss value to be smaller than 1.

在本实施例中,图像损失值越大,对应的子函数的权重越大,这样可以根据调整后的子函数的权重适应地调整待训练图像预测模型的损失函数的值,这样可以根据待训练图像预测模型的损失函数的值,对待训练图像预测模型的参数进行适应地调整,使待训练图像预测模型更多地关注图像损失值比较大的地方,从而使调整参数后的待训练图像预测模型能够准确地得到样本预测图像序列。In this embodiment, the larger the image loss value is, the larger the weight of the corresponding sub-function is, so that the value of the loss function of the image prediction model to be trained can be adaptively adjusted according to the weight of the adjusted sub-function. The value of the loss function of the image prediction model is adjusted adaptively to the parameters of the image prediction model to be trained, so that the image prediction model to be trained pays more attention to the places where the image loss value is relatively large, so that the image prediction model to be trained after adjusting the parameters is adjusted. The sample prediction image sequence can be obtained accurately.

在一个实施例中,如图4所示,提供了一种图像预测模型的训练方法,以该方法应用于图1中的计算机设备为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 4 , a training method for an image prediction model is provided, and the method is applied to the computer device in FIG. 1 as an example to illustrate, including the following steps:

S401,将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列。S401: Input the sample image sequence into a preset image prediction model to be trained to obtain a sample prediction image sequence.

具体地,计算机设备将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列。可选的,预设的待训练图像预测模型可以为循环神经网络模型。示例性地,假设将样本图像序列为前10帧图像表示为(S1,S2,…,S10),则可以将待预测的后10帧图像表示为(H1,H2,…,H10),那么计算机设备可以将样本图像序列(S1,S2,…,S10)输入预设的待训练图像预测模型,得到样本预测图像序列(H1,H2,…,H10)。Specifically, the computer device inputs the sample image sequence into a preset image prediction model to be trained, and obtains the sample prediction image sequence. Optionally, the preset image prediction model to be trained may be a recurrent neural network model. Exemplarily, assuming that the sample image sequence is represented as the first 10 frames of images as (S1, S2, ..., S10), the next 10 frames of images to be predicted can be represented as (H1, H2, ..., H10), then the computer The device can input the sample image sequence (S1, S2, ..., S10) into the preset image prediction model to be trained, and obtain the sample predicted image sequence (H1, H2, ..., H10).

S402,根据标准图像序列和样本预测图像序列之间的图像损失值,调整待训练图像预测模型的损失函数中各子函数的权重。S402, according to the image loss value between the standard image sequence and the sample prediction image sequence, adjust the weight of each sub-function in the loss function of the image prediction model to be trained.

具体地,计算机设备根据标准图像序列和样本预测图像序列之间的图像损失值,调整待训练图像预测模型的损失函数中各子函数的权重。可选的,计算机设备可以获取样本预测图像序列中每个样本预测图像与对应的标准预测图像之间的图像损失值,根据样本预测图像序列中每个样本预测图像与对应的标准预测图像之间的图像损失值,调整该待训练图像预测模型的损失函数中对应子函数的权重。可选的,图像损失值越大,对应的子函数的权重越大。Specifically, the computer device adjusts the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence. Optionally, the computer device can obtain the image loss value between each sample predicted image in the sample predicted image sequence and the corresponding standard predicted image, and based on the difference between each sample predicted image in the sample predicted image sequence and the corresponding standard predicted image. , adjust the weight of the corresponding sub-function in the loss function of the image prediction model to be trained. Optionally, the larger the image loss value, the larger the weight of the corresponding sub-function.

S403,根据调整后的损失函数的值对待训练图像预测模型进行训练,得到图像预测模型。S403 , train the image prediction model to be trained according to the value of the adjusted loss function to obtain an image prediction model.

具体地,计算机设备根据调整后的损失函数的值对待训练图像预测模型进行训练,直至调整后的损失函数的值达到稳定值或达到预设的迭代次数,得到图像预测模型。可选的,计算机设备可以根据待训练图像预测模型调整后的损失函数的值,对待训练图像预测模型的参数进行调整,得到新的待训练图像预测模型,然后再将样本图像序列输入新的待训练图像预测模型,得到新的样本预测图像序列,根据标准图像序列和新的样本预测图像序列之间的图像损失值,调整待训练图像预测模型的损失函数中各子函数的权重,并根据调整后的损失函数的值对新的待训练图像预测模型进行训练,重复执行此步骤,直至调整后的损失函数的值达到稳定值或达到预设的迭代次数时得到图像预测模型。Specifically, the computer device trains the image prediction model to be trained according to the value of the adjusted loss function, until the value of the adjusted loss function reaches a stable value or reaches a preset number of iterations to obtain the image prediction model. Optionally, the computer device can adjust the parameters of the image prediction model to be trained according to the value of the loss function adjusted by the image prediction model to be trained, obtain a new image prediction model to be trained, and then input the sample image sequence into the new image prediction model to be trained. Train the image prediction model, obtain a new sample prediction image sequence, predict the image loss value between the standard image sequence and the new sample image sequence, adjust the weight of each sub-function in the loss function of the image prediction model to be trained, and adjust according to the The new image prediction model to be trained is trained with the value of the lost loss function, and this step is repeated until the value of the adjusted loss function reaches a stable value or reaches a preset number of iterations to obtain the image prediction model.

在本实施例中,计算机设备将样本图像序列输入预设的待训练图像预测模型,能够得到样本预测图像序列,这样可以准确地得到标准图像序列和样本预测图像序列之间的图像损失值,进而可以根据标准图像序列和样本预测图像序列之间的图像损失值,准确地调整待训练图像预测模型的损失函数中各子函数的权重,并根据调整后的损失函数的值对待训练图像预测模型进行准确地训练,提高了得到的图像预测模型的准确度,进而可以根据得到的准确度较高的图像预测模型,得到准确地预测图像序列,从而提高了得到的预测图像序列的一致性。In this embodiment, the computer device inputs the sample image sequence into the preset image prediction model to be trained, and can obtain the sample prediction image sequence, so that the image loss value between the standard image sequence and the sample prediction image sequence can be accurately obtained, and then According to the image loss value between the standard image sequence and the sample prediction image sequence, the weight of each sub-function in the loss function of the image prediction model to be trained can be accurately adjusted, and the image prediction model to be trained can be adjusted according to the value of the adjusted loss function. Accurate training improves the accuracy of the obtained image prediction model, and then an accurately predicted image sequence can be obtained according to the obtained image prediction model with higher accuracy, thereby improving the consistency of the obtained predicted image sequence.

为了便于本领域技术人员的理解,以下对本申请提供的图像预测方法进行详细介绍,如图5所示,该方法可以包括:In order to facilitate the understanding of those skilled in the art, the following describes the image prediction method provided by the present application in detail. As shown in FIG. 5 , the method may include:

S501,将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列;S501, input the sample image sequence into a preset image prediction model to be trained to obtain the sample prediction image sequence;

S502,获取样本预测图像序列中每个样本预测图像与对应的标准预测图像之间的图像损失值;S502, obtaining the image loss value between each sample predicted image and the corresponding standard predicted image in the sample predicted image sequence;

S503,根据每个样本预测图像与对应的标准预测图像之间的图像损失值,调整损失函数中对应子函数的权重;S503, according to the image loss value between each sample predicted image and the corresponding standard predicted image, adjust the weight of the corresponding sub-function in the loss function;

S504,根据调整后的损失函数的值,对待训练图像预测模型的参数进行调整,得到新的待训练图像预测模型;S504, according to the value of the adjusted loss function, adjust the parameters of the image prediction model to be trained to obtain a new image prediction model to be trained;

S505,将新的待训练图像预测模型作为预设的待训练图像预测模型,并返回执行将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列的步骤,直至达到预设的收敛条件时得到图像预测模型;预设的收敛条件包括调整后的损失函数的值达到稳定值或达到预设的迭代次数;S505, take the new image prediction model to be trained as the preset image prediction model to be trained, and return to the step of inputting the sample image sequence into the preset image prediction model to be trained to obtain the sample prediction image sequence, until the preset image prediction model is reached The image prediction model is obtained when the convergence conditions are met; the preset convergence conditions include that the value of the adjusted loss function reaches a stable value or reaches a preset number of iterations;

S506,获取待测图像序列;待测图像序列中包括至少两个待测图像;S506, obtain a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested;

S507,将待测图像序列输入上述图像预测模型,得到预测图像序列。S507: Input the image sequence to be tested into the image prediction model to obtain a predicted image sequence.

需要说明的是,针对上述S501-S509中的描述可以参见上述实施例中相关的描述,且其效果类似,本实施例在此不再赘述。It should be noted that, for the descriptions in the foregoing S501-S509, reference may be made to the relevant descriptions in the foregoing embodiments, and the effects thereof are similar, and details are not described herein again in this embodiment.

应该理解的是,虽然图2-5的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-5中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2-5 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 2-5 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.

在一个实施例中,如图6所示,提供了一种图像预测装置,包括:第一获取模块和预测模块,其中:In one embodiment, as shown in FIG. 6, an image prediction apparatus is provided, including: a first acquisition module and a prediction module, wherein:

第一获取模块,用于获取待测图像序列;所述待测图像序列中包括至少两个待测图像。The first acquisition module is used to acquire a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested.

预测模块,用于将所述待测图像序列输入预设的图像预测模型,得到预测图像序列;其中,所述图像预测模型为根据预设的损失函数训练得到的,所述预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。a prediction module, configured to input the image sequence to be tested into a preset image prediction model to obtain a predicted image sequence; wherein, the image prediction model is obtained by training according to a preset loss function, and the preset loss function It is obtained by adjusting the weight of each sub-function to predict the image loss value between the standard image sequence and the sample image sequence.

本实施例提供的图像预测装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The image prediction apparatus provided in this embodiment can execute the above method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.

在上述实施例的基础上,可选的,上述装置还包括:第二获取模块、第一调整模块和第一训练模块,其中:On the basis of the above-mentioned embodiment, optionally, the above-mentioned apparatus further includes: a second acquisition module, a first adjustment module and a first training module, wherein:

第二获取模块,用于将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列;The second acquisition module is used to input the sample image sequence into the preset image prediction model to be trained to obtain the sample prediction image sequence;

第一调整模块,用于根据标准图像序列和所述样本预测图像序列之间的图像损失值,调整所述待训练图像预测模型的损失函数中各子函数的权重;a first adjustment module, configured to adjust the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence;

第一训练模块,用于根据调整后的损失函数的值对所述待训练图像预测模型进行训练,得到所述图像预测模型。The first training module is configured to train the image prediction model to be trained according to the value of the adjusted loss function to obtain the image prediction model.

本实施例提供的图像预测装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The image prediction apparatus provided in this embodiment can execute the above method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.

在上述实施例的基础上,可选的,上述第一训练模块包括:第一调整单元和训练单元,其中:On the basis of the above-mentioned embodiment, optionally, the above-mentioned first training module includes: a first adjustment unit and a training unit, wherein:

第一调整单元,用于根据所述调整后的损失函数的值,对所述待训练图像预测模型的参数进行调整,得到新的待训练图像预测模型;a first adjustment unit, configured to adjust the parameters of the image prediction model to be trained according to the value of the adjusted loss function to obtain a new image prediction model to be trained;

训练单元,用于将所述新的待训练图像预测模型作为预设的待训练图像预测模型,并返回执行所述将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列的步骤,直至达到预设的收敛条件时得到所述图像预测模型。The training unit is configured to use the new image prediction model to be trained as the preset image prediction model to be trained, and return to execute the inputting the sample image sequence into the preset image prediction model to be trained, and obtain a sample image prediction model of the image sequence. step, until a preset convergence condition is reached, the image prediction model is obtained.

可选的,所述预设的收敛条件包括所述调整后的损失函数的值达到稳定值或达到预设的迭代次数。Optionally, the preset convergence condition includes that the value of the adjusted loss function reaches a stable value or reaches a preset number of iterations.

本实施例提供的图像预测装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The image prediction apparatus provided in this embodiment can execute the above method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.

在上述实施例的基础上,可选的,上述第一调整模块包括:获取单元和第二调整单元,其中:On the basis of the above-mentioned embodiment, optionally, the above-mentioned first adjustment module includes: an acquisition unit and a second adjustment unit, wherein:

获取单元,用于获取所述样本预测图像序列中每个样本预测图像与对应的标准预测图像之间的图像损失值;an acquisition unit for acquiring the image loss value between each sample predicted image and the corresponding standard predicted image in the sample predicted image sequence;

第二调整单元,用于根据所述每个样本预测图像与对应的标准预测图像之间的图像损失值,调整所述损失函数中对应子函数的权重。The second adjustment unit is configured to adjust the weight of the corresponding sub-function in the loss function according to the image loss value between the predicted image of each sample and the corresponding standard predicted image.

可选的,所述图像损失值越大,对应的子函数的权重越大。Optionally, the larger the image loss value is, the larger the weight of the corresponding sub-function is.

本实施例提供的图像预测装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The image prediction apparatus provided in this embodiment can execute the above method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.

关于图像预测装置的具体限定可以参见上文中对于图像预测方法的限定,在此不再赘述。上述图像预测装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the image prediction apparatus, reference may be made to the above definition of the image prediction method, which will not be repeated here. Each module in the above-mentioned image prediction apparatus may be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

在一个实施例中,如图7所示,提供了一种图像预测模型的训练装置,包括:第三获取模块、第二调整模块和第二训练模块,其中:In one embodiment, as shown in FIG. 7 , an apparatus for training an image prediction model is provided, comprising: a third acquisition module, a second adjustment module and a second training module, wherein:

第三获取模块,用于将样本图像序列输入预设的待训练图像预测模型,得到样本预测图像序列;The third acquisition module is used to input the sample image sequence into the preset image prediction model to be trained to obtain the sample prediction image sequence;

第二调整模块,用于根据标准图像序列和所述样本预测图像序列之间的图像损失值,调整所述待训练图像预测模型的损失函数中各子函数的权重;The second adjustment module is configured to adjust the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence;

第二训练模块,用于根据调整后的损失函数的值对所述待训练图像预测模型进行训练,得到所述图像预测模型。The second training module is configured to train the image prediction model to be trained according to the value of the adjusted loss function to obtain the image prediction model.

本实施例提供的图像预测模型的训练装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The apparatus for training an image prediction model provided in this embodiment can execute the above method embodiments, and the implementation principles and technical effects thereof are similar, which will not be repeated here.

关于图像预测模型的训练装置的具体限定可以参见上文中对于图像预测模型的训练方法的限定,在此不再赘述。上述图像预测模型的训练装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the apparatus for training the image prediction model, reference may be made to the definition of the training method for the image prediction model above, which will not be repeated here. Each module in the above image prediction model training device can be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:

获取待测图像序列;所述待测图像序列中包括至少两个待测图像;acquiring a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested;

将所述待测图像序列输入预设的图像预测模型,得到预测图像序列;其中,所述图像预测模型为根据预设的损失函数训练得到的,所述预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。Input the image sequence to be tested into a preset image prediction model to obtain a predicted image sequence; wherein, the image prediction model is obtained by training according to a preset loss function, and the preset loss function is based on a standard image sequence The image loss value between the sample prediction image sequence and the weight of each sub-function is adjusted.

上述实施例提供的计算机设备,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principles and technical effects of the computer equipment provided by the above embodiments are similar to those of the above method embodiments, and details are not described herein again.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

获取待测图像序列;所述待测图像序列中包括至少两个待测图像;acquiring a sequence of images to be tested; the sequence of images to be tested includes at least two images to be tested;

将所述待测图像序列输入预设的图像预测模型,得到预测图像序列;其中,所述图像预测模型为根据预设的损失函数训练得到的,所述预设的损失函数为根据标准图像序列和样本预测图像序列之间的图像损失值,调整各子函数的权重后得到的。Input the image sequence to be tested into a preset image prediction model to obtain a predicted image sequence; wherein, the image prediction model is obtained by training according to a preset loss function, and the preset loss function is based on a standard image sequence The image loss value between the sample prediction image sequence and the weight of each sub-function is adjusted.

上述实施例提供的计算机可读存储介质,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。The implementation principles and technical effects of the computer-readable storage medium provided by the foregoing embodiments are similar to those of the foregoing method embodiments, and details are not described herein again.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the various embodiments provided in this application may include at least one of non-volatile and volatile memory. The non-volatile memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, and the like. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, the RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM).

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

1. A method of image prediction, the method comprising:
acquiring an image sequence to be detected; the image sequence to be detected comprises at least two images to be detected;
inputting the image sequence to be detected into a preset image prediction model to obtain a predicted image sequence; the image prediction model is obtained by training according to a preset loss function, and the preset loss function is obtained by adjusting the weight of each sub-function according to the image loss value between a standard image sequence and a sample prediction image sequence.
2. The method of claim 1, wherein the training method of the image prediction model comprises:
inputting the sample image sequence into a preset image prediction model to be trained to obtain a sample prediction image sequence;
adjusting the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence;
and training the image prediction model to be trained according to the adjusted value of the loss function to obtain the image prediction model.
3. The method according to claim 2, wherein the training the image prediction model to be trained according to the adjusted value of the loss function to obtain the image prediction model comprises:
adjusting parameters of the image prediction model to be trained according to the adjusted value of the loss function to obtain a new image prediction model to be trained;
and taking the new image prediction model to be trained as a preset image prediction model to be trained, and returning to the step of inputting the sample image sequence into the preset image prediction model to be trained to obtain a sample predicted image sequence until a preset convergence condition is reached to obtain the image prediction model.
4. The method of claim 3, wherein the preset convergence condition comprises the adjusted loss function reaching a stable value or reaching a preset number of iterations.
5. The method according to claim 2, wherein the adjusting the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence comprises:
acquiring an image loss value between each sample predicted image in the sample predicted image sequence and the corresponding standard predicted image;
and adjusting the weight of the corresponding sub-function in the loss function according to the image loss value between each sample prediction image and the corresponding standard prediction image.
6. The method of claim 5, wherein the greater the image loss value, the greater the weight of the corresponding sub-function.
7. A method for training an image prediction model, the method comprising:
inputting the sample image sequence into a preset image prediction model to be trained to obtain a sample prediction image sequence;
adjusting the weight of each sub-function in the loss function of the image prediction model to be trained according to the image loss value between the standard image sequence and the sample prediction image sequence;
and training the image prediction model to be trained according to the adjusted value of the loss function to obtain the image prediction model.
8. An image prediction apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring an image sequence to be detected; the image sequence to be detected comprises at least two images to be detected;
the prediction module is used for inputting the image sequence to be detected into a preset image prediction model to obtain a predicted image sequence; the image prediction model is obtained by training according to a preset loss function, and the preset loss function is obtained by adjusting the weight of each sub-function according to the image loss value between a standard image sequence and a sample prediction image sequence.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010619576.1A 2020-07-01 2020-07-01 Image prediction method, apparatus, computer equipment and storage medium Pending CN111612105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010619576.1A CN111612105A (en) 2020-07-01 2020-07-01 Image prediction method, apparatus, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010619576.1A CN111612105A (en) 2020-07-01 2020-07-01 Image prediction method, apparatus, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111612105A true CN111612105A (en) 2020-09-01

Family

ID=72200563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010619576.1A Pending CN111612105A (en) 2020-07-01 2020-07-01 Image prediction method, apparatus, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111612105A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112418480A (en) * 2020-10-14 2021-02-26 上海眼控科技股份有限公司 Meteorological image prediction method, meteorological image prediction device, computer equipment and storage medium
CN114581851A (en) * 2022-03-10 2022-06-03 阳光电源股份有限公司 Bird trajectory prediction method, bird repelling method, equipment, system and storage medium
CN114943871A (en) * 2022-04-11 2022-08-26 哈尔滨工业大学(深圳) Construction method of image sequence prediction model and image sequence prediction method
CN116257731A (en) * 2021-12-09 2023-06-13 浙江宇视科技有限公司 A loss function design method, device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122736A (en) * 2017-04-26 2017-09-01 北京邮电大学 A kind of human body based on deep learning is towards Forecasting Methodology and device
US20200092565A1 (en) * 2017-05-19 2020-03-19 Deepmind Technologies Limited Making object-level predictions of the future state of a physical system
CN111028260A (en) * 2019-12-17 2020-04-17 上海眼控科技股份有限公司 Image prediction method, image prediction device, computer equipment and storage medium
CN111222522A (en) * 2018-11-23 2020-06-02 北京市商汤科技开发有限公司 Neural network training, road surface detection and intelligent driving control method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122736A (en) * 2017-04-26 2017-09-01 北京邮电大学 A kind of human body based on deep learning is towards Forecasting Methodology and device
US20200092565A1 (en) * 2017-05-19 2020-03-19 Deepmind Technologies Limited Making object-level predictions of the future state of a physical system
CN111222522A (en) * 2018-11-23 2020-06-02 北京市商汤科技开发有限公司 Neural network training, road surface detection and intelligent driving control method and device
CN111028260A (en) * 2019-12-17 2020-04-17 上海眼控科技股份有限公司 Image prediction method, image prediction device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张玲玲: "基于雷达回波图像的短期降雨预测" *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112418480A (en) * 2020-10-14 2021-02-26 上海眼控科技股份有限公司 Meteorological image prediction method, meteorological image prediction device, computer equipment and storage medium
CN112418480B (en) * 2020-10-14 2024-11-22 上海眼控科技股份有限公司 Meteorological image prediction method, device, computer equipment and storage medium
CN116257731A (en) * 2021-12-09 2023-06-13 浙江宇视科技有限公司 A loss function design method, device, storage medium and electronic equipment
CN114581851A (en) * 2022-03-10 2022-06-03 阳光电源股份有限公司 Bird trajectory prediction method, bird repelling method, equipment, system and storage medium
CN114943871A (en) * 2022-04-11 2022-08-26 哈尔滨工业大学(深圳) Construction method of image sequence prediction model and image sequence prediction method

Similar Documents

Publication Publication Date Title
CN110163344B (en) Neural network training method, device, equipment and storage medium
CN111612105A (en) Image prediction method, apparatus, computer equipment and storage medium
US11144782B2 (en) Generating video frames using neural networks
CN112488923B (en) Image super-resolution reconstruction method and device, storage medium and electronic equipment
CN112862112A (en) Federal learning method, storage medium, terminal, server, and federal learning system
CN109375912B (en) Model serialization method, device and storage medium
CN115456149B (en) Spiking neural network accelerator learning method, device, terminal and storage medium
CN113838134B (en) Image key point detection method, device, terminal and storage medium
US20220004849A1 (en) Image processing neural networks with dynamic filter activation
US11562467B2 (en) Method and system for designing an optical filter
CN107392316A (en) Network training method, device, computing device and computer-readable storage medium
WO2024120446A1 (en) Methods and apparatus for generating special effect item and special effect image, device, and storage medium
WO2019062411A1 (en) Method for managing and controlling background application program, storage medium, and electronic device
US12033001B2 (en) Optimizing machine learning as-a-service performance for cellular communication systems
CN116362323A (en) Construction method, device and related equipment of local model based on federated learning
WO2024152797A1 (en) Video supplementation method and apparatus, medium and electronic device
US11531578B1 (en) Profiling and debugging for remote neural network execution
CN112817898A (en) Data transmission method, processor, chip and electronic equipment
US20250252537A1 (en) Enhancing images from a mobile device to give a professional camera effect
CN114462600B (en) A kind of training method and device of graph neural network corresponding to directed graph
CN106611100B (en) User behavior analysis method and device
CN116614484B (en) Heterogeneous data federated learning method and related equipment based on structural enhancement
CN111898620A (en) Training method of recognition model, character recognition method, device, equipment and medium
US12425319B2 (en) Method and system for evaluating service performance perceived by user
CN112926735B (en) Method, device, framework, medium and equipment for updating deep reinforcement learning model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200901

RJ01 Rejection of invention patent application after publication