Movatterモバイル変換


[0]ホーム

URL:


CN114495053A - Label distribution method and device - Google Patents

Label distribution method and device
Download PDF

Info

Publication number
CN114495053A
CN114495053ACN202210008701.4ACN202210008701ACN114495053ACN 114495053 ACN114495053 ACN 114495053ACN 202210008701 ACN202210008701 ACN 202210008701ACN 114495053 ACN114495053 ACN 114495053A
Authority
CN
China
Prior art keywords
frame
sample
marked
confidence
points
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
CN202210008701.4A
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.)
Beijing Horizon Information Technology Co Ltd
Original Assignee
Beijing Horizon Information 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 Beijing Horizon Information Technology Co LtdfiledCriticalBeijing Horizon Information Technology Co Ltd
Priority to CN202210008701.4ApriorityCriticalpatent/CN114495053A/en
Publication of CN114495053ApublicationCriticalpatent/CN114495053A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the disclosure discloses a label distribution method and a device, wherein the label distribution method comprises the following steps: calculating a confidence level of a sample point in the image for the at least one marker box; selecting k candidate points for the mark frame from the sample points based on the intersection ratio of the sample points and the mark frame, wherein k is a preset positive integer; assigning labels to the k candidate points based on the confidence of the sample point for the marker box. When the label is allocated, the confidence degree of the sample point for the marking frame and the intersection ratio of the sample point and the marking frame are combined, and the accuracy of label allocation can be improved.

Description

Translated fromChinese
一种标签分配方法及装置Method and device for assigning labels

技术领域technical field

本公开涉及目标检测技术领域,尤其是一种标签分配方法及装置。The present disclosure relates to the technical field of target detection, in particular to a label distribution method and device.

背景技术Background technique

标签分配是目标检测在模型训练阶段的一个重要步骤,通常用于区分模型训练阶段中的各个样本的正负属性。Label assignment is an important step in the model training phase of object detection, which is usually used to distinguish the positive and negative attributes of each sample in the model training phase.

但是,目前的标签分配技术往往准确度较低,进而会影响到目标检测的准确度。因此,如何提供一种准确度较高的标签分配方法成为亟需解决的问题。However, the current label assignment technology often has low accuracy, which in turn affects the accuracy of target detection. Therefore, how to provide a label assignment method with high accuracy has become an urgent problem to be solved.

发明内容SUMMARY OF THE INVENTION

为了解决上述技术问题,提出了本公开。本公开的实施例提供了一种标签分配方法及装置。In order to solve the above-mentioned technical problems, the present disclosure is made. Embodiments of the present disclosure provide a label distribution method and apparatus.

根据本公开实施例的一个方面,提供了一种标签分配方法,包括:According to an aspect of the embodiments of the present disclosure, there is provided a method for assigning labels, including:

计算图像中的样本点针对至少一个标记框的置信度;Calculate the confidence of the sample points in the image for at least one marked frame;

基于所述样本点与所述标记框的交并比,从所述样本点中为所述标记框选择k个候选点,其中,k为预设的正整数;Based on the intersection ratio of the sample point and the marker frame, k candidate points are selected for the marker frame from the sample points, where k is a preset positive integer;

基于所述样本点针对所述标记框的置信度,为所述k个候选点分配标签。Labels are assigned to the k candidate points based on the confidence of the sample points with respect to the labeled frame.

根据本公开实施例的又一个方面,提供了一种标签分配装置,包括:According to yet another aspect of the embodiments of the present disclosure, there is provided a label dispensing device, comprising:

置信度计算模块,用于计算图像中的样本点针对至少一个标记框的置信度;a confidence calculation module, used to calculate the confidence of the sample points in the image for at least one marked frame;

候选点确定模块,用于基于所述样本点与所述标记框的交并比,从所述样本点中为所述标记框选择k个候选点,k为预设的正整数;a candidate point determination module, configured to select k candidate points for the marked frame from the sample points based on the intersection ratio of the sample point and the marked frame, where k is a preset positive integer;

标签分配模块,用于基于所述置信度计算模块得到的所述样本点针对所述标记框的置信度,为所述候选点确定模块确定的所述k个候选点分配标签。The label assignment module is configured to assign labels to the k candidate points determined by the candidate point determination module based on the confidence degree of the sample points with respect to the marked frame obtained by the confidence degree calculation module.

根据本公开实施例的又一个方面,提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行本公开上述任一实施例所述的标签分配方法。According to yet another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, where the storage medium stores a computer program, and the computer program is used to execute the method for assigning labels according to any one of the foregoing embodiments of the present disclosure.

根据本公开实施例的又一个方面,提供了一种电子设备,所述电子设备包括:According to yet another aspect of the embodiments of the present disclosure, there is provided an electronic device, the electronic device comprising:

处理器;processor;

用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;

所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现本公开上述任一实施例所述的标签分配方法。The processor is configured to read the executable instructions from the memory, and execute the instructions to implement the tag allocation method described in any of the above embodiments of the present disclosure.

基于本公开上述实施例提供的标签分配方法和装置、计算机可读存储介质和电子设备,在进行标签分配时,首先计算样本点针对标记框的置信度,并且基于样本点与标记框的交并比,从样本点中为标记框选择k个候选点,然后基于样本点针对标记框的置信度,为该k个候选点分配标签。也就是说,通过本公开的方案进行标签分配时,结合了样本点针对标记框的置信度和样本点与标记框的交并比。Based on the label assignment method and device, computer-readable storage medium, and electronic device provided by the foregoing embodiments of the present disclosure, when performing label assignment, first calculate the confidence of the sample point with respect to the marker frame, and based on the intersection of the sample point and the marker frame Compared with the sample points, k candidate points are selected for the marker frame, and then labels are assigned to the k candidate points based on the confidence of the sample points for the marker frame. That is to say, when the label assignment is performed by the solution of the present disclosure, the confidence of the sample point with respect to the marker frame and the intersection ratio of the sample point and the marker frame are combined.

现有技术在进行标签分配时,只应用样本点针对标记框的置信度。与现有技术相比,本公开实施例的标签分配方法在进行标签分配时,应用的信息更多样化,因此,本公开实施例的方案能够提高标签分配的准确度,进一步的,也能够提高目标检测的准确度。When performing label assignment in the prior art, only the confidence level of the sample point with respect to the marked frame is applied. Compared with the prior art, the label assignment method of the embodiment of the present disclosure applies more diverse information when performing label assignment. Therefore, the solution of the embodiment of the present disclosure can improve the accuracy of label assignment, and further, can also Improve the accuracy of object detection.

附图说明Description of drawings

通过结合附图对本申请实施例进行更详细的描述,本申请的上述以及其他目的、特征和优势将变得更加明显。附图用来提供对本申请实施例的进一步理解,并且构成说明书的一部分,与本申请实施例一起用于解释本申请,并不构成对本申请的限制。在附图中,相同的参考标号通常代表相同部件或步骤。The above and other objects, features and advantages of the present application will become more apparent from the detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present application, constitute a part of the specification, and are used to explain the present application together with the embodiments of the present application, and do not constitute a limitation to the present application. In the drawings, the same reference numbers generally refer to the same components or steps.

图1是本公开所适用的设备示意图。FIG. 1 is a schematic diagram of a device to which the present disclosure is applicable.

图2是本公开一示例性实施例提供的标签分配方法的流程示意图。FIG. 2 is a schematic flowchart of a label assignment method provided by an exemplary embodiment of the present disclosure.

图3是本公开另一示例性实施例提供的标签分配方法的流程示意图。FIG. 3 is a schematic flowchart of a label assignment method provided by another exemplary embodiment of the present disclosure.

图4是本公开另一示例性实施例提供的标签分配方法的流程示意图。FIG. 4 is a schematic flowchart of a label assignment method provided by another exemplary embodiment of the present disclosure.

图5是本公开另一示例性实施例提供的标签分配方法的流程示意图。FIG. 5 is a schematic flowchart of a label assignment method provided by another exemplary embodiment of the present disclosure.

图6是本公开一示例性实施例提供的标签分配方法的场景示例图。FIG. 6 is a schematic diagram of a scenario of a label assignment method provided by an exemplary embodiment of the present disclosure.

图7是本公开另一示例性实施例提供的标签分配方法的流程示意图。FIG. 7 is a schematic flowchart of a label assignment method provided by another exemplary embodiment of the present disclosure.

图8是本公开一示例性实施例提供的标签分配装置的结构示意图。FIG. 8 is a schematic structural diagram of a label dispensing apparatus provided by an exemplary embodiment of the present disclosure.

图9是本公开另一示例性实施例提供的标签分配装置的结构示意图。FIG. 9 is a schematic structural diagram of a label dispensing device provided by another exemplary embodiment of the present disclosure.

图10是本公开另一示例性实施例提供的标签分配装置的结构示意图。FIG. 10 is a schematic structural diagram of a label dispensing apparatus provided by another exemplary embodiment of the present disclosure.

图11是本公开另一示例性实施例提供的标签分配装置的结构示意图。FIG. 11 is a schematic structural diagram of a label dispensing apparatus provided by another exemplary embodiment of the present disclosure.

图12是本公开一示例性实施例提供的用于实现标签分配方法的网络架构的结构示例图。FIG. 12 is a structural example diagram of a network architecture for implementing a label assignment method provided by an exemplary embodiment of the present disclosure.

图13是本公开一示例性实施例提供的电子设备的结构图。FIG. 13 is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure.

具体实施方式Detailed ways

下面,将参考附图详细地描述根据本申请的示例实施例。显然,所描述的实施例仅仅是本申请的一部分实施例,而不是本申请的全部实施例,应理解,本申请不受这里描述的示例实施例的限制。Hereinafter, exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein.

应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。It should be noted that the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

本领域技术人员可以理解,本公开实施例中的“第一”、“第二”等术语仅用于区别不同步骤、设备或模块等,既不代表任何特定技术含义,也不表示它们之间的必然逻辑顺序。Those skilled in the art can understand that terms such as "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices, or modules, etc., and neither represent any specific technical meaning, nor represent any difference between them. the necessary logical order of .

还应理解,在本公开实施例中,“多个”可以指两个或两个以上,“至少一个”可以指一个、两个或两个以上。It should also be understood that, in the embodiments of the present disclosure, "a plurality" may refer to two or more, and "at least one" may refer to one, two or more.

还应理解,对于本公开实施例中提及的任一部件、数据或结构,在没有明确限定或者在前后文给出相反启示的情况下,一般可以理解为一个或多个。It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more in the case of no explicit definition or contrary indications given in the context.

