Image annotation processing method and apparatus, and computer device, medium and program product

Through feature matching and prediction technology, a small amount of manual annotation data is used to generate image annotation, which solves the problem of automatic annotation algorithm relying on a large amount of manual annotation data, improves the efficiency of image annotation and the accuracy of the detector, and adapts to the needs of scene changes.

WO2024183464A9PCT designated stage expired Publication Date: 2024-10-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/071907
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-07
Filing Date
2024-01-12
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

Existing automatic annotation algorithms rely on a large amount of manually annotated data, resulting in low image annotation efficiency. When the scene changes, a large amount of manually annotated data is required for fine-tuning or retraining, making it difficult to adapt to new scenes.

Method used

By obtaining the support data set and the query data set, matching the features of the support sample image and the query sample image based on the object boundary annotation, predicting the object center point annotation in the query sample image, and using these annotations to train the preset detector, reducing Manually label the amount of data and improve labeling accuracy.

Benefits of technology

It achieves automatic annotation of images on the basis of reducing the amount of manual annotation data, improves image annotation efficiency, reduces the need for manual annotation of data when the scene changes, and improves the center point position annotation accuracy of the detector.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024071907_24102024_PF_FP_ABST
    Figure CN2024071907_24102024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are an image annotation processing method and apparatus, and a computer device and a readable storage medium. The method comprises: acquiring a support data set that comprises a support sample image and a query data set that comprises a query sample image; on the basis of an object boundary annotation of the support sample image, performing feature matching on the support sample image and the query sample image to obtain a feature relevancy of the query sample image, wherein the feature relevancy is used for performing prediction to obtain a center point prediction annotation of an object in the query sample image; on the basis of the center point prediction annotation, acquiring a first annotation probability graph of a center point distribution of the object in the query sample image; and on the basis of the first annotation probability graph and the query sample image, training a preset center point detector to obtain a trained center point detector, which is used for performing center point annotation on the object in the image. The embodiments of the present application can be applied to various scenarios such as cloud technology and artificial intelligence. The solution can realize automatic image annotation on the basis of reducing the volume of manually annotated data, thereby improving the image annotation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Image annotation processing method, device, computer equipment, medium and program product

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 7, 2023, with application number 2023102468918 and application name “Image annotation processing method, device, computer equipment and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of artificial intelligence technology, and specifically to image annotation. Background Art

[0003] With the rapid development of artificial intelligence and machine learning technologies, they are being used in an increasing number of fields. Computer vision, as a field of artificial intelligence, has also experienced rapid growth. To improve model performance, data annotation is often required for model training. For example, to teach a model to detect handheld objects, it is often necessary to annotate the handheld objects in images of handheld objects.

[0004] Generally speaking, data labeling is done manually. In related technologies, in order to improve the efficiency of data labeling, automatic labeling algorithms are used to label data.

[0005] However, during the actual R&D process, we discovered that the automatic labeling algorithm relies on a certain amount of manually labeled data, and requires a relatively large amount of manually labeled data for training to accurately achieve automatic data labeling. When the scene changes, in order to adapt to the new scene, a relatively large amount of manually labeled data is required to fine-tune or retrain the automatic labeling algorithm. Therefore, the automatic labeling algorithms in related technologies rely on a relatively high amount of manually labeled data, resulting in relatively low image labeling efficiency.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide an image annotation processing method, apparatus, computer equipment, medium, and program product, which can realize automatic image annotation while reducing the amount of manual annotation data and improve image annotation efficiency.

[0008] In a first aspect, an embodiment of the present application provides an image annotation processing method, the method comprising:

[0009] Acquire a support dataset and a query dataset, wherein the support dataset includes at least one support sample image and object boundary annotations of the support sample image, and the query dataset includes multiple query sample images;

[0010] Based on the object boundary annotation, matching the object region features of the support sample image with the image features of the query sample image to obtain the feature correlation of the query sample image;

[0011] Performing a prediction based on the feature correlation to obtain a predicted annotation of the center point of the object in the query sample image;

[0012] Based on the center point prediction annotation, obtaining a first annotation probability map of the center point distribution of the object in the query sample image;

[0013] Based on the first labeling probability map and the query sample image, a preset center point detector is trained to obtain a trained center point detector, wherein the trained center point detector is used to label the center points of objects in the sample image to be labeled.

[0014] In a second aspect, an embodiment of the present application provides an image annotation processing device, the image annotation processing device comprising:

[0015] an acquisition unit, configured to acquire a support dataset and a query dataset, wherein the support dataset includes at least one support sample image and object boundary annotations of the support sample image, and the query dataset includes multiple query sample images;

[0016] a matching unit, configured to match the object region features of the support sample image with the image features of the query sample image based on the object boundary annotation, to obtain a feature correlation of the query sample image;

[0017] A prediction unit, configured to make a prediction based on the feature correlation to obtain a predicted annotation of a center point of an object in the query sample image;

[0018] a processing unit, configured to obtain a first annotation probability map of the distribution of object center points in the query sample image based on the center point prediction annotation;

[0019] The processing unit is further used to train a preset center point detector based on the first annotation probability map and the query sample image to obtain a trained center point detector, wherein the trained center point detector is used to annotate the center points of objects in the sample image to be annotated.

[0020] In a third aspect, an embodiment of the present application further provides a computer device, comprising a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, it executes any one of the image annotation processing methods provided in the embodiments of the present application.

[0021] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded by a processor to execute the image annotation processing method.

[0022] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements any one of the image annotation processing methods provided in the embodiments of the present invention.

[0023] From the above, it can be concluded that the embodiments of the present application have the following beneficial effects:

[0024] The embodiment of the present application labels the object boundaries of the supporting sample image, matches the object area features of the supporting sample image with the image features of the query sample image, and obtains the feature correlation of the query sample image, which is used to predict the center point prediction labeling of the object in the query sample image; thereby, the center point prediction labeling of the object in the query sample image can be used to train the preset center point detector to obtain a trained center point detector; on the one hand, since the object area features of the supporting sample image are matched with the image features of the query sample image, the center point prediction labeling of the object in the query sample image can be predicted, so that a small number of manually labeled supporting sample images can be used to predict and label the center point positions of a part of the query sample image, that is, to automatically label a certain amount of manually labeled data that the automatic labeling algorithm needs to rely on. Therefore, only a small amount of manually labeled data (that is, a small number of supporting sample images) is needed to generate a certain scale of image labeling data, thereby realizing the expansion of the image labeling data that the automatic labeling algorithm needs to rely on; therefore, when the scene changes, there is no need to manually label images with a large amount of data. On the other hand, because feature matching can expand image annotation data (i.e., achieve annotation of a certain number of query sample images), using query sample images to train a preset center point detector can improve the accuracy of the trained center point detector in annotating the center point position of objects. Therefore, this embodiment can achieve automatic image annotation while reducing the amount of manually annotated data, thereby improving image annotation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] FIG1 is a schematic diagram of an application scenario of an image annotation processing method provided in an embodiment of the present application;

[0026] FIG2 is a flow chart of an embodiment of an image annotation processing method provided in an embodiment of the present application;

[0027] FIG3 is a diagram illustrating data interaction between the functional modules of the business product provided in this embodiment and the functional modules of the automatic annotation algorithm;

[0028] FIG4 is a schematic diagram of a structure of a small sample target location probability predictor provided in an embodiment of the present application;

[0029] FIG5 is a schematic diagram of extracting a local maximum response value of a sliding window provided in an embodiment of the present application;

[0030] FIG6 is a schematic diagram of the training process of a trained center point detector provided in an embodiment of the present application;

[0031] FIG7 is a schematic diagram of the application process of the trained center point detector provided in an embodiment of the present application;

[0032] FIG8 is a schematic diagram illustrating an image annotation process according to an embodiment of the present application;

[0033] FIG9 is a schematic structural diagram of an embodiment of an image annotation processing device according to an embodiment of the present application;

[0034] FIG10 is a schematic structural diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0036] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Features specified as "first" or "second" may explicitly or implicitly include one or more of the features, rather than describing a specific order. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions.

[0037] It is understandable that in the specific implementation of this application, user information such as supporting sample images (such as images of users holding objects while wearing XR products), query sample images and other related data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0038] The present invention provides an image annotation processing method, apparatus, computer device, and computer-readable storage medium. The image annotation processing apparatus can be integrated into a computer device, which can be a server or a user terminal.

