Image annotation method and apparatus
By determining the first annotation graphic of the target object in the image and performing edge detection, and using the bounding graphic to correct the annotation quality, the problem of inaccurate and inefficient image annotation is solved, and efficient and accurate image annotation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2022-08-22
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, image annotation mainly relies on manual annotation, which suffers from inaccurate annotation and low efficiency, especially when annotating large datasets.
By determining the first annotation graphic of the target object in the image, edge detection is performed to obtain edge information. The annotation quality is confirmed by using the circumscribed graphic, and corrections are made as necessary to obtain the final annotation graphic.
It improves the accuracy and efficiency of image annotation, reduces the labor input of annotators, and ensures the quality and efficiency of annotation tasks.
Smart Images

Figure CN115908826B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image annotation method and apparatus. Background Technology
[0002] Image annotation involves graphically labeling target objects in an image, with the labeled graphics typically closely surrounding the target object. Currently, image annotation mainly relies on manual annotation, but this method suffers from inaccuracies and low efficiency, especially when annotating large datasets. Summary of the Invention
[0003] This application provides an image annotation method and apparatus to improve the accuracy and efficiency of image annotation.
[0004] To achieve the above objectives, this application provides an image annotation method, which includes:
[0005] Determine the first labeled graphic corresponding to the target object in the image;
[0006] Edge detection is performed on the first labeled graphic to obtain the first edge information, and the corresponding circumscribed graphic is determined based on the first edge information;
[0007] Based on the first labeled graphic and the bounding graphic, the final labeled graphic of the corresponding target object is determined.
[0008] Among them, determining the final labeled graphic of the corresponding target object based on the first labeled graphic and the bounding graphic includes:
[0009] Use the external drawing to confirm the annotation quality of the first annotation drawing;
[0010] In response to the fact that the annotation quality does not meet the preset conditions, the first annotation graphic is corrected to obtain the final annotation graphic.
[0011] Among them, determining the final labeled graphic of the corresponding target object based on the first labeled graphic and the bounding graphic includes:
[0012] In response to the annotation quality meeting the preset conditions, the first annotated graphic is used as the final annotated graphic of the corresponding target object.
[0013] Among them, determining the final labeled graphic of the corresponding target object based on the first labeled graphic and the bounding graphic includes:
[0014] The width and height of the target object are estimated based on the circumscribed graph;
[0015] The annotation quality of the first annotation graphic is calculated based on the dimensions of the first annotation graphic, the width of the target object, and the height of the target object.
[0016] The first edge information includes at least one edge line, and determining the corresponding circumscribed shape based on the first edge information includes: determining the corresponding circumscribed shape for each edge line;
[0017] Estimating the width and height of a target object based on its circumscribed graph includes:
[0018] The width of the target object is estimated from the circumscribed shape of all circumscribed shapes within the first labeled shape, and the height of the target object is estimated from the circumscribed shape of all circumscribed shapes within the first labeled shape.
[0019] Based on the dimensions of the first annotated graphic, the width of the target object, and the height of the target object, the annotation quality of the first annotated graphic is calculated, including:
[0020] Calculate the ratio of the first product and the second product to obtain the annotation quality of the first annotation graphic. The first product is the product of the width and height of the target object, and the second product is the product of the width and height of the first annotation graphic.
[0021] The method also includes:
[0022] If the annotation quality is greater than the threshold, then the annotation quality meets the preset conditions; otherwise, the annotation quality does not meet the preset conditions.
[0023] The process involves revising the first labeled graphic to obtain the final labeled graphic, including:
[0024] Expand the first labeled graphic outward by a preset ratio to obtain the expanded search area;
[0025] Edge detection is performed in the extended search area to obtain second edge information, and the corresponding circumscribed shape is determined based on the second edge information;
[0026] Based on the circumscribed graph within the extended search area, the final labeled graph of the corresponding target object is determined.
[0027] The second edge information includes at least one edge line;
[0028] The method also includes: determining the corresponding circumscribed shape for each edge line within the expanded search area;
[0029] Based on the circumscribed and confined graphs within the extended search area, the final labeled graph of the corresponding target object is determined, including:
[0030] Identify the first circumscribed graphic with the maximum width and the second circumscribed graphic with the maximum height among all the circumscribed graphics of the edge lines within the extended search area;
[0031] The x-coordinate of the preset point of the final labeled graphic is determined by the first circumscribed graph, and the y-coordinate of the preset point of the final labeled graphic is determined by the second circumscribed graph, so as to obtain the final labeled graphic.
[0032] The first edge information is obtained by edge detection in the first labeled graphic, including:
[0033] Convert the image to a binary image;
[0034] The intermediate image is obtained by filtering the first labeled graphic of the binarized image;
[0035] Edge detection is performed on the first labeled graphic of the intermediate image to obtain the first edge information.
[0036] To achieve the above objectives, this application also provides an electronic device including a processor; the processor is configured to execute instructions to implement the above methods.
[0037] To achieve the above objectives, this application also provides a computer-readable storage medium for storing instruction / program data that can be executed to implement the above methods.
[0038] This application first determines the first labeled graphic corresponding to the target object in the image, then performs edge detection on the first labeled graphic to obtain edge information, and determines the corresponding circumscribed graphic based on the edge information; then, the final labeled graphic of the target object can be determined based on the first labeled graphic and the circumscribed graphic. In this way, the final labeled graphic of the target object can be determined based on the circumscribed graphic determined by the edge detection information of the first labeled graphic and the first labeled graphic, so as to reduce external interference. By utilizing the local superior performance characteristics of the edge detection method, the final labeled graphic obtained can be more accurate, improving the quality of the labeled graphic. Furthermore, this application can determine the final labeled graphic of the target object based on the annotator's single annotation result, which significantly reduces the annotator's labor input and ensures the efficiency and quality of the annotation task. Attached Figure Description
[0039] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0040] Figure 1 This is a flowchart illustrating one embodiment of the image annotation method of this application;
[0041] Figure 2 This is a schematic diagram of another embodiment of the image annotation method of this application;
[0042] Figure 3This is a schematic diagram of the structure of one embodiment of the electronic device of this application;
[0043] Figure 4 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application. In addition, unless otherwise specified (e.g., "or additionally" or "or in alternatives"), the term "or" as used herein refers to a non-exclusive "or" (i.e., "and / or"). Furthermore, the various embodiments described herein are not necessarily mutually exclusive, as some embodiments can be combined with one or more other embodiments to form new embodiments.
[0045] Specifically, such as Figure 1 and Figure 2 As shown, the image annotation method of this embodiment includes the following steps. It should be noted that the step numbers are for simplification only and are not intended to limit the execution order of the steps. The execution order of each step in this embodiment can be arbitrarily changed without departing from the technical concept of this application.
[0046] S101: Determine the first labeled graphic corresponding to the target object in the image.
[0047] The first annotation graphic corresponding to the target object in the image can be determined so that edge detection can be performed on the first annotation graphic to obtain edge information, and the corresponding circumscribed graphic can be determined based on the edge information. Then, the final annotation graphic of the target object can be determined based on the first annotation graphic and the circumscribed graphic. In this way, the final annotation graphic of the target object can be determined based on the circumscribed graphic determined by the edge detection information of the first annotation graphic and the first annotation graphic, which can make the final annotation graphic more accurate and improve the quality of the annotation graphic.
[0048] The target object can be set according to the actual situation and is not limited here. For example, it can be a car, an animal, a book, etc.
[0049] The first annotation graphic can be a graphic manually annotated in the image to identify the location of a target object in the image. Of course, in other embodiments, the first annotation graphic can also be a graphic annotated in the image by a target object detection algorithm to identify the location of a target object in the image when the target object is detected.
[0050] In this embodiment, the first labeled graphic in the image at least encloses at least a portion of the target object. More preferably, the first labeled graphic in the image encloses at least a majority of the target object, so that at least a majority of the target object falls within the first labeled graphic, allowing for a more accurate determination of the final labeled graphic based on the at least majority of the target object within the first labeled graphic. Most preferably, the first labeled graphic in the image encloses the entire target object.
[0051] If the first labeled graphic is one that has already been labeled, then in step S101, the first labeled graphic of the corresponding target object in the image can be acquired when the image is acquired, so as to determine the final labeled graphic of the corresponding target object in the image later.
[0052] The shape of the first labeled graphic can be set according to the actual situation and is not limited here. For example, it can be a rectangle.
[0053] S102: Perform edge detection in the first labeled graphic to obtain the first edge information, and determine the corresponding circumscribed graphic based on the first edge information.
[0054] After determining the first annotation graphic of the corresponding target object in the image based on step S101, edge detection can be performed on the first annotation graphic to obtain the first edge information, and the corresponding circumscribed graphic can be determined based on the first edge information.
[0055] In one possible implementation, edge detection can be performed on the first labeled graphic to obtain at least one edge line; then, the circumscribed shape of each edge line can be determined. It is understood that determining the circumscribed shape of each edge line can be done by determining the minimum circumscribed shape of each edge line.
[0056] In another possible implementation, edge detection can be performed on the first labeled graphic to obtain at least one edge line; then, the smallest circumscribed shape enclosing all edge lines in the first labeled graphic can be determined. When determining the circumscribed shape using this implementation, it is preferable that the first labeled graphic contains no other objects besides the target object. This ensures that the circumscribed shape determined using the first labeled graphic accurately reflects the actual situation of the target object, thereby improving the accuracy of the final labeled graphic and enhancing the quality of image annotation.
[0057] Preferably, the shape of the circumscribed graphic determined above can be the same as the shape of the first annotation graphic.
[0058] Various edge detection operators can be used for edge detection, including any one or more of the following: first-order edge detection operators, such as the Roberts Cross operator, Prewitt operator, Sobel operator, Kirsch operator, compass operator, etc.; and second-order edge detection operators, such as the Marr-Hildreth operator, Canny operator, Laplacian operator, etc. This embodiment does not impose excessive restrictions on the choice of edge detection operator.
[0059] Alternatively, the first labeled graphic can be filtered first to remove noise; then edge detection can be performed on the filtered first labeled graphic to obtain the first edge information. Various filtering methods can be used to filter the first labeled graphic, and there are no restrictions here. For example, it can include any or more of the following: Gaussian filtering, smoothing filtering, and guided filtering, etc.
[0060] Alternatively, the image can be converted to a binary image first, and then edge detection can be performed on the first labeled graphic of the binary image.
[0061] S103: Based on the first labeled graphic and the circumscribed graphic, determine the final labeled graphic corresponding to the target object.
[0062] After determining the circumscribed graphic based on step S102, the final labeled graphic of the corresponding target object can be determined based on the first labeled graphic and the circumscribed graphic.
[0063] In one feasible approach, the annotation graphic determined by the circumscribed graphic and the first annotation graphic can be weighted to determine the final annotation graphic of the corresponding target object.
[0064] In another feasible approach, the annotation quality of the first annotation graphic can be determined first based on the first annotation graphic and the circumscribed graphic; if the annotation quality meets the preset conditions, the first annotation graphic is used as the final annotation graphic of the corresponding target object; if the annotation quality does not meet the preset conditions, the final annotation graphic is re-determined based on the first annotation graphic.
[0065] Specifically, the width and height of the target object can be estimated based on the circumscribed graph; then, based on the width and height of the target object and the dimensions of the first annotation graph, the annotation quality of the first annotation graph can be calculated.
[0066] Specifically, when a circumscribed shape is determined for each edge line, the width of the circumscribed shape with the largest width value among all circumscribed shapes in the first annotation shape can be estimated as the width of the target object, and the height of the circumscribed shape with the largest height value among all circumscribed shapes in the first annotation shape can be estimated as the height of the target object. That is, after a corresponding circumscribed shape is established for each line in the first edge information to enclose the line, circumscribed shapes exceeding the first annotation shape can be filtered out. Then, the circumscribed shape with the largest width value and the circumscribed shape with the largest height value are determined from the remaining set of circumscribed shapes, and then the height and width of the target object are estimated. In this way, the characteristics of the outer contour line of the object being relatively longer than the inner edge line and the edge lines of noise interference can be utilized to estimate the height and width of the target object relatively accurately using the above method. When the smallest circumscribed shape enclosing all edge lines in the first annotation shape is determined in step S102, the width of the circumscribed shape can be estimated as the width of the target object, and the height of the circumscribed shape can be estimated as the height of the target object.
[0067] After estimating the width and height of the target object, the ratio of the product of the target object's width and height to the product of the width and height of the first annotation graphic can be calculated to obtain the annotation quality of the first annotation graphic. The specific calculation formula is as follows:
[0068] Among them, w b h is the estimated width of the target object. b w is the estimated height of the target object. g h is the width of the first labeled graphic. g Q represents the height of the first labeled graphic. i The annotation quality of the first annotated graphic.
[0069] If the annotation quality of the first annotated graphic is determined using the above method, and the annotation quality is greater than a threshold, then the annotation quality of the first annotated graphic meets the preset conditions; otherwise, it does not meet the preset conditions. The threshold can be set according to actual circumstances and is not limited here; for example, it could be 0.7, 0.8, 0.85, 0.87, 0.9, 0.95, etc.
[0070] Of course, the annotation quality of the first annotation graphic can also be determined in other ways. For example, if the smallest circumscribed graphic that surrounds all edge lines in the first annotation graphic is determined in step S102, the annotation quality of the first annotation graphic can be calculated by calculating the intersection-union ratio of the circumscribed graphic and the first annotation graphic.
[0071] If the annotation quality of the first annotation graphic does not meet the preset conditions based on the above method, the final annotation graphic can be determined again based on the first annotation graphic using the following implementation method.
[0072] In the first implementation, the first labeled graphic can be expanded outward by a preset ratio to obtain an expanded search area; edge detection is performed in the expanded search area to obtain second edge information, and the corresponding circumscribed graphic is determined based on the second edge information; the final labeled graphic of the corresponding target object is determined using the circumscribed graphic corresponding to the second edge information.
[0073] More specifically, the second edge information may include at least one edge line detected in the extended search area; when re-determining the final annotation graphic based on the first annotation graphic, the circumscribed graphic of each edge line in the extended search area may be determined; then, the coordinate extreme values may be obtained in the circumscribed graphics corresponding to all edge lines in the extended search area, and the final annotation graphic may be determined using the obtained coordinate extreme values.
[0074] In a specific example, the circumscribed shape is a rectangle, and the coordinates of the circumscribed shape are labeled (x1, y1, x2, y2), where x1 and y1 are the coordinates of the top-left corner of the rectangle, and x2 and y2 are the coordinates of the top-right corner of the rectangle. Then the coordinates of the final labeled shape of the target object can be (min(x1), min(y1), max(x2), max(y2)). The coordinates of the final labeled shape of the target object can be determined by selecting the maximum or minimum value in the x and y dimensions from the coordinates of the circumscribed shapes corresponding to all edge lines in the extended search area.
[0075] In another specific example, the extreme values of coordinates can refer to the extreme values of the x-coordinates of the circumscribed graph with the largest width (i.e., the first circumscribed graph) and the extreme values of the y-coordinates of the circumscribed graph with the largest height (i.e., the second circumscribed graph) corresponding to all edge lines in the extended search area. Then, the x-coordinates of the preset points (e.g., the upper left corner, the lower right corner, or the center point) of the final labeled graph are determined using the first circumscribed graph, and the y-coordinates of the preset points of the final labeled graph are determined using the second circumscribed graph. In this way, the characteristics of the outer contour line of the object being relatively longer than the inner edge line and the edge lines of noise interference can be used to estimate the circumscribed graph corresponding to the outer contour line of the target object more accurately, thereby determining the final labeled graph corresponding to the target object more accurately. For example, suppose the coordinates of the first circumscribed figure are labeled (x3, y3, x4, y4), where x3 and y3 are the coordinates of the top left corner of the first circumscribed figure, and x4 and y4 are the coordinates of the top right corner of the first circumscribed figure; suppose the coordinates of the second circumscribed figure are labeled (x5, y5, x6, y6), where x5 and y5 are the coordinates of the top left corner of the second circumscribed figure, and x6 and y6 are the coordinates of the top right corner of the second circumscribed figure, then the final labeled figure can be labeled as (x3, y5, x4, y6) or [(x3, y5), x4-x3 (width of the final labeled figure), y6-y5 (height of the final labeled figure)].
[0076] In other embodiments, after edge detection is performed in the extended search area to obtain second edge information, and the second edge information includes at least one edge line detected in the extended search area, the minimum bounding shape that surrounds all edge lines in the extended search area can be determined, and then the minimum edge shape is used as the final annotation shape of the corresponding target object.
[0077] In the second implementation, the position information of the circumscribed graphic in the first annotation graphic can be used to determine whether there is a possibility that part of the target object falls outside the area of the first annotation graphic; if so, the first annotation graphic is expanded outward by a preset ratio, and the method of the first implementation can be used to determine the final annotation graphic corresponding to the target object; if not, the final annotation graphic can be determined directly using the circumscribed graphic corresponding to the edge information in the first annotation graphic.
[0078] Specifically, the possibility of a target object partially falling outside the area of the first labeled graphic can be determined by judging whether the edge of the largest circumscribed graphic in the first labeled graphic overlaps with the edge of the first labeled graphic, and by judging whether the edge of the largest circumscribed graphic in the first labeled graphic overlaps with the edge of the first labeled graphic. If the edge of the largest circumscribed graphic in the first labeled graphic overlaps with the edge of the first labeled graphic, or if the edge of the largest circumscribed graphic in the first labeled graphic overlaps with the edge of the first labeled graphic, then there is a possibility that a target object partially falls outside the area of the first labeled graphic; otherwise, there is no possibility that a target object partially falls outside the area of the first labeled graphic.
[0079] If there is no possibility that the target object falls outside the area of the first labeled graphic, the final labeled graphic can be determined directly using the circumscribed graphic corresponding to the edge information in the first labeled graphic. Specifically, the extreme values of the coordinates can be obtained from the circumscribed graphic corresponding to all edge lines in the first labeled graphic, and the final labeled graphic can be determined using the obtained extreme values of the coordinates. Alternatively, the smallest circumscribed graphic that surrounds all edge lines in the first labeled graphic can be used as the final labeled graphic corresponding to the target object.
[0080] The preset ratio can be set according to actual conditions and is not limited here. For example, it can be in the range of 1-2, and more preferably, the preset ratio is in the range of 1-1.5. For example, the preset ratio can be 1.1, 1.15, 1.28 or 1.34, etc.
[0081] In addition, the method described above for re-determining the final annotation graphic based on the first annotation graphic pays more attention to the geometric characteristics of the target object and determines the final annotation graphic of the target object based on the geometric characteristics of the target object, which is more accurate than the annotation graphic obtained by manually annotating coordinates multiple times.
[0082] In this embodiment, a first labeled graphic corresponding to the target object in the image is first determined. Then, edge detection is performed on the first labeled graphic to obtain edge information, and the corresponding circumscribed graphic is determined based on the edge information. Next, the final labeled graphic of the target object can be determined based on the first labeled graphic and the circumscribed graphic. In this way, the final labeled graphic of the target object can be determined based on the circumscribed graphic determined by the edge detection information of the first labeled graphic and the first labeled graphic, so as to reduce external interference. By utilizing the local superior performance of the edge detection method, the final labeled graphic can be more accurate, improving the quality of the labeled graphic. Furthermore, this embodiment can determine the final labeled graphic of the target object based on the annotator's single labeling result, which significantly reduces the annotator's labor input and ensures the efficiency and quality of the labeling task.
[0083] In addition, after obtaining the final labeled graphic of the corresponding target object based on the above implementation method, the annotator can confirm the correction result; if it passes, the next frame image can be labeled using the above method; otherwise, the first labeled graphic is obtained again, and the final labeled graphic of the target object in the image is determined based on the first labeled graphic obtained again using the above implementation method. This provides a label confirmation step, which improves the error tolerance of the method and enhances human-computer interaction.
[0084] The image annotation method described above can be applied to any artificial image annotation scenario, such as the process of creating image datasets for deep learning, or the process of annotating target objects in a training server.
[0085] Please see Figure 3 , Figure 3 This is a schematic diagram of one embodiment of the electronic device 20 of this application. The electronic device 20 of this application includes a processor 22, which is used to execute instructions to implement the methods provided by any of the above embodiments of this application and any non-conflicting combinations thereof.
[0086] Processor 22 can also be referred to as CPU (Central Processing Unit). Processor 22 may be an integrated circuit chip with signal processing capabilities. Processor 22 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. A general-purpose processor can be a microprocessor, or processor 22 can be any conventional processor, etc.
[0087] The electronic device 20 may further include a memory 21 for storing instructions and data required for the processor 22 to run.
[0088] Please see Figure 4 , Figure 4This is a schematic diagram of the structure of a computer-readable storage medium in an embodiment of this application. The computer-readable storage medium 30 in this embodiment stores instruction / program data 31. When executed, this instruction / program data 31 implements the methods provided in any embodiment of the above-described method of this application, as well as any non-conflicting combination thereof. The instruction / program data 31 can be formed into a program file and stored in the storage medium 30 in the form of a software product, so that a computer device (which may be a personal computer, server, or network device, etc.) or processor can execute all or part of the steps of the methods in various embodiments of this application. The aforementioned storage medium 30 includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or devices such as computers, servers, mobile phones, and tablets.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0090] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0091] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0092] The above are merely embodiments of this application and do not limit the scope of this patent application. Any equivalent structural or procedural changes made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.
Claims
1. An image labeling method, characterized by, The method includes: Determine the first labeled graphic corresponding to the target object in the image; Edge detection is performed on the first labeled graphic to obtain first edge information, and the corresponding circumscribed graphic is determined based on the first edge information, wherein the first edge information includes at least one edge line; Based on the first labeled graphic and the circumscribed graphic, the final labeled graphic corresponding to the target object is determined; The step of determining the final labeled graphic corresponding to the target object based on the first labeled graphic and the circumscribed graphic includes: The width and height of the target object are estimated based on the circumscribed graph; The annotation quality of the first annotation graphic is calculated based on the size of the first annotation graphic, the width of the target object, and the height of the target object. In response to the fact that the annotation quality does not meet the preset conditions, the first annotation graphic is corrected to obtain the final annotation graphic.
2. The method according to claim 1, characterized in that, The step of determining the final labeled graphic corresponding to the target object based on the first labeled graphic and the circumscribed graphic includes: In response to the annotation quality meeting the preset conditions, the first annotated graphic is used as the final annotated graphic corresponding to the target object.
3. The method according to claim 1, characterized in that, The first edge information includes at least one edge line, and the step of determining the corresponding circumscribed shape based on the first edge information includes: determining the corresponding circumscribed shape for each edge line.
4. The method according to claim 3, characterized in that, The step of determining the final labeled graphic corresponding to the target object based on the first labeled graphic and the circumscribed graphic includes: The width of the target object is estimated from the outermost shape with the maximum width among all outermost shapes in the first labeled shape, and the height of the target object is estimated from the outermost shape with the maximum height among all outermost shapes in the first labeled shape. Calculate the ratio of the first product and the second product to obtain the annotation quality of the first annotation graphic. The first product is the product of the width and height of the target object, and the second product is the product of the width and height of the first annotation graphic. Based on the annotation quality and the first annotation graphic, the final annotation graphic corresponding to the target object is determined.
5. The method according to claim 1, characterized in that, The step of correcting the first labeled graphic to obtain the final labeled graphic includes: Expand the first labeled graphic outward by a preset ratio to obtain an expanded search area; Edge detection is performed in the extended search area to obtain second edge information, and the corresponding circumscribed shape is determined based on the second edge information; Based on the circumscribed graph within the extended search area, the final labeled graph of the corresponding target object is determined.
6. The method according to claim 5, characterized in that, The second edge information includes at least one edge line; The method further includes: determining a corresponding circumscribed shape for each edge line within the extended search area; The step of determining the final labeled graphic of the corresponding target object based on the circumscribed graphic within the extended search area includes: Determine the first circumscribed graphic with the maximum width and the second circumscribed graphic with the maximum height among all the circumscribed graphics of the edge lines within the extended search area; The x-coordinate of a preset point in the final labeled graphic is determined using the first circumscribed graph, and the y-coordinate of the preset point in the final labeled graphic is determined using the second circumscribed graph, so as to obtain the final labeled graphic.
7. The method according to claim 1, characterized in that, The step of performing edge detection in the first labeled graphic to obtain the first edge information includes: Convert the image into a binary image; The first labeled graphic in the binarized image is filtered to obtain an intermediate image; First edge information is obtained by performing edge detection on the first labeled graphic of the intermediate image.
8. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store a computer program, and the processor being used to execute the computer program to implement the method of any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program and / or instructions for execution to implement the method of any one of claims 1-7.