另外,本公开中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本公开中字符“/”,一般表示前后关联对象是一种“或”的关系。In addition, the term "and/or" in the present disclosure is only an association relationship to describe associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, and A and B exist at the same time , there are three cases of B alone. In addition, the character "/" in the present disclosure generally indicates that the related objects are an "or" relationship.

还应理解,本公开对各个实施例的描述着重强调各个实施例之间的不同之处,其相同或相似之处可以相互参考,为了简洁,不再一一赘述。It should also be understood that the description of the various embodiments in the present disclosure emphasizes the differences between the various embodiments, and the same or similar points can be referred to each other, and for the sake of brevity, they will not be repeated.

同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。Meanwhile, it should be understood that, for the convenience of description, the dimensions of various parts shown in the accompanying drawings are not drawn in an actual proportional relationship.

以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application or uses in any way.

对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such techniques, methods, and apparatus should be considered part of the specification.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further discussion in subsequent figures.

本公开实施例可以应用于终端设备、计算机系统、服务器等电子设备,其可与众多其它通用或专用计算系统环境或配置一起操作。适于与终端设备、计算机系统、服务器等电子设备一起使用的众所周知的终端设备、计算系统、环境和/或配置的例子包括但不限于:个人计算机系统、服务器计算机系统、瘦客户机、厚客户机、手持或膝上设备、基于微处理器的系统、机顶盒、可编程消费电子产品、网络个人电脑、小型计算机系统、大型计算机系统和包括上述任何系统的分布式云计算技术环境,等等。Embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with numerous other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal equipment, computing systems, environments and/or configurations suitable for use with terminal equipment, computer systems, servers, etc. electronic equipment include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients computer, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the foregoing, among others.

终端设备、计算机系统、服务器等电子设备可以在由计算机系统执行的计算机系统可执行指令(诸如程序模块)的一般语境下描述。通常,程序模块可以包括例程、程序、目标程序、组件、逻辑、数据结构等等,它们执行特定的任务或者实现特定的抽象数据类型。计算机系统/服务器可以在分布式云计算环境中实施,分布式云计算环境中,任务是由通过通信网络链接的远程处理设备执行的。在分布式云计算环境中,程序模块可以位于包括存储设备的本地或远程计算系统存储介质上。Electronic devices such as terminal devices, computer systems, servers, etc., may be described in the general context of computer system-executable instructions, such as program modules, being executed by the computer system. Generally, program modules may include routines, programs, object programs, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. Computer systems/servers may be implemented in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located on local or remote computing system storage media including storage devices.

申请概述Application overview

在目标检测过程中,标签分配是一个重要的步骤。其中,在目标检测过程中,通常会应用支持目标检测功能的模型,在对该模型进行训练的阶段,往往需要通过标签分配技术,确定训练阶段中各个样本的正负属性,并为其中的正样本分配相应的标签。Label assignment is an important step in the object detection process. Among them, in the process of target detection, a model that supports the target detection function is usually applied. In the stage of training the model, it is often necessary to use label assignment technology to determine the positive and negative attributes of each sample in the training stage, and determine the positive and negative attributes of the samples. The samples are assigned corresponding labels.

其中,目标检测技术广泛应用于多种场景。示例性的,在辅助驾驶或自动驾驶的应用场景下,车辆可通过车载摄像头拍摄车辆所在道路的图像,然后通过目标检测技术识别道路上存在的路标和道路边沿等。相应的,在多种目标检测的场景下,需要应用到标签分配技术。Among them, target detection technology is widely used in a variety of scenarios. Exemplarily, in the application scenario of assisted driving or automatic driving, the vehicle can use the on-board camera to capture the image of the road where the vehicle is located, and then use the target detection technology to identify road signs and road edges on the road. Correspondingly, in a variety of target detection scenarios, label assignment technology needs to be applied.

相关的现有标签分配技术通常只根据样本的置信度进行标签分配,例如通过现有的自动标签分配技术进行标签分配时,首先计算样本的置信度,然后根据样本的置信度确定其中的正样本,为正样本分配相应的标签。Related existing label assignment technologies usually only assign labels based on the confidence of the samples. For example, when assigning labels through the existing automatic label assignment technology, the confidence of the samples is first calculated, and then the positive samples are determined according to the confidence of the samples. , assigning corresponding labels to positive samples.

但是,在实现本公开的过程中,发明人发现,通过现有技术进行标签分配时,至少存在以下问题:标签分配的准确度较低。也就是说,通过现有技术进行标签分配时,有时无法准确为样本分配相应的标签。However, in the process of realizing the present disclosure, the inventors found that when performing label assignment by the prior art, at least the following problems exist: the accuracy of label assignment is low. That is to say, when labels are assigned by the prior art, sometimes the corresponding labels cannot be accurately assigned to the samples.

有鉴于此,本公开实施例提供一种标签分配方法及装置。通过本公开的方案分配标签时,能够结合样本点的置信度以及样本点与标记框之间的交并比,从而能够提高标签分配的准确度。In view of this, embodiments of the present disclosure provide a method and apparatus for assigning labels. When assigning labels through the solution of the present disclosure, the confidence of the sample points and the intersection ratio between the sample points and the marked frame can be combined, so that the accuracy of label assignment can be improved.

示例性系统Exemplary System

本公开实施例可应用于需要进行标签分配的应用场景中,该应用场景可包括辅助驾驶、自动驾驶或机器人控制等应用场景。The embodiments of the present disclosure may be applied to application scenarios that require label assignment, and the application scenarios may include application scenarios such as assisted driving, automatic driving, or robot control.

例如,在辅助驾驶或自动驾驶的应用场景中,可由车载摄像头拍摄车辆所在道路的图像,然后车辆的服务器通过目标检测技术,识别该图像中包含的道路边沿和路标等。这一目标检测的场景下,往往需要应用标签分配技术。For example, in the application scenario of assisted driving or automatic driving, the image of the road where the vehicle is located can be captured by the on-board camera, and then the vehicle's server uses the target detection technology to identify the road edges and road signs contained in the image. In this target detection scenario, label assignment technology is often required.

在机器人控制的应用场景中,可拍摄机器人行进前方的道路的图像,然后通过目标检测技术,识别机器人行进前方的障碍物,以便该机器人据此调整行进的路径。这一目标检测的场景下,往往也会应用到标签分配技术。In the application scenario of robot control, the image of the road ahead of the robot can be taken, and then through the target detection technology, the obstacles in front of the robot can be identified, so that the robot can adjust the travel path accordingly. In this target detection scenario, label assignment technology is often applied.

用于实现本公开实施例的标签分配方法的设备可为计算机、智能驾驶控制设备或服务器(例如车载服务器)等电子设备,并且在图1中公开一种该设备的示例图。The device for implementing the label assignment method of the embodiment of the present disclosure may be an electronic device such as a computer, an intelligent driving control device, or a server (eg, a vehicle-mounted server), and an exemplary diagram of the device is disclosed in FIG. 1 .

参见图1,该设备可包括成像装置10、神经网络模块20和标签分配模块30。Referring to FIG. 1 , the apparatus may include animaging device 10 , aneural network module 20 and alabel assignment module 30 .

其中,该成像装置10可拍摄图像,该图像中包括需要进行标签分配的样本。例如,在辅助驾驶或自动驾驶的应用场景中,该成像装置10可为车载摄像头,该车载摄像头可拍摄车辆所在道路的图像,该车辆所在道路的图像中包括需要进行标签分配的样本。Wherein, theimaging device 10 can capture an image, and the image includes a sample that needs to be assigned a label. For example, in an application scenario of assisted driving or automatic driving, theimaging device 10 may be an in-vehicle camera, and the in-vehicle camera can capture an image of the road where the vehicle is located, and the image of the road where the vehicle is located includes samples that need to be assigned labels.

该神经网络模块20可包括支持获取特征图像的神经网络模型,例如,该神经网络模块20可为特征金字塔网络(Feature Pyramid Networks,FPN)。该神经网络模块20可提取图像的特征,获取不同层级的特征图像(即feature map),并向标签分配模块30传输该特征图像。Theneural network module 20 may include a neural network model that supports acquiring feature images. For example, theneural network module 20 may be a feature pyramid network (Feature Pyramid Networks, FPN). Theneural network module 20 can extract features of the image, obtain feature images (ie, feature maps) at different levels, and transmit the feature images to thelabel assignment module 30 .

标签分配模块30在获取特征图像之后,可通过本公开实施例的标签分配方法,基于样本点针对标记框的置信度和交并比,确定样本点的标签,实现标签分配。After acquiring the feature image, thelabel assignment module 30 can determine the label of the sample point based on the confidence of the sample point with respect to the marked frame and the intersection ratio by using the label assignment method of the embodiment of the present disclosure, so as to realize the label assignment.

示例性方法Exemplary method

图2是本公开一示例性实施例提供的标签分配方法的流程示意图。本实施例可应用在电子设备上,如图2所示,包括如下步骤:FIG. 2 is a schematic flowchart of a label assignment method provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to an electronic device, as shown in FIG. 2 , including the following steps:

步骤201,计算图像中的样本点针对至少一个标记框的置信度。Step 201: Calculate the confidence of the sample points in the image with respect to at least one marked frame.

其中,该图像通常指的是特征图像(即feature map),该特征图像包含语义信息。在一个示例中,可为通过FPN模型提取不同层级的特征图像。Among them, the image usually refers to a feature image (ie, feature map), and the feature image contains semantic information. In one example, feature images of different levels can be extracted by the FPN model.

该标记框通常指的是真实框(ground truth box,gt_box),标记框内的各个像素点为图像中的样本点。The marked box usually refers to the ground truth box (gt_box), and each pixel in the marked box is a sample point in the image.

在一个可选的示例中,计算图像中的样本点针对至少一个标记框的置信度时,可计算标记框内的样本点针对该标记框的置信度。例如,如果在图像中包括标记框1、标记框2和标记框3,则在计算样本点针对标记框1的置信度时,可计算标记框1内的各个样本点针对标记框1的置信度。In an optional example, when calculating the confidence of a sample point in the image with respect to at least one marked frame, the confidence of a sample point in the marked frame with respect to the marked frame may be calculated. For example, if the image includes marker frame 1, marker frame 2 and marker frame 3, when calculating the confidence of the sample points for marker frame 1, the confidence of each sample point in marker frame 1 for marker frame 1 can be calculated .

