用于训练模型的方法和装置、用于预测信息的方法和装置Method and device for training model, method and device for predicting information
相关申请的交叉引用Cross references to related applications
本申请基于申请号为201910414089.9、申请日为2019年05月17日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is filed based on the Chinese patent application with the application number 201910414089.9 and the application date on May 17, 2019, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by reference.
技术领域Technical field
本公开的实施例涉及计算机技术领域,具体涉及用于训练模型的方法和装置、用于预测信息的方法和装置。The embodiments of the present disclosure relate to the field of computer technology, in particular to methods and devices for training models, and methods and devices for predicting information.
背景技术Background technique
在对机器学习模型进行训练之前,通常需要准备训练数据,对训练数据进行标注。其中,训练数据例如可以包括图像数据等。对于图像数据的标注,现有的标注方式通常是将未对应标注结果的待标注图像提供给标注人员,直接让标注人员进行标注。Before training a machine learning model, it is usually necessary to prepare training data and label the training data. Among them, the training data may include image data, for example. For the labeling of image data, the existing labeling method usually provides the image to be labelled that does not correspond to the labeling result to the labeler, and the labeler directly makes the labeling.
发明内容Summary of the invention
本公开的实施例提出了用于训练模型的方法和装置、用于预测信息的方法和装置。The embodiments of the present disclosure propose methods and devices for training models, and methods and devices for predicting information.
第一方面,本公开的实施例提供了一种用于训练模型的方法,包括:获取样本图像集合,样本图像集合中存在第一样本图像和第二样本图像,第一样本图像是对应标注结果的样本图像,第二样本图像是未对应标注结果的样本图像;基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型;执行以下处理步骤:将样本图像集合中的至少一张第二样本图像输入训练所得的预测模型,得到相应的预测结果;将上述至少一张第二样本图像和预测结果发送至标注人员所使用的标注端;获取标注人员对预测结果进行调整 后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练。In the first aspect, an embodiment of the present disclosure provides a method for training a model, including: obtaining a sample image set, where a first sample image and a second sample image exist in the sample image set, and the first sample image corresponds to The sample image of the annotation result, the second sample image is a sample image that does not correspond to the annotation result; based on the first sample image in the sample image set and its corresponding annotation result, the corresponding prediction model is trained; the following processing steps are performed: Input at least one second sample image in the sample image set into the trained prediction model to obtain the corresponding prediction result; send the above at least one second sample image and the prediction result to the labeling terminal used by the labeler; obtain the label The person adjusts the prediction result obtained after the annotation result, and based on the obtained annotation result and its corresponding sample image, continues to train the trained prediction model.
在一些实施例中,在基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练之后,上述方法还包括:若样本图像集合中还存在第二样本图像,继续执行上述处理步骤。In some embodiments, after continuing to train the trained prediction model based on the obtained annotation result and the corresponding sample image, the above method further includes: if there is still a second sample image in the sample image set, continue Perform the above processing steps.
在一些实施例中,获取标注人员对预测结果进行调整后所得的标注结果,包括:接收标注端返回的标注人员对预测结果进行调整后所得的标注结果。In some embodiments, obtaining the annotation result obtained by the annotator after adjusting the prediction result includes: receiving the annotation result obtained by the annotator returned by the annotation terminal after adjusting the prediction result.
在一些实施例中,标注端用于将标注人员对预测结果进行调整后所得的标注结果存储至指定的存储位置;以及获取标注人员对预测结果进行调整后所得的标注结果,包括:从指定的存储位置获取标注人员对预测结果进行调整后所得的标注结果。In some embodiments, the tagging terminal is used to store the tagging result obtained by the tagger after adjusting the prediction result in a designated storage location; and obtaining the tagging result obtained by the tagger adjusting the prediction result, including: The storage location obtains the labeling result obtained by the labeling staff after adjusting the prediction result.
在一些实施例中,样本图像集合中的每张样本图像显示有目标对象的面部,目标对象为人或动物,标注结果用于指示其所对应的样本图像所显示的面部的关键点的位置,训练所得的预测模型用于进行面部关键点定位。In some embodiments, each sample image in the sample image set displays the face of the target object, the target object is a human or an animal, and the annotation result is used to indicate the position of the key points of the face displayed in the corresponding sample image, and the training The obtained prediction model is used to locate key points of the face.
第二方面,本公开的实施例提供了一种用于预测信息的方法,该方法包括:接收待检测图像;将待检测图像输入采用如第一方面中任一实现方式描述的方法训练所得的预测模型,得到相应的预测结果。In the second aspect, the embodiments of the present disclosure provide a method for predicting information. The method includes: receiving an image to be detected; and inputting the image to be detected into a training method as described in any one of the implementation modes in the first aspect. Forecast model to get the corresponding forecast result.
在一些实施例中,上述方法还包括:将待检测图像和预测结果发送至标注人员所使用的标注端,以使标注人员对预测结果进行调整,并将经调整后的预测结果作为标注结果,以及将待检测图像和标注结果发送至用于对预测模型进行训练的模型训练端,使模型训练端基于待检测图像和标注结果继续对预测模型进行训练。In some embodiments, the above method further includes: sending the to-be-detected image and the prediction result to an annotation terminal used by an annotator, so that the annotator can adjust the prediction result, and use the adjusted prediction result as the annotation result. And sending the image to be detected and the annotation result to the model training end used to train the prediction model, so that the model training end continues to train the prediction model based on the image to be detected and the annotation result.
第三方面,本公开的实施例提供了一种用于训练模型的装置,该装置包括:获取单元,被配置成获取样本图像集合,样本图像集合中存在第一样本图像和第二样本图像,第一样本图像是对应标注结果的样本图像,第二样本图像是未对应标注结果的样本图像;训练单元,被配置成基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型;处理单元,被配置成执行以下处理步 骤:将样本图像集合中的至少一张第二样本图像输入训练所得的预测模型,得到相应的预测结果;将上述至少一张第二样本图像和预测结果发送至标注人员所使用的标注端;获取标注人员对预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练。In a third aspect, an embodiment of the present disclosure provides an apparatus for training a model. The apparatus includes: an acquisition unit configured to acquire a sample image set, where a first sample image and a second sample image exist in the sample image set , The first sample image is a sample image corresponding to the annotation result, and the second sample image is a sample image that does not correspond to the annotation result; the training unit is configured to be based on the first sample image in the sample image set and its corresponding annotation As a result, the training obtains the corresponding prediction model; the processing unit is configured to perform the following processing steps: input at least one second sample image in the sample image set into the trained prediction model to obtain the corresponding prediction result; The second sample image and the prediction result are sent to the labeling terminal used by the labeling staff; the labeling result obtained after the labeling staff has adjusted the prediction result, and based on the obtained labeling result and its corresponding sample image, continue to train The resulting prediction model is trained.
在一些实施例中,处理单元进一步被配置成:在基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练之后,若样本图像集合中还存在第二样本图像,继续执行处理步骤。In some embodiments, the processing unit is further configured to: after continuing to train the trained prediction model based on the obtained annotation result and the corresponding sample image, if there is a second sample image in the sample image set To continue the processing steps.
在一些实施例中,处理单元进一步被配置成:接收标注端返回的标注人员对预测结果进行调整后所得的标注结果。In some embodiments, the processing unit is further configured to receive an annotation result obtained by an annotator returned by the annotation terminal after adjusting the prediction result.
在一些实施例中,标注端用于将标注人员对预测结果进行调整后所得的标注结果存储至指定的存储位置;以及处理单元进一步被配置成:从指定的存储位置获取标注人员对预测结果进行调整后所得的标注结果。In some embodiments, the tagging terminal is used to store the tagging result obtained by the tagger after adjusting the prediction result in a designated storage location; and the processing unit is further configured to: obtain the tagger from the designated storage location to perform The marked result after adjustment.
在一些实施例中,样本图像集合中的每张样本图像显示有目标对象的面部,目标对象为人或动物,标注结果用于指示其所对应的样本图像所显示的面部的关键点的位置,训练所得的预测模型用于进行面部关键点定位。In some embodiments, each sample image in the sample image set displays the face of the target object, the target object is a human or an animal, and the annotation result is used to indicate the position of the key points of the face displayed in the corresponding sample image, and the training The obtained prediction model is used to locate key points of the face.
第四方面,本公开的实施例提供了一种用于预测信息的装置,该装置包括:接收单元,被配置成接收待检测图像;预测单元,被配置成将待检测图像输入采用如第一方面中任一实现方式描述的方法训练所得的预测模型,得到相应的预测结果。In a fourth aspect, an embodiment of the present disclosure provides an apparatus for predicting information. The apparatus includes: a receiving unit configured to receive an image to be detected; a prediction unit configured to input the image to be detected as the first The prediction model trained by the method described in any implementation manner in the aspect obtains the corresponding prediction result.
在一些实施例中,上述装置还包括:发送单元,被配置成将待检测图像和预测结果发送至标注人员所使用的标注端,以使标注人员对预测结果进行调整,并将经调整后的预测结果作为标注结果,以及将待检测图像和标注结果发送至用于对预测模型进行训练的模型训练端,使模型训练端基于待检测图像和标注结果继续对预测模型进行训练。In some embodiments, the above-mentioned device further includes: a sending unit configured to send the image to be detected and the prediction result to an annotation terminal used by an annotator, so that the annotator can adjust the prediction result, and the adjusted The prediction result is used as the annotation result, and the image to be detected and the annotation result are sent to the model training terminal for training the prediction model, so that the model training terminal continues to train the prediction model based on the image to be detected and the annotation result.
第五方面,本公开的实施例提供了一种电子设备,该电子设备包括:一个或多个处理器;存储装置,其上存储有一个或多个程序;当 该一个或多个程序被该一个或多个处理器执行,使得该一个或多个处理器实现如第一方面和第二方面中任一实现方式描述的方法。In a fifth aspect, the embodiments of the present disclosure provide an electronic device that includes: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are used by the One or more processors execute, so that the one or more processors implement the method described in any one of the first aspect and the second aspect.
第六方面,本公开的实施例提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面和第二方面中任一实现方式描述的方法。In a sixth aspect, the embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method as described in any one of the first aspect and the second aspect is implemented.
本公开的上述实施例提供的用于训练模型的方法和装置,通过获取样本图像集合,而后基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型,然后执行以下处理步骤:将样本图像集合中的至少一张第二样本图像输入该预测模型,得到相应的预测结果;将该至少一张第二样本图像和该预测结果发送至标注人员所使用的标注端;获取标注人员对该预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对该预测模型进行训练,可以提高标注效率以及模型预测准确率,有利于模型的冷启动。The method and device for training a model provided by the above-mentioned embodiments of the present disclosure obtain a sample image set, and then train a corresponding prediction model based on the first sample image in the sample image set and its corresponding annotation result, Then perform the following processing steps: input at least one second sample image in the sample image set into the prediction model to obtain the corresponding prediction result; send the at least one second sample image and the prediction result to the annotator used Annotation terminal: Obtain the annotation results obtained by the annotation personnel after adjusting the prediction results, and continue to train the prediction model based on the obtained annotation results and the corresponding sample images, which can improve the efficiency of annotation and the accuracy of model prediction , Which is conducive to the cold start of the model.
本公开的上述实施例提供的用于预测信息的方法和装置,通过使用采用如第一方面中任一实现方式描述的方法训练所得的预测模型进行预测操作,可以在模型处于冷启动阶段的情况下获得具有较高准确度的预测结果。The method and device for predicting information provided by the above-mentioned embodiments of the present disclosure can perform prediction operations using a predictive model trained by the method described in any one of the implementations in the first aspect, which can be used when the model is in the cold start phase. Obtain prediction results with higher accuracy.
附图说明Description of the drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, purposes and advantages of the present disclosure will become more apparent:
图1是本公开的一些实施例可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present disclosure can be applied;
图2是根据本公开的用于训练模型的方法的一个实施例的流程图;Fig. 2 is a flowchart of an embodiment of a method for training a model according to the present disclosure;
图3是根据本公开的用于训练模型的方法的又一个实施例的流程图;FIG. 3 is a flowchart of another embodiment of the method for training a model according to the present disclosure;
图4是根据本公开的用于预测信息的方法的一个实施例的流程图;Fig. 4 is a flowchart of an embodiment of a method for predicting information according to the present disclosure;
图5是根据本公开的用于训练模型的装置的一个实施例的结构示意图;Fig. 5 is a schematic structural diagram of an embodiment of an apparatus for training a model according to the present disclosure;
图6是根据本公开的用于预测信息的装置的一个实施例的结构示意图;Fig. 6 is a schematic structural diagram of an embodiment of an apparatus for predicting information according to the present disclosure;
图7是适于用来实现本公开的一些实施例的电子设备的计算机系统的结构示意图。FIG. 7 is a schematic structural diagram of a computer system suitable for implementing an electronic device of some embodiments of the present disclosure.
具体实施方式Detailed ways
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关公开,而非对该公开的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关公开相关的部分。The present disclosure will be further described in detail below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described here are only used to explain the relevant disclosure, but not to limit the disclosure. In addition, it should be noted that, for ease of description, only the parts related to the relevant disclosure are shown in the drawings.
需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other if there is no conflict. Hereinafter, the present disclosure will be described in detail with reference to the drawings and in conjunction with embodiments.
图1示出了可以应用本公开的用于训练模型的方法和装置、用于预测信息的方法和装置的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 to which embodiments of the method and apparatus for training a model and the method and apparatus for predicting information of the present disclosure can be applied.
如图1所示,系统架构100可以包括终端设备101、102和服务器103、104。其中,终端设备101可以与服务器103、104通信连接。服务器103和服务器104可以通信连接。终端设备102和服务器104可以通信连接。这里,服务器与服务器之间以及服务器与终端设备之间可以采用各种通信连接方式,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1, the system architecture 100 may include terminal devices 101 and 102 and servers 103 and 104. Wherein, the terminal device 101 may be connected to the servers 103 and 104 in communication. The server 103 and the server 104 may be connected in communication. The terminal device 102 and the server 104 may be connected in communication. Here, various communication connection modes may be adopted between the server and the server and between the server and the terminal device, such as wired, wireless communication links, or fiber optic cables.
需要说明的是,终端设备101例如可以是标注人员所使用的终端设备。终端设备102例如可以是有预测需求的用户所使用的终端设备。服务器103例如可以是用于进行模型训练的服务器。服务器104例如可以是用于进行预测操作的服务器。此外,终端设备102上可以安装有服务器104所支持的预测类应用。该预测类应用可以关联服务器103训练所得的预测模型,该预测模型例如可以用于对图像进行预测,并且该预测模型可以部署在服务器104中。另外,服务器103在该预测 模型的训练过程中所使用的样本图像对应的标注结果可以是上述标注人员标注的。It should be noted that the terminal device 101 may be, for example, a terminal device used by an annotator. The terminal device 102 may be, for example, a terminal device used by users with predicted needs. The server 103 may be, for example, a server for performing model training. The server 104 may be, for example, a server for performing prediction operations. In addition, the terminal device 102 may be installed with predictive applications supported by the server 104. The prediction application can be associated with a prediction model trained by the server 103. The prediction model can be used to predict images, and the prediction model can be deployed in the server 104. In addition, the annotation result corresponding to the sample image used by the server 103 in the training process of the prediction model may be annotated by the above-mentioned annotator.
需要指出的是,终端设备101、102可以是硬件,也可以是软件。当终端设备101、102为硬件时,可以是各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机、台式计算机等等。当终端设备101、102为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。It should be pointed out that the terminal devices 101 and 102 may be hardware or software. When the terminal devices 101 and 102 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and so on. When the terminal devices 101 and 102 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. There is no specific limitation here.
服务器103、104可以是硬件,也可以是软件。当服务器103、104为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器103、104为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。The servers 103 and 104 may be hardware or software. When the servers 103 and 104 are hardware, they can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the servers 103 and 104 are software, they can be implemented as multiple software or software modules (for example, to provide distributed services), or can be implemented as a single software or software module. There is no specific limitation here.
需要说明的是,本公开的一些实施例提供的用于训练模型的方法一般由服务器103执行,相应地,用于训练模型的装置一般设置于服务器103中。另外,本公开的一些实施例提供的用于预测信息的方法一般由服务器104执行,相应地,用于预测信息的装置一般设置于服务器104中。It should be noted that the method for training a model provided by some embodiments of the present disclosure is generally executed by the server 103, and accordingly, the device for training the model is generally set in the server 103. In addition, the method for predicting information provided by some embodiments of the present disclosure is generally executed by the server 104, and accordingly, the device for predicting information is generally set in the server 104.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks, and servers in FIG. 1 are merely illustrative. According to implementation needs, there can be any number of terminal devices, networks and servers.
继续参考图2,其示出了根据本公开的用于训练模型的方法的一个实施例的流程200。该用于训练模型的方法的流程200,包括以下步骤:Continuing to refer to FIG. 2, it shows a process 200 of an embodiment of the method for training a model according to the present disclosure. The process 200 of the method for training a model includes the following steps:
步骤201,获取样本图像集合,样本图像集合中存在第一样本图像和第二样本图像,第一样本图像是对应标注结果的样本图像,第二样本图像是未对应标注结果的样本图像。Step 201: Obtain a sample image set. The sample image set contains a first sample image and a second sample image. The first sample image is a sample image corresponding to the annotation result, and the second sample image is a sample image that does not correspond to the annotation result.
在本实施例中,用于训练模型的方法的执行主体可以是服务器(例如图1所示的服务器103)。上述执行主体例如可以从本地或所连接的服务器获取预先生成的样本图像集合。其中,样本图像集合中存在第一样本图像和第二样本图像。第一样本图像是对应标注结果的样本图 像,第二样本图像是未对应标注结果的样本图像。需要指出的是,第一样本图像所对应的标注结果可以是机器标注结果,也可以是人工标注结果,在此不做具体限定。优选地,第一样本图像所对应的标注结果为人工标注结果。In this embodiment, the execution subject of the method for training the model may be a server (for example, the server 103 shown in FIG. 1). The above-mentioned execution subject may obtain a pre-generated sample image set from a local or a connected server, for example. Wherein, the first sample image and the second sample image exist in the sample image set. The first sample image is a sample image corresponding to the annotation result, and the second sample image is a sample image that does not correspond to the annotation result. It should be noted that the labeling result corresponding to the first sample image may be a machine labeling result or a manual labeling result, which is not specifically limited here. Preferably, the annotation result corresponding to the first sample image is a manual annotation result.
需要说明的是,样本图像可以是各种样本图像,例如显示有指定对象的样本图像。该指定对象例如可以为人、动物(例如猫或狗等)、车辆或建筑物等等。标注结果例如可以用于指示其所对应的样本图像所显示的指定对象的位置。It should be noted that the sample image may be various sample images, for example, a sample image displaying a designated object. The designated object may be, for example, a person, an animal (for example, a cat or a dog, etc.), a vehicle or a building, and so on. The annotation result can be used to indicate the position of the designated object displayed in the corresponding sample image, for example.
可选地,样本图像集合中的每张样本图像例如可以显示有目标对象的面部。目标对象例如可以为人或动物。标注结果例如可以用于指示其所对应的样本图像所显示的面部的关键点(例如眉毛、眼睛、嘴巴、鼻子等)的位置。Optionally, each sample image in the sample image set may display the face of the target object, for example. The target object may be a human or an animal, for example. The annotation result can be used to indicate the position of key points (such as eyebrows, eyes, mouth, nose, etc.) of the face displayed in the corresponding sample image, for example.
步骤202,基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型。Step 202: Train a corresponding prediction model based on the first sample image in the sample image set and its corresponding annotation result.
在本实施例中,上述执行主体可以基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型。例如,上述执行主体可以将样本图像集合中的第一样本图像作为输入,将与输入的第一样本图像对应的标注结果作为输出,训练得到该预测模型。具体地,上述执行主体可以将样本图像集合中的第一样本图像作为输入,将与输入的第一样本图像对应的标注结果作为输出,对目标初始模型进行训练,得到相应的预测模型。其中,目标初始模型可以是未经训练或未训练完成的神经网络,例如卷积神经网络(Convolutional Neural Network,CNN)或循环神经网络(Recurrent Neural Network,RNN)等。In this embodiment, the above-mentioned execution subject may train to obtain a corresponding prediction model based on the first sample image in the sample image set and its corresponding annotation result. For example, the above-mentioned execution subject may take the first sample image in the sample image set as input, and use the annotation result corresponding to the input first sample image as output, and train the prediction model. Specifically, the above-mentioned execution subject may use the first sample image in the sample image set as input, and the annotation result corresponding to the input first sample image as output, and train the target initial model to obtain the corresponding prediction model. Among them, the target initial model may be an untrained or untrained neural network, such as a Convolutional Neural Network (CNN) or a Recurrent Neural Network (RNN).
需要说明的是,当标注结果用于指示其所对应的样本图像所显示的指定对象的位置时,训练所得的预测模型可以用于对图像所显示的指定对象进行定位。It should be noted that when the annotation result is used to indicate the position of the designated object displayed in the corresponding sample image, the trained prediction model can be used to locate the designated object displayed in the image.
可选地,当标注结果用于指示其所对应的样本图像所显示的面部的关键点的位置时,训练所得的预测模型可以用于进行面部关键点定位。Optionally, when the labeling result is used to indicate the position of the key points of the face displayed in the corresponding sample image, the prediction model obtained by training can be used to locate the key points of the face.
步骤203,将样本图像集合中的至少一张第二样本图像输入训练所得的预测模型,得到相应的预测结果。Step 203: Input at least one second sample image in the sample image set into the trained prediction model to obtain a corresponding prediction result.
在本实施例中,上述执行主体可以将样本图像集合中的至少一张第二样本图像输入训练所得的预测模型,得到相应的预测结果。In this embodiment, the above-mentioned execution subject may input at least one second sample image in the sample image set into the trained prediction model to obtain a corresponding prediction result.
步骤204,将至少一张第二样本图像和预测结果发送至标注人员所使用的标注端。Step 204: Send at least one second sample image and the prediction result to an annotation terminal used by an annotator.
在本实施例中,上述执行主体可以将上述至少一张第二样本图像和预测结果发送至标注人员所使用的标注端(例如图1所示的终端设备101),以使标注人员对该预测结果进行调整,并将经调整后的预测结果作为标注结果。此后,标注人员例如可以将该标注结果通过标注端发送给上述执行主体,或者将该标注结果存储至指定的存储位置。其中,上述执行主体可以具有访问该存储位置的权限。In this embodiment, the above-mentioned execution subject may send the above-mentioned at least one second sample image and the prediction result to the annotating terminal used by the annotator (for example, the terminal device 101 shown in FIG. 1), so that the annotator can predict The result is adjusted, and the adjusted forecast result is used as the annotation result. Thereafter, the annotator may, for example, send the annotation result to the execution subject through the annotation terminal, or store the annotation result in a designated storage location. Wherein, the above-mentioned execution subject may have the authority to access the storage location.
需要说明的是,通过将预测结果提供给标注人员进行调整,可以有效地减轻标注人员的工作量,以及可以提高标注人员的标注效率。It should be noted that by providing the prediction results to the labelers for adjustment, the workload of the labelers can be effectively reduced, and the labeling efficiency of the labelers can be improved.
步骤205,获取标注人员对预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练。Step 205: Obtain the annotation result obtained by the annotator after adjusting the prediction result, and continue to train the trained prediction model based on the obtained annotation result and its corresponding sample image.
在本实施例中,上述执行主体可以获取标注人员对预测结果进行调整后所得的标注结果。例如,接收标注人员通过标注端发送的该标注结果,或者从上述存储位置获取标注人员通过标注端存储的该标注结果。而后,上述执行主体可以基于获取到的标注结果和该标注结果所对应的样本图像,继续对在步骤202中训练得到的预测模型进行训练,以提高该预测模型的预测准确率。In this embodiment, the above-mentioned execution subject may obtain the annotation result obtained by the annotator after adjusting the prediction result. For example, the annotation result sent by the annotator through the annotation terminal is received, or the annotation result stored by the annotator through the annotation terminal is obtained from the aforementioned storage location. Then, the above-mentioned execution subject may continue to train the prediction model trained in step 202 based on the obtained labeling result and the sample image corresponding to the labeling result, so as to improve the prediction accuracy of the prediction model.
本公开的上述实施例提供的方法,通过获取样本图像集合,而后基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型,然后执行以下处理步骤:将样本图像集合中的至少一张第二样本图像输入该预测模型,得到相应的预测结果;将该至少一张第二样本图像和该预测结果发送至标注人员所使用的标注端;获取标注人员对该预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对该预测模型进行训练, 可以提高标注效率以及模型预测准确率,有利于模型的冷启动。The method provided by the above-mentioned embodiments of the present disclosure obtains a sample image set, and then trains a corresponding prediction model based on the first sample image in the sample image set and its corresponding annotation result, and then executes the following processing steps: At least one second sample image in the sample image set is input to the prediction model to obtain the corresponding prediction result; the at least one second sample image and the prediction result are sent to the labeling terminal used by the labeler; The prediction result is adjusted to the labeling result, and based on the obtained labeling result and the corresponding sample image, continue to train the prediction model, which can improve the labeling efficiency and model prediction accuracy, which is conducive to the cold start of the model .
继续参见图3,其示出了用于训练模型的方法的又一个实施例的流程300。该用于训练模型的方法的流程300,包括以下步骤:Continuing to refer to FIG. 3, it shows a process 300 of another embodiment of a method for training a model. The process 300 of the method for training a model includes the following steps:
步骤301,获取样本图像集合,样本图像集合中的每张样本图像显示有目标对象的面部,样本图像集合中存在第一样本图像和第二样本图像,第一样本图像是对应标注结果的样本图像,第二样本图像是未对应标注结果的样本图像,标注结果用于指示其所对应的样本图像所显示的面部的关键点的位置。Step 301: Obtain a sample image set. Each sample image in the sample image set shows the face of the target object. There are a first sample image and a second sample image in the sample image set. The first sample image corresponds to the annotation result. The sample image, the second sample image is a sample image that does not correspond to the annotation result, and the annotation result is used to indicate the position of the key points of the face displayed in the corresponding sample image.
在本实施例中,用于训练模型的方法的执行主体可以是服务器(例如图1所示的服务器103)。上述执行主体例如可以从本地或所连接的服务器获取预先生成的样本图像集合。其中,样本图像集合中存在第一样本图像和第二样本图像。第一样本图像是对应标注结果的样本图像,第二样本图像是未对应标注结果的样本图像。另外,样本图像集合中的每张样本图像显示有目标对象的面部。目标对象可以为人或动物(例如猫或狗等)。标注结果用于指示其所对应的样本图像所显示的面部的关键点的位置。In this embodiment, the execution subject of the method for training the model may be a server (for example, the server 103 shown in FIG. 1). The above-mentioned execution subject may obtain a pre-generated sample image set from a local or a connected server, for example. Wherein, the first sample image and the second sample image exist in the sample image set. The first sample image is a sample image corresponding to the annotation result, and the second sample image is a sample image that does not correspond to the annotation result. In addition, each sample image in the sample image set displays the face of the target object. The target object can be a human or an animal (for example, a cat or a dog, etc.). The annotation result is used to indicate the position of the key points of the face shown in the corresponding sample image.
需要指出的是,第一样本图像所对应的标注结果可以是机器标注结果,也可以是人工标注结果,在此不做具体限定。优选地,第一样本图像所对应的标注结果为人工标注结果。It should be noted that the labeling result corresponding to the first sample image may be a machine labeling result or a manual labeling result, which is not specifically limited here. Preferably, the annotation result corresponding to the first sample image is a manual annotation result.
步骤302,基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型,预测模型用于进行面部关键点定位。Step 302: Train a corresponding prediction model based on the first sample image in the sample image set and its corresponding annotation result, and the prediction model is used to locate key facial points.
在本实施例中,上述执行主体可以基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型。其中,预测模型用于进行面部关键点定位。In this embodiment, the above-mentioned execution subject may train to obtain a corresponding prediction model based on the first sample image in the sample image set and its corresponding annotation result. Among them, the prediction model is used to locate key points on the face.
这里,上述执行主体可以将样本图像集合中的第一样本图像作为输入,将与输入的第一样本图像对应的标注结果作为输出,训练得到相应的预测模型。具体地,上述执行主体可以将样本图像集合中的第一样本图像作为输入,将与输入的第一样本图像对应的标注结果作为输出,对目标初始模型进行训练,得到相应的预测模型。其中,目标 初始模型可以是未经训练或未训练完成的神经网络,例如卷积神经网络或循环神经网络等。Here, the above-mentioned execution subject may take the first sample image in the sample image set as input, and use the annotation result corresponding to the input first sample image as output, and train the corresponding prediction model. Specifically, the above-mentioned execution subject may use the first sample image in the sample image set as input, and the annotation result corresponding to the input first sample image as output, and train the target initial model to obtain the corresponding prediction model. Among them, the target initial model can be an untrained or untrained neural network, such as a convolutional neural network or a recurrent neural network.
步骤303,将样本图像集合中的至少一张第二样本图像输入训练所得的预测模型,得到相应的预测结果。Step 303: Input at least one second sample image in the sample image set into the trained prediction model to obtain a corresponding prediction result.
在本实施例中,上述执行主体可以将样本图像集合中的至少一张第二样本图像输入训练所得的预测模型,得到相应的预测结果。该预测结果用于指示该至少一张第二样本图像分别显示的面部的关键点的位置。In this embodiment, the above-mentioned execution subject may input at least one second sample image in the sample image set into the trained prediction model to obtain a corresponding prediction result. The prediction result is used to indicate the positions of the key points of the faces respectively displayed on the at least one second sample image.
步骤304,将至少一张第二样本图像和预测结果发送至标注人员所使用的标注端。Step 304: Send at least one second sample image and the prediction result to the annotator used by the annotator.
在本实施例中,上述执行主体可以将上述至少一张第二样本图像和预测结果发送至标注人员所使用的标注端(例如图1所示的终端设备101),以使标注人员对该预测结果进行调整,并将经调整后的预测结果作为标注结果。此后,标注人员例如可以将该标注结果存储至指定的存储位置。其中,上述执行主体可以具有访问该存储位置的权限。In this embodiment, the above-mentioned execution subject may send the above-mentioned at least one second sample image and the prediction result to the annotating terminal used by the annotator (for example, the terminal device 101 shown in FIG. 1), so that the annotator can predict The result is adjusted, and the adjusted forecast result is used as the annotation result. Thereafter, the annotator may store the annotation result in a designated storage location, for example. Wherein, the above-mentioned execution subject may have the authority to access the storage location.
步骤305,从指定的存储位置获取标注人员对预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练。Step 305: Obtain the annotation result obtained by the annotator after adjusting the prediction result from the designated storage location, and continue to train the trained prediction model based on the obtained annotation result and the corresponding sample image.
在本实施例中,上述执行主体可以从指定的存储位置获取标注人员对预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练。In this embodiment, the above-mentioned execution subject can obtain the labeling result obtained by the labeling personnel after adjusting the prediction result from the designated storage location, and continue to predict the training obtained based on the obtained labeling result and its corresponding sample image The model is trained.
步骤306,确定样本图像集合中是否还存在第二样本图像。Step 306: Determine whether there is a second sample image in the sample image set.
在本实施例中,上述执行主体在执行完步骤305后,可以检测样本图像集合中是否还存在第二样本图像。若还存在第二样本图像,上述执行主体可以转去执行步骤303。若不存在第二样本图像,上述执行主体可以结束对流程300的执行。In this embodiment, after performing step 305, the execution subject can detect whether there is a second sample image in the sample image set. If there is still a second sample image, the above-mentioned execution subject can go to step 303. If there is no second sample image, the above-mentioned execution subject may end the execution of the process 300.
从图3中可以看出,与图2对应的实施例相比,本实施例中的用于训练模型的方法的流程300可以进一步提高标注效率,以及训练得到具有更高预测准确率的、用于进行面部关键点定位的预测模型。It can be seen from FIG. 3 that, compared with the embodiment corresponding to FIG. 2, the process 300 of the method for training a model in this embodiment can further improve the labeling efficiency, and the training can obtain higher prediction accuracy. A predictive model for positioning key points on the face.
进一步参考图4,其示出了用于预测信息的方法的一个实施例的 流程400。该用于预测信息的方法的流程400,包括以下步骤:With further reference to Fig. 4, it shows a flow 400 of an embodiment of a method for predicting information. The process 400 of the method for predicting information includes the following steps:
步骤401,接收待检测图像。Step 401: Receive an image to be detected.
在本实施例中,用于预测信息的方法的执行主体可以是服务器(例如图1所示的服务器104)。上述执行主体例如可以实时地接收用户通过终端设备(例如图1所示的终端设备102)发送的待检测图像。In this embodiment, the execution subject of the method for predicting information may be a server (for example, the server 104 shown in FIG. 1). The foregoing execution subject may, for example, receive in real time the image to be detected sent by the user through the terminal device (for example, the terminal device 102 shown in FIG. 1).
其中,上述执行主体上可以运行有预测模型。上述预测模型可以是采用如图2或图3所示实施例描述的方法训练所得的模型。此外,上述预测模型例如可以是用于对上述预测模型进行训练的模型训练端(例如图1所示的服务器103)同步至上述执行主体的。Among them, a predictive model can be run on the above-mentioned executive body. The foregoing prediction model may be a model obtained by training using the method described in the embodiment shown in FIG. 2 or FIG. 3. In addition, the foregoing prediction model may be synchronized to the foregoing execution subject by a model training terminal (for example, the server 103 shown in FIG. 1) used to train the foregoing prediction model, for example.
步骤402,将待检测图像输入预测模型,得到相应的预测结果。Step 402: Input the image to be detected into the prediction model to obtain the corresponding prediction result.
在本实施例中,上述执行主体可以将待检测图像输入上述预测模型,得到相应的预测结果。而后,上述执行主体还可以输出预测结果。例如,将预测结果输出至发送待检测图像的终端设备,以使该终端设备向用户展示预测结果。In this embodiment, the execution subject may input the image to be detected into the prediction model to obtain the corresponding prediction result. Then, the above-mentioned executive body can also output the prediction result. For example, output the prediction result to the terminal device that sends the image to be detected, so that the terminal device shows the prediction result to the user.
在本实施例的一些可选的实现方式中,在上述预测模型处于冷启动阶段时,由于用于对上述预测模型进行训练的样本图像较少,上述预测模型的预测准确率一般达不到期望的预测准确率。因此,上述执行主体可以将待检测图像和所得的预测结果发送至标注人员所使用的标注端(例如图1所示的终端设备101),以使标注人员对预测结果进行调整,并将经调整后的预测结果作为标注结果,以及将待检测图像和标注结果发送至上述模型训练端,使上述模型训练端基于待检测图像和标注结果继续对上述预测模型进行训练。另外,上述模型训练端在基于待检测图像和标注结果对上述预测模型训练完成后,可以将训练完成的预测模型同步至上述执行主体。这样,上述执行主体可以获得具有更高的准确度的预测结果。In some optional implementations of this embodiment, when the prediction model is in the cold start phase, since there are few sample images used to train the prediction model, the prediction accuracy of the prediction model generally does not meet expectations. The forecast accuracy rate. Therefore, the above-mentioned execution body can send the image to be detected and the obtained prediction result to the annotator used by the annotator (for example, the terminal device 101 shown in FIG. 1), so that the annotator can adjust the prediction result, and the adjusted The latter prediction result is used as the annotation result, and the image to be detected and the annotation result are sent to the model training terminal, so that the model training terminal continues to train the prediction model based on the image to be detected and the annotation result. In addition, the model training terminal may synchronize the trained prediction model to the execution subject after training the prediction model based on the image to be detected and the annotation result. In this way, the above-mentioned execution subject can obtain prediction results with higher accuracy.
本公开的上述实施例提供的方法,通过使用采用如图2或图3所示的实施例描述的方法训练所得的预测模型进行预测操作,可以在模型处于冷启动阶段的情况下获得具有较高准确度的预测结果。The method provided by the above-mentioned embodiment of the present disclosure uses the prediction model trained by the method described in the embodiment shown in FIG. 2 or FIG. 3 to perform the prediction operation, and the prediction operation can be achieved when the model is in the cold start phase. Accuracy of prediction results.
进一步参考图5,作为对上述各图所示方法的实现,本公开提供了一种用于训练模型的装置的一个实施例,该装置实施例与图2所示 的方法实施例相对应,该装置具体可以应用于各种电子设备中。With further reference to FIG. 5, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for training a model. The device embodiment corresponds to the method embodiment shown in FIG. The device can be specifically applied to various electronic devices.
如图5所示,本实施例的用于训练模型的装置500可以包括:获取单元501被配置成获取样本图像集合,样本图像集合中存在第一样本图像和第二样本图像,第一样本图像是对应标注结果的样本图像,第二样本图像是未对应标注结果的样本图像;训练单元502被配置成基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型;处理单元503被配置成执行以下处理步骤:将样本图像集合中的至少一张第二样本图像输入训练所得的预测模型,得到相应的预测结果;将上述至少一张第二样本图像和预测结果发送至标注人员所使用的标注端;获取标注人员对预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练。As shown in FIG. 5, the apparatus 500 for training a model of this embodiment may include: the acquiring unit 501 is configured to acquire a set of sample images, and the first sample image and the second sample image exist in the sample image set. This image is a sample image corresponding to the annotation result, and the second sample image is a sample image that does not correspond to the annotation result; the training unit 502 is configured to train based on the first sample image in the sample image set and its corresponding annotation result Corresponding prediction model; the processing unit 503 is configured to perform the following processing steps: input at least one second sample image in the sample image set into the trained prediction model to obtain the corresponding prediction result; The image and the prediction result are sent to the annotation terminal used by the annotator; the annotation result obtained by the annotator after adjusting the prediction result is obtained, and based on the obtained annotation result and its corresponding sample image, continue to train the prediction model Conduct training.
在本实施例中,用于训练模型的装置500中:获取单元501、训练单元502和处理单元503的具体处理及其所带来的技术效果可分别参考图2所示的实施例中的步骤201、步骤202、步骤203、步骤204和步骤205的相关说明,在此不再赘述。In this embodiment, in the device 500 for training a model: the specific processing of the acquiring unit 501, the training unit 502, and the processing unit 503 and the technical effects brought by them can refer to the steps in the embodiment shown in FIG. 2 respectively. The related description of step 202, step 203, step 204 and step 205 will not be repeated here.
在本实施例的一些可选的实现方式中,处理单元503可以进一步被配置成:在基于获取到的标注结果和其所对应的样本图像,继续对训练所得的预测模型进行训练之后,若样本图像集合中还存在第二样本图像,继续执行上述处理步骤。In some optional implementations of this embodiment, the processing unit 503 may be further configured to: after continuing to train the trained prediction model based on the obtained annotation result and its corresponding sample image, if the sample There is a second sample image in the image set, and the above processing steps are continued.
在本实施例的一些可选的实现方式中,处理单元503可以进一步被配置成:接收标注端返回的标注人员对预测结果进行调整后所得的标注结果。In some optional implementation manners of this embodiment, the processing unit 503 may be further configured to receive the annotation result obtained by the annotator returned by the annotation terminal after adjusting the prediction result.
在本实施例的一些可选的实现方式中,标注端可以用于将标注人员对预测结果进行调整后所得的标注结果存储至指定的存储位置;以及处理单元503可以进一步被配置成:从指定的存储位置获取标注人员对预测结果进行调整后所得的标注结果。In some optional implementations of this embodiment, the labeling terminal may be used to store the labeling result obtained by the labeling personnel after adjusting the prediction result in a designated storage location; and the processing unit 503 may be further configured to: The storage location of to obtain the labeling result obtained by the labeling staff after adjusting the prediction result.
在本实施例的一些可选的实现方式中,样本图像集合中的每张样本图像可以显示有目标对象的面部,目标对象可以为人或动物,标注结果可以用于指示其所对应的样本图像所显示的面部的关键点的位 置,训练所得的预测模型可以用于进行面部关键点定位。In some optional implementations of this embodiment, each sample image in the sample image set may display the face of the target object, the target object may be a human or an animal, and the annotation result may be used to indicate the location of the corresponding sample image. The position of the key points of the displayed face, and the trained prediction model can be used to locate the key points of the face.
本公开的上述实施例提供的装置,通过获取样本图像集合,而后基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型,然后执行以下处理步骤:将样本图像集合中的至少一张第二样本图像输入该预测模型,得到相应的预测结果;将该至少一张第二样本图像和该预测结果发送至标注人员所使用的标注端;获取标注人员对该预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应的样本图像,继续对该预测模型进行训练,可以提高标注效率以及模型预测准确率,有利于模型的冷启动。The device provided by the above-mentioned embodiment of the present disclosure obtains a sample image set, and then trains a corresponding prediction model based on the first sample image in the sample image set and its corresponding annotation result, and then executes the following processing steps: At least one second sample image in the sample image set is input to the prediction model to obtain the corresponding prediction result; the at least one second sample image and the prediction result are sent to the labeling terminal used by the labeler; The annotation result obtained after the prediction result is adjusted, and based on the obtained annotation result and its corresponding sample image, continue to train the prediction model, which can improve the annotation efficiency and model prediction accuracy, which is conducive to the cold start of the model .
进一步参考图6,作为对上述各图所示方法的实现,本公开提供了一种用于预测信息的装置的一个实施例,该装置实施例与图4所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。With further reference to FIG. 6, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for predicting information. The device embodiment corresponds to the method embodiment shown in FIG. 4. The device can be specifically applied to various electronic devices.
如图6所示,本实施例的用于预测信息的装置600可以包括:接收单元601被配置成接收待检测图像;预测单元602被配置成将待检测图像输入预测模型(如采用图2或图3所示实施例描述的方法训练所得的预测模型),得到相应的预测结果。As shown in FIG. 6, the apparatus 600 for predicting information of this embodiment may include: the receiving unit 601 is configured to receive the image to be detected; the prediction unit 602 is configured to input the image to be detected into the prediction model (such as using FIG. 2 or Fig. 3 shows the prediction model obtained by training the method described in the embodiment, and the corresponding prediction result is obtained.
在本实施例中,用于预测信息的装置600中:接收单元601和预测单元602的具体处理及其所带来的技术效果可分别参考图4所示的实施例中的步骤401和步骤402的相关说明,在此不再赘述。In this embodiment, in the apparatus 600 for predicting information: the specific processing of the receiving unit 601 and the predicting unit 602 and the technical effects brought by them can be referred to step 401 and step 402 in the embodiment shown in FIG. 4, respectively. The relevant description of, will not repeat them here.
在本实施例的一些可选的实现方式中,上述装置600还可以包括:发送单元(图中未示出),被配置成将待检测图像和预测结果发送至标注人员所使用的标注端,以使标注人员对预测结果进行调整,并将经调整后的预测结果作为标注结果,以及将待检测图像和标注结果发送至用于对预测模型进行训练的模型训练端,使模型训练端基于待检测图像和标注结果继续对预测模型进行训练。In some optional implementation manners of this embodiment, the above-mentioned device 600 may further include: a sending unit (not shown in the figure) configured to send the image to be detected and the prediction result to the labeling terminal used by the labeling personnel, In this way, the annotator can adjust the prediction result, and use the adjusted prediction result as the annotation result, and send the image to be detected and the annotation result to the model training end used to train the prediction model, so that the model training end is based on the The detection images and annotation results continue to train the prediction model.
本公开的上述实施例提供的装置,通过使用采用如图2或图3所示实施例描述的方法训练所得的预测模型进行预测操作,可以在模型处于冷启动阶段的情况下获得具有较高准确度的预测结果。The device provided by the above-mentioned embodiment of the present disclosure uses the prediction model trained by the method described in the embodiment shown in FIG. 2 or FIG. 3 to perform prediction operations, and can obtain high accuracy when the model is in the cold start phase. The predicted result of the degree.
下面参考图7,其示出了适于用来实现本公开的实施例的电子设备(例如图1中的服务器103、104)700的结构示意图。本公开的实 施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图7示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。Referring now to FIG. 7, it shows a schematic structural diagram of an electronic device (for example, the servers 103 and 104 in FIG. 1) 700 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals ( For example, mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
如图7所示,电子设备700可以包括处理装置(例如中央处理器、图形处理器等)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储装置708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有电子设备700操作所需的各种程序和数据。处理装置701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。As shown in FIG. 7, the electronic device 700 may include a processing device (such as a central processing unit, a graphics processor, etc.) 701, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 702 or from a storage device 708 The program in the memory (RAM) 703 executes various appropriate actions and processing. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to the bus 704.
通常,以下装置可以连接至I/O接口705:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置706;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置707;包括例如硬盘等的存储装置708;以及通信装置709。通信装置709可以允许电子设备700与其他设备进行无线或有线通信以交换数据。虽然图7示出了具有各种装置的电子设备700,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图7中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。Generally, the following devices can be connected to the I/O interface 705: including input devices 706 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speakers, vibration An output device 707 such as a computer; a storage device 708 such as a hard disk; and a communication device 709. The communication device 709 may allow the electronic device 700 to perform wireless or wired communication with other devices to exchange data. Although FIG. 7 shows an electronic device 700 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices. Each block shown in FIG. 7 can represent one device, or can represent multiple devices as needed.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置709从网络上被下载和安装,或者从存储装置708被安装,或者从ROM 702被安装。在该计算机程序被处理装置701执行时,执行本公开的实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
需要说明的是,本公开的实施例所述的计算机可读介质可以是计 算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium described in the embodiment of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device . The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取样本图像集合,样本图像集合中存在第一样本图像和第二样本图像,第一样本图像是对应标注结果的样本图像,第二样本图像是未对应标注结果的样本图像;基于样本图像集合中的第一样本图像和其所对应的标注结果,训练得到相应的预测模型;执行以下处理步骤:将样本图像集合中的至少一张第二样本图像输入训练所得的预测模型,得到相应的预测结果;将上述至少一张第二样本图像和预测结果发送至标注人员所使用的标注端;获取标注人员对预测结果进行调整后所得的标注结果,并基于获取到的标注结果和其所对应 的样本图像,继续对训练所得的预测模型进行训练。或者,也可以使得该电子设备:接收与以上预测模型相关联的待检测图像;将待检测图像输入该预测模型,得到相应的预测结果。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires a sample image set, and the sample image set contains the first sample image and the second sample image. Sample image, the first sample image is a sample image corresponding to the annotation result, and the second sample image is a sample image that does not correspond to the annotation result; based on the first sample image in the sample image set and its corresponding annotation result, the training is obtained Corresponding prediction model; perform the following processing steps: input at least one second sample image in the sample image set into the trained prediction model to obtain the corresponding prediction result; send the above at least one second sample image and the prediction result to The labeling terminal used by the labeling personnel; obtaining the labeling results obtained after the labeling personnel have adjusted the prediction results, and continuing to train the trained prediction model based on the obtained labeling results and the corresponding sample images. Alternatively, the electronic device can also be made to: receive the image to be detected associated with the above prediction model; input the image to be detected into the prediction model to obtain the corresponding prediction result.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的实施例的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code for performing the operations of the embodiments of the present disclosure can be written in one or more programming languages or a combination thereof, the programming languages including object-oriented programming languages such as Java, Smalltalk, C++, Also includes conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user’s computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元还可以被描述为“获取样本图像集合的单元”。The units involved in the embodiments described in the present disclosure may be implemented in a software manner, or may be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation on the unit itself under certain circumstances. For example, the acquisition unit can also be described as a "unit for acquiring a collection of sample images".
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限 于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in this disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover the above technical features or technical solutions without departing from the above disclosed concept. Other technical solutions formed by any combination of its equivalent features. For example, the above-mentioned features and the technical features disclosed in the present disclosure (but not limited to) with similar functions are mutually replaced to form a technical solution.