A method for improving the generalization ability of target detection models based on diffusion models

By generating diverse target images using a diffusion model and combining it with automatic annotation and iterative training of the target detection model, the problem of insufficient generalization ability caused by limited training sets is solved, and the efficient generalization ability of the target detection model in specific scenarios is improved.

CN117253110BActive Publication Date: 2026-05-26SHANGHAI XIDING IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI XIDING IND CO LTD
Filing Date
2023-11-03
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In specific scenarios, the target objects vary greatly in terms of model and style, and the training set obtained by manually collecting and labeling data is very limited, resulting in poor generalization ability of neural network-based target detection algorithms during model training.

Method used

Diversified target images are generated using a diffusion model. High-quality images are then selected using an object detection model, and data augmentation and automatic labeling are performed. The diffusion and object detection models are trained iteratively to improve the generalization ability of the models.

Benefits of technology

It can significantly improve the generalization ability of object detection models in specific scenarios without requiring a large amount of human intervention, thereby reducing labor costs and improving recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117253110B_ABST
    Figure CN117253110B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of object detection technology. It discloses a method for improving the generalization ability of an object detection model based on a diffusion model. The method includes generating diverse target images based on the diffusion model and generating a target training dataset based on the target images; inputting the target images into an initial object detection model for object detection, filtering out high-quality target images and deleting low-quality target images; performing data augmentation on the retained high-quality target images, using minimum bounding boxes to cover the target objects and labeling their positions, thereby obtaining high-quality labeled images; repeating the above steps, adding the high-quality labeled images to the target training dataset of the diffusion model, performing local fine-tuning training on the diffusion model, and generating diverse high-quality labeled images; adding the same filtered and labeled high-quality labeled images to the training set of the object detection model, and then training the object detection model to improve the performance of the object detection algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology, and more specifically, to a method for improving the generalization ability of a target detection model based on a diffusion model. Background Technology

[0002] Currently, neural network-based object detection algorithms require a large amount of image data containing the target as training data for training the object detection algorithm model. In specific target recognition scenarios, such as electricity meters (ammeters, voltmeters), a large amount of manual data annotation is needed. At the same time, as the model and style of the target objects (ammeters, voltmeters) in the scene change, it is necessary to constantly expand the training set with datasets that do not contain the same type and style.

[0003] Therefore, in specific scenarios, the types and styles of target objects vary greatly, and the types of target objects obtained through data collection are very limited when expanding the dataset. When training a model using a limited set of target objects, the model's recognition ability is very limited. Neural network-based target detection algorithms require a large amount of training data, especially when dealing with multiple forms of the same target object, which can easily lead to poor generalization ability of the model.

[0004] Therefore, this invention provides a method for improving the generalization ability of a target detection model based on a diffusion model. Summary of the Invention

