Image automatic labeling method and device, electronic equipment and storage medium

By automatically identifying and outlining object defects using a progressive self-attention network model, and selecting annotation boxes based on feature distribution types, the high cost and low efficiency of manual annotation in existing technologies are solved, achieving efficient and accurate object defect detection.

CN114519810BActive Publication Date: 2026-07-03TCL TECHNOLOGY GROUP CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TCL TECHNOLOGY GROUP CORPORATION
Filing Date
2020-11-17
Publication Date
2026-07-03

Smart Images

  • Figure CN114519810B_ABST
    Figure CN114519810B_ABST
Patent Text Reader

Abstract

This application provides an automatic image annotation method and apparatus. The method includes acquiring an image to be annotated; identifying a first position of a target feature in the image by performing target feature detection on the image to be annotated; determining a bounding box corresponding to the target feature at the first position according to a preset annotation rule; determining an annotation strategy based on the distribution type of the target feature in the image to be annotated; selecting a target bounding box from the bounding boxes determined according to the preset annotation rule according to the annotation strategy; and annotating the target feature in the image to be annotated using the target bounding box. This method can accurately and automatically annotate target features in an image, with low cost, high speed, and high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image recognition technology, and in particular relates to an automatic image annotation method, apparatus, electronic device and storage medium. Background Technology

[0002] Computer vision is one of the main driving forces and necessary means to promote industrial automation and intelligence. In industry, defect detection of objects, as a branch of object detection technology within the field of computer vision, commonly utilizes machine learning and deep learning methods. Almost all products in industrial production require quality inspection. Object defects are typically those discovered during the quality inspection process that affect the inspection results, such as scratches, stains, patches, wear, and debris. Due to the diversity of products in industrial production, object defects are also diverse. During the defect detection process, specific object defects can be defined by quality inspection personnel. Currently, existing machine learning and deep learning methods for object defect detection require significant manpower and time investment in the initial data preparation stage to manually annotate tens of thousands of defective images to provide a large amount of labeled data as training samples for machine learning and deep learning. This annotation method is costly, slow, and easily affected by the subjective factors of the annotators, impacting the required accuracy. Summary of the Invention

[0003] In view of this, embodiments of this application provide an automatic image annotation method, apparatus, device, and storage medium to improve the annotation efficiency of objects.

[0004] A first aspect of this application provides an automatic image annotation method, the automatic image annotation method comprising:

[0005] Obtain the image to be labeled;

[0006] By performing target feature detection on the image to be labeled, the first position of the target feature in the image to be labeled is identified, and a label box corresponding to the target feature is determined at the first position according to the preset labeling rules;

[0007] A labeling strategy is determined based on the distribution type of target features in the image to be labeled, and a target label box is selected from the label boxes determined according to the preset labeling rules according to the labeling strategy.

[0008] The target feature is labeled in the image to be labeled using the target label box.

[0009] In conjunction with the first aspect, in a first possible implementation of the first aspect, the step of obtaining the image to be labeled includes:

[0010] Collect image samples containing target features through target feature detection;

[0011] The image samples are preprocessed for balanced display to obtain a first image sample with a balanced distribution of image display indicators, and the first image sample is set as the image to be labeled.

[0012] In conjunction with the first aspect, in a second possible implementation of the first aspect, the step of detecting target features in the image to be labeled, identifying the first position of the target feature in the image to be labeled, and determining the bounding box corresponding to the target feature at the first position according to a preset labeling rule includes:

[0013] The target feature is detected in the image to be labeled by means of a preset progressive self-attention network model, and a bounding box corresponding to the target feature is determined at the first position based on the labeling rules corresponding to the progressive levels in the preset progressive self-attention network model.

[0014] In conjunction with the second possible implementation of the first aspect, in the third possible implementation of the first aspect, the step of detecting target features in the image to be labeled using a preset progressive self-attention network model, and determining the bounding box corresponding to the target feature at the first position based on the labeling rules corresponding to the progressive levels in the preset progressive self-attention network model, includes:

[0015] In the progressive self-attention network model, the first feature map of the image to be labeled is obtained according to the self-attention mechanism introduced by the residual network;

[0016] Based on the first feature map, the first position of the target feature in the image to be labeled is determined, and a bounding box corresponding to the target feature is determined at the first position according to the progressive levels in the preset progressive self-attention network model.

[0017] In conjunction with the third possible implementation of the first aspect, in the fourth possible implementation of the first aspect, the step of obtaining the first feature map of the image to be labeled in the progressive self-attention network model according to the self-attention mechanism introduced by the residual network includes:

[0018] The last two convolutional layers of the preset progressive self-attention network model output the corresponding first feature map, wherein one convolutional layer outputs one first feature map.

[0019] In conjunction with the fourth possible implementation of the first aspect, in the fifth possible implementation of the first aspect, the step of determining the first position of the target feature in the image to be labeled based on the first feature map, and determining the bounding box corresponding to the target feature at the first position according to the progressive levels in the preset progressive self-attention network model, includes:

[0020] The first feature map is input into the first sub-network of the first progressive layer configuration of the preset progressive self-attention network model to perform response value recognition processing and positive response region intersection processing to obtain the first candidate region for characterizing the target feature;

[0021] The first bounding box is determined according to the first candidate region at the first progressive level of the preset progressive self-attention network model.

[0022] In conjunction with the fifth possible implementation of the first aspect, in the sixth possible implementation of the first aspect, the step of inputting the first feature map into the first sub-network of the first progressive layer configuration of the preset progressive self-attention network model for response value recognition processing and intersection processing of positive response regions to obtain the first candidate region for characterizing the target feature includes:

[0023] For the two first feature maps output by the convolutional layer of the preset progressive self-attention network model, the feature response values ​​of all pixels in each first feature map are obtained and the mean feature response value of each first feature map is calculated.

[0024] By comparing the feature response value of a pixel with the average feature response value of the first feature map corresponding to the pixel, the pixels that show a positive response in the first feature map are obtained, and the feature map region corresponding to the pixels that show a positive response in the first feature map is marked as the positive response region of the first feature map.

[0025] The intersection of the marked positive response regions in each first feature map is obtained by taking the intersection of the regions, and the intersection region is configured as the first candidate region for characterizing the target feature.

[0026] In conjunction with the sixth possible implementation of the first aspect, in the seventh possible implementation of the first aspect, the step of performing intersection processing on the marked positive response regions in each first feature map to obtain an intersection region, and configuring the intersection region as a first candidate region for characterizing the target feature, further includes:

[0027] Calculate the connected components of all pixels in the intersection region that exhibit a positive response;

[0028] Based on the connected components, the target features are masked in the image to be labeled, and the masked region obtained after masking is configured as the first candidate region for characterizing the target features.

[0029] In conjunction with the fifth possible implementation of the first aspect, in the eighth possible implementation of the first aspect, after the step of determining the first bounding box according to the first candidate region at the first progressive level of the preset progressive self-attention network model, the method further includes:

[0030] Extract a first partial image from the image to be annotated that corresponds to the first annotation box;

[0031] The first local image is magnified according to a preset image magnification rule, and the magnified region image is then used to extract features to obtain a second feature map.

[0032] The second feature map is input into the second sub-network of the second progressive layer configuration of the preset progressive self-attention network model to perform sliding window detection and obtain the second candidate region for characterizing the target feature;

[0033] The second bounding box is determined according to the second candidate region at the second progressive level of the preset progressive self-attention network model.

[0034] In conjunction with the eighth possible implementation of the first aspect, in the ninth possible implementation of the first aspect, the step of inputting the second feature map into the second sub-network of the preset progressive self-attention network model's second progressive layer configuration for sliding window detection to obtain a second candidate region for characterizing the target feature includes:

[0035] A sliding window is used to perform sliding window detection in the second feature map to confirm whether the target feature exists in the window region corresponding to the sliding window.

[0036] If the window region contains target features, then the window region is configured as a second candidate region representing the target features.

[0037] In conjunction with the eighth possible implementation of the first aspect, in the tenth possible implementation of the first aspect, the step of inputting the second feature map into the second sub-network of the preset progressive self-attention network model's second progressive layer configuration for sliding window detection to obtain a second candidate region for characterizing the target feature includes:

[0038] At least two sliding windows are used to perform sliding window detection in the second feature map, and the window region corresponding to each sliding window when the target feature is confirmed to exist is obtained;

[0039] For each window region obtained by the sliding window, the response value of each window region is identified by pixel and the average response value corresponding to each window region is calculated.

[0040] The window regions are sorted according to the average response value, and the window regions are overlapped based on the sorting. The overlapping window regions are then filtered out using a non-maximum suppression algorithm, and the filtered window regions are configured as second candidate regions to characterize the target features.

[0041] In conjunction with any of the second to tenth possible implementations of the first aspect, in the eleventh possible implementation of the first aspect, the step of determining the first position of the target feature in the image to be labeled based on the first feature map, and determining the bounding box corresponding to the target feature at the first position according to the progressive levels in the preset progressive self-attention network model, further includes:

[0042] The bounding boxes are corrected by adjusting the weight adjustment parameters configured for the progressive levels in the preset progressive self-attention network model.

[0043] In conjunction with the first aspect, in the twelfth possible implementation of the first aspect, the step of annotating the target feature in the image to be annotated using the target bounding box includes:

[0044] The classification confidence of the target bounding box is identified using the progressive self-attention network model.

[0045] The classification confidence of the target bounding box is compared with a preset confidence threshold. If the classification confidence of the target bounding box meets the preset confidence threshold requirement, the target feature is labeled in the image to be labeled using the target bounding box.

[0046] A second aspect of this application provides an automatic image annotation apparatus, the automatic image annotation apparatus comprising:

[0047] The acquisition module is used to acquire the image to be labeled;

[0048] The determination module is used to identify the first position of the target feature in the image to be labeled by performing target feature detection on the image to be labeled, and to determine the label box corresponding to the target feature at the first position according to the preset labeling rules;

[0049] The selection module is used to determine the annotation strategy based on the distribution type of target features in the image to be annotated, and select the target annotation box from the annotation boxes determined according to the preset annotation rules according to the annotation strategy.

[0050] The annotation module is used to annotate the target features in the image to be annotated using the target annotation box.

[0051] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the automatic image annotation method as described in any of the first aspects.

[0052] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the automatic image annotation method as described in any of the first aspects.

[0053] Compared with the prior art, the beneficial effects of the embodiments in this application are as follows:

[0054] This application involves acquiring an image to be labeled; performing target feature detection on the image to be labeled to identify the first position of the target feature in the image to be labeled; determining a bounding box corresponding to the target feature at the first position according to a preset labeling rule; determining a labeling strategy based on the distribution type of the target feature in the image to be labeled; selecting a target bounding box from the bounding boxes determined according to the preset labeling rule according to the labeling strategy; and labeling the target feature in the image to be labeled using the target bounding box. This method can accurately and automatically label target features in an image, with low cost, high speed, and high accuracy. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 A schematic diagram of the basic method flow of an automatic image annotation method provided in an embodiment of this application;

[0057] Figure 2 This is a schematic diagram illustrating the display of the annotation box in an image in an automatic image annotation method provided in an embodiment of this application.