[0039] The image annotation processing method of this embodiment can be implemented by a server, or by a terminal and a server together. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, but is not limited to these. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to these. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0040] The following describes the method by taking the example of a terminal and a server jointly implementing the image annotation processing method.

[0041] 1 , an image annotation processing system provided by an embodiment of the present invention includes a terminal 101 and a server 102 . The terminal 101 and the server 102 are connected via a network, such as a wired or wireless network.

[0042] The terminal 101 can obtain a support data set and a query data set, wherein the support data set includes at least one support sample image and object boundary annotations of the support sample image, and the query data set includes multiple query sample images, and sends the support data set and the query data set to the server 102. The server 102 can be used to receive the support data set and the query data set sent by the terminal 101, match the object region features of the support sample image with the image features of the query sample image based on the object boundary annotations, and obtain the feature correlation of the query sample image; make predictions based on the feature correlations to obtain the predicted annotations of the center points of the objects in the query sample image; obtain a first annotation probability map of the distribution of the center points of the objects in the query sample image based on the predicted annotations of the center points; and train a preset center point detector based on the first annotation probability map and the query sample image to obtain a trained center point detector, wherein the trained center point detector is used to annotate the center points of the objects in the sample image to be annotated.

[0043] The image annotation processing method provided in this embodiment may specifically involve an artificial intelligence cloud service. The following description will take a computer device as an example of the execution subject of the image annotation processing method. For the sake of simplicity, the execution subject will be omitted in the following text.

[0044] Artificial intelligence cloud services, also known as AIaaS (AI as a Service), are a mainstream AI platform offering. Specifically, AIaaS platforms break down several common AI services and provide them as standalone or packaged services in the cloud. This service model is similar to an AI-themed marketplace: all developers can access one or more of the platform's AI services through APIs. Experienced developers can also use the platform's AI framework and infrastructure to deploy and maintain their own cloud AI services.

[0045] The following is a detailed description of each embodiment in conjunction with the accompanying drawings. It should be noted that the order in which the following embodiments are described does not limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in an order different from that shown in the drawings.

[0046] As shown in FIG2 , the specific process of the image annotation processing method may include steps 201 to 205 , wherein:

[0047] 201. Obtain a supporting dataset and a query dataset.

[0048] The support data set includes at least one support sample image and object boundary annotations of the support sample image, and the query data set includes multiple query sample images.

[0049] It is understood that in actual business scenarios, image annotation can have various purposes, such as annotating objects in an image so that a target model can learn to detect them. This embodiment uses the example of "annotating objects in an image so that a target model can learn to detect them" as an example.

[0050] Among them, the training data set refers to the collection of sample images used to train the target model. The training data set may specifically include supporting sample images, query sample images, and other sample images to be labeled. As shown in Figure 3, the target model can be a model used to detect the center point of an object in a business product, or it can be a functional sub-module used to detect the center point of an object in a business product. For example, users holding objects in their hands is a scenario often encountered in XR (Extended Reality) product applications. Accurate user-held object perception analysis is an important basis for improving the richness and immersion of user interaction actions in XR product applications. The model or functional sub-module used to detect the center point of handheld objects in XR product applications can be used as the target model; and the training data set can be used to train the target model. Among them, extended reality refers to a real and virtual combination of human-computer interaction environment generated by computer technology and wearable devices.

[0051] For ease of understanding, an applicable scenario of this embodiment is first introduced below, as shown in Figure 3. Figure 3 is a schematic diagram of data interaction between the functional modules of the business product provided in this embodiment and the functional modules of the automatic labeling algorithm. Taking the target model as a model of "realizing the detection of handheld objects held by users during the use of XR products" (i.e., a handheld object center point detection model) as an example, the supporting sample images, query sample images and other sample images to be labeled can be used as training data sets for training the handheld object center point detection model. In this embodiment, only a small number of supporting sample images need to be manually labeled as the basis for starting training, and the center point prediction labeling of the query sample image is obtained by the small sample target position probability predictor; the center point prediction labeling of the query sample image and the manual labeling of the supporting sample image are used to train the preset center point detector, so that the trained center point detector can be applied to iteratively label the object center point position of the sample image to be labeled. In Figure 3, the business product algorithm may specifically include:

[0052] ① A hand detection model (or the hand detection model can also be set as a hand detection function submodule) is used to detect the hand area in the image.

[0053] ② A handheld object center point detection model (or the handheld object center point detection model can also be set as a handheld object center point detection function submodule form) is used to detect the center point of the handheld object in the image.

[0054] ③Other algorithm models (or set as other functional sub-module forms).

[0055] Automatic labeling algorithms include:

[0056] ① Data acquisition module, used to collect training data sets, such as support sample images and query sample images.

[0057] ② A hand region extraction module is used to detect the hand region in the query sample image. For example, the hand detection model in the business product algorithm can be used to perform hand region detection on the query sample image to obtain a hand region map of the query sample image.

[0058] ③Other functional sub-modules.

[0059] ④ A post-processing module for labeling the object center points of each image in the training dataset, for example, including: obtaining the corresponding object center point labeling based on the manually labeled object boundary labeling in the supporting sample image; using the supporting dataset to predict the object center point of each query sample image in the query dataset to obtain the object center point prediction labeling of the query sample image; predicting the sample image to be labeled through the trained center point detector to obtain the labeled coordinates of the object center point in the sample image to be labeled, etc.

[0060] For ease of understanding, some names mentioned in this embodiment are introduced below:

[0061] Small samples: Machine learning models are usually required to learn from a very small number of samples to acquire knowledge.

[0062] Center point detection: refers to the use of algorithms to predict the center point position of the target of interest (such as the object mentioned in this application).

[0063] The supporting sample images are images with manually labeled objects in the training dataset. For example, if the target model is to detect objects held by users while using XR products, or to label handheld objects, we can collect images of objects held by users while wearing XR products as supporting sample images. Objects in these supporting sample images are manually labeled to obtain object boundary annotations.

[0064] Query sample images are images in the training dataset that have been automatically annotated with objects using the supporting dataset, without the need for manual object annotation. For example, if the target model is to detect objects held by users while using XR products, and the handheld object annotation processing scenario is used as an example, images of users holding objects while wearing XR products can be collected as query sample images.

[0065] Among them, the similarities between the supporting sample images and the query sample images are that: the supporting sample images and the query sample images are images in the training data set used to train the target model, and the supporting sample images and the query sample images belong to the same object annotation scene; the difference between the supporting sample images and the query sample images is that: the supporting sample images are images that require manual object annotation, and the query sample images are images that do not require manual object annotation.

[0066] Object boundary annotation is used to indicate the bounding boxes of objects in the supporting sample images. Object boundary annotation can be completed manually. For example, if the target model is to "detect objects held by users during the use of XR products," that is, taking the handheld object annotation processing scenario as an example, the bounding boxes of the handheld objects in the supporting sample images can be manually annotated.

[0067] For example, m images of a handheld object can be collected, from which n images are randomly selected as support sample images to form a support dataset (i.e., the support dataset includes n support sample images), and the remaining (mn) images are used as query sample images to form a query dataset (the query dataset includes (mn) query sample images). In this embodiment, since the center point of the object in the query sample image is predicted and labeled by feature matching, n < < m can be set. For example, n can be 10 and m can be 1,000,000, thereby expanding the number of sample images labeled with the object center point position and using them to train a preset center point detector to achieve iterative labeling of the object center point position. This allows for automatic image labeling, thereby greatly reducing the number of images that require manual labeling of the object center point position.

[0068] 202. Based on the object boundary annotation, the object region features of the support sample image are matched with the image features of the query sample image to obtain the feature correlation of the query sample image.

[0069] Among them, feature relevance is an indicator reflecting the degree of feature similarity between the query sample image and the supporting dataset.

[0070] There are many ways to obtain the feature correlation between the object region features of the supporting sample image and the image features of the query sample image in step 202, illustratively including:

[0071] 1) Specifically, for each query sample image in the query dataset, the similarity between each query sample image and each supporting sample image in the supporting dataset is calculated; then, the similarity between each query sample image and each supporting sample image in the supporting dataset is fused, and the fusion result is used as the feature correlation of each query sample image. In this case, step 202 may specifically include the following steps 2021A to 2024A, wherein:

[0072] 2021A. Based on the object boundary annotation of each supporting sample image in the supporting dataset, the object area features of each supporting sample image are obtained.