[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a method for improving the generalization ability of a target detection model based on a diffusion model. This method addresses the problem that, in specific scenarios, the training set obtained through manual data collection and annotation is very limited due to the diverse variations in the model and style of target objects.

[0006] According to one aspect of the present invention, a method for improving the generalization ability of a target detection model based on a diffusion model is provided, comprising the following steps:

[0007] Step S1: Generate diverse target images based on the diffusion model, and generate a target training dataset based on the target images;

[0008] Step S2: Input the target image into the initial target detection model for target detection, filter out high-quality target images, and delete low-quality target images;

[0009] Step S3: Perform data augmentation on the retained high-quality target images, using the smallest rectangle to cover the target objects and annotate their positions, thereby obtaining high-quality annotated images;

[0010] Step S4: Repeat steps S1-S3, add high-quality labeled images to the target training dataset of the diffusion model, perform local fine-tuning training on the diffusion model, and generate diverse high-quality labeled images.

[0011] Step S5: Add the same filtered and labeled high-quality images to the training set of the object detection model, and then train the object detection model to improve the performance of the object detection algorithm.

[0012] In a preferred embodiment, the specific application logic for generating diverse target images based on a diffusion model is as follows:

[0013] The original image is trained based on a diffusion model, with the training objective being to maximize the likelihood estimate. The target parameters are adjusted based on the diffusion model, and the target parameters include, but are not limited to, temperature or noise level.

[0014] Randomly select target parameters and original images, and use a diffusion model to gradually generate target images.

[0015] In a preferred embodiment, the specific steps for filtering out images that do not contain the target object or have low detection confidence are as follows:

[0016] The generated target image is input into the target detection model, and the target detection results are obtained, including the target's bounding box and confidence score. A confidence threshold is set for the target image.

[0017] If the confidence score of the target image is greater than or equal to the confidence threshold, then the target image is considered a high-quality target image.

[0018] If the confidence score of the target image is less than the confidence threshold, then the target image is considered a low-quality target image.

[0019] In a preferred embodiment, data augmentation includes, but is not limited to, one or more combinations of image horizontal flipping, color transformation, rotation, scaling, or cropping.

[0020] In a preferred embodiment, the logic for automatically marking the location of the target object is as follows:

[0021] Based on the object detection algorithm, target objects are detected and located in the target image. Annotation information is created for the target objects in the image, and the target objects are covered by annotation boxes.

[0022] A semantic segmentation model is used to assign a label to each pixel in the image, and then the bounding box of the target can be extracted from it, and the location of the target can be obtained based on the bounding box.

[0023] Among them, the object detection algorithms include, but are not limited to, the YOLO algorithm or the Faster R-CNN algorithm.

[0024] In a preferred embodiment, the specific logic of local fine-tuning training is as follows:

[0025] Based on the diffusion model, a predefined task is performed on the target image based on the target training dataset. The task includes, but is not limited to, text classification and image generation. This embodiment mainly uses image generation as an example, but it is also applicable to text classification.

[0026] Based on the defined task, the model layer for fine-tuning the diffusion model is selected, and the model layer is the target feature layer in the target image that is closest to the task; the loss function is selected based on the target feature layer.

[0027] Freeze the other target features of the diffusion model, and only train the target features corresponding to your model layers for fine-tuning, updating the parameters through backpropagation.

[0028] In a preferred embodiment, a target detection model with stronger generalization ability is trained based on the filtered high-quality labeled images.

[0029] The high-quality secondary labeled images generated by the object detection model are updated to target images and used as training data for the next round of diffusion model.

[0030] According to another aspect of the present invention, a rapid scoring method for an intelligent experimental platform is provided, based on the implementation of a method for improving the generalization ability of a target detection model based on a diffusion model, comprising the following steps:

[0031] Used to collect experimental videos from operators during experiments;

[0032] The experimental video is used to obtain the corresponding video window image based on time frames. Each frame of the video window image is encoded and compressed into a fixed-size token sequence image.

[0033] The token sequence images are input into a deep learning model, and the key score point video segments, as well as the start and end times of the current key score point video segments, are obtained based on the deep learning model.

[0034] The video segments with key scoring points are used to identify targets using an object detection model to obtain the target identification results;

[0035] Based on the target recognition results, the spatial positional relationship between multiple target boxes in each frame of the video segment with key scoring points is calculated. The spatial positional information of the target boxes and the preset scoring positional information are analyzed to determine whether the current target box meets the scoring requirements. The scoring weight of the current target box is obtained according to the scoring requirements.

[0036] Obtain the scoring weights of the current target bounding box in different scenarios; accumulate the scoring results of multiple target bounding boxes and output the accumulated scores to the data receiving end.

[0037] According to another aspect of the present invention, a computer-readable storage medium is provided, storing instructions that, when executed on a computer, cause the computer to perform a method for improving the generalization capability of a target detection model based on a diffusion model.

[0038] According to another aspect of the present invention, an electronic device is provided, comprising: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;

[0039] The processor executes a method for improving the generalization ability of a target detection model based on a diffusion model by calling a computer program stored in the memory.

[0040] The technical effects and advantages of the method for improving the generalization ability of target detection models based on diffusion models in this invention are as follows:

[0041] This invention uses a diffusion model to automatically generate target maps and an object detection model to filter and select the generated maps. The selected target maps are then added to the training sets of both the diffusion model and the object detection model for training. This process of generating maps and training the models is iteratively repeated, thereby improving the diffusion model's ability to generate effective target maps and the object detection model's generalization ability. Ultimately, this achieves the goal of automatically and effectively improving the generalization ability of the object detection model without human intervention throughout the entire training iteration process. Attached Figure Description

[0042] Figure 1 This is a flowchart of the method for improving the generalization ability of the target detection model according to the present invention.

[0043] Figure 2 This is a flowchart of the rapid scoring method for the intelligent experimental platform of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] This invention utilizes existing diffusion models to generate target image data in specific scenarios. It then uses a basic target detection model for preliminary identification and filtering of the generated image data. The high-confidence generated images are used as a training set for the next round of training of the diffusion model and the target detection model, thereby improving the quality of the target images generated by the diffusion model and the accuracy of the target detection model. The obtained target detection model then re-identifies and filters the image data regenerated by the diffusion model, adding the selected high-confidence generated images back to the training set for the next round of training of the diffusion model and the target detection model. This process is repeated multiple times to achieve a self-supervised learning process for the target detection model.

