Image target labeling method and device and storage medium
The rotation angle and size of the image annotation frame are directly determined through the user's annotation instructions, and an annotation frame that fits the target object is generated, which solves the cumbersome and time-consuming annotation process in the existing technology and improves the efficiency and accuracy of image annotation.
Patent Information
- Application Number
- CN202410948314.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-10-22
Smart Images

Figure CN118823784A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image annotation, and in particular to a method, device and storage medium for annotating an image target. Background Art
[0002] In the field of data annotation, box annotation is a commonly used annotation method. Box annotation refers to drawing a rectangular box around the target object in the image to enclose and identify the object of interest in the image. If the annotated rectangular box is too large, it will include unnecessary image areas, and if the rectangular box is too small, the entire target object cannot be marked. Therefore, in order to improve the efficiency and effect of image annotation processing, it is necessary to ensure that the annotation box fits the target object as closely as possible.
[0003] At present, the conventional annotation method is to draw an initial rectangular box on the canvas by clicking and dragging the mouse, and then repeatedly drag, rotate, and scale the initial rectangular box to finally make the annotation box fit the target object as closely as possible. Since this process requires a series of manual adjustments to the rectangular box, the steps are cumbersome and time-consuming, resulting in low efficiency in image annotation. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device and storage medium for labeling image objects, so as to improve the efficiency of image labeling.
[0005] In a first aspect, an embodiment of the present application provides a method for labeling an image target, comprising:
[0006] In response to a user's annotation instruction for a target object, determining a rotation angle of the annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction;
[0007] A labeling box corresponding to the target object is generated according to the labeling box rotation angle and the labeling box size.
[0008] In the embodiment of the present application, the efficiency of image annotation is greatly improved by directly determining the rotation angle and the size of the annotation box according to the user's annotation instruction, and generating a annotation box that fits the target object at one time.
[0009] In some possible embodiments, responding to a user's annotation instruction for the target object, determining a rotation angle of the annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction include:
[0010] In response to an initial annotation instruction of a user for a target object, determining a rotation angle of the annotation box based on the initial annotation instruction;
[0011] In response to a user's edge labeling instruction for the target object, a size of a labeling box corresponding to the target object is determined based on the edge labeling instruction.
[0012] In the embodiment of the present application, the rotation angle is first determined by the first annotation instruction, and then the annotation box size is determined according to the second annotation instruction, and the annotation box that fits the target object is generated at one time, further improving the efficiency of image annotation.
[0013] In some possible embodiments, the dimension of the annotation box includes a first side length dimension and a second side length dimension;
[0014] The step of responding to a user's annotation instruction for the target object, determining a rotation angle of the annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction includes:
[0015] In response to an initial annotation instruction of a user for a target object, determining a rotation angle of the annotation frame based on the initial annotation instruction, and determining the first side length size based on the initial annotation instruction;
[0016] In response to a user's edge marking instruction for the target object, the second side length size is determined based on the edge marking instruction.
[0017] In an embodiment of the present application, the rotation angle and the width / length of the annotation box are first determined by the first annotation instruction, and then the length / width of the annotation box is determined according to the second annotation instruction, and a annotation box that fits the target object is generated at one time, further improving the efficiency of image annotation.
[0018] In some possible embodiments, the initial marking instruction is determined based on a first click operation and a second click operation of the user.
[0019] In an embodiment of the present application, the efficiency of image annotation is further improved by directly determining the initial annotation instruction according to the user's first two click operations, determining the rotation angle according to the initial annotation instruction, or synchronously determining the rotation angle and the length / width of the annotation box.
[0020] In some possible embodiments, the initial marking instruction is determined based on a first click operation of the user and a drag operation corresponding to the first click operation.
[0021] In an embodiment of the present application, the efficiency of image annotation is further improved by directly determining the initial annotation instruction according to the user's first click and drag operation, thereby determining the rotation angle according to the initial annotation instruction or synchronously determining the rotation angle and the length / width of the annotation box.
[0022] In some possible embodiments, the edge marking instruction is determined based on at least one click operation of the user after inputting the initial marking instruction.
[0023] In the embodiment of the present application, by determining the edge annotation instruction according to at least one click operation of the user after inputting the initial annotation instruction, the efficiency of image annotation is further improved.
[0024] In some possible embodiments, the image target labeling method further includes:
[0025] In response to a user's adjustment instruction for the annotation box, the annotation box is adjusted based on the adjustment instruction.
[0026] In the embodiment of the present application, by providing a annotation box adjustment function, the user can adjust the generated annotation box, thereby further improving the accuracy of image annotation.
[0027] In a second aspect, an embodiment of the present application provides a device for labeling an image target, including:
[0028] A parameter determination module, for responding to a user's annotation instruction for a target object, determining a rotation angle of the annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction;
[0029] The target marking module is used to generate a marking box corresponding to the target object according to the rotation angle of the marking box and the size of the marking box.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement the method described in any embodiment of the first aspect when executing the program.
[0031] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the first aspect can be implemented.
[0032] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, wherein when the computer program is executed by a processor, the method described in any embodiment of the first aspect can be implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A schematic diagram of a flow chart of a method for labeling an image target provided in an embodiment of the present application;
[0035] Figure 2 One of the schematic diagrams of the “four-point frame” marking process provided in the embodiment of the present application;
[0036] Figure 3 The second schematic diagram of the “four-point frame” marking process provided in the embodiment of the present application;
[0037] Figure 4 One of the schematic diagrams of the “six-point frame” marking process provided in the embodiment of the present application;
[0038] Figure 5 The second schematic diagram of the “six-point frame” marking process provided in the embodiment of the present application;
[0039] Figure 6 A schematic diagram of the structure of an image target labeling device provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0042] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0043] It should be noted that in the field of data annotation, people usually use the method of dragging a box to select and mark the target object in the image, such as marking vehicles, pedestrians, buildings, signs, objects, etc. in the image. The existing drag-box annotation tool is similar to most of the drawing tools people use in daily life. The method is to first draw a rectangular box on the canvas by clicking and dragging the mouse. Usually, the position where the left mouse button falls is the upper left corner vertex of the rectangular box, and the position when the mouse is released is the lower right corner vertex of the rectangular box, thereby forming a plane rectangular box. At this time, the rectangular box is a regular rectangular box without rotation, but due to the actual position and direction of the target object, the camera viewing angle, camera distortion and other reasons, the target object displayed in the image may be tilted. Therefore, during the annotation process, the rectangular box needs to be rotated at a certain angle to achieve the purpose of making the annotation box fit the target object.
[0044] It is understandable that when annotating an object with a rotation (tilt) angle in an image, two steps are generally required: 1. Draw a rectangular box around the target object by clicking and dragging; 2. Rotate the rectangular box to fit the target object as closely as possible, and it may also be necessary to fine-tune the size of the rectangular box. It can be seen that the second step of the existing image annotation process requires operations such as rotation and fine-tuning the size, which seriously affects the efficiency of image annotation.
[0045] In response to the problems existing in the above-mentioned prior art, an embodiment of the present application provides a method for labeling image targets, which can complete the labeling of objects with rotation angles through simple click operations, without the need for manual rotation or fine-tuning operations, effectively reducing the labeling time of a single frame and greatly improving the efficiency of image labeling.
[0046] like Figure 1 As shown, the embodiment of the present application provides a method for labeling an image target, which may include the steps of:
[0047] S1. In response to a user's annotation instruction for a target object, determine a rotation angle of an annotation box based on the annotation instruction, and determine a size of the annotation box based on the annotation instruction.
[0048] Specifically, the user can use input devices such as a mouse to perform annotation operations on the currently displayed image, such as clicking and dragging. The system can determine the annotation instructions for the target object based on these user operations, and then convert them into two parameters: the annotation box rotation angle and the annotation box size.
[0049] S2. Generate a labeling box corresponding to the target object according to the rotation angle and the labeling box size.
[0050] According to the determined annotation frame rotation angle and annotation frame size, the corresponding annotation frame can be generated. The annotation frame size can be the length and width of the rectangular frame, or the diagonal of the rectangular frame, etc. At this point, based on the two parameters of the annotation frame rotation angle and the annotation frame size, a annotation frame that fits the target object can be generated at one time, without fine-tuning the annotation frame rotation angle and the annotation frame size, etc., thereby greatly improving the efficiency of image annotation.
[0051] It should be noted that multiple methods can be set for users to input annotation instructions for target objects. Exemplarily, the annotation instruction can be determined based on a user's one-click drag process. For example, the user can press the left mouse button (without releasing it) and drag to draw a hand-drawn rectangle (with a curved side) corresponding to the target object (target object). This rectangle is drawn by the user according to the actual rotation of the target object in the image. The system can determine the corresponding annotation box rotation angle and annotation box size based on the annotation instruction input by the user's operation, and generate an annotation box that fits the target object. This process is equivalent to the process of standardizing the rectangle drawn by the user.
[0052] For example, the user can also draw an "L"-shaped figure that half surrounds the target object by clicking and dragging according to the actual situation of the target object. The system can also determine the corresponding annotation box rotation angle and annotation box size based on this figure, and generate an annotation box that fits the target object. This process can be regarded as the process of completing the other half of the "L" figure and generating a standardized rectangle.
[0053] In some possible embodiments, step S1, in response to a user's annotation instruction for a target object, determining a rotation angle of the annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction, may include:
[0054] S101, in response to an initial annotation instruction of a user for a target object, determining a rotation angle of an annotation box based on the initial annotation instruction;
[0055] S102 : In response to a user's edge labeling instruction for a target object, determine a size of a labeling box corresponding to the target object based on the edge labeling instruction.
[0056] It should be noted that the above lists two ways of determining the annotation instructions by "drawing in one stroke" to quickly generate an annotation box that fits the target object. It can be understood that these two settings are usually suitable for the case where the annotated object has a regular shape. For the annotation process of more complex graphics, it can also be divided into two steps: first input the initial annotation instruction for determining the rotation angle of the annotation box, and then input the edge annotation instruction for determining the size of the annotation box.
[0057] Specifically, the annotation tool can set a corresponding annotation function trigger mechanism, such as providing two buttons (virtual buttons in the display screen or physical buttons on the keyboard). When one of the buttons is selected, the input mode of the initial annotation instruction can be entered. In this mode, the user's operations are all regarded as inputting the initial annotation instruction; when the other button is selected, the input mode of the edge annotation instruction can be entered. In this mode, the user's operations are all regarded as inputting the edge annotation instruction.
[0058] Based on this, the rotation angle is first determined by a labeling instruction, and then the labeling box size is determined according to another labeling instruction. The instruction input boundary of the labeling parameters is determined, which makes the labeling process more controllable, effectively improves the accuracy of labeling and further improves the efficiency of image labeling.
[0059] In some possible embodiments, the dimension of the annotation box includes a first side length dimension and a second side length dimension;
[0060] Step S1, in response to a user's annotation instruction for a target object, determining a rotation angle of an annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction, may include:
[0061] S111, in response to an initial annotation instruction of a user for a target object, determining a rotation angle of the annotation frame based on the initial annotation instruction, and determining a first side length size based on the initial annotation instruction;
[0062] S112 . In response to a user's edge labeling instruction for the target object, determine a second side length based on the edge labeling instruction.
[0063] It should be noted that steps S111-S112 also input the labeling instructions in two steps. The difference from the corresponding method of steps S101-S102 is that the initial labeling instructions input in the first step of steps S111-S112 simultaneously determine the rotation angle of the labeling box and one of the side lengths, and the edge labeling instructions input in the second step determine the remaining side length.
[0064] Specifically, the first side length and the second side length refer to the length and width of the rectangular box. When the user inputs the initial annotation instruction in the first step (such as a straight line drawn along the bottom of the target object), the rotation angle of the annotation box and the corresponding side length (which can be called length, width or height) can be determined at the same time; then, when the user inputs the edge annotation instruction in the second step (such as the highest and lowest endpoints of an object), the length of another side perpendicular to the first side length can be determined (the length is equal to the sum of the distances between the upper and lower endpoints and the first side length), thereby determining the final annotation box.
[0065] Based on this, the rotation angle and the width / length of the annotation box are first determined through a annotation instruction, and then the length / width of the annotation box is determined according to another annotation instruction, and a annotation box that fits the target object is generated at one time, further improving the efficiency of image annotation.
[0066] In some possible embodiments, the initial marking instruction is determined based on the user's first click operation and second click operation.
[0067] Specifically, the user can leave two corresponding annotation points in the image through two consecutive click operations (each click operation is the process of pressing the mouse and immediately releasing it in place). A straight line can be formed based on these two annotation points, and then the rotation angle of the annotation box can be determined based on the angle between this straight line and the horizontal line (or vertical line).
[0068] It is understandable that the "first click operation" and "second click operation" here are relative to the process currently being labeled. For example, if there are multiple objects in the image, the number of clicks for each object is calculated independently. Different rules can be set for resetting the number of clicks according to needs: exemplarily, the user can reset the number of clicks by clicking a reset button (virtual button or physical button); exemplarily, the number of clicks can also be reset based on the distance of the user's click position relative to the object in the image. For example, after completing the labeling of the first object and starting to label the second object, the system will determine that the distance of the user's click position relative to the second object is obviously much smaller than the distance of the click position relative to the first object. Therefore, this click operation is regarded as the first click operation on the second object.
[0069] Based on this, by directly determining the initial annotation instruction according to the user's first two click operations on the target object, the rotation angle is determined according to the initial annotation instruction, or the rotation angle and the length / width of the annotation box are determined synchronously, thereby further improving the efficiency of image annotation.
[0070] In some possible embodiments, the initial marking instruction is determined based on the user's first click operation and a drag operation corresponding to the first click operation.
[0071] It should be noted that when inputting the initial marking instruction, it can also be determined based on the user's click and drag operation. It is understandable that there are usually two ways to draw a straight line: 1. Draw two points respectively through two click operations (a process of pressing the mouse button once and releasing it in place), and determine the straight line based on the two points; 2. Generate a straight line by pressing the mouse button at the origin (not releasing it), dragging, and releasing the mouse button at the end point.
[0072] Compared with the first method, the advantage of the second method is that after pressing the mouse and before releasing the mouse, the system will continuously display the corresponding straight line on the screen according to the position where the user drags the mouse. The straight line will change its inclination angle as the user drags the mouse up, down, left and right. In this process, the user can determine the final inclination angle of the straight line based on the parallelism of the displayed straight line and the target object, thereby obtaining a straight line that is more closely aligned with the target object, and then determining a more accurate rotation angle of the annotation box.
[0073] Based on this, by directly determining the initial annotation instruction according to the user's click and drag operation, a more accurate annotation box rotation angle can be determined according to the initial annotation instruction (or the rotation angle and the length / width of the annotation box can be determined synchronously), thereby further improving the efficiency of image annotation.
[0074] In some possible embodiments, the edge marking instruction is determined based on at least one click operation of the user after inputting the initial marking instruction.
[0075] It should be noted that when the edge marking instruction is input, it can be determined according to at least one click operation of the user.
[0076] Specifically, when only the rotation angle of the annotation box can be determined according to the initial annotation instruction, the edge annotation instruction needs to be determined according to at least four clicks of the user, that is, the user needs to mark the top, bottom, left and right ends of the target object respectively through at least four clicks. It can be understood that this situation can be regarded as the "six-point drawing frame method": the first two points determine the rotation angle of the annotation box, and the last four points determine the width and height of the annotation box.
[0077] On the basis of determining the rotation angle of the annotation box according to the initial annotation instruction, when the length of one of the sides of the annotation box (for example, the width from the leftmost end to the rightmost end of the target object) can also be determined according to the initial annotation instruction, the edge annotation instruction needs to be determined according to at least two clicks of the user, that is, the user needs to mark the top and bottom of the target object (determine the height of the target object) respectively through at least two clicks. It can be understood that this situation can be regarded as the "four-point frame method": the first two points determine the rotation angle and width of the annotation box, and the last two points determine the height of the annotation box.
[0078] On the basis of determining the rotation angle of the annotation box according to the initial annotation instruction, the length and position of one of the sides of the annotation box can also be determined according to the initial annotation instruction (for example, the straight line of the initial annotation instruction just fits the bottom edge of the target object, and the width from the leftmost end to the rightmost end of the target object is determined). In this case, the edge annotation instruction only needs to be determined based on at least one click operation of the user, that is, the user needs to mark the top of the target object (determine the height of the target object) through at least one click operation. It can be understood that this situation can be regarded as the "three-point frame method": the first two points determine the rotation angle and bottom edge of the annotation box, and the last point determines the height of the annotation box.
[0079] It is understandable that, for any of the above three situations, when the number of click operations for marking by the user exceeds the minimum number of clicks required for the corresponding mark, the specific edge marking instruction can be determined based on the distance of each point from the straight line corresponding to the initial marking instruction. For example, for the last "three-point frame method", when inputting the edge marking instruction, usually only one click operation is required to determine the highest point of the target object, but for some irregular objects, when the user cannot determine the highest point by visual inspection, the user can click on multiple higher points of the target object based on experience, and the system can calculate the distance between these points and the straight line corresponding to the initial marking instruction based on the positions of the multiple points clicked by the user, and determine the point with the largest distance as the highest point of the target object, thereby generating a marking box that can contain the entire target object.
[0080] In some possible embodiments, the method for labeling an image object may further include the steps of:
[0081] S3. Respond to the user's adjustment instruction for the annotation box, and adjust the annotation box based on the adjustment instruction.
[0082] It should be noted that, based on the above steps S1 to S2, a labeling box that fits the target object can be generated. Under normal circumstances, the user does not need to fine-tune the rotation angle and size of the labeling box.
[0083] However, it is understandable that in some cases, for example, when the user enters the annotation command, the click position is inaccurate due to the pursuit of higher efficiency, which may result in the generated annotation box not fitting the target object well. Therefore, in the embodiment of the present application, by providing the annotation box adjustment function, the user can make relevant adjustments to the generated annotation box, thereby further improving the accuracy of image annotation.
[0084] Specifically, for the case where the generated annotation box does not fit the target object well (the annotation box is too small to enclose the entire target object, or the annotation box is too large to include redundant image areas), the user can adjust the corresponding side lengths separately, pulling the corresponding side lengths away from (or closer to) the center of the target object until the side lengths just enclose the farthest end of the target object.
[0085] In addition, when the generated annotation box fails to fit the target object well, the user can continue to input additional edge annotation instructions by clicking, and the system updates the corresponding side lengths of the annotation box according to the additional edge annotation instructions.
[0086] In addition, users can also perform fine-tuning operations such as rotating, dragging, zooming in and out, etc. on the generated annotation box, which can be set according to actual needs.
[0087] See also Figures 2 to 3 ,The following example illustrates the labeling process of the “four-point frame”.
[0088] Assume that you currently need to Figure 2 The shoulder bag (target object) on the right side of the image is marked. Since the target object has a certain tilt angle, the efficiency is extremely low if the existing marking method of drawing a frame + fine-tuning is used. The marking process of the embodiment of the present application is as follows:
[0089] 1. If Figure 2 As shown, a point (point A1 and point B1) is marked on both sides of the target object, and the rotation angle and width of the marking box can be determined according to the line L1 connecting these two points;
[0090] 2. If Figure 3 As shown, a point (point C1 and point D1) is marked on the upper and lower edges of the target object respectively. Based on these two points, the highest point and the lowest point (i.e., the height of the marking box) of the marking box relative to the straight line L1 can be determined. At this time, a marking box that fits the target object can be directly generated according to the determined rotation angle, width, and height.
[0091] In addition, if the user feels that the generated annotation box does not fit the target object well enough, the user can fine-tune the annotation box by adjusting points A1, B1, C1 and D1 respectively (or rotating, dragging, etc.). It is understandable that this fine-tuning operation step is not necessary and is only required in a few cases where the user adds inaccurate annotation points.
[0092] It should be noted that for the annotation of target objects with a high degree of inclination and a relatively square shape, the "four-point frame" annotation method of this example can improve the annotation efficiency by more than 80% compared with the prior art. It can be understood that in the embodiment of the present application, the determination of the connection line L1 is crucial, so the user needs to have a relatively accurate and intuitive judgment of the target object to mark the wide side of the target object and the straight line parallel to the inclined object.
[0093] See also Figures 4 to 5 ,The following example illustrates the labeling process of the “six-point frame”.
[0094] Assume that you currently need to Figure 4 The shoes (target object) in the image shown are annotated. Since the target object has a certain tilt angle, the efficiency is extremely low if the existing marking method of drawing a frame + fine-tuning is used. The marking process of the embodiment of the present application is as follows:
[0095] 1. If Figure 4 As shown, two points on the target object that can confirm the rotation angle are found. In this example, the toe and the heel of the shoe are selected. Since the thickness of the sole is basically the same, the line connecting the toe and the heel (and both are the upper ends of the sole) can basically determine the rotation angle of the shoe, which are marked as point A2 and point B2. The rotation angle of the annotation box is determined based on the line L2 formed by these two points.
[0096] 2. If Figure 5 As shown, a point (points C2, D2, E2 and F2 respectively) is marked at each of the four edges (top, right, bottom and left) of the target object, so that the width and height of the marking box can be determined, and thus a marking box that fits the target object can be directly generated according to the determined rotation angle, width and height.
[0097] In addition, if the user feels that the generated annotation box does not fit the target object well enough, the user can fine-tune the annotation box by adjusting points C2, D2, E2 and F2 respectively (or rotating, dragging, etc.). It is understandable that this fine-tuning operation step is not necessary and is only required in a few cases where the annotation points added by the user are inaccurate.
[0098] It can be understood that the "six-point frame" labeling method of this example is suitable for labeling target objects that are tilted and relatively irregular. Compared with the existing technology, the method of this example can improve the labeling efficiency by about 60-80%.
[0099] It is understandable that in this example, the determination of the line L2 is crucial, and the user needs to have a relatively accurate intuitive judgment of the target object in order to determine the rotation angle of the target object. In general, the annotator needs to have a certain concept of the physical object of the target object, and find the law that can reflect the inclination of the target object based on common sense, and then determine the rotation angle of the annotation box by annotating two points, thereby converting the second step fine-tuning operation, which is the most cumbersome and time-consuming in the existing scheme, into a direct one-step method for calibrating two points. In addition, this example only needs to annotate the edge of the rotated target object by setting the size of the target object, which greatly reduces the size error caused by the first step of pulling the frame in the existing scheme, thereby avoiding the need to fine-tune the size of the annotation box, or can greatly shorten the time for resizing the annotation box, thereby effectively improving the efficiency of image annotation.
[0100] Please refer to Figure 6 , Figure 6 FIG. 1 is a block diagram showing a composition of an image target annotation device provided by some embodiments of the present application. It should be understood that the image target annotation device is similar to the above-mentioned Figure 1 Corresponding to the method embodiment, each step involved in the above method embodiment can be executed. The specific functions of the image target labeling device can be found in the above description. To avoid repetition, the detailed description is appropriately omitted here.
[0101] Figure 6 The image target annotation device includes at least one software function module that can be stored in a memory in the form of software or firmware or fixed in the image target annotation device, and the image target annotation device includes:
[0102] A parameter determination module 610 is used to respond to a user's annotation instruction for a target object, determine a rotation angle of the annotation box based on the annotation instruction, and determine a size of the annotation box based on the annotation instruction;
[0103] The target annotation module 620 is used to generate an annotation box corresponding to the target object according to the rotation angle and the annotation box size.
[0104] It can be understood that the above-mentioned device item embodiment corresponds to the method item embodiment of the present invention. An image target labeling device provided by the embodiment of the present invention can implement the image target labeling method provided by any method item embodiment of the present invention.
[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.
[0106] like Figure 7As shown, some embodiments of the present application provide an electronic device 700, which includes: a memory 710, a processor 720, and a computer program stored in the memory 710 and executable on the processor 720, wherein the processor 720 reads the program from the memory 710 via a bus 730 and executes the program to implement a method of any embodiment of the image target labeling method described above.
[0107] Processor 720 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 720 can be a microprocessor.
[0108] The memory 710 may be used to store instructions executed by the processor 720 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 720 of the disclosed embodiment may be used to execute instructions in the memory 710 to implement the method shown above. The memory 710 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.
[0109] Some embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon. The computer program is executed by a processor to execute the method described in the method embodiment.
[0110] Some embodiments of the present application further provide a computer program product, which, when executed on a computer, enables the computer to execute the method described in the method embodiment.
[0111] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. 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.
[0112] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0113] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0114] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0115] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0116] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0117] 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 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 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 device including the elements.
Claims
1. A method for labeling an image target, characterized in that: include: In response to a user's annotation instruction for a target object, determining a rotation angle of the annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction; A labeling box corresponding to the target object is generated according to the labeling box rotation angle and the labeling box size.
2. The image target labeling method according to claim 1, characterized in that: The step of responding to a user's annotation instruction for the target object, determining a rotation angle of the annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction includes: In response to an initial annotation instruction of a user for a target object, determining a rotation angle of the annotation box based on the initial annotation instruction; In response to a user's edge labeling instruction for the target object, a size of a labeling box corresponding to the target object is determined based on the edge labeling instruction.
3. The image target labeling method according to claim 1, characterized in that: The dimension of the marking frame includes a first side length dimension and a second side length dimension; The step of responding to a user's annotation instruction for the target object, determining a rotation angle of the annotation box based on the annotation instruction, and determining a size of the annotation box based on the annotation instruction includes: In response to an initial annotation instruction of a user for a target object, determining a rotation angle of the annotation frame based on the initial annotation instruction, and determining the first side length size based on the initial annotation instruction; In response to a user's edge marking instruction for the target object, the second side length size is determined based on the edge marking instruction.
4. The image target labeling method according to claim 2 or 3, characterized in that: The initial marking instruction is determined based on the user's first click operation and the second click operation.
5. The image target labeling method according to claim 2 or 3, characterized in that: The initial marking instruction is determined based on the user's first click operation and the drag operation corresponding to the first click operation.
6. The image target labeling method according to claim 2 or 3, characterized in that: The edge marking instruction is determined based on at least one click operation of the user after inputting the initial marking instruction.
7. The method for labeling an image target according to claim 1, characterized in that: Also includes: In response to a user's adjustment instruction for the annotation box, the annotation box is adjusted based on the adjustment instruction.
8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the method for labeling an image target according to any one of claims 1 to 7 can be implemented when the processor executes the program.
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 method for labeling an image object according to any one of claims 1 to 7 is executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method for labeling an image target according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Image target processing method and device, storage medium and electronic device
CN114298915A
Label box acquisition method and device, electronic equipment and computer readable storage medium
CN117876662A
Rotating target labeling method and device, electronic equipment and readable storage medium
CN118038072A
System and method for bounding box tool
US20200098154A1