在另一个可选的示例中,如果标记框包括多个,计算图像中的样本点针对至少一个标记框的置信度时,可计算该多个标记框内包含的各个样本点分别针对各个标记框的置信度。这一示例中,在计算样本点针对某一个标记框的置信度时,还考虑到了其他标记框内的样本点,因此能够提高标签分配的准确度。In another optional example, if there are multiple marker frames, when calculating the confidence of the sample points in the image with respect to at least one marker frame, each sample point included in the multiple marker frames may be calculated for each marker frame respectively. confidence. In this example, when calculating the confidence of a sample point with respect to a certain marker frame, the sample points in other marker frames are also considered, so the accuracy of label assignment can be improved.

例如,如果在图像中包括标记框1、标记框2和标记框3,则在计算样本点针对标记框1的置信度时,可计算标记框1、标记框2和标记框3中包含的样本点针对标记框1的置信度,这种情况下,由于在计算样本点针对标记框1的置信度时,还考虑了标记框2和标记框3中的样本点,从而能够提高标签分配的准确度。For example, if marker box 1, marker box 2, and marker box 3 are included in the image, when calculating the confidence of a sample point for marker box 1, the samples contained in marker box 1, marker box 2, and marker box 3 can be calculated In this case, when calculating the confidence of the sample point against the marker frame 1, the sample points in the marker frame 2 and the marker frame 3 are also considered, so that the accuracy of label assignment can be improved. Spend.

步骤S202、基于所述样本点与所述标记框的交并比,从所述样本点中为所述标记框选择k个候选点,其中,k为预设的正整数。Step S202 , based on the intersection ratio of the sample point and the marker frame, select k candidate points for the marker frame from the sample points, where k is a preset positive integer.

样本点与标记框的交并比(intersection over union,IoU),通常指的是样本点与标记框的交集和并集的比值。The intersection over union (IoU) of the sample point and the marked frame usually refers to the ratio of the intersection and union of the sample point and the marked frame.

在一个可选的示例中,从样本点中为标记框选择k个候选点,指的是从该标记框内的样本点中选择k个候选点。In an optional example, selecting k candidate points for the marker frame from the sample points refers to selecting k candidate points from the sample points in the marker frame.

在另一个可选的示例中,如果标记框包括多个,可从多个标记框对应的样本点中,分别为各个标记框选择候选点。这一示例中,在为每个标记框选择候选点时,还考虑到了其他标记框内的样本点,能够提高标签分配的准确度。In another optional example, if there are multiple marker frames, candidate points may be selected for each marker frame from the sample points corresponding to the multiple marker frames. In this example, when selecting candidate points for each marker box, the sample points in other marker boxes are also considered, which can improve the accuracy of label assignment.

例如,如果在图像中包括标记框1、标记框2和标记框3,则在为标记框1选择候选点时,可从标记框1、标记框2和标记框3中包含的样本点中选择标记框1的候选点。For example, if marker box 1, marker box 2 and marker box 3 are included in the image, when selecting candidate points for marker box 1, the sample points contained in marker box 1, marker box 2 and marker box 3 can be selected from the sample points contained in marker box 1, marker box 2 and marker box 3 Mark the candidate points for box 1.

另外,该步骤中,k可为预设的正整数,例如,k可为10,这种情况下,该步骤从各个样本点中为标记框选择10个候选点。In addition, in this step, k may be a preset positive integer, for example, k may be 10, in this case, this step selects 10 candidate points for the marker frame from each sample point.

当有多个标记框时,不同标记框对应的k的具体数值可以相同或不同,即在该步骤中,不同标记框的候选点的数量可以相同或不同。When there are multiple marker frames, the specific values of k corresponding to different marker frames may be the same or different, that is, in this step, the number of candidate points of different marker frames may be the same or different.

在一个可行的示例中,可预先设定标记框包含像素点的数量与k的对应关系,然后根据该对应关系以及各个标记框内的像素点的数量,确定各个标记框对应的k的具体数值。In a feasible example, the correspondence between the number of pixels contained in the marker frame and k can be preset, and then the specific value of k corresponding to each marker frame is determined according to the correspondence and the number of pixels in each marker frame .

其中,该对应关系可指示包含较多像素点的标记框对应的k值较大,即包含较多像素点的标记框的候选点较多。例如,如果某一个标记框内的像素点较少,该对应关系指示该标记框对应的k为5,即为该标记框选择5个候选点;如果某一个标记框内的像素点较多,该对应关系指示该标记框对应的k为15,即为该标记框选择15个候选点。The corresponding relationship may indicate that a marked frame containing more pixels has a larger k value, that is, a marked frame containing more pixels has more candidate points. For example, if there are fewer pixels in a marked frame, the correspondence indicates that the corresponding k of the marked frame is 5, that is, 5 candidate points are selected for the marked frame; if there are many pixels in a marked frame, The correspondence indicates that k corresponding to the marker frame is 15, that is, 15 candidate points are selected for the marker frame.

步骤S203、基于所述样本点针对所述标记框的置信度,为所述k个候选点分配标签。Step S203 , assigning labels to the k candidate points based on the confidence of the sample points with respect to the marked frame.

该步骤中,可基于样本点针对标记框的置信度,从k个候选点中选择标记框的正样本,并为该正样本分配相应的标签。In this step, a positive sample of the marked frame may be selected from the k candidate points based on the confidence of the sample points with respect to the marked frame, and a corresponding label may be assigned to the positive sample.

本公开的标签分配方法中,首先计算样本点针对标记框的置信度,并且基于样本点与标记框的交并比,从样本点中为标记框选择k个候选点,然后基于样本点针对标记框的置信度,为该k个候选点分配标签。也就是说,通过本公开的方案进行标签分配时,结合了样本点针对标记框的置信度和样本点与标记框的交并比。In the label assignment method of the present disclosure, the confidence of the sample points for the marker frame is first calculated, and based on the intersection ratio between the sample points and the marker frame, k candidate points are selected for the marker frame from the sample points, and then based on the sample points, the marker The confidence of the box, assign a label to the k candidate points. That is to say, when the label assignment is performed by the solution of the present disclosure, the confidence of the sample point with respect to the marker frame and the intersection ratio of the sample point and the marker frame are combined.

现有技术在进行标签分配时,只应用样本点针对标记框的置信度。与现有技术相比,本公开实施例的标签分配方法在进行标签分配时,应用的信息更多样化,因此,本公开实施例的方案能够提高标签分配的准确度。When performing label assignment in the prior art, only the confidence level of the sample point with respect to the marked frame is applied. Compared with the prior art, when the label assignment method of the embodiment of the present disclosure is used for label assignment, the applied information is more diverse. Therefore, the solution of the embodiment of the present disclosure can improve the accuracy of label assignment.

图3是本公开另一示例性实施例提供的标签分配方法的流程示意图。如图3所示,在上述图2所示实施例基础上,步骤S202包括以下步骤S2021和S2022。FIG. 3 is a schematic flowchart of a label assignment method provided by another exemplary embodiment of the present disclosure. As shown in FIG. 3 , on the basis of the above-mentioned embodiment shown in FIG. 2 , step S202 includes the following steps S2021 and S2022 .

步骤S2021、比较不同的所述样本点分别与所述标记框的交并比。Step S2021 , comparing the intersection ratios of the different sample points and the marked frame respectively.

步骤S2022、基于所述交并比的比较结果,从所述样本点中为所述标记框选择k个候选点,所述k个候选点与所述标记框的交并比不小于其他样本点与所述标记框的交并比。Step S2022, based on the comparison result of the intersection ratio, select k candidate points for the marker frame from the sample points, and the intersection ratio of the k candidate points and the marker frame is not less than other sample points. Compare with the intersection of the marked box.

通常样本点与标记框的交并比较大时,该样本点为正样本的可能性较高。而通过步骤S2021至步骤S2022的操作,确定的候选点与标记框的交并比不小于其他样本点与标记框的交并比,因此,通过这一操作所选择候选点为正样本的可能性较高,有助于提高标签分配的准确度。Usually, when the intersection of the sample point and the marked frame is relatively large, the sample point is more likely to be a positive sample. However, through the operations from steps S2021 to S2022, the determined intersection ratio of the candidate point and the marked frame is not less than the intersection ratio of other sample points and the marked frame. Therefore, the candidate point selected through this operation has the possibility of being a positive sample higher, which helps to improve the accuracy of label assignment.

图4是本公开另一示例性实施例提供的标签分配方法的流程示意图。如图4所示,在上述图2所示实施例基础上,步骤S203包括以下步骤S2031和S2033。FIG. 4 is a schematic flowchart of a label assignment method provided by another exemplary embodiment of the present disclosure. As shown in FIG. 4 , on the basis of the above-mentioned embodiment shown in FIG. 2 , step S203 includes the following steps S2031 and S2033 .

步骤S2031、基于所述标记框的k个候选点,确定所述标记框的正样本数量。Step S2031: Determine the number of positive samples of the marked frame based on the k candidate points of the marked frame.

在一个可选的示例中,可通过以下方式确定所述标记框的正样本数量:In an optional example, the number of positive samples of the marked box can be determined by:

首先,计算k个候选点与标记框的交并比之和;然后,若所述交并比之和大于1,确定所述k个候选点与所述标记框的交并比之和中的整数部分为所述所述标记框的正样本数量;若所述交并比之和不大于1,确定所述标记框的正样本数量为1。First, calculate the sum of the intersection ratios of the k candidate points and the marked frame; then, if the sum of the intersection ratios is greater than 1, determine the sum of the intersection ratios of the k candidate points and the marked frame. The integer part is the number of positive samples of the marked frame; if the sum of the intersection ratios is not greater than 1, the number of positive samples of the marked frame is determined to be 1.

例如,如果某一个标记框的k个候选点与该标记框的交并比之和为3.56,则该标记框的正样本数量为3;若某一个标记框的k个候选点与该标记框的交并比之和为0.8,则该标记框的正样本数量为1。For example, if the sum of the intersection ratios of k candidate points of a marker box and the marker box is 3.56, the number of positive samples of the marker box is 3; The sum of the intersection and union ratios is 0.8, then the number of positive samples for the marked box is 1.

步骤S2032、基于所述标记框的正样本数量和所述样本点针对所述标记框的置信度,从所述标记框的k个候选点内选择所述标记框的正样本。Step S2032 , based on the number of positive samples of the marked frame and the confidence of the sample points with respect to the marked frame, select a positive sample of the marked frame from among the k candidate points of the marked frame.