[0058] Figure 3 This is a flowchart illustrating a method for obtaining an image to be labeled in an automatic image annotation method provided in an embodiment of this application.

[0059] Figure 4A flowchart illustrating a method for determining bounding boxes using a progressive self-attention network model in the automatic image annotation method provided in this application embodiment;

[0060] Figure 5 A flowchart illustrating a method for determining the first bounding box based on a progressive self-attention network model in the automatic image annotation method provided in this application embodiment;

[0061] Figure 6 This is a flowchart illustrating a method for automatically annotating images in an embodiment of this application, which involves performing response value recognition processing and intersection processing of positive response regions on a first feature map when determining a first annotation box.

[0062] Figure 7 A flowchart illustrating a method for obtaining a first candidate region through masking when determining a first bounding box in an automatic image annotation method provided in this application embodiment;

[0063] Figure 8 A flowchart illustrating a method for determining the second bounding box based on a progressive self-attention network model in the automatic image annotation method provided in this application embodiment;

[0064] Figure 9 A flowchart illustrating a method for obtaining a second candidate region by sliding window detection when determining a second bounding box in the automatic image annotation method provided in this application embodiment;

[0065] Figure 10 A schematic flowchart illustrating another method for obtaining a second candidate region by sliding window detection when determining the second annotation box in the automatic image annotation method provided in the embodiments of this application;

[0066] Figure 11 A schematic flowchart illustrating a method for automatic annotation of images provided in this application embodiment;

[0067] Figure 12 A schematic diagram of the structure of an automatic image annotation device provided in an embodiment of this application;

[0068] Figure 13 This is a schematic diagram of an electronic device that implements an automatic image annotation method according to an embodiment of this application. Detailed Implementation

[0069] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0070] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0071] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0072] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0073] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0074] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0075] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0076] In some embodiments of this application, please refer to Figure 1 , Figure 1 This is a schematic diagram of the basic method flow for an automatic image annotation method provided in an embodiment of this application. Details are as follows:

[0077] In step S101, the image to be labeled is obtained.

[0078] In this embodiment, the automatic image annotation method is mainly used to annotate prominent or abnormal features in the image. In this embodiment, the image to be annotated is typically an image sample of an object collected during defect detection in industrial production. Generally, to present defects in the image to be annotated, a camera can be used to capture or scan the entire object or a portion thereof, especially the defective location, at a certain magnification. In industrial production, almost all products require quality inspection. Defects in an object typically refer to prominent or abnormal features that can be detected during the quality inspection process and affect the inspection results. Examples include scratches, stains, patches, wear, and debris on the object, all of which are prominent or abnormal features in the image. Due to the diversity of products in industrial production, object defects are also diverse. During the inspection process, specific defects can also be defined by quality inspectors.

[0079] In step S102, by performing target feature detection on the image to be labeled, the first position of the target feature in the image to be labeled is identified, and a label box corresponding to the target feature is determined at the first position according to a preset labeling rule.

[0080] In this embodiment, a feature annotation model is pre-constructed to perform target feature detection in an image and to determine bounding boxes. The bounding box refers to the area in the image to be annotated that highlights the location of the target feature. In this embodiment, by inputting the image to be annotated into the feature annotation model for target feature detection, the target feature in the image can be identified. The target feature can be characterized as a defect on the surface of an object or product. Then, according to a preset annotation rule, a first position of the target feature is selected in the image to be annotated, and this first position is determined as the bounding box corresponding to the target feature. In this embodiment, the annotation rule can be to generate a border of a fixed area around the center of the target feature's location point; this border is the bounding box, and the position within the border is considered the first position of the target feature. The feature annotation model is configured with at least two annotation rules, each generating a different bounding box area. That is, in the feature annotation model, different annotation rules can be used to annotate target features in the image using bounding boxes of various sizes.

[0081] In step S103, a labeling strategy is determined based on the distribution type of target features in the image to be labeled, and a target labeling box is selected from the labeling boxes determined according to preset labeling rules according to the labeling strategy.

[0082] In this embodiment, multiple annotation rules can be configured in the feature annotation model, and each annotation rule corresponds to a different size of the resulting annotation box. Please refer to the following: Figure 2 , Figure 2 This is a schematic diagram illustrating the display of annotation boxes in an image using an automatic image annotation method provided in this application embodiment. For example... Figure 2 As shown, the feature annotation model can use various sizes of bounding boxes to annotate and display a target feature in an image. In this embodiment, different annotation strategies can be formulated based on the distribution type of the target feature in the image. For example... Figure 2 As shown, based on the distribution type of target features, they can be roughly divided into two types: single-point and scattered. For single-point target features, the features are concentrated in the same area of ​​the image and are relatively small. Therefore, a labeling strategy for single-point target features can be formulated by selecting label boxes with small bounding box areas (i.e., relatively small sizes). Figure 2 Among the annotation boxes 4, 5, and 6, annotation box 4 can be selected. For scattered target features, which are sand-like and relatively dispersed with many regions, a labeling strategy can be developed that selects an annotation box with a larger area (i.e., a relatively larger size) from the annotation boxes 4, 5, and 6. Figure 2 Among the three annotation boxes (1, 2, and 3), annotation box 3 is selected, which has relatively lower precision compared to single-point target features. After formulating corresponding annotation strategies for different distribution types, a distribution type-annotation strategy correspondence table can be obtained. Therefore, when annotating an image based on a feature annotation model, the distribution type corresponding to the target features in the image can be analyzed, and an annotation strategy matching that distribution type can be determined based on the distribution type-annotation strategy correspondence table. Then, according to the annotation strategy, the target annotation box that meets the distribution type requirements can be selected from multiple annotation boxes determined by the model according to different annotation rules.