[0046] It should be noted that: the diffusion model is a machine learning model for generating data; the object detection model is a machine learning model for detecting objects; they work together to handle different tasks; the goal of this embodiment is to improve the performance of the object detection model in specific scenarios by continuously improving the quality of the dataset and using different types of models to handle different tasks, thereby improving computer vision tasks.

[0047] To address this issue, existing technologies primarily involve manually expanding and supplementing data on different types and forms of the same target object, and manually labeling the expanded dataset. When new types or forms of the same target object appear in the scene, data collection and labeling are still required, which is very time-consuming and labor-intensive. To further solve the above problems, this invention utilizes a diffusion model to automatically generate images of different forms of the same target object. The generated images are then input into an initial target detection model for image screening and filtering, and automatically labeled. The selected images are then augmented and their bounding boxes are revised. Finally, they are added to the training set for further training of the target detection model and the diffusion model, and this process is repeated multiple times. This approach can further enhance the generalization ability of the target detection model, reduce the manual cost of expanding the dataset, and enable the new model to better identify different types and forms of the same target object.

[0048] Example 1

[0049] Please see Figure 1 As shown in this embodiment, a method for improving the generalization ability of a target detection model based on a diffusion model includes the following steps:

[0050] Step S1: Generate target images: Generate diverse target images based on the diffusion model;

[0051] Specifically, the target images include target images with different styles, angles, and conditions than the original training set images, and the collected target images are integrated into the training dataset to expand the training dataset.

[0052] The specific application logic for generating diverse target images based on the diffusion model is as follows:

[0053] The original image is trained based on a diffusion model, with the training objective being to maximize the likelihood estimate. The target parameters are adjusted based on the diffusion model, and the target parameters include, but are not limited to, temperature or noise level.

[0054] Randomly select target parameters and original images, and use a diffusion model to gradually generate target images.

[0055] It should be noted that the diffusion model is a generative model used to generate high-quality images; randomly selecting target parameters can affect the processing of the original image, thereby achieving diverse target images.

[0056] Use diffusion models and parameter control to generate diverse target images. By adjusting target parameters and selecting different starting points, you can obtain a range of diverse images suitable for various applications such as artistic generation and image enhancement.

[0057] Step S2: Preliminary filtering: Input the generated target images into the initial target detection model for target detection, filter out high-quality target images, and delete low-quality target images.

[0058] Here, it's important to explain the specific steps for filtering out images that don't contain the target object or have low detection confidence:

[0059] The generated target image is input into the target detection model, and the target detection results are obtained, including the target's bounding box and confidence score.

[0060] A confidence threshold is set for the target image. If the confidence score of the target image is greater than or equal to the confidence threshold, the target image is considered a high-quality target image; if the confidence score of the target image is less than the confidence threshold, the target image is considered a low-quality target image.

[0061] For example, the confidence threshold is a predefined value, such as 0.5. If the confidence score of the target object in an image is greater than this threshold, then the image is considered to contain the target object; otherwise, it is considered not to contain the target object. Images with confidence scores higher than the threshold are retained, and can be saved to disk or passed to subsequent processing steps.

[0062] Save high-quality target images to disk or pass them to subsequent processing steps, and delete low-quality target images.