另外,该k个候选点内未被确定为正样本的其他样本点,可确定为该标记框的负样本。In addition, other sample points within the k candidate points that are not determined as positive samples may be determined as negative samples of the marked frame.

步骤S2033、为所述标记框的正样本分配所述标记框对应的标签。Step S2033: Assign a label corresponding to the marked frame to the positive sample of the marked frame.

例如,如果所述标记框对应的标签为道路边沿,则为该标记框的正样本分配的标签为道路边沿。For example, if the label corresponding to the marked frame is a road edge, the label assigned to the positive sample of the marked frame is a road edge.

通过步骤S2021至步骤S2022的操作可知,标记框的k个候选点基于样本点与标记框的交并比确定。而在步骤S2031至步骤S2033的实施例中,基于标记框的正样本数量和样本点针对标记框的置信度,确定候选点内的正样本,而标记框的正样本数量基于标记框的k个候选点确定,因此,该实施例在确定正样本的过程中结合了样本点与标记框的交并比,以及样本点针对标记框的置信度,从而能够有效提高标签分配的准确度。Through the operations from steps S2021 to S2022, it can be known that the k candidate points of the marked frame are determined based on the intersection ratio between the sample point and the marked frame. In the embodiment from steps S2031 to S2033, the positive samples in the candidate points are determined based on the number of positive samples in the marked frame and the confidence of the sample points for the marked frame, and the number of positive samples in the marked frame is based on the k number of marked frames The candidate point is determined. Therefore, in the process of determining the positive sample, this embodiment combines the intersection ratio of the sample point and the marked frame, and the confidence of the sample point to the marked frame, so that the accuracy of label assignment can be effectively improved.

为了进一步明确步骤S2032中确定标记框的正样本的方式,本公开提供图5。图5是本公开另一示例性实施例提供的标签分配方法的流程示意图,在上述图2所示实施例基础上,步骤S2032包括以下步骤S20321和S20323。In order to further clarify the manner of determining the positive samples of the marked frame in step S2032, the present disclosure provides FIG. 5 . FIG. 5 is a schematic flowchart of a label assignment method provided by another exemplary embodiment of the present disclosure. On the basis of the embodiment shown in FIG. 2 above, step S2032 includes the following steps S20321 and S20323.

步骤S20321、比较所述k个候选点分别针对所述标记框的置信度。Step S20321: Compare the respective confidences of the k candidate points with respect to the marked frame.

步骤S20322、基于所述k个候选点分别针对所述标记框的置信度的比较结果,从所述k个候选点内选择n个候选点作为第一样本点。Step S20322: Based on the comparison results of the respective confidence levels of the k candidate points with respect to the marked frame, select n candidate points from the k candidate points as the first sample points.

其中,n为所述标记框的正样本数量,并且n为不大于k的正整数,所述第一样本点针对所述标记框的置信度不小于其他候选点针对所述标记框的置信度。Wherein, n is the number of positive samples of the marked frame, and n is a positive integer not greater than k, and the confidence of the first sample point with respect to the marked frame is not less than the confidence of other candidate points with respect to the marked frame Spend.

如果在这一实施例中,所述标记框的正样本数量为k个候选点与标记框的交并比之和中的整数部分,即n=k个候选点与标记框的交并比之和中的整数部分,例如,如果某一个标记框有10个候选点,这10个候选点与标记框的交并比之和为3.5,则n=3。If in this embodiment, the number of positive samples of the marked frame is the integer part of the sum of the intersection ratios of k candidate points and the marked frame, that is, n = the intersection ratio of k candidate points and the marked frame The integer part of the sum, for example, if a certain marker frame has 10 candidate points, and the sum of the intersection ratios of these 10 candidate points and the marker frame is 3.5, then n=3.

另外,由于在这一步骤中,第一样本点针对所述标记框的置信度不小于其他候选点针对所述标记框的置信度,因此,该n个第一样本点为k个候选点中,置信度较高的候选点。In addition, since in this step, the confidence of the first sample point with respect to the marked frame is not less than the confidence of other candidate points with respect to the marked frame, the n first sample points are k candidates Among the points, candidate points with higher confidence.

步骤S20323、基于所述第一样本点与所述标记框的关系,确定所述标记框的正样本。Step S20323: Determine a positive sample of the marked frame based on the relationship between the first sample point and the marked frame.

其中,第一样本点与标记框的关系可包括:该第一样本点只为一个标记框的第一样本点,以及该第一样本点为至少两个标记框的第一样本点。The relationship between the first sample point and the marker frame may include: the first sample point is only the first sample point of one marker frame, and the first sample point is the first sample point of at least two marker frames. this point.

在图像中,不同的物体之间有时会发生重叠。例如,如果有行人站在道路边沿时,行人的脚部可能会和道路边沿发生重叠;道路上的车辆可能会和放置在道路两边的建筑物发生重叠。如果不同的物体发生重叠,则第一样本点可能同时为不同标记框的第一样本点。In images, different objects sometimes overlap. For example, if a pedestrian is standing on the edge of the road, the pedestrian's feet may overlap the edge of the road; vehicles on the road may overlap buildings placed on both sides of the road. If different objects overlap, the first sample point may be the first sample point of different marked frames at the same time.

图6是本公开实施例提供的标签分配方法中的一种场景示例图,在该场景下,车辆在道路中行驶的过程中,拍摄道路的图像,并且需要对该图像进行标签分配。另外,在道路中还包括其他车辆,而且在道路两边设置有基站。在该场景下,其他车辆与基站之间有时会发生重叠现象。相应的,某一个第一样本点可能同时为该其他车辆标记框和基站标记框的第一样本点。6 is an example diagram of a scenario in the label assignment method provided by the embodiment of the present disclosure. In this scenario, an image of the road is captured while the vehicle is driving on the road, and label assignment needs to be performed on the image. In addition, other vehicles are also included in the road, and base stations are provided on both sides of the road. In this scenario, overlap sometimes occurs between other vehicles and the base station. Correspondingly, a certain first sample point may be the first sample point of the other vehicle marking frame and the base station marking frame at the same time.

这一实施例在进行标签分配时,考虑到第一样本点与标记框的关系,因此不仅能够为不存在重叠的样本点分配标签,也能够为重叠的样本点分配标签,从而进一步提高标签分配的准确度。When assigning labels in this embodiment, considering the relationship between the first sample point and the marked frame, not only can labels be assigned to non-overlapping sample points, but also labels can be assigned to overlapping sample points, thereby further improving labeling Assignment accuracy.

在一个可行的示例中,基于所述第一样本点与所述标记框的关系,确定所述标记框的正样本时,可包括以下步骤:In a feasible example, when determining the positive sample of the marked frame based on the relationship between the first sample point and the marked frame, the following steps may be included:

当所述关系表示所述第一样本点为一个所述标记框的第一样本点时,确定所述第一样本点为所述标记框的正样本。When the relationship indicates that the first sample point is a first sample point of the marked frame, it is determined that the first sample point is a positive sample of the marked frame.

也就是说,如果某一个第一样本点只是一个标记框的第一样本点,则该第一样本点为该标记框的正样本。That is to say, if a certain first sample point is only the first sample point of a marked frame, the first sample point is a positive sample of the marked frame.

当所述关系表示所述第一样本点为至少两个标记框的第一样本点时,基于所述第一样本点与所述标记框的关系,确定所述标记框的正样本时,可包括以下步骤:When the relationship indicates that the first sample point is a first sample point of at least two marked frames, determining a positive sample of the marked frame based on the relationship between the first sample point and the marked frame can include the following steps:

基于所述第一样本点针对所述至少两个标记框的置信度,确定所述至少两个标记框中的目标标记框,其中,所述第一样本点针对所述目标标记框的置信度不小于所述第一样本点针对所述至少两个标记框中的其他标记框的置信度;A target marker frame in the at least two marker frames is determined based on the confidence of the first sample point for the at least two marker frames, wherein the first sample point is for the target marker frame The confidence is not less than the confidence of the first sample point for other marked frames in the at least two marked frames;

确定所述第一样本点为所述目标标记框的正样本。It is determined that the first sample point is a positive sample of the target marker frame.

在上述步骤公开的方案中,如果某一个第一样本点为至少两个标记框的第一样本点,则表明该第一样本点为重叠的样本点,这种情况下,比较第一样本点针对至少两个标记框的置信度,基于该置信度确定目标标记框,并确定该第一样本点为目标标记框的正样本。In the solution disclosed in the above steps, if a certain first sample point is the first sample point of at least two marked frames, it indicates that the first sample point is an overlapping sample point. The confidence of a sample point for at least two marked frames, the target marked frame is determined based on the confidence, and the first sample point is determined as a positive sample of the target marked frame.

示例性的,需要进行标签分配的图像针对的场景如图6所示,该图像中包括两个长方形框,分别是车辆所在的标记框和基站所在的标记框,并且车辆所在的标记框与基站所在的标记框中存在重合。某一个样本点为这两个标记框的第一样本点,即该样本点不仅是车辆所在标记框的第一样本点,还是基站所在标记框的第一样本点,也就是说,该样本点为两个标记框的第一样本点。这种情况下,可比较该样本点针对车辆所在标记框的置信度与该样本点针对基站所在标记框的置信度。如果该样本点针对车辆所在标记框的置信度较大,则车辆所在标记框为该样本点的目标标记框,该样本点为车辆所在标记框的正样本。Exemplarily, the scene for the image that needs to be assigned a label is shown in FIG. 6 . The image includes two rectangular boxes, which are the marker frame where the vehicle is located and the marker frame where the base station is located, and the marker frame where the vehicle is located is the same as the base station. There is overlap in the marked boxes. A certain sample point is the first sample point of the two marked frames, that is, the sample point is not only the first sample point of the marked frame where the vehicle is located, but also the first sample point of the marked frame where the base station is located, that is, The sample point is the first sample point of the two marked boxes. In this case, the confidence level of the sample point with respect to the marked frame where the vehicle is located can be compared with the confidence level of the sample point with respect to the marked frame where the base station is located. If the confidence of the sample point for the marked frame where the vehicle is located is relatively large, the marked frame where the vehicle is located is the target marked frame of the sample point, and the sample point is a positive sample of the marked frame where the vehicle is located.

通过这一实施例,能够在图像中存在重叠的样本点时,为该重叠的样本点分配标签。With this embodiment, overlapping sample points can be assigned labels when there are overlapping sample points in the image.