[0083] In step S104, the target feature is labeled in the image to be labeled using the target label box.

[0084] In this embodiment, after selecting the target annotation box through the annotation strategy, the target annotation box can be used to locate the target feature in the image to be annotated, and the position of the target feature can be outlined. Then, the corresponding annotation label is automatically generated at that position, thereby realizing the automatic annotation of the target feature in the image to be annotated.

[0085] After acquiring the image to be labeled in the above embodiments, the feature labeling model determines the first position of the target feature in the image by performing target feature detection, and then determines the corresponding bounding box in the image according to the first position. This allows for accurate identification of the region range of the target feature in the image. A labeling strategy is determined based on the distribution type of the target feature in the image. According to the labeling strategy, the target bounding box that meets the distribution type requirement of the target feature is selected from the multiple bounding boxes determined in the image. This allows for the selection of appropriate bounding boxes based on the distribution type of the target feature, improving the accuracy of automatic labeling. Moreover, the feature labeling model enables automatic labeling of target features in images, which is accurate and cost-effective.

[0086] In some embodiments of this application, please refer to Figure 3 , Figure 3 This is a schematic flowchart illustrating a method for obtaining an image to be labeled in the automatic image annotation method provided in this application embodiment. Details are as follows:

[0087] In step S301, image samples containing target features are collected through target feature detection;

[0088] In step S302, the image sample is subjected to equalization display preprocessing to obtain a first image sample with a balanced distribution of image display indicators, and the first image sample is set as the image to be labeled.

[0089] In this embodiment, the target feature is characterized as a defect on the surface of the object product. Based on the defect detection task in industry, image samples containing object defects can be collected from the production line; these image samples are those containing the target feature. Specifically, the defect detection task can be performed using algorithms including, but not limited to, YOLO object detection algorithms and CNN detection algorithms. Since the collection of image samples through camera equipment is inevitably affected by environmental factors, the collected image samples may exhibit uneven display metrics, including inconsistent brightness and contrast. Therefore, by performing equalization preprocessing on all collected image samples, such as using histogram equalization, the image samples are adjusted to ensure a more consistent distribution in terms of brightness, contrast, and other image display metrics, thus obtaining a first image sample with a balanced distribution of image display metrics. By setting this first image sample as the image to be labeled, the accuracy of automatic labeling can be improved.

[0090] In some embodiments of this application, the feature annotation model can be a progressive self-attention network model. Then, the progressive self-attention network model is used to detect target features in the image to be annotated, identifying the first position of the target feature in the image. Based on the annotation rules corresponding to the progressive levels in the progressive self-attention network model, a bounding box corresponding to the target feature is determined at the first position of the target feature in the image. Each progressive level in the progressive self-attention network model corresponds to one bounding box; that is, the more progressive levels in the progressive self-attention network model, the more bounding boxes corresponding to the target feature are determined. For example, the progressive self-attention network model may have several progressive levels, each corresponding to a self-attention network. The bounding boxes determined by the self-attention networks of different progressive levels have different sizes, and the annotation accuracy represented by different sized bounding boxes is also different. The deeper the progressive level, the higher the accuracy of the corresponding bounding box. For example, in a progressive self-attention network model, the hierarchy is ordered as follows: first self-attention network < second self-attention network < third self-attention network. Then, the accuracy of the bounding boxes generated by these three self-attention networks is as follows: first self-attention network < second self-attention network < third self-attention network.

[0091] In some embodiments of this application, please refer to Figure 4 , Figure 4 This is a flowchart illustrating a method for determining bounding boxes using a progressive self-attention network model in the automatic image annotation method provided in this application embodiment. Details are as follows:

[0092] In step S401, the first feature map of the image to be labeled is obtained in the progressive self-attention network model according to the self-attention mechanism introduced by the residual network;

[0093] In step S402, the first position of the target feature in the image to be labeled is determined according to the first feature map, and the label box corresponding to the target feature is determined at the first position according to the progressive level in the preset progressive self-attention network model.

[0094] In this embodiment, in the progressive self-attention network model, each progressive level corresponds to a labeling rule for determining bounding boxes. When using the progressive self-attention network model to determine bounding boxes, the model specifically introduces a self-attention mechanism through a residual network, and then performs feature extraction processing on the image to be labeled according to this attention mechanism to obtain a first feature map of the image. After obtaining the first feature map, feature region recognition processing is performed on the first feature map in the progressive self-attention network model to determine the first position of the target feature in the image to be labeled. Then, based on the labeling rule corresponding to each progressive level, a bounding box corresponding to the target feature can be determined at that first position according to the progressive level in the progressive self-attention network model. In this embodiment, the size of the bounding boxes obtained according to different progressive levels in the progressive self-attention network model varies; the deeper the level, the smaller the corresponding bounding box.

[0095] In some embodiments of this application, the progressive self-attention network model can be configured with multiple convolutional layers. When obtaining the first feature map of the image to be labeled according to the self-attention mechanism introduced by the residual network, the corresponding first feature map can be output through the last two convolutional layers of the progressive self-attention network model, wherein one convolutional layer outputs one first feature map. That is, in this embodiment, two first feature maps can be obtained based on the image to be labeled. Specifically, the progressive self-attention network model introduces a self-attention mechanism on the basis of the residual network. When extracting features from the image to be labeled, it first obtains the feature maps corresponding to all channels of each convolutional layer of the progressive self-attention network model, then performs similarity calculation on the feature maps corresponding to each channel, identifies the regions in the convolutional layer that show strong response and high similarity in each channel, and identifies the region as the main region with target features in the image to be labeled. Finally, based on the position of the main region in the image to be labeled, the feature map corresponding to the main region obtained from the last two convolutional layers is configured as the first feature map for output.

