Model training method, cone barrel detection method, device, equipment, medium and vehicle

By preprocessing and noise training the training sample data, building and optimizing the cone bucket detection model, we solved the problems of insufficient performance and adaptability to complex scenarios of the traditional cone bucket recognition system, and achieved efficient and accurate cone bucket detection.

CN120726282APending Publication Date: 2025-09-30BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410369952.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

The existing cone bucket recognition system relies on the traditional target detection framework, which has complex preprocessing and post-processing steps that are time-consuming, insufficient model performance, heavy dependence on specific data sets, and difficulty in handling small target detection and complex scenes in the cone bucket. In addition, the data preprocessing does not fully consider the cone bucket characteristics, affecting the recognition accuracy and robustness.

Method used

By performing photometric distortion, random occlusion, random flipping, and random cropping on multiple sets of training sample data, an initial cone bucket detection model is constructed. The model is trained by adding preset noise values, the model structure is optimized through pruning, and the model is deployed using an efficient deployment framework.

Benefits of technology

The model's robustness in processing complex and diverse real-world data has been enhanced, and its performance and generalization capabilities have been improved. It can better cope with cone-related tasks, save detection time, and improve accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726282A_ABST
    Figure CN120726282A_ABST
Patent Text Reader

Abstract

The invention relates to a model training method, a cone barrel detection method, a device, equipment, a medium and a vehicle, and the method comprises the steps: obtaining a plurality of groups of training sample data, carrying out the preprocessing of the plurality of groups of training sample data, obtaining a plurality of groups of preprocessed training sample data, training an initial cone barrel detection model through the plurality of groups of preprocessed training sample data, and carrying out the detection of a cone barrel. And a trained cone barrel detection model is obtained. Compared with the prior art, the embodiment of the invention has the advantages that the multiple groups of training sample data are preprocessed to obtain the multiple groups of preprocessed training sample data, and the preprocessing mode of the cone barrel training sample data can better highlight and enhance the local features of the cone barrel, so that the model can more accurately learn and understand the feature attributes of the cone barrel; the robustness of the model in processing complex and diversified real data is enhanced, and the performance and generalization ability of the model are improved, so that the model can better cope with cone-bucket related tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of target detection technology, and in particular to a model training method, cone barrel detection method, device, equipment, medium and vehicle. Background Art

[0002] Current cone recognition systems are mainly based on traditional target detection frameworks. These methods require complex pre-processing and post-processing steps. This type of method is time-consuming, has insufficient model performance, and is more likely to become dependent on specific data sets, resulting in overfitting. Traditional target detectors are unable to fully cope with the problem of detecting small targets in cones. In addition, the cone detection scenarios for autonomous driving are extremely complex, and there may be occlusions and overlaps. Traditional target detectors are also unable to cope with the complex cone scenarios and multiple indicator requirements.

[0003] Furthermore, existing data preprocessing techniques, such as traditional data manipulations like rotation and cropping, fail to specifically account for the characteristic features of cones, resulting in inadequate extraction of critical local information. During these processing steps, details such as the cone's color, reflectivity, marking pattern, and specific location within the scene are easily lost, weakening the model's ability to learn important features and affecting recognition accuracy. Traditional data preprocessing techniques also fail to simulate the complex distribution of cones in autonomous driving scenarios, such as at night, in the rain, on highways, and in urban areas. Inadequate data manipulation can severely impact the robustness of cone model detection. Summary of the Invention

[0004] In order to solve the above technical problems, the present disclosure provides a model training method, a cone barrel detection method, an apparatus, equipment, a medium and a vehicle.

[0005] In a first aspect, an embodiment of the present disclosure provides a model training method, the method comprising:

[0006] Obtain multiple sets of training sample data;

[0007] Preprocessing the multiple sets of training sample data to obtain multiple sets of preprocessed training sample data;

[0008] The initial cone bucket detection model is trained by adding a preset noise value using the multiple groups of preprocessed training sample data to obtain a trained cone bucket detection model.

[0009] In some embodiments, preprocessing the multiple sets of training sample data to obtain multiple sets of preprocessed training sample data includes:

[0010] Performing photometric distortion processing on the multiple sets of training sample data to obtain multiple sets of first training sample data;

[0011] Performing random occlusion processing on the multiple sets of first training sample data to obtain multiple sets of second training sample data;

[0012] Performing random flipping processing on the multiple sets of second training sample data to obtain multiple sets of third training sample data;

[0013] The multiple groups of third training sample data are randomly cropped to obtain multiple groups of preprocessed training sample data.

[0014] In some embodiments, before training the initial cone bucket detection model using the multiple sets of preprocessed training sample data by adding a preset noise value to obtain a trained cone bucket detection model, the method further includes:

[0015] Build an initial cone detection model.

[0016] In some embodiments, constructing an initial cone barrel detection model includes:

