Data processing method and device, equipment and storage medium
By combining general and specialized models in the data annotation method, the problems of low accuracy and low efficiency in existing technologies have been solved, achieving efficient and high-precision data annotation, reducing reliance on massive amounts of self-labeled data and the cost of manual verification.
Patent Information
- Application Number
- CN202611318474.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-24
AI Technical Summary
Existing data annotation schemes suffer from low accuracy, high cost, and low efficiency. In particular, they have low accuracy in identifying rare samples and long-tail attributes in monitoring scenarios, and rely on massive amounts of built-in labeled data, resulting in high costs for manual verification and error correction.
A method combining general and specialized models is used to annotate images. The general model is used for annotating general targets, while the specialized model is used for annotating specific targets. The final target annotation result is generated by fusing the results of the two models.
It improves the accuracy and efficiency of data annotation, reduces reliance on massive amounts of built-in labeled data, avoids cumbersome joint fine-tuning training processes, and reduces the workload and cost of manual verification and error correction.
Smart Images

Figure CN123160993A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] With the continuous expansion of application demands in surveillance scenarios, algorithms need to process and retrieve massive amounts of targets with diverse attributes, which greatly increases the demand for high-quality labeled training data. However, existing data labeling schemes have significant drawbacks: First, relying solely on large multimodal models for pre-labeling can easily lead to illusions, especially with low accuracy in identifying rare samples and long-tail attributes in surveillance scenarios, resulting in a sharp increase in mislabeling rates and extremely high costs for subsequent manual verification and correction. Second, existing methods are highly dependent on labeled data, requiring the preparation of massive amounts of pre-labeled image data, which is labor-intensive and has high overall labeling costs. Finally, the training process of existing related models often involves multiple complex stages such as target detector training and joint fine-tuning, resulting in cumbersome parameter tuning and difficulties in engineering implementation. Therefore, the efficiency and accuracy of data labeling in related technologies are both low. Summary of the Invention
[0003] This application provides a data processing method, apparatus, electronic device, and computer-readable storage medium that can improve data annotation accuracy and annotation efficiency.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a data processing method, including: Using a general model, annotation processing is performed on the image to be processed to obtain a general annotation result, which includes the first target location and a general attribute label; The image to be processed is labeled using a dedicated model to obtain a dedicated labeling result, which includes the second target location and a dedicated attribute label. The general model is used to label general targets at the first target location in the image to be processed, and the special model is used to label specific targets at the second target location in the image to be processed; for the same target, the labeling accuracy of the special attribute label is higher than that of the general attribute label. Based on the general annotation results and the specific annotation results, the target annotation results of the image to be processed are generated.
[0005] This application provides a data processing apparatus, including: The first annotation module is used to perform annotation processing on the image to be processed through a general model to obtain a general annotation result, which includes the first target location and a general attribute label. The second annotation module is used to perform annotation processing on the image to be processed using a dedicated model to obtain a dedicated annotation result, which includes the second target location and a dedicated attribute label. The general model is used to label general targets at the first target location in the image to be processed, and the special model is used to label specific targets at the second target location in the image to be processed; for the same target, the labeling accuracy of the special attribute label is higher than that of the general attribute label. The generation module is used to generate target annotation results for the image to be processed based on the general annotation results and the special annotation results.
[0006] This application provides an electronic device, including: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method provided in the embodiments of this application.
[0007] This application provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the data processing method provided in this application.
[0008] The embodiments of this application have the following beneficial effects: A general model is used to perform annotation processing on the image to be processed, resulting in a general annotation result containing the location of the first target and general attribute labels, thus achieving annotation of general targets. Simultaneously, a specialized model is used to perform annotation processing, resulting in a specialized annotation result containing the location of the second target and specialized attribute labels, thus achieving annotation of specific targets. Since the annotation accuracy of specialized attribute labels is higher than that of general attribute labels for the same target, this effectively overcomes the illusion phenomenon that easily occurs when relying solely on a single multimodal large model for pre-annotation, as well as the shortcomings of low accuracy in identifying rare samples and long-tail attributes in monitoring scenes. Finally, by generating target annotation results for the image to be processed based on the general and specialized annotation results, the breadth advantage of the general model in handling massive and diverse attributes is cleverly combined with the high accuracy advantage of the specialized model on specific targets. This eliminates the need for massive amounts of pre-prepared labeled data and avoids the cumbersome and complex joint fine-tuning training process, significantly reducing the workload and cost of subsequent manual verification and error correction, thereby achieving a data annotation effect that balances high efficiency and high accuracy. Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the architecture of the data processing system 100 provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application; Figure 3 This is a flowchart illustrating the data processing method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the data processing method provided in the embodiments of this application. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0012] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0014] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0015] 1) Client, also known as user terminal, refers to the program that provides local services to users in contrast to the server. Except for some applications that can only run locally, it is generally installed on the terminal and needs to work with the server. That is, there needs to be a corresponding server and service program on the network to provide the corresponding services. Thus, a specific communication connection needs to be established between the client and the server to ensure the normal operation of the application.
[0016] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the data processing system 100 provided in the embodiments of this application. The terminal (terminal 400 is shown as an example) is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two, and data transmission is achieved using wireless or wired links.
[0017] In some embodiments, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminal 400 can be a smartphone, tablet, laptop, desktop computer, set-top box, smart voice interaction device, smart home appliance, virtual reality device, vehicle terminal, aircraft, portable music player, personal digital assistant, dedicated messaging device, portable gaming device, smart speaker, and smartwatch, but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.
[0018] Next, we will discuss an electronic device that implements the data processing method provided in the embodiments of this application. See also... Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device can be a server or a terminal. The electronic device is used as an example. Figure 1 Taking the server shown as an example, Figure 2 The illustrated electronic device includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 440.
[0019] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0020] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.
[0021] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.
[0022] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0023] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2 A data processing device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a first annotation module 4551, a second annotation module 4552, and a generation module 4553. These modules are logically linked and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.
[0024] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the data processing apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data processing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0025] Based on the foregoing description of the data processing system and electronic device provided in the embodiments of this application, the data processing method provided in the embodiments of this application will be described below. In actual implementation, the data processing method provided in the embodiments of this application can be implemented by a terminal or a server alone, or by a terminal and a server working together, so that... Figure 1 The following description uses the example of server 200 executing the data processing method provided in this embodiment of the application independently. See also... Figure 3 , Figure 3 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Next, it will be discussed in conjunction with... Figure 3 The steps shown are explained.
[0026] Step 101: Perform annotation processing on the image to be processed using the general model to obtain general annotation results, which include the first target location and general attribute labels.
[0027] Here, the general model refers to a pre-trained deep learning network with strong zero-shot or few-shot generalization capabilities. It is typically trained on massive amounts of multi-domain data and can widely identify and locate a large number of common basic targets and their basic features in images. The first target location refers to the positional data output by the general model (such as a multimodal large model) after recognizing and pre-annotating the image to be processed, representing the spatial distribution and geometric span of the general target in the two-dimensional image pixel space. In specific implementations, this positional information is usually presented in the form of the coordinates of the detection box (i.e., the first detection box) that defines the outer contour of the target; for example, in the image processing of a traffic monitoring scene, if the general model recognizes a vehicle in the image, its output first target location can be a diagonal coordinate vector [x...] of the bounding box. min y min x max y maxFor example, the coordinate values [120, 150, 320, 280] represent a typical first target location, indicating the specific pixel points of the target in the upper left and lower right corners of the image to be processed, thus defining the area range of the target.
[0028] General attribute labels refer to the basic semantic classification or coarse-grained feature description text output by a general-purpose model based on its extensive pre-trained knowledge for the located target region. Because general-purpose models focus on ensuring the breadth of target detection, these labels are typically used to indicate broad categories of commonly seen targets or basic explicit attributes, without involving fine-grained or long-tail features specific to vertical domains. For example, for a target identified in surveillance footage, the general attribute label output by the general-purpose model might be a broad category description with high generalization, such as "non-motorized vehicle," "pedestrian," "dark-colored clothing," or "handcart." In contrast, if the target is detected by a finely tuned specialized model, it might output a more precise "a specific brand and model of two-wheeled electric scooter," the latter being a specialized attribute label.
[0029] In some embodiments, the image to be processed can be obtained in the following ways: by extracting frames from a video stream collected in real time by a front-end camera device deployed in a specific application scenario (such as a traffic intersection, a security monitoring area, etc.) at a certain sampling rate, or by directly reading raw, unlabeled image data in batches from a local storage server or a cloud multimedia database. This application does not limit the scope of this embodiment.
[0030] In some embodiments, the annotation processing of the image to be processed can be achieved as follows: the image to be processed and pre-designed task prompts are input into a general model, where the model's internal visual encoder (such as Vision Transformer) extracts the deep visual features of the image and combines them with text features to perform multimodal interaction mapping, thereby decoding and outputting prediction information for the image content. For example, open-source multimodal large models such as Qwen-VL can be used. After receiving the input, the model will output formatted as [x min y min x max y max The bounding box coordinate sequence is used as the first target location, and the highest-scoring category string sequence (such as "pedestrian", "vehicle", "color" etc.) is output as the general attribute label.
[0031] Step 102: Perform annotation processing on the image to be processed using a dedicated model to obtain dedicated annotation results. The dedicated annotation results include the second target location and dedicated attribute labels. The general model is used to annotate general targets at the first target location in the image to be processed, and the dedicated model is used to annotate specific targets at the second target location in the image to be processed. For the same target, the annotation accuracy of dedicated attribute labels is higher than that of general attribute labels.
[0032] Here, a specialized model refers to a deep learning network that is specifically trained or fine-tuned using a dedicated, high-quality private dataset (such as long-tail attribute data in a specific monitoring scenario) for a specific vertical application domain or subdivided task. Its feature representation ability and classification accuracy on a pre-set specific target are significantly higher than those of a general-purpose model.
[0033] The second target location refers to the positional data output by a specialized model (such as a detection model fine-tuned for a specific vertical domain) after performing recognition and annotation processing on the image to be processed. This data characterizes the geometric distribution and region boundary of a specific target in the two-dimensional image pixel space. In practice, this location is usually represented by the coordinates of a detection box (i.e., the second detection box). Because specialized models have higher positioning accuracy in specific domains, this location often closely matches the true physical contour of the target entity than the boundary output by a general model. For example, in a security monitoring scenario in an industrial plant, if a specialized model identifies an unauthorized work tool in the image, its output second target location could be the coordinate vector [x] of the bounding rectangle. min y min x max y max For example, the coordinate values [125, 155, 315, 275] may have spatial overlap with the first target position, but are more accurate in edge fit.
[0034] Specialized attribute labels refer to textual representations output by specialized models trained or fine-tuned on high-quality private datasets specific to a particular domain. These representations describe fine-grained features, specific classifications, or long-tail attributes of a particular target. Unlike general attribute labels, which emphasize breadth, specialized attribute labels focus on the annotation depth and expert-level recognition capabilities within a vertical domain. Their annotation accuracy for the same specific target is significantly higher than that of general attribute labels. For example, for the same visual entity in a surveillance video, if a general model, limited by its generalization features, can only output broad general attribute labels such as "handcart" or "non-motorized vehicle," a specialized model, based on its injected domain prior knowledge, can output fine-grained specialized attribute labels such as "specific brand and model flatbed material cart" or "illegally carrying passengers electric scooter."
[0035] It should be noted that general targets refer to entities that are prevalent and frequently appear in a wide range of image acquisition scenarios (such as routine surveillance scenarios), and possess basic and significant visual semantic features. These targets can typically be directly identified and located by general models (such as multimodal large models) trained on massive amounts of open-source image and text data through zero-shot pre-labeling, reflecting the breadth of the labeling scope of the general model. For example, in images to be processed in urban traffic or security monitoring scenarios, broad categories such as "pedestrians," "motor vehicles," and "non-motor vehicles" all belong to general targets. For these targets, general models can quickly and relatively accurately output basic general attribute labels and target locations.
[0036] Specific targets refer to rare samples, long-tail attribute samples, or entities with fine-grained domain characteristics that are easily confused with regular basic entities in specific vertical application domains. These targets often trigger the illusion of large models, leading to a sharp increase in mislabeling rates. Therefore, high-precision identification and annotation require specialized models (i.e., expert models) trained or fine-tuned using proprietary data or specialized domain knowledge. For example, in a monitoring scenario targeting a specific park, if the business requires identifying "a specific brand and model of flatbed material cart," "a specific model of scooter illegally carrying passengers," or "construction workers carrying special tools," these objects, exceeding the broad recognition range of the basic large model and involving expert-level fine-grained features, fall under the category of specific targets. Specialized models perform better for only a small number of such specific targets or attributes, thus achieving higher annotation accuracy.
[0037] In some embodiments, a dedicated model can be constructed or acquired by: collecting small batches of manually labeled vertical domain image data in specific monitoring scenarios and training it with all parameters based on classic object detection architectures such as YOLO or Faster R-CNN; or, based on existing open-source models, using efficient parameter fine-tuning techniques such as LoRA (Low-Rank Adaptation) or Adapter to freeze most of the backbone network parameters and perform feature injection and optimization only for specific category labels, thereby enabling it to have extremely high professional domain recognition accuracy.
[0038] In some embodiments, the annotation processing of the image to be processed by a dedicated model can be achieved as follows: the image to be processed is input into the feature extraction network of the dedicated model (such as CSPDarknet or ResNet backbone network), feature fusion is performed through a multi-scale feature pyramid, and then the target confidence, class probability, and location regression parameters are output to the detection head. For example, the algorithm can decode and generate a second target location containing [x_center, y_center, width, height] by calculating the offset of the center point of the prior bounding box from the real target and the width and height scaling ratio, and at the same time use the Softmax classifier to output the fine-grained category with the highest probability that exceeds a preset threshold (such as 0.85) as a dedicated attribute label (e.g., accurately identifying "handcart" which the general model may misclassify as "specific model flatbed cart").
[0039] Step 103: Based on the general annotation results and the special annotation results, generate the target annotation results of the image to be processed.
[0040] Here, target labeling results refer to the high-quality, highly consistent final label set obtained by policy-level fusion, conflict resolution, and filtering and deduplication after processing the same image through multiple models. This set is used as the basis for subsequent algorithm training or for direct business applications.
[0041] In some embodiments, the number of first target locations is at least one, and the number of second target locations is at least one. Based on general annotation results and special annotation results, the target annotation results of the image to be processed are generated. This can be achieved by: matching each first target location and each second target location separately to obtain matching results; when there is a matching result indication that the degree of matching between the first target location and the corresponding second target location is greater than the degree of matching threshold, the general annotation results and special annotation results are fused to obtain the target annotation results.
[0042] Here, the degree of matching refers to a quantitative indicator that measures the degree to which the target position output by the general model and the target position output by the special model coincide or are close in spatial geometry; fusion refers to the process of merging, retaining or removing labels with conflicting or complementary information based on a preset priority or confidence strategy after confirming that different models have generated annotation results for the same target.
[0043] In some embodiments, matching is performed on each first target position and each second target position separately. This can be achieved through a bipartite graph matching algorithm for globally optimal allocation. Specifically, all first target positions can form one vertex set, and all second target positions can form another vertex set. A cost matrix is constructed using the matching degree between the two as weights. Subsequently, the Hungarian algorithm is used to solve for the cost matrix, finding the assignment scheme that maximizes the total global matching benefit, thereby obtaining the matching results indicating which first target positions and second target positions belong to the same real target.
[0044] In some embodiments, the first target location is the location of the first detection box, and the second target location is the location of the second detection box. Matching the first target location and each of the second target locations to obtain a matching result can be achieved in the following way: For each second target location, perform the following processing to obtain a matching result between the first target location and the second target location: Based on the location of the first detection box and the location of the second detection box, determine the overlap area between the first detection box and the second detection box; determine the center point of the first detection box as the first center point, and determine the center point of the second detection box as the second center point; based on the first center point and the second center point, determine the center point distance between the first detection box and the second detection box; based on the overlap area and the center point distance, generate a matching result between the first detection box and the second detection box, which is used as the matching result between the first target location and the second target location.
[0045] Here, the overlap area refers to the physical pixel area of the region where two two-dimensional bounding boxes intersect on the spatial plane; the center point distance refers to the Euclidean distance or feature space distance index, which measures the degree of relative deviation between the geometric centers of two detection boxes in the two-dimensional coordinate system.
[0046] In practical implementation, determining the overlapping area based on the positions of the first and second detection boxes, and determining the center point distance based on the first and second center points, can be achieved through projection and distance calculation logic in an analytical geometric coordinate system. First, the geometric coordinates of the upper left and lower right corners of the first and second detection boxes are extracted. By comparing the two sets of extreme coordinates, the boundary coordinates of the intersection rectangle of the two detection boxes are solved. Multiplying the width and height of the intersection rectangle determines the overlapping area. Simultaneously, by averaging the diagonal coordinates of the first and second detection boxes, the two-dimensional coordinates of the first and second center points are calculated. Then, using the norm calculation formula between two points in a two-dimensional plane, the center point distance between the first and second center points is determined.
[0047] In practical implementation, the matching result of the first and second detection boxes is generated based on the overlap area and the distance between their center points. This can be achieved by constructing a comprehensive spatial evaluation function with a distance penalty term. The system uses the overlap area and the area of each of the two detection boxes to calculate the relative intersection ratio, and converts the square of the center point distance into a normalized penalty term about the diagonal length of the minimum bounding rectangle. By subtracting the normalized penalty term from the relative intersection ratio, a comprehensive evaluation score is obtained, which is used as the matching result of the first and second detection boxes.
[0048] For example, assume the position coordinates of the first detection box are... The specific value is The position coordinates of the second detection box are The specific value is The system first calculates the coordinates of the top-left corner of the intersecting rectangles. The coordinates of the lower right corner are Therefore, the width of the intersecting region is... Gao Wei Then, the overlapping area is calculated as follows: .
[0049] In practical implementation, a binary mask matrix of the same size as the image resolution can be constructed. The pixel positions covered by the two detection boxes are assigned a value of 1, and the rest are set to 0. Then, a bitwise AND operation is performed on the two matrices, and the overlap area is determined by counting the number of non-zero pixels in the resulting matrix. This application does not limit the specific implementation method for determining the overlap area based on the detection box positions.
[0050] In actual implementation, the center point of the first detection box is determined as the first center point, and the center point of the second detection box is determined as the second center point. Based on the first center point and the second center point, the center point distance between the first detection box and the second detection box is determined. This can be achieved by: calculating the arithmetic mean of the extreme values of the horizontal and vertical coordinates of each detection box to obtain the center point coordinate vector, and then calculating the absolute straight-line distance between the two points based on the vector norm.
[0051] Here, the center point distance refers to a scalar index that characterizes the degree of relative deviation between two detected targets in spatial geometric distribution.
[0052] For example, assume the position coordinates of the first detection box are... The coordinates of the first center point were calculated using the coordinate mean. Similarly, the position coordinates of the second detection frame are... The coordinates of the second center point are calculated to be: Then, the Euclidean distance formula was applied. The distance to the center point was calculated. .
[0053] In practical implementation, the center point distance can also be determined by calculating the sum of the absolute distances between the two center points on the horizontal and vertical coordinate axes, i.e., the Manhattan distance, or by directly selecting the maximum absolute difference between the two coordinate axes as the Chebyshev distance. This application does not limit the specific implementation method for determining the center point distance.
[0054] In practical implementation, based on the overlap area and the center point distance, a matching result is generated between the first and second detection boxes. This matching result, representing the first and second target locations, can be achieved as follows: The intersection-union ratio (IU) calculated based on the overlap area is subtracted from the spatial offset penalty term calculated based on the center point distance to obtain a comprehensive distance IU score. This score is then used as an element in target tracking and association assignment, outputting the final matching result. Here, the matching result refers to a confidence score or assignment matrix quantified after comprehensively considering the scale deformation and spatial offset factors of the detection boxes, representing whether the two detection boxes belong to the same real target.
[0055] For example, assume that the intersection-union ratio is obtained based on the aforementioned overlap area and union area. The square of the distance to the center point is obtained by following the steps described above. Further calculate the square of the diagonal length of the smallest bounding rectangle formed by the first and second detection boxes. Assume the top-left corner of the minimum bounding rectangle is... The bottom right corner is ,but The system calculates the final matching score using the distance-intersection-union formula: The projected values are Record the value 0.672 as the matching result between the first target location and the second target location.
[0056] In practical implementation, a lightweight multilayer perceptron network can be constructed. The overlapping area, union area, center point coordinates, and center point distance are concatenated into a one-dimensional feature vector and input into the network. The network is then directly regressed through forward propagation to output a feature vector. The probability value of the interval is used as the matching result. This application does not limit the specific implementation method for generating the matching result.
[0057] In some embodiments, the process of fusing general annotation results and special annotation results to obtain target annotation results may be as follows: during the fusion process, if there is a conflict between general attribute tags and special attribute tags, the general annotation results are deleted and the special annotation results are determined as the target annotation results.
[0058] In practice, based on the general annotation results and the special annotation results, the conflict between the general attribute tags and the special attribute tags can be determined in the following way: extract the text strings of the general attribute tags in the general annotation results and the special attribute tags in the special annotation results, and evaluate the mutual exclusivity or hierarchical inclusion relationship of the two in the same attribute dimension through a pre-built domain knowledge graph or semantic similarity calculation model. If it is determined that they belong to the same attribute category and have inconsistent meanings, a conflict signal is triggered.
[0059] Here, conflict refers to different models outputting semantically mutually exclusive or hierarchical referential differences for the same attribute dimension (such as target category, color feature, behavior state) of the same visual target, and these labels cannot coexist in the current fine-grained annotation task.
[0060] For example, suppose the general attribute label output by the general model is "non-motorized vehicle", and its high-dimensional feature vector after word embedding is: The dedicated attribute label output by the dedicated model is "electric scooter", and its feature vector is... First, calculate the cosine similarity between the two. The formula is as follows: Assuming the result is obtained through vector dot product and normalization derivation. The value is greater than the preset semantic association threshold of 0.6, indicating that the two describe the same strongly related dimension attribute. Further examination of the category topology tree reveals that "non-motorized vehicle" is a broader concept than "electric scooter," at which point it is determined that the two conflict under the fine-grained annotation requirements.
[0061] In practical implementation, an offline collision rule hash table can also be constructed, where the general attribute tag and the special attribute tag are concatenated as strings to form the key, achieving a time complexity of O(log n). The table lookup matching is performed. If a preset conflict flag is found to be 1, it is directly determined to be a conflict. The embodiments of this application do not limit the specific implementation of determining tag conflicts.
[0062] In actual implementation, if there is a conflict between general attribute labels and special attribute labels, the general labeling result should be deleted and the special labeling result should be determined as the target labeling result. This can be achieved in the following way: In the label tree data structure in memory, send a memory release instruction or a logical inversion instruction to the storage node where the general labeling result is located. At the same time, extract the attribute fields and the second target position coordinate fields of the special labeling result and persist them to the final output structured labeling dataset.
[0063] Here, deletion refers to removing the pointer reference to the corresponding general label object at the data structure level, or marking its status bit as invalid, to prevent the coarse-grained or potentially misjudged label from entering the downstream model training or business application process.
[0064] In practice, a soft tag fusion mechanism can be used to avoid direct deletion at the physical storage level, instead employing a dynamic weight allocation formula. ,in, Indicates the general annotation results, Indicates the results of special annotations. Indicates target annotation results and forcibly sets the weight coefficients of the general model when conflicts occur. And the weight coefficients of the dedicated model This completely masks general results during subsequent forward propagation readings of the computation graph. The embodiments of this application do not limit the specific implementation methods for deleting general annotation results and determining target annotation results.
[0065] In some embodiments, the target annotation results include target attribute labels and target locations. The target attribute labels correspond to multiple categories. After generating the target annotation results for the image to be processed based on general annotation results and special annotation results, the following processing can be performed for each category of target attribute labels: constructing corresponding target description text for the target attribute labels; extracting features from the image content and target description text of the image to be processed at the target location using a contrastive learning model to obtain the image features of the target location and the text features of the target description text; and cleaning the target annotation results based on the image features and text features.
[0066] In practical implementation, constructing corresponding target description text for the target attribute label can be achieved in the following way: pre-configure multiple standardized natural language prompt word templates in memory, extract the category string from the target annotation result, and fill it into the preset placeholder position in the prompt word template to generate a continuous text sequence that conforms to the language model input specification.
[0067] Here, target description text refers to transforming discrete structured attribute labels into continuous natural language sentences or paragraphs containing rich contextual semantics.
[0068] For example, suppose the target attribute label parsed from the target annotation result is a structured "long-tail attribute: specific model handcart", and the pre-set prompt word template is "A surveillance video contains a specific target, which is [MASK]". Through memory operations of string concatenation and replacement, "specific model handcart" is filled into the "[MASK]" placeholder, generating the target description text sequence "A surveillance video contains a specific target, which is a specific model handcart". Subsequently, a byte-pair encoding tokenizer is used to tokenize this text, generating a discrete token sequence of length L. This is so that it can be input into the model's text encoder later.
[0069] In practical implementation, a generative large language model can be invoked, using the target attribute label as a prompt. This allows the large language model to dynamically generate multiple sets of target descriptive texts with different sentence structures and synonym variations through autoregressive decoding, thereby enhancing the robustness of subsequent feature matching. The embodiments in this application do not limit the specific implementation methods for constructing the target descriptive text.
[0070] In practical implementation, the contrastive learning model is used to extract features from the image content at the target location and the target descriptive text of the image to be processed, respectively, to obtain the image features of the target location and the text features of the target descriptive text. This can be achieved in the following way: the visual encoder in the contrastive learning model is used to perform spatial feature dimensionality reduction and representation learning on the image region locally cropped according to the target location coordinates, while the text encoder is used to perform temporal self-attention calculation on the labeled sequence of the target descriptive text. Finally, the two features are mapped to the same high-dimensional joint feature space through the multilayer perceptron projector.
[0071] Here, the contrastive learning model refers to a cross-modal neural network architecture that, after being pre-trained on a massive amount of image and text data with weak supervision, can bring semantically similar images and texts closer together in a shared feature space, while pushing unrelated images and texts further apart. For example, suppose the tensor size of the image content cropped based on the target location is... The input tensor after the target description text has been tokenized is The visual encoder first... Cut into Image patches, after linear projection and multi-head self-attention matrix multiplication The output features of the global classification token ([CLS] token) are extracted and then passed through a projection layer to obtain image features. Synchronously, the text encoder... The word embedding and positional encoding are summed, and after passing through multiple stacked self-attention layers, the feature vector of the sentence end token ([EOS] token) is extracted and passed through a projection layer to obtain the text features. Finally, respectively... and implement The norm normalization operation ensures that the norm is evenly distributed on the multidimensional unit hypersphere.
[0072] In practical implementation, besides using models based on the Transformer architecture such as CLIP, feature alignment and extraction of image content and descriptive text can also be achieved by employing a dual-tower convolutional neural network combined with a long short-term memory network architecture, or by using a feature-level cross-attention network. This application does not limit the specific implementation methods of feature extraction.
[0073] In some embodiments, there are multiple target attribute labels for each category. The process of cleaning the target annotation results based on image features and text features may include: performing similarity matching on the image content and target description text of the target location based on image features and text features to obtain the similarity between the image features and target description text of the target location; sorting the multiple target attribute labels based on the similarity, and dividing the multiple similarities into at least one similarity interval based on the sorting result; selecting a target similarity interval from the at least one similarity interval, and determining at least one similarity in the target similarity interval as the target similarity; and deleting the target attribute label corresponding to the target similarity from the multiple target attribute labels of the category.
[0074] In practice, based on image features and text features, similarity matching is performed on the image content and target description text at the target location to obtain the similarity between the image features and target description text at the target location. This can be achieved by using a similarity calculation function to quantify the spatial distance or cosine value of the included angle between the two sets of feature vectors in a unified representation space.
[0075] Here, similarity refers to a continuous numerical index that quantitatively evaluates the semantic consistency or proximity between visual modal features and text modal features in the shared latent space.
[0076] In practice, the image features of the target location and the text features of the target description text can usually be obtained from the high-dimensional dense vectors output by the forward propagation of the visual projection layer and text projection layer of the contrastive learning network (such as a contrastive language-image pre-trained model), and these vectors have typically already been processed. Norm normalization processing.
[0077] In practice, similarity matching based on image features and text features can be achieved by performing a dot product operation on the normalized image feature vector and the text feature vector, and scaling the calculation result in conjunction with the temperature hyperparameter to adjust the distribution smoothness.
[0078] For example, suppose the normalized image feature vector is The normalized text feature vector is , where d is the feature dimension (e.g., d=512). Using the formula... Calculate the similarity S, where For learnable temperature hyperparameters (assuming) ).like and The dot product inner product value is 0.056, so after scaling by the temperature coefficient, the final similarity score S is 0.8.
[0079] In practical implementation, the image feature vector and the text feature vector can be concatenated along the channel dimension and then input into a multilayer perceptron or cross-attention layer network. The forward fully connected layer of this network uses the sigmoid activation function to directly regress and output a probability value in the (0, 1) interval as the similarity. The embodiments of this application do not limit the specific implementation method for calculating similarity.
[0080] In some embodiments, multiple target attribute labels are sorted based on similarity, and based on the sorting results, multiple similarities are divided into at least one similarity interval. This can be achieved by establishing an ordered data structure based on numerical values and grouping and slicing the entire dataset according to the numerical span.
[0081] Here, the similarity interval refers to the set of multiple independent numerical sub-intervals obtained by dividing the continuous similarity score distribution domain of the full set of label data according to a preset fixed step size or adaptive quantile logic.
[0082] In some embodiments, the dataset to be processed, which contains multiple target attribute tags and their similarities, can typically be a list of key-value pairs stored in an in-memory hash table or a non-relational database, where each element contains a unique identifier for the target tag and a corresponding floating-point similarity value.
[0083] In some embodiments, sorting and dividing multiple target attribute labels based on similarity can be achieved in the following way: using quicksort or mergesort algorithms, the entire set of target attribute labels are sorted in descending order with similarity scores as the key, and then the sorted data sequence is bucketed according to a fixed numerical span interval.
[0084] For example, suppose similarity scores are calculated for 10,000 samples for a certain category attribute label. First, the scores are sorted in descending order from the maximum value of 0.99 to the minimum value of 0.1. Then, with a partition step size parameter set to 0.01, the entire effective value range is divided into multiple independent similarity intervals (i.e., interval 1 is [0.99, 1), interval 2 is [0.98, 0.99), and so on). This distributes the sorted full set of label data into the corresponding interval sets according to the score values.
[0085] By dividing similarity intervals as described above, the following technical effects can be effectively achieved: samples within the same interval maintain as much consistency as possible in terms of semantic features and their matching degree with the target description. This data binning based on feature consistency strongly supports the accurate and reliable inference of the overall annotation quality of the interval in subsequent cleaning steps, requiring only a small proportion of snapshot sampling for verification. This significantly reduces the workload of manual full-scale verification while ensuring cleaning accuracy.
[0086] In other embodiments, clustering algorithms based on data density or quantile-based equal-frequency binning strategies can be used to adaptively and dynamically calculate the segmentation boundaries according to the concentration of the data distribution, ensuring that each similarity interval contains approximately an equal number of samples. The embodiments of this application do not limit the specific implementation methods for sorting and dividing similarity intervals.
[0087] In practice, the process of selecting a target similarity interval from at least one similarity interval can be as follows: For each similarity interval, perform the following processing: determine the target annotation results corresponding to the similarities included in the similarity interval, and extract a first number of target annotation results from the determined target annotation results; detect the extracted target annotation results to obtain detection results; when all detection results indicate that the corresponding target annotation results have failed the detection, determine the similarity interval and other similarity intervals as the target similarity interval; wherein, the other similarity intervals are similarity intervals determined based on the ranking results that have a similarity less than the similarity interval. Here, the first quantity refers to the local sampling sample size set according to a specific sampling rate parameter or absolute value threshold in order to achieve a balance between verification efficiency and statistical confidence.
[0088] In practice, the detection results of the extracted target annotations can be obtained in the following ways: load the original image content associated with the sampled annotation results, render it through the front-end visualization interface, and have the operation node verify the visual consistency between the target selection position and the category text; or input it into a higher-precision offline expert network to calculate the cross-entropy loss, and output a Boolean signal indicating that the detection failed when the loss value is higher than the decision threshold.
[0089] For example, assuming the current similarity interval contains a total of 1000 target attribute label records, set the sampling ratio parameter. First, calculate the first quantity. Subsequently, 50 target annotation results corresponding to similarity values are randomly selected and pushed to the review queue. These 50 samples are then verified one by one. For a given image region, if the specific entity described by the attribute label does not exist in the actual image corresponding to the target location, the detection result for that sample is output as 0 (False, failed); otherwise, 1 (True, passed). Finally, a binary detection result vector of length 50 is obtained. .
[0090] In practical implementation, an information entropy-based sampling algorithm in the active learning strategy can be used to prioritize extracting the first number of samples with the greatest uncertainty in the model prediction from the feature space within this interval for automated cross-validation. The embodiments in this application do not limit the specific implementation methods of extraction and detection.
[0091] In actual implementation, when all detection results indicate that the corresponding target annotation result has failed the detection, the similarity interval and other similarity intervals are determined as the target similarity interval; wherein, other similarity intervals are similarity intervals with similarity less than the similarity interval determined based on the sorting results.
[0092] Here, other similarity intervals refer to the set of data bins that are downstream of the interval that triggers the full negative sample truncation condition in the global data structure with descending similarity and have lower overall semantic matching confidence.
[0093] In actual implementation, the distribution range of other similarity intervals can be determined in the following way: read the pointer of the ordered linked list or skip list formed by the global similarity intervals, take the currently detected similarity interval as the reference node, traverse and capture all references to nodes with smaller similarity values after it, and thus obtain the identifiers of all downstream intervals to be merged.
[0094] In practice, the similarity interval and other similarity intervals are determined as the target similarity interval. This can be achieved in the following way: Based on the monotonicity propagation principle of hypothesis testing, when there are no valid positive samples in the high similarity quantile interval, it is inferred that the probability of generating valid positive samples in all the lower-level intervals below this quantile is close to zero. Thus, by using the set union operation, they are all marked with the failure mask of the target interval.
[0095] For example, suppose the similarity intervals are sorted in descending order with a step size of 0.01, and the current interval being examined is the k-th interval, whose corresponding value range is [0.35, 0.36]. The detection result vector of 50 samples within this interval is extracted through previous steps. Calculate the sum of all elements of the vector. If the calculation yields If the result is zero, it indicates that all extracted detection results have failed the test (i.e., the number of positive samples is 0). Based on this, the sampling and detection task for the (k+1)th interval and all subsequent intervals is immediately stopped, and the current interval [0.35, 0.36), along with other similarity intervals that are ranked after it and have lower similarity (such as [0.34, 0.35), [-1, 0), etc., all lower bound intervals), are subjected to a set union operation. The combined broad numerical domain is uniformly marked as the target similarity interval.
[0096] In practical implementation, to prevent extremely low probability random errors caused by random sampling, a tolerance parameter can be introduced. When the proportion of samples that fail the test is greater than (For example, let) When the failure rate reaches 98%, it is considered that the all-negative-sample condition has been triggered, and an instruction is issued to jointly confirm the current interval and other similarity intervals below it as the target similarity interval. The embodiments of this application do not limit the specific implementation of determining the target similarity interval.
[0097] In practice, deleting the target attribute label corresponding to the target similarity from multiple target attribute labels of this category can be achieved in the following way: extract the similarity value associated with all the label records as the target similarity, and send an instruction to the storage layer to perform physical deletion in memory or on disk.
[0098] For example, assuming the current review reaches the similarity interval [0.35, 0.36), 50 snapshot samples are extracted from this interval at a rate of 5%. If the review result indicates that the number of positive samples among these 50 samples is 0, then it is determined that there are no valid positive samples in this interval and all similarity intervals below 0.35. Then, the set of all sub-intervals within the span [0, 0.36) is jointly established as the target similarity interval, that is, the set of scores within these intervals is determined as the target similarity. Finally, a batch deletion operation is initiated in the underlying graph database or relational database to clear all target attribute label records under this category that are bound to these target similarities.
[0099] In practical implementation, a flexible soft deletion effect can be achieved during computation graph propagation by setting a fixed absolute truncation threshold, or by assigning learning rate mask weights that decay to 0 to the attribute labels corresponding to these target similarities instead of directly deleting them physically from the disk within the deep learning model training framework. This application does not limit the specific implementation method for selecting target intervals and deleting labels.
[0100] In some embodiments, after cleaning the target annotation results based on image features and text features, the following processing can be performed on each category of target attribute label: extracting a second number of target attribute labels from the cleaned target attribute labels and determining the label accuracy of each extracted target attribute label, the label accuracy being used to indicate the accuracy of the target attribute label relative to the image content labeled with the target attribute label; if the label accuracy does not reach the accuracy threshold, the corresponding target attribute label is determined as a label to be reviewed, and the label to be reviewed is used for manual verification and error correction.
[0101] In practice, a second number of target attribute labels are extracted from the target attribute labels after data cleaning, and the label accuracy of each extracted target attribute label is determined. This can be achieved by establishing a local sampling snapshot and verification mechanism.
[0102] Here, the second quantity refers to the size of the sample subset used for local verification, which is extracted from the full set of similar data according to a certain sampling ratio in order to evaluate the overall quality distribution of the remaining dataset after cleaning; the label accuracy refers to the evaluation metric that represents the proportion of positive samples in the sample snapshot set whose target attribute labels completely match the actual image content to the total number of samples.
[0103] For example, suppose that after pre-processing similarity cleaning and filtering for a certain category (e.g., "attribute: long-tail feature - specific model of handcart"), the total number of remaining high-confidence target attribute labels is... The preset snapshot sampling ratio is 5%. First, a pseudo-random generator is used to calculate and determine the second quantity. Subsequently, the system extracts these 1000 labeled samples through sampling without replacement and triggers manual or expert review logic. Assume the review confirms that... The text descriptions of the target attribute labels perfectly match the entity features within the image. This is achieved using probability and statistical formulas. The accuracy of the labels was calculated and derived through deduction. .
[0104] In practical implementation, an uncertainty sampling strategy from active learning can be introduced to utilize the classification confidence distribution characteristics of the evaluation network's predicted output (e.g., calculating the information entropy of classification probabilities). The method prioritizes extracting the most easily confused samples from the feature space located at the classification decision boundary to dynamically determine the second quantity, thereby accelerating the exposure of hidden erroneous labels. This application does not limit the specific implementation methods for extracting target attribute labels and determining label accuracy.
[0105] In some embodiments, when the label accuracy rate does not reach the accuracy rate threshold, the corresponding target attribute label is identified as a label to be reviewed. This can be achieved through state machine logic for interception and diversion, and push to the manual error correction queue.
[0106] Here, the accuracy threshold refers to the absolute numerical baseline for measuring whether the quality of automated labeling of this type of attribute label has met the requirements for exemption from inspection when training a large model; the labels pending review refer to the set of difficult and erroneous data that have been forcibly blocked from the automatic data entry process due to failure to pass the baseline interception, and are instead distributed to the manual labeling system for secondary cleaning and confirmation.
[0107] For example, setting an accuracy threshold based on business requirements. The label accuracy of the sampling snapshot for this category is calculated based on the preceding steps. Perform inequality judgment Since the condition 0.93 < 0.95 is met, this category is deemed to have failed quality access. Therefore, the remaining data in this category will not be directly blocked, and all unsampled data in the current category will be removed from the platform. The status flag of the data structure for each target attribute label is forcibly changed from CLEANED to PENDING_REVIEW, indicating that it is now a label awaiting review. The labeled data will be packaged and pushed to the data cleaning pool, allowing manual error correction to focus precisely on difficult samples with an accuracy rate below 95%, without needing to process labels that have already met the standards, thus greatly improving the overall efficiency of data cleaning.
[0108] In practical implementation, flexible triage can also be achieved by setting cascading thresholds with dual boundaries. For example, a triage strategy can be constructed as follows: if the accuracy rate is below the lower threshold of 0.9, it is identified as a tag awaiting review and handed over to manual verification; if the accuracy rate is between 0.9 and 0.95, manual correction is not performed directly, but instead, it is routed to an offline teacher network with higher computing power and a larger number of parameters for secondary self-distillation evaluation; only when the accuracy rate is greater than or equal to 0.95 is it directly approved. The embodiments of this application do not limit the specific implementation method for determining the target attribute tag as a tag awaiting review.
[0109] By applying the embodiments described above, a general model is used to perform annotation processing on the image to be processed, resulting in a general annotation result containing the first target location and general attribute labels, thus achieving annotation of general targets. Simultaneously, a specialized model is used to perform annotation processing, resulting in a specialized annotation result containing the second target location and specialized attribute labels, thus achieving annotation of specific targets. Since the annotation accuracy of specialized attribute labels is higher than that of general attribute labels for the same target, this effectively overcomes the illusion phenomenon that easily occurs when relying solely on a single multimodal large model for pre-annotation, as well as the shortcomings of low accuracy in identifying rare samples and long-tail attributes in monitoring scenes. Finally, by generating target annotation results for the image to be processed based on the general and specialized annotation results, the breadth advantage of the general model in handling massive and diverse attributes is cleverly combined with the high accuracy advantage of the specialized model on specific targets. This eliminates the need for massive amounts of pre-prepared self-annotated data and avoids the cumbersome and complex joint fine-tuning training process, significantly reducing the workload and cost of subsequent manual verification and error correction, thereby achieving a data annotation effect that balances high efficiency and high accuracy.
[0110] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0111] As the demands of backend devices in surveillance scenarios expand, their supporting algorithms need to be able to retrieve common targets across a wide range of scenarios, and the number of retrieved tags (target attribute tags) also increases. Therefore, a large amount of training data is required to cover targets in more scenarios and provide more attribute recognition capabilities.
[0112] In response, open-source multimodal large models, also known as general large models (general models), have recently seen significant performance improvements. Their training data is extensive, making them particularly suitable for zero-sample pre-labeling (labeling) of various target attributes in monitoring scenarios. Furthermore, they can be fine-tuned using proprietary data, leveraging expert-level background knowledge to achieve even better results. However, this method also has its drawbacks. The illusion phenomenon of large models (general models) can lead to mislabeling; while the mislabeling rate is low for common attributes, it spikes sharply for less common long-tail specific target attributes (specific target attributes), resulting in a significant workload for manual verification and correction.
[0113] Based on this, this application proposes a method for pre-labeling (labeling processing) and cleaning (data cleaning) of multi-attribute target data in monitoring scenarios. It combines pre-labeling (labeling processing) using a multimodal large model (general model) with various cleaning techniques to process the data before final manual labeling confirmation. These processing techniques include: multi-source label assistance, comparative model pre-screening, and accuracy filtering.
[0114] In actual implementation, see Figure 4 , Figure 4 This is a schematic diagram of the data processing method provided in the embodiments of this application, based on Figure 4 The data processing method provided in this application embodiment is implemented through the following steps: 1. Pre-labeling (labeling processing) using a multimodal large model (general model) to obtain the preliminary pre-labeling results of the required labels, i.e., general pre-labeling results (general labeling results); 2. Pre-labeling (labeling processing) using a domain-specific model, i.e., a dedicated model, to obtain the pre-labeling results of a specific domain, i.e., dedicated labeling results (dedicated labeling results); 3. Matching the pre-labeling results of the same target from the multimodal large model (general model) and the dedicated model through target box matching, generating a merged target labeling result; 4. Comparative model sorting and cleaning: using a comparative learning model, text descriptions (target description text) are created for each label and searched and sorted. Snapshots of intervals (similarity intervals) are selected according to a certain similarity interval. Intervals without positive samples are manually checked and removed to complete the preliminary cleaning; 5. Manual selection and cleaning: a certain proportion (second quantity) of each label data is extracted to check the accuracy of the pre-labeling (label accuracy). Attributes that have met the high accuracy threshold requirements are not processed. The labels corresponding to attributes that do not meet the requirements (labels to be reviewed) are manually cleaned (manual verification and error correction).
[0115] Next, the above steps will be explained in detail. Step one: Based on the specific task, specially designed pre-annotation prompts are used to pre-annotate (annotation processing) the image to be processed using a multimodal large model (general model), obtaining the bounding boxes (i.e., the first target positions) and attribute labels (i.e., general attribute labels) for each target, thus obtaining general annotation results. Here, the pre-annotation prompts include a detailed structure such as task description, annotation range, special attribute precautions, and output format specifications. Through the specially designed prompts, especially the introduction of special attribute precautions, the multimodal large model can effectively distinguish easily confused attributes during the pre-annotation stage, thereby significantly improving the initial accuracy of the general annotation results. This model can be an open-source general vision-language large model, or a multimodal large model fine-tuned based on existing data. The multimodal large model is mainly responsible for the breadth of annotation, used to annotate general targets in the image to be processed. After obtaining the general annotation results for all image data, proceed to the next step.
[0116] Step Two: If open-source or closed-source data for a specific domain is available, a dedicated model can be trained and pre-labeled with targeted tags. If the dedicated model lacks detection capabilities, a detection model is used to perform object detection before pre-labeling. This dedicated model can be a large model or a lightweight CNN model, used to label specific targets in the image to be processed, obtaining dedicated annotation results, including the location of the secondary target and dedicated attribute labels. For the same target, expert models generally perform better only for a small number of specific targets / attributes; therefore, the annotation accuracy of their dedicated attribute labels is higher than that of general attribute labels. After obtaining the dedicated annotation results for all image data, proceed to the next step.
[0117] Step 3: Employ a target bounding box matching algorithm to match the first target location (i.e., the location of the first detection box) corresponding to the multimodal large model with the second target location (i.e., the location of the second detection box) corresponding to the specialized model, obtaining matching results. Specifically, the overlap area between the first and second detection boxes can be determined based on their positions; the center points (first center point) of the first and second detection boxes can be determined separately, and the distance between these center points can be calculated. Based on the overlap area and the center point distance (e.g., calculating the Intersection over Union (IoU) and center point distance scores), the matching results are generated. When a matching result indicates that the score (matching degree) between the first target location and the corresponding second target location is the highest and exceeds a set threshold (matching degree threshold, e.g., 0.3 for general targets and 0.1 for small targets), the general annotation results and the specialized annotation results are merged to obtain the target annotation result.
[0118] During the fusion process, conflicting labels may arise from different models; for example, a general model might label a vehicle as a handcart, while a specialized model might label it as a scooter. In such cases, based on the accuracy difference, the results from the specialized model are prioritized and the results from the large multimodal model are discarded or deleted. The specialized labeling result is then designated as the target labeling result. The next step is then performed.
[0119] Step 4: For each target attribute label in various categories (multiple categories), design appropriate text descriptions, i.e., target description text. Using a contrastive learning model, first extract the image feature vectors (image features) of all target image data (i.e., the image content of the target location), and then extract the text feature vectors (text features) of the target description text. Perform feature comparison (similarity matching) between the image features and text features, and then rank them based on their similarity scores. Based on the ranking results, divide the data into at least one similarity interval with an interval of 0.01. For each similarity interval, extract a certain number (a first number, e.g., 5% of the data) as a snapshot, and manually review or detect the extracted annotation results to obtain the detection results. Perform this process sequentially from high similarity intervals to low similarity intervals. If all detection results within a certain interval indicate that all samples are incorrectly labeled (i.e., they fail the detection), it is considered that there is a high probability that no positive samples exist in that interval. This similarity interval, along with other similarity intervals ranked lower, are determined as target similarity intervals to be removed. Extract the target similarity and discard the corresponding target attribute labels directly from the labels to complete the initial data cleaning.
[0120] Step 5: For the initially cleaned data, extract a certain percentage of snapshots (i.e., a second quantity, e.g., 5%) of the target attribute labels for each category, and determine the accuracy of each extracted target attribute label, i.e., the label accuracy rate, to indicate its accuracy relative to the image content. If the accuracy rate meets a high standard, i.e., the accuracy threshold (accuracy threshold, e.g., 95%), skip the cleaning process; if the label accuracy rate does not reach the accuracy threshold, extract the label images that do not meet the requirements, identify them as labels to be reviewed, and perform manual verification and error correction on these labels. This ensures that manual cleaning focuses on uncommon and error-prone labels, improving the overall data cleaning efficiency.
[0121] Thus, the above technical solution achieves the following technical effects: First, it combines the annotation advantages of multiple models, with general-purpose models and specialized models complementing each other, possessing both the zero-shot recognition capability of general-purpose models and the high domain annotation accuracy of specialized models for specific targets. Second, it reduces the number of samples requiring manual review. Through comparative learning models for initial screening and sorting, target similarity intervals with almost no positive samples are deleted in batches, reducing the actual amount of data requiring manual data cleaning. Third, it improves the efficiency of manual cleaning. Different target attribute labels are selectively extracted for evaluation, concentrating most of the manpower on difficult samples (labels awaiting review) with accuracy below the standard, thereby effectively improving the overall efficiency of manual verification, error correction, and cleaning. It should be noted that the multimodal large model, i.e., the general model architecture, of the pre-annotation module can have other alternatives. The key is to use a suitable model to accurately and efficiently annotate the images to be processed. For example, a fine-tuned model or other open-source vision-language model architectures besides those in the example can be used. Similarly, the comparison, ranking, and cleaning module can also have other alternatives. The key is to pre-classify positive and negative samples based on image and text features (for example, this method obtains similarity scores through similarity matching, ranks them, and divides them into similarity intervals) to verify and filter interval data that are all negative samples.
[0122] By applying the embodiments described above, a general model is used to perform annotation processing on the image to be processed, resulting in a general annotation result containing the first target location and general attribute labels, thus achieving annotation of general targets. Simultaneously, a specialized model is used to perform annotation processing, resulting in a specialized annotation result containing the second target location and specialized attribute labels, thus achieving annotation of specific targets. Since the annotation accuracy of specialized attribute labels is higher than that of general attribute labels for the same target, this effectively overcomes the illusion phenomenon that easily occurs when relying solely on a single multimodal large model for pre-annotation, as well as the shortcomings of low accuracy in identifying rare samples and long-tail attributes in monitoring scenes. Finally, by generating target annotation results for the image to be processed based on the general and specialized annotation results, the breadth advantage of the general model in handling massive and diverse attributes is cleverly combined with the high accuracy advantage of the specialized model on specific targets. This eliminates the need for massive amounts of pre-prepared self-annotated data and avoids the cumbersome and complex joint fine-tuning training process, significantly reducing the workload and cost of subsequent manual verification and error correction, thereby achieving a data annotation effect that balances high efficiency and high accuracy.
[0123] The following description continues to illustrate the exemplary structure of the data processing apparatus 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the data processing device 455 of the memory 450 may include: The first annotation module 4551 is used to perform annotation processing on the image to be processed through a general model to obtain a general annotation result, the general annotation result including the first target location and a general attribute label; The second annotation module 4552 is used to perform annotation processing on the image to be processed through a special model to obtain a special annotation result, the special annotation result including the second target location and special attribute labels; The general model is used to label general targets at the first target location in the image to be processed, and the special model is used to label specific targets at the second target location in the image to be processed; for the same target, the labeling accuracy of the special attribute label is higher than that of the general attribute label. The generation module 4553 is used to generate target annotation results for the image to be processed based on the general annotation results and the special annotation results.
[0124] In some embodiments, the number of first target locations is at least one, the number of second target locations is at least one, and the generation module 4553 is further configured to match the first target location and each second target location for each first target location to obtain a matching result; when there is a matching result indicating that the matching degree between the first target location and the corresponding second target location is greater than the matching degree threshold, the general annotation result and the special annotation result are fused to obtain the target annotation result.
[0125] In some embodiments, the first target location is the location of the first detection box, and the second target location is the location of the second detection box. The generation module 4553 is further configured to perform the following processing for each of the second target locations to obtain a matching result between the first target location and the second target location: determining the overlap area between the first detection box and the second detection box based on the position of the first detection box and the position of the second detection box; determining the center point of the first detection box as the first center point, and determining the center point of the second detection box as the second center point; determining the center point distance between the first detection box and the second detection box based on the first center point and the second center point; and generating a matching result between the first detection box and the second detection box based on the overlap area and the center point distance, which serves as the matching result between the first target location and the second target location.
[0126] In some embodiments, the generation module 4553 is further configured to, during the fusion process, based on the general annotation result and the special annotation result, if the general attribute label conflicts with the special attribute label, delete the general annotation result and determine the special annotation result as the target annotation result.
[0127] In some embodiments, the target annotation result includes target attribute labels and target location. The target attribute labels correspond to multiple categories. The generation module 4553 is further configured to perform the following processing for each category of target attribute labels: constructing corresponding target description text for the target attribute labels; extracting features from the image content of the image to be processed at the target location and the target description text using a contrastive learning model to obtain the image features of the target location and the text features of the target description text; and performing data cleaning on the target annotation result based on the image features and the text features.
[0128] In some embodiments, the number of target attribute tags in each category is multiple. The generation module 4553 is further configured to perform similarity matching on the image content and the target description text of the target location based on the image features and the text features to obtain the similarity between the image features of the target location and the target description text; sort the multiple target attribute tags based on the similarity, and divide the multiple similarities into at least one similarity interval based on the sorting result; select a target similarity interval from the at least one similarity interval, and determine at least one similarity in the target similarity interval as the target similarity; delete the target attribute tag corresponding to the target similarity from the multiple target attribute tags of the category.
[0129] In some embodiments, the generation module 4553 is further configured to perform the following processing for each of the similarity intervals: determine the target annotation results corresponding to the similarity included in the similarity interval, and extract a first number of target annotation results from the determined target annotation results; detect the extracted target annotation results to obtain detection results; when each of the detection results indicates that the corresponding target annotation result has failed the detection, determine the similarity interval and other similarity intervals as the target similarity interval; wherein, the other similarity intervals are similarity intervals determined based on the sorting results that have a similarity less than the similarity interval.
[0130] In some embodiments, the generation module 4553 is further configured to perform the following processing for each category of target attribute tags: extracting a second number of target attribute tags from the data-cleaned target attribute tags, and determining the tag accuracy of each extracted target attribute tag, wherein the tag accuracy is used to indicate the accuracy of the target attribute tag relative to the image content labeled with the target attribute tag; if the tag accuracy does not reach the accuracy threshold, determining the corresponding target attribute tag as a tag to be reviewed, wherein the tag to be reviewed is used for manual verification and error correction.
[0131] This application provides a computer program product, which includes computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the data processing method provided in this application.
[0132] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the data processing method provided in this application, for example, such as... Figure 3 The data processing method is shown.
[0133] In some embodiments, the computer-readable storage medium may be a read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface memory, optical disk, or CD-ROM, etc.; or it may be a device that includes one or any combination of the above-mentioned memories.
[0134] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0135] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0136] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0137] It should be noted that in this application embodiment, data such as the image to be processed is involved. When this application embodiment is applied to a specific product or technology, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0138] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A data processing method, characterized by, The method includes: Using a general model, annotation processing is performed on the image to be processed to obtain a general annotation result, which includes the first target location and a general attribute label; The image to be processed is labeled using a dedicated model to obtain a dedicated labeling result, which includes the second target location and a dedicated attribute label. The general model is used to label general targets at the first target location in the image to be processed, and the special model is used to label specific targets at the second target location in the image to be processed; for the same target, the labeling accuracy of the special attribute label is higher than that of the general attribute label. Based on the general annotation results and the specific annotation results, the target annotation results of the image to be processed are generated.
2. The method of claim 1, wherein, The number of first target locations is at least one, the number of second target locations is at least one, and the step of generating target annotation results for the image to be processed based on the general annotation results and the specific annotation results includes: For each of the first target locations, the first target locations and each of the second target locations are matched to obtain matching results; When the matching result indicates that the degree of matching between the first target location and the corresponding second target location is greater than the matching degree threshold, the general annotation result and the special annotation result are fused to obtain the target annotation result.
3. The method of claim 2, wherein, The first target location is the location of the first detection box, and the second target location is the location of the second detection box. The step of matching the first target location and each of the second target locations to obtain matching results includes: For each of the second target locations, the following processing is performed to obtain the matching results between the first target location and the second target location: Based on the positions of the first detection frame and the second detection frame, the overlap area between the first detection frame and the second detection frame is determined; The center point of the first detection frame is determined as the first center point, and the center point of the second detection frame is determined as the second center point; Based on the first center point and the second center point, determine the center point distance between the first detection frame and the second detection frame; Based on the overlapping area and the center point distance, a matching result between the first detection box and the second detection box is generated, which serves as the matching result between the first target position and the second target position.
4. The method of claim 2, wherein, The process of fusing the general annotation results and the specific annotation results to obtain the target annotation result includes: During the fusion process, if the general attribute label conflicts with the special attribute label based on the general annotation result and the special annotation result, the general annotation result is deleted and the special annotation result is determined as the target annotation result.
5. The method of claim 1, wherein, The target annotation result includes target attribute labels and target location. The target attribute labels correspond to multiple categories. After generating the target annotation result of the image to be processed based on the general annotation result and the special annotation result, the method further includes: For each category's target attribute tag, perform the following processing: For the target attribute tags, construct the corresponding target description text; By using a contrastive learning model, feature extraction is performed on the image content of the image to be processed at the target location and the target description text, respectively, to obtain the image features of the target location and the text features of the target description text; Based on the image features and the text features, the target annotation results are cleaned.
6. The method of claim 5, wherein, The number of target attribute labels for each category is multiple. The data cleaning of the target annotation results based on the image features and the text features includes: Based on the image features and the text features, a similarity match is performed on the image content and the target description text at the target location to obtain the similarity between the image features and the target description text at the target location. Based on the similarity, multiple target attribute tags are sorted, and based on the sorting results, the multiple similarities are divided into at least one similarity interval. From the at least one similarity interval, select a target similarity interval and determine at least one similarity in the target similarity interval as the target similarity; Delete the target attribute label corresponding to the target similarity from the multiple target attribute labels of the category.
7. The method of claim 6, wherein, Selecting a target similarity interval from the at least one similarity interval includes: For each of the aforementioned similarity intervals, the following processing is performed: Determine the target annotation results corresponding to the similarity included in the similarity interval, and extract a first number of target annotation results from the determined target annotation results; The extracted target annotation results are then detected to obtain the detection results; When all the detection results indicate that the corresponding target annotation result has failed the detection, the similarity interval and other similarity intervals are determined as the target similarity interval; Among them, the other similarity intervals are similarity intervals determined based on the ranking results that have a similarity less than the similarity interval.
8. The method according to claim 5, characterized in that, After cleaning the target annotation results based on the image features and the text features, the method further includes: For each category's target attribute tag, perform the following processing: From the target attribute labels after data cleaning, a second number of target attribute labels are extracted, and the label accuracy of each extracted target attribute label is determined. The label accuracy is used to indicate the accuracy of the target attribute label relative to the image content labeled with the target attribute label. If the accuracy rate of the label does not reach the accuracy threshold, the corresponding target attribute label will be identified as a label to be reviewed, and the label to be reviewed will be used for manual verification and error correction.
9. A data processing apparatus, characterized in that, The device includes: The first annotation module is used to perform annotation processing on the image to be processed through a general model to obtain a general annotation result, which includes the first target location and a general attribute label. The second annotation module is used to perform annotation processing on the image to be processed using a dedicated model to obtain a dedicated annotation result, which includes the second target location and a dedicated attribute label. The general model is used to label general targets at the first target location in the image to be processed, and the special model is used to label specific targets at the second target location in the image to be processed; for the same target, the labeling accuracy of the special attribute label is higher than that of the general attribute label. The generation module is used to generate target annotation results for the image to be processed based on the general annotation results and the special annotation results.
10. An electronic device, characterized in that, include: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions or computer programs for inducing a processor to execute and implement the data processing method according to any one of claims 1 to 8.