[0096] In some embodiments of this application, please refer to Figure 5 , Figure 5 This is a flowchart illustrating a method for determining the first bounding box based on a progressive self-attention network model in the automatic image annotation method provided in this application embodiment. Details are as follows:

[0097] In step S501, the first feature map is input into the first sub-network of the first progressive layer configuration of the preset progressive self-attention network model to perform response value recognition processing and positive response region intersection processing to obtain the first candidate region for characterizing the target feature;

[0098] In step S502, a first bounding box is determined according to the first candidate region at the first progressive level of the preset progressive self-attention network model.

[0099] In this embodiment, after the progressive self-attention network model obtains the first feature map, it can obtain two different first feature maps through the last two convolutional layers. Therefore, in this embodiment, the two first feature maps can be input into the first sub-network configured in the first progressive layer of the progressive self-attention network model for response value recognition and intersection processing of positive response regions. By intersecting the regions in the two first feature maps that represent positive responses, overlapping regions are obtained, and these overlapping regions are configured as first candidate regions for representing target features. Furthermore, a first bounding box is determined according to the first candidate region in the preset first progressive layer of the progressive self-attention network model, so that the first progressive layer of the progressive self-attention network model outputs the first bounding box. In this embodiment, the two first feature maps output by the last two convolutional layers can be integrated, so that the first bounding box corresponding to the target feature determined by the progressive self-attention network model has high accuracy.

[0100] In some embodiments of this application, please refer to Figure 6 , Figure 6 This is a flowchart illustrating a method for automatically annotating images provided in this application, specifically a method for identifying response values ​​and taking the intersection of positive response regions in a first feature map when determining the first bounding box. Details are as follows:

[0101] In step S601, for the two first feature maps output by the convolutional layer of the preset progressive self-attention network model, the feature response values ​​of all pixels in each first feature map are obtained and the mean feature response value of each first feature map is calculated.

[0102] In step S602, by comparing the feature response value of a pixel with the average feature response value of the first feature map corresponding to the pixel, the pixel that shows a positive response in the first feature map is obtained, and the feature map region corresponding to the pixel that shows a positive response in the first feature map is marked as the positive response region of the first feature map.

[0103] In step S603, the positive response regions marked in each first feature map are subjected to intersection processing to obtain an intersection region, and the intersection region is configured as a first candidate region for characterizing the target feature.

[0104] In this embodiment, for the two first feature maps output by the last two convolutional layers of the progressive self-attention network model, each pixel in the first feature map is represented as a feature point. The feature response value corresponding to each pixel in each of the two first feature maps is obtained, and the average feature response value for each first feature map is calculated. Then, for each first feature map, its average feature response value is used as a threshold; feature points greater than the threshold are marked as positive responses, while feature points lower than the threshold are set to zero and ignored. Thus, by comparing the feature response value of each pixel in the first feature map with the average feature response value of the first feature map, the positive response regions corresponding to each of the two first feature maps can be obtained. Furthermore, the intersection of the positive response regions corresponding to the two first feature maps is performed to obtain the intersection region, and finally, the obtained intersection region is configured as the first candidate region for representing the target feature.

[0105] In some embodiments of this application, please refer to Figure 7 , Figure 7 This is a flowchart illustrating a method for obtaining a first candidate region through masking when determining a first bounding box in an automatic image annotation method provided in this application embodiment. Details are as follows:

[0106] In step S701, the connected components of all pixels in the intersection region that exhibit a positive response are calculated;

[0107] In step S702, based on the connected components, the target features are masked in the image to be labeled, and the masked region obtained after masking is configured as a first candidate region for characterizing the target features.

[0108] In this embodiment, after obtaining the intersection region, the target features in the image to be labeled can be masked by calculating the connected components of all positively responding pixels in the intersection region. The bounding rectangle region of the target feature in the image to be labeled is obtained using the mask, i.e., the mask region. The mask region obtained after masking is configured as the first candidate region for representing the target feature. The accuracy of the first annotation box is improved by masking.

[0109] In some embodiments of this application, please refer to Figure 8 , Figure 8 This is a flowchart illustrating a method for determining the second bounding box based on a progressive self-attention network model in the automatic image annotation method provided in this application embodiment. Details are as follows:

[0110] In step S801, a first partial image corresponding to the first annotation box is cropped from the image to be annotated;

[0111] In step S802, the first local image is magnified according to a preset image magnification rule, and the magnified regional image is subjected to feature extraction to obtain a second feature map;

[0112] In step S803, the second feature map is input into the second sub-network of the second progressive layer configuration of the preset progressive self-attention network model to perform sliding window detection and obtain the second candidate region for characterizing the target feature;

[0113] In step S804, a second bounding box is determined according to the second candidate region at the second progressive level of the preset progressive self-attention network model.

[0114] In this embodiment, the first bounding box obtained through the first progressive layer of the progressive self-attention network model represents the approximate region of the target feature within the image to be labeled. After obtaining the first bounding box, a first local image corresponding to the first bounding box can be extracted from the image to be labeled based on its position within the image. This local image is then magnified according to a preset image magnification rule, and feature extraction is performed on the magnified local image to obtain a second feature map. For example, linear interpolation can be used to magnify the first local image to 448*448, and then this magnified first local image is input again into the feature extraction unit for feature extraction to obtain the second feature map. In the second feature map obtained at this time, the detailed features of the main target feature region are more prominent. After obtaining the second feature map, it is input into the second sub-network of the second progressive level configuration of the progressive self-attention network model through a pre-set sliding window for sliding window detection. By sliding the window through the second feature map, the second position of the target feature in the second feature map can be further confirmed. Based on this second position, a second candidate region for representing the target feature is obtained. Then, according to the second candidate region, the corresponding second bounding box is determined at the second progressive level of the pre-set progressive self-attention network model. In this embodiment, the second bounding box is obtained based on the first bounding box; therefore, the area of ​​the second bounding box is smaller than that of the first bounding box, meaning the accuracy of the second bounding box is higher than that of the first bounding box.

