Automatic updating method and device, storage medium and computer program product
Through the automated labeling process, text extraction and multimodal model are used for object detection, the problem of manual intervention affecting labeling accuracy is solved, and the detection performance and accuracy of the model are improved.
Patent Information
- Application Number
- CN202410883562.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-11-01
AI Technical Summary
The existing data annotation methods in the field of object detection require manual intervention, resulting in insufficient accuracy and completeness of the annotation, affecting the detection ability of the model.
By obtaining pictures for text extraction, using multimodal models for automated annotation processing, generating optimal annotation information, and updating model parameters to realize a fully automated annotation process.
It improves the efficiency and accuracy of labeling, enhances the detection performance and accuracy of the model for target objects, and reduces the error introduced by manual intervention.
Smart Images

Figure CN118887381A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an automatic updating method, device, storage medium and computer program product. Background Art
[0002] Currently in the field of target detection, the main data labeling methods include manual labeling, small model learning labeling and semi-automatic labeling; among them, the manual labeling method is one of the most mainstream and accurate methods. The basic idea of the manual labeling method is that the labeler observes the image and labels the targets and areas in it to provide training samples for the model; the basic idea of the small model learning labeling method is that a small amount of data is manually labeled, and then the labeled data is input into a smaller model for training to obtain the model's prediction results as the final labeling; and the basic idea of the semi-automatic labeling method is that the user first manually sets some prompt words or keywords, and inputs the prompt words or keywords into the pre-trained multimodal large model. The multimodal large model can perform semantic understanding in different scenarios based on these prompt words and directly generate labeling results.
[0003] However, the above-mentioned manual labeling, small model learning labeling and semi-automatic labeling methods all require human intervention, which may affect the accuracy of the labeling, resulting in the model being unable to learn accurate and complete information, thereby reducing the model's detection capability. Summary of the invention
[0004] The embodiments of the present application provide an automated updating method, device, storage medium, and computer program product, which can realize a fully automated labeling process and improve the performance and accuracy of the model.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides an automatic updating method, the method comprising:
[0007] Obtain M first pictures, and use a first model to perform text extraction on the M first pictures to obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, and the first text set includes M keywords, where M is a positive integer;
[0008] Based on the second model and the first text set, N original images are annotated to obtain N annotated original images; wherein the M first images include partial images of the N original images, the second model is used to annotate the original images, the N annotated original images include N first annotation information, the first annotation information includes optimal annotation information corresponding to the N original images, and N is a positive integer;
[0009] The parameter information of the third model is updated based on the N annotated original images; wherein the third model is used to detect the target object in the image.
[0010] In a second aspect, an embodiment of the present application provides an automatic updating device, the automatic updating device comprising: an acquiring unit, an extracting unit, a labeling unit and an updating unit; wherein:
[0011] The acquisition unit is used to acquire M first pictures;
[0012] The extraction unit is used to extract text from the M first pictures using a first model to obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, and the first text set includes M keywords, where M is a positive integer;
[0013] The labeling unit is used to label N original pictures based on the second model and the first text set to obtain N labeled original pictures; wherein the M first pictures include partial pictures of the N original pictures, the second model is used to label the original pictures, the N labeled original pictures include N first labeling information, the first labeling information includes the optimal labeling information corresponding to the N original pictures, and N is a positive integer;
[0014] The updating unit is used to update the parameter information of the third model based on the N labeled original pictures; wherein the third model is used to detect the target object in the picture.
[0015] In a third aspect, an embodiment of the present application provides an automatic updating device, the automatic updating device comprising: a processor and a memory; wherein:
[0016] The memory is used to store a computer program that can be run on the processor;
[0017] The processor is used to execute the automatic updating method as described above when running the computer program.
[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program code is stored. When the computer program code is executed by a computer, the automatic updating method as described above is implemented.
[0019] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the automatic update method as described above.
[0020] The embodiments of the present application provide an automated updating method, device, storage medium and computer program product, the method comprising: obtaining M first images, extracting text from the M first images using a first model, and obtaining a first text set; wherein the first model is used to extract text features corresponding to the first images, and the first text set includes M keywords, where M is a positive integer; annotating N original images based on a second model and the first text set, and obtaining N annotated original images; wherein the M first images include partial images of the N original images, the second model is used to annotate the original images, and the N annotated original images include N first annotation information, and the first annotation information includes optimal annotation information corresponding to the N original images, where N is a positive integer; updating parameter information of a third model based on the N annotated original images; wherein the third model is used to detect target objects in the images. It can be seen that the first model can be used to extract text from M first pictures to obtain a first text set, and then the N original pictures can be annotated based on the second model and the first text set to obtain N annotated original pictures, that is, original pictures containing optimal annotation information. The embodiment of the present application can realize an automated annotation process for original pictures, which not only greatly improves the annotation efficiency, but also improves the annotation accuracy. Furthermore, the parameter information of the third model can be updated based on the N annotated original pictures, so that the third model can learn more accurate and complete information, thereby improving the prediction performance and accuracy of the third model. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 The automatic update method proposed in this embodiment of the present application is shown in FIG. Figure 1 ;
[0022] Figure 2 A schematic diagram of the first model structure proposed in the embodiment of the present application;
[0023] Figure 3 A schematic diagram of a second model structure proposed in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of a third model structure proposed in an embodiment of the present application;
[0025] Figure 5 Schematic diagram of the model self-evolution process framework proposed in the embodiment of this application Figure 1 ;
[0026] Figure 6 A schematic diagram of the target noun update model process proposed in the embodiment of the present application;
[0027] Figure 7 A schematic diagram of an automatic image annotation model proposed in an embodiment of the present application;
[0028] Figure 8 A schematic diagram of a small model update process proposed in an embodiment of the present application;
[0029] Fig. 9 Schematic diagram of the model self-evolution process framework proposed in the embodiment of this application Figure 2 ;
[0030] Fig.10 The structure diagram of the automatic updating device proposed in the embodiment of the present application is shown in FIG. Figure 1 ;
[0031] Fig.11 The structure diagram of the automatic updating device proposed in the embodiment of the present application is shown in FIG. Figure 2 . DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the related applications, rather than to limit the applications. It should also be noted that, for ease of description, only the parts related to the related applications are shown in the drawings.
[0033] As the advantages of multimodal models in image semantic understanding become increasingly prominent, their application areas are also expanding. In the field of object detection, although direct object detection can achieve better semantic understanding, its speed and engineering deployment face challenges in using large multimodal models, especially in terms of real-time detection requirements and mobile device deployment. Therefore, small models represented by convolutional neural networks have the advantages of fast speed and easy deployment, which makes small models still indispensable in training, reasoning and engineering deployment. However, the generalization of small models requires a large amount of data support, and traditional manual annotation and semi-automatic annotation can no longer meet the needs of fast and accurate annotation.
[0034] In the field of target detection, model training is inseparable from accurate data labeling. The accuracy of data labeling directly affects the accuracy and generalization ability of the model. At present, the main data labeling methods include manual labeling, small model learning labeling and semi-automatic labeling. Among them, manual labeling has always been one of the most mainstream and accurate methods. Labelers provide valuable training samples for the model by carefully observing the image and labeling the objects and areas in it. During the labeling process, labelers usually use professional labeling tools, such as labeling software or platforms, to ensure the high quality and consistency of the labeling. Another common labeling method is to use a small model for training. This method manually labels a small amount of data and then inputs it into a smaller model for training to obtain the model's prediction results as the final labeling. Compared with full manual labeling, this method reduces the burden of manual labeling to a certain extent. Semi-automatic labeling is a method of labeling that combines manually set prompt words with the generalization ability of multimodal large models. In this method, users first manually set some prompt words or keywords and input them into the pre-trained large model. The large model can perform semantic understanding in different scenarios based on these prompt words and directly generate corresponding target prediction results without going through tedious training processes. This method effectively combines the advantages of artificial intelligence and manual labeling, which can not only utilize human wisdom and experience, but also give full play to the learning and generalization capabilities of large models, providing an efficient and reliable solution for the labeling process.
[0035] However, the above labeling methods also have the following problems. First, manual labeling requires a third-party labeling company to label, which is time-consuming, labor-intensive and costly. Manual labeling will also have errors, and the labeling specifications and criteria cannot be consistent with those of algorithm personnel, which will cause the model to be unable to learn more accurate and complete information, thereby reducing the detection ability of the model; secondly, using small model training to label data, although this method performs well in processing speed, it still requires manual labeling, and the limitations of model generalization will affect the accuracy of labeling; finally, although the semi-automatic labeling method only needs to use text description to find any object in the picture, this process has not yet achieved full automation of the process, and the direct output results are not accurate, prone to false detection and repeated labeling, and still require a lot of manual intervention. In summary, the current manual labeling, small model learning labeling and semi-automatic labeling methods all have the problem of requiring manual intervention, which may affect the accuracy of labeling, resulting in the model being unable to learn accurate and complete information, thereby reducing the detection ability of the model.
[0036] In order to solve the problem that the current labeling method requires manual intervention, which may affect the accuracy of the labeling and thus reduce the detection ability of the model, the embodiment of the present application provides an automatic update method, device, storage medium and computer program product, the method comprising: obtaining M first pictures, using a first model to extract text from the M first pictures to obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, the first text set includes M keywords, and M is a positive integer; based on the second model and the first text set, N original pictures are labeled to obtain N labeled original pictures; wherein the M first pictures include partial pictures of the N original pictures, the second model is used to label the original pictures, the N labeled original pictures include N first labeling information, the first labeling information includes the optimal labeling information corresponding to the N original pictures, and N is a positive integer; based on the N labeled original pictures, parameter information of the third model is updated; wherein the third model is used to detect the target object of the picture. It can be seen that the first model can be used to extract text from M first pictures to obtain a first text set, and then the N original pictures can be annotated based on the second model and the first text set to obtain N annotated original pictures, that is, original pictures containing optimal annotation information. The present application can realize an automated annotation process for original pictures, which not only greatly improves the annotation efficiency, but also improves the annotation accuracy. Furthermore, the parameter information of the third model can be updated based on the N annotated original pictures, so that the third model can learn more accurate and complete information, thereby improving the prediction performance and accuracy of the third model.
[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0038] Embodiment 1
[0039] The present application embodiment provides an automatic update method. Figure 1 The automatic update method proposed in this embodiment of the present application is shown in FIG. Figure 1 ,like Figure 1 As shown, the automated update method may include the following steps:
[0040] Step 101, obtain M first pictures, use the first model to extract text from the M first pictures, and obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, and the first text set includes M keywords, where M is a positive integer.
[0041] In an embodiment of the present application, the automatic updating device may obtain M first images, and use the first model to extract text from the M first images to obtain a first text set.
[0042] It should be noted that, in an embodiment of the present application, the first image may include a partial image of the original image, for example, it may be a screenshot of a partial area of the original image, and the present application does not specifically limit the number of the first images.
[0043] It should be noted that, in the embodiments of the present application, Figure 2 This is a schematic diagram of the first model structure proposed in the embodiment of the present application, such as Figure 2 As shown, the first model may include a Tag2Text model and an N-gram model. The present application does not specifically limit the number of models and model types included in the first model.
[0044] It should be noted that, in an embodiment of the present application, when the automated updating device uses the first model to perform text extraction on M first images to obtain a first text set, the M first images can be input into the Tag2Text model to generate first information corresponding to the M first images; the first information includes text description information corresponding to the first images; then the first information can be input into the N-gram model to generate M first keyword sets corresponding to the M first images; wherein each first keyword set includes L keywords, L is a positive integer, and the M keywords included in the first text set are target keywords of the L keywords in the M first keyword sets; and then the first text set can be generated based on the M first keyword sets, the M first images, and the first preset algorithm model; wherein the first preset algorithm model is used to calculate the similarity between the M first images and the keywords.
[0045] Exemplarily, in an embodiment of the present application, the automated updating device may input a captured image of a safety helmet into a Tag2Text model to generate text description information corresponding to the image in the region, "a man with a yellow safety helmet on his head". The text description information may then be input into an N-gram model, and key noun phrases with articles and adjectives may be extracted from the text description information, thereby generating a first keyword set corresponding to the image. For example, the first keyword set may include keywords such as "man", "yellow safety helmet", and "head".
[0046] Furthermore, in an embodiment of the present application, after generating M first keyword sets corresponding to M first images, the automated updating device may generate a first text set based on the M first keyword sets, the M first images, and a first preset algorithm model.
[0047] It should be noted that, in an embodiment of the present application, when the automatic updating device generates a first text set based on M first keyword sets, M first pictures and a first preset algorithm model, it can count the frequency of occurrence of keywords in the M first keyword sets to obtain statistical results; then M second keyword sets can be obtained based on the statistical results; wherein the second keyword set includes some keywords in the first keyword set; and then a first score value can be determined based on the first preset algorithm model, the M second keyword sets and the first picture; wherein the first score value includes the similarity score values between the keywords in the M second keyword sets and the M first pictures; finally, M third keyword sets can be determined based on the first score values, and a first text set can be generated based on the M third keyword sets; wherein the third keyword set includes M keywords with the largest similarity score values with the M first pictures.
[0048] It should be noted that, in the embodiments of the present application, the first preset algorithm model may be a CLIP algorithm model, and the present application does not specifically limit the type of the first preset algorithm model.
[0049] Exemplarily, in an embodiment of the present application, the automated updating device may count the occurrence frequencies of keywords in the M first keyword sets, generate M second keyword sets based on the top ten keywords with the highest occurrence frequencies in the M first keyword sets, and then input the M second keyword sets and the first picture into a first preset algorithm model to obtain similarity score values between the keywords in the M second keyword sets and the M first pictures, thereby selecting the M keywords with the largest similarity score values with the M first pictures, and generating the first text set based on the M keywords with the largest similarity score values.
[0050] That is to say, in an embodiment of the present application, the automated updating device can utilize the first model to perform text extraction on M first images, thereby obtaining keyword phrases that best fit the first images, thereby ensuring that the generated keywords are consistent with the image content, and further improving the accuracy and quality of annotation.
[0051] Step 102: annotate the N original images based on the second model and the first text set to obtain N annotated original images; wherein the M first images include partial images of the N original images, the second model is used to annotate the original images, the N annotated original images include N first annotation information, the first annotation information includes the optimal annotation information corresponding to the N original images, and N is a positive integer.
[0052] In an embodiment of the present application, after the automated updating device obtains M first images and uses the first model to perform text extraction on the M first images to obtain a first text set, it can annotate the N original images based on the second model and the first text set to obtain N annotated original images.
[0053] It should be noted that, in the embodiments of the present application, the second model may include a YOLO-World model, and the present application does not specifically limit the model type and number of models included in the second model.
[0054] It should be noted that, in an embodiment of the present application, M first images may include partial images of N original images, and the first image may be one or more images captured from the original images. M is greater than or equal to N, and the present application does not specifically limit the number of first images.
[0055] It should be noted that, in the embodiments of the present application, the annotation information may include an annotation box, and the present application does not specifically limit the type of information included in the annotation information.
[0056] It should be noted that, in an embodiment of the present application, when the automated updating device annotates N original images based on the second model and the first text set to obtain N annotated original images, the N original images and the first text set can be input into the YOLO-World model to generate second annotation information, fourth keywords and confidence score values corresponding to the N original images; wherein the second annotation information includes pseudo-annotation information corresponding to the N original images, the fourth keyword represents the pseudo-labels corresponding to the N original images, and the fourth keyword is obtained based on the first text set; then a second image can be generated based on the fourth keyword and the original image; wherein the second image includes a cropped image corresponding to the original image; and then a first scoring value can be generated based on the second image, the fourth keyword and the confidence score value; wherein the first scoring value is used to filter the second annotation information corresponding to the fourth keyword; finally, N first annotation information corresponding to the N original images can be obtained based on the first scoring value, and the N annotated original images can be determined based on the first annotation information.
[0057] It should be noted that, in an embodiment of the present application, the second image may include an image that is cropped from the original image based on the fourth keyword, and the present application does not specifically limit the number of second images.
[0058] It should be noted that, in the embodiments of the present application, Figure 3 A schematic diagram of the second model structure proposed in the embodiment of the present application is shown in FIG. Figure 3As shown, in addition to the YOLO-World model, the second model may also include a first preset algorithm model. The first preset algorithm model may be a CLIP algorithm model. This application does not specifically limit the model type included in the second model.
[0059] Further, in an embodiment of the present application, when the automated update device generates a first rating value based on a second picture, a fourth keyword, and a confidence score value, the second picture and the fourth keyword may be input into a first preset algorithm model to generate a second rating value; wherein the second rating value includes a similarity score value between the second picture and the fourth keyword; and then the first rating value may be determined based on the second rating value and the confidence score value.
[0060] Exemplarily, in an embodiment of the present application, the automated update device may input the image cropped from the original image based on the fourth keyword and the fourth keyword into the CLIP algorithm model, thereby obtaining the similarity score value between the second image and the fourth keyword, and further determining the first rating value based on the similarity score value and the confidence score value between the second image and the fourth keyword.
[0061] Illustratively, in an embodiment of the present application, when the automated updating device determines the first rating value based on the similarity score value and the confidence score value between the second image and the fourth keyword, the first rating value may be obtained based on the following formula (1).
[0062]
[0063] in, represents the first score value, c i represents the confidence score value, Indicates the similarity score between the second image and the fourth keyword.
[0064] It should be noted that, in an embodiment of the present application, after the automated updating device generates a first scoring value based on the second image, the fourth keyword and the confidence score value, it can obtain N first annotation information corresponding to the N original images based on the first scoring value.
[0065] It should be noted that, in an embodiment of the present application, when the automatic updating device obtains N first annotation information corresponding to N original pictures based on the first scoring value, it can determine the third annotation information based on the first scoring value and the first preset threshold; wherein the third annotation information includes the annotation information after the second annotation information is filtered; then the third annotation information can be screened and processed based on the second preset algorithm model to obtain the fourth annotation information; and then the fifth keyword and the third picture corresponding to the fourth annotation information can be determined, and a third score value can be generated based on the fifth keyword and the third picture; wherein the third score value includes the similarity score value between the third picture and the fifth keyword; finally, the N first annotation information corresponding to the N original pictures can be determined based on the third score value and the fourth score value; wherein the fourth score value includes the similarity score value between the original picture and the first text set.
[0066] It should be noted that, in the embodiments of the present application, the second preset algorithm model at least includes a non-maximum suppression (NMS) algorithm model, and the present application does not specifically limit the model type of the second preset algorithm model.
[0067] Further, in an embodiment of the present application, when the automated update device determines the third annotation information based on the first scoring value and the first preset threshold, it can determine a second scoring value in the first scoring value that is greater than or equal to the first preset threshold; wherein the first scoring value includes the second scoring value; and then the third annotation information can be determined based on the keyword corresponding to the second scoring value; and a third scoring value in the first scoring value that is less than the first preset threshold can also be determined; and then the annotation information corresponding to the third scoring value can be filtered; wherein the first scoring value includes the third scoring value.
[0068] It should be noted that, in the embodiments of the present application, the first preset threshold value may be set between 0.3 and 0.5, or other values may be set. The present application does not specifically limit the size of the first preset threshold value.
[0069] That is to say, in an embodiment of the present application, the automated update device may filter out the third score values in the first score values that are less than the first preset threshold, retain the second score values in the first score values that are greater than or equal to the first preset threshold, and determine the third annotation information based on the keywords corresponding to the second score values.
[0070] Furthermore, in an embodiment of the present application, after determining the third annotation information, the automated updating device may filter and process the third annotation information based on the NMS algorithm model to obtain fourth annotation information, thereby filtering out duplicate annotation information to retain the most accurate results.
[0071] Furthermore, in an embodiment of the present application, after obtaining the fourth annotation information, the automated update device can determine the fifth keyword and the third picture corresponding to the fourth annotation information, and generate a third score value based on the fifth keyword and the third picture; wherein the third score value includes a similarity score value between the third picture and the fifth keyword.
[0072] It should be noted that, in an embodiment of the present application, when the automatic updating device determines the N first annotation information corresponding to N original pictures based on the third score value and the fourth score value, it can generate a fifth score value based on the third score value and the fourth score value; wherein the fifth score value is obtained by performing a preset operation based on the third score value and the fourth score value; and then the N first annotation information can be determined based on the fifth score value and the second preset threshold.
[0073] Illustratively, in an embodiment of the present application, when the automatic updating device generates the fifth score value based on the third score value and the fourth score value, the fifth score value may be obtained based on the following formula (2).
[0074]
[0075] Among them; region represents the third fraction value, s img represents the fourth score value, and S represents the fifth score value.
[0076] Further, in an embodiment of the present application, when the automated update device determines N first annotation information based on the fifth score value and the second preset threshold, it can determine a sixth score value in the fifth score value that is greater than or equal to the second preset threshold; wherein the fifth score value includes the sixth score value; then the N first annotation information can be determined based on the keyword corresponding to the sixth score value, and a seventh score value in the fifth score value that is less than the second preset threshold can be determined; and then the annotation information corresponding to the seventh score value can be filtered; wherein the fifth score value includes the seventh score value.
[0077] It should be noted that in the embodiments of the present application, the selection of the second preset threshold can be adjusted according to the specific scenario. For example, in an outdoor open-air venue, the threshold can be set between 0.3 and 0.5; and in an indoor scene, the threshold can be set between 0.1 and 0.2. The present application does not specifically limit the size of the second preset threshold.
[0078] That is to say, in an embodiment of the present application, the automated updating device can screen the fifth score value based on the second preset threshold value, and can determine the seventh score value of the fifth score value that is less than the second preset threshold value; then the annotation information corresponding to the seventh score value can be filtered, and the sixth score value of the fifth score value that is greater than or equal to the second preset threshold value can be retained, and then N first annotation information can be determined based on the keyword corresponding to the sixth score value, that is, the annotation information higher than the second preset threshold value can be retained as the final annotation result.
[0079] It should be noted that in an embodiment of the present application, the automatic updating device can use the YOLO-World and CLIP algorithm models to detect and calculate the original image, and then use the NMS algorithm and set the threshold to obtain the optimal target annotation (first annotation information), thereby significantly improving the accuracy and reliability of the annotation results.
[0080] It should be noted that, in an embodiment of the present application, the automatic updating device can use the Tag2Text model and the N-gram model to perform text extraction on the M first pictures, so as to obtain the keyword phrase that best fits the first picture, and then the keyword phrase that best fits the M first pictures (the first text set) and the N original pictures can be input into the YOLO-World model to generate pseudo-annotation information, pseudo-labels and confidence score values corresponding to the N original pictures, and the original pictures are intercepted based on the pseudo-labels to obtain the second pictures, and then the first score value can be obtained based on the second picture, the pseudo-label and the confidence score value, so that the N first annotation information corresponding to the N original pictures can be obtained based on the first score value, that is, the present application can automatically obtain the optimal annotation information corresponding to the original pictures, and high-precision annotations can be obtained without manual supervision, thereby greatly saving the time and labor costs of annotation.
[0081] Step 103: update the parameter information of the third model based on the N annotated original images; wherein the third model is used to detect the target object in the image.
[0082] In an embodiment of the present application, after the automated updating device annotates N original images based on the second model and the first text set to obtain N annotated original images, it can update the parameter information of the third model based on the N annotated original images.
[0083] It should be noted that, in the embodiments of the present application, Figure 4 The third model structure diagram proposed in the embodiment of the present application is as follows: Figure 4 As shown, the third model may include a YOLOv5 model, and this application does not specifically limit the model type of the third model.
[0084] It should be noted that in an embodiment of the present application, when the automatic updating device updates the parameter information of the third model based on N annotated original images, it can guide the third model to perform self-training based on the annotated original images, continuously update its internal parameters, and iteratively optimize the predicted annotation box, thereby gradually improving the third model's detection accuracy and description capabilities for various objects.
[0085] It should be noted that in the embodiment of the present application, the automatic updating device updates the parameter information of the third model based on N annotated original images, thereby avoiding the problems of difficult unification of traditional data annotation standards, small model annotation and semi-automatic annotation still requiring manual calibration, etc., while ensuring the detection speed, it improves the prediction accuracy and generalization in complex scenarios.
[0086] In summary, the automatic updating device can use the Tag2Text model and the N-gram model to perform text extraction on the M first images, so as to obtain the keyword phrase that best fits the first image, and then the keyword phrase that best fits the M first images (the first text set) and the N original images can be input into the YOLO-World model to generate pseudo-annotation information, pseudo-labels, and confidence score values corresponding to the N original images, and the original images can be intercepted based on the pseudo-labels to obtain the second images, and then the first score value can be obtained based on the second image, the pseudo-label, and the confidence score value, so as to obtain the N first annotation information corresponding to the N original images based on the first score value, that is, the present application can automatically obtain the most appropriate keyword phrases corresponding to the original images. The optimal annotation information can be obtained without manual supervision, which greatly saves the time and labor cost of annotation. The parameter information of the third model can be updated based on the annotated original image, which avoids the problems of difficult unification of traditional data annotation standards, small model annotation and semi-automatic annotation still requiring manual calibration, while ensuring the detection speed. The prediction accuracy and generalization in complex scenarios are improved, that is, the entire annotation process of the embodiment of the present application is fully automated without manual intervention. The entire process from automatically obtaining the optimal annotation information corresponding to the original image to updating the parameter information of the third model is completed by the algorithm, which reduces the errors that may be introduced in the manual annotation process and improves the accuracy and consistency of the labeled data.
[0087] An embodiment of the present application provides an automated updating method, which includes: an automated updating device obtains M first images, and uses a first model to perform text extraction on the M first images to obtain a first text set; wherein the first model is used to extract text features corresponding to the first images, and the first text set includes M keywords, where M is a positive integer; based on the second model and the first text set, N original images are annotated to obtain N annotated original images; wherein the M first images include partial images of the N original images, the second model is used to perform annotate processing on the original images, and the N annotated original images include N first annotation information, and the first annotation information includes optimal annotation information corresponding to the N original images, where N is a positive integer; based on the N annotated original images, parameter information of a third model is updated; wherein the third model is used to perform detection processing on target objects in the images. It can be seen that the automatic updating device can use the first model to extract text from M first pictures to obtain a first text set, and then can annotate N original pictures based on the second model and the first text set to obtain N annotated original pictures, that is, original pictures containing optimal annotation information. The present application can realize the automatic annotation process of original pictures, which not only greatly improves the annotation efficiency, but also improves the annotation accuracy. Furthermore, the parameter information of the third model can be updated based on the N annotated original pictures, so that the third model can learn more accurate and complete information, thereby improving the prediction performance and accuracy of the third model.
[0088] Embodiment 2
[0089] Based on the above embodiments, another embodiment of the present application provides an automated update method and proposes a model self-evolution process framework. Figure 5 Schematic diagram of the model self-evolution process framework proposed in the embodiment of this application Figure 1 ,like Figure 5As shown in the figure, it covers two key processes: automatic prompt design and model automatic update. In the automatic prompt design part, the automatic update device selects a small number of screenshots (first pictures) from the target to be labeled, and inputs them into the target noun update framework (first model) to obtain the phrase that best fits the target (first text set). This step is to ensure that the generated phrase is consistent with the image content, thereby improving the accuracy and quality of the annotation. Subsequently, by inputting the target phrase (first text set) and the image (N original pictures) into the automatic annotation (second model) process, each target in the data set can be automatically annotated to generate the final target annotation box (the original picture after annotation). This process not only greatly improves the efficiency of annotation, but also reduces the possibility of human error. Finally, the obtained target annotation box (the original picture after annotation) can be sent to the small model (third model) for training to guide its continuous iteration and update, thereby improving the performance and accuracy of the model. The key to this process is to achieve high efficiency and accuracy of annotation through automation technology, thereby providing strong support for the evolution of the model.
[0090] It should be noted that, in the embodiments of the present application, the target noun update model may include the following two models, namely, a Tag2Text model and an N-gram model.
[0091] Text=Tag2Text(Img) (3)
[0092] NounPhrase=N-gram(Text) (4)
[0093] It should be noted that, in the embodiments of the present application, Figure 6 This is a schematic diagram of the target noun update model process proposed in the embodiment of the present application, such as Figure 6As shown, the automatic updating device can input the intercepted key area image (first picture) into the Tag2Text visual language model to achieve an accurate description of the image content (first information). In this process, the image tag is used as auxiliary information to better guide the generation of natural language descriptions and enhance the relevance and accuracy of the description. At the same time, the N-gram text analysis algorithm is used to help capture the local structure and semantic information in the text, so as to more accurately extract the key noun phrases (first keyword set) composed of articles, adjectives and nouns in the description. After identifying all noun phrases, the top ten with the highest frequency of occurrence are selected as the target phrases (second keyword set) by frequency statistics, and then the phrases (second keyword set) and the pictures (first pictures) are calculated by the CLIP algorithm (first preset algorithm model) for similarity, and the target word with the highest score is selected as the optimal target phrase (first text set), so as to ensure that the generated description is closer to the image content and more in line with the language mode understood by the algorithm.
[0094] Exemplarily, in an embodiment of the present application, the automated updating device may input a captured image of a safety helmet into a Tag2Text model to generate text description information corresponding to the image in the region, "a man with a yellow safety helmet on his head". The text description information may then be input into an N-gram model, and key noun phrases with articles and adjectives may be extracted from the text description information, thereby generating a first keyword set corresponding to the image. For example, the first keyword set may include keywords such as "man", "yellow safety helmet", and "head".
[0095] Exemplarily, in an embodiment of the present application, the automated updating device may count the frequency of occurrence of keywords in the first keyword set, generate a second keyword set based on the top ten keywords with the highest frequency of occurrence in the first keyword set, and then input the second keyword set and the first picture into a first preset algorithm model to obtain a similarity score value between the keywords in the second keyword set and the first picture, thereby selecting a keyword with the largest similarity score value with the first picture, and generating a first text set based on the keyword with the largest similarity score value.
[0096] That is to say, in an embodiment of the present application, the automated updating device can utilize the first model to perform text extraction on M first images, thereby obtaining keyword phrases that best fit the first images, thereby ensuring that the generated keywords are consistent with the image content, and further improving the accuracy and quality of annotation.
[0097] It should be noted that, in the embodiments of the present application, Figure 7 This is a schematic diagram of the image automatic annotation model proposed in the embodiment of the present application, such as Figure 7As shown, the automatic updating device can first input the image (original image) and the target noun (first text set) into the open vocabulary detector (YOLO-World) to generate a pseudo target box (second annotation information) for the given object noun, thereby forming a coarse area text suggestion; then, use the pre-trained CLIP (first preset algorithm model) to re-store and reclassify the target box to clear and filter out the noise of the original pseudo target box, and finally through the double verification of the two algorithms, further correct and screen the marked box to obtain the final annotation box (first annotation information).
[0098] It should be noted that, in the embodiment of the present application, after obtaining the object noun set T (first text set) in the first step, the automatic updating device can first use the pre-trained open vocabulary detector, namely YOLO-World, to generate a pseudo target box {Bi} (second annotation information) and a corresponding confidence score {ci}; wherein the object noun set T is shown in the following formula (5).
[0099] T={t i} k (5)
[0100] Among them, t i represents the number of generated noun phrases, and k represents the category.
[0101] It should be noted that, in the embodiment of the present application, the rough region-text pair initially obtained by the detector (YOLO-World) is as shown in the following formula (6).
[0102]
[0103] Among them, I is the image (original image), and the corresponding noun set is T. Represents a thick region-text pair.
[0104] It should be noted that in the embodiments of the present application, since there are a lot of noise and repeated frames in the initially obtained region-text pairs, the CLIP algorithm needs to be added for secondary screening and filtering. The CLIP algorithm maps related image and text pairs to adjacent positions in space and maps irrelevant image and text pairs to distant positions through a contrastive learning method. This contrastive learning method enables the model to learn the semantic association between images and texts, thereby having better generalization capabilities when performing various tasks.
[0105] It should be noted that, in the embodiment of the present application, the image I (original image) and its corresponding text T (first text set) are first input into the CLIP algorithm (first preset algorithm model) to calculate the image-text similarity score s img(fourth score value); According to the pseudo label (fourth keyword) obtained from the region box {Bi} (second annotation information), the corresponding region image (second picture) is cut out from the input image (original image), and these cropped images (second pictures) and their corresponding texts (fourth keyword) are input into the CLIP model (first preset algorithm model) to calculate the region-text similarity score {S r}(second fraction value).
[0106] It should be noted that, in the embodiment of the present application, the region-text similarity score {S r The calculation formula of} is shown in the following formula (7).
[0107]
[0108] Here, N refers to the number of results generated by the CLIP model.
[0109] It should be noted that, in the embodiment of the present application, by inputting each cropped image (second picture) together with all nouns (first text set) and assigning them to the noun with the greatest similarity, the answer to re-labeling the text is obtained to correct the wrongly labeled text obtained by the previous pseudo-label (fourth keyword), and then the region-text similarity score (second score value) can be multiplied by the confidence score {ci} of the previous pseudo-label to perform re-scoring, and the result is (first score value), the calculation formula is as shown in the above formula (1), and then the region-text pairs can be grouped according to the text category, and NMS (the second preset algorithm model) is executed and the confidence score threshold is set to screen the target box (the third annotation information) to eliminate duplicate prediction results. Finally, as shown in the above formula (2), the automatic updating device can calculate the image-level region-text score by averaging the retained region-text scores (the third score value), multiply the obtained score result (the third score value) by the previously obtained image-text similarity score (the fourth score value), and then take the square root to obtain the final image-text score (the fifth score value), and retain the images and their corresponding texts (keywords corresponding to the sixth score value) with scores higher than the pre-set threshold (the second preset threshold) as the final annotation results.
[0110] It should be noted that in the embodiments of the present application, the selection of the second preset threshold can be adjusted according to the specific scenario. For example, in an outdoor open-air venue, the threshold can be set between 0.3 and 0.5; and in an indoor scene, the threshold can be set between 0.1 and 0.2. The present application does not specifically limit the size of the second preset threshold.
[0111] That is to say, in an embodiment of the present application, the automated updating device can screen the fifth score value based on the second preset threshold value, and can determine the seventh score value of the fifth score value that is less than the second preset threshold value; then the annotation information corresponding to the seventh score value can be filtered, and the sixth score value of the fifth score value that is greater than or equal to the second preset threshold value can be retained, and then N first annotation information can be determined based on the keyword corresponding to the sixth score value, that is, the annotation information higher than the second preset threshold value can be retained as the final annotation result.
[0112] It should be noted that in an embodiment of the present application, the automatic updating device can use the YOLO-World and CLIP algorithm models to detect and calculate the original image, and then use the NMS algorithm and set the threshold to obtain the optimal target annotation (first annotation information), thereby significantly improving the accuracy and reliability of the annotation results.
[0113] It should be noted that, in an embodiment of the present application, the automatic updating device can use the Tag2Text model and the N-gram model to perform text extraction on the M first pictures, so as to obtain the keyword phrase that best fits the first picture, and then the keyword phrase that best fits the M first pictures (the first text set) and the N original pictures can be input into the YOLO-World model to generate pseudo-annotation information, pseudo-labels and confidence score values corresponding to the N original pictures, and the original pictures are intercepted based on the pseudo-labels to obtain the second pictures, and then the first score value can be obtained based on the second picture, the pseudo-label and the confidence score value, so that the N first annotation information corresponding to the N original pictures can be obtained based on the first score value, that is, the present application can automatically obtain the optimal annotation information corresponding to the original pictures, and high-precision annotations can be obtained without manual supervision, thereby greatly saving the time and labor costs of annotation.
[0114] It should be noted that, in the embodiments of the present application, Figure 8 A schematic diagram of the small model update process proposed in the embodiment of the present application is shown in FIG. Figure 8 As shown, first, the latest annotation label (the keyword corresponding to the sixth score value) obtained from the aforementioned model is sent to the YOLOv5 small model (the third model) together with the corresponding image (the original image after annotation). These labels and images can be used as input to guide and update its internal parameters so as to achieve real-time detection of objects that need to be detected in real scenes. The model (the third model) will be fine-tuned according to the latest annotation information to better adapt to new scenarios and requirements. Through continuous training and optimization with the latest data, the YOLOv5 small model can gradually improve its detection accuracy and description capabilities for various objects.
[0115] Furthermore, in the embodiments of the present application, Fig. 9 Schematic diagram of the model self-evolution process framework proposed in the embodiment of this application Figure 2 ,like Fig. 9As shown in the figure, the model self-evolution process framework includes three models, namely, the automatic design prompt process, the image automatic annotation model and the model automatic update; for the safety helmet detection in the outdoor construction scene, the corresponding overall process framework is as follows: Step 1: In the automatic design prompt process, the target noun update model is the most important part. This model is composed of the Tag2Text model and the n-gram algorithm model. First, by manually intercepting the safety helmet target as the key area (the first picture), the picture of the area is input into the Tag2Text model to generate a picture description of the safety helmet: "a man wearing a yellow hard hat on his head" (the first information), so as to obtain the preliminary description result. Next, the N-gram algorithm is used to extract key noun phrases with articles and adjectives from multiple descriptions (the first keyword set). In this example, three key phrases "a man", "a yellow hard hat" and "head" are extracted, and these phrases are added to the vocabulary. The frequency statistics are performed together with all the description phrases to select high-frequency words. Subsequently, the top ten high-frequency phrases (the second keyword set) are input into the CLIP algorithm (the first preset algorithm model), and the similarity is calculated with the picture (the first picture) respectively. Finally, the phrase "hard hat" with the highest score can be selected as the optimal prompt (the keyword with the largest similarity score value with the first picture); Step 2: The prompt obtained in step 1 is used as the inference prompt and input into the image automatic annotation model (the second model) together with the original picture. The model is composed of YOLO-World and CLIP algorithm models. The prompt is first input into YOLO-World together with the original image to obtain a pseudo label (the fourth keyword) and the corresponding confidence score.Since the pseudo-label (the fourth keyword) has errors and repeated annotations, the CLIP algorithm is used for secondary calculation and screening to eliminate errors. Therefore, the original image and the helmet key area image (the second image) obtained from the pseudo-label can be input into the CLIP algorithm to obtain the corresponding image-text similarity scores respectively. Then, according to different categories of image-text pairs, the image-text similarity score (the second score value) of the area image can be multiplied and root-calculated by the confidence of the pseudo-label, and the target box (the annotation information corresponding to the third score value) corresponding to the score (the third score value) below the threshold (the first preset threshold) is filtered out, and the duplicate frames are filtered out using NMS to retain the most accurate results. Finally, the similarity score (the fourth score value) of the original image can be multiplied and root-calculated by the similarity score (the third score value) of the area image, and the similarity score (the third score value) above the threshold (the second preset threshold) is retained. box as the final annotation result; wherein, the selection of the second preset threshold value can be adjusted according to the specific scene. For outdoor construction scenes, 0.3 is the optimal threshold value. In outdoor open-air venues, the threshold value can be set between 0.3 and 0.5; and in indoor scenes, the threshold value can be set between 0.1 and 0.2. In this way, it can flexibly adapt to the detection needs in different environments to ensure the accuracy and reliability of the annotation results; Step 3: In the model automatic update framework, the annotation results obtained in the above steps are input into the YOLOv5 small model (the third model) for training, and the advantages of YOLOv5 such as fast speed and high accuracy are used to adapt to various monitoring scenarios and achieve the purpose of real-time target detection. In order to achieve generalization in the future, it is only necessary to perform the first two steps on the data of the new scene for automatic annotation, and then continue to input YOLOv5 for training.
[0116] In summary, the automatic updating device can use the Tag2Text model and the N-gram model to perform text extraction on the M first images, so as to obtain the keyword phrase that best fits the first image, and then the keyword phrase that best fits the M first images (the first text set) and the N original images can be input into the YOLO-World model to generate pseudo-annotation information, pseudo-labels, and confidence score values corresponding to the N original images, and the original images can be intercepted based on the pseudo-labels to obtain the second images, and then the first score value can be obtained based on the second image, the pseudo-label, and the confidence score value, so as to obtain the N first annotation information corresponding to the N original images based on the first score value, that is, the present application can automatically obtain the most appropriate keyword phrases corresponding to the original images. The optimal annotation information can be obtained without manual supervision, which greatly saves the time and labor cost of annotation. The parameter information of the third model can be updated based on the annotated original image, which avoids the problems of difficult unification of traditional data annotation standards, small model annotation and semi-automatic annotation still requiring manual calibration, while ensuring the detection speed. The prediction accuracy and generalization in complex scenarios are improved, that is, the entire annotation process of the embodiment of the present application is fully automated without manual intervention. The entire process from automatically obtaining the optimal annotation information corresponding to the original image to updating the parameter information of the third model is completed by the algorithm, which reduces the errors that may be introduced in the manual annotation process and improves the accuracy and consistency of the labeled data.
[0117] An embodiment of the present application provides an automated updating method, which includes: an automated updating device obtains M first images, and uses a first model to perform text extraction on the M first images to obtain a first text set; wherein the first model is used to extract text features corresponding to the first images, and the first text set includes M keywords, where M is a positive integer; based on the second model and the first text set, N original images are annotated to obtain N annotated original images; wherein the M first images include partial images of the N original images, the second model is used to perform annotate processing on the original images, and the N annotated original images include N first annotation information, and the first annotation information includes optimal annotation information corresponding to the N original images, where N is a positive integer; based on the N annotated original images, parameter information of a third model is updated; wherein the third model is used to perform detection processing on target objects in the images. It can be seen that the automatic updating device can use the first model to extract text from M first pictures to obtain a first text set, and then can annotate N original pictures based on the second model and the first text set to obtain N annotated original pictures, that is, original pictures containing optimal annotation information. The present application can realize the automatic annotation process of original pictures, which not only greatly improves the annotation efficiency, but also improves the annotation accuracy. Furthermore, the parameter information of the third model can be updated based on the N annotated original pictures, so that the third model can learn more accurate and complete information, thereby improving the prediction performance and accuracy of the third model.
[0118] Embodiment 3
[0119] Based on the above embodiments, the present application provides an automatic updating device. Fig.10 Schematic diagram of the structure of the automatic update device Figure 1 ,like Fig.10 As shown, the device 10 includes: an acquisition unit 11, an extraction unit 12, a labeling unit 13 and an updating unit 14; wherein,
[0120] The acquisition unit 11 is used to acquire M first pictures;
[0121] The extraction unit 12 is used to extract text from the M first pictures using a first model to obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, and the first text set includes M keywords, where M is a positive integer;
[0122] The labeling unit 13 is used to label N original pictures based on the second model and the first text set to obtain N labeled original pictures; wherein the M first pictures include partial pictures of the N original pictures, the second model is used to label the original pictures, the N labeled original pictures include N first labeling information, the first labeling information includes the optimal labeling information corresponding to the N original pictures, and N is a positive integer;
[0123] The updating unit 14 is used to update the parameter information of the third model based on the N labeled original pictures; wherein the third model is used to detect the target object in the picture.
[0124] In the embodiments of the present application, further, Fig.11 Schematic diagram of the structure of the automatic update device Figure 2 ,like Fig.11 As shown, the automatic updating device 10 proposed in the embodiment of the present application may also include a processor 15 and a memory 16 storing executable instructions of the processor 15. Furthermore, the device 10 may also include a communication interface 17 and a bus 18 for connecting the processor 15, the memory 16 and the communication interface 17.
[0125] In the embodiment of the present application, the processor 15 can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic device used to implement the function of the processor can also be other, and the embodiment of the present application is not specifically limited. The device 10 can also include a memory 16, which can be connected to the processor 15, wherein the memory 16 is used to store executable program code, the program code includes computer operation instructions, and the memory 16 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.
[0126] In the embodiment of the present application, the bus 18 is used to connect the communication interface 17, the processor 15 and the memory 16, and the mutual communication between these devices.
[0127] In the embodiment of the present application, the memory 16 is used to store instructions and data.
[0128] Further, in an embodiment of the present application, the above-mentioned processor 15 is used to obtain M first pictures, and use the first model to extract text from the M first pictures to obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, and the first text set includes M keywords, and M is a positive integer; based on the second model and the first text set, N original pictures are annotated to obtain N annotated original pictures; wherein the M first pictures include partial pictures of the N original pictures, and the second model is used to annotate the original pictures, and the N annotated original pictures include N first annotation information, and the first annotation information includes the optimal annotation information corresponding to the N original pictures, and N is a positive integer; based on the N annotated original pictures, the parameter information of the third model is updated; wherein the third model is used to detect the target object of the picture.
[0129] In practical applications, the memory 16 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 15.
[0130] An embodiment of the present application provides an automatic updating device, which obtains M first images, uses a first model to extract text from the M first images, and obtains a first text set; wherein the first model is used to extract text features corresponding to the first images, and the first text set includes M keywords, where M is a positive integer; based on the second model and the first text set, N original images are annotated to obtain N annotated original images; wherein the M first images include partial images of the N original images, the second model is used to annotate the original images, and the N annotated original images include N first annotation information, and the first annotation information includes optimal annotation information corresponding to the N original images, where N is a positive integer; based on the N annotated original images, parameter information of a third model is updated; wherein the third model is used to detect target objects in the images. It can be seen that the automatic updating device can use the first model to extract text from M first pictures to obtain a first text set, and then can annotate N original pictures based on the second model and the first text set to obtain N annotated original pictures, that is, original pictures containing optimal annotation information. The present application can realize the automatic annotation process of original pictures, which not only greatly improves the annotation efficiency, but also improves the annotation accuracy. Furthermore, the parameter information of the third model can be updated based on the N annotated original pictures, so that the third model can learn more accurate and complete information, thereby improving the prediction performance and accuracy of the third model.
[0131] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon, which implements the automatic updating method as described above when executed by a processor.
[0132] Specifically, the program instructions corresponding to an automatic updating method in this embodiment may be stored on a storage medium such as a CD, a hard disk, or a USB flash drive. When the program instructions corresponding to an automatic updating method in the storage medium are read or executed by an electronic device, the following steps are included:
[0133] Obtain M first pictures, and use a first model to perform text extraction on the M first pictures to obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, and the first text set includes M keywords, where M is a positive integer;
[0134] Based on the second model and the first text set, N original images are annotated to obtain N annotated original images; wherein the M first images include partial images of the N original images, the second model is used to annotate the original images, the N annotated original images include N first annotation information, the first annotation information includes optimal annotation information corresponding to the N original images, and N is a positive integer;
[0135] The parameter information of the third model is updated based on the N annotated original images; wherein the third model is used to detect the target object in the image.
[0136] The embodiment of the present application further provides a computer program product, including a computer program, and the computer program can be executed by the processor 15 of the automatic updating device 10 to complete the steps of any of the aforementioned methods.
[0137] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0138] The present application is described with reference to implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0139] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing the steps in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0141] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. An automated updating method, characterized in that: The method comprises: Obtain M first pictures, and use a first model to perform text extraction on the M first pictures to obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, and the first text set includes M keywords, where M is a positive integer; Based on the second model and the first text set, N original images are annotated to obtain N annotated original images; wherein the M first images include partial images of the N original images, the second model is used to annotate the original images, the N annotated original images include N first annotation information, the first annotation information includes optimal annotation information corresponding to the N original images, and N is a positive integer; The parameter information of the third model is updated based on the N annotated original images; wherein the third model is used to detect the target object in the image.
2. The method according to claim 1, characterized in that The first model includes a Tag2Text model and an N-gram model, and the first model is used to extract text from the M first pictures to obtain a first text set, including: Input the M first images into the Tag2Text model to generate first information corresponding to the M first images; the first information includes text description information corresponding to the first images; Inputting the first information into the N-gram model to generate M first keyword sets corresponding to the M first images; wherein each of the first keyword sets includes L keywords, L is a positive integer, and the M keywords include target keywords of the L keywords in each of the first keyword sets; The first text set is generated based on the M first keyword sets, the M first pictures and a first preset algorithm model; wherein the first preset algorithm model is used to calculate the similarity between the M first pictures and the keywords.
3. The method according to claim 2, characterized in that The generating the first text set based on the M first keyword sets, the M first pictures, and the first preset algorithm model includes: Counting the occurrence frequencies of the keywords in the M first keyword sets to obtain statistical results; Acquire M second keyword sets based on the statistical results; wherein the second keyword set includes some keywords in the first keyword set; Determine a first score value based on the first preset algorithm model, the M second keyword sets, and the first picture; wherein the first score value includes similarity score values between keywords in the M second keyword sets and the M first pictures; M third keyword sets are determined based on the first score value, and the first text set is generated based on the M third keyword sets; wherein the third keyword set includes M keywords with the largest similarity score values with the M first pictures.
4. The method according to claim 1, characterized in that: The second model includes a YOLO-World model, and the tagging process is performed on the N original images based on the second model and the first text set to obtain the N labeled original images, including: Input the N original images and the first text set into the YOLO-World model to generate second annotation information, fourth keywords, and confidence score values corresponding to the N original images; wherein the second annotation information includes pseudo-annotation information corresponding to the N original images, the fourth keyword represents the pseudo-labels corresponding to the N original images, and the fourth keyword is obtained based on the first text set; Generate a second picture based on the fourth keyword and the original picture; wherein the second picture includes a cropped picture corresponding to the original picture; Generate a first scoring value based on the second picture, the fourth keyword and the confidence score value; wherein the first scoring value is used to filter the second annotation information corresponding to the fourth keyword; N first annotation information corresponding to the N original pictures are acquired based on the first scoring values, and the N annotated original pictures are determined based on the first annotation information.
5. The method according to claim 4, characterized in that The second model also includes a first preset algorithm model, and the generating of the first rating value based on the second picture, the fourth keyword and the confidence score value includes: Inputting the second picture and the fourth keyword into the first preset algorithm model to generate a second score value; wherein the second score value includes a similarity score value between the second picture and the fourth keyword; The first rating value is determined based on the second score value and the confidence score value.
6. The method according to claim 4, characterized in that The obtaining, based on the first scoring value, N first annotation information corresponding to the N original images includes: Determine third annotation information based on the first scoring value and a first preset threshold; wherein the third annotation information includes annotation information filtered by the second annotation information; The third annotation information is screened based on a second preset algorithm model to obtain fourth annotation information; wherein the second preset algorithm model at least includes a non-maximum suppression NMS algorithm model; Determine a fifth keyword and a third picture corresponding to the fourth annotation information, and generate a third score value based on the fifth keyword and the third picture; wherein the third score value includes a similarity score value between the third picture and the fifth keyword; N first annotation information corresponding to the N original images are determined based on the third score value and the fourth score value; wherein the fourth score value includes a similarity score value between the original image and the first text set.
7. The method according to claim 6, characterized in that The determining the third annotation information based on the first scoring value and the first preset threshold includes: Determine a second scoring value among the first scoring values that is greater than or equal to the first preset threshold; wherein the first scoring value includes the second scoring value; The third annotation information is determined based on the keyword corresponding to the second scoring value.
8. The method according to claim 7, characterized in that The method further comprises: Determine a third scoring value among the first scoring values that is less than the first preset threshold; The annotation information corresponding to the third scoring value is filtered; wherein the first scoring value includes the third scoring value.
9. The method according to claim 6, characterized in that The determining, based on the third score value and the fourth score value, N first annotation information corresponding to the N original pictures includes: Generate a fifth score value based on the third score value and the fourth score value; wherein the fifth score value is obtained by performing a preset operation based on the third score value and the fourth score value; The N first annotation information are determined based on the fifth score value and a second preset threshold.
10. The method according to claim 9, characterized in that The determining the N first annotation information based on the fifth score value and the second preset threshold includes: Determine a sixth score value among the fifth score values that is greater than or equal to the second preset threshold; wherein the fifth score value includes the sixth score value; The N first annotation information are determined based on the keyword corresponding to the sixth score value.
11. The method according to claim 10, characterized in that The method further comprises: Determine a seventh score value among the fifth score values that is less than the second preset threshold; The annotation information corresponding to the seventh score value is filtered; wherein the fifth score value includes the seventh score value.
12. An automatic updating device, characterized in that: The automatic updating device comprises: an acquisition unit, an extraction unit, a marking unit and an updating unit; wherein, The acquisition unit is used to acquire M first pictures; The extraction unit is used to extract text from the M first pictures using a first model to obtain a first text set; wherein the first model is used to extract text features corresponding to the first pictures, and the first text set includes M keywords, where M is a positive integer; The labeling unit is used to label N original pictures based on the second model and the first text set to obtain N labeled original pictures; wherein the M first pictures include partial pictures of the N original pictures, the second model is used to label the original pictures, the N labeled original pictures include N first labeling information, the first labeling information includes the optimal labeling information corresponding to the N original pictures, and N is a positive integer; The updating unit is used to update the parameter information of the third model based on the N labeled original pictures; wherein the third model is used to detect the target object in the picture.
13. An automatic updating device, characterized in that: The automatic updating device comprises: a processor and a memory; wherein, The memory is used to store a computer program that can be run on the processor; The processor is configured to execute the method according to any one of claims 1 to 11 when running the computer program.
14. A computer-readable storage medium, characterized in that: The storage medium stores computer program codes, and when the computer program codes are executed by a computer, the method according to any one of claims 1 to 11 is executed.
15. A computer program product comprising a computer program, characterized in that The computer program implements the method according to any one of claims 1-11 when executed by a processor.