[0073] The object region features are obtained by extracting features from the bounding box regions of the objects in the supporting sample images. For example, in the case of handheld object annotation, features can be extracted from the bounding box regions of the manually annotated handheld objects in the supporting sample images to obtain the object region features of each supporting sample image.

[0074] For example, if the support dataset includes 10 support sample images (support sample images A1, A2, A3, ..., A10), then based on the object boundary annotation of support sample image A1, the image features within the object bounding box region of support sample image A1 can be extracted to obtain the object region features of support sample image A1. Similarly, the object region features of support sample images A1, A2, A3, ..., A10 can be extracted.

[0075] 2022A. Perform feature extraction based on the query sample image to obtain image features of the query sample image.

[0076] In some embodiments, feature extraction can be performed on the entire query sample image to obtain image features of the query sample image. For example, if the query dataset includes 1000 query sample images (query sample images B1, B2, B3, ..., B1000), feature extraction will be performed on the entire query sample image B1 to obtain image features of query sample image B1. Similarly, image features of query sample images B1, B2, B3, ..., B1000 can be extracted.

[0077] In other embodiments, feature extraction may be performed only on a local area of ​​the query sample image to obtain image features of the query sample image. For example, in a handheld object annotation processing scenario, feature extraction may be performed on the hand area in the query sample image to obtain image features of the query sample image. At this time, the object in the image (such as the support sample image, the query sample image) is a handheld object, and step 2022A may specifically include: performing hand area detection on the query sample image to obtain a hand area map of the query sample image; and performing feature extraction on the hand area map to obtain image features of the query sample image. For example, as shown in FIG3 , taking the target model as an example of "realizing detection of user-held objects during the use of XR products", the hand detection model in the business product algorithm may be used to perform hand area detection on the query sample image to obtain a hand area map of the query sample image.

[0078] The hand region map refers to the hand region map within the query sample image, obtained by performing hand region detection on the query sample image. Furthermore, since a handheld object may extend beyond the hand region, to improve the accuracy of labeling the center point of the handheld object, the hand region map can be expanded after hand region detection to encompass the entire handheld object.

[0079] 2023A. Match the object region features of each supporting sample image with the image features of the query sample image to obtain the correlation between each supporting sample image and the query sample image.

[0080] For example, if the support dataset includes 10 support sample images (support sample images A1, A2, A3, ..., A10) and the query dataset includes 1000 query sample images (query sample images B1, B2, B3, ..., B1000), the object region features of the support sample images A1, A2, A3, ..., A10 will be feature matched with the image features of the query sample image B1 to obtain the correlation between the support sample images A1, A2, A3, ..., A10 and the query sample image B1. Similarly, the correlation between the support sample images A1, A2, A3, ..., A10 and the query sample image B2, the correlation between the support sample images A1, A2, A3, ..., A10 and the query sample image B3, and the correlation between the support sample images A1, A2, A3, ..., A10 and the query sample image B1000 can be obtained.

[0081] 2024A. Fusing the correlations between each supporting sample image and the query sample image to obtain the feature correlation of the query sample image.

[0082] For ease of understanding, the example of step 2023A above will be continued. For example, the correlations between the supporting sample images A1, A2, A3, ..., A10 and the query sample image B1 can be fused (e.g., averaged) to obtain the result, which is used as the feature correlation of the query sample image B1. Similarly, the correlations between the supporting sample images A1, A2, A3, ..., A10 and the query sample image B2 can be fused (e.g., averaged) to obtain the result, which is used as the feature correlation of the query sample image B2. ...; the correlations between the supporting sample images A1, A2, A3, ..., A10 and the query sample image B1000 can be fused (e.g., averaged) to obtain the result, which is used as the feature correlation of the query sample image B1000.

[0083] Taking the case where the supporting dataset includes two supporting sample images (such as a first supporting sample image and a second supporting sample image) as an example, step 202 may specifically include:

[0084] (1.1) Obtaining object region features of the first supporting sample image based on the object boundary annotation of the first supporting sample image; and obtaining object region features of the second supporting sample image based on the object boundary annotation of the second supporting sample image.

[0085] (1.2) Feature extraction is performed based on the query sample image to obtain image features of the query sample image.

[0086] (1.3) Matching the object region features and image features of the first supporting sample image to obtain a first correlation between the first supporting sample image and the query sample image.

[0087] (1.4) Matching the object region features and image features of the second supporting sample image to obtain a second correlation between the second supporting sample image and the query sample image.

[0088] (1.5) The first correlation and the second correlation are fused to obtain the feature correlation of the query sample image.

[0089] The first supporting sample image is one of the supporting sample images in the supporting data set, and the second supporting sample image is one of the supporting sample images in the supporting data set.

[0090] The first correlation refers to the correlation between the first supporting sample image and the query sample image, and the second correlation refers to the correlation between the second supporting sample image and the query sample image.

[0091] For example, first, object region features of the first supporting sample image can be obtained based on the object boundary annotations of the first supporting sample image; object region features of the second supporting sample image can be obtained based on the object boundary annotations of the second supporting sample image; and feature extraction can be performed based on the query sample image to obtain image features of the query sample image. Next, cosine similarity, Euclidean distance, or Hamming distance, etc., can be calculated between the object region features of the first supporting sample image and the image features of the query sample image to serve as a first correlation between the first supporting sample image and the query sample image. Similarly, cosine similarity, Euclidean distance, or Hamming distance, etc., can be calculated between the object region features of the second supporting sample image and the image features of the query sample image to serve as a second correlation between the second supporting sample image and the query sample image. Finally, the result of averaging the first and second correlations is used as the feature correlation of the query sample image.

[0092] By analogy, if the support dataset includes three support sample images (e.g., a first support sample image, a second support sample image, and a third support sample image), a first correlation between the first support sample image and the query sample image, a second correlation between the second support sample image and the query sample image, and a third correlation between the third support sample image and the query sample image can be obtained. The result of averaging the first correlation, the second correlation, and the third correlation is used as the feature correlation of the query sample image. In this case, step 202 may specifically include:

[0093] (2.1) Obtain object region features of the first supporting sample image based on the object boundary annotation of the first supporting sample image; obtain object region features of the second supporting sample image based on the object boundary annotation of the second supporting sample image; obtain object region features of the third supporting sample image based on the object boundary annotation of the third supporting sample image.

[0094] (2.2) Feature extraction is performed based on the query sample image to obtain image features of the query sample image.

[0095] (2.3) Matching the object region features and image features of the first supporting sample image to obtain a first correlation between the first supporting sample image and the query sample image.

[0096] (2.4) Matching the object region features and image features of the second supporting sample image to obtain a second correlation between the second supporting sample image and the query sample image.

[0097] (2.5) Matching the object region features and the image features of the third supporting sample image to obtain a third correlation between the third supporting sample image and the query sample image.

[0098] (2.6) The first correlation, the second correlation, and the third correlation are fused to obtain the feature correlation of the query sample image.

[0099] 2) Specifically, for each query sample image in the query dataset, the similarity between each query sample image and each supporting sample image in the supporting dataset is calculated; then, from the similarities between each query sample image and each supporting sample image in the supporting dataset, the maximum similarity is obtained as the feature correlation of each query sample image. In this case, step 202 may specifically include the following steps 2021B to 2024B, wherein:

[0100] 2021B. Based on the object boundary annotation of each supporting sample image in the supporting dataset, the object area features of each supporting sample image are obtained.

[0101] 2022B. Perform feature extraction based on the query sample image to obtain image features of the query sample image.

[0102] 2023B. Match the object region features of each supporting sample image with the image features of the query sample image to obtain the correlation between each supporting sample image and the query sample image.

[0103] 2024B. Obtain the maximum value of the correlation between each supporting sample image and the query sample image as the feature correlation of the query sample image.

[0104] 203. Predict the center point of the object in the query sample image based on the feature correlation.

[0105] The center point prediction annotation is used to identify the annotation coordinates of the center point of the object in the query sample image. The center point prediction annotation is predicted based on the feature correlation of the query sample image.

[0106] Among them, steps 202 to 203 can be specifically implemented by the class-agnostic small sample target location probability predictor provided in this embodiment. As shown in Figure 4, the small sample target location probability predictor includes a first feature extraction layer, a second feature extraction layer, a feature matching layer, and a probability regression layer, wherein:

[0107] The first feature extraction layer is used to extract features of the object region of the supporting sample image according to the object boundary annotation of the supporting sample image, so as to obtain the object region features of the supporting sample image.

[0108] The second feature extraction layer is used to extract features from the query sample image to obtain image features of the query sample image.

[0109] The feature matching layer is used to match the object area features of the supporting sample image with the image features of the query sample image to obtain the feature correlation of the query sample image.

[0110] The probabilistic regression layer is used to make predictions based on the feature correlation of the query sample image to obtain the probability that each coordinate in the query sample image is the object position, that is, to obtain the first object position distribution map of the query sample image; and based on the first object position distribution map of the query sample image, the coordinates of the center point of the object in the query sample image are extracted as the predicted annotation of the center point of the object in the query sample image.

[0111] The first object position distribution map may identify the probability of objects being distributed at different positions in the query sample image.

[0112] Among them, the class-agnostic small sample target position probability predictor can be trained based on the idea of ​​matching learning. Through the similarity calculation in the feature space, it can make it have a higher response to the feature areas in the query features (i.e., the image features of the query sample image) that have higher similarity with the support features (i.e., the object area features of the support sample image). In this way, the model can make higher response predictions on the image areas (such as the areas of handheld objects) that have higher similarity with the support sample images (such as handheld object sample images) on the query sample images.

[0113] Therefore, information such as the supporting sample image, the object boundary annotation of the supporting sample image, and the query sample image can be input into the small sample target position probability predictor provided in this embodiment. Through the first feature extraction layer in the small sample target position probability predictor, the object area features of the supporting sample image are obtained based on the object boundary annotation of the supporting sample image; through the second feature extraction layer in the small sample target position probability predictor, feature extraction is performed based on the query sample image to obtain the image features of the query sample image; through the feature matching layer in the small sample target position probability predictor, the object area features of the supporting sample image are matched with the image features of the query sample image to obtain the feature correlation of the query sample image; and through the probability regression layer in the small sample target position probability predictor, prediction is performed based on the feature correlation of the query sample image to obtain the first object position distribution map of the query sample image; based on the first object position distribution map of the query sample image, the coordinates of the center point of the object in the query sample image are extracted to obtain the predicted annotation of the center point of the object in the query sample image.

[0114] In step 203, there are multiple ways to obtain the predicted annotation of the center point of the object in the query sample image, illustratively including:

[0115] (1) The prior condition is that there is at most one object in the query sample image. In this case, step 203 may specifically include the following steps 2031A to 2032A, wherein:

[0116] 2031A. Predict the object position based on the feature correlation to obtain a first object position distribution map of the query sample image.

[0117] 2032A. Based on the first object position distribution map, obtain the coordinate value with the maximum object position distribution probability as the predicted label of the center point of the object in the query sample image.

[0118] The size of the first object location distribution map is the same as the size of the corresponding query sample image, and each probability in the first object location distribution map corresponds to a pixel position. For example, assuming that the first object location distribution map includes 81 pixels (x1, y1), (x1, y2), ..., (x1, y9), (x2, y1), (x2, y2), ..., (x2, y9), ..., (x9, y1), (x9, y2), ..., (x9, y9), the probability of each pixel coordinate being the object location is that the pixel (x9, y1) has the highest probability of being the object location. Then, the pixel coordinate (x9, y1) can be used as the predicted annotation of the center point of the object in the query annotation sample image.

[0119] (2) If one or more objects may exist in the query sample image, step 203 may specifically include the following steps 2031B to 2033B, wherein:

[0120] 2031B. Predict the object position based on the feature correlation to obtain a first object position distribution map of the query sample image.

[0121] The first object position distribution map is a probability map of object position distribution predicted based on the feature correlation of the query sample image, and is used to reflect the probability that each coordinate in the query sample image is the object position.

[0122] Specifically, the probability regression layer in the small sample target position probability predictor can be used to make predictions based on the feature correlation of the query sample image to obtain the first object position distribution map of the query sample image.

[0123] 2032B. Perform sliding processing on the first object position distribution map to obtain a local maximum response value of each first sliding window of the first object position distribution map.

[0124] Among them, the first sliding window is each pixel area obtained by sliding a window of a fixed size on the first object position distribution map. Each pixel area is of the fixed size in the first object position distribution map, and the pixel areas covered by different first sliding windows may have partial overlap, which is not limited in this application.

[0125] The local maximum response value of the first sliding window refers to the maximum value of the object location distribution probability in the first sliding window. For example, the first sliding window includes 9 pixels (x1, y1), (x1, y2), (x1, y3), (x2, y1), (x2, y2), (x2, y3), (x3, y1), (x3, y2), and (x3, y3). The probabilities of the object location at the coordinates of the 9 pixels are p11, p12, p13, p21, p22, p23, p31, p32, and p33, respectively. Assuming that P11 is the maximum value, the local maximum response value of the first sliding window is p11.

[0126] For example, as shown in FIG5, FIG5 is a schematic diagram of extracting the local maximum response value of the sliding window provided in an embodiment of the present application. Assuming that the two-dimensional first object position distribution diagram of size (w, h) is shown in FIG5(a), a two-dimensional first object position distribution diagram of size (w w ,h w ) is slid on the first object position distribution map to obtain the local maximum response value of each first sliding window (such as windows 1, 2, 3, ..., 12) (such as the local maximum response values ​​of windows 1, 2, 3, ..., 12 are: a1, a2, a3, ..., a12, respectively), as shown in (b) in Figure 5.

[0127] 2033B. If the local maximum response value of the first sliding window is greater than the first preset threshold, the first coordinate value corresponding to the local maximum response value of the first sliding window is used as the center point prediction label.

[0128] The first coordinate value refers to the coordinate value of the local maximum response value of the first sliding window.

[0129] For ease of understanding, the example of step 2032B above is continued. For example, the local maximum response value a1 of window 1, if the local maximum response value a1 of window 1 is greater than the first preset threshold value T1, then the coordinate value corresponding to the local maximum response value a1 of window 1 is used as the predicted annotation of the center point of the query sample image. If the local maximum response value a1 of window 1 is less than or equal to the first preset threshold value T1, the local maximum response value a1 of window 1 is filtered to avoid interference information. Similarly, similar judgments can be made on windows 1, 2, 3, ..., 12 in sequence to obtain the first coordinate value corresponding to (local maximum response value t> first preset threshold value T1) as the predicted annotation of the center point of the query sample image. In this way, one or more predicted annotations of the center point of the query sample image can be obtained, thereby realizing automatic annotation of the center point of the object in the query sample image.

[0130] It can be seen that by setting the first preset threshold value T1 for the local maximum response value of the first sliding window, when the local maximum response value t of the first sliding window is greater than the first preset threshold value T1, the first coordinate value corresponding to the local maximum response value of the first sliding window is used as the predicted annotation of the center point of the object in the query sample image, which can filter out some interference information, thereby improving the quality of the predicted annotation of the center point of the object in the query sample image, and further improving the quality of the automatic annotation of the training data set.

[0131] Furthermore, if the local maximum response values ​​of the first sliding window are all less than or equal to a first preset threshold, the query sample image is used as the sample image to be labeled; the trained center point detector is used to predict the sample image to be labeled, and the labeled coordinates of the center point of the object in the sample image to be labeled are obtained. Specifically, if the local maximum response values ​​of the first sliding window are all less than or equal to the first preset threshold, it proves that the query sample image cannot be predicted to have a center point prediction label using the small sample target position probability predictor, that is, it is impossible to implement object center point labeling of the query sample image using the small sample target position probability.

[0132] The sample images to be labeled are images that require prediction using trained center point detection to obtain the labeled coordinates of the center points of objects in the image. In this embodiment, the sample images to be labeled can be query sample images that cannot be labeled using small sample target position probabilities, or any other images that require object labeling.

[0133] For example, there are many ways to implement “predicting the sample image to be labeled by using the trained center point detector to obtain the labeled coordinates of the center point of the object in the sample image to be labeled”, including for example:

[0134] 1) The prior condition is that there is at most one object in the query sample image. In this case, the step of "predicting the sample image to be labeled using the trained center point detector to obtain the labeled coordinates of the center point of the object in the sample image to be labeled" may specifically include the following steps A1 to A2, wherein:

[0135] A1. Use the trained center point detector to predict the sample image to be labeled and obtain a second object position distribution map of the sample image to be labeled.