[0115] In some embodiments of this application, please refer to Figure 9 , Figure 9 This is a flowchart illustrating a method for obtaining a second candidate region through sliding window detection when determining a second bounding box in the automatic image annotation method provided in this application embodiment. Details are as follows:

[0116] In step S901, a sliding window is used to perform sliding window detection in the second feature map to confirm whether the target feature exists in the window region corresponding to the sliding window;

[0117] In step S902, if the window region contains target features, the window region is configured as a second candidate region representing the target features.

[0118] In this embodiment, a sliding window is set in the progressive self-attention network model to identify feature regions in the second feature map. In this embodiment, the sliding window is used to traverse the second feature map, performing sliding window detection on the second feature map. Furthermore, during the sliding window detection process, it is determined whether the window region covered by the sliding window on the second feature map contains a target feature. If it does, it indicates that a feature region in the second feature map has been identified. At this point, window detection stops, and the window region is configured as a second candidate region representing the target feature.

[0119] In some embodiments of this application, please refer to Figure 10 , Figure 10 This document presents a flowchart illustrating another method for obtaining a second candidate region using sliding window detection when determining the second bounding box in the automatic image annotation method provided in this application embodiment. Details are as follows:

[0120] In step S1001, at least two sliding windows are used to perform sliding window detection in the second feature map to obtain the window region corresponding to each sliding window when the target feature is confirmed to exist;

[0121] In step S1002, for each window region obtained by the sliding window, the response value of each window region is identified by pixel and the average response value corresponding to each window region is calculated.

[0122] In step S1003, the window regions are sorted according to the magnitude of the average response value, and the window regions are overlapped based on the sorting. The overlapping window regions are filtered out using a non-maximum suppression algorithm, and the window regions obtained after filtering out the overlapping window regions are configured as second candidate regions for characterizing target features.

[0123] In this embodiment, in the progressive self-attention network model, at least two sliding windows of different sizes are pre-set. After obtaining the second feature map, the sliding windows of different sizes are used to traverse and detect the second feature map respectively, and the window region corresponding to each sliding window when the target feature is confirmed to exist is obtained. For the window region obtained by each sliding window, the response value of each window region is identified by pixel and the average response value of the window region corresponding to each sliding window is calculated. The window regions are sorted according to the size of the average response value. Based on the sorting, the window regions are overlapped. Then, for the overlapped window regions, the non-maximum suppression algorithm is used to filter out redundant regions with a high degree of overlap with the best candidate region. The window region after the filtering process can display the detailed features of the main target feature region. Therefore, the window region obtained after the filtering process is configured as the second candidate region for representing the target feature.

[0124] In some embodiments of this application, when using a progressive self-attention network model to determine bounding boxes, the bounding box corresponding to the target feature can be corrected by adjusting the weight adjustment parameters configured for each progressive level in the progressive self-attention network model. In this embodiment, the weight adjustment parameters configured for each progressive level in the progressive self-attention network model are used to control the proportion of the loss value of the self-attention network corresponding to that progressive level in determining the bounding box to the final loss. For example, in the progressive self-attention network model, after obtaining the feature map through feature extraction, the feature map is sequentially input to each progressive level from shallow to deep. Each progressive level is processed by the fully connected layer of its corresponding self-attention network. Therefore, for each progressive level, the loss value of the self-attention network corresponding to that progressive level can be obtained by calculating the cross-entropy loss function between the feature map processed by its fully connected layer and the category label corresponding to the initially obtained image to be labeled. The category label corresponding to the image to be labeled can be obtained by classifying and organizing the feature distribution types of the collected images to be labeled. In this embodiment, by calculating the loss value of the self-attention network corresponding to each progressive level in the progressive self-attention network model, and then adjusting the ratio of the loss value of the self-attention network corresponding to each progressive level to the total loss value of the model, the progressive self-attention network model can be adjusted to express the overall characteristics of the target features, weaken the distinction between the detailed features of each part within the target features, and improve the accuracy of the bounding boxes.

[0125] In some embodiments of this application, please refer to Figure 11 , Figure 11 This is a schematic flowchart illustrating a method for automatic image annotation provided in this application embodiment. Details are as follows:

[0126] In step S1101, the classification confidence of the target bounding box is identified by the progressive self-attention network model;

[0127] In step S1102, the classification confidence of the target bounding box is compared with a preset confidence threshold. If the classification confidence of the target bounding box meets the preset confidence threshold requirement, the target feature is labeled in the image to be labeled using the target bounding box.

[0128] In this embodiment, to more accurately locate the region containing the target feature in the image to be labeled, a confidence threshold can be set. This confidence threshold is used to measure and verify whether the bounding boxes determined by the progressive self-attention model are reliable. Only the bounding boxes that pass the verification will be used for automatic labeling; otherwise, manual labeling will be performed. Furthermore, images that fail the final verification and require manual labeling are recorded and collected. After accumulating a certain number, these manually labeled images can be used as hard samples to optimize and train the progressive self-attention network model, thereby training the model's learning ability for hard samples.

[0129] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0130] In some embodiments of this application, please refer to Figure 12 , Figure 12 A schematic diagram of an automatic image annotation device provided in an embodiment of this application is described in detail below:

[0131] In this embodiment, the automatic image annotation device includes: an acquisition module 1201, a determination module 1202, a selection module 1203, and an annotation module 1204. The acquisition module 1201 acquires the image to be annotated. The determination module 1202 performs target feature detection on the image to be annotated, identifies a first position of a target feature in the image, and determines a bounding box corresponding to the target feature at the first position according to a preset annotation rule. The selection module 1203 determines an annotation strategy based on the distribution type of the target feature in the image to be annotated, and selects a target bounding box from the bounding boxes determined according to the preset annotation rule according to the annotation strategy. The annotation module 1204 annotates the target feature in the image to be annotated using the target bounding box.

[0132] The automatic image annotation device corresponds one-to-one with the automatic image annotation method described above, and will not be repeated here.

[0133] In some embodiments of this application, please refer to Figure 13 , Figure 13 This is a schematic diagram of an electronic device that implements an automatic image annotation method according to an embodiment of this application. Figure 13 As shown, the electronic device 130 of this embodiment includes: a processor 1301, a memory 1302, and a computer program 1303 stored in the memory 1302 and executable on the processor 1301, such as an automatic image annotation program. When the processor 1301 executes the computer program 1302, it implements the steps in the above-described automatic image annotation method embodiments. Alternatively, when the processor 1301 executes the computer program 1303, it implements the functions of each module / unit in the above-described device embodiments.

[0134] For example, the computer program 1303 can be divided into one or more modules / units, which are stored in the memory 1302 and executed by the processor 1301 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 1303 in the electronic device 130. For example, the computer program 1303 can be divided into:

[0135] The acquisition module is used to acquire the image to be labeled;

[0136] The determination module is used to identify the first position of the target feature in the image to be labeled by performing target feature detection on the image to be labeled, and to determine the label box corresponding to the target feature at the first position according to the preset labeling rules;

[0137] The selection module is used to determine the annotation strategy based on the distribution type of target features in the image to be annotated, and select the target annotation box from the annotation boxes determined according to the preset annotation rules according to the annotation strategy.

[0138] The annotation module is used to annotate the target features in the image to be annotated using the target annotation box.

[0139] The electronic device may include, but is not limited to, a processor 1301 and a memory 1302. Those skilled in the art will understand that... Figure 13 This is merely an example of electronic device 130 and does not constitute a limitation on electronic device 130. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0140] The processor 1301 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0141] The memory 1302 can be an internal storage unit of the electronic device 130, such as a hard disk or memory of the electronic device 130. The memory 1302 can also be an external storage device of the electronic device 130, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the electronic device 130. Furthermore, the memory 1302 can include both internal and external storage units of the electronic device 130. The memory 1302 is used to store the computer program and other programs and data required by the electronic device. The memory 1302 can also be used to temporarily store data that has been output or will be output.

[0142] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0143] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0144] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0145] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0146] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0147] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0148] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0149] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or 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 displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0151] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An automatic image annotation method, characterized in that, include: Obtain the image to be labeled; By performing target feature detection on the image to be labeled, identifying the first position of the target feature in the image to be labeled, and determining the bounding box corresponding to the target feature at the first position according to the preset labeling rules, the process includes: performing target feature detection on the image to be labeled using a preset progressive self-attention network model, and determining the bounding box corresponding to the target feature at the first position based on the labeling rules corresponding to the progressive levels in the preset progressive self-attention network model; the progressive self-attention network model has several progressive levels built in, each progressive level corresponds to a self-attention network, and each progressive level corresponds to determining a bounding box; Self-attention networks at different progressive levels determine different sizes of bounding boxes in an image, and the annotation accuracy represented by bounding boxes of different sizes is also different. The deeper the progressive level, the higher the accuracy of the corresponding bounding box. The annotation strategy is determined based on the distribution type of the target features in the image to be annotated, and the target annotation box is selected from the annotation boxes determined according to the preset annotation rules according to the annotation strategy. The distribution type of the target features includes single-point type and scattered type. For single-point type target features, the annotation strategy is to select the annotation box with a smaller size. For scattered type target features, the annotation box with a larger size is selected. The target feature is labeled in the image to be labeled using the target label box.

2. The automatic image annotation method according to claim 1, characterized in that, The steps for obtaining the image to be labeled include: Collect image samples containing target features through target feature detection; The image samples are preprocessed for balanced display to obtain a first image sample with a balanced distribution of image display indicators, and the first image sample is set as the image to be labeled.

3. The automatic image annotation method according to claim 1, characterized in that, The step of detecting target features in the image to be labeled using a preset progressive self-attention network model, and determining the bounding box corresponding to the target feature at the first position based on the labeling rules corresponding to the progressive levels in the preset progressive self-attention network model, includes: In the progressive self-attention network model, the first feature map of the image to be labeled is obtained according to the self-attention mechanism introduced by the residual network; Based on the first feature map, the first position of the target feature in the image to be labeled is determined, and a bounding box corresponding to the target feature is determined at the first position according to the progressive levels in the preset progressive self-attention network model.

4. The automatic image annotation method according to claim 3, characterized in that, The step of obtaining the first feature map of the image to be labeled in the progressive self-attention network model according to the self-attention mechanism introduced by the residual network includes: The last two convolutional layers of the preset progressive self-attention network model output the corresponding first feature map, wherein one convolutional layer outputs one first feature map.

5. The automatic image annotation method according to claim 4, characterized in that, The step of determining the first position of the target feature in the image to be labeled based on the first feature map, and determining the bounding box corresponding to the target feature at the first position according to the progressive levels in the preset progressive self-attention network model, includes: The first feature map is input into the first sub-network of the first progressive layer configuration of the preset progressive self-attention network model to perform response value recognition processing and positive response region intersection processing to obtain the first candidate region for characterizing the target feature; The first bounding box is determined according to the first candidate region at the first progressive level of the preset progressive self-attention network model.

