A method, device and storage medium for marking image data based on rules
By adopting a rule-based method in data annotation, we determine and establish the parent-child frame relationship of image data, and use the bipartite graph matching algorithm to improve the accuracy and efficiency of annotation, solving the problems of low annotation efficiency and accuracy in the existing technology. Reduced labeling costs.
Patent Information
- Application Number
- CN202210427984.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-04-22
AI Technical Summary
Existing data annotation methods have low efficiency and low accuracy, resulting in poor quality of annotated data, especially when the amount of data is large, the cost of re-annotation is too high.
Adopt a rule-based annotation image data method. By obtaining the image annotation data, determine whether the original data exists. If not, mark all boxes and establish a parent-child box relationship based on the degree of correlation. If there is, use the original relationship for classification and matching, and use bisection The graph maximum weight matching algorithm outputs annotation results.
It improves the accuracy and precision of annotation, automatically filters annotation boxes, reduces the repetitive work of manual annotation, and reduces annotation costs.
Smart Images

Figure CN114723940B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data annotation, and in particular to a method, device and storage medium for annotating image data based on rules. Background Art
[0002] Data labeling is the process of using automated tools to capture and collect data from the Internet, including text, pictures, voice, etc., and then organize and label the captured data.
[0003] Data labeling is a basic task in the artificial intelligence industry. A large number of data labeling specialists are needed to carry out relevant work to meet the needs of artificial intelligence training data, and the accuracy of the labeled data will affect the quality of artificial intelligence training. As the amount of labeled data and the number of labeled scenarios increase, the quality of the labeled data will be poor, but the amount of data is huge and the cost of re-labeling is too high. Summary of the invention
[0004] To this end, the embodiments of the present application provide a method, device and storage medium for annotating image data based on rules, which can solve the technical problems of low efficiency and low accuracy of existing annotation methods. The specific technical solutions are as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for labeling image data based on rules, the method comprising:
[0006] Get image annotation data;
[0007] Determine whether the labeled data has original data, where the original data includes the existing labeling information;
[0008] If there is no original data, mark all the annotation boxes on the annotated data and select one of the annotation boxes as the parent box;
[0009] Label the child frame according to the degree of association between the father frame and other surrounding labeled frames, and output the labeling result;
[0010] If the original data exists, the annotated data is classified according to the original relationship of the annotation boxes in the annotation information;
[0011] Calculate the degree of association between the annotation boxes, and establish a bipartite graph for matching based on the relationship between the annotation boxes;
[0012] Output the annotation results based on the matching results of the bipartite graph.
[0013] Furthermore, the formula for calculating the degree of association is:
[0014] F=(IoU-Ad 1 / 2 -Bp 1 / 3 )×k
[0015] Among them, F is the degree of parent-child relationship, IoU is the intersection over union ratio of the father box and the son box, d represents the area ratio of the son box to the father box, p represents the volume ratio of the son box cube to the father box cube, k represents the ratio of the physical distance between the vehicle corresponding to the father box and the vehicle corresponding to the son box; A and B are preset weights.
[0016] Furthermore, if corresponding point cloud data exists, p is obtained from the point cloud data;
[0017] If there is no corresponding point cloud data, p is determined by the ratio of the diagonal distance of the son frame on the image data to the diagonal distance of the father frame on the image.
[0018] Furthermore, the method further comprises:
[0019] After establishing the parent-child relationship between the father frame and the child frame, if there are at least two overlapping father frames, the number of child frames of the same category as the father frame having the parent-child relationship is calculated, and the number of child frames of the same category is compared with a preset value of the corresponding category;
[0020] If the number of the child frames of the same category is greater than a preset value of the corresponding category, the relative positions between the child frames of the same category and the at least two parent frames are recalculated, and the parent-child relationship between the child frames and the parent frames is re-determined.
[0021] Furthermore, the method further comprises:
[0022] Get the trigger signal and determine whether the trigger signal belongs to the child frame or the father frame;
[0023] If the trigger signal belongs to the child frame, the parent-child relationship between the child frame and the father frame is terminated;
[0024] If the trigger signal belongs to the father frame, the parent-child relationship between the father frame and all the child frames belonging to it is released.
[0025] Furthermore, an ID is set for the father frame, and the ID of the father frame is set for the son frame, so as to establish a parent-child relationship between the father frame and the son frame.
[0026] Furthermore, the step of setting the ID of the father frame to the son frame to establish the parent-child relationship between the father frame and the son frame includes:
[0027] receiving a father frame selection signal and displaying the child frames within a predetermined distance of the selected father frame;
[0028] The ID of the parent frame is set to any one, two or more of the child frames, and a parent-child relationship between the parent frame and the corresponding child frames is established.
[0029] Furthermore, the maximum weight matching algorithm of the bipartite graph adopts the KM algorithm or the minimum cost maximum flow algorithm.
[0030] In a second aspect, an embodiment of the present application provides a device for labeling image data based on rules, the device comprising:
[0031] A data acquisition module is used to acquire image annotation data;
[0032] A judgment module, used to judge whether the annotated data has original data, where the original data includes existing annotation information;
[0033] The marking module is used to mark all the marking boxes on the marked data if there is no original data, and select one of the marking boxes as the parent box;
[0034] A first output module, used to label the child frame according to the degree of association between the father frame and other surrounding labeled frames, and output the labeling result;
[0035] The classification module, if the original data exists, classifies the labeled data according to the original relationship of the annotation boxes in the annotation information;
[0036] The bipartite graph matching module is used to calculate the degree of association between the annotation boxes and establish a bipartite graph for matching based on the relationship between the annotation boxes;
[0037] The second output module is used to output the labeling result according to the bipartite graph matching result.
[0038] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the aforementioned methods for rule-based labeling of image data are implemented.
[0039] In summary, compared with the prior art, the technical solution provided in the embodiment of the present application has at least the following beneficial effects:
[0040] When labeling, it is necessary to distinguish whether the labeled data exists in the original data. If so, the labeling information in the original data is used for labeling, the degree of association of the labeling frame is calculated, and the bipartite graph is used for matching to improve the accuracy of labeling. For labeled data without original data, after selecting the parent frame, the data is automatically filtered according to the degree of association to improve the labeling accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1It is a flowchart of a method for labeling image data based on rules provided in one embodiment of the present application. DETAILED DESCRIPTION
[0042] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make modifications to the present embodiment without any creative contribution as needed, but such modifications are protected by the patent law as long as they are within the scope of the claims of the present application.
[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application, unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.
[0045] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.
[0046] In the present application, the term "at least one" means one or more, and the meaning of "plurality" means three or more, for example, a plurality of first positions means three or more first positions.
[0047] The embodiments of the present application are further described in detail below in conjunction with the drawings in the specification.
[0048] Reference Figure 1 In one embodiment of the present application, a method for labeling image data based on rules is provided, and the main steps of the method are described as follows:
[0049] S1: Obtain image annotation data;
[0050] S2: Determine whether the annotated data has original data, where the original data includes the existing annotated information;
[0051] S3: If there is no original data, mark all the annotation boxes on the annotated data and select one of the annotation boxes as the parent box;
[0052] S4: labeling the child frame according to the degree of association between the father frame and other surrounding labeled frames, and outputting the labeling result;
[0053] S5: If the original data exists, classify the annotated data according to the original relationship of the annotation boxes in the annotation information;
[0054] S6: Calculate the degree of association between the annotation boxes, and establish a bipartite graph for matching based on the relationship between the annotation boxes;
[0055] S7: Output the annotation result according to the matching result of the bipartite graph.
[0056] Specifically, in this embodiment, the type of annotation data is picture data, and the picture data is acquired by a high-speed camera; the current high-speed camera technology is very mature, and the impact of camera distortion of different types of high-speed cameras on pictures has become smaller and smaller. The accuracy of pictures is getting higher and higher, and more data can be used for annotation of picture data. In terms of picture data annotation, generally, the point cloud annotation results are obtained after the point cloud data annotation is completed, and then the picture annotation is performed. The picture data is annotated based on the point cloud annotation results, because the information in the point cloud annotation results can be used to improve the annotation accuracy. However, there are also picture data without point cloud data. For picture data without point cloud data, it is generally annotated based on its own information.
[0057] In this embodiment, if the acquired annotation data has been annotated before, that is, the original data exists, the annotation information includes the annotation box, the ID of the annotation box, etc. Classification is performed according to the annotation box in the annotation information. Here, the classification is the attribution classification, that is, the annotation box of each frame in the annotation data is classified according to the type, such as wheels, lights, windows, etc. When classifying the annotation boxes in the annotation data, it can be known which boxes are father boxes according to the categories. In the annotation of image data in the vehicle field, the annotation box corresponding to the car body is the father box. After the annotation boxes are classified, the degree of association between the father box and the son box near the father box and the father box is calculated, and a bipartite graph is established, and the prediction result of the annotation is obtained from the bipartite graph.
[0058] If there is no original data, a labeled box is selected as the father box, and the degree of association between the surrounding labeled boxes and the father box is calculated to label the son boxes of the father box.
[0059] In this embodiment, the method for calculating the degree of association can be: setting preset distances according to the categories of possible son frames of the father frame, and determining whether the distance between the father frame and the surrounding labeled frames or son frames is within the range of the preset distance ± a preset error. If so, and the smaller the error between the distance and the preset distance, the higher the degree of association, and the frame may be labeled as a son frame; calculating the number of the son frames, and if the number of the son frames exceeds the preset number of categories corresponding to the preset distance, selecting a preset number of labeled frames with a high degree of association as son frames.
[0060] For example, a son frame that has a fixed distance relationship with a father frame has a father-son relationship with the father frame. The fixed distance relationship is set with an error range. Assuming the fixed distance is 60 cm, the error range is plus or minus 10 cm. The standard is that the smaller the difference with the fixed distance, the higher the degree of relationship. For the accessory rearview mirror, the distance between the midpoint of the vehicle corresponding to the father frame A and the midpoint of the rearview mirror is 62.4 cm, and the distance between the midpoint of the vehicle corresponding to the father frame B and the midpoint of the rearview mirror is 68.4 cm. Then the rearview mirror has a parent-child relationship with the father frame A.
[0061] In other implementations, the degree of association may be calculated in other ways, such as calculating the degree of association according to the relative proportion and distance between the parent frame and the surrounding child frames, which will not be elaborated here.
[0062] Through the setting of this application, when labeling, it is distinguished whether the labeled data exists in the original data. If so, the labeling information in the original data is used for labeling, the correlation degree of the labeling box is calculated, and the bipartite graph is used for matching, so as to improve the accuracy of the labeling.
[0063] Optionally, in another embodiment, the formula for calculating the degree of association is:
[0064] F=(IoU-Ad 1 / 2 -Bp 1 / 3 )×k
[0065] Among them, F is the degree of parent-child relationship, IoU is the intersection-over-union ratio of the father box and the son box, d represents the area ratio of the son box in the image data to the father box in the image data, p represents the volume ratio of the son box cube to the father box cube, k represents the ratio of the physical distance between the vehicle corresponding to the father box and the vehicle corresponding to the son box to the physical distance between the vehicle corresponding to the father box and the vehicle corresponding to the son box; A and B are preset weights.
[0066] Furthermore, for image data with three-dimensional information (i.e., point cloud data), A and B are 0.2 and 0.4 respectively, and for data without three-dimensional information, A and B are 0.4 and 0.2 respectively; in other implementations, the weights of A and B can be adjusted according to business needs.
[0067] The annotation of image data is usually non-real-time data, so when annotating the parent-child relationship in the image data, you need to select the father frame to mark it. When annotating the son frame, you need to calculate the degree of relationship between the son frame and all current father frames, and set the parent-child relationship with the one with the highest degree of association.
[0068] Further, in another embodiment, if the annotated data is formed by annotated point cloud data, then p is obtained from the point cloud data;
[0069] If the labeled data has no corresponding point cloud data, p is determined by the ratio of the diagonal distance of the son frame on the image data to the diagonal distance of the father frame on the image.
[0070] Furthermore, the maximum weight matching algorithm for the bipartite graph adopts the KM algorithm or the minimum cost maximum flow algorithm. After the maximum weight matching algorithm for the bipartite graph defines the degree of parent-child relationship between two boxes, an adjacency matrix of the degree of relationship corresponding to each son box and the father box can be obtained, and the problem is transformed into finding a match between the two so that the sum of the similarities of all connections is maximized, and the KM algorithm or the minimum cost maximum flow algorithm is adopted.
[0071] Optionally, in another embodiment, the method further comprises:
[0072] S8: after establishing the parent-child relationship between the father frame and the child frame, if there is overlap between at least two father frames, calculating the number of child frames of the same category that have the parent-child relationship with the father frame, and comparing the number of child frames of the same category with a preset value of the corresponding category;
[0073] S9: If the number of the child frames of the same category is greater than a preset value of the corresponding category, recalculate the relative positions between the child frames of the same category and the at least two parent frames, and re-determine the parent-child relationship between the child frames and the parent frames.
[0074] Specifically, in the present embodiment, if there is overlap between the father frames, it means that the son frames between the two father frames may have association errors. If the number of son frames of a certain type of the father frame exceeds the preset value, it means that there is a son frame association error. For example, a car has only two rearview mirrors, so the preset value of the son frame corresponding to the rearview mirror is 2. If the number of son frames corresponding to the rearview mirror of the car is 3, it means that among the three son frames, there is at least one son frame with association error. At this time, it is necessary to calculate the relative position between the son frame corresponding to the rearview mirror and the father frame, for example, the distance between the son frame corresponding to the rearview mirror and the father frame of the vehicle body and / or the relative position relationship between the son frames. The relative position relationship between the son frames, for example, if there is a son frame corresponding to the rearview mirror on the left side of the left rearview mirror, it means that the son frame is incorrectly associated.
[0075] Optionally, in another implementation, an ID is set for the father frame, and the ID of the father frame is set for the son frame, so as to establish a parent-child relationship between the father frame and the son frame.
[0076] The parent-child relationship between the father box and the son box is determined by the degree of association, the father box is marked with a determined ID, and the ID of the father box is copied to the son box with the parent-child relationship, thereby generating a parent-child relationship between the father box and the son box.
[0077] Furthermore, the step of setting the ID of the father frame to the son frame to establish the parent-child relationship between the father frame and the son frame includes:
[0078] 1. Receive the father frame selection signal and display the child frames within a predetermined distance of the selected father frame;
[0079] 2. Set the ID of the parent frame to any one, two or more of the child frames to establish a parent-child relationship between the parent frame and the corresponding child frames.
[0080] Specifically, in this embodiment, when a father frame is selected in the image data, a father frame selection signal is triggered, and the son frames within a predetermined distance around the father frame are displayed. The predetermined distance is set according to the type of the father frame and the proportion of the image. The type of the father frame is, for example, a car, a truck, etc., and the proportion is the ratio of the image data to the actual situation. The predetermined distance represents the farthest distance that the son frame on the father frame may exist.
[0081] The parent-child relationship can be quickly established by copying the ID of the parent frame to the child frame within a predetermined distance around the displayed father frame.
[0082] Optionally, in another embodiment, the method further comprises:
[0083] S10: Obtain a trigger signal and determine whether the trigger signal belongs to the child frame or the father frame;
[0084] S11: if the trigger signal belongs to the child frame, the parent-child relationship between the child frame and the father frame is terminated;
[0085] S12: If the trigger signal belongs to the father frame, the parent-child relationship between the father frame and all the child frames belonging to it is terminated.
[0086] The trigger signal can be generated by the user clicking the mouse, or by moving the mouse to the corresponding annotation box. It will not be elaborated here. This embodiment takes the user moving the mouse to the corresponding annotation box and clicking the right button of the mouse as an example; according to the given ID, it is expressed whether it is a pair of parent-child boxes. After the data annotation is completed, the staff can use computer equipment, such as a computer, to move the mouse to the incorrect contact box on the annotated data. The annotated box can be a father box or a son box. The right button of the mouse cancels the parent-child relationship between the two boxes. Select a father box on the annotated data with the left button, and then the annotated data will switch to the son box near the just selected father box without establishing a parent-child relationship. Then select a son box with the left button, and the two boxes can be given a specific identical ID to indicate the parent-child relationship between the two boxes.
[0087] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0088] In one embodiment of the present application, a device for marking picture data based on rules is provided, and the device for marking picture data based on rules corresponds one-to-one to the method for marking picture data based on rules in the above embodiment. The device for marking picture data based on rules includes:
[0089] A data acquisition module is used to acquire image annotation data;
[0090] A judgment module, used to judge whether the annotated data has original data, where the original data includes existing annotation information;
[0091] The marking module is used to mark all the marking boxes on the marked data if there is no original data, and select one of the marking boxes as the parent box;
[0092] A first output module, used to label the child frame according to the degree of association between the father frame and other surrounding labeled frames, and output the labeling result;
[0093] The classification module, if the original data exists, classifies the labeled data according to the original relationship of the annotation boxes in the annotation information;
[0094] The bipartite graph matching module is used to calculate the degree of association between the annotation boxes and establish a bipartite graph for matching based on the relationship between the annotation boxes;
[0095] The second output module is used to output the labeling result according to the bipartite graph matching result.
[0096] Furthermore, in another embodiment, the formula for calculating the degree of association is:
[0097] F=(IoU-Ad 1 / 2-Bp 1 / 3 )×k
[0098] Among them, F is the degree of parent-child relationship, IoU is the intersection over union ratio of the father box and the son box, d represents the area ratio of the son box to the father box, p represents the volume ratio of the son box cube to the father box cube, k represents the ratio of the physical distance between the vehicle corresponding to the father box and the vehicle corresponding to the son box; A and B are preset weights.
[0099] Further, in another embodiment, if corresponding point cloud data exists, p is obtained from the point cloud data;
[0100] If there is no corresponding point cloud data, p is determined by the ratio of the diagonal distance of the son frame on the image data to the diagonal distance of the father frame on the image.
[0101] Furthermore, in another embodiment, the device further comprises:
[0102] A comparison module, configured to, after establishing a parent-child relationship between a parent frame and a child frame, calculate the number of child frames of the same category as the parent frame that have a parent-child relationship if at least two parent frames overlap, and compare the number of child frames of the same category with a preset value of a corresponding category;
[0103] The relationship establishment module is used to recalculate the relative position between the child frames of the same category and the at least two parent frames, and redetermine the parent-child relationship between the child frames and the parent frames if the number of the child frames of the same category is greater than the preset value of the corresponding category.
[0104] Furthermore, in another embodiment, the device further comprises:
[0105] The relationship termination module is used to obtain a trigger signal and determine whether the trigger signal belongs to a child frame or a father frame; if the trigger signal belongs to a child frame, the parent-child relationship between the child frame and the father frame is terminated; if the trigger signal belongs to a father frame, the parent-child relationship between the father frame and all its child frames is terminated.
[0106] Furthermore, in another embodiment, an ID is set for the father frame, and the ID of the father frame is set for the son frame, so as to establish a parent-child relationship between the father frame and the son frame.
[0107] Furthermore, in another embodiment, the step of setting the ID of the father frame to the son frame to establish the parent-child relationship between the father frame and the son frame includes:
[0108] receiving a father frame selection signal and displaying the child frames within a predetermined distance of the selected father frame;
[0109] The ID of the parent frame is set to any one, two or more of the child frames, and a parent-child relationship between the parent frame and the corresponding child frames is established.
[0110] Furthermore, in another embodiment, the maximum weight matching algorithm of the bipartite graph adopts the KM algorithm or the minimum cost maximum flow algorithm.
[0111] Each module of the apparatus for marking image data based on rules can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0112] In one embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of the rule-based labeling of image data described in the above embodiment are implemented. The computer-readable storage medium includes a ROM (Read-Only Memory), a RAM (Random-Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic disk, a floppy disk, etc.
[0113] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device described in the present application is divided into different functional units or modules to complete all or part of the functions described above.
Claims
1. A method for labeling image data based on rules, characterized in that: The method comprises: Get image annotation data; Determine whether the labeled data has original data, where the original data includes the existing labeling information; If there is no original data, mark all the annotation boxes on the annotated data and select one of the annotation boxes as the parent box; Label the child frame according to the degree of association between the father frame and other surrounding labeled frames, and output the labeling result; The formula for calculating the degree of association is: Among them, F is the degree of parent-child relationship, IoU is the intersection-over-union ratio of the father box and the son box, d is the area ratio of the son box to the father box, p is the volume ratio of the son box cube to the father box cube, k is the ratio of the physical distance between the vehicle corresponding to the father box and the vehicle corresponding to the son box; A and B are preset weights; If the original data exists, the annotated data is classified according to the original relationship of the annotation boxes in the annotation information; Calculate the degree of association between the annotation boxes, and establish a bipartite graph for matching based on the relationship between the annotation boxes; Output the annotation results based on the matching results of the bipartite graph.
2. The method for labeling image data based on rules according to claim 1, characterized in that: If there is corresponding point cloud data, p is obtained from the point cloud data; If there is no corresponding point cloud data, p is determined by the ratio of the diagonal distance of the son frame on the image data to the diagonal distance of the father frame on the image.
3. The method for labeling image data based on rules according to claim 1, characterized in that: The method further comprises: After establishing the parent-child relationship between the father frame and the child frame, if there are at least two overlapping father frames, the number of child frames of the same category as the father frame having the parent-child relationship is calculated, and the number of child frames of the same category is compared with a preset value of the corresponding category; If the number of the child frames of the same category is greater than a preset value of the corresponding category, the relative positions between the child frames of the same category and the at least two parent frames are recalculated, and the parent-child relationship between the child frames and the parent frames is re-determined.
4. The method for labeling image data based on rules according to claim 1, characterized in that: The method further comprises: Get the trigger signal and determine whether the trigger signal belongs to the child frame or the father frame; If the trigger signal belongs to the child frame, the parent-child relationship between the child frame and the father frame is terminated; If the trigger signal belongs to the father frame, the parent-child relationship between the father frame and all the child frames belonging to it is released.
5. The method for labeling image data based on rules according to claim 1, characterized in that: An ID is set for the father frame, and the ID of the father frame is set for the son frame, so as to establish a parent-child relationship between the father frame and the son frame.
6. The method for labeling image data based on rules according to claim 5, characterized in that: The step of setting the ID of the father frame to the son frame and establishing the parent-child relationship between the father frame and the son frame includes: receiving a father frame selection signal and displaying the child frames within a predetermined distance of the selected father frame; The ID of the parent frame is set to any one, two or more of the child frames, and a parent-child relationship between the parent frame and the corresponding child frames is established.
7. The method for labeling image data based on rules according to claim 1, characterized in that: The maximum weight matching algorithm of the bipartite graph adopts the KM algorithm or the minimum cost maximum flow algorithm.
8. A device for labeling image data based on rules, characterized in that: The device comprises: A data acquisition module is used to acquire image annotation data; A judgment module, used to judge whether the annotated data has original data, where the original data includes existing annotation information; The marking module is used to mark all the marking boxes on the marked data if there is no original data, and select one of the marking boxes as the parent box; The first output module is used to label the child frame according to the correlation degree between the father frame and other surrounding labeled frames, and output the labeling result; the formula for calculating the correlation degree is: Among them, F is the degree of parent-child relationship, IoU is the intersection-over-union ratio of the father box and the son box, d is the area ratio of the son box to the father box, p is the volume ratio of the son box cube to the father box cube, k is the ratio of the physical distance between the vehicle corresponding to the father box and the vehicle corresponding to the son box; A and B are preset weights; The classification module, if the original data exists, classifies the labeled data according to the original relationship of the annotation boxes in the annotation information; The bipartite graph matching module is used to calculate the degree of association between the annotation boxes and establish a bipartite graph for matching based on the relationship between the annotation boxes; The second output module is used to output the labeling result according to the bipartite graph matching result.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for labeling image data based on rules according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Label box correction method, electronic equipment and storage medium
CN110796201A
Labeling result processing method, device and equipment and storage medium
CN111368927A
Method, system and device for managing image frame and medium
CN111814885A
Point cloud data labeling method and device, electronic equipment and storage medium
CN111931727A
Target detection method and device and storage medium
CN112505652A