现有的标签分配技术存在标签分配准确度较差的问题,当图像中存在重叠的样本点时,如果通过现有技术进行标签分配,分配结果往往存在错误。The existing label assignment technology has the problem of poor label assignment accuracy. When there are overlapping sample points in the image, if the label assignment is performed by the existing technology, the assignment result is often wrong.

本公开实施例进行标签分配时,综合考虑了样本点针对标记框的置信度和样本点与标记框的交并比,标签分配的准确度较高。因此,当图像中存在重叠的样本点时,通过本公开实施进行标签分配,也能够提高对重叠的样本点进行标签分配的准确度。When performing label assignment in the embodiment of the present disclosure, the confidence of the sample points with respect to the marker frame and the intersection ratio between the sample points and the marker frame are comprehensively considered, and the accuracy of label assignment is high. Therefore, when there are overlapping sample points in the image, by implementing label assignment in the present disclosure, the accuracy of label assignment for the overlapping sample points can also be improved.

图7是本公开另一示例性实施例提供的标签分配方法的流程示意图。如图7所示,在上述图2所示实施例基础上,步骤S201包括以下步骤S2011和S2012。FIG. 7 is a schematic flowchart of a label assignment method provided by another exemplary embodiment of the present disclosure. As shown in FIG. 7 , on the basis of the above-mentioned embodiment shown in FIG. 2 , step S201 includes the following steps S2011 and S2012 .

步骤S2011、基于所述样本点所处的位置,确定所述样本点针对所述至少一个标记框的回归置信度和类别置信度。Step S2011 , based on the location of the sample point, determine the regression confidence level and the category confidence level of the sample point with respect to the at least one marked frame.

在一个可行的示例中,样本点针对标记框的回归置信度可通过网络学习确定。In a feasible example, the regression confidence of the sample point with respect to the marked frame can be determined through network learning.

另外,在一个可行的示例中,可通过以下公式确定样本点针对标记框的类别置信度:In addition, in a feasible example, the class confidence of the sample point with respect to the marked frame can be determined by the following formula:

Pi(cls|θ)=Pi(cls|obj,θ)Pi(obj|θ) 公式(1)Pi (cls|θ)=Pi (cls|obj,θ)Pi (obj|θ) Formula (1)

其中,Pi(cls|θ)表示位置为i的样本点针对标记框的类别置信度,obj表示位置i存在物体的概率,Pi(cls|obj,θ)表示位置i存在物体的情况下,该物体属于该标记框对应的类别的概率,Pi(obj|θ)表示位置为i的样本点作为前景的概率。Among them, Pi (cls|θ) represents the class confidence of the sample point at position i for the marked frame, obj represents the probability that an object exists at position i, and Pi (cls|obj, θ) represents the case where there is an object at position i , the probability that the object belongs to the category corresponding to the marked frame, Pi (obj|θ) represents the probability that the sample point at position i is the foreground.

步骤S2012、基于所述样本点针对所述至少一个标记框的回归置信度和类别置信度,确定所述样本点针对所述至少一个标记框的置信度。Step S2012: Determine the confidence of the sample point with respect to the at least one marked frame based on the regression confidence and the category confidence of the sample point with respect to the at least one marked frame.

在目标检测技术中,通常存在以下公式:In target detection technology, there are usually the following formulas:

Figure BDA0003458044180000121
Figure BDA0003458044180000121

在上述公式中,Li(θ)表示位置为i的样本点的损失,

Figure BDA0003458044180000122
表示位置为i的样本点的定位损失函数,
Figure BDA0003458044180000123
表示位置为i的样本点的分类损失函数,λ表示损失权重,Pi(θ)表示位置为i的样本点针对标记框的置信度,i表示该标记框内的样本点的数量。In the above formula, Li (θ) represents the loss of the sample point at positioni ,
Figure BDA0003458044180000122
represents the localization loss function of the sample point at position i,
Figure BDA0003458044180000123
Represents the classification loss function of the sample point at position i, λ represents the loss weight, Pi (θ) represents the confidence of the sample point at position i against the marked frame, and i represents the number of sample points in the marked frame.

基于公式(2),可得到以下公式:Based on formula (2), the following formula can be obtained:

Pi(θ)=Pi(cls|θ)Pi(loc|θ) 公式(3)。Pi (θ) = Pi (cls|θ) Pi (loc|θ) Equation (3).

也就是说,某一个样本点针对标记框的置信度,为该样本点针对标记框的回归置信度和类别置信度的乘积。That is to say, the confidence of a certain sample point with respect to the marked frame is the product of the regression confidence of the sample point with respect to the marked frame and the category confidence.

这种情况下,将样本点针对标记框的回归置信度和类别置信度代入公式(3),即可确定该样本点针对标记框的置信度。In this case, by substituting the regression confidence and category confidence of the sample point with respect to the marked frame into formula (3), the confidence of the sample point with respect to the marked frame can be determined.

基于这一实施例,可通过样本点针对标记框的回归置信度和类别置信度,计算得到该样本点针对标记框的置信度。Based on this embodiment, the confidence level of the sample point with respect to the marked frame can be obtained by calculating the regression confidence level and the category confidence level of the sample point with respect to the marked frame.

进一步的,在上述图2所示实施例基础上,本公开另一示例性实施例还可提供以下步骤:Further, on the basis of the above-mentioned embodiment shown in FIG. 2 , another exemplary embodiment of the present disclosure may further provide the following steps:

首先,基于所述样本点与所述至少一个标记框的中心的偏移量,确定所述样本点的中心加权函数。First, a center weighting function of the sample point is determined based on the offset of the sample point from the center of the at least one marker frame.

在一个可行的示例中,可通过以下公式确定中心加权函数:In a working example, the center weighting function can be determined by:

Figure BDA0003458044180000124
Figure BDA0003458044180000124

其中,

Figure BDA0003458044180000125
为某一样本点的类别加权函数,该样本点在图像中的位置与标记框的中心在x轴和y轴的偏移量之和为d,μ表示各标签对应的标记框在图像中的中心偏移量,σ表示该样本点所处位置的重要程度。in,
Figure BDA0003458044180000125
is the class weighting function of a sample point, the sum of the offset of the position of the sample point in the image and the center of the marker frame on the x-axis and y-axis is d, and μ represents the mark frame corresponding to each label in the image. The center offset, σ indicates the importance of the location of the sample point.

在图像中通常包括至少一种类型的目标。该类别加权函数表示样本点距离目标中心的距离的权重,该类别加权函数满足高斯分布,表示该样本点距离目标的中心越近,该样本点的权重越高。其中,μ和σ为可学习的参数。At least one type of object is typically included in the image. The class weighting function represents the weight of the distance between the sample point and the target center, and the class weighting function satisfies the Gaussian distribution, indicating that the closer the sample point is to the center of the target, the higher the weight of the sample point. where μ and σ are learnable parameters.

然后,基于该中心加权函数和样本点针对标记框的置信度,可通过以下公式,计算样本点的评估参数:Then, based on the center weighting function and the confidence of the sample points for the marked frame, the evaluation parameters of the sample points can be calculated by the following formula:

Figure BDA0003458044180000131
Figure BDA0003458044180000131

在上述公式中,

Figure BDA0003458044180000132
表示位置为i的样本点的评估参数,
Figure BDA0003458044180000133
表示位置为i的样本点的中心加权函数,Pi+表示位置为i的样本点针对标记框的置信度,C(Pi+)表示对Pi+进行指数化处理后的结果,Sn表示该标记框内样本点的总数,
Figure BDA0003458044180000134
表示该标记框内第j个样本点的中心加权函数,
Figure BDA0003458044180000135
表示该标记框内第j个样本点针对标记框的置信度,
Figure BDA0003458044180000136
表示对
Figure BDA0003458044180000137
进行指数化处理后的结果。In the above formula,
Figure BDA0003458044180000132
represents the evaluation parameter of the sample point at position i,
Figure BDA0003458044180000133
Represents the center weighting function of the sample point at position i, Pi+ indicates the confidence of the sample point at position i with respect to the marked frame, C(Pi+ ) indicates the result of indexing Pi+ , Sn represents the total number of sample points in the marked frame,
Figure BDA0003458044180000134
represents the center weighting function of the jth sample point in the marked frame,
Figure BDA0003458044180000135
Represents the confidence of the jth sample point in the marked frame for the marked frame,
Figure BDA0003458044180000136
express right
Figure BDA0003458044180000137
The result after indexing.

其中,该样本点的评估参数可用于评估为样本点分配标签的准确度。例如,

Figure BDA0003458044180000138
越大,通常表明为位置为i的样本点分配标签的准确度越高。Among them, the evaluation parameters of the sample point can be used to evaluate the accuracy of assigning labels to the sample point. E.g,
Figure BDA0003458044180000138
A larger value generally indicates a higher accuracy in assigning a label to the sample point at position i.

示例性装置Exemplary device

图8是本公开一示例性实施例提供的标签分配装置的结构图。该标签分配装置可以设置于终端设备、服务器等电子设备中,或者车辆等对象上,执行本公开上述任一实施例的标签分配方法。如图8所示,该实施例的标签分配装置包括:置信度计算模块201、候选点确定模块202和标签分配模块203。FIG. 8 is a structural diagram of a label dispensing apparatus provided by an exemplary embodiment of the present disclosure. The label distribution apparatus may be set in electronic equipment such as terminal equipment, servers, etc., or on objects such as vehicles, to execute the label distribution method of any of the above-mentioned embodiments of the present disclosure. As shown in FIG. 8 , the label assignment device of this embodiment includes: a confidencelevel calculation module 201 , a candidatepoint determination module 202 and alabel assignment module 203 .

其中,置信度计算模块201,用于计算图像中的样本点针对至少一个标记框的置信度。Wherein, the confidencelevel calculation module 201 is used to calculate the confidence level of the sample points in the image with respect to at least one marked frame.

候选点确定模块202,用于基于所述样本点与所述标记框的交并比,从所述样本点中为所述标记框选择k个候选点,k为预设的正整数。The candidatepoint determination module 202 is configured to select k candidate points for the marked frame from the sample points based on the intersection ratio between the sample points and the marked frame, where k is a preset positive integer.

标签分配模块203,用于基于所述置信度计算模块得到的所述样本点针对所述标记框的置信度,为所述候选点确定模块确定的所述k个候选点分配标签。Thelabel assignment module 203 is configured to assign labels to the k candidate points determined by the candidate point determination module based on the confidence of the sample points with respect to the marked frame obtained by the confidence calculation module.