6. The automatic image annotation method according to claim 5, characterized in that, The step of inputting the first feature map into the first sub-network of the first progressive layer configuration of the preset progressive self-attention network model for response value recognition processing and intersection processing of positive response regions to obtain the first candidate region for characterizing the target feature includes: For the two first feature maps output by the convolutional layer of the preset progressive self-attention network model, the feature response values ​​of all pixels in each first feature map are obtained and the mean feature response value of each first feature map is calculated. By comparing the feature response value of a pixel with the average feature response value of the first feature map corresponding to the pixel, the pixels that show a positive response in the first feature map are obtained, and the feature map region corresponding to the pixels that show a positive response in the first feature map is marked as the positive response region of the first feature map. The intersection of the marked positive response regions in each first feature map is obtained by taking the intersection of the regions, and the intersection region is configured as the first candidate region for characterizing the target feature.

7. The automatic image annotation method according to claim 6, characterized in that, The step of performing intersection processing on the marked positive response regions in each first feature map to obtain an intersection region, and configuring the intersection region as a first candidate region for characterizing the target feature, further includes: Calculate the connected components of all pixels in the intersection region that exhibit a positive response; Based on the connected components, the target features are masked in the image to be labeled, and the masked region obtained after masking is configured as a first candidate region for characterizing the target features.

8. The automatic image annotation method according to claim 5, characterized in that, After the step of determining the first bounding box according to the first candidate region at the first progressive level of the preset progressive self-attention network model, the method further includes: Extract a first partial image from the image to be annotated that corresponds to the first annotation box; The first local image is magnified according to a preset image magnification rule, and the magnified region image is then subjected to feature extraction to obtain a second feature map. The second feature map is input into the second sub-network of the second progressive layer configuration of the preset progressive self-attention network model to perform sliding window detection and obtain the second candidate region for characterizing the target feature; The second bounding box is determined according to the second candidate region at the second progressive level of the preset progressive self-attention network model.

9. The automatic image annotation method according to claim 8, characterized in that, The step of inputting the second feature map into the second sub-network of the preset progressive self-attention network model's second progressive layer configuration for sliding window detection to obtain a second candidate region for characterizing the target feature includes: A sliding window is used to perform sliding window detection in the second feature map to confirm whether the target feature exists in the window region corresponding to the sliding window. If the window region contains target features, then the window region is configured as a second candidate region representing the target features.

10. The automatic image annotation method according to claim 8, characterized in that, The step of inputting the second feature map into the second sub-network of the preset progressive self-attention network model's second progressive layer configuration for sliding window detection to obtain a second candidate region for characterizing the target feature includes: At least two sliding windows are used to perform sliding window detection in the second feature map, and the window region corresponding to each sliding window when the target feature is confirmed to exist is obtained; For each window region obtained by the sliding window, the response value of each window region is identified by pixel and the average response value corresponding to each window region is calculated. The window regions are sorted according to the average response value, and the window regions are overlapped based on the sorting. The overlapping window regions are then filtered out using a non-maximum suppression algorithm, and the filtered window regions are configured as second candidate regions to characterize the target features.

11. The automatic image annotation method according to any one of claims 3-10, characterized in that, The step of determining the first position of the target feature in the image to be labeled based on the first feature map, and determining the bounding box corresponding to the target feature at the first position according to the progressive levels in the preset progressive self-attention network model, further includes: The bounding boxes are corrected by adjusting the weight adjustment parameters configured for the progressive levels in the preset progressive self-attention network model.

12. The automatic image annotation method according to claim 1, characterized in that, The step of annotating the target feature in the image to be annotated using the target annotation box includes: The classification confidence of the target bounding box is identified using the progressive self-attention network model. The classification confidence of the target bounding box is compared with a preset confidence threshold. If the classification confidence of the target bounding box meets the preset confidence threshold requirement, the target feature is labeled in the image to be labeled using the target bounding box.

13. An automatic image annotation device, characterized in that, The automatic image annotation device includes: The acquisition module is used to acquire the image to be labeled; The determination module is used to identify the first position of the target feature in the image to be labeled by performing target feature detection on the image to be labeled, and to determine the bounding box corresponding to the target feature at the first position according to the preset labeling rules. This includes: performing target feature detection on the image to be labeled using a preset progressive self-attention network model, and determining the bounding box corresponding to the target feature at the first position based on the labeling rules corresponding to the progressive levels in the preset progressive self-attention network model; the progressive self-attention network model has several progressive levels, each progressive level corresponds to a self-attention network, and each progressive level corresponds to determining a bounding box; the size of the bounding box determined by the self-attention network at different progressive levels in the image is different, and the labeling accuracy represented by the bounding box of different sizes is also different. The deeper the progressive level, the higher the accuracy of its corresponding bounding box. The selection module is used to determine the annotation strategy based on the distribution type of the target features in the image to be annotated, and select the target annotation box from the annotation boxes determined according to the preset annotation rules according to the annotation strategy; the distribution type of the target features includes single-point type and scattered type; the annotation strategy for single-point type target features is to select the annotation box with a smaller annotation box size; for scattered type target features, the annotation box with a larger annotation box size is selected. The annotation module is used to annotate the target features in the image to be annotated using the target annotation box.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the automatic image annotation method as described in any one of claims 1 to 12.

15. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the automatic image annotation method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Image annotation method and terminal device

    CN108573279A

  • Image labeling method, device, and system

    WO2020088076A1