Image annotation method and device
By providing image labeling methods and devices in business scenarios such as autonomous driving, the operation process of image labeling is simplified, the problems of cumbersome and low efficiency in the prior art are solved, and efficient image labeling is achieved.
Patent Information
- Application Number
- CN202011233875.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2040-11-06
AI Technical Summary
The prior art is complicated and inefficient in image labeling in business scenarios such as autonomous driving, and the tool customization is complex, which affects the labeling efficiency.
Provide an image annotation method and device, by obtaining the image to be marked and displaying it in a specified interactive interface, determine the target line type in a plurality of preset line types in response to user interaction operations, and generate corresponding target line types according to the target line type. Label data to simplify operational process.
It realizes simplification and efficiency improvement of image annotation, without complex parameter settings, and is suitable for image annotation requirements in different business scenarios.
Smart Images

Figure CN112346807B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an image annotation method and an image annotation device. Background Art
[0002] For business scenarios such as autonomous driving that require the training of many AI (Artificial Intelligence) models, in order to train the AI models, it is often necessary to label the collected images.
[0003] The existing method generally draws the annotation graphics in the image, and then manually adds corresponding attributes to the annotation graphics, which is cumbersome. In addition, the current tools for drawing annotation graphics are generally customized by users, and different customizations are required for different business scenarios, which further affects the efficiency of image annotation. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide an image annotation method and a corresponding image annotation device that overcome the above problems or at least partially solve the above problems.
[0005] In order to solve the above problem, an embodiment of the present invention discloses an image annotation method, comprising:
[0006] Get the image to be annotated;
[0007] Displaying the image to be annotated in a specified interactive interface;
[0008] In response to a first interactive operation on the interactive interface, determining a target line type from a plurality of preset line types;
[0009] In response to a second interactive operation performed on the interactive interface, annotation data is generated in the image to be annotated according to the target line type.
[0010] Optionally, the method further comprises:
[0011] Get configuration data;
[0012] Generate a specified interactive interface according to the configuration data; the specified interactive interface includes a line type selection control;
[0013] The first interactive operation is an operation on the line type selection control.
[0014] Optionally, in response to the second interactive operation acting on the interactive interface, the step of generating annotation data in the image to be annotated according to the target line type includes:
[0015] In response to a second interactive operation performed on the interactive interface, generating a plurality of annotation points in the image to be annotated;
[0016] Generate annotation data according to the target line type and the annotation points.
[0017] Optionally, the step of generating annotation data according to the target line type and the annotation point includes:
[0018] Determine the geometric features corresponding to the target line type; the geometric features include any one of a line segment, a two-dimensional box and a polygon;
[0019] The annotation points are sequentially used to generate annotation data according to the geometric features.
[0020] Optionally, the step of sequentially using the annotation points to generate annotation data according to the geometric features includes:
[0021] If the geometric feature is a line segment, the line segment annotation is generated using the annotation point as the endpoint;
[0022] If the geometric feature is a two-dimensional box, the two-dimensional box annotation is generated by using the line connecting the annotation points as a diagonal line;
[0023] If the geometric feature is a polygon, the polygon annotation is generated using the annotation points as vertices;
[0024] Annotation data is generated based on the line segment annotation, and / or the two-dimensional box annotation, and / or the polygon annotation.
[0025] Optionally, the method further comprises:
[0026] extracting attribute information corresponding to the target line type according to the configuration data;
[0027] Adding the attribute information to the annotation data;
[0028] Generating a property window corresponding to the annotation data;
[0029] The attribute information corresponding to the marked data is displayed in the attribute window.
[0030] Optionally, the configuration data is provided with at least one preset group type; the preset group type corresponds to at least one preset line type; and the extracting the attribute information corresponding to the target line type according to the configuration data includes:
[0031] Reading a line attribute corresponding to the target line type in the configuration data;
[0032] Reading a group attribute corresponding to a preset group type corresponding to the target type in the configuration data;
[0033] Attribute information corresponding to the target line type is obtained based on the line attributes and the group attributes.
[0034] Optionally, the property window includes a first window corresponding to the line property and a second window corresponding to the group property; the method further includes:
[0035] In response to a third interactive operation performed on the first window, changing a line attribute corresponding to the annotation data;
[0036] In response to a fourth interactive operation acting on the first window, a group attribute corresponding to the annotation data is changed.
[0037] The embodiment of the present invention further discloses an image annotation device, comprising:
[0038] An image acquisition module, used to acquire the image to be annotated;
[0039] An image display module, used for displaying the image to be annotated in a specified interactive interface;
[0040] A first interaction module, configured to determine a target line type from a plurality of preset line types in response to a first interaction operation on the interactive interface;
[0041] The second interaction module is used to generate annotation data in the image to be annotated according to the target line type in response to a second interaction operation acting on the interactive interface.
[0042] The embodiment of the present invention further discloses a vehicle, comprising:
[0043] one or more processors; and
[0044] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the vehicle to perform one or more of the methods described above.
[0045] The embodiment of the present invention further discloses one or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, enable the processors to execute one or more of the methods described above.
[0046] The embodiments of the present invention include the following advantages: after obtaining configuration data, a specified interactive interface is generated according to the configuration data; by displaying the image to be annotated on the specified interactive interface and responding to the user's first interactive operation of the line type selection control generated according to the configuration data, a target line type is determined from multiple preset line types; and in response to the user's first interactive operation, annotation data matching the object to be annotated in the image to be annotated is generated for the image to be annotated; after the user selects the target line type and performs a drawing operation, the image to be annotated can be annotated and corresponding annotation data can be generated; after the annotation data is generated, the attribute information corresponding to the target line type in the configuration data is read, and the attribute information is added to the annotation data without the need to set relevant parameters, thereby simplifying the complexity of the user's operation of annotating the image and improving the annotation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0048] Figure 1 is a flowchart of steps of an embodiment of an image annotation method of the present invention;
[0049] Figure 2 is a schematic diagram of an interactive interface provided by an embodiment of the present invention;
[0050] Figure 3 is another schematic diagram of an interactive interface provided by an embodiment of the present invention;
[0051] Figure 4 It is a structural block diagram of an embodiment of an image annotation device of the present invention. DETAILED DESCRIPTION
[0052] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] One of the core concepts of an embodiment of the present invention is that, by displaying an image to be annotated in a specified interactive manner and responding to a first interactive operation of a user, a target line type is determined from a plurality of preset line types, and in response to the first interactive operation of the user, annotation data that matches the object to be annotated in the image to be annotated is generated for the image to be annotated. After selecting the target line type, the user performs a drawing operation to annotate the image to be annotated and generate corresponding annotation data without the need to set relevant parameters, thereby simplifying the complexity of the user's image annotation operation and improving the annotation efficiency.
[0054] Reference Figure 1 , shows a flowchart of a method for image annotation according to an embodiment of the present invention, which may specifically include the following steps:
[0055] Step 101, obtaining an image to be annotated;
[0056] The images to be annotated can be obtained from a specified directory; the images to be annotated are driving-related images, such as images of driving roads, images of parking lots, etc.
[0057] The image to be annotated may contain at least one object to be annotated, and the object to be annotated is a physical object in the business scenario of autonomous driving.
[0058] Step 102, displaying the image to be annotated in a designated interactive interface;
[0059] A specified interactive interface may be generated first, and the images to be labeled may be displayed one by one in the interactive interface.
[0060] Step 103, in response to a first interactive operation on the interactive interface, determining a target line type from a plurality of preset line types;
[0061] The first interactive operation may be a selection operation for a preset line type, and by detecting the user's selection operation for the preset line type, the preset line type corresponding to the selection operation is determined to be the target line type.
[0062] When annotating an image, annotation lines are usually generated in the image. Different annotation lines can correspond to different line types, and the line type corresponds to the object to be annotated. For example, the line type can be a parking line, a limit rod, and a drivable area, and the corresponding objects to be annotated are a physical parking space, a physical limit rod, and a physical drivable area. When the line type is a parking line, the annotation line corresponds to the physical parking space, that is, the physical parking line in the image to be annotated is annotated by the annotation line; when the line type is a limit rod, the annotation line corresponds to the physical limit rod; that is, the physical limit rod in the image to be annotated is annotated by the annotation line; when the line type is a drivable area, the area enclosed by the annotation line corresponds to the physical drivable area, that is, the physical drivable area in the image to be annotated is annotated by the area enclosed by the annotation line.
[0063] Step 104 : In response to a second interactive operation performed on the interactive interface, generating annotation data in the image to be annotated according to the target line type.
[0064] Detect the second interactive operation of the user in the interactive interface, and generate corresponding annotation data in the image to be annotated according to the target line type. The annotation data may be the above-mentioned annotation line. Specifically, the second interactive operation may be an operation of drawing the annotation data. Further, multiple annotation points in the image to be annotated may be determined for the second interactive operation, and corresponding annotation lines, i.e., annotation data, may be generated by connecting the annotation points.
[0065] In an embodiment of the present invention, by displaying an image to be annotated in a specified interactive manner and responding to a first interactive operation of a user, determining a target line type from a plurality of preset line types, and responding to the first interactive operation of the user, annotation data matching the object to be annotated in the image to be annotated is generated for the image to be annotated. After selecting the target line type, the user performs a drawing operation to annotate the image to be annotated and generate corresponding annotation data without having to set relevant parameters, thereby simplifying the complexity of the user's image annotation operations and improving the annotation efficiency.
[0066] In an optional embodiment of the present invention, the method further includes: acquiring configuration data; generating a specified interactive interface based on the configuration data; the specified interactive interface includes a line type selection control; and the first interactive operation is an operation on the line type selection control.
[0067] Configuration data can be generated in advance, and when the image needs to be annotated, a specified interactive interface is generated based on the configuration data. The configuration data may be data in JSON (JavaScript Object Notation) format. The configuration data may define preset group types, preset line types, and attribute information of annotation groups, annotation lines, and annotation points. A group is data set to describe annotation lines used to annotate the same annotated object, and each group may include one or more annotation lines for the same annotated object in the image to be annotated. For example, in the business scenario of autonomous driving, groups may include: groups for parking spaces, groups for drivable areas, groups for lanes, and so on. The annotation point may be the coordinates of the second interactive operation relative to the image to be annotated.
[0068] It is understandable that the configuration data may be in other formats besides the JSON format, and the embodiment of the present invention is not limited to this.
[0069] When generating a specified interactive interface, a line type selection control corresponding to a preset line type may be generated, and the user may operate the line type selection control (eg, click one of the line type selection controls) to determine that the line type corresponding to the line type selection control is the target line type.
[0070] Reference Figure 2, showing a schematic diagram of an interactive interface provided by an embodiment of the present invention. In one example, a specified interactive interface 200 is generated according to configuration data, and a corresponding line type selection control is generated according to the preset line type (parking line, limit rod, drivable area) in the configuration data, and the line type selection control includes a parking line selection control 210, a limit rod selection control 220, and a drivable area selection control 230. The first interactive operation can be for any one of the above-mentioned parking line selection control 210, the limit rod selection control 220, and the drivable area selection control 230, and the corresponding preset line type is determined to be the target line type. For example: when the first interactive operation is an operation for the parking line selection control 210, the target line type is determined to be the parking line. An image display area 240 for an image to be annotated can be set in the interactive interface. After the image to be annotated is acquired, the current image to be annotated is displayed in the image display area 240.
[0071] In actual applications, a labeling tool can be generated based on the configuration data, and when the user runs the labeling tool, the specified interactive interface can be generated and the steps 101 to 104 can be executed. By constructing a labeling tool based on the configuration data and using the labeling tool to label the image to be labeled to generate corresponding labeling data, when different group types and line types need to be added for different businesses, they can be obtained directly by modifying the content in the configuration data, so that the labeling tool has universal applicability.
[0072] In an optional embodiment of the present invention, step 104 may include:
[0073] Sub-step S11, generating a plurality of annotation points in the image to be annotated in response to a second interactive operation acting on the interactive interface;
[0074] A position in the interactive interface corresponding to the second interactive operation is determined, and a marked point is generated at the position.
[0075] Sub-step S12, generating annotation data according to the target line type and the annotation points.
[0076] Connect the above-mentioned annotation points according to the target line type to obtain the annotation data.
[0077] Specifically, the annotation points are connected according to the target line type in the order of the generation time of the annotation points, so as to generate the representation data.
[0078] In an optional embodiment of the present invention, the sub-step S12 includes:
[0079] Sub-step S121, determining the geometric features corresponding to the target line type; the geometric features include any one of a line segment, a two-dimensional box and a polygon;
[0080] The configuration data may be provided with geometric features corresponding to the preset line type, that is, the geometric features of the annotation data corresponding to the preset line type. The geometric features may be line segments, two-dimensional boxes, or polygons. For example: the preset line type is a parking line, and its corresponding geometric feature is a polygon; the preset line type is a limit rod, and its corresponding geometric feature is a line segment. By setting corresponding geometric features for different preset line types, the annotation data is made to conform to the physical object, thereby improving the training accuracy and efficiency of the AI model.
[0081] Sub-step S122, using the annotation points in sequence to generate annotation data according to the geometric features.
[0082] The geometric features correspond to the graphics presented by the annotation data. After the annotation points are generated, the annotation points are connected according to the geometric features to generate the annotation data.
[0083] For example: when the geometric feature is a line segment, the generated annotation data is a line segment annotation.
[0084] In an optional embodiment of the present invention, the step of sequentially using the annotation points to generate annotation data according to the geometric features includes:
[0085] Sub-step S1221, if the geometric feature is a line segment, generating a line segment annotation using the annotation point as an endpoint;
[0086] The geometric feature corresponding to the target line type is a line segment, and the graphics presented by the generated annotation data are line segments. When drawing a line segment, based on the annotation points obtained by the second interactive operation, a line segment annotation containing these annotation points is drawn.
[0087] Sub-step S1222, if the geometric feature is a two-dimensional box, using the line connecting the annotation points as a diagonal line to generate a two-dimensional box annotation;
[0088] If the geometric feature corresponding to the target line type is a two-dimensional box, the generated annotation data presents a two-dimensional box. When drawing the two-dimensional box, the line connecting the two drawn annotation points is determined according to the annotation points obtained by the second interactive operation, and the line is used as the diagonal line of the two-dimensional box to draw the two-dimensional box annotation.
[0089] Sub-step S1223, if the geometric feature is a polygon, generating a polygon annotation using the annotation points as vertices;
[0090] The geometric feature corresponding to the target line type is a polygon, and the figure presented by the generated annotation data is a polygon. When drawing a polygon, a polygon containing these annotation points is drawn according to the annotation points obtained by the second interactive operation. Each time a annotation point is added, a annotation point is added to the polygon, and the annotation point is used as the polygon vertex to obtain a polygon annotation.
[0091] Sub-step S1224, generating annotation data based on the line segment annotation, and / or the two-dimensional box annotation, and / or the polygon annotation.
[0092] One or more of the line segment annotation, two-dimensional box annotation, and polygon annotation obtained above is determined as annotation data.
[0093] In one example, when the geometric feature corresponding to the target line type is a line segment or a polygon, if the number of annotation points corresponding to the target type (pointCount) is set to N in the configuration data, the drawing can be automatically terminated when N annotation points are drawn. If the number of groups or the number of line types in a single group is set in the configuration, a corresponding prompt is given when the conditions are not met according to the configuration, such as prompting that the number of line types in the current group type cannot be more than 1.
[0094] In an optional embodiment of the present invention, the method further includes: extracting attribute information corresponding to the target line type based on the configuration data; adding the attribute information to the annotation data; generating an attribute window corresponding to the annotation data; and displaying the attribute information corresponding to the annotation data in the attribute window.
[0095] The configuration data may be provided with default attribute information for different preset line types. After obtaining the annotation data, the default attribute information set in the configuration data is read, and the attribute information is added to the annotation data. The attribute information is the feature corresponding to the target line type. By generating an attribute window corresponding to the annotation data, the corresponding attribute information is displayed in the attribute window, so that the user can intuitively know the attribute information content of the current annotation data.
[0096] The configuration data may also set corresponding attribute names, attribute values, attribute types (single-choice, multiple-choice, selection, input), whether required, default values, etc. for attribute information.
[0097] Reference Figure 3 , showing another schematic diagram of an interactive interface provided by an embodiment of the present invention. In one example, after a polygon annotation 250 is generated in the interactive interface 200 , an attribute window corresponding to the annotation data is displayed, and the attribute window can be at least one of a fixed window 260 and a floating window 270 .
[0098] It should be noted that the position, size, and display mode (fixed window, floating window) of the above property window are only examples, and the embodiments of the present invention are not limited thereto.
[0099] In an optional embodiment of the present invention, the configuration data is provided with at least one preset group type; the preset group type corresponds to at least one preset line type; the step of extracting attribute information corresponding to the target line type based on the configuration data comprises: reading line attributes corresponding to the target line type in the configuration data; reading group attributes corresponding to the preset group type corresponding to the target type in the configuration data; and obtaining attribute information corresponding to the target line type based on the line attributes and the group attributes.
[0100] The configuration data may be configured with default line attributes for different preset line types. For example, when the preset type is a parking space line, the line attribute may be parking available or non-parking available.
[0101] Configuration data can be set with default group attributes for different preset group types, and the attributes of the group can be set by the annotator. For example, if the preset group type is lane, the corresponding group attributes can include main road, branch road, reverse, drivable, etc.
[0102] By reading the line attributes corresponding to the target line type in the configuration data, and the group attributes corresponding to the preset group type corresponding to the target type, and obtaining the attribute information corresponding to the target type based on the above line attributes and group attributes, the corresponding line attributes and group attributes are added to the annotation data.
[0103] In an optional embodiment of the present invention, the attribute window includes a first window corresponding to the line attribute and a second window corresponding to the group attribute; the method further includes:
[0104] In response to a third interactive operation performed on the first window, changing a line attribute corresponding to the annotation data;
[0105] In response to a fourth interactive operation acting on the first window, a group attribute corresponding to the annotation data is changed.
[0106] The user can perform a third interactive operation in the first window to change line attributes in the labeled data; the user can also perform a fourth interactive operation in the second window to change group attributes in the labeled data.
[0107] After generating the annotation data and adding the corresponding default attribute information, the user can change the default line attributes by operating in the first window, and change the default group attributes by operating in the second window.
[0108] In an embodiment of the present invention, after obtaining configuration data, a specified interactive interface is generated according to the configuration data, the image to be annotated is displayed in the specified interactive interface, and a target line type is determined from multiple preset line types in response to a first interactive operation of a user for a line type selection control generated according to the configuration data, and annotation data matching the object to be annotated in the image to be annotated is generated for the image to be annotated in response to the first interactive operation of the user. After selecting the target line type, the user performs a drawing operation to annotate the image to be annotated and generate corresponding annotation data. After the annotation data is generated, the attribute information corresponding to the target line type in the configuration data is read, and the attribute information is added to the annotation data without the need to set relevant parameters, thereby simplifying the complexity of the user's operation of annotating the image and improving the annotation efficiency.
[0109] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0110] Reference Figure 4 , shows a structural block diagram of an embodiment of an image annotation device of the present invention, which may specifically include the following modules:
[0111] An image acquisition module 401 is used to acquire an image to be annotated;
[0112] An image display module 402, used to display the image to be annotated in a specified interactive interface;
[0113] A first interaction module 403, configured to determine a target line type from a plurality of preset line types in response to a first interaction operation on the interactive interface;
[0114] The second interaction module 404 is configured to generate annotation data in the image to be annotated according to the target line type in response to a second interaction operation on the interactive interface.
[0115] In an optional embodiment of the present invention, the device further comprises:
[0116] Configuration reading module, used to obtain configuration data;
[0117] An interface generation module, used to generate a specified interactive interface according to the configuration data; the specified interactive interface includes a line type selection control;
[0118] The first interactive operation is an operation on the line type selection control.
[0119] In an optional embodiment of the present invention, the second interaction module 404 includes:
[0120] a marking point submodule, configured to generate a plurality of marking points in the image to be marked in response to a second interactive operation acting on the interactive interface;
[0121] The annotation data generation submodule is used to generate annotation data according to the target line type and the annotation points.
[0122] In an optional embodiment of the present invention, the annotation data generation submodule includes:
[0123] A geometric feature determination unit, used to determine the geometric feature corresponding to the target line type; the geometric feature includes any one of a line segment, a two-dimensional box and a polygon line;
[0124] The annotation generating unit is used to sequentially use the annotation points to generate annotation data according to the geometric features.
[0125] In an optional embodiment of the present invention, the annotation generating unit includes:
[0126] A line segment unit, for generating a line segment annotation by using the annotation point as an endpoint if the geometric feature is a line segment;
[0127] A two-dimensional frame unit, used for generating a two-dimensional frame annotation by using the line connecting the annotation points as a diagonal line if the geometric feature is a two-dimensional frame;
[0128] A polygon unit, used for generating a polygon annotation by using the annotation points as vertices if the geometric feature is a polygon;
[0129] A labeling unit is used to generate labeling data based on the line segment labeling, and / or the two-dimensional box labeling, and / or the polygon labeling.
[0130] In an optional embodiment of the present invention, the device further comprises:
[0131] An attribute information extraction module, used to extract attribute information corresponding to the target line type according to the configuration data;
[0132] A corresponding relationship establishing module, used for adding the attribute information to the annotation data;
[0133] An attribute window generating module, used for generating an attribute window corresponding to the annotation data;
[0134] The attribute information display module is used to display the attribute information corresponding to the marked data in the attribute window.
[0135] In an optional embodiment of the present invention, the configuration data is provided with at least one preset group type; the preset group type corresponds to at least one preset line type; the attribute information extraction module includes:
[0136] A line attribute reading submodule, used for reading line attributes corresponding to the target line type in the configuration data;
[0137] A group attribute reading submodule, used to read the group attribute corresponding to the preset group type corresponding to the target type in the configuration data;
[0138] The attribute information submodule is used to obtain attribute information corresponding to the target line type based on the line attribute and the group attribute.
[0139] In an optional embodiment of the present invention, the attribute window includes a first window corresponding to the line attribute and a second window corresponding to the group attribute; the device further includes:
[0140] A third interaction module, configured to respond to a third interaction operation on the first window and change the line attribute corresponding to the annotation data;
[0141] The fourth interaction module is used to respond to a fourth interaction operation acting on the first window and change the group attribute corresponding to the marked data.
[0142] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0143] The embodiment of the present invention further discloses a vehicle, comprising:
[0144] one or more processors; and
[0145] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the vehicle to perform the image annotation method as described above.
[0146] The embodiment of the present invention further discloses one or more machine-readable media on which instructions are stored, and when executed by one or more processors, the processors execute the image annotation method as described above.
[0147] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0148] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0149] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0152] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0153] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0154] The above is a detailed introduction to an image annotation method and device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. An image annotation method, characterized in that: include: Get the image to be annotated; Displaying the image to be annotated in a specified interactive interface; wherein the image to be annotated contains at least one object to be annotated, and the object to be annotated is a physical object in a business scenario of autonomous driving; In response to a first interactive operation on the interactive interface, a target line type is determined from a plurality of preset line types; wherein the line type is determined according to the object to be annotated; In response to a second interactive operation on the interactive interface, generating annotation data in the image to be annotated according to the target line type; The method further comprises: Get configuration data; Generate a specified interactive interface according to the configuration data; the specified interactive interface includes a line type selection control; The first interactive operation is an operation on the line type selection control; The method further comprises: extracting attribute information corresponding to the target line type according to the configuration data; Adding the attribute information to the annotation data; Generating a property window corresponding to the annotation data; Displaying the attribute information corresponding to the marked data in the attribute window; The configuration data is provided with at least one preset group type; the preset group type corresponds to at least one preset line type; the step of extracting attribute information corresponding to the target line type according to the configuration data comprises: Reading a line attribute corresponding to the target line type in the configuration data; Reading a group attribute corresponding to a preset group type corresponding to the target line type in the configuration data; Attribute information corresponding to the target line type is obtained based on the line attributes and the group attributes.
2. The method according to claim 1, characterized in that The step of generating annotation data in the image to be annotated according to the target line type in response to the second interactive operation acting on the interactive interface comprises: In response to a second interactive operation performed on the interactive interface, generating a plurality of annotation points in the image to be annotated; Generate annotation data according to the target line type and the annotation points.
3. The method according to claim 2, characterized in that The step of generating annotation data according to the target line type and the annotation point comprises: Determine the geometric features corresponding to the target line type; the geometric features include any one of a line segment, a two-dimensional box and a polygon; The annotation points are sequentially used to generate annotation data according to the geometric features.
4. The method according to claim 3, characterized in that: The step of sequentially using the annotation points to generate annotation data according to the geometric features comprises: If the geometric feature is a line segment, the line segment annotation is generated using the annotation point as the endpoint; If the geometric feature is a two-dimensional box, the two-dimensional box annotation is generated by using the line connecting the annotation points as a diagonal line; If the geometric feature is a polygon, the polygon annotation is generated using the annotation points as vertices; Annotation data is generated based on the line segment annotation, and / or the two-dimensional box annotation, and / or the polygon annotation.
5. The method according to claim 1 or 2 or 3 or 4, characterized in that: The property window includes a first window corresponding to the line property and a second window corresponding to the group property; the method further includes: In response to a third interactive operation performed on the first window, changing a line attribute corresponding to the annotation data; In response to a fourth interactive operation acting on the first window, a group attribute corresponding to the annotation data is changed.
6. An image annotation device, characterized in that: include: An image acquisition module, used to acquire the image to be annotated; An image display module, used to display the image to be annotated in a specified interactive interface; wherein the image to be annotated contains at least one object to be annotated, and the object to be annotated is a physical object in the business scenario of autonomous driving; A first interaction module, configured to respond to a first interaction operation on the interactive interface and determine a target line type from a plurality of preset line types; wherein the line type is determined according to the object to be annotated; A second interaction module, configured to generate annotation data in the image to be annotated according to the target line type in response to a second interaction operation acting on the interactive interface; The device also includes: Configuration reading module, used to obtain configuration data; An interface generation module, used to generate a specified interactive interface according to the configuration data; the specified interactive interface includes a line type selection control; The first interactive operation is an operation on the line type selection control; The device also includes: An attribute information extraction module, used to extract attribute information corresponding to the target line type according to the configuration data; A corresponding relationship establishing module, used for adding the attribute information to the annotation data; An attribute window generating module, used for generating an attribute window corresponding to the annotation data; An attribute information display module, used to display the attribute information corresponding to the marked data in the attribute window; The configuration data is provided with at least one preset group type; the preset group type corresponds to at least one preset line type; the attribute information extraction module includes: A line attribute reading submodule, used for reading line attributes corresponding to the target line type in the configuration data; A group attribute reading submodule, used for reading a group attribute corresponding to a preset group type corresponding to the target line type in the configuration data; The attribute information submodule is used to obtain attribute information corresponding to the target line type based on the line attribute and the group attribute.
7. A vehicle, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the vehicle to perform one or more of the methods of any one of claims 1-5.
8. One or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform one or more methods as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Labeling method and device, electronic equipment and storage medium
CN111309995A