[0017] An initial cone bucket detection model is constructed using a preset detector, which includes a backbone network, a multi-layer encoder, a multi-layer decoder and multiple prediction heads.

[0018] In some embodiments, the method of using the plurality of sets of preprocessed training sample data to train the initial cone bucket detection model by adding a preset noise value to obtain a trained cone bucket detection model includes:

[0019] Obtaining a true value label corresponding to each set of preprocessed training sample data from the multiple sets of preprocessed training sample data;

[0020] In a preset first training round, a noise of a preset first amplitude is added to the true value label corresponding to each set of preprocessed training sample data, and the initial cone bucket detection model is trained using each set of preprocessed training sample data and the true value label with the noise of the preset first amplitude added to each set of preprocessed training sample data to obtain a first cone bucket detection model;

[0021] In a preset second training round, noise of a second amplitude is added to the true value label corresponding to each set of preprocessed training sample data, and the first cone bucket detection model is trained using the multiple sets of preprocessed training sample data and the true value label with the preset second amplitude noise added corresponding to each set of preprocessed training sample data to obtain a trained cone bucket detection model;

[0022] The noise of the preset first amplitude is greater than the noise of the preset second amplitude.

[0023] In a second aspect, an embodiment of the present disclosure provides a cone barrel detection method, the method comprising:

[0024] Obtain the image to be detected;

[0025] The trained cone bucket detection model is used to perform cone bucket detection on the image to be detected to obtain a cone bucket detection result.

[0026] In some embodiments, before performing cone bucket detection on the image to be detected using the trained cone bucket detection model and obtaining the cone bucket detection result, the method further includes:

[0027] Perform model pruning on the trained cone bucket detection model to obtain the target cone bucket detection model;

[0028] The cone bucket detection is performed on the image to be detected by the trained cone bucket detection model to obtain the cone bucket detection result, including:

[0029] The target cone barrel detection model is used to perform cone barrel detection on the image to be detected to obtain a cone barrel detection result.

[0030] In some embodiments, the pruning of the trained cone detection model to obtain the target cone detection model includes:

[0031] Convert the trained cone bucket detection model into a preset digit format to obtain a cone bucket detection model with a preset digit;

[0032] The number of layers of the encoder in the cone bucket detection model with the preset number of bits is reduced to the preset number of layers to obtain a target cone bucket detection model.

[0033] In some embodiments, before performing cone bucket detection on the image to be detected using the trained cone bucket detection model and obtaining the cone bucket detection result, the method further includes:

[0034] The trained cone bucket detection model is packaged and deployed using a target framework.

[0035] In a third aspect, an embodiment of the present disclosure provides a model training device, comprising:

[0036] An acquisition module is used to obtain multiple sets of training sample data;

[0037] An obtaining module, configured to preprocess the plurality of sets of training sample data to obtain a plurality of sets of preprocessed training sample data;

[0038] The training module is used to use the multiple groups of preprocessed training sample data to train the initial cone bucket detection model by adding a preset noise value to obtain a trained cone bucket detection model.

[0039] In a fourth aspect, an embodiment of the present disclosure provides a cone barrel detection device, comprising:

[0040] An acquisition module, used for acquiring an image to be detected;

[0041] The detection module is used to perform cone bucket detection on the image to be detected through a trained cone bucket detection model to obtain a cone bucket detection result.

[0042] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including:

[0043] Memory;

[0044] processor; and

[0045] computer programs;

[0046] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.

[0047] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method as described in the first aspect.

[0048] In a seventh aspect, an embodiment of the present disclosure provides a vehicle, comprising:

[0049] Memory;

[0050] processor; and

[0051] computer programs;

[0052] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.

[0053] In an eighth aspect, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the cone barrel detection method as described above is implemented.

[0054] The model training method, cone detection method, device, equipment, medium and vehicle provided in the embodiments of the present disclosure obtain multiple sets of training sample data, pre-process the multiple sets of training sample data, and obtain multiple sets of pre-processed training sample data. The initial cone detection model is trained by adding preset noise values ​​using the multiple sets of pre-processed training sample data to obtain a trained cone detection model. Compared with the prior art, the embodiments of the present disclosure obtain multiple sets of pre-processed training sample data by pre-processing the multiple sets of training sample data. The pre-processing method of the cone training sample data can better highlight and enhance the local features of the cone attributes, so that the model can more accurately learn and understand important attributes such as the shape, color and occlusion of the cone. These pre-processing methods can enhance the robustness of the model in processing complex and diverse real-world data, improve the performance and generalization ability of the model, and enable it to better cope with cone-related tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0056] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0057] Figure 1 A flow chart of the model training method provided in an embodiment of the present disclosure;

[0058] Figure 2 A flow chart of a model training method provided in another embodiment of the present disclosure;

[0059] Figure 3 A flow chart of a model training method provided in another embodiment of the present disclosure;

[0060] Figure 4 A schematic diagram of the overall process of the cone barrel detection method provided in an embodiment of the present disclosure;

[0061] Figure 5 A flowchart of the cone barrel detection method provided in an embodiment of the present disclosure;

[0062] Figure 6 A schematic diagram of the structure of a model training device provided in an embodiment of the present disclosure;

[0063] Figure 7 A schematic structural diagram of a cone barrel detection device provided in an embodiment of the present disclosure;

[0064] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0065] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0066] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0067] The present disclosure provides a model training method, which is described below in conjunction with specific embodiments.

[0068] Figure 1 Flowchart of the cone detection method provided in the embodiment of the present disclosure. The method can be applied to electronic devices, which can be portable mobile devices such as smartphones, tablets, laptops, car navigation devices, smart sports equipment, etc.; they can also be fixed devices such as personal computers and smart home appliances. The method can be applied to scenarios where a cone detection model is trained, which can enhance the robustness of the model in processing complex and diverse real-world data, improve the performance and generalization ability of the model, and enable it to better cope with cone-related tasks. It is understandable that the cone detection method provided in the embodiment of the present disclosure can also be applied in other scenarios.

[0069] Below Figure 1 The cone barrel detection method shown in the figure is introduced. The specific steps of this method are as follows:

[0070] S101. Obtain multiple groups of training sample data.

[0071] In this step, the electronic device acquires multiple sets of training sample data, which are used to train the cone detection model. Specifically, a user collects multiple sets of training sample data and imports them into the electronic device. In response to the user's operation of importing the multiple sets of training sample data into the electronic device, the electronic device acquires the multiple sets of training sample data. Optionally, the training sample data is image data, such as a cloud-based cone dataset.

[0072] The training sample data should meet the following requirements: multiple angles, multiple cone types, different distances, sufficient clarity, and avoid partial images.

[0073] S102: Preprocess the multiple sets of training sample data to obtain multiple sets of preprocessed training sample data.

[0074] After obtaining multiple sets of training sample data, the electronic device preprocesses the multiple sets of training sample data to obtain multiple sets of preprocessed training sample data. Optionally, the electronic device may perform occlusion processing, flipping processing, and other operations on the multiple sets of training sample data to further obtain multiple sets of preprocessed training sample data. After obtaining the multiple sets of training sample data, a series of processing operations are performed on the multiple sets of training sample data to improve the model's metrics and generalization performance through high-quality data.

[0075] S103 , using the multiple groups of pre-processed training sample data, and training the initial cone bucket detection model by adding a preset noise value to obtain a trained cone bucket detection model.

[0076] In this step, the electronic device uses the multiple sets of preprocessed training sample data to train the initial cone bucket detection model by adding a preset noise value, thereby obtaining a trained cone bucket detection model. Specifically, the electronic device first obtains the initial cone bucket detection model, and then trains the initial cone bucket detection model by adding the preset noise value to obtain a trained cone bucket detection model.

[0077] The disclosed embodiment obtains multiple sets of training sample data, preprocesses the multiple sets of training sample data, obtains multiple sets of preprocessed training sample data, uses the multiple sets of preprocessed training sample data, and trains the initial cone bucket detection model by adding preset noise values ​​to obtain a trained cone bucket detection model. Compared with the prior art, the disclosed embodiment obtains multiple sets of preprocessed training sample data by preprocessing the multiple sets of training sample data. The preprocessing method of the cone bucket training sample data can better highlight and enhance the local features of the cone bucket attributes, so that the model can more accurately learn and understand important attributes such as the shape, color, and occlusion of the cone bucket. These preprocessing methods can enhance the robustness of the model in processing complex and diverse real-world data, improve the performance and generalization ability of the model, and enable it to better cope with cone bucket related tasks.

[0078] Figure 2 A flow chart of a model training method provided in another embodiment of the present disclosure is shown as follows: Figure 2 As shown, the method includes the following steps:

[0079] S201. Obtain multiple groups of training sample data.

[0080] Specifically, the implementation process and principle of S201 and S101 are the same and will not be repeated here.

[0081] S202: Perform photometric distortion processing on the multiple sets of training sample data to obtain multiple sets of first training sample data.

[0082] like Figure 4As shown, PhotoMetricDistortion represents photometric distortion processing. The electronic device performs photometric distortion processing on the multiple sets of training sample data to obtain multiple sets of first training sample data. In the cone barrel detection task, the colors of the cone barrels are diverse, the reflective strips of the cone barrels may be aged and unclear, and there are differences in light intensity between day and night, rainy and sunny days; PhotoMetricDistortion will randomly select the amount of change within a certain range, and can perform photometric transformation on the image to increase the amplitude of the image color change. By performing photometric transformation on the image, such as changing the brightness, contrast and color, the adaptability of the visual system to changes in real-world images can be effectively improved, allowing the model to better adapt to the properties of cone barrels under different lighting and color conditions.

[0083] S203 : Perform random occlusion processing on the multiple groups of first training sample data to obtain multiple groups of second training sample data.

[0084] like Figure 4 As shown, Cutout represents random occlusion processing. The electronic device performs random occlusion processing on the multiple sets of first training sample data to obtain multiple sets of second training sample data. Cutout can randomly block certain areas in the image to simulate the occlusion of the cone. The Cutout operation can simulate the occlusion that the cone may encounter in real scenes, enabling the model to better learn and understand the shape and structure of the cone.

[0085] S204 : Perform random flipping processing on the multiple sets of second training sample data to obtain multiple sets of third training sample data.

[0086] like Figure 4 As shown, RandomFlip represents random flipping. The electronic device performs random flipping on the multiple sets of second training sample data to obtain multiple sets of third training sample data. In the cone detection task, cones may be distributed in various situations, such as upright or lying down. The RandomFlip operation can randomly flip the image to increase data diversity. By randomly flipping the image left and right or up and down, using RandomFlip can help the model better adapt to cone shapes of different directions and angles. This method of increasing data diversity helps improve the model's generalization ability.

[0087] S205 : Perform random cropping on the multiple groups of third training sample data to obtain multiple groups of pre-processed training sample data.

[0088] like Figure 4As shown, RandomCrop represents a random cropping process. The electronic device performs random cropping on the multiple sets of third training sample data to obtain multiple sets of preprocessed training sample data. The RandomCrop operation can randomly crop an image, introducing variations in local details. By randomly cropping an image, cone images of different sizes can be introduced, allowing the model to focus on more local features, helping to improve the ability to learn cone attributes in a given image.

[0089] The aforementioned preprocessing methods for cone data can better highlight and enhance the local characteristics of cone attributes. By simulating cone occlusion, increasing data diversity, introducing variations in local details, and increasing the amplitude of photometric transformations, the model can more accurately learn and understand important properties such as cone shape, color, and occlusion. These preprocessing methods enhance the model's robustness in handling complex and diverse real-world data, improving its performance and generalization, and making it more suitable for cone-related tasks.

[0090] S206: Construct an initial cone barrel detection model.

[0091] In this step, the electronic device builds an initial cone barrel detection model.

[0092] In some embodiments, constructing the initial cone bucket detection model includes: using a preset detector to construct the initial cone bucket detection model, and the preset detector includes a backbone network, a multi-layer encoder, a multi-layer decoder and multiple prediction heads.

[0093] In terms of model construction, the embodiment of the present disclosure uses DINO Detector as a detector to ensure better detector performance. The detector includes a Backbone, a multi-layer Transformer encoder, a multi-layer Transformer decoder and multiple prediction heads. First, the model extracts subdivided scale features from the image through the backbone network, and then combines these features with position encoding and inputs them into the Transformer encoder to obtain an enhanced feature map. The model uses a query selection mechanism to initialize the decoder positioning based on pre-defined anchor box coordinates and sets the content query to an adjustable mode. Next, the model uses a deformed attention method to integrate the features passed from the Transformer encoder layer and gradually optimizes and updates the query vector. Ultimately, the model can accurately output the adjusted anchor box position and give accurate cone bucket categories based on rich content features. In some embodiments, a SwinL model based on self-supervised training can be used as the training Backbone; the self-supervised training dataset is 13 million image data in autonomous driving scenarios, and the self-supervised algorithm used is Simmim.

[0094] S207 , using the multiple groups of pre-processed training sample data, and training the initial cone bucket detection model by adding a preset noise value to obtain a trained cone bucket detection model.

[0095] Specifically, the implementation process and principle of S207 and S103 are the same and will not be repeated here.

[0096] The disclosed embodiment obtains multiple sets of training sample data, performs photometric distortion processing on the multiple sets of training sample data to obtain multiple sets of first training sample data, and performs random occlusion processing on the multiple sets of first training sample data to obtain multiple sets of second training sample data. Furthermore, the multiple sets of second training sample data are randomly flipped to obtain multiple sets of third training sample data, and the multiple sets of third training sample data are randomly cropped to obtain multiple sets of preprocessed training sample data. Next, an initial cone bucket detection model is constructed, and the initial cone bucket detection model is trained using the multiple sets of preprocessed training sample data by adding a preset noise value to obtain a trained cone bucket detection model. Compared with the existing technology, the embodiment of the present disclosure simulates the occlusion of cone barrels, increases the diversity of data, introduces changes in local details, and increases the amplitude of photometric transformation. The preprocessing method of cone barrel training sample data can better highlight and enhance the local characteristics of cone barrel attributes, so that the model can more accurately learn and understand important attributes such as the shape, color and occlusion of the cone barrel. These preprocessing methods can enhance the robustness of the model in processing complex and diverse real-world data, improve the performance and generalization ability of the model, and enable it to better cope with cone barrel related tasks.

[0097] Figure 3 A flow chart of a model training method provided in another embodiment of the present disclosure is shown as follows: Figure 3 As shown, the method includes the following steps:

[0098] S301: Obtain multiple groups of training sample data.

[0099] Specifically, the implementation process and principle of S301 and S101 are the same and will not be described in detail here.

[0100] S302: Preprocess the multiple sets of training sample data to obtain multiple sets of preprocessed training sample data.

[0101] Specifically, the implementation process and principle of S302 and S102 are the same and will not be described in detail here.

[0102] S303: Obtain a true value label corresponding to each set of preprocessed training sample data in the multiple sets of preprocessed training sample data.

[0103] In this step, the electronic device obtains the true value label corresponding to each set of preprocessed training sample data. The true value label represents the actual cone bucket result in the training sample data. The actual cone bucket result can include whether a cone bucket exists, the cone bucket type, and the cone bucket location.

[0104] S304. In the preset first training round, a noise of a preset first amplitude is added to the true value label corresponding to each group of preprocessed training sample data, and the initial cone bucket detection model is trained using each group of preprocessed training sample data and the true value label with the noise of the preset first amplitude added corresponding to each group of preprocessed training sample data to obtain a first cone bucket detection model.

[0105] The electronic device will add noise of different amplitudes to the true value labels at different training stages of the cone bucket detection model. Specifically, the electronic device adds noise of a preset first amplitude to the true value labels corresponding to each set of preprocessed training sample data in the preset first training round, and uses each set of preprocessed training sample data and the true value labels corresponding to each set of preprocessed training sample data to add the preset first amplitude noise to train the initial cone bucket detection model to obtain the first cone bucket detection model. For example, in the first 27 rounds (epochs) of training, large amplitude noise is used to convert the original true value label data into positive samples or negative samples. Large amplitude noise can significantly improve the robustness of the model.

[0106] S305. In the preset second training round, a second amplitude of noise is added to the true value label corresponding to each group of preprocessed training sample data, and the first cone bucket detection model is trained using the multiple groups of preprocessed training sample data and the true value label with the preset second amplitude of noise added corresponding to each group of preprocessed training sample data to obtain a trained cone bucket detection model.

[0107] In this step, the electronic device adds noise of a second amplitude to the true value labels corresponding to each set of preprocessed training sample data in a preset second training round. Using the multiple sets of preprocessed training sample data and the true value labels corresponding to each set of preprocessed training sample data with the preset second amplitude noise added, the first cone bucket detection model is trained to obtain a trained cone bucket detection model. For example, during training epochs 27-36, using a smaller amplitude noise and reducing the noise amplitude can reduce model false detections and improve the accuracy of cone bucket model detection. Optionally, the preset first amplitude noise is greater than the preset second amplitude noise. By dynamically applying noise, the model can achieve better performance.

[0108] The embodiment of the present disclosure obtains multiple sets of training sample data, preprocesses the multiple sets of training sample data, obtains multiple sets of preprocessed training sample data, and obtains the true value label corresponding to each set of preprocessed training sample data in the multiple sets of preprocessed training sample data. Furthermore, in a preset first training round, a noise of a preset first amplitude is added to the true value label corresponding to each set of preprocessed training sample data, and the initial cone bucket detection model is trained using each set of preprocessed training sample data and the true value label corresponding to each set of preprocessed training sample data with the noise of the preset first amplitude added, to obtain the first cone bucket detection model. In a preset second training round, a noise of a second amplitude is added to the true value label corresponding to each set of preprocessed training sample data, and the first cone bucket detection model is trained using the multiple sets of preprocessed training sample data and the true value label corresponding to each set of preprocessed training sample data with the noise of the preset second amplitude added, to obtain a trained cone bucket detection model. Compared with the prior art, the disclosed embodiment obtains multiple sets of preprocessed training sample data by preprocessing the multiple sets of training sample data. The preprocessing method of the cone bucket training sample data can better highlight and enhance the local features of the cone bucket attributes, so that the model can more accurately learn and understand important attributes such as the shape, color and occlusion of the cone bucket. These preprocessing methods can enhance the robustness of the model in processing complex and diverse real-world data, improve the performance and generalization ability of the model, and enable it to better cope with cone bucket related tasks.

[0109] Figure 5 Flowchart of the cone detection method provided in the embodiment of the present disclosure. The method can be applied to electronic devices, which can be portable mobile devices such as smart phones, tablet computers, laptop computers, car navigation devices, smart sports equipment, etc.; they can also be fixed devices such as personal computers and smart home appliances. The method can be applied to scenarios where cones are detected, and can also be applied to scenarios where cones are identified. The embodiment of the present disclosure can save the time of cone detection, improve the accuracy of cone detection, cope with complex cone detection scenarios, and enhance the robustness of cone detection. It is understandable that the cone detection method provided in the embodiment of the present disclosure can also be applied in other scenarios.

[0110] Below Figure 5 The cone barrel detection method shown in the figure is introduced. The specific steps of this method are as follows:

[0111] S401: Acquire an image to be detected.

[0112] In this step, the electronic device acquires the image to be detected. Specifically, the electronic device can acquire the image to be detected using an image acquisition device. In some embodiments, the electronic device can also acquire the image to be detected from the cloud, without specific limitation.

[0113] S402: Perform cone bucket detection on the image to be detected using the trained cone bucket detection model to obtain a cone bucket detection result.

[0114] In this step, the electronic device can perform cone bucket detection on the image to be detected using the trained cone bucket detection model to obtain a cone bucket detection result. Specifically, after the electronic device obtains the image to be detected, it inputs the image to be detected into the trained cone bucket detection model to perform cone bucket detection and obtain a cone bucket detection result.

[0115] In some embodiments, before S402, the method further includes: S1, performing model pruning processing on the trained cone bucket detection model to obtain a target cone bucket detection model.

[0116] In this step, if Figure 4 As shown, the electronic device prunes the trained cone detection model to obtain the target cone detection model, which can increase the model's inference speed by more than 2 times, ensuring both high accuracy and high inference speed. This is particularly important for handling complex cone distribution scenarios with diverse shapes and colors, allowing the model to better adapt to various complex scenarios in cone detection.

[0117] In some embodiments, S1 may include but is not limited to S11 and S12:

[0118] S11, converting the trained cone bucket detection model into a format with a preset number of digits to obtain a cone bucket detection model with a preset number of digits;

[0119] Optionally, the trained cone bucket detection model generally has 32-bit precision. In this step, the electronic device converts the trained cone bucket detection model into a preset bit format to obtain a cone bucket detection model with a preset bit number. The preset bit number can be 16 bits. Converting 32-bit precision into 16-bit precision can improve the inference speed of the model.

[0120] S12. Reduce the number of layers of the encoder in the cone-bucket detection model with the preset number of bits to a preset number of layers to obtain a target cone-bucket detection model.

[0121] In this step, the electronic device can reduce the number of layers of the encoder in the cone barrel detection model with the preset number of bits to a preset number of layers to obtain a target cone barrel detection model. By reducing the number of layers of the encoder, the inference speed of the model can be further improved.

[0122] In some embodiments, performing cone bucket detection on the image to be detected by using a trained cone bucket detection model to obtain a cone bucket detection result includes: performing cone bucket detection on the image to be detected by using the target cone bucket detection model to obtain a cone bucket detection result.

[0123] After obtaining the target cone detection model, the electronic device performs cone detection on the image to be detected using the target cone detection model to obtain a cone detection result. Specifically, after obtaining the image to be detected, the electronic device inputs the image to be detected into the target cone detection model to perform cone detection and obtain a cone detection result.

[0124] In some embodiments, before performing cone bucket detection on the image to be detected using the trained cone bucket detection model and obtaining the cone bucket detection result, the method further includes: packaging and deploying the trained cone bucket detection model using a target framework.

[0125] Optionally, in terms of model packaging and deployment, the disclosed embodiments use the Triton framework to optimize inference to ensure no loss in model accuracy or speed. The Triton framework provides efficient model deployment and inference services, along with flexible configuration options to meet the needs of different scenarios. By adopting the Triton framework, model deployment efficiency can be improved, while ensuring the stability and reliability of the model in a production environment.

[0126] In some embodiments, the present disclosure utilizes the Redis protocol to ensure normal user interaction with the service. Redis is a high-performance, open-source data storage and caching platform with fast read / write speeds and persistent data. Using the Redis protocol enables smooth communication between the model and the user, ensuring system stability and service reliability, thereby improving the reliability of cone bucket detection.

[0127] The disclosed embodiment obtains an image to be detected, performs cone bucket detection on the image to be detected through a trained cone bucket detection model, and obtains a cone bucket detection result. This can save the time of cone bucket detection, improve the accuracy of cone bucket detection, cope with complex cone bucket detection scenarios, and enhance the robustness of cone bucket detection.

[0128] Figure 6 This is a schematic diagram of the structure of the model training device provided in the embodiment of the present disclosure. The model training device can be the electronic device described in the above embodiment, or the model training device can be a component or assembly in the electronic device. The model training device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the model training method, such as Figure 6 As shown, the model training device 40 includes: an acquisition module 41, an acquisition module 42, and a training module 43; wherein, the acquisition module 41 is used to obtain multiple groups of training sample data; the acquisition module 42 is used to preprocess the multiple groups of training sample data to obtain multiple groups of preprocessed training sample data; the training module 43 is used to use the multiple groups of preprocessed training sample data to train the initial cone bucket detection model by adding a preset noise value to obtain a trained cone bucket detection model.

[0129] Optionally, when the obtaining module 42 preprocesses the multiple groups of training sample data to obtain multiple groups of preprocessed training sample data, it is specifically used to: perform photometric distortion processing on the multiple groups of training sample data to obtain multiple groups of first training sample data; perform random occlusion processing on the multiple groups of first training sample data to obtain multiple groups of second training sample data; perform random flipping processing on the multiple groups of second training sample data to obtain multiple groups of third training sample data; and perform random cropping processing on the multiple groups of third training sample data to obtain multiple groups of preprocessed training sample data.

[0130] Optionally, before the initial cone barrel detection model is trained by adding a preset noise value using the multiple groups of preprocessed training sample data to obtain the trained cone barrel detection model, the device 40 also includes: a construction module 44; the construction module 44 is used to construct the initial cone barrel detection model.

[0131] Optionally, when the construction module 44 constructs the initial cone bucket detection model, it is specifically used to: use a preset detector to construct the initial cone bucket detection model, and the preset detector includes a backbone network, a multi-layer encoder, a multi-layer decoder and multiple prediction heads.

[0132] Optionally, the training module 43 uses the multiple groups of preprocessed training sample data to train the initial cone bucket detection model by adding a preset noise value to obtain the trained cone bucket detection model, and is specifically used to: obtain the true value label corresponding to each group of preprocessed training sample data in the multiple groups of preprocessed training sample data; in the preset first training round, add a preset first amplitude noise to the true value label corresponding to each group of preprocessed training sample data, and use the each group of preprocessed training sample data and the corresponding true value label of each group of preprocessed training sample data with the preset first amplitude noise added to train the initial cone bucket detection model to obtain the first cone bucket detection model; in the preset second training round, add a second amplitude noise to the true value label corresponding to each group of preprocessed training sample data, and use the multiple groups of preprocessed training sample data and the corresponding true value label of each group of preprocessed training sample data with the preset second amplitude noise added to train the first cone bucket detection model to obtain the trained cone bucket detection model; wherein, the preset first amplitude noise is greater than the preset second amplitude noise.

[0133] Figure 6 The cone barrel detection device of the illustrated embodiment can be used to implement the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.

[0134] Figure 7This is a schematic diagram of the structure of the cone barrel detection device provided in the embodiment of the present disclosure. The cone barrel detection device can be the electronic device described in the above embodiment, or the cone barrel detection device can be a component or assembly in the electronic device. The cone barrel detection device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the cone barrel detection method, such as Figure 7 As shown, the cone barrel detection device 50 includes: an acquisition module 51 and a detection module 52; wherein, the acquisition module 51 is used to acquire the image to be detected; the detection module 52 is used to perform cone barrel detection on the image to be detected through a trained cone barrel detection model to obtain a cone barrel detection result.

[0135] Optionally, before performing cone bucket detection on the image to be detected using the trained cone bucket detection model and obtaining the cone bucket detection result, the device 50 further includes: a pruning module 53; the pruning module 53 is used to perform model pruning processing on the trained cone bucket detection model to obtain a target cone bucket detection model;

[0136] The detection module 52 performs cone bucket detection on the image to be detected through the trained cone bucket detection model and obtains the cone bucket detection result. It is specifically used to: perform cone bucket detection on the image to be detected through the target cone bucket detection model and obtain the cone bucket detection result.

[0137] Optionally, the pruning module 53 performs model pruning on the trained cone bucket detection model to obtain a target cone bucket detection model, which is specifically used to: convert the trained cone bucket detection model into a preset bit format to obtain a cone bucket detection model with a preset bit number; reduce the number of layers of the encoder in the cone bucket detection model with a preset bit number to a preset number of layers to obtain a target cone bucket detection model.

[0138] Optionally, before performing cone bucket detection on the image to be detected by the trained cone bucket detection model and obtaining the cone bucket detection result, the device 50 also includes: a deployment module 54; the deployment module 54 is used to package and deploy the trained cone bucket detection model using a target framework.

[0139] Figure 7 The cone barrel detection device of the illustrated embodiment can be used to implement the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.

[0140] Figure 8 This is a schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 8 , which shows a structural diagram of an electronic device 600 suitable for implementing the embodiments of the present disclosure. Figure 8 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0141] like Figure 8 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes to implement the cone barrel detection method according to the embodiments described in the present disclosure, based on programs stored in read-only memory (ROM) 602 or programs loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. An input / output (I / O) interface 605 is also connected to bus 604.

[0142] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0143] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the method illustrated in the flowcharts, thereby implementing the cone detection method described above. In such embodiments, the computer program can be downloaded and installed from a network via communication device 609, or installed from storage device 608, or installed from ROM 602. When executed by processing device 601, the computer program performs the aforementioned functions defined in the method of the embodiments of the present disclosure.

[0144] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0145] In addition, an embodiment of the present disclosure also provides a vehicle, comprising: a memory; a processor; and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the cone barrel detection method as described above.

[0146] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0147] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0148] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0149] Obtain multiple sets of training sample data;

[0150] Preprocessing the multiple sets of training sample data to obtain multiple sets of preprocessed training sample data;

[0151] The initial cone bucket detection model is trained by adding a preset noise value using the multiple groups of preprocessed training sample data to obtain a trained cone bucket detection model.

[0152] And / or, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device:

[0153] Obtain the image to be detected;

[0154] The trained cone bucket detection model is used to perform cone bucket detection on the image to be detected to obtain a cone bucket detection result.

[0155] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0156] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0157] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0158] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.

[0159] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0160] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0161] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0162] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0163] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A model training method, characterized in that: The method comprises: Obtain multiple sets of training sample data; Preprocessing the multiple sets of training sample data to obtain multiple sets of preprocessed training sample data; The initial cone bucket detection model is trained by adding a preset noise value using the multiple groups of preprocessed training sample data to obtain a trained cone bucket detection model.

2. The method according to claim 1, characterized in that The preprocessing of the plurality of sets of training sample data to obtain a plurality of sets of preprocessed training sample data includes: Performing photometric distortion processing on the multiple sets of training sample data to obtain multiple sets of first training sample data; Performing random occlusion processing on the multiple sets of first training sample data to obtain multiple sets of second training sample data; Performing random flipping processing on the multiple sets of second training sample data to obtain multiple sets of third training sample data; The multiple groups of third training sample data are randomly cropped to obtain multiple groups of preprocessed training sample data.

3. The method according to claim 1, characterized in that Before training the initial cone bucket detection model using the multiple sets of preprocessed training sample data by adding a preset noise value to obtain a trained cone bucket detection model, the method further includes: Build an initial cone detection model.

4. The method according to claim 3, characterized in that The construction of the initial cone barrel detection model includes: An initial cone bucket detection model is constructed using a preset detector, which includes a backbone network, a multi-layer encoder, a multi-layer decoder and multiple prediction heads.

5. The method according to claim 1, characterized in that The method of using the plurality of sets of preprocessed training sample data to train the initial cone bucket detection model by adding a preset noise value to obtain a trained cone bucket detection model includes: Obtaining a true value label corresponding to each set of preprocessed training sample data from the multiple sets of preprocessed training sample data; In a preset first training round, a noise of a preset first amplitude is added to the true value label corresponding to each set of preprocessed training sample data, and the initial cone bucket detection model is trained using each set of preprocessed training sample data and the true value label with the noise of the preset first amplitude added to each set of preprocessed training sample data to obtain a first cone bucket detection model; In a preset second training round, noise of a second amplitude is added to the true value label corresponding to each set of preprocessed training sample data, and the first cone bucket detection model is trained using the multiple sets of preprocessed training sample data and the true value label with the preset second amplitude noise added corresponding to each set of preprocessed training sample data to obtain a trained cone bucket detection model; The noise of the preset first amplitude is greater than the noise of the preset second amplitude.

6. A cone barrel detection method, characterized in that: The method comprises: Obtain the image to be detected; The trained cone bucket detection model is used to perform cone bucket detection on the image to be detected to obtain a cone bucket detection result.

7. The method according to claim 6, characterized in that Before performing cone bucket detection on the image to be detected using the trained cone bucket detection model and obtaining the cone bucket detection result, the method further includes: Perform model pruning on the trained cone bucket detection model to obtain the target cone bucket detection model; The cone bucket detection is performed on the image to be detected by the trained cone bucket detection model to obtain the cone bucket detection result, including: The target cone barrel detection model is used to perform cone barrel detection on the image to be detected to obtain a cone barrel detection result.

8. The method according to claim 7, characterized in that The method of performing model pruning on the trained cone bucket detection model to obtain a target cone bucket detection model includes: Convert the trained cone bucket detection model into a preset digit format to obtain a cone bucket detection model with a preset digit; The number of layers of the encoder in the cone bucket detection model with the preset number of bits is reduced to the preset number of layers to obtain a target cone bucket detection model.

9. The method according to claim 6, characterized in that Before performing cone bucket detection on the image to be detected using the trained cone bucket detection model and obtaining the cone bucket detection result, the method further includes: The trained cone bucket detection model is packaged and deployed using a target framework.

10. A model training device, characterized in that: include: An acquisition module is used to obtain multiple sets of training sample data; An obtaining module, configured to preprocess the plurality of sets of training sample data to obtain a plurality of sets of preprocessed training sample data; The training module is used to use the multiple groups of preprocessed training sample data to train the initial cone bucket detection model by adding a preset noise value to obtain a trained cone bucket detection model.

11. A cone barrel detection device, characterized in that: include: An acquisition module, used for acquiring an image to be detected; The detection module is used to perform cone bucket detection on the image to be detected through the trained cone bucket detection model to obtain the cone bucket detection result.

12. An electronic device, characterized in that: include: Memory; processor; as well as computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method according to any one of claims 1 to 9.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

14. A vehicle, characterized in that: include: Memory; processor; as well as computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method according to any one of claims 1 to 9.