基于本实施例公开的装置,可结合样本点针对标记框的置信度和样本点与标记框的交并比,对样本点进行标签分配。而现有技术在进行标签分配时,只考虑样本点针对标记框的置信度。因此,与现有技术相比,本实施例公开的装置在进行标签分配时,应用的信息更多样化,能够提高标签分配的准确度。Based on the device disclosed in this embodiment, the label assignment can be performed on the sample points in combination with the confidence of the sample points with respect to the marked frame and the intersection ratio between the sample points and the marked frame. However, in the prior art, when performing label assignment, only the confidence of the sample points with respect to the marked frame is considered. Therefore, compared with the prior art, when the device disclosed in this embodiment performs label assignment, the applied information is more diverse, and the accuracy of label assignment can be improved.

在其中一些实施方式中,参见图9所示的一种标签分配装置的结构的示例图,候选点确定模块202可包括:交并比比较单元2021和候选点选择单元2022。In some of the embodiments, referring to the exemplary diagram of the structure of a label assignment apparatus shown in FIG. 9 , the candidatepoint determination module 202 may include: an intersection comparison andcomparison unit 2021 and a candidatepoint selection unit 2022 .

其中,该交并比比较单元2021用于比较不同的所述样本点分别与所述标记框的交并比。Wherein, the intersectionratio comparison unit 2021 is used to compare the intersection ratios of the different sample points and the marked frame respectively.

该候选点选择单元2022用于基于交并比比较单元2021确定的交并比的比较结果,从所述样本点中为所述标记框选择k个候选点,所述k个候选点与所述标记框的交并比不小于其他样本点与所述标记框的交并比。The candidatepoint selection unit 2022 is configured to select k candidate points for the marker frame from the sample points based on the comparison result of the intersection and union ratio determined by the intersection and unionratio comparison unit 2021, the k candidate points and the The intersection ratio of the marked frame is not less than the intersection ratio of other sample points and the marked frame.

在其中一些实施方式中,参见图10所示的一种标签分配装置的结构的示例图,该标签分配模块203可包括:数量确定单元2031、正样本确定单元2032和标签分配单元2033。In some of these embodiments, referring to the exemplary diagram of the structure of a label distribution device shown in FIG. 10 , thelabel distribution module 203 may include: aquantity determination unit 2031 , a positivesample determination unit 2032 and alabel distribution unit 2033 .

其中,该数量确定单元2031用于基于所述标记框的k个候选点,确定所述标记框的正样本数量。Thequantity determination unit 2031 is configured to determine the number of positive samples of the marked frame based on the k candidate points of the marked frame.

该正样本确定单元2032用于基于数量确定单元2031确定的所述标记框的正样本数量和所述样本点针对所述标记框的置信度,从所述标记框的k个候选点内选择所述标记框的正样本。The positivesample determination unit 2032 is configured to, based on the number of positive samples of the marked frame determined by thequantity determination unit 2031 and the confidence of the sample points with respect to the marked frame, select the selected from among the k candidate points of the marked frame positive samples of the marked boxes.

该标签分配单元2033用于为正样本确定单元2032选择的所述标记框的正样本分配所述标记框对应的标签。Thelabel assigning unit 2033 is configured to assign a label corresponding to the marker frame to the positive sample of the marker frame selected by the positivesample determination unit 2032 .

进一步的,在一种可行的示例中,该数量确定单元2031可通过以下操作确定所述标记框的正样本数量:首先,该数量确定单元2031计算k个候选点与标记框的交并比之和;然后,如果所述交并比之和大于1,该数量确定单元2031确定k个候选点与所述标记框的交并比之和中的整数部分为标记框的正样本数量;如果所述交并比之和不大于1,该数量确定单元2031确定所述标记框的正样本数量为1。Further, in a feasible example, thequantity determination unit 2031 may determine the number of positive samples of the marked frame by the following operations: first, thequantity determination unit 2031 calculates the intersection ratio of k candidate points and the marked frame and; then, if the sum of the intersection ratios is greater than 1, thequantity determination unit 2031 determines that the integer part in the sum of the intersection ratios of the k candidate points and the marked frame is the positive sample quantity of the marked frame; The sum of the intersection ratios is not greater than 1, and thequantity determining unit 2031 determines that the number of positive samples of the marked frame is 1.

进一步的,在一种可行的示例中,该正样本确定单元2032可通过以下操作,从标记框的k个候选点内确定标记框的正样本:比较k个候选点分别针对标记框的置信度;基于k个候选点分别针对标记框的置信度的比较结果,从k个候选点内选择n个候选点作为第一样本点,n为标记框的正样本数量,并且n为不大于k的正整数,第一样本点针对标记框的置信度不小于其他候选点针对标记框的置信度;基于第一样本点与标记框的关系,确定标记框的正样本。Further, in a feasible example, the positivesample determination unit 2032 may determine a positive sample of the marked frame from among the k candidate points of the marked frame by performing the following operations: comparing the respective confidence levels of the k candidate points with respect to the marked frame ; Based on the comparison results of the k candidate points for the confidence of the marked frame respectively, select n candidate points from the k candidate points as the first sample point, n is the number of positive samples of the marked frame, and n is not greater than k A positive integer of , the confidence of the first sample point for the marked frame is not less than the confidence of other candidate points for the marked frame; based on the relationship between the first sample point and the marked frame, the positive sample of the marked frame is determined.

其中,当该关系表示第一样本点为一个标记框的第一样本点时,该正样本确定单元2032确定该第一样本点为该标记框的正样本;Wherein, when the relationship indicates that the first sample point is a first sample point of a marked frame, the positivesample determination unit 2032 determines that the first sample point is a positive sample of the marked frame;

当该关系表示该第一样本点为至少两个标记框的第一样本点时,该正样本确定单元2032用于基于该第一样本点针对该至少两个标记框的置信度,确定该至少两个标记框中的目标标记框,该第一样本点针对该目标标记框的置信度不小于该第一样本点针对该至少两个标记框中的其他标记框的置信度,并确定该第一样本点为目标标记框的正样本。When the relationship indicates that the first sample point is the first sample point of at least two marked frames, the positivesample determination unit 2032 is configured to, based on the confidence of the first sample point with respect to the at least two marked frames, Determine the target marker frame in the at least two marker frames, and the confidence of the first sample point with respect to the target marker frame is not less than the confidence of the first sample point with respect to other marker frames in the at least two marker frames , and determine that the first sample point is a positive sample of the target marker frame.

在其中一些实施方式中,参见图11所示的一种标签分配装置的结构的示例图,置信度计算模块201可包括:第一置信度确定单元2011和第二置信度确定单元2012。In some of these embodiments, referring to the exemplary diagram of the structure of a label distribution apparatus shown in FIG. 11 , the confidencelevel calculation module 201 may include: a first confidencelevel determination unit 2011 and a second confidencelevel determination unit 2012 .

其中,第一置信度确定单元用于基于样本点所处的位置,确定样本点针对至少一个标记框的回归置信度和类别置信度。Wherein, the first confidence level determination unit is configured to determine the regression confidence level and the category confidence level of the sample point with respect to at least one marked frame based on the position of the sample point.

第二置信度确定单元基于样本点针对至少一个标记框的回归置信度和类别置信度,确定样本点针对至少一个标记框的置信度。The second confidence level determination unit determines the confidence level of the sample point with respect to the at least one marked frame based on the regression confidence level and the category confidence level of the sample point with respect to the at least one marked frame.

示例性网络架构Exemplary Network Architecture

为了明确本公开实施例提供的标签分配方法,本公开提供图12。图12位一种网络架构的结构示例图,该网络架构可实现本公开各个实施例提供的标签分配方法。在一个可行的示例中,该网络架构可以全卷积单阶段目标检测算法(fully convolutional one-stage object detection,FCOS)为框架。In order to clarify the label assignment method provided by the embodiment of the present disclosure, the present disclosure provides FIG. 12 . FIG. 12 is a schematic structural diagram of a network architecture, where the network architecture can implement the label assignment methods provided by various embodiments of the present disclosure. In a feasible example, the network architecture can be framed by fully convolutional one-stage object detection (FCOS).

参见图12,该网络架构中包括神经网络模块、置信度计算模块、中心先验模块、候选点确定模块、数量确定模块、评估参数确定模块和标签分配模块。Referring to FIG. 12 , the network architecture includes a neural network module, a confidence calculation module, a center prior module, a candidate point determination module, a quantity determination module, an evaluation parameter determination module and a label assignment module.

其中,在拍摄需要进行标签分配的图像后,可将该图像的原始的数据传输至神经网络模块。该原始的数据可包括成像装置(例如车载摄像头)拍摄的图像。Wherein, after taking an image that needs to be assigned a label, the original data of the image can be transmitted to the neural network module. The raw data may include images captured by an imaging device (eg, an onboard camera).

该神经网络模块可包括支持获取特征图像的神经网络模型,例如,该神经网络模块可为特征金字塔网络(Feature Pyramid Networks,FPN)。在获取原始的数据之后,该神经网络模块可提取图像的特征,获取不同层级的特征图像(即feature map)。The neural network module may include a neural network model that supports acquiring feature images, for example, the neural network module may be Feature Pyramid Networks (FPN). After obtaining the original data, the neural network module can extract the features of the image and obtain feature images (ie, feature maps) at different levels.

在获取神经网络模块传输的特征图像之后,置信度计算模块可基于本公开上述实施例提供的方法,计算各个样本点针对至少一个标记框的置信度。其中,置信度计算模块可包括多个网络分支,例如,如果该网络架构以FCOS)为框架,则置信度计算模块可包括三个网络分支,各个网络分支相互配合,计算得到各个样本点针对至少一个标记框的置信度。After acquiring the characteristic image transmitted by the neural network module, the confidence calculation module may calculate the confidence of each sample point with respect to at least one marked frame based on the methods provided by the above embodiments of the present disclosure. Wherein, the confidence calculation module may include multiple network branches. For example, if the network architecture is based on the FCOS), the confidence calculation module may include three network branches. Confidence of a marked box.

该网络架构中的候选点确定模块可基于本公开上述实施例提供的方案,从样本点中为标记框中选择k个候选点,而数量确定模块可确定k个候选点中的正样本数量。The candidate point determination module in the network architecture can select k candidate points for the marked frame from the sample points based on the solutions provided by the above embodiments of the present disclosure, and the quantity determination module can determine the number of positive samples in the k candidate points.