[0136] The second object position distribution map is a probability map of the object position distribution obtained by predicting the sample image to be labeled through the trained center point detector, and is used to reflect the probability that each coordinate in the sample image to be labeled is the object position.

[0137] The training process of the trained center point detector may refer to step 205 below, which will not be described in detail here.

[0138] As shown in Figure 7, taking the trained center point detector as a skip connection model as an example, first, the sample image to be labeled can be input into the trained center point detector, and the trained center point detector is used to perform feature extraction and upsampling on the sample image to be labeled, and a skip connection is performed during the feature extraction and upsampling process, and finally the output result of the trained center point detector is used as the second object position distribution map of the sample image to be labeled.

[0139] A2. Obtain the coordinate value with the maximum object position distribution probability based on the second object position distribution map, and use it as the labeled coordinate of the center point of the object in the sample image to be labeled.

[0140] For example, assuming that the second object position distribution map includes 36 pixels (x1, y1), (x1, y2), …, (x1, y6), (x2, y1), (x2, y2), …, (x2, y6), …, (x6, y1), (x6, y2), …, (x6, y6), the probability that the coordinates of each pixel point are the object position is the object position. If the probability that the coordinates of the pixel point (x2, y1) are the object position is the largest, the coordinates of the pixel point (x2, y1) can be used as the labeled coordinates of the center point of the object in the sample image to be labeled.

[0141] By analogy, the trained center point detector can be used to mark the center point positions of other sample images to be labeled.

[0142] 2) There may be one or more objects in the query sample image. In this case, the step of "predicting the sample image to be labeled using the trained center point detector to obtain the labeled coordinates of the center point of the object in the sample image to be labeled" may specifically include the following steps B1 to B3, wherein:

[0143] B1. Use the trained center point detector to predict the sample image to be labeled and obtain a second object position distribution map of the sample image to be labeled.

[0144] The implementation of step B1 is similar to that of step A1. For details, please refer to the relevant description above and will not be repeated here.

[0145] B2. Perform sliding processing on the second object position distribution map to determine the local maximum response value of each second sliding window of the second object position distribution map.

[0146] The second sliding windows are sliding windows obtained by sliding on the second object position distribution map.

[0147] The local maximum response value of the second sliding window refers to the maximum value of the object position distribution probability in the second sliding window.

[0148] The implementation of step B2 is similar to that of step 2032B. For details, please refer to the relevant description above and will not be repeated here.

[0149] B3. If the local maximum response value of the second sliding window is greater than the second preset threshold, the second coordinate value corresponding to the local maximum response value of the second sliding window is used as the labeled coordinate of the center point of the object in the sample image to be labeled.

[0150] The second coordinate value is a coordinate value corresponding to the local maximum response value of the second sliding window.

[0151] Please refer to Figure 7, which shows that the connection jump model is used to predict the second object position distribution map based on the sample image to be labeled, and the window sliding is performed on the second object position distribution map to extract the local maximum response value to obtain the labeled coordinates of the center point of the object in the sample image to be labeled.

[0152] For example, there will be four second sliding windows (such as window 1, window 2, window 3, and window 4) when sliding processing is performed on the second object position distribution map. The local maximum response values ​​of windows 1, 2, 3, and 4 are respectively: a1, a2, a3, and a4. If the local maximum response value a1 of window 1 is greater than the first preset threshold value T1, and the local maximum response value a4 of window 4 is greater than the first preset threshold value T1, then the coordinate value corresponding to the local maximum response value a1 of window 1 and the coordinate value corresponding to the local maximum response value a4 of window 4 are used as the predicted annotation of the center point of the sample image to be labeled, that is, there are two objects in the sample image to be labeled. In this way, one or more predicted annotations of the center point of the sample image to be labeled can be obtained, and the center point of the object in the sample image to be labeled can be automatically labeled.

[0153] It can be seen that by setting the second preset threshold T2 for the local maximum response value of the second sliding window, when the local maximum response value t of the second sliding window is greater than the second preset threshold T2, the second coordinate value corresponding to the local maximum response value of the second sliding window is used as the predicted annotation of the center point of the object in the sample image to be labeled. This can filter out some interference information, thereby improving the quality of the predicted annotation of the center point of the object in the sample image to be labeled, and further improving the quality of the automatic annotation of the training data set.

[0154] 204. Based on the center point prediction annotation, obtain a first annotation probability map of the center point distribution of the object in the query sample image.

[0155] The first annotation probability map is a probability map of the object center point position distribution obtained by preprocessing the predicted annotation of the center point of the query sample image, which is used to reflect the probability that each coordinate in the query sample image is the object center point position.

[0156] Exemplarily, step 204 of obtaining a first annotation probability map of the distribution of center points of objects in the query sample image based on the center point prediction annotation may specifically include: performing feature mapping on the query sample image based on the center point prediction annotation to obtain a binary image of the query sample image; performing Gaussian convolution calculation on the binary image to obtain a first annotation probability map of the distribution of center points of objects in the query sample image.

[0157] For example, suppose the center point of the object in the query sample image predicted in step 203 is marked as (c x ,x y ), first, referring to the following formula 1, a binary image of size w×h is obtained by mapping the predicted annotation of the center point of the object in the query sample image in a two-dimensional space; wherein w×h is the size of the query sample image. Then, a Gaussian kernel is used to perform convolution calculation on the binary image of the query sample image to obtain a first annotation probability map of the distribution of the center point of the object in the query sample image. The binary image of the query sample image is obtained by feature mapping the query sample image; and the binary image is then subjected to Gaussian convolution calculation to convert the binary object center point position coordinates into a probability map of the object center point position distribution, which is conducive to the preset center point detector learning the object center point position distribution.

[0158] In Formula 1, f(x,y) represents the grayscale value of the pixel at the (x,y) coordinate in the binary image of size w×h.

[0159] 205. Based on the first labeled probability map and the query sample image, train a preset center point detector to obtain a trained center point detector.

[0160] Among them, the trained center point detector is used to mark the center points of objects in the sample images to be marked.

[0161] There is no specific limitation on the design of the preset center point detector. For example, the preset center point detector can be a skip connection model (such as a ResNet network).

[0162] Exemplarily, there are multiple ways to train the preset center point detector in step 205 to obtain a trained center point detector, which include:

[0163] 1) Training is performed using the query sample image. In this case, step 205 may specifically include the following steps 2051A to 2053A:

[0164] 2051A. Predict the query sample image using a preset center point detector to obtain a first predicted probability map of the distribution of object center points in the query sample image.

[0165] The first prediction probability map is a probability map of the object center point position distribution obtained by predicting the query sample image, which is used to reflect the probability that each coordinate in the query sample image is the object center point position.

[0166] Exemplarily, the query sample image can be input into a preset center point detector, which performs feature extraction, upsampling and other processing on the query sample image, and finally outputs a first predicted probability map of the distribution of object center points in the query sample image.

[0167] Furthermore, as shown in FIG6 , to prevent gradient explosion and vanishing during training, skip connections can be performed during feature extraction and upsampling. In this case, in step 2051A, a preset center point detector can be used to extract features from the query sample image to obtain preliminary features of the query sample image. The preset center point detector can then be used to transform the preliminary features of the query sample image to obtain transformed features of the query sample image. Skip connections can then be performed based on the preliminary and transformed features to obtain a first predicted probability map for the query sample image. Transformation can include data processing using various techniques that transform features, such as convolution, up-sampling, and down-sampling.

[0168] Among them, the preliminary features are features obtained by extracting features from the query sample image through a preset center point detector.

[0169] Among them, the transformed features are features obtained by performing transformation processing (such as convolution and upsampling through multiple convolutional layers) on the basis of the preliminary features.

[0170] For example, the preset center point detector may include a multi-layer convolution structure, in which the preset center point detector performs convolution, upsampling, and other processing on the query sample image in the first layer to obtain the first layer features, and uses the first layer features as the preliminary features of the query sample image; performs convolution, upsampling, and other processing on the preliminary features in the second layer to obtain the second layer features of the query sample image;…; performs convolution, upsampling, and other processing on the preliminary features in the nth layer to obtain the nth layer features of the query sample image, and the nth layer features can be used as transformed features, and the preliminary features and the transformed features are jump-connected, and finally the first prediction probability map of the query sample image is output.

[0171] 2052A. Based on the first predicted probability map and the first labeled probability map, obtain a first loss value of a preset center point detector.

