Dynamic model optimization method and system based on attribute driving

By controlling the on/off state of attribute recognition and self-training, and combining attribute association rules and user interaction, the attribute recognition model is optimized, solving the problem of illogical recognition results in existing technologies, and achieving highly accurate and adaptive attribute recognition.

CN120976684AActive Publication Date: 2025-11-18SHENZHEN TIEYUE ELECTRIC CO LTD

Patent Information

Application Number
CN202511501840.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2025-11-18
Estimated Expiration
2045-10-21

AI Technical Summary

Technical Problem

Existing deep learning-based attribute recognition methods suffer from illogical and common-sense results in practical deployments, leading to high false alarm rates and low recognition accuracy, which fails to meet increasingly sophisticated management needs.

Method used

By acquiring algorithm configuration parameters, the activation and deactivation of attribute recognition and self-training are controlled. Initial attribute information is obtained using object detection and attribute recognition models, and post-processing is performed through preset attribute association rules to generate final attribute information. Model optimization is carried out in combination with user interaction and feedback, and attribute alarm rules, coexistence rules and mutual exclusion rules are introduced for fine-tuning.

Benefits of technology

It improves the accuracy and adaptability of attribute recognition, reduces the false alarm rate, enhances the real-time performance and interactivity of the system, provides a high-quality labeled data foundation, and ensures efficient recognition of the model in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976684A_ABST
    Figure CN120976684A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic model optimization method and system based on attribute driving, and relates to the field of data processing. In the method, a target detection model is adopted to process a to-be-detected image to obtain a target object in the to-be-detected image; if it is determined that the attribute recognition switch is turned on, inputting the target object into an attribute recognition model to obtain initial attribute information corresponding to the target object; based on a preset attribute association rule, performing post-processing on the initial attribute information to generate final attribute information; when it is determined that the final attribute information meets a preset alarm condition, an alarm event is generated; in response to the alarm event, displaying the target object and the attribute information on a user interaction interface, and receiving a correction operation of a user on the final attribute information to obtain annotated data; and when it is determined that the self-training switch is triggered, training the attribute recognition model based on the annotation data to obtain a target attribute recognition model. By implementing the technical scheme provided by the invention, the accuracy of identifying the image by the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, specifically to an attribute-driven dynamic model optimization method and system. Background Technology

[0002] With the rapid development of deep learning technology, real-time and intelligent analysis of video images using computer vision technology has become a core capability in many industries, including security monitoring, smart cities, industrial safety production, and smart retail. In these application scenarios, simply identifying targets in images, such as people and vehicles, is far from sufficient to meet increasingly sophisticated management needs in order to achieve deeper scene understanding and more accurate event warnings. Therefore, attribute recognition technology has emerged, aiming to perform finer-grained feature analysis on detected targets. For example, it can identify whether workers entering a construction site are wearing safety helmets or reflective vests, or identify the color, model, and whether a vehicle has a sunroof.

[0003] However, existing deep learning-based attribute recognition methods still face problems in practical deployment and application: First, the reliability of the raw output results of attribute recognition models is limited, and logical contradictions often occur. For example, the model may output both running and stationary motion states for the same pedestrian target, or incorrectly assign the attribute of an open door to a two-wheeled vehicle target. Such recognition results that do not conform to real-world logic and common sense directly lead to a large number of invalid alarms and erroneous events, resulting in a decrease in the model's recognition accuracy. Summary of the Invention

[0004] This application provides an attribute-driven dynamic model optimization method and system, which improves the accuracy of the model in recognizing images.

[0005] The first aspect of this application provides an attribute-driven dynamic model optimization method, which includes: obtaining algorithm configuration parameters, the algorithm configuration parameters including an attribute recognition switch and a self-training switch; processing an image to be detected using a target detection model to obtain a target object in the image to be detected; determining whether the attribute recognition switch is turned on; if the attribute recognition switch is turned on, inputting the target object into the attribute recognition model to obtain initial attribute information corresponding to the target object; post-processing the initial attribute information based on preset attribute association rules to generate final attribute information; when the final attribute information is determined to meet preset alarm conditions, generating an alarm event, the alarm event including the target object and the final attribute information; responding to the alarm event, displaying the target object and the final attribute information on a user interface, and receiving user correction operations on the final attribute information to obtain labeled data; when the self-training switch is triggered, training the attribute recognition model based on the labeled data to obtain a target attribute recognition model, and recognizing the image to be detected according to the target attribute recognition model to obtain a recognition result.

[0006] By employing the above technical solution, algorithm configuration parameters are obtained to control the activation and deactivation of attribute recognition and self-training. When the attribute recognition switch is activated, the target detection model and attribute recognition model are used to obtain the initial attribute information of the target object. Based on preset attribute association rules, the initial attribute information is post-processed to generate the final attribute information. When the final attribute information meets preset alarm conditions, an alarm event is generated, and the target object and attribute information are displayed on the user interface. User corrections to the final attribute information are received, resulting in labeled data. When the self-training switch is triggered, the labeled data is used to train the attribute recognition model, obtaining the target attribute recognition model. This method improves the accuracy and adaptability of attribute recognition through attribute-driven and dynamic model optimization. Simultaneously, through user interaction and feedback, the model achieves self-learning and optimization, continuously improving model performance. Furthermore, the generation and display of alarm events enhance the system's real-time performance and interactivity, providing users with timely and accurate attribute analysis results. This method reduces false alarms and improves recognition accuracy and precision through post-processing based on attribute association rules. It also provides a user correction mechanism to ensure high-quality labeled data, providing an accurate data foundation for model optimization. Through data-driven improvement, it enhances model performance and ensures that the model can adapt to complex real-world scenarios.

[0007] Optionally, the initial attribute information includes multiple attributes and the confidence level corresponding to each attribute. The preset attribute association rules include attribute alarm rules, attribute coexistence rules, and attribute mutual exclusion rules. The step of post-processing the initial attribute information based on the preset attribute association rules to generate final attribute information specifically includes: dividing the initial attribute information into an alarm attribute set and a non-alarm attribute set according to the attribute alarm rules, where the alarm attribute set is used to trigger system alarms, and the non-alarm attribute set does not trigger system alarms; determining whether a second attribute coexists with a first attribute according to the attribute coexistence rules, where the first attribute is any one of the multiple attributes included in the alarm attribute set; if a second attribute coexists with the first attribute, determining whether the second attribute is in the alarm attribute set; if the second attribute is not in the alarm attribute set... In the process of obtaining a first alarm attribute set, the first attribute is either removed from the alarm attribute set and added to the non-alarm attribute set, or the first confidence level of the first attribute is set to zero. Then, according to the attribute mutual exclusion rule, it is determined whether a third attribute mutually exclusive with the first attribute exists. If a third attribute mutually exclusive with the first attribute exists, it is determined whether the third attribute is in the alarm attribute set. If the third attribute is in the alarm attribute set, the first confidence level and the second confidence level corresponding to the third attribute are compared. If the first confidence level is greater than the second confidence level, the third attribute is either removed from the alarm attribute set and added to the non-alarm attribute set, or the second confidence level of the third attribute is set to zero. Finally, the attribute information is obtained based on the first alarm attribute set and the second alarm attribute set.

[0008] By adopting the above technical solution, attribute alarm rules, attribute coexistence rules, and attribute mutual exclusion rules are introduced to refine the initial attribute information and generate the final attribute information. The attribute alarm rules divide the initial attributes into alarm attribute sets and non-alarm attribute sets, achieving attribute classification and filtering, and highlighting the alarm function of important attributes. The attribute coexistence rules determine whether alarm attributes meet coexistence conditions; if not, adjustments are made to ensure the rationality and consistency between attributes. The attribute mutual exclusion rules determine the confidence level between mutually exclusive attributes, retaining attributes with higher confidence levels, thus improving the accuracy of attribute identification. Finally, the first and second alarm attribute sets are combined to obtain the final attribute information. This method, through the application and fusion of multiple rules, effectively improves the accuracy, rationality, and reliability of attribute identification results, providing a high-quality attribute information foundation for subsequent alarms and decision-making.

[0009] Optionally, the step of inputting the target object into the attribute recognition model to obtain the initial attribute information corresponding to the target object specifically includes: obtaining the preliminary detection results output by the target detection model, the preliminary detection results including the bounding box coordinates, main category label, and main category confidence of each target object; assigning each target object to a corresponding processing channel according to the main category confidence of each target object to obtain the channel output results; and combining the channel output results of each processing channel to obtain the initial attribute information corresponding to the target object.

[0010] By employing the above technical solution, preliminary detection results output by the target detection model are obtained, including the bounding box coordinates, main category label, and main category confidence score of the target object, providing basic input for attribute recognition. Based on the main category confidence score, the target object is assigned to the corresponding processing channel, achieving hierarchical processing and optimization of attribute recognition. Different processing channels can adopt different recognition strategies for target objects with different confidence scores, improving the efficiency and accuracy of attribute recognition. By combining the output results of each processing channel, the initial attribute information of the target object is obtained, providing a complete and accurate attribute foundation for subsequent attribute association rule processing. This method fully utilizes the target detection results, effectively improving the performance and adaptability of attribute recognition through hierarchical processing and multi-channel fusion, providing an efficient and reliable attribute analysis solution for practical applications.

[0011] Optionally, the step of assigning each target object to a corresponding processing channel based on the main category confidence score of each target object to obtain a channel output result specifically includes: when the main category confidence score is greater than a preset first confidence score threshold, performing comprehensive attribute recognition processing on the target object to obtain a channel output result containing all preset attribute dimensions; when the main category confidence score is less than or equal to the preset first confidence score threshold and the main category confidence score is greater than a preset second confidence score threshold, performing core attribute recognition processing on the target object to obtain a channel output result containing preset key attribute dimensions, wherein the preset second confidence score threshold is less than the preset first confidence score threshold.

[0012] By adopting the above technical solution, when the main category confidence level is higher than the preset first confidence threshold, the target object is assigned to the refined attribute analysis channel to obtain detailed attribute information containing all attribute dimensions. When the main category confidence level is between the first and second confidence thresholds, the target object is assigned to the key attribute verification channel to obtain core attribute information containing key attribute dimensions. When the main category confidence level is lower than the second confidence threshold, no attribute recognition processing is performed on the target object, avoiding unnecessary computational overhead. This method achieves hierarchical processing and resource optimization for attribute recognition by setting different confidence thresholds. For target objects with high confidence, comprehensive and detailed attribute analysis is performed to ensure the completeness and accuracy of attribute information. For target objects with medium confidence, the focus is on the identification and verification of key attributes, improving processing efficiency and result usability. This hierarchical processing strategy fully considers the impact of confidence and rationally allocates recognition tasks, improving the real-time performance and robustness of the system while ensuring the quality of attribute recognition.

[0013] Optionally, training the attribute recognition model based on the labeled data to obtain the target attribute recognition model specifically includes: training the attribute recognition model based on the labeled data to obtain a basic attribute recognition model; assigning a corresponding context identifier to each image to be detected according to the image source of the image to be detected; binding the labeled data with the context identifier of the image to be detected when receiving labeled data from the user for the image to be detected; freezing the main parameters of the attribute recognition model and training a context adaptation model corresponding to the context identifier using the labeled data bound to the context identifier; and fusing the basic attribute recognition model and the context adaptation model to obtain the target attribute recognition model.

[0014] By employing the above technical solution, the attribute recognition model is trained using labeled data to obtain a basic attribute recognition model, improving the model's ability to recognize existing attributes. Then, based on the source of the image to be detected, a corresponding context identifier is assigned to each image, enabling the recognition and differentiation of different scenes. When receiving labeled data for a specific image from a user, the labeled data is bound to the image's context identifier, establishing a connection between the labeled data and the specific context. Next, the main parameters of the attribute recognition model are frozen, and only the labeled data bound to the context identifier is used to train the context adaptation model, achieving specific optimization of the model in specific scenarios. Finally, the basic attribute recognition model and the context adaptation model are fused to obtain the target attribute recognition model, combining general attribute recognition capabilities with recognition capabilities in specific scenarios. This method, through the introduction and binding of context identifiers, achieves scene-adaptive learning and optimization of the attribute recognition model, improving the model's recognition accuracy and adaptability in different scenarios. Simultaneously, through phased training and fusion of the model, while ensuring the performance of basic attribute recognition, the model's performance in specific scenarios is specifically improved, providing a flexible and efficient attribute recognition solution for practical applications.

[0015] Optionally, training the attribute recognition model based on the labeled data to obtain a basic attribute recognition model specifically includes: comparing the final attribute information with the labeled data to determine whether there is a new attribute; if there is a new attribute, freezing the network parameters used to extract general features in the attribute recognition model, structurally expanding the classification head of the attribute recognition model, and using the first labeled data containing the new attribute to perform specialized training on the classification head to obtain the basic attribute recognition model; if there is no new attribute, using a preset learning rate, using the labeled data to perform global fine-tuning training on the attribute recognition model to obtain the basic attribute recognition model.

[0016] By employing the above technical solution, the attribute categories contained in the labeled data are analyzed and compared with the current attribute recognition model to determine whether any new attributes exist. When new attributes exist, the network parameters used to extract general features in the attribute recognition model are frozen, the classification head is structurally expanded, and the classification head is specifically trained using labeled data containing the new attributes, resulting in a basic attribute recognition model supporting the new attributes. When no new attributes exist, a preset learning rate is used, and the entire attribute recognition model is globally fine-tuned using labeled data to obtain a performance-optimized basic attribute recognition model. This method achieves adaptive expansion and updating of the attribute recognition model through the judgment and processing of new attributes. When new attribute categories appear, the structural expansion and specialized training of the classification head quickly adapt to new attribute recognition requirements, improving the model's scalability and flexibility. Simultaneously, for existing attributes, global fine-tuning further optimizes the model's recognition performance, improving its accuracy and generalization ability. This method, while ensuring model stability, achieves dynamic evolution and self-improvement of the model, providing an efficient and flexible solution for attribute category changes in practical applications.

[0017] Optionally, before fusing the basic attribute recognition model with the context adaptation model to obtain the target attribute recognition model, the method further includes: comparing the final attribute information with the labeled data to obtain confusion events; determining the systematic error pattern of the attribute recognition model based on the confusion events and historical confusion events; assigning preset weights to second labeled data in the labeled data that match the systematic error pattern to form a weighted training dataset, and using the weighted training dataset to train the basic attribute recognition model.

[0018] By employing the aforementioned technical solution, the labeled data and final attribute information are compared to identify and record confusion events, i.e., situations where attribute recognition errors or inconsistencies occur. Based on current and historical confusion events, systematic error patterns of the attribute recognition model are analyzed to identify recognition problems that the model is prone to in specific attributes or scenarios. For these error patterns, corresponding samples are matched in the labeled data and assigned preset weights to form a weighted training dataset. Finally, the basic attribute recognition model is trained using the weighted training dataset, enhancing the model's ability to learn and distinguish easily confused attributes. This method achieves targeted optimization and improvement of the attribute recognition model through the analysis and feedback of confusion events. By discovering systematic error patterns, the model's weaknesses and difficult attributes are effectively located, providing guidance for the model's optimization direction. The weighted training strategy enhances the model's learning of key samples, improving the model's recognition accuracy on easily confused attributes. Simultaneously, by continuously accumulating and updating confusion events, the model achieves continuous learning and self-improvement, continuously enhancing the performance and robustness of attribute recognition. This method makes full use of user feedback and interaction data, establishes a closed-loop mechanism for model optimization, and provides the ability to continuously optimize and improve attribute recognition in practical applications.

[0019] A second aspect of this application provides an attribute-driven dynamic model optimization system, comprising a parameter acquisition module, an object detection module, an attribute recognition module, an alarm module, a manual annotation module, and a self-training module, wherein: the parameter acquisition module is used to acquire algorithm configuration parameters, including an attribute recognition switch and a self-training switch; the object detection module is used to process the image to be detected using an object detection model to obtain the target object in the image to be detected; the attribute recognition module is used to determine whether the attribute recognition switch is turned on; the attribute recognition module is further used to, if it is determined that the attribute recognition switch is turned on, input the target object into the attribute recognition model to obtain the corresponding attribute recognition model for the target object. The initial attribute information is obtained from the target object. The attribute recognition module is further configured to post-process the initial attribute information based on preset attribute association rules to generate final attribute information. The alarm module is configured to generate an alarm event when it is determined that the final attribute information meets preset alarm conditions. The alarm event includes the target object and the final attribute information. The manual annotation module is configured to respond to the alarm event, display the target object and the final attribute information on the user interface, and receive the user's correction operation on the final attribute information to obtain annotation data. The self-training module is configured to train the attribute recognition model based on the annotation data when it is determined that the self-training switch is triggered to obtain a target attribute recognition model.

[0020] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any of the foregoing.

[0021] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed, perform the method described in any of the preceding descriptions.

[0022] In summary, one or more technical solutions provided in this application have at least the following technical effects or advantages: 1. This method reduces false alarms and improves recognition accuracy and precision through post-processing based on attribute association rules. At the same time, it provides a user correction mechanism to ensure the high quality of labeled data, provides an accurate data foundation for model optimization, improves model performance through data-driven approaches, and ensures that the model can adapt to complex real-world scenarios.

[0023] 2. By introducing attribute recognition switches and self-training switches, this method can dynamically determine whether to perform attribute recognition after target detection, and post-process the initial attribute information by combining attribute association rules (such as attribute alarm rules, coexistence rules, and mutual exclusion rules) during the recognition process. This dynamic optimization and rule constraint mechanism effectively reduces false alarms and false negatives, and improves the accuracy and reliability of the final attribute information.

[0024] 3. This method utilizes user-labeled data to self-train the attribute recognition model. By freezing the network parameters for general feature extraction, expanding the classification head, and introducing a context-adaptive model, it achieves rapid adaptation to new attributes and optimization for context-specific data. Furthermore, by fusing the basic attribute recognition model and the context-adaptive model, the model's adaptability in different scenarios and tasks is further improved, ensuring continuous optimization of recognition performance.

[0025] 4. By analyzing confusion events and historical error patterns, this method can identify systematic errors in attribute recognition models and assign weights to corresponding labeled data based on error patterns, forming a weighted training dataset. This not only optimizes the training process and reduces the impact of systematic errors on model performance, but also significantly improves training efficiency, enabling the model to evolve and improve performance more efficiently. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of a scenario for an attribute-driven dynamic model optimization method disclosed in an embodiment of this application; Figure 2This is a flowchart illustrating an attribute-driven dynamic model optimization method disclosed in an embodiment of this application. Figure 3 This is another flowchart illustrating an attribute-driven dynamic model optimization method disclosed in an embodiment of this application; Figure 4 This is a schematic diagram of a module of an attribute-driven dynamic model optimization system disclosed in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.

[0027] Explanation of reference numerals in the attached figures: 401, Parameter acquisition module; 402, Target detection module; 403, Attribute recognition module; 404, Alarm module; 405, Manual annotation module; 406, Self-training module; 500, Electronic device; 501, Processor; 502, Communication bus; 503, User interface; 504, Network interface; 505, Memory. Detailed Implementation

[0028] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0029] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0030] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0031] like Figure 1 As shown, Figure 1This is a schematic diagram of an attribute-driven dynamic model optimization scenario provided in this application. The modules on the left side of the image, such as "Algorithm Configuration," "Self-Training," "Alarm Details," and "False Alarm Suppression," represent the core functional modules of the system. Algorithm Configuration is used to set relevant algorithm parameters, including attribute recognition and self-training switches. Self-Training: When the self-training switch is triggered, the system improves the attribute recognition model based on user-corrected labeled data. Alarm Details displays detailed information about alarm events. False Alarm Suppression filters unnecessary alarms, improving the system's accuracy. The alarm image contains the target object and three attribute information (attribute 1, attribute 2, and attribute 3).

[0032] According to the technical solution, when the attribute recognition switch is turned on, the target detection model first detects the target object in the image, and then the attribute recognition model extracts the initial attribute information of the target object. The system then performs post-processing on the initial attribute information according to preset attribute association rules to generate the final attribute information. If these attributes meet specific alarm conditions, an alarm event will be generated. Users can view the alarm image and the corresponding attribute information (such as attribute 1, attribute 2, attribute 3) on the interactive interface.

[0033] If the attribute information identified by the system is incorrect, the user can perform correction operations. The corrected labeled data will be recorded by the system and used for subsequent model self-training to improve the model's recognition accuracy. The overall system process is as follows: object detection → attribute recognition → attribute post-processing → alarm event generation → user correction → self-training optimization.

[0034] This application provides an attribute-driven dynamic model optimization method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating an attribute-driven dynamic model optimization method provided in an embodiment of this application. The method is applied to a server, which executes the attribute-driven dynamic model optimization program. The server can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. The method includes steps S201 to S208, as follows: Step S201: Obtain algorithm configuration parameters, which include attribute recognition switch and self-training switch.

[0035] In step S201, the server can prepare a configuration file in advance, which defines the default values ​​for the attribute recognition switch and the self-training switch. The server reads this configuration file upon startup and obtains the corresponding parameter values. The server can provide a user interface allowing users to manually set the attribute recognition switch and the self-training switch. For example, the server can provide corresponding options or switches on a web management platform, allowing administrators to enable or disable the corresponding functions by checking or sliding the switches, and the server obtains the user's settings as algorithm configuration parameters.

[0036] The server can integrate with upper-layer application systems and receive control commands from them. For example, when the server provides a video analytics service to multiple client applications, each client application can pass corresponding attribute recognition and self-training commands when calling the service interface, based on its own needs. The server then parses the command content and extracts the corresponding configuration parameters.

[0037] The server can dynamically decide whether to enable attribute recognition and self-training functions based on factors such as the current system operating status, resource usage, and task type. For example, when the server load is high, the self-training function can be temporarily disabled to save computing resources; when the type of target object being identified does not require attribute analysis, the attribute recognition function can be dynamically turned off.

[0038] After obtaining the configuration parameters for the attribute recognition switch and the self-training switch, the server stores them in a global configuration object in memory for access and judgment in subsequent steps. The values ​​of these configuration parameters can be boolean, such as true for on and false for off; or they can be enumerations, such as "on" for on and "off" for off.

[0039] Step S202: Use an object detection model to process the image to be detected to obtain the target object in the image.

[0040] In step S202, the server obtains the image to be detected from an image data source, which can be a local storage device, a network data stream, or a real-time video capture device. After obtaining the image data, the server converts it into a format and size suitable for the input of the object detection model, such as scaling the image to a fixed size or normalizing pixel values.

[0041] Then, the server loads a pre-trained object detection model, inputting the pre-processed image data into the model for forward inference. The object detection model employs a deep convolutional neural network architecture, such as YOLO, SSD, or Faster R-CNN, to locate and classify target objects through multi-layer feature extraction and target bounding box regression. The output of the object detection model includes the coordinate information of several target bounding boxes and the corresponding target category confidence scores.

[0042] Next, the server performs post-processing on the target detection results output by the target detection model. First, based on a preset confidence threshold, detection results with low confidence are filtered out to reduce false detections. Then, for detection boxes with high overlap, a non-maximum suppression algorithm is used to merge them, preventing the same target from being detected repeatedly. The post-processed target detection results contain the location coordinates and category information of each target object in the image.

[0043] Finally, the server structures and encapsulates the detected target object information into a data format that facilitates subsequent processing. For example, attributes such as target location coordinates, category labels, and confidence levels can be organized into JSON or XML data structures for easy transmission and storage.

[0044] For example, in the field of intelligent security, servers can acquire video streams from surveillance cameras in real time and perform target detection processing on each frame. By loading a pre-trained pedestrian detection model, the server can quickly identify pedestrian targets in the image and return the bounding box coordinates and confidence score for each pedestrian. This structured pedestrian target information can be further passed to subsequent modules such as attribute recognition, tracking analysis, and abnormal behavior detection to build a complete intelligent monitoring and analysis system.

[0045] Step S203: Determine whether the attribute recognition switch is turned on.

[0046] In step S203, the server first reads the algorithm configuration parameters obtained in step S201 and extracts the value of the attribute recognition switch. This switch is usually a Boolean variable, with a value of true or false, representing the on or off state of the attribute recognition function.

[0047] If the attribute recognition switch is set to true, it indicates that the user wants to obtain the attribute information of the target object based on the object detection, and the server will execute the subsequent attribute recognition process. Conversely, if the attribute recognition switch is set to false, the server will skip the attribute recognition step and directly use the object detection result output in step S202 as the final output. In this case, the algorithm only focuses on the location and category information of the target object, without paying attention to its detailed attributes, and is usually suitable for applications with high real-time requirements or limited computing resources.

[0048] The server dynamically adjusts the algorithm's execution flow based on the status of the attribute recognition switch, demonstrating the algorithm's adaptability to user needs. Through this switch mechanism, users can flexibly control the algorithm's functional scope and computational overhead, balancing recognition accuracy and real-time performance according to actual application requirements and system resource availability. Simultaneously, this mechanism supports modular algorithm design, enabling decoupled development and optimization of target detection and attribute recognition, thus improving system scalability and maintainability.

[0049] Step S204: If the attribute recognition switch is turned on, input the target object into the attribute recognition model to obtain the initial attribute information corresponding to the target object.

[0050] In step S204, the target object is input into the attribute recognition model to obtain the initial attribute information corresponding to the target object. Specifically, this includes: obtaining the preliminary detection results output by the target detection model, which include the bounding box coordinates, main category label, and main category confidence of each target object; assigning each target object to the corresponding processing channel according to the main category confidence of each target object to obtain the channel output results; and combining the channel output results of each processing channel to obtain the initial attribute information corresponding to the target object.

[0051] Specifically, the server first obtains the preliminary detection results output by the object detection model. These results include the location coordinates of each object, its primary category, and the corresponding confidence score. The location coordinates are usually given in the form of a bounding box, which defines the spatial extent of the object in the image. The primary category label indicates the high-level semantic category of the object, such as person, vehicle, animal, etc. The confidence score reflects the model's degree of confidence in the primary category judgment, and its value is usually between 0 and 1, with a higher value indicating a higher degree of confidence in the judgment.

[0052] Next, the server dynamically allocates each target object to different processing channels based on its primary category confidence level. This allocation mechanism aims to employ differentiated attribute recognition strategies for targets with varying confidence levels, balancing recognition accuracy and computational cost. Specifically, targets with higher confidence levels are assigned to the "refined attribute recognition channel," which employs a larger-scale attribute recognition model, considering more attribute categories to obtain a fine-grained attribute description of the target. Targets with lower confidence levels are assigned to the "coarse-grained attribute recognition channel," which uses a relatively simplified attribute recognition model, considering only a few key attributes to reduce computational load and error risk. Targets in between are assigned to the "general attribute recognition channel," which uses a moderately complex attribute recognition model, balancing recognition accuracy and efficiency. The server adaptively allocates targets across different channels based on a pre-defined confidence threshold range.

[0053] Within each processing channel, the server uses the attribute recognition model employed in that channel to predict the attributes of the assigned target object. The attribute recognition model typically employs a deep learning architecture similar to that of the object detection model, but sets richer attribute categories in the output layer to achieve multi-attribute judgment of the target. The model's input is an image patch of the target object, extracted from the original image by the target's bounding box coordinates. The model's output consists of the target's label and confidence score across each attribute dimension, representing the target's attribute features.

[0054] Finally, the server summarizes and integrates the attribute recognition results output from each processing channel to obtain the initial attribute information for each target object. This information is presented in a structured form, including the target's location, main category, attribute labels, and confidence levels, comprehensively depicting the target's visual features and semantic attributes.

[0055] For example, in a smart transportation scenario, intersection surveillance footage captured by cameras is sent to a server for analysis. First, a target detection model identifies various traffic participants in the image, such as pedestrians and vehicles. Then, these detected targets are passed to an attribute recognition module for further analysis. For vehicle targets with high confidence, the server assigns them to a fine-grained attribute recognition channel to determine specific attributes such as brand, model, and color. For pedestrian targets with low confidence, the server assigns them to a coarse-grained attribute recognition channel, distinguishing only basic attributes such as gender and age. For non-motorized vehicle targets with moderate confidence, such as bicycles and electric bikes, they are assigned to a general attribute recognition channel, which handles moderately difficult attributes such as vehicle type and rider equipment. By employing differentiated attribute recognition strategies for different targets, the server can acquire the most comprehensive and accurate target attribute information possible with limited computing resources, providing data support for smart traffic management and decision analysis.

[0056] In one possible implementation, each target object is assigned to a corresponding processing channel based on its main category confidence score, and the channel output results are obtained, specifically including, for example... Figure 3 Steps S305-S306 are shown. Figure 3 This is another flowchart illustrating the attribute-driven dynamic model optimization method, where: Step S305: When the confidence of the main category is greater than the preset first confidence threshold, perform comprehensive attribute recognition processing on the target object to obtain the channel output result containing all preset attribute dimensions; Step S306: When the confidence level of the main category is less than or equal to the preset first confidence threshold and the confidence level of the main category is greater than the preset second confidence threshold, the core attribute recognition processing is performed on the target object to obtain the channel output result containing the preset key attribute dimensions. The preset second confidence threshold is less than the preset first confidence threshold.

[0057] Specifically, the server first determines the primary category of each target object, such as "person" or "vehicle," and calculates the confidence score for that primary category, which is the probability that the object detection model determines that the object belongs to that category. Then, the server compares this confidence score with two preset thresholds and assigns the target object to the corresponding processing channel based on the comparison results.

[0058] Comprehensive Attribute Recognition Channel: When the main category confidence of a target object is greater than a preset first confidence threshold, the server assigns the target object to the comprehensive attribute recognition channel. This channel performs a complete attribute recognition process on the target object, including extracting target image features, running the attribute recognition model, and parsing the model output, ultimately obtaining a recognition result containing all preset attribute dimensions. For example, for a "person" target with a high confidence level, the server assigns it to the comprehensive attribute recognition channel, which outputs attribute information such as "age: youth, gender: male, top: white T-shirt, bottom: blue jeans".

[0059] Core Attribute Recognition Channel: When the main category confidence score of a target object is less than or equal to the first confidence threshold and greater than the preset second confidence threshold, the server assigns the target object to the core attribute recognition channel. This channel only performs the recognition of some key attributes of the target object, skipping the processing steps of non-core attributes, thus reducing computational load and increasing speed. Core attributes are predefined according to specific application requirements and typically include several attribute dimensions that are crucial to the business. For example, in a vehicle monitoring scenario, license plate number, vehicle color, and vehicle model can be used as core attributes; in a personnel detection scenario, gender, age group, and whether a hat is worn can be used as core attributes.

[0060] Other cases: When the confidence of the main category of the target object is less than or equal to the second confidence threshold, it means that the target detection model is not sure about the classification of the object and the reliability of the attribute recognition result is also low. Therefore, the server can choose to skip the attribute recognition step of the target object to avoid invalid calculation.

[0061] Through the aforementioned channel-based processing mechanism, the server can dynamically adjust the granularity and complexity of attribute recognition based on different confidence levels. When the confidence level is high, attributes are comprehensively recognized to obtain the most detailed object description possible; when the confidence level is moderate, core attributes are prioritized for recognition to ensure the acquisition of key information; and when the confidence level is low, attribute recognition is skipped to save computational resources. This dynamic channel allocation mechanism can significantly improve the server's processing efficiency and ensure optimal attribute recognition performance with limited resources.

[0062] It should be noted that the preset first confidence threshold and the preset second confidence threshold can be flexibly set according to actual needs. Typically, the preset second confidence threshold is lower than the preset first confidence threshold to achieve gradual adjustment of processing granularity. The server can adaptively adjust the thresholds through experiments and statistical analysis to achieve optimal performance.

[0063] Step S205: Based on the preset attribute association rules, post-process the initial attribute information to generate the final attribute information.

[0064] In step S205, the initial attribute information includes multiple attributes and the confidence level corresponding to each attribute. The preset attribute association rules include attribute alarm rules, attribute coexistence rules, and attribute mutual exclusion rules. Based on the preset attribute association rules, the initial attribute information is post-processed to generate the final attribute information, specifically including, for example... Figure 3 Steps S308-S316 are shown, wherein; Step S308: According to the attribute alarm rules, the initial attribute information is divided into an alarm attribute set and a non-alarm attribute set. The alarm attribute set is used to trigger system alarms, and the non-alarm attribute set does not trigger system alarms. Step S309: According to the attribute coexistence rule, determine whether there is a second attribute that coexists with the first attribute. The first attribute is any one of the multiple attributes included in the alarm attribute set. Step S310: If it is determined that a second attribute coexists with the first attribute, then determine whether the second attribute is in the alarm attribute set; Step S311: If it is determined that the second attribute is not in the alarm attribute set, then remove the first attribute from the alarm attribute set and add it to the non-alarm attribute set, or set the first confidence level of the first attribute to zero, to obtain the first alarm attribute set; Step S312: Based on the attribute mutual exclusion rule, determine whether there exists a third attribute that is mutually exclusive with the first attribute; Step S313: If it is determined that there is a third attribute that is mutually exclusive with the first attribute, then determine whether the third attribute is in the alarm attribute set; Step S314: If it is determined that the third attribute is in the alarm attribute set, then compare the first confidence level with the second confidence level corresponding to the third attribute; Step S315: If it is determined that the first confidence level is greater than the second confidence level, then remove the third attribute from the alarm attribute set and add it to the non-alarm attribute set, or set the second confidence level of the third attribute to zero to obtain the second alarm attribute set; Step S316: Obtain the final attribute information based on the first alarm attribute set and the second alarm attribute set.

[0065] Specifically, the server first loads pre-defined attribute association rules from storage devices or memory, including attribute alert rules, attribute coexistence rules, and attribute mutual exclusion rules. These rules can be pre-defined based on expert knowledge or data statistics and are used to characterize the logical relationships and business constraints between different attributes.

[0066] Next, the server divides the initial attribute information into an alarm attribute set and a non-alarm attribute set according to the attribute alarm rules. Alarm attributes typically correspond to object states that require special attention, such as "not wearing a helmet" or "driving in the wrong direction." The occurrence of these attributes should trigger a system alarm to indicate an abnormal situation. Non-alarm attributes correspond to regular descriptive attributes, such as "male" or "red vehicle." The server quickly filters out alarm attributes and non-alarm attributes by matching each attribute in the initial attribute information using the attribute alarm rules.

[0067] After defining the alarm attribute set, the server further checks the alarm attributes using attribute coexistence rules. Attribute coexistence rules define that certain attributes must coexist to constitute a valid alarm. For example, the alarm attribute "vehicle occupying the emergency lane" needs to coexist with the attribute "emergency lane". The server iterates through each attribute (the first attribute) in the alarm attribute set, checking if its coexisting attribute (the second attribute) is also in the alarm attribute set. If not, the first attribute is removed from the alarm attribute set or its confidence is reset to zero, thus obtaining an updated alarm attribute set (the first alarm attribute set). Through this step, the server filters out incomplete or inconsistent combinations of alarm attributes.

[0068] Then, the server further optimizes the updated alarm attribute set using attribute mutual exclusion rules. Attribute mutual exclusion rules define that certain attributes cannot appear simultaneously; they represent contradictory or conflicting semantics. For example, the attributes "turn left" and "turn right" cannot both be true. The server iterates through each attribute in the alarm attribute set again (the first attribute), checking if its mutually exclusive attribute (the third attribute) is also in the alarm attribute set. If it exists, the server compares the confidence levels of the two attributes, retaining the attribute with higher confidence and removing or resetting the confidence level of the attribute with lower confidence, thus obtaining the final alarm attribute set (the second alarm attribute set). Through this step, the server resolves logical conflicts between attributes, improving the accuracy of alarm results.

[0069] Finally, the server merges the second set of alarm attributes and the non-alarm attribute set to obtain the final attribute information of the target object, which includes the most critical alarm attributes and other descriptive attributes. This final attribute information will serve as the basis for subsequent alarm decisions and business processing.

[0070] Step S206: When it is determined that the final attribute information meets the preset alarm conditions, an alarm event is generated. The alarm event includes the target object and the final attribute information.

[0071] In step S206, the server first loads preset alarm conditions from storage devices or memory. These alarm conditions define the attribute combination patterns that need to trigger an alarm. For example, in a construction site safety monitoring scenario, the alarm condition could be the simultaneous occurrence of the "not wearing a safety helmet" attribute and the "entering a dangerous area" attribute; in a traffic violation detection scenario, the alarm condition could be the simultaneous occurrence of the "vehicle" attribute and the "driving in the wrong direction" attribute. These alarm conditions can be pre-configured according to different application scenarios and business rules and stored in the server's rule base.

[0072] Next, the server matches the final attribute information with preset alarm conditions to determine if there is an attribute combination that meets the alarm triggering requirements. Specifically, the server iterates through each alarm condition in the rule base, comparing its attribute patterns with the final attribute information to check if the final attribute information contains all the attributes required by the alarm conditions. This matching process can be implemented using techniques such as regular expressions and keyword search, or the attributes can be converted into a structured data format (such as attribute key-value pairs) and efficiently matched using database queries or graph searches.

[0073] If the server finds that the final attribute information meets a preset alarm condition—that is, the attribute combination completely matches the requirements of the alarm condition—it determines that a corresponding alarm event needs to be generated. An alarm event typically contains two key elements: the target object and the attribute information that triggered the alarm. The target object refers to the subject related to the alarm event; it can be a specific region in an image or video (e.g., represented by a bounding box) or a unique identifier for the target (e.g., a target ID). The attribute information that triggered the alarm comes from the portion of the final attribute information that meets the alarm condition.

[0074] The server constructs alarm event objects based on the above elements and saves them persistently to the alarm event database. Alarm event objects can use structured data formats such as JSON or XML for easy subsequent querying, transmission, and display. After generating an alarm event, the server can further process and respond to the event according to actual needs. Common processing methods include: pushing alarm notifications to relevant responsible persons, displaying alarm information in real time on the monitoring interface, and triggering automated control or protection measures. These processing steps can be integrated with other modules of the server or external systems to build a complete alarm response loop.

[0075] Step S207: Respond to the alarm event, display the target object and final attribute information on the user interface, receive the user's correction operation on the final attribute information, and obtain the annotation data.

[0076] In step S207, the server first extracts relevant visual content from the original image or video data based on the target object information in the alarm event. For example, the server can crop the target region from the corresponding video frame or image based on the target bounding box position recorded in the alarm event, generating an independent target image. This process can be implemented using image processing libraries such as OpenCV to ensure that the visual content displayed to the user corresponds to the alarm event.

[0077] The server then sends the extracted target image and attribute information from the alarm event to the user interface for display. The user interface can be a web application running in the user's browser, or a mobile application installed on the user's phone or tablet. Regardless of the form, the user interface should provide a user-friendly and intuitive display, allowing users to quickly understand the content of the alarm event.

[0078] On the user interface, the server prominently displays the target image to attract the user's attention. Simultaneously, the server displays the attribute information of the alarm event next to the target image in a list or table format, listing the name and value of each attribute. Next, the server provides users with interactive functionality to modify the attribute information. Users can edit or select the value of an attribute by clicking on an item in the attribute list. For example, a user can change the "behavior" attribute from "intrusion" to "accidental entry," or select a more specific behavior type from the drop-down menu. The server receives the user's corrections in real time and updates the attribute display on the interface accordingly.

[0079] After the user completes the attribute correction, the server associates the corrected attribute information with the identifier of the target object, forming a labeled data entry. This labeled data represents the user's understanding and acceptance of the target object's attributes and can serve as a monitoring signal for algorithm optimization. The server saves the labeled data to a database, storing it in association with the original alarm events for subsequent model training and analysis.

[0080] It should be noted that not all users have the permission or willingness to modify the attributes of alarm events. Therefore, the server can control access to the attribute modification function based on factors such as user identity and role. For example, only system administrators or expert users may be allowed to modify attributes, while ordinary users can only view alarm event information and cannot edit it.

[0081] Step S208: When the self-training switch is triggered, the attribute recognition model is trained based on the labeled data to obtain the target attribute recognition model.

[0082] In step S208, the attribute recognition model is trained based on the labeled data to obtain the target attribute recognition model. Specifically, this includes: training the attribute recognition model based on the labeled data to obtain the basic attribute recognition model; assigning a corresponding context identifier to each image to be detected according to its image source; binding the labeled data with the context identifier of the image to be detected when receiving the labeled data from the user; freezing the main parameters of the attribute recognition model and training the context adaptation model corresponding to the context identifier using the labeled data bound to the context identifier; and fusing the basic attribute recognition model and the context adaptation model to obtain the target attribute recognition model.

[0083] Specifically, the server first uses the labeled data collected in step S207 to retrain the original attribute recognition model, obtaining a basic attribute recognition model. This training process can employ common supervised learning algorithms, such as convolutional neural networks and recurrent neural networks. The target image in the labeled data is used as input, and the user-corrected attribute information is used as labels. The model's weights and biases are updated through backpropagation, ensuring that the model's output is as close as possible to the user-provided annotations. After training, the basic attribute recognition model can achieve good attribute recognition performance across the entire dataset, but it may not be fully adaptable to the image features and attribute distributions in certain specific scenarios.

[0084] To further enhance the model's adaptability in different scenarios, the server introduces the concepts of context identifiers and context-adaptive models. Specifically, the server assigns a context identifier to each image to be detected, representing the specific application scenario or data source to which the image belongs. Context identifiers can be automatically generated based on the image's metadata (such as shooting location, time, device, etc.) or manually specified by the user.

[0085] When a user provides attribute annotation data for an image to be detected, the server not only uses the annotation data to train the basic attribute recognition model, but also associates it with the image's context identifier to form a context-specific annotation dataset. These annotation datasets reflect the characteristics of users' understanding and annotation of attributes in different contexts, containing rich scene adaptation information.

[0086] Next, the server trains a corresponding context adaptation model for each context identifier. The structure of the context adaptation model can be the same as the basic attribute recognition model, but during training, it only uses the labeled data associated with the current context identifier, instead of the entire dataset. Simultaneously, the server freezes the main parameters of the basic attribute recognition model (such as the weights of convolutional and pooling layers), allowing only the top-level parameters of the context adaptation model (such as the weights of fully connected layers) to be updated. This parameter freezing strategy ensures that the context adaptation model adapts to specific scenarios without excessively altering the general feature representations already learned by the basic attribute recognition model.

[0087] Through the training process described above, the server obtained multiple context adaptation models, each corresponding to a specific context identifier. These context adaptation models, based on the basic attribute recognition model, specifically learned the attribute distribution and user preferences in different scenarios, enabling them to better handle image data from specific contexts.

[0088] Finally, the server fuses the basic attribute recognition model and the context adaptation model to obtain the final target attribute recognition model. The fusion method can be weighted averaging, where the corresponding context adaptation model is selected based on the context identifier of the image to be detected, and its output is weighted and averaged with the output of the basic attribute recognition model to obtain the final attribute recognition result. The weights can be dynamically adjusted based on the amount of data and the quality of user feedback in different contexts to achieve the optimal fusion effect.

[0089] In one possible implementation, the attribute recognition model is trained based on labeled data to obtain a basic attribute recognition model. Specifically, this includes: comparing the final attribute information with the labeled data to determine whether there are any new attributes; if there are new attributes, freezing the network parameters used to extract general features in the attribute recognition model, structurally expanding the classification head of the attribute recognition model, and using the first labeled data containing the new attributes to specifically train the classification head to obtain the basic attribute recognition model; if there are no new attributes, using a preset learning rate, the attribute recognition model is globally fine-tuned using the labeled data to obtain the basic attribute recognition model.

[0090] The server first compares the final attribute information generated in step S207 with the pre-stored labeled data. The labeled data represents the attribute categories and value ranges that the system currently supports for recognition, and is usually defined and labeled during the initial training phase of the attribute recognition model. By comparing the final attribute information and the labeled data, the server can determine whether new categories or values ​​have appeared in the attributes labeled by the user, that is, whether there are any newly added attributes that the model has not yet learned.

[0091] If the server detects a new attribute in the user-annotated data, it needs to expand and adjust the structure of the attribute recognition model accordingly. Specifically, the server freezes some network parameters responsible for extracting general features in the attribute recognition model, such as the weights of convolutional and pooling layers, to ensure that the general feature representations already learned by the model are not affected by the new attribute. Simultaneously, the server expands the classification head (usually a fully connected layer) of the attribute recognition model, adding neurons and weights corresponding to the new attribute. This structural expansion enables the model to output prediction results for the new attribute without affecting the recognition performance of the original attributes.

[0092] After structural expansion, the server selects samples containing the new attributes from the labeled data to form a dedicated training set. This training set, called the first labeled data, specifically covers various examples and variations of the new attributes. The server uses the first labeled data to perform specialized training on the expanded classifier head, updating its weights through backpropagation to accurately identify and predict the new attributes. Because the network parameters for the general feature extraction part are frozen, specialized training can be performed quickly without requiring time-consuming retraining of the entire model. After specialized training, the attribute recognition model retains its original attribute recognition capabilities while also learning to recognize the new attributes, forming a more comprehensive and powerful basic attribute recognition model.

[0093] If the server finds that no new attributes exist in the user-annotated data, meaning all annotated attributes are within the defined range of the annotated data, then no adjustments to the attribute recognition model's structure are needed. In this case, the server uses a preset learning rate and all annotated data to perform global fine-tuning training on the attribute recognition model. Global fine-tuning training is a common transfer learning strategy that, while preserving the model's existing knowledge, uses new annotated data to make small adjustments and optimizations to all parameters of the model, enabling the model to better adapt to the current data distribution and user preferences.

[0094] In global fine-tuning training, the server updates all weights of the attribute recognition model, including the general feature extraction part and the attribute classification head, with a small learning rate using optimization algorithms such as stochastic gradient descent. This small parameter adjustment can further improve the model's performance on the current dataset without compromising its original capabilities. Global fine-tuning training typically requires multiple iterations to gradually refine and strengthen the model's attribute recognition capabilities. After global fine-tuning training, the attribute recognition model can more accurately and robustly handle various attribute combinations in user-labeled data, forming a more reliable basic attribute recognition model.

[0095] In one possible implementation, before fusing the basic attribute recognition model with the context adaptation model to obtain the target attribute recognition model, the method further includes: comparing the final attribute information with the labeled data to obtain confusion events; determining the systematic error patterns of the attribute recognition model based on the confusion events and historical confusion events; assigning preset weights to the second labeled data in the labeled data that match the systematic error patterns to form a weighted training dataset, and using the weighted training dataset to train the basic attribute recognition model.

[0096] Specifically, the server first compares the final attribute information generated in step S207 with the pre-stored labeled data to identify any differences or conflicts, thus creating a confusion event. A confusion event indicates that the attribute recognition model is prone to misjudgment or omission under certain specific circumstances, reflecting some systemic defects or blind spots in the model.

[0097] For example, if the labeled data defines "red" as a vehicle color value, but the final attribute information identifies a red vehicle as "orange," it indicates that the attribute recognition model is confusing red and orange. As another example, if the labeled data defines "wearing a helmet" as a necessary attribute, but the final attribute information omits this attribute, it indicates that the attribute recognition model is missing information when detecting helmet wearing.

[0098] The server records each obfuscation event in a standardized form and summarizes and analyzes it with historical obfuscation events. Through statistical analysis and mining of obfuscation events, the server gradually discovered some systematic error patterns in the attribute recognition model, namely, the frequent misjudgments or omissions that occur under specific attributes, specific scenarios, or specific data conditions.

[0099] After identifying systematic error patterns, the server begins filtering and weighting the user-labeled data. Specifically, the server examines each sample in the labeled data to determine if it matches a known systematic error pattern. If a sample corresponds to an error pattern, such as similar attribute definitions or similar image scenes, it is marked as secondary labeled data and assigned a pre-defined high weight. The weight can be dynamically adjusted based on factors such as the severity and frequency of the error pattern, with the aim of making the model pay more attention to these error-prone samples during training.

[0100] After filtering and weighting, the server obtains a weighted training dataset containing a large number of samples related to systematic error patterns, which are given higher importance during training. The server uses this weighted training dataset to further train and optimize the basic attribute recognition model, updating the model parameters through the backpropagation algorithm to better handle and correct error-prone situations.

[0101] During training, the server dynamically adjusts sample weights to specifically enhance the model's learning and memorization of particular error patterns. For highly weighted second-labeled data, the model tends to allocate more computational resources and attention to ensure correct recognition results on these key samples. Meanwhile, for other ordinary samples, the model learns in a relatively balanced manner, avoiding excessive bias towards certain special cases at the expense of overall recognition accuracy.

[0102] Through this optimization strategy based on confusion events and weighted training, the server further improved the performance and generalization ability of the basic attribute recognition model. The model can not only accurately identify attributes in general situations but also effectively handle special cases that are prone to confusion and errors, demonstrating stronger adaptability and robustness. This lays a more solid foundation for subsequent context adaptation and model fusion, enabling the final target attribute recognition model to maintain stable and excellent performance in various complex scenarios.

[0103] Reference Figure 4 This application also provides an attribute-driven dynamic model optimization system. This system is a server, which includes a parameter acquisition module 401, an object detection module 402, an attribute recognition module 403, an alarm module 404, a manual annotation module 405, and a self-training module 406. Specifically: the parameter acquisition module 401 acquires algorithm configuration parameters, including an attribute recognition switch and a self-training switch; the object detection module 402 processes the image to be detected using an object detection model to obtain the target object in the image; the attribute recognition module 403 determines whether the attribute recognition switch is on; and if the attribute recognition switch is determined to be on, the attribute recognition module 403 inputs the target object into the attribute recognition model to obtain the target object. The system includes: initial attribute information; attribute recognition module 403, which is further used to post-process the initial attribute information based on preset attribute association rules to generate final attribute information; alarm module 404, which generates an alarm event when the final attribute information meets preset alarm conditions, the alarm event including the target object and the final attribute information; manual annotation module 405, which responds to the alarm event, displays the target object and the final attribute information on the user interface, and receives the user's correction operation on the final attribute information to obtain annotation data; and self-training module 406, which trains the attribute recognition model based on the annotation data when the self-training switch is triggered to obtain the target attribute recognition model, and recognizes the image to be detected according to the target attribute recognition model to obtain the recognition result.

[0104] In one possible implementation, the initial attribute information includes multiple attributes and the confidence level corresponding to each attribute. The preset attribute association rules include attribute alarm rules, attribute coexistence rules, and attribute mutual exclusion rules. The attribute identification module 403, based on the preset attribute association rules, performs post-processing on the initial attribute information to generate final attribute information. Specifically, the attribute identification module 403 divides the initial attribute information into an alarm attribute set and a non-alarm attribute set according to the attribute alarm rules. The alarm attribute set is used to trigger system alarms, while the non-alarm attribute set does not trigger system alarms. The attribute identification module 403, according to the attribute coexistence rules, determines whether a second attribute exists that coexists with a first attribute. The first attribute is any one of the multiple attributes included in the alarm attribute set. If it is determined that a second attribute coexists with the first attribute, the attribute identification module 403 determines whether the second attribute is in the alarm attribute set. If it is determined that the second attribute is not in the alarm attribute set... If the attribute recognition module 403 removes the first attribute from the alarm attribute set and adds it to the non-alarm attribute set, or sets the first confidence level of the first attribute to zero, it obtains the first alarm attribute set. The attribute recognition module 403 then determines whether a third attribute mutually exclusive with the first attribute exists according to the attribute mutual exclusion rule. If a third attribute mutually exclusive with the first attribute exists, the attribute recognition module 403 determines whether the third attribute is in the alarm attribute set. If the third attribute is in the alarm attribute set, the attribute recognition module 403 compares the first confidence level with the second confidence level corresponding to the third attribute. If the first confidence level is greater than the second confidence level, the attribute recognition module 403 removes the third attribute from the alarm attribute set and adds it to the non-alarm attribute set, or sets the second confidence level of the third attribute to zero, it obtains the second alarm attribute set. The attribute recognition module 403 obtains the final attribute information based on the first alarm attribute set and the second alarm attribute set.

[0105] In one possible implementation, the attribute recognition module 403 inputs the target object into the attribute recognition model to obtain the initial attribute information corresponding to the target object. Specifically, the attribute recognition module 403 obtains the preliminary detection results output by the target detection model, which include the bounding box coordinates, main category label, and main category confidence of each target object; the attribute recognition module 403 assigns each target object to a corresponding processing channel based on the main category confidence of each target object, and obtains the channel output results; the attribute recognition module 403 combines the channel output results of each processing channel to obtain the initial attribute information corresponding to the target object.

[0106] In one possible implementation, the attribute recognition module 403 assigns each target object to a corresponding processing channel based on the main category confidence level of each target object, and obtains the channel output result. Specifically, this includes: when the main category confidence level is greater than a preset first confidence threshold, the attribute recognition module 403 performs comprehensive attribute recognition processing on the target object to obtain a channel output result containing all preset attribute dimensions; when the main category confidence level is less than or equal to the preset first confidence threshold and the main category confidence level is greater than a preset second confidence threshold, the attribute recognition module 403 performs core attribute recognition processing on the target object to obtain a channel output result containing preset key attribute dimensions, wherein the preset second confidence threshold is less than the preset first confidence threshold.

[0107] In one possible implementation, the self-training module 406 trains the attribute recognition model based on labeled data to obtain a target attribute recognition model. Specifically, this includes: the self-training module 406 trains the attribute recognition model based on labeled data to obtain a basic attribute recognition model; the self-training module 406 assigns a corresponding context identifier to each image to be detected according to its image source; upon receiving labeled data from the user for the image to be detected, the self-training module 406 binds the labeled data to the context identifier of the image to be detected; the self-training module 406 freezes the main parameters of the attribute recognition model and trains a context adaptation model corresponding to the context identifier using the labeled data bound to the context identifier; and the self-training module 406 fuses the basic attribute recognition model and the context adaptation model to obtain the target attribute recognition model.

[0108] In one possible implementation, the self-training module 406 trains the attribute recognition model based on labeled data to obtain a basic attribute recognition model. Specifically, the self-training module 406 compares the final attribute information with the labeled data to determine whether there are any new attributes. If there are new attributes, the self-training module 406 freezes the network parameters used to extract general features in the attribute recognition model, expands the structure of the classification head of the attribute recognition model, and uses the first labeled data containing the new attributes to perform specialized training on the classification head to obtain the basic attribute recognition model. If there are no new attributes, the self-training module 406 uses a preset learning rate and the labeled data to perform global fine-tuning training on the attribute recognition model to obtain the basic attribute recognition model.

[0109] In one possible implementation, before the self-training module 406 fuses the basic attribute recognition model with the context adaptation model to obtain the target attribute recognition model, the method further includes: the self-training module 406 comparing the final attribute information with the labeled data to obtain confusion events; the self-training module 406 determining the systematic error patterns of the attribute recognition model based on the confusion events and historical confusion events; the self-training module 406 assigning preset weights to the second labeled data in the labeled data that matches the systematic error patterns to form a weighted training dataset, and using the weighted training dataset to train the basic attribute recognition model.

[0110] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0111] This application also provides an electronic device. (See reference...) Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.

[0112] The communication bus 502 is used to enable communication between these components.

[0113] The user interface 503 may include a display screen and a camera. Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.

[0114] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0115] The processor 501 may include one or more processing cores. The processor 501 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 505, and by calling data stored in memory 505. Optionally, the processor 501 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 501 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 501 and may be implemented as a separate chip.

[0116] The memory 505 may include random access memory (RAM) or read-only memory. Optionally, the memory 505 may include a non-transitory computer-readable storage medium. The memory 505 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 505 may also be at least one storage system located remotely from the aforementioned processor 501. (Refer to...) Figure 5 The memory 505, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program based on an attribute-driven dynamic model optimization method.

[0117] exist Figure 5In the illustrated electronic device 500, the user interface 503 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 501 can be used to call the application program stored in the memory 505 for the attribute-driven dynamic model optimization method. When executed by one or more processors 501, the electronic device 500 performs one or more of the methods described in the above embodiments. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0118] This application also provides a computer-readable storage medium storing instructions. When executed by one or more processors 501, these instructions cause an electronic device 500 to perform one or more of the methods described in the above embodiments.

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

[0120] In the various embodiments provided in this application, it should be understood that the disclosed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between systems or units may be electrical or other forms.

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

[0122] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0123] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0124] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and the disclosure of practical truths.

[0125] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A dynamic model optimization method based on attribute-driven approach, characterized in that, The method includes: Obtain algorithm configuration parameters, which include attribute recognition switch and self-training switch; An object detection model is used to process the image to be detected to obtain the target object in the image; Determine whether the attribute recognition switch is turned on; If it is determined that the attribute recognition switch is turned on, the target object is input into the attribute recognition model to obtain the initial attribute information corresponding to the target object; Based on preset attribute association rules, the initial attribute information is post-processed to generate the final attribute information; When it is determined that the final attribute information meets the preset alarm conditions, an alarm event is generated, and the alarm event includes the target object and the final attribute information; In response to the alarm event, the target object and the final attribute information are displayed on the user interface, and the user's correction operation on the final attribute information is received to obtain the annotation data; When the self-training switch is triggered, the attribute recognition model is trained based on the labeled data to obtain the target attribute recognition model, and the image to be detected is recognized according to the target attribute recognition model to obtain the recognition result.

2. The method according to claim 1, characterized in that, The initial attribute information includes multiple attributes and the confidence level corresponding to each attribute. The preset attribute association rules include attribute alarm rules, attribute coexistence rules, and attribute mutual exclusion rules. The post-processing of the initial attribute information based on the preset attribute association rules to generate the final attribute information specifically includes: According to the attribute alarm rules, the initial attribute information is divided into an alarm attribute set and a non-alarm attribute set. The alarm attribute set is used to trigger system alarms, and the non-alarm attribute set does not trigger system alarms. According to the attribute coexistence rule, it is determined whether there is a second attribute that coexists with the first attribute, where the first attribute is any one of the multiple attributes included in the alarm attribute set; If it is determined that a second attribute coexists with the first attribute, then determine whether the second attribute is in the alarm attribute set; If it is determined that the second attribute is not in the alarm attribute set, then the first attribute is removed from the alarm attribute set and added to the non-alarm attribute set, or the first confidence level of the first attribute is set to zero, to obtain the first alarm attribute set; Based on the attribute mutual exclusion rule, determine whether there is a third attribute that is mutually exclusive with the first attribute; If it is determined that there exists a third attribute that is mutually exclusive with the first attribute, then determine whether the third attribute is in the alarm attribute set; If it is determined that the third attribute is in the alarm attribute set, then compare the first confidence level with the second confidence level corresponding to the third attribute; If it is determined that the first confidence level is greater than the second confidence level, then the third attribute is removed from the alarm attribute set and added to the non-alarm attribute set, or the second confidence level of the third attribute is set to zero, to obtain the second alarm attribute set; The final attribute information is obtained based on the first alarm attribute set and the second alarm attribute set.

3. The method according to claim 1, characterized in that, The step of inputting the target object into the attribute recognition model to obtain the initial attribute information corresponding to the target object specifically includes: Obtain the preliminary detection results output by the target detection model, which include the bounding box coordinates, main category label, and main category confidence score for each target object; Based on the main category confidence score of each target object, each target object is assigned to a corresponding processing channel to obtain the channel output result; The output results of each of the processing channels are combined to obtain the initial attribute information corresponding to the target object.

4. The method according to claim 3, characterized in that, The step of assigning each target object to a corresponding processing channel based on the main category confidence score of each target object, and obtaining the channel output result, specifically includes: When the confidence level of the main category is greater than the preset first confidence threshold, a comprehensive attribute recognition process is performed on the target object to obtain a channel output result containing all preset attribute dimensions. When the confidence level of the main category is less than or equal to the preset first confidence threshold and the confidence level of the main category is greater than the preset second confidence threshold, the core attribute identification process is performed on the target object to obtain a channel output result containing preset key attribute dimensions, wherein the preset second confidence threshold is less than the preset first confidence threshold.

5. The method according to claim 1, characterized in that, The step of training the attribute recognition model based on the labeled data to obtain the target attribute recognition model specifically includes: The attribute recognition model is trained based on the labeled data to obtain a basic attribute recognition model; Each image to be detected is assigned a corresponding context identifier based on its image source. Upon receiving the annotation data from the user for the image to be detected, the annotation data is bound to the context identifier of the image to be detected; The main parameters of the attribute recognition model are frozen, and the context adaptation model corresponding to the context identifier is trained using the labeled data bound to the context identifier. The basic attribute recognition model is fused with the context adaptation model to obtain the target attribute recognition model.

6. The method according to claim 5, characterized in that, The step of training the attribute recognition model based on the labeled data to obtain a basic attribute recognition model specifically includes: The final attribute information is compared with the labeled data to determine whether any new attributes have been added. If a new attribute is added, the network parameters used to extract general features in the attribute recognition model are frozen, the classification head of the attribute recognition model is structurally expanded, and the classification head is specifically trained using the first labeled data containing the new attribute to obtain the basic attribute recognition model. If no new attributes are added, a preset learning rate is used, and the attribute recognition model is globally fine-tuned and trained using the labeled data to obtain the basic attribute recognition model.

7. The method according to claim 5, characterized in that, Before fusing the basic attribute recognition model with the context adaptation model to obtain the target attribute recognition model, the method further includes: The final attribute information is compared with the labeled data to obtain the confusion event; Based on the obfuscation events and historical obfuscation events, the systematic error patterns of the attribute recognition model are determined; A preset weight is assigned to the second labeled data in the labeled data that matches the systematic error pattern to form a weighted training dataset, and the basic attribute recognition model is trained using the weighted training dataset.

8. A dynamic model optimization system based on attribute-driven principles, characterized in that, The system includes a parameter acquisition module (401), a target detection module (402), an attribute recognition module (403), an alarm module (404), a manual annotation module (405), and a self-training module (406), wherein: The parameter acquisition module (401) is used to acquire algorithm configuration parameters, which include an attribute recognition switch and a self-training switch. The target detection module (402) is used to process the image to be detected using a target detection model to obtain the target object in the image to be detected; The attribute recognition module (403) is used to determine whether the attribute recognition switch is turned on; if it is determined that the attribute recognition switch is turned on, the target object is input into the attribute recognition model to obtain the initial attribute information corresponding to the target object; based on the preset attribute association rules, the initial attribute information is post-processed to generate the final attribute information; The alarm module (404) is used to generate an alarm event when it is determined that the final attribute information meets the preset alarm conditions. The alarm event includes the target object and the final attribute information. The manual annotation module (405) is used to respond to the alarm event, display the target object and the final attribute information on the user interface, and receive the user's correction operation on the final attribute information to obtain annotation data; The self-training module (406) is used to train the attribute recognition model based on the labeled data when the self-training switch is triggered, to obtain the target attribute recognition model, and to recognize the image to be detected based on the target attribute recognition model to obtain the recognition result.

9. An electronic device, characterized in that, The device includes a processor (501), a memory (505), a user interface (503), and a network interface (504). The memory (505) is used to store instructions. The user interface (503) and the network interface (504) are used to communicate with other devices. The processor (501) is used to execute the instructions stored in the memory (505) to cause the electronic device (500) to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Construction site personnel attribute detection method, system and device and medium

    CN114140745A

  • Interstitial tumor mitotic cell recognition and counting method based on deep learning

    CN118918096A

  • Pedestrian attribute recognition method based on a pedestrian attribute recognition system and method for training the same

    US20240249547A1

  • Identity recognition method, model training method, apparatuses, and device and storage medium

    WO2022121498A1

Cited By

  • Rail transit full-interface signal object consistency supervision and logic verification method

    CN121448478A