[0063] It's important to note that the confidence score obtained from an object detection model typically depends on the detection model and frame used. Different object detection models may have different output structures, but generally, the confidence score is one element of the detection result. The object detection model is used to detect objects in the input image. A list of detection results is generated, with each result corresponding to a detected object, and the object's location in the image is identified using its bounding box coordinates.

[0064] For example, the category of the target object can be described by a category label such as "car" or "pedestrian".

[0065] The confidence score is a floating-point number that represents the object detection model's confidence in the detection result. The score is typically between 0 and 1, with higher scores indicating greater confidence that the detection result is correct.

[0066] Specifically, the confidence score of the detection results is accessed using an object detection framework and programming language. The actual code may vary depending on the model and framework used. Be sure to consult the documentation to understand how to obtain the confidence score in your specific situation. Once you have the confidence score, you can use it to decide whether to filter or take other follow-up actions to meet your application needs, such as the object detection filtering mentioned earlier.

[0067] Step S3: Data augmentation and automatic annotation: Perform data augmentation on the retained high-quality target images. Data augmentation includes, but is not limited to, horizontal image flipping and image color changes, and automatically annotate the position of the target objects, usually by using the smallest rectangle to cover the target objects for annotation.

[0068] It should be noted here that the specific methods of data augmentation include the following:

[0069] Image horizontal flip: Flipping an image horizontally is typically suitable for tasks with mirror symmetry.

[0070] Color transformation: Generates a new image by adjusting the brightness, contrast, saturation, etc. of the original image.

[0071] Rotation and scaling: Rotate or scale the image to simulate targets at different angles and sizes.

[0072] Cropping: Randomly cropping a portion of an image to change its perspective.

[0073] Based on object detection algorithms, target objects in target images are detected and located. Label information is created for the target objects in the image, and the target objects are covered by label boxes, which can reduce the burden of manually labeling data.

[0074] A semantic segmentation model is used to assign a label to each pixel in an image, from which the bounding box of the target can be extracted.

[0075] Object detection algorithms include, but are not limited to, the YOLO algorithm or the Faster R-CNN algorithm.

[0076] Step S4: Train the diffusion model: Repeat steps S1-S3, add high-quality labeled images to the target training dataset of the diffusion model, fine-tune the diffusion model, and generate diverse high-quality labeled images to improve the quality and diversity of the generated target images.

[0077] It's important to note here that the base diffusion model used to generate high-quality labeled images, such as stablediffusion or DALLE2, should be selected. The selected and filtered high-quality labeled images are then input into the diffusion model's training set for local fine-tuning training. The reason for choosing local fine-tuning training (where local parameters of the model participate in training) instead of global model parameter training is as follows:

[0078] 1. When using a global model for training, the model is prone to overfitting when the amount of training data is limited;

[0079] 2. Training using local model parameters ensures that the generated graphs retain generality and possess diversity. Methods for training models using local fine-tuning include LoRa and Hypernetwork.

[0080] The specific logic of local fine-tuning training is as follows:

[0081] Based on the diffusion model, a predefined task is performed on the target image based on the target training dataset. The task includes, but is not limited to, text classification and image generation. This embodiment mainly uses image generation as an example, but it is also applicable to text classification.

[0082] Based on the defined task, the model layer for fine-tuning the diffusion model is selected, and the model layer is the target feature layer in the target image that is closest to the task; the loss function is selected based on the target feature layer.

[0083] Freeze the other target features of the diffusion model, and only train the target features corresponding to your model layers for fine-tuning, updating the parameters through backpropagation.

[0084] Adjust hyperparameters to optimize performance, including but not limited to learning rate and batch size;

[0085] The model's performance is evaluated using a validation set. If the model's performance meets the task requirements, it is deployed for the actual task. If the model's performance does not meet the task requirements, it can be fine-tuned until it does. If it cannot be fine-tuned until it meets the task requirements, the corresponding task is deleted.

[0086] Step S5: Train the object detection model: Add the same filtered and labeled high-quality images to the training set of the object detection model, and then train the object detection model to improve the performance of the object detection algorithm.