[0172] The first loss value is a loss value between a first labeled probability map of the object center point distribution in the query sample image and a first predicted probability map of the object center point distribution in the query sample image. Specifically, the L2 distance (and Euclidean distance) between the first labeled probability map and the first predicted probability map can be calculated as the first loss value.

[0173] For example, the first labeled probability map of the object center point distribution in the query sample image obtained in step 204 can be used as the true value for calculating the training loss of the preset center point detector, so that the trained center point detector can learn to predict the probability distribution of the object center point location. In this case, step 2052A can calculate a first loss value between the first labeled probability map of the object center point distribution in the query sample image and the first predicted probability map of the object center point distribution in the query sample image as the training loss value of the preset center point detector.

[0174] 2053A. Train the preset center point detector based on the first loss value to obtain a trained center point detector.

[0175] Specifically, as shown in FIG6 , back propagation can be performed based on the training loss value of the preset center point detector to update the model parameters of the preset center point detector until the preset stop training condition is met to obtain a trained center point detector.

[0176] Among them, the preset stopping training conditions can be set according to the actual scenario requirements. For example, it can be that the number of training iterations of the preset center point detector reaches the maximum value, the training loss value of two consecutive trainings basically does not change, etc.

[0177] 2) Training is performed using the query sample image and the support sample image. In this case, step 205 may specifically include the following steps 2051B to 2056B:

[0178] 2051B. Predict the query sample image using a preset center point detector to obtain a first predicted probability map of the distribution of object center points in the query sample image.

[0179] 2052B. Based on the first predicted probability map and the first labeled probability map, obtain a first loss value of a preset center point detector.

[0180] The implementation of steps 2051B to 2052B is similar to that of steps 2051A to 2052A. For details, please refer to the relevant description above and will not be repeated here.

[0181] 2053B. Based on the object boundary annotation of the supporting sample image, obtain a second annotation probability map of the distribution of the object center points in the supporting sample image.

[0182] Among them, the second annotation probability map determines the object center point in the supporting sample image based on the object boundary annotation of the supporting sample image, and preprocesses the object center point in the supporting sample image to obtain a probability map of the object center point position distribution, which is used to reflect the probability that each coordinate in the supporting sample image is the object center point position.

[0183] For example, first, the center point of the object in the supporting sample image can be calculated based on the object boundary annotation of the supporting sample image, such as (c x ,x y ). Then, referring to Formula 1 above, the center points of the objects in the supporting sample image are mapped in two-dimensional space to obtain a binary image of size w × h; where w × h is the size of the supporting sample image. A Gaussian kernel is then convolved with the binary image of the supporting sample image to obtain a second labeled probability map of the distribution of the center points of the objects in the supporting sample image.

[0184] 2054B. Predict the supporting sample image using a preset center point detector to obtain a second predicted probability map of the distribution of the center points of objects in the supporting sample image.

[0185] The second prediction probability map is a probability map of the object center point position distribution obtained by predicting the supporting sample image, which is used to reflect the probability that each coordinate in the supporting sample image is the object center point position.

[0186] 2055B. Based on the second predicted probability map and the second labeled probability map, obtain a second loss value of the preset center point detector.

[0187] The second loss value is a loss value between the first labeled probability map for the distribution of object center points in the query sample image and the first predicted probability map for the distribution of object center points in the query sample image. Specifically, the L2 distance (and Euclidean distance) between the first labeled probability map and the first predicted probability map can be calculated as the first loss value.

[0188] The implementation of step 2055B is similar to that of step 2053A. For details, please refer to the relevant instructions in the previous text and will not be repeated here.

[0189] 2056B. Based on the first loss value and the second loss value, train the preset center point detector to obtain a trained center point detector.

[0190] Exemplarily, as shown in FIG6 , the first loss value can be used as the preset center point detector's one-time training loss value for back propagation to update the parameters of the preset center point detector; similarly, the second loss value can be used as the preset center point detector's one-time training loss value for back propagation to update the parameters of the preset center point detector until the preset stop training condition is met to obtain a trained center point detector.

[0191] From the above content, it can be seen that by annotating the object boundaries of the supporting sample image, the object area features of the supporting sample image are matched with the image features of the query sample image to obtain the feature correlation of the query sample image, which is used to predict the center point prediction annotation of the object in the query sample image; thus, the center point prediction annotation of the object in the query sample image can be used to train the preset center point detector to obtain a trained center point detector; on the one hand, since the object area features of the supporting sample image are matched with the image features of the query sample image, the center point prediction annotation of the object in the query sample image can be predicted, so that a small number of manually annotated supporting sample images can be used to predict and annotate the center point position of a part of the query sample image, that is, to automatically annotate a certain amount of manually annotated data that the automatic annotation algorithm needs to rely on. Therefore, only a small amount of manually annotated data (that is, a small number of supporting sample images) is needed to generate a certain scale of image annotation data, thereby realizing the expansion of the image annotation data that the automatic annotation algorithm needs to rely on; therefore, when the scene changes, there is no need to repeatedly manually annotate images with a large amount of data. On the other hand, because feature matching can expand image annotation data (i.e., achieve annotation of a certain number of query sample images), using query sample images to train a preset center point detector can improve the accuracy of the trained center point detector in annotating the center point position of objects. Therefore, this embodiment can achieve automatic image annotation while reducing the amount of manually annotated data, thereby improving image annotation efficiency.

[0192] For ease of understanding, in conjunction with Figures 3, 6, and 8, the scenario of "detecting objects held by users during the use of XR products" is taken as an example. In this case, the sample image is a sample image of a handheld object, and the target model is the handheld object center point detection model shown in the business product algorithm section of Figure 3. The image annotation processing process in the embodiment of the present application is described. As shown in Figure 8, the image annotation processing process is specifically as follows:

[0193] 801. Obtain a supporting dataset and a query dataset.

[0194] The support data set includes at least one support sample image and object boundary annotations of the support sample image, and the query data set includes multiple query sample images.

[0195] For example, m images of objects held by a user during the use of an XR product can be collected, and n images can be randomly selected from them as a support data set (that is, the support data set includes n support sample images). The objects in the support sample images are manually labeled to obtain the object boundary annotations of the support sample images; the remaining (mn) images are used as a query data set (the query data set includes (mn) query sample images).

[0196] 802. Based on the object boundary annotation, match the object region features of the support sample image with the image features of the query sample image to obtain feature correlation of the query sample image.

[0197] 803. Predict based on feature correlation to obtain a predicted annotation of the center point of the object in the query sample image.

[0198] 804. Based on the center point prediction annotation, obtain a first annotation probability map of the center point distribution of the object in the query sample image.

[0199] For example, as shown in Figure 6, assuming the center point detector is a skip connection model, the predicted annotations of the center points of objects in the query sample image can be mapped in two-dimensional space to obtain a binary image of size w × h, where w × h is the size of the query sample image. A Gaussian kernel is then convolved with the binary image of the query sample image to obtain a first annotation probability map of the distribution of the center points of objects in the query sample image.

[0200] 805. Based on the object boundary annotations of the supporting sample image, obtain a second annotation probability map of the distribution of object center points in the supporting sample image.

[0201] For example, as shown in FIG6 , first, the center point of the object in the supporting sample image can be calculated based on the object boundary annotation of the supporting sample image, such as (c x ,x y ). Then, referring to Formula 1 above, the center points of the objects in the supporting sample image are mapped in two-dimensional space to obtain a binary image of size w × h; where w × h is the size of the supporting sample image. A Gaussian kernel is then convolved with the binary image of the supporting sample image to obtain a second labeled probability map of the distribution of the center points of the objects in the supporting sample image.

[0202] 806 : Based on the first labeling probability map, the second labeling probability map, the query sample image, and the support sample image, train a preset center point detector to obtain a trained center point detector.

[0203] Specifically, the query sample images in the query data set that can obtain center point prediction annotations and all the supporting sample images in the support data set can be used as the first batch of annotation data to train the preset center point detector to obtain a trained center point detector.

[0204] 807. Using the trained center point detector, mark the center point of the object in the sample image to be marked.

[0205] Specifically, the query sample images in the query data set whose center point prediction labels cannot be predicted, as well as other images (such as re-captured images of users holding objects during the use of XR products) can be used as sample images to be labeled; the trained center point detector is used to perform predictions to achieve labeling of the center point position of the object, and the second batch of labeled data is obtained at this time.