置信度计算模块在确定样本点针对至少一个标记框的置信度之后,经过评估参数确定模块,将该置信度传输至标签分配模块,并且标签分配模块可以确定该候选点确定模块所选择的k个候选点,以及数量确定模块确定的正样本数量,并据此为k个候选点分配标签。After determining the confidence of the sample point for at least one marked frame, the confidence calculation module transmits the confidence to the label assignment module through the evaluation parameter determination module, and the label assignment module can determine the k selected by the candidate point determination module. candidate points, and the number of positive samples determined by the quantity determination module, and assign labels to k candidate points accordingly.

另外,中心先验模块可基于公式(4),确定中心加权函数,并将该中心加权函数传输至评估参数确定模块。评估参数确定模块可基于该中心加权函数,以及置信度计算模块确定的样本点针对至少一个标记框的置信度,通过公式(5),计算样本点的评估参数。In addition, the center prior module may determine the center weighting function based on formula (4), and transmit the center weighting function to the evaluation parameter determination module. The evaluation parameter determination module can calculate the evaluation parameter of the sample point by formula (5) based on the center weighting function and the confidence degree of the sample point with respect to the at least one marked frame determined by the confidence degree calculation module.

示例性电子设备Exemplary Electronics

下面,参考图13来描述根据本申请实施例的电子设备。在本公开一示例性实施例中,该电子设备可以是包括图1所示的标签分配模块30的电子设备,或者,在本公开另一示例性实施例中,该电子设备可以是包括图1所示的成像装置10、神经网络模块20和标签分配模块30的电子设备。当然,该电子设备也可以为其他形式,本公开对此不作限定。Hereinafter, an electronic device according to an embodiment of the present application will be described with reference to FIG. 13 . In an exemplary embodiment of the present disclosure, the electronic device may be an electronic device including thelabel distribution module 30 shown in FIG. 1 , or, in another exemplary embodiment of the present disclosure, the electronic device may be an electronic device including thelabel distribution module 30 shown in FIG. 1 . The electronics of theimaging device 10 , theneural network module 20 and thelabel assignment module 30 are shown. Of course, the electronic device may also be in other forms, which is not limited in the present disclosure.

图13图示了根据本申请实施例的电子设备的框图。13 illustrates a block diagram of an electronic device according to an embodiment of the present application.

如图13所示,电子设备10包括一个或多个处理器11和存储器12。As shown in FIG. 13 , theelectronic device 10 includes one or more processors 11 and a memory 12 .

处理器11可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其他形式的处理单元,并且可以控制电子设备10中的其他组件以执行期望的功能。Processor 11 may be a central processing unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components inelectronic device 10 to perform desired functions.

存储器12可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器11可以运行所述程序指令,以实现上文所述的本申请的各个实施例的标签分配方法以及/或者其他期望的功能。在所述计算机可读存储介质中还可以存储诸如输入信号、信号分量、噪声分量等各种内容。Memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and/or cache memory, or the like. The non-volatile memory may include, for example, read only memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may execute the program instructions to implement the label assignment method of the various embodiments of the present application described above and/or other desired function. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

在一个示例中,电子设备10还可以包括:输入装置13和输出装置14,这些组件通过总线系统和/或其他形式的连接机构(未示出)互连。In one example, theelectronic device 10 may also include an input device 13 and an output device 14 interconnected by a bus system and/or other form of connection mechanism (not shown).

例如,在该电子设备包括图1所示的标签分配模块30时,该输入装置13可以是通信网络连接器,用于从神经网络模块20接收特征图像。For example, when the electronic device includes thelabel assignment module 30 shown in FIG. 1 , the input device 13 may be a communication network connector for receiving the feature image from theneural network module 20 .

此外,该输入设备13还可以包括例如键盘、鼠标等等。In addition, the input device 13 may also include, for example, a keyboard, a mouse, and the like.

该输出装置14可以向外部输出各种信息,包括确定出的标签分配结果等。该输出设备14可以包括例如显示器、扬声器、打印机、以及通信网络及其所连接的远程输出设备等等。The output device 14 can output various information to the outside, including the determined label assignment result and the like. The output devices 14 may include, for example, displays, speakers, printers, and communication networks and their connected remote output devices, among others.

当然,为了简化,图13中仅示出了该电子设备10中与本申请有关的组件中的一些,省略了诸如总线、输入/输出接口等等的组件。除此之外,根据具体应用情况,电子设备10还可以包括任何其他适当的组件。Of course, for simplicity, only some of the components in theelectronic device 10 related to the present application are shown in FIG. 13 , and components such as buses, input/output interfaces and the like are omitted. Besides, theelectronic device 10 may also include any other suitable components according to the specific application.

示例性计算机程序产品和计算机可读存储介质Exemplary computer program product and computer readable storage medium

除了上述方法和设备以外,本申请的实施例还可以是计算机程序产品,其包括计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述“示例性方法”部分中描述的根据本申请各种实施例的标签分配方法中的步骤。In addition to the methods and apparatuses described above, embodiments of the present application may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the "exemplary methods" described above in this specification The steps in the label distribution method according to various embodiments of the present application are described in the section.

所述计算机程序产品可以以一种或多种程序设计语言的任意组合来编写用于执行本申请实施例操作的程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、C++等,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。The computer program product can write program codes for performing the operations of the embodiments of the present application in any combination of one or more programming languages, including object-oriented programming languages, such as Java, C++, etc. , also includes conventional procedural programming languages, such as "C" language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server execute on.

此外,本申请的实施例还可以是计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述“示例性方法”部分中描述的根据本申请各种实施例的标签分配方法中的步骤。In addition, embodiments of the present application may also be computer-readable storage media having computer program instructions stored thereon, the computer program instructions, when executed by a processor, cause the processor to perform the above-mentioned "Example Method" section of this specification Steps in a label dispensing method according to various embodiments of the present application described in .

所述计算机可读存储介质可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以包括但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The computer-readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses or devices, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable 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 devices, magnetic storage devices, or any suitable combination of the foregoing.

以上结合具体实施例描述了本申请的基本原理,但是,需要指出的是,在本申请中提及的优点、优势、效果等仅是示例而非限制,不能认为这些优点、优势、效果等是本申请的各个实施例必须具备的。另外,上述公开的具体细节仅是为了示例的作用和便于理解的作用,而非限制,上述细节并不限制本申请为必须采用上述具体的细节来实现。The basic principles of the present application have been described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, advantages, effects, etc. mentioned in the present application are only examples rather than limitations, and these advantages, advantages, effects, etc., are not considered to be Required for each embodiment of this application. In addition, the specific details disclosed above are only for the purpose of example and easy understanding, rather than limiting, and the above-mentioned details do not limit the application to be implemented by using the above-mentioned specific details.

本申请中涉及的器件、装置、设备、系统的方框图仅作为例示性的例子并且不意图要求或暗示必须按照方框图示出的方式进行连接、布置、配置。如本领域技术人员将认识到的,可以按任意方式连接、布置、配置这些器件、装置、设备、系统。诸如“包括”、“包含”、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“诸如但不限于”,且可与其互换使用。The block diagrams of devices, apparatus, apparatuses, and systems referred to in this application are merely illustrative examples and are not intended to require or imply that the connections, arrangements, or configurations must be in the manner shown in the block diagrams. As those skilled in the art will appreciate, these means, apparatuses, apparatuses, systems may be connected, arranged, configured in any manner. Words such as "including", "including", "having" and the like are open-ended words meaning "including but not limited to" and are used interchangeably therewith. As used herein, the words "or" and "and" refer to and are used interchangeably with the word "and/or" unless the context clearly dictates otherwise. As used herein, the word "such as" refers to and is used interchangeably with the phrase "such as but not limited to".

还需要指出的是,在本申请的装置、设备和方法中,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本申请的等效方案。It should also be pointed out that in the apparatus, equipment and method of the present application, each component or each step can be decomposed and/or recombined. These disaggregations and/or recombinations should be considered as equivalents of the present application.

提供所公开的方面的以上描述以使本领域的任何技术人员能够做出或者使用本申请。对这些方面的各种修改对于本领域技术人员而言是非常显而易见的,并且在此定义的一般原理可以应用于其他方面而不脱离本申请的范围。因此,本申请不意图被限制到在此示出的方面,而是按照与在此公开的原理和新颖的特征一致的最宽范围。The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Therefore, this application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

为了例示和描述的目的已经给出了以上描述。此外,此描述不意图将本申请的实施例限制到在此公开的形式。尽管以上已经讨论了多个示例方面和实施例,但是本领域技术人员将认识到其某些变型、修改、改变、添加和子组合。The foregoing description has been presented for the purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the application to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims (10)