[0087] Train a target detection model with stronger generalization ability based on the filtered high-quality labeled images;

[0088] Based on the high-quality secondary labeled images generated by the object detection model, the high-quality secondary labeled images are updated to target images and used as training data for the next round of the new diffusion model;

[0089] It should be noted here that the high-quality labeled images generated and filtered in the current round are used to train the diffusion model, which acts as a filter to select high-quality generated target images.

[0090] The diffusion model and the object detection model are trained iteratively in sequence to finally obtain an object detection model with stronger generalization ability compared to the initial object detection model. The entire training process is as follows: Figure 1 As shown.

[0091] The entire process of this embodiment can spontaneously iterate and generate data, as well as train and optimize the diffusion model and the target detection model, without human intervention. This method reduces the human cost of improving the generalization ability of the target detection model, such as the large amount of manual annotation for the same target with different styles.

[0092] This invention uses an iterative generation and filtering process, along with automatic annotation to improve the quality of the generated dataset, to help improve the performance of the object detection model in specific scenarios. It also applies diffusion models and object detection models to handle different tasks.

[0093] Example 2

[0094] Based on Example 1, the experimental equipment and actions identified in the intelligent experiment are extracted using a diffusion model and an object detection model. These are then input into a refined scoring post-processing logic, ultimately outputting the image scoring results. When the video content contains a large amount of non-experimental operation content or the numerous non-experimental scoring images in the video content are scattered, the above scoring method can provide relatively accurate experimental scoring results. Moreover, it eliminates the need for object detection and post-processing calculations for each frame of the video. Automatic annotation is used to improve the quality of the generated dataset, thereby helping to enhance the performance of the object detection model in specific scenarios. Simultaneously, the diffusion model and the object detection model are applied to handle different aspects of the task, thus improving the rapid scoring method in intelligent experiments.

[0095] like Figure 2As shown, this embodiment provides a rapid scoring method for an intelligent experimental platform, which is based on the implementation of a method for improving the generalization ability of a target detection model based on a diffusion model, and also includes:

[0096] Used to collect experimental videos from operators during experiments;

[0097] The experimental video is used to obtain the corresponding video window image based on time frames. Each frame of the video window image is encoded and compressed into a fixed-size token sequence image.

[0098] The token sequence images are input into a deep learning model, and the key score point video segments, as well as the start and end times of the current key score point video segments, are obtained based on the deep learning model.

[0099] The video segments with key scoring points are used to identify targets using an object detection model to obtain the target identification results;

[0100] Based on the target recognition results, the spatial positional relationship between multiple target boxes in each frame of the video segment with key scoring points is calculated. The spatial positional information of the target boxes and the preset scoring positional information are analyzed to determine whether the current target box meets the scoring requirements. The scoring weight of the current target box is obtained according to the scoring requirements.

[0101] Obtain the scoring weights of the current target bounding box in different scenarios; accumulate the scoring results of multiple target bounding boxes and output the accumulated scores to the data receiving end.

[0102] Preferably, the specific process of compressing the video window image into a token sequence image is as follows:

[0103] Compress the video window image into a fixed-size semantic vector of dimensions;

[0104] Then, the fixed-size dimensional semantic vector is compressed into a token sequence image.

[0105] Preferably, the specific recognition logic of the deep learning model is as follows:

[0106] The number of video window images is preset to obtain the preset number of windows; the token sequence images are input into the deep learning model;

[0107] Based on a preset number of windows, all token sequence images are input into the deep learning model in the form of a continuous sequence for learning and training. If a preset target object is detected in the token sequence image, the token sequence image is marked as a key scoring point video segment; if no preset target object is detected in the token sequence image, the token sequence image is marked as an invalid scoring point video segment.

[0108] Based on the preset target score points, obtain the key score point video segments in the current token sequence image, and obtain the start and end times of the key score point video segments based on the time series corresponding to the key score point video segments.

[0109] Preferably, the video clips of key scoring points are input into the target detection model; the target detection model identifies the video clips of key scoring points according to preset target scoring points, obtains the spatial location information corresponding to the preset target scoring points, and outputs them in the form of target boxes according to the location coordinates; the spatial location information corresponding to the target scoring points is marked as the target recognition result.

[0110] Preferably, the specific analysis logic for the target recognition results is as follows:

[0111] Each time frame sequence contains N target boxes in the key score point video segment; the spatial relationship between different target boxes is determined based on the spatial location information of the target boxes.

[0112] Preset score location information represents the ideal positional relationship between the expected target boxes in the current key score point video segment;

[0113] The calculated spatial relationship of the target box is compared and analyzed with the preset score position information; based on the analysis results, it is determined whether the positional relationship of the current target box meets the scoring requirements.

[0114] If the spatial relationship of the current target box meets the scoring requirements, a scoring weight can be assigned to the target box based on the strictness of the scoring requirements and the importance of the target.

[0115] Preferably, it further includes: when no corresponding matching score point is found in each frame detection of the video segment of the key score point, the specific steps are as follows;

[0116] The video clips with key scoring points were processed by the target detection model and no preset target object was detected. Therefore, the video clips with key scoring points were remarked as invalid video clips with key scoring points.

[0117] The data from video segments that were re-labeled as invalid score points will be used again as the training set for the deep learning model.

[0118] The model's performance is gradually improved through iterative training and correction processes.

[0119] This invention uses deep learning models (such as Transformer encoding) and object recognition models to process video segments that may contain scoring points, avoiding wasting computational resources on invalid images. This significantly reduces computational costs and allows computational resources to be used more efficiently for meaningful analysis.

[0120] By processing video segments that are likely to score points, the overall processing time for the experimental video is significantly reduced. This is particularly beneficial for applications with high real-time requirements or scenarios requiring large-scale processing. Furthermore, centralized processing of scoring points reduces noise interference from invalid images, thereby increasing the accuracy of intelligent scoring. Analyzing only important segments allows for more precise determination of scoring points.

[0121] Combining object recognition models with spatial relationship calculations enables more accurate determination of whether a video segment should be scored. This helps reduce the false positive rate and avoids incorrectly identifying irrelevant segments as scoring points. In experimental videos containing numerous non-scoring images, this improves the efficiency of intelligent scoring, allowing for faster and more accurate analysis of experimental results. This enhances the user experience in scenarios such as experimental teaching and evaluation.

[0122] It can also adapt to different types of experimental videos because it processes data based on preset goals and spatial relationships. Regardless of changes in the content and scene of the experimental video, this method can be adjusted to adapt to new situations. It can achieve more efficient and accurate intelligent scoring when processing experimental videos with a large number of non-scoring video images, thus providing users with a better experience and analysis results.

[0123] Example 3

[0124] A computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform a method for improving the generalization capability of a target detection model based on a diffusion model.

[0125] Example 4

[0126] An electronic device includes: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;

[0127] The processor executes a method for improving the generalization ability of a target detection model based on a diffusion model by calling a computer program stored in the memory.

[0128] Due to variations in configuration or performance, the device may include one or more Central Processing Units (CPUs) and one or more memories. The memories store at least one computer program, which is loaded and executed by the processor to implement the diffusion-based target detection model generalization capability improvement method provided in the various method embodiments described above. The electronic device may also include other components for implementing device functions; for example, it may have wired or wireless network interfaces and input / output interfaces for input / output. Further details regarding the embodiments in this application will not be elaborated upon here.

[0129] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0130] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for improving the generalization ability of a target detection model based on a diffusion model, characterized in that, Includes the following steps: Step S1: Generate diverse target images based on the diffusion model, and construct a target training dataset based on the target images; Step S2: Input the target image into the initial target detection model for target detection, filter out high-quality target images, and delete low-quality target images; Step S3: Perform data augmentation on the retained high-quality target images, using the smallest rectangle to cover the target objects and annotate their positions, thereby obtaining high-quality annotated images; Step S4: Add high-quality labeled images to the target training dataset of the diffusion model, perform local fine-tuning training on the diffusion model, and generate diverse high-quality labeled images; Step S5: Add the same filtered and labeled high-quality labeled images to the training set of the object detection model, train the object detection model, and add the images detected by the object detection model to the target training dataset of the diffusion model. Repeat steps S4-S5 until the generalization ability of the target detection model meets the preset requirements.

2. The method for improving the generalization ability of a target detection model based on a diffusion model according to claim 1, characterized in that, The specific application logic for generating diverse target images based on the diffusion model is as follows: The original image is trained based on a diffusion model, with the training objective being to maximize the likelihood estimate. The target parameters are adjusted based on the diffusion model, and the target parameters include, but are not limited to, temperature or noise level. Randomly select target parameters and original images, and use a diffusion model to gradually generate target images.

3. The method for improving the generalization ability of a target detection model based on a diffusion model according to claim 2, characterized in that, The specific steps for filtering out images that do not contain the target object or have low detection confidence are as follows: The generated target image is input into the target detection model, and the target detection results are obtained, including the target's bounding box and confidence score. A confidence threshold is set for the target image. If the confidence score of the target image is greater than or equal to the confidence threshold, then the target image is considered a high-quality target image. If the confidence score of the target image is less than the confidence threshold, then the target image is considered a low-quality target image.

4. The method for improving the generalization ability of a target detection model based on a diffusion model according to claim 3, characterized in that, Data augmentation includes, but is not limited to, one or more combinations of image horizontal flipping, color transformation, rotation, scaling, or cropping.

5. The method for improving the generalization ability of a target detection model based on a diffusion model according to claim 4, characterized in that, The logic for automatically marking the location of target objects: Based on the object detection algorithm, target objects are detected and located in the target image. Annotation information is created for the target objects in the image, and the target objects are covered by annotation boxes. A semantic segmentation model is used to assign a label to each pixel in the image, extract the bounding box of the target, and obtain the location of the target based on the bounding box; Among them, the object detection algorithms include, but are not limited to, the YOLO algorithm or the Faster R-CNN algorithm.

6. The method for improving the generalization ability of a target detection model based on a diffusion model according to claim 5, characterized in that, The specific logic of local fine-tuning training is as follows: Based on the diffusion model, a predefined task is performed on the target image based on the target training dataset. The task includes, but is not limited to, text classification and image generation. Based on the defined task, the model layer for fine-tuning the diffusion model is selected; the model layer is the target feature layer in the target image that is closest to the task. Select the loss function for the target feature layer; Other target features of the frozen diffusion model are fine-tuned only for the target features corresponding to the training model layers, and the parameters are updated through backpropagation.

7. The method for improving the generalization ability of a target detection model based on a diffusion model according to claim 6, characterized in that, Train a target detection model with stronger generalization ability based on the filtered high-quality labeled images; The high-quality secondary labeled images generated by the object detection model are updated to target images and used as training data for the next round of diffusion model.

8. A rapid scoring method for an intelligent experimental platform, characterized in that, The implementation of a method for improving the generalization ability of a target detection model based on a diffusion model, as described in any one of claims 1-7, includes the following steps: Used to collect experimental videos from operators during experiments; The experimental video is used to obtain the corresponding video window image based on time frames. Each frame of the video window image is encoded and compressed into a fixed-size token sequence image. The token sequence image is input into the deep learning model, and the key score point video segment, as well as the start and end time of the current key score point video segment, are obtained based on the deep learning model. The video segments with key scoring points are used to identify targets using an object detection model to obtain the target identification results; Based on the target recognition results, the spatial positional relationship between multiple target boxes in each frame of the video segment with key scoring points is calculated. The spatial positional information of the target boxes and the preset scoring positional information are analyzed to determine whether the current target box meets the scoring requirements. The scoring weight of the current target box is obtained according to the scoring requirements. Obtain the scoring weights of the current target bounding box in different scenarios; accumulate the scoring results of multiple target bounding boxes and output the accumulated scores to the data receiving end.

9. A computer-readable storage medium, characterized in that: The system stores instructions that, when executed on a computer, cause the computer to perform a method for improving the generalization capability of a target detection model based on a diffusion model as described in any one of claims 1-7.

10. An electronic device, characterized in that, include: A processor and a memory, wherein the memory stores a computer program that can be called by the processor; The processor executes a method for improving the generalization ability of a target detection model based on a diffusion model, as described in any one of claims 1-7, by calling a computer program stored in the memory.