[0206] Finally, the second batch of labeled data predicted and labeled using the trained center point detector in step 807, as well as the first batch of labeled data, can be used as one of the labels for calculating the training loss of the handheld object center point detection model in the business product algorithm. This can be used to train the handheld object center point detection model, for example, using single-task or multi-task joint training. This allows the handheld object center point detection model to accurately perceive and identify objects held by users while using XR products, improving the XR product's ability to perceive and analyze user actions, thereby providing support for further enhancing the interactive experience of XR products. For example, it can recognize handheld water cups and handheld phones, allowing XR products to support users drinking from water cups, finding their phones, and answering calls without removing their headsets, significantly improving the user's convenience in using XR products. For another example, enabling XR products to perceive certain tennis rackets (such as table tennis rackets) held by users can enable the development of more complex handheld object interaction features. For example, users can hold real-world objects such as rackets while wearing an XR headset and perform corresponding motion interactions in virtual reality applications.

[0207] This embodiment can also be applied to various game scenarios. For example, for games that require recognition of the game player's body movements to complete corresponding game operations, images of the game player during the game process can be collected as a supporting data set and a query data set; and the image annotation processing method of this embodiment can be used to implement image annotation of the training data set based on the supporting data set and the query data set; and the annotated training data set can be used to train a recognition model for the game player's body movements, thereby realizing recognition of the game player's body movements to complete the corresponding game operations.

[0208] In order to better implement the image annotation processing method in the embodiment of the present application, based on the image annotation processing method, an image annotation processing device is also provided in the embodiment of the present application. The image annotation processing device can be integrated into a computer device, such as a server or terminal.

[0209] For example, as shown in FIG9 , FIG9 is a schematic diagram of the structure of an embodiment of an image annotation processing device in an embodiment of the present application. The image annotation processing device may include an acquisition unit 901, a matching unit 902, a prediction unit 903, a processing unit 904, etc., as follows:

[0210] An acquisition unit 901 is configured to acquire a support dataset and a query dataset, wherein the support dataset includes at least one support sample image and object boundary annotations of the support sample image, and the query dataset includes multiple query sample images;

[0211] A matching unit 902 is configured to match the object region features of the support sample image with the image features of the query sample image based on the object boundary annotations to obtain a feature correlation of the query sample image;

[0212] A prediction unit 903 is configured to perform prediction based on feature correlation to obtain a predicted annotation of the center point of the object in the query sample image;

[0213] A processing unit 904 is configured to obtain a first annotation probability map of the distribution of the center points of the objects in the query sample image based on the center point prediction annotation;

[0214] The processing unit 904 is further configured to train a preset center point detector based on the first labeling probability map and the query sample image to obtain a trained center point detector, wherein the trained center point detector is used to label the center points of objects in the sample image to be labeled.

[0215] In some embodiments, the prediction unit 903 is specifically configured to:

[0216] Predicting the object position based on the feature correlation to obtain a first object position distribution map of the query sample image;

[0217] Performing sliding processing on the first object position distribution map to obtain a local maximum response value of each first sliding window of the first object position distribution map;

[0218] If the local maximum response value of the first sliding window is greater than a first preset threshold, the first coordinate value corresponding to the local maximum response value of the first sliding window is used as the center point prediction label.

[0219] In some embodiments, the processing unit 904 is specifically configured to:

[0220] If the local maximum response values ​​of the first sliding window are all less than or equal to the first preset threshold, the query sample image is used as the sample image to be labeled;

[0221] The trained center point detector is used to predict the sample image to be labeled, and the labeled coordinates of the center point of the object in the sample image to be labeled are obtained.

[0222] In some embodiments, the processing unit 904 is specifically configured to:

[0223] Using the trained center point detector, the sample image to be labeled is predicted to obtain a second object position distribution map of the sample image to be labeled;

[0224] Performing sliding processing on the second object position distribution map to determine a local maximum response value of each second sliding window of the second object position distribution map;

[0225] If the local maximum response value of the second sliding window is greater than the second preset threshold, the second coordinate value corresponding to the local maximum response value of the second sliding window is used as the labeled coordinate of the center point of the object in the sample image to be labeled.

[0226] In some embodiments, the processing unit 904 is specifically configured to:

[0227] Using the trained center point detector, the sample image to be labeled is predicted to obtain a second object position distribution map of the sample image to be labeled;

[0228] The coordinate value with the maximum object position distribution probability is obtained based on the second object position distribution map, and is used as the labeled coordinate of the center point of the object in the sample image to be labeled.

[0229] In some embodiments, the supporting dataset includes a first supporting sample image and a second supporting sample image, and the matching unit 902 is specifically configured to:

[0230] Obtaining object region features of the first supporting sample image based on the object boundary annotation of the first supporting sample image; obtaining object region features of the second supporting sample image based on the object boundary annotation of the second supporting sample image;

[0231] Perform feature extraction based on the query sample image to obtain image features of the query sample image;

[0232] Matching the object region features and the image features of the first supporting sample image to obtain a first correlation between the first supporting sample image and the query sample image;

[0233] Matching the object region features and the image features of the second supporting sample image to obtain a second correlation between the second supporting sample image and the query sample image;

[0234] The first correlation and the second correlation are fused to obtain the feature correlation.

[0235] In some embodiments, the object is a handheld object, and the matching unit 902 is specifically configured to:

[0236] Perform hand region detection on the query sample image to obtain a hand region map of the query sample image;

[0237] Perform feature extraction on the hand area map to obtain the image features of the query sample image.

[0238] In some embodiments, the processing unit 904 is specifically configured to:

[0239] Predicting the query sample image by using a preset center point detector to obtain a first predicted probability map of the distribution of object center points in the query sample image;

[0240] Obtaining a first loss value of a preset center point detector based on the first prediction probability map and the first labeled probability map;

[0241] The preset center point detector is trained based on the first loss value to obtain a trained center point detector.

[0242] In some embodiments, the processing unit 904 is specifically configured to:

[0243] By using a preset center point detector, feature extraction is performed on the query sample image to obtain preliminary features of the query sample image;

[0244] By using a preset center point detector, the preliminary features of the query sample image are transformed to obtain the transformed features of the query sample image;

[0245] A skip connection process is performed based on the preliminary features and the transformed features to obtain a first prediction probability map of the query sample image.

[0246] In some embodiments, the processing unit 904 is specifically configured to:

[0247] Based on the object boundary annotation of the supporting sample image, a second annotation probability map of the distribution of the object center points in the supporting sample image is obtained;

[0248] Predicting the supporting sample image by using a preset center point detector to obtain a second predicted probability map of the distribution of object center points in the supporting sample image;

[0249] Based on the second predicted probability map and the second labeled probability map, obtaining a second loss value of the preset center point detector;

[0250] Based on the first loss value and the second loss value, the preset center point detector is trained to obtain a trained center point detector.

[0251] In some embodiments, the processing unit 904 is specifically configured to:

[0252] Based on the center point prediction annotation, feature mapping is performed on the query sample image to obtain a binary image of the query sample image;

[0253] Perform Gaussian convolution calculation on the binary image to obtain a first labeled probability map of the distribution of object center points in the query sample image.

[0254] Therefore, the image annotation processing device provided by the embodiment of the present application can bring the following technical effects: through the object boundary annotation of the supporting sample image, the object area features of the supporting sample image are matched with the image features of the query sample image to obtain the feature correlation of the query sample image, which is used to predict the center point prediction annotation of the object in the query sample image; thereby, the preset center point detector can be trained using the center point prediction annotation of the object in the query sample image to obtain a trained center point detector; on the one hand, since the object area features of the supporting sample image are matched with the image features of the query sample image, the center point prediction annotation of the object in the query sample image can be predicted, thereby a small number of manually annotated supporting sample images can be used to predict and annotate the center point position of a part of the query sample image, that is, to automatically annotate a certain amount of manually annotated data that the automatic annotation algorithm needs to rely on. Therefore, only a small amount of manually annotated data (that is, a small number of supporting sample images) is needed to generate a certain scale of image annotation data, thereby realizing the expansion of the image annotation data that the automatic annotation algorithm needs to rely on; therefore, when the scene changes, there is no need to repeatedly manually annotate images with a large amount of data. On the other hand, because feature matching can expand image annotation data (i.e., achieve annotation of a certain number of query sample images), using query sample images to train a preset center point detector can improve the accuracy of the trained center point detector in annotating the center point position of objects. Therefore, this embodiment can achieve automatic image annotation while reducing the amount of manually annotated data, thereby improving image annotation efficiency.

[0255] In addition, in order to better implement the image annotation processing method in the embodiment of the present application, based on the image annotation processing method, the embodiment of the present application also provides a computer device, as shown in Figure 10, which shows a schematic structural diagram of the computer device involved in the embodiment of the present application. Specifically:

[0256] The computer device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will appreciate that the computer device structure shown in FIG10 does not limit the computer device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently. Among them:

[0257] Processor 1001 is the control center of the computer device. It connects the various components of the entire computer device using various interfaces and lines. By running or executing software programs and / or modules stored in memory 1002 and accessing data stored in memory 1002, it performs various functions of the computer device and processes data, thereby performing overall testing of the computer device. Optionally, processor 1001 may include one or more processing cores; preferably, processor 1001 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 1001.

[0258] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.

[0259] The computer device also includes a power supply 1003 for supplying power to various components. Preferably, the power supply 1003 can be logically connected to the processor 1001 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 1003 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0260] The computer device may further include an input unit 1004, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0261] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 1001 in the computer device will load the executable files corresponding to one or more application processes into the memory 1002 according to the following instructions, and the processor 1001 will run the application stored in the memory 1002 to perform the steps of any object detection method provided in the embodiments of the present application.

[0262] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0263] To this end, embodiments of the present application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any object detection method provided in embodiments of the present application. The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0264] An embodiment of the present application further provides a computer program product including a computer program, which, when executed on a computer, enables the computer to execute the method provided in the above embodiment.

[0265] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and beneficial effects of the above-described image annotation processing device, computer-readable storage medium, computer equipment and its corresponding units can refer to the description of the image annotation processing method in the above embodiment, and the details will not be repeated here.

[0266] The above is a detailed introduction to an image annotation processing method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for image annotation processing, the method being executed by a computer device, the method comprising: Acquire a support data set and a query data set, wherein the support data set includes at least one support sample image and an object boundary annotation of the support sample image, and the query data set includes multiple query sample images; Based on the object boundary annotation, matching the object region features of the support sample image with the image features of the query sample image to obtain the feature correlation of the query sample image; Performing prediction based on the feature correlation to obtain a predicted annotation of a center point of an object in the query sample image; Based on the center point prediction annotation, obtaining a first annotation probability map of the center point distribution of the object in the query sample image; Based on the first annotation probability map and the query sample image, a preset center point detector is trained to obtain a trained center point detector, wherein the trained center point detector is used to annotate the center points of objects in the sample image to be annotated.

2. The image annotation processing method according to claim 1, wherein the step of performing prediction based on the feature correlation to obtain a predicted annotation of the center point of the object in the query sample image comprises: Performing object position prediction based on the feature correlation to obtain a first object position distribution map of the query sample image; Performing sliding processing on the first object position distribution map to obtain a local maximum response value of each first sliding window of the first object position distribution map; If the local maximum response value of the first sliding window is greater than a first preset threshold, the first coordinate value corresponding to the local maximum response value of the first sliding window is used as the center point prediction label.

3. The image annotation processing method according to claim 2, further comprising: If the local maximum response values ​​of the first sliding window are all less than or equal to the first preset threshold, the query sample image is used as a sample image to be labeled; The trained center point detector is used to predict the sample image to be labeled, so as to obtain the labeled coordinates of the center point of the object in the sample image to be labeled.

4. The image annotation processing method according to claim 3, wherein the step of predicting the sample image to be annotated by the trained center point detector to obtain the annotation coordinates of the center point of the object in the sample image to be annotated comprises: Predicting the sample image to be labeled by using the trained center point detector to obtain a second object position distribution map of the sample image to be labeled; Performing sliding processing on the second object position distribution map to determine the local maximum response value of each second sliding window of the second object position distribution map; If the local maximum response value of the second sliding window is greater than a second preset threshold, the second coordinate value corresponding to the local maximum response value of the second sliding window is used as the labeled coordinate of the center point of the object in the sample image to be labeled.

5. The image annotation processing method according to claim 3, wherein the step of predicting the sample image to be annotated by the trained center point detector to obtain the annotation coordinates of the center point of the object in the sample image to be annotated comprises: Predicting the sample image to be labeled by using the trained center point detector to obtain a second object position distribution map of the sample image to be labeled; Based on the second object position distribution map, the coordinate value with the maximum object position distribution probability is obtained as the labeled coordinate of the center point of the object in the sample image to be labeled.

6. The image annotation processing method according to claim 1, wherein the supporting data set comprises a first supporting sample image and a second supporting sample image, and the object region features of the supporting sample image are matched with the image features of the query sample image based on the object boundary annotation to obtain the feature correlation of the query sample image, comprising: Acquire object region features of the first supporting sample image based on the object boundary annotation of the first supporting sample image; Acquire object region features of the second supporting sample image based on the object boundary annotation of the second supporting sample image; Perform feature extraction based on the query sample image to obtain image features of the query sample image; Matching the object region feature of the first supporting sample image with the image feature to obtain a first correlation between the first supporting sample image and the query sample image; Matching the object region feature of the second supporting sample image with the image feature to obtain a second correlation between the second supporting sample image and the query sample image; The first correlation and the second correlation are merged to obtain the feature correlation.

7. The image annotation processing method according to claim 6, wherein the object is a handheld object, and the step of extracting features based on the query sample image to obtain image features of the query sample image comprises: Performing hand region detection on the query sample image to obtain a hand region map of the query sample image; Feature extraction is performed on the hand region map to obtain image features of the query sample image.

8. The image annotation processing method according to claim 1, wherein the step of training a preset center point detector based on the first annotation probability map and the query sample image to obtain a trained center point detector comprises: Predicting the query sample image by using a preset center point detector to obtain a first prediction probability map of the distribution of the center points of objects in the query sample image; Based on the first prediction probability map and the first labeled probability map, obtaining a first loss value of the preset center point detector; The preset center point detector is trained based on the first loss value to obtain a trained center point detector.

9. The image annotation processing method according to claim 8, wherein the step of predicting the query sample image by using a preset center point detector to obtain a first prediction probability map of the distribution of the center points of objects in the query sample image comprises: By using a preset center point detector, feature extraction is performed on the query sample image to obtain preliminary features of the query sample image; By using a preset center point detector, the preliminary features of the query sample image are transformed to obtain the transformed features of the query sample image; A skip connection process is performed based on the preliminary features and the transformed features to obtain a first prediction probability map of the query sample image.

10. The image annotation processing method according to claim 8, further comprising: Based on the object boundary annotation of the supporting sample image, obtaining a second annotation probability map of the distribution of the object center points in the supporting sample image; Predicting the supporting sample image by using the preset center point detector to obtain a second prediction probability map of the distribution of the center points of objects in the supporting sample image; Based on the second predicted probability map and the second labeled probability map, obtaining a second loss value of the preset center point detector; The step of training the preset center point detector based on the first loss value to obtain a trained center point detector includes: Based on the first loss value and the second loss value, the preset center point detector is trained to obtain a trained center point detector.

11. The image annotation processing method according to any one of claims 1 to 10, wherein the step of obtaining a first annotation probability map of the distribution of the center points of objects in the query sample image based on the center point prediction annotation comprises: Based on the center point prediction annotation, feature mapping is performed on the query sample image to obtain a binary image of the query sample image; The binary image is subjected to Gaussian convolution calculation to obtain a first labeled probability map of the distribution of object center points in the query sample image.

12. An image annotation processing device, the image annotation processing device comprising: An acquisition unit, configured to acquire a support data set and a query data set, wherein the support data set includes at least one support sample image and an object boundary annotation of the support sample image, and the query data set includes a plurality of query sample images; A matching unit, configured to match the object region features of the support sample image with the image features of the query sample image based on the object boundary annotation, to obtain a feature correlation of the query sample image; A prediction unit, configured to make a prediction based on the feature correlation to obtain a predicted annotation of a center point of an object in the query sample image; A processing unit, configured to obtain a first annotation probability map of the distribution of the center points of the objects in the query sample image based on the center point prediction annotation; The processing unit is further used to train a preset center point detector based on the first annotation probability map and the query sample image to obtain a trained center point detector, wherein the trained center point detector is used to annotate the center points of objects in the sample image to be annotated.

13. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the image annotation processing method according to any one of claims 1 to 11 is implemented.

14. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the image annotation processing method according to any one of claims 1 to 11 is implemented.