Translated fromChinese
1.一种标签分配方法,包括:1. A label assignment method, comprising:计算图像中的样本点针对至少一个标记框的置信度;Calculate the confidence of the sample points in the image for at least one marked frame;基于所述样本点与所述标记框的交并比,从所述样本点中为所述标记框选择k个候选点,其中,k为预设的正整数;Based on the intersection ratio of the sample point and the marker frame, k candidate points are selected for the marker frame from the sample points, where k is a preset positive integer;基于所述样本点针对所述标记框的置信度,为所述k个候选点分配标签。Labels are assigned to the k candidate points based on the confidence of the sample points with respect to the labeled frame.2.根据权利要求1所述的方法,其中,所述基于所述样本点与所述标记框的交并比,从所述样本点中为所述标记框选择k个候选点,包括:2. The method according to claim 1, wherein the selecting k candidate points for the marker frame from the sample points based on the intersection ratio of the sample point and the marker frame, comprising:比较不同的所述样本点分别与所述标记框的交并比;Comparing the intersection ratios of the different sample points and the marked frame respectively;基于所述交并比的比较结果,从所述样本点中为所述标记框选择k个候选点,所述k个候选点与所述标记框的交并比不小于其他样本点与所述标记框的交并比。Based on the comparison result of the intersection ratio, k candidate points are selected for the marker frame from the sample points, and the intersection ratio between the k candidate points and the marker frame is not less than that of other sample points and the marker frame. Mark the intersection of boxes and ratios.3.根据权利要求1所述的方法,其中,所述基于所述样本点针对所述标记框的置信度,为所述k个候选点分配标签,包括:3. The method according to claim 1, wherein the assigning labels to the k candidate points based on the confidence of the sample points for the marked frame, comprising:基于所述标记框的k个候选点,确定所述标记框的正样本数量;Determine the number of positive samples of the marked frame based on the k candidate points of the marked frame;基于所述标记框的正样本数量和所述样本点针对所述标记框的置信度,从所述标记框的k个候选点内选择所述标记框的正样本;based on the number of positive samples of the marked frame and the confidence of the sample points with respect to the marked frame, selecting a positive sample of the marked frame from among the k candidate points of the marked frame;为所述标记框的正样本分配所述标记框对应的标签。A label corresponding to the marked box is assigned to the positive samples of the marked box.4.根据权利要求3所述的方法,其中,所述基于所述标记框的k个候选点,确定所述标记框的正样本数量,包括:4. The method according to claim 3, wherein the determining the number of positive samples of the marked frame based on the k candidate points of the marked frame comprises:计算所述k个候选点与所述标记框的交并比之和;Calculate the sum of the intersection ratios of the k candidate points and the marked frame;若所述交并比之和大于1,确定所述k个候选点与所述标记框的交并比之和中的整数部分为所述标记框的正样本数量;If the sum of the intersection ratios is greater than 1, determine that the integer part in the sum of the intersection ratios of the k candidate points and the marker frame is the number of positive samples of the marker frame;若所述交并比之和不大于1,确定所述标记框的正样本数量为1。If the sum of the intersection ratios is not greater than 1, it is determined that the number of positive samples of the marked frame is 1.5.根据权利要求3所述的方法,其中,所述基于所述标记框的正样本数量和所述样本点针对所述标记框的置信度,从所述标记框的k个候选点内确定所述标记框的正样本,包括:5 . The method of claim 3 , wherein the number of positive samples based on the marker frame and the confidence of the sample points for the marker frame are determined from within k candidate points of the marker frame. 6 . The positive samples of the marked frame, including:比较所述k个候选点分别针对所述标记框的置信度;comparing the respective confidences of the k candidate points with respect to the marked frame;基于所述k个候选点分别针对所述标记框的置信度的比较结果,从所述k个候选点内选择n个候选点作为第一样本点,n为所述标记框的正样本数量,并且n为不大于k的正整数,所述第一样本点针对所述标记框的置信度不小于其他候选点针对所述标记框的置信度;Based on the comparison results of the respective confidences of the k candidate points for the marked frame, n candidate points are selected from the k candidate points as the first sample points, where n is the number of positive samples of the marked frame , and n is a positive integer not greater than k, and the confidence of the first sample point for the marked frame is not less than the confidence of other candidate points for the marked frame;基于所述第一样本点与所述标记框的关系,确定所述标记框的正样本。Based on the relationship between the first sample point and the marked frame, a positive sample of the marked frame is determined.6.根据权利要求5所述的方法,其中,所述基于所述第一样本点与所述标记框的关系,确定所述标记框的正样本,包括:6. The method according to claim 5, wherein the determining a positive sample of the marked frame based on the relationship between the first sample point and the marked frame comprises:当所述关系表示所述第一样本点为一个所述标记框的第一样本点时,确定所述第一样本点为所述标记框的正样本;When the relationship indicates that the first sample point is a first sample point of the marked frame, determining that the first sample point is a positive sample of the marked frame;当所述关系表示所述第一样本点为至少两个标记框的第一样本点时,基于所述第一样本点针对所述至少两个标记框的置信度,确定所述至少两个标记框中的目标标记框,所述第一样本点针对所述目标标记框的置信度不小于所述第一样本点针对所述至少两个标记框中的其他标记框的置信度;When the relationship indicates that the first sample point is a first sample point of at least two marked frames, determining the at least two marked frames based on the confidence of the first sample point with respect to the at least two marked frames A target marker frame in two marker frames, the confidence of the first sample point with respect to the target marker frame is not less than the confidence of the first sample point with respect to other marker frames in the at least two marker frames Spend;确定所述第一样本点为所述目标标记框的正样本。It is determined that the first sample point is a positive sample of the target marker frame.7.根据权利要求1至6任一项所述的方法,其中,所述计算图像中的样本点针对至少一个标记框的置信度,包括:7. The method according to any one of claims 1 to 6, wherein the calculating the confidence of the sample points in the image with respect to at least one marked frame comprises:基于所述样本点所处的位置,确定所述样本点针对所述至少一个标记框的回归置信度和类别置信度;determining, based on the location of the sample point, a regression confidence level and a category confidence level of the sample point with respect to the at least one marker frame;基于所述样本点针对所述至少一个标记框的回归置信度和类别置信度,确定所述样本点针对所述至少一个标记框的置信度。Based on the regression confidence level and the category confidence level of the sample point with respect to the at least one marker frame, the confidence level of the sample point with respect to the at least one marker frame is determined.8.一种标签分配装置,包括:8. A label dispensing device comprising:置信度计算模块,用于计算图像中的样本点针对至少一个标记框的置信度;a confidence calculation module, used to calculate the confidence of the sample points in the image for at least one marked frame;候选点确定模块,用于基于所述样本点与所述标记框的交并比,从所述样本点中为所述标记框选择k个候选点,k为预设的正整数;a candidate point determination module, configured to select k candidate points for the marked frame from the sample points based on the intersection ratio of the sample point and the marked frame, where k is a preset positive integer;标签分配模块,用于基于所述置信度计算模块得到的所述样本点针对所述标记框的置信度,为所述候选点确定模块确定的所述k个候选点分配标签。The label assignment module is configured to assign labels to the k candidate points determined by the candidate point determination module based on the confidence degree of the sample points with respect to the marked frame obtained by the confidence degree calculation module.9.一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述权利要求1-7任一所述的标签分配方法。9. A computer-readable storage medium storing a computer program for executing the label assignment method according to any one of claims 1-7.10.一种电子设备,所述电子设备包括:10. An electronic device comprising:处理器;processor;用于存储所述处理器可执行指令的存储器;a memory for storing the processor-executable instructions;所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述权利要求1-7任一所述的标签分配方法。The processor is configured to read the executable instructions from the memory, and execute the instructions to implement the tag allocation method according to any one of the preceding claims 1-7.
CN202210008701.4A2022-01-062022-01-06Label distribution method and devicePendingCN114495053A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210008701.4ACN114495053A (en)2022-01-062022-01-06Label distribution method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210008701.4ACN114495053A (en)2022-01-062022-01-06Label distribution method and device

Publications (1)

Publication NumberPublication Date
CN114495053Atrue CN114495053A (en)2022-05-13

Family

ID=81509178

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210008701.4APendingCN114495053A (en)2022-01-062022-01-06Label distribution method and device

Country Status (1)

CountryLink
CN (1)CN114495053A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109255382A (en)*2018-09-072019-01-22阿里巴巴集团控股有限公司For the nerve network system of picture match positioning, method and device
CN109919154A (en)*2019-02-282019-06-21北京科技大学 A kind of character intelligent recognition method and recognition device
CN109977797A (en)*2019-03-062019-07-05上海交通大学The optimization method of single order object detector based on sequence loss function
US20210026355A1 (en)*2019-07-252021-01-28Nvidia CorporationDeep neural network for segmentation of road scenes and animate object instances for autonomous driving applications
CN112674014A (en)*2020-12-182021-04-20浙江大学Penaeus vannamei individual mark identification method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109255382A (en)*2018-09-072019-01-22阿里巴巴集团控股有限公司For the nerve network system of picture match positioning, method and device
CN109919154A (en)*2019-02-282019-06-21北京科技大学 A kind of character intelligent recognition method and recognition device
CN109977797A (en)*2019-03-062019-07-05上海交通大学The optimization method of single order object detector based on sequence loss function
US20210026355A1 (en)*2019-07-252021-01-28Nvidia CorporationDeep neural network for segmentation of road scenes and animate object instances for autonomous driving applications
CN112674014A (en)*2020-12-182021-04-20浙江大学Penaeus vannamei individual mark identification method and device, computer equipment and storage medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
ZHENG GE等: "OTA:Optimal Transport Assignment for Object Detection", pages 5 - 6, Retrieved from the Internet <URL:https://arxiv.org/pdf/2103.14259>*
ZHENG GE等: "YOLOX:Exceeding YOLO Series in 2021", pages 4, Retrieved from the Internet <URL:https://arxiv.org/pdf/2107.08430>*
周雯;史天运;李平;马小宁;: "基于深度学习的动车组运行安全图像异物检测", 交通信息与安全, no. 06, 28 December 2019 (2019-12-28)*
石青, 李昌: "《微小型仿生机器鼠设计与控制》", 31 December 2019, 北京:北京理工大学出版社*
蔡成涛: "基于改进YOLO算法的全景多目标实时检测", 《计算机工程与设计》, 16 October 2018 (2018-10-16)*
骚骚骚: "YOLOX深度解析(二)-simOTA详解-知乎", Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/394392992>*

Similar Documents

PublicationPublication DateTitle
EP3859560A2 (en)Method and apparatus for visual question answering, computer device and medium
US11775574B2 (en)Method and apparatus for visual question answering, computer device and medium
CN109117831B (en)Training method and device of object detection network
CN108280477B (en)Method and apparatus for clustering images
KR20210013216A (en) Multi-level target classification and traffic sign detection method and apparatus, equipment, and media
CN110378278B (en)Neural network training method, object searching method, device and electronic equipment
CN115797736B (en) Object detection model training and object detection method, device, equipment and medium
CN115061386B (en) Automated simulation test system and related equipment for intelligent driving
CN109635868B (en)Method and device for determining obstacle type, electronic device and storage medium
US11881044B2 (en)Method and apparatus for processing image, device and storage medium
CN115393592A (en)Target segmentation model generation method and device, and target segmentation method and device
US20250018948A1 (en)Method for controlling lane change, electronic device, and storage medium
CN112199978B (en)Video object detection method and device, storage medium and electronic equipment
CN113111692A (en)Target detection method and device, computer readable storage medium and electronic equipment
CN111291715A (en)Vehicle type identification method based on multi-scale convolutional neural network, electronic device and storage medium
CN112115928B (en)Training method and detection method of neural network based on illegal parking vehicle labels
WO2022247628A1 (en)Data annotation method and related product
CN112749293A (en)Image classification method and device and storage medium
CN114495053A (en)Label distribution method and device
CN114882283B (en) Sample image generation method, deep learning model training method and device
CN110852261A (en)Target detection method and device, electronic equipment and readable storage medium
CN115930978A (en)Map creating method and device
CN112434591B (en)Lane line determination method and device
CN116091318A (en) Neural network model training method, image processing method, device and equipment
CN114821190A (en)Image classification model training method, image classification method, device and equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp