Target model training method, detection method, related device and vehicle
Through the semi-supervised learning method, the teacher model is used to generate pseudo labels to train the student model, which solves the problem of high resource consumption in fully supervised learning, improves the accuracy and robustness of road sign detection under limited labeled data, and reduces the labeling cost.
Patent Information
- Application Number
- CN202510711028.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-19
AI Technical Summary
Existing technologies rely on fully supervised learning methods for road sign detection, which requires large amounts of precisely labeled image datasets. This results in high resource consumption and a long time consumption, increasing the difficulty and cost of manual operations.
A semi-supervised learning approach is adopted, using at least two teacher models to predict sample images, generate pseudo labels, and train the student model based on these prediction results, reducing dependence on labeled data and guiding the learning process of the student model through the supervised experience of the teacher model.
In the case of limited labeled data, the model's detection accuracy and robustness of road signs are improved, the cost and time of data annotation are reduced, and the model's adaptability and generalization ability in complex road scenarios are enhanced.
Smart Images

Figure CN120673360A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a target model training method, a detection method, related devices and a vehicle. Background Art
[0002] With the rapid development of autonomous driving technology, road sign detection has also become crucial. The fully supervised learning methods of related technologies rely on large amounts of precisely labeled image datasets for model training. However, high-precision labeling requires resources and is time-consuming, increasing the difficulty and time cost of manual operations. Summary of the Invention
[0003] The embodiments of the present application provide a target model training method, a detection method, related devices and a vehicle to solve the above-mentioned problems.
[0004] In order to achieve the above object, according to the first aspect of the present application, a method for training a target model is provided, the method comprising:
[0005] Based on the prediction results of at least two teacher models on sample images containing sample road signs, the student model is trained to obtain a target model.
[0006] Optionally, the prediction result of the sample road sign includes the position and / or type of the sample road sign.
[0007] Optionally, the road marking includes at least one of a lane line, a lane center line, and a roadside line.
[0008] Optionally, the training of the student model based on the prediction results of the at least two teacher models on the sample images containing the sample road signs to obtain the target model includes:
[0009] Based on the prediction results output by the at least two teacher models, a pseudo label of the sample image is obtained by screening;
[0010] Based on the pseudo labels, the student model is trained to obtain the target model.
[0011] Optionally, the pseudo label includes a first predicted position and / or a first predicted type of the sample road sign in the sample image.
[0012] Optionally, the screening to obtain the pseudo label of the sample image based on the prediction results output by the at least two teacher models includes:
[0013] Obtaining at least two second prediction types based on the prediction results output by the at least two teacher models;
[0014] Based on the at least two second prediction types, a first prediction type of the pseudo label is obtained by screening.
[0015] Optionally, the screening to obtain the first prediction type of the pseudo label based on the at least two second prediction types includes:
[0016] The second prediction type with the highest confidence among the at least two second prediction types is used as the first prediction type of the pseudo label.
[0017] Optionally, the screening to obtain the pseudo label of the sample image based on the prediction results output by the at least two teacher models includes:
[0018] Obtaining at least two second predicted positions based on the prediction results output by the at least two teacher models;
[0019] Based on the at least two second predicted positions, a first predicted position of the pseudo label is obtained.
[0020] Optionally, obtaining the first predicted position of the pseudo label based on the at least two second predicted positions includes:
[0021] A weighted process is performed on the at least two second predicted positions to obtain a first predicted position of the pseudo label.
[0022] Optionally, performing weighted processing on the at least two second predicted positions to obtain the first predicted position of the pseudo label includes:
[0023] The second predicted positions whose confidences are greater than or equal to a preset confidence threshold are weighted to obtain the first predicted positions of the pseudo labels.
[0024] Optionally, performing weighted processing on the at least two second predicted positions to obtain the first predicted position of the pseudo label includes:
[0025] When the deviation of the at least two second predicted positions is less than or equal to a preset deviation threshold, weighted processing is performed on the at least two second predicted positions to obtain the first predicted position of the pseudo label.
[0026] Optionally, the sample image includes a first sample image without labeled data, and the method further includes:
[0027] The target model is obtained by training the student model based on the prediction results of the at least two teacher models on the first sample image and the prediction result of the student model on the first sample image.
[0028] The first sample image is a sample image without labeled data.
[0029] Optionally, the training a student model based on the prediction results of the at least two teacher models on the first sample image and the prediction result of the student model on the first sample image to obtain the target model includes:
[0030] Determining a loss value based on prediction results of the at least two teacher models on the first sample image and a prediction result of the student model on the first sample image;
[0031] The parameters of the student model are trained based on the loss value to obtain the target model.
[0032] Optionally, the sample image further includes a second sample image with labeled data, and determining the loss value based on the prediction results of the at least two teacher models on the first sample image and the prediction result of the student model on the first sample image includes:
[0033] Determining a first loss value based on prediction results of the at least two teacher models on the first sample image and a prediction result of the student model on the first sample image;
[0034] Determining a second loss value based on a prediction result of the student model for the second sample image and the labeled data;
[0035] The loss value is determined based on the first loss value and the second loss value.
[0036] Optionally, determining the loss value based on the first loss value and the second loss value includes:
[0037] The first loss value and the second loss value are weighted to obtain the loss value.
[0038] Optionally, the method further includes:
[0039] The parameters of the teacher model are trained based on the loss value to obtain a trained teacher model.
[0040] Optionally, the training the teacher model based on the loss value to obtain a trained teacher model includes:
[0041] Updating parameters of the student model based on the loss value to obtain updated parameters of the student model;
[0042] Based on the updated parameters of the student model, the parameters of each teacher model are trained to obtain the trained teacher model.
[0043] Optionally, the training of parameters of each teacher model based on the updated parameters of the student model to obtain the trained teacher model includes:
[0044] The updated parameters of the student model and the parameters of the teacher model are weighted to obtain the updated parameters of the teacher model.
[0045] Optionally, the method further includes:
[0046] Performing a first enhancement process on the sample image to obtain a first enhanced image, wherein the first enhanced image is used to be input into the at least two teacher models respectively to obtain a prediction result output by each of the teacher models to train the student model.
[0047] Optionally, the method further includes:
[0048] performing a second enhancement process on the sample image to obtain a second enhanced image;
[0049] The student model is trained based on the prediction results output by each of the teacher models and the prediction results of the student model for the second enhanced image, and the first enhancement process is different from the second enhancement process.
[0050] Optionally, the degree of transformation of the first enhancement processing is smaller than that of the second enhancement processing.
[0051] Optionally, the at least two teacher models and the student model are models of different architectures, or are models of the same architecture but with different initialization parameters.
[0052] According to a second aspect of the present application, an embodiment of the present application further provides a road sign detection method, the method comprising:
[0053] The image to be tested containing the target road sign is processed based on the target model to obtain the detection result of the target road sign, wherein the target model is trained according to any one of the target model training methods provided in the embodiments of the present application.
[0054] According to a third aspect of the present application, an embodiment of the present application further provides an electronic device, including:
[0055] a memory having a computer program stored thereon;
[0056] A processor is used to execute the computer program in the memory to implement the steps of any one of the methods provided in the embodiments of the present application.
[0057] According to the fourth aspect of the present application, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the methods provided in the embodiments of the present application are implemented.
[0058] According to the fifth aspect of the present application, an embodiment of the present application further provides a computer program product, comprising a computer program or instructions, which, when executed by a processor, implement the steps of any one of the methods provided in the embodiments of the present application.
[0059] According to the sixth aspect of the present application, an embodiment of the present application further provides a vehicle, comprising the electronic device, or executing the steps of any one of the methods provided in the embodiments of the present application.
[0060] Some embodiments of the present specification include at least the following beneficial effects: predicting sample images containing sample road signs based on at least two teacher models, and using the prediction results to train a student model to ultimately obtain a target model. In this way, the dependence on a large amount of precisely labeled data and the high and time-consuming labeling costs in fully supervised learning are overcome. The prediction results of multiple teacher models are used to guide the learning process of the student model, enabling the student model to better learn the characteristics and rules of road signs with less labeled data, thereby helping to improve the robustness and accuracy of the target model in road sign detection in complex road scenarios, while reducing the cost and time of data labeling.
[0061] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.
[0063] In order to more completely understand the present application and its beneficial effects, the following description will be given in conjunction with the accompanying drawings, wherein the same drawing numbers represent the same parts in the following description.
[0064] Figure 1 is an application scenario diagram of the road sign detection method according to some embodiments of this specification;
[0065] Figure 2 is an exemplary flow chart of a target model training method according to some embodiments of this specification;
[0066] Figure 3 is an exemplary schematic diagram of a dual-teacher model-student model according to some embodiments of this specification;
[0067] Figure 4 is an exemplary schematic diagram of another target model training method according to some embodiments of this specification;
[0068] Figure 5 is an exemplary schematic diagram of a road sign detection method according to some embodiments of this specification;
[0069] Figure 6 is a schematic structural diagram of an electronic device according to some embodiments of this specification;
[0070] Figure 7 is an exemplary schematic diagram of a vehicle according to some embodiments of the present specification. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0072] In order to facilitate understanding of the implementation scheme provided in the examples of this application, the relevant application background of the target model training method and road sign detection method provided in the examples of this application is first explained.
[0073] Currently, the task of detecting road signs is arduous. Related technologies rely on fully supervised networks for road sign detection. Training fully supervised networks requires a large amount of image data with annotated road signs (e.g., lane markings). However, labeling road signs (e.g., lane markings) faces many challenges. For example, lane markings are typically narrow, occupying only a few pixels in width in an image, and annotators must accurately mark the centerline or boundary of the lane markings. Furthermore, to ensure the model's robustness in complex and changing road scenarios, it is necessary to collect scene data for different weather conditions (e.g., rain, snow, fog), lighting conditions (e.g., strong light, shadows), road types (e.g., highways, rural roads, urban roads), road sign types (e.g., solid, dashed, double, white and yellow lane markings), and the presence of potential obstacles (e.g., vehicles, pedestrians, construction signs, etc.). This makes data labeling expensive and time-consuming.
[0074] In view of this, some embodiments of the present specification provide a target model training method and a road sign detection method, which are based on the semi-supervised learning method in machine learning. They can effectively utilize limited labeled data and expand the data set through unlabeled data, thereby improving the performance of the model without increasing the labeling cost. The supervised experience of the teacher model is used to guide the learning process of the student model. A limited number of labeled data with road signs and a large amount of image data without road signs are used to learn the potential semantic features of lane lines from a wide range of training data, thereby reducing dependence on labeled data while improving the detection accuracy of road signs. This method is not only applicable to 2D road sign detection tasks, but can also be further extended to 3D road sign detection tasks.
[0075] Figure 1 This is an application scenario diagram of the road sign detection method shown in some embodiments of this specification.
[0076] like Figure 1 As shown, an embodiment of the present application provides a road sign detection method, wherein the execution subject of the road sign detection method may be an electronic device, which may be a server, a terminal or other device.
[0077] The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, and big data and artificial intelligence platforms. Terminals can include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Terminals and servers can be connected directly or indirectly via wired or wireless communication, which is not limited in this application.
[0078] Among them, the electronic device can be a vehicle-mounted terminal integrated in a vehicle, or a device for data interaction with a vehicle. The vehicle can be a fuel vehicle, a plug-in hybrid vehicle, a new energy vehicle, etc. This application does not make specific limitations on this.
[0079] See also Figure 1 , wherein the electronic device may be a terminal device on a vehicle, and the electronic device may process an image to be tested containing a target road sign based on a target model to obtain a detection result of the target road sign. The terminal device (which may be referred to as a first device) may also be communicatively connected to another terminal device (which may be referred to as a second device) to obtain a student model trained by the second device. The second device may train the student model based on the prediction results of at least two teacher models on sample images containing sample road signs to obtain a target model. For more information, please refer to the relevant description below.
[0080] It is understood that the terminal device used to train the model and the terminal device used to apply the model can be the same or different. For example, the model trained by the second device can be applied to different systems or devices (such as the first device). For example, the first device can be integrated into various mobile devices (wheeled construction equipment, autonomous vehicles, assisted driving vehicles, etc.). Autonomous vehicles can also be cars, trucks, motorcycles, buses, boats, airplanes, helicopters, lawn mowers, recreational vehicles, amusement park vehicles, construction equipment, trams, golf carts, trains, and carts, etc.
[0081] In some embodiments, the first device includes a processing module, which can be used to execute the trained target model provided in the embodiments of the present application.
[0082] It should be noted that Figure 1 The application scenario of the road sign detection method shown is merely an example. The application scenario of the code scanning method described in the embodiments of this application is intended to more clearly illustrate the technical solution of the embodiments of this application and does not constitute a limitation on the technical solution provided in the embodiments of this application. Those skilled in the art will appreciate that with the evolution of code scanning and the emergence of new business scenarios, the technical solution provided in this application will also be applicable to similar technical problems.
[0083] The solutions provided in the embodiments of the present application are specifically described by the following embodiments. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.
[0084] Figure 2 is an exemplary flow chart of a method for training a target model according to some embodiments of this specification. In some embodiments, process 200 can be executed based on an electronic device. Figure 2 As shown, the process 200 includes the following steps.
[0085] Step 210 : Based on the prediction results of at least two teacher models on the sample images containing the sample road signs, the student model is trained to obtain a target model.
[0086] The target model is used to process the image to be tested containing the target road sign to obtain a detection result of the target road sign.
[0087] A teacher model is a pre-trained machine learning model. For example, a teacher model might be trained to recognize specific road markings (such as lane markings, stop lines, and lane centerlines). Using at least two teacher models can provide more comprehensive and diverse prediction results.
[0088] In some embodiments, the teacher model can be a large pre-trained model, for example, a deep convolutional neural network (CNN), such as ResNet, VGG, Inception, etc., or a Transformer architecture, such as BERT, ViT (Vision Transformer), etc.
[0089] The number of teacher models can be two or more. It can be understood that the number of teacher models can be flexibly designed according to actual needs.
[0090] Sample road signs are road signs included in sample images used for training. For example, road signs can be various markings existing on actual roads, such as lane dividers, lane center lines, crosswalks, stop signs, etc.
[0091] Sample images are image data used to train the teacher model and / or student model. Sample images are data sets used to input into the teacher model and student model to obtain prediction results.
[0092] In some embodiments, the sample images may be from different scenes, including different weather, lighting conditions, etc.
[0093] The prediction result refers to the result of predicting the location, type and other relevant information of the sample road signs.
[0094] In some embodiments, the prediction result may include information related to the sample road sign, such as the position of the road sign in the sample image, which may be represented by a set of coordinates, such as the coordinates of a series of points on the sample road sign.
[0095] The student model is the machine learning model to be trained. The prediction results of at least two teacher models are used to optimize and adjust the parameters of the initial learning model, resulting in a trained student model. The trained student model is then able to independently and accurately identify target road signs in new test images without direct guidance from the teacher model.
[0096] In some embodiments, the student model can be a lightweight model, for example, a small CNN such as MobileNet, ShuffleNet, or a lightweight Transformer such as DistilBERT.
[0097] The target model refers to the trained student model. In some embodiments, the input of the target model may include the image to be tested, and the output may include the detection result of the target road sign.
[0098] The image to be tested is an image that requires target road sign detection. For example, the image to be tested can be derived from an actual application scenario. For example, the image to be tested is an image of the environment in front of the vehicle.
[0099] In some embodiments, the electronic device may be communicatively connected to an image acquisition device installed on a vehicle. During the driving of the vehicle, the electronic device may obtain images to be measured in real time and periodically based on the image acquisition device.
[0100] An image acquisition device is a device capable of capturing image information. Exemplary image acquisition devices may include portable digital cameras, webcams, and the like. In some embodiments, the image acquisition device may perform image acquisition operations in response to acquisition instructions sent by an electronic device. For example, upon receiving an acquisition instruction from an electronic device, the image acquisition device captures an image to be measured.
[0101] In some embodiments, the image acquisition device may be installed inside the front windshield of the vehicle, or outside the front windshield of the vehicle, or at other locations around the vehicle body.
[0102] The target road sign refers to the road sign that needs to be detected and recognized in the image to be tested.
[0103] The detection result of the target road sign refers to the recognition result of the target road sign by the target model.
[0104] In some embodiments, the detection result may include relevant information of the target road sign, such as the location of the target road sign in the image to be detected, or the confidence level of the detection result.
[0105] In some embodiments, the prediction result of the sample road sign includes the location and / or type of the sample road sign.
[0106] In some embodiments, the detection result of the target road sign includes the position and / or type of the target road sign. The target road sign is a road sign included in the image to be detected.
[0107] The position of the target road sign is used to indicate the specific position information of the target road sign output by the target model in the image to be tested.
[0108] The target road sign type indicates the type and / or category of the target road sign output by the target model. This target road sign can include broad category information corresponding to different road signs, such as lane markings, lane centerlines, and curb lines. It can also include sub-category information for a specific type of road sign. For example, if the target road sign is a lane marking, the target road sign type can include sub-category information such as solid line, dashed line, double line, single yellow line, and double yellow line.
[0109] In some embodiments, the road marking includes at least one of a lane line, a lane center line, and a roadside line.
[0110] In some embodiments of the present specification, in a semi-supervised learning scenario, the prediction results of the teacher model can generate pseudo labels for sample images without labeled data, and the student model can be trained using the pseudo labels, thereby reducing dependence on a large amount of labeled data; labeling road signs requires a lot of manpower and time, and requires high accuracy. The pseudo labels generated by the teacher model can replace part of the labeled data to a certain extent, reducing the cost of data labeling.
[0111] In some embodiments, training a student model based on prediction results of at least two teacher models on sample images containing sample road signs to obtain a target model includes:
[0112] Based on the prediction results output by at least two teacher models, the pseudo labels of the sample images are screened;
[0113] Based on the pseudo labels, the student model is trained to obtain the target model.
[0114] Pseudo labels are labels generated from the prediction results of the teacher model.
[0115] In some embodiments, at least two teacher models can be used to predict the same sample image without labeled data or the same sample image without labeled data after different enhancement processing to obtain multiple prediction results; the multiple prediction results are screened according to their confidence levels, and the prediction result with the highest confidence level is selected as the pseudo label.
[0116] In some embodiments, a stepwise training or joint training approach can be used to adjust the parameters of the student model using an optimization algorithm (such as SGD or Adam) to obtain a target model. Stepwise training refers to first training the student model with sample images with labeled data, and then fine-tuning the student model with sample images with pseudo-labels; joint training refers to training the student model using both sample images with labeled data and sample images with pseudo-labels.
[0117] In some embodiments, the pseudo label includes a first predicted position and / or a first predicted type of the sample road sign in the sample image.
[0118] The first predicted position refers to a position label obtained based on the prediction result of the teacher model and can be used as a sample image without labeled data.
[0119] The first prediction type refers to the category label of the sample image without labeled data, which is obtained based on the prediction results of the teacher model.
[0120] In some embodiments, the pseudo-label may include both the first predicted position and the first predicted type, or may include only one of the two. The specific choice depends on the actual application requirements.
[0121] In some embodiments, the training dataset includes a small number of annotated second sample images, where the annotated second sample images are manually annotated images containing the location and type information of sample road signs. The training dataset may also include a large number of unannotated first sample images.
[0122] In some embodiments, at least one teacher model can be used to predict the first sample image without labeled data, generate prediction results, and screen out high-quality pseudo labels through confidence screening and / or consistency checking.
[0123] In some embodiments, the second sample image with labeled data and the first sample image with pseudo-labels can be combined to construct a hybrid training dataset, which is then used to train the student model. During training, the student model simultaneously learns from both the labeled data and the pseudo-labels. Using a pre-set loss function, the student model is able to optimize the loss of both the labeled and pseudo-labeled data to obtain a target model.
[0124] It should be noted that data labeling is the basis of detection algorithms. The lack of sufficient labeled data will greatly limit the performance and application scope of the algorithm. However, in real applications, obtaining a large number of sample images with labeled data is often costly and time-consuming. Compared with detection models based on a large amount of labeled data and fully supervised training, by using a semi-supervised learning structure based on a dual-teacher model-student model, the training of the student model can be completed with a limited number of sample images with labeled data and a large amount of open source image data without labeled data, reducing the strong dependence on manual labeling. At the same time, it can help increase the number of training samples in different scenarios, help the student model better identify road sign information in unseen scenarios, enhance the generalization ability of the model, and reduce the risk of overfitting.
[0125] In some embodiments of this specification, a large amount of unlabeled data can significantly improve the performance and generalization ability of the student model. This is very effective when labeled data is limited, and can effectively reduce the labeling cost while improving the robustness and adaptability of the model.
[0126] In some embodiments, based on the prediction results output by at least two teacher models, filtering and obtaining pseudo labels for sample images includes:
[0127] Obtaining at least two second prediction types based on prediction results output by at least two teacher models;
[0128] Based on the at least two second prediction types, a first prediction type of the pseudo label is obtained by screening.
[0129] In some embodiments, the prediction results output by a teacher model include a second prediction type and a second prediction type.
[0130] The second predicted position is used to indicate the teacher model's prediction of the specific position of the sample road sign in the sample image without labeled data.
[0131] The second prediction type is used to indicate the teacher model's prediction of type information of sample road signs in sample images without labeled data.
[0132] In some embodiments, the first prediction type of the pseudo label can be obtained based on at least two second prediction types in a variety of ways. For example, the first prediction type of the pseudo label can be obtained by screening through manual input or random selection.
[0133] In some embodiments, screening to obtain a first prediction type of a pseudo label based on at least two second prediction types includes:
[0134] The second prediction type with the highest confidence among the at least two second prediction types is used as the first prediction type of the pseudo label.
[0135] Confidence can be a number between 0 and 1, indicating how confident the model is in its prediction. A high score indicates a high probability that the prediction is correct, while a low score indicates a low probability that the prediction is correct.
[0136] Exemplarily, the at least two teacher models include a first teacher model and a second teacher model. A hard voting strategy can be used to select the second prediction type with the highest confidence in the two teacher models based on the majority vote principle as the first prediction type of the final pseudo label:
[0137]
[0138] in, is the second prediction type of the first teacher model, is the second prediction type of the second teacher model, is the first prediction type of pseudo label, p cls-1 is the confidence of the first teacher model output, p cls-2 is the confidence output by the second teacher model.
[0139] In some embodiments, based on the prediction results output by at least two teacher models, filtering and obtaining pseudo labels for sample images includes:
[0140] Obtaining at least two second predicted positions based on prediction results output by at least two teacher models;
[0141] Based on the at least two second predicted positions, a first predicted position of the pseudo label is obtained.
[0142] In some embodiments, the first predicted position of the pseudo label can be obtained based on the at least two second predicted positions in a variety of ways. For example, the first predicted position of the pseudo label can be obtained by screening through manual input or random selection.
[0143] In some embodiments, obtaining a first predicted position of a pseudo label based on at least two second predicted positions includes:
[0144] A weighted process is performed on the at least two second predicted positions to obtain a first predicted position of the pseudo label.
[0145] The weighted processing may refer to performing a weighted average on the positions of multiple regression points in the second predicted position to generate a more accurate first predicted position of the pseudo label.
[0146] In some embodiments, at least two second predicted positions may be weighted according to the confidence or other indicators of each teacher model to obtain the first predicted position of the pseudo label.
[0147] The first predicted position of the pseudo-label can be a set of coordinates consisting of a series of regression points. The coordinates of each regression point can be a two-dimensional coordinate (x, y) representing the position of the regression point in the sample image without annotated data. The regression points are used to represent the shape and position of the sample road sign.
[0148] For example, if the sample road sign consists of the following regression point coordinates {(x1, y1), (x2, y2), ... (xn, yn)}:
[0149] Among them, (x1, y1) is the coordinate of the first regression point on the sample road sign, and (xn, yn) is the coordinate of the last regression point on the sample road sign.
[0150] In some embodiments, for a regression point on a sample road sign, the first teacher model predicts the coordinates of the regression point M to be M1 and the confidence level to be P1, while the second teacher model predicts the coordinates of the regression point M to be M2 and the confidence level to be P2. In the pseudo-label, the coordinates of the regression point M are (M1*P1+M2*P2) / (P1+P2). Based on the above approach, the coordinates of a series of regression points on the sample road sign can be determined as the first predicted position of the pseudo-label.
[0151] In some embodiments, weighting the at least two second predicted positions to obtain the first predicted position of the pseudo label includes:
[0152] The predicted positions whose confidence is greater than or equal to a preset confidence threshold are weighted to obtain the first predicted position of the pseudo label.
[0153] The preset confidence threshold is a preset threshold condition used to filter the prediction results of the teacher model.
[0154] The preset confidence threshold may be a system preset value, a system default value, or a value determined based on experiments and experience.
[0155] In some embodiments, for a regression point M of a sample road sign, the first teacher model predicts the coordinates of the regression point M to be M1 and the confidence level to be P1, and the second teacher model predicts the coordinates of the regression point M to be M2 and the confidence level to be P2. If both the confidence levels P1 and P2 are greater than a preset confidence threshold, then the coordinates of the regression point M in the pseudo-label are calculated as (M1*P1+M2*P2) / (P1+P2). Based on the above approach, the coordinates of a series of regression points of the sample road sign can be determined as the first predicted position of the pseudo-label.
[0156] In some embodiments of the present specification, the accuracy and reliability of pseudo labels can be improved by screening second prediction positions that are greater than or equal to a preset confidence threshold; second prediction positions with low confidence often contain more noise, and screening by a preset confidence threshold can reduce the impact of this noise on the pseudo labels.
[0157] In some embodiments, weighting the at least two second predicted positions to obtain the first predicted position of the pseudo label includes:
[0158] When the deviation of the at least two second predicted positions is less than or equal to a preset deviation threshold, weighted processing is performed on the at least two second predicted positions to obtain a first predicted position of the pseudo label.
[0159] The deviation of the second predicted position refers to the difference between the second predicted positions output by different teacher models. The deviation can be measured by calculating the distance or error between the coordinates of the corresponding regression points.
[0160] The preset deviation threshold is a preset threshold condition used to determine whether the corresponding second predicted positions are consistent.
[0161] The preset deviation threshold may be a system preset value, a system default value, or a value determined based on experiments and experience.
[0162] In some embodiments, multiple teacher models can be used to predict sample images without labeled data. For each teacher model, the teacher model outputs the coordinates and confidence levels of multiple regression points. For each regression point, if the deviation between the coordinates of two corresponding regression points is less than or equal to a preset deviation threshold, the two coordinates of the regression point are weighted to obtain the coordinates of the regression point in the pseudo-label.
[0163] For example, through the soft voting strategy, that is, the weighted average method, only when the confidence p of the regression point predicted by the two teacher models is reg-1 ,p reg-2 When the preset confidence threshold φ is exceeded at the same time, and the distance between the coordinates of the regression points predicted by the two teacher models is less than the preset deviation threshold Δ, the regression point is considered to be a reliable regression point, and the predicted position in the pseudo label is:
[0164]
[0165] in, is the second predicted position output by the i-th teacher model, p reg-i is the confidence of the output of the i-th teacher model, is the first predicted position of the pseudo label.
[0166] In some embodiments of the present specification, by setting a deviation threshold, it is possible to ensure that weighted processing is performed only when the predicted positions of the teacher model are relatively consistent, thereby improving the consistency of the pseudo-labels; if the deviation between the predicted positions is large, it may indicate that the predicted positions of one or more regression points are inaccurate, and the impact of these noises on the pseudo-labels can be reduced by screening with a preset deviation threshold.
[0167] In some embodiments, the sample image includes a first sample image without labeled data, and the method further includes:
[0168] The student model is trained based on the prediction results of the at least two teacher models on the first sample image and the prediction result of the student model on the first sample image to obtain a target model.
[0169] In some embodiments, a large number of original images can be obtained based on the front view of the vehicle captured by the on-board camera, and a part of the data in the original image can be manually annotated for the location and type of sample road signs to form an annotated data set. As the second sample image; the remaining data is used as an unlabeled dataset As the first sample image. The second sample image x with labeled data l And the first sample image x without labeled data u The training data set x is composed of a preset ratio (e.g., 1:5) and a training data set x = {xl ,x u}.
[0170] In some embodiments, training a student model based on prediction results of at least two teacher models on the first sample image and a prediction result of a student model on the first sample image to obtain a target model includes:
[0171] Determining a loss value based on prediction results of the at least two teacher models for the first sample image and a prediction result of the student model for the first sample image;
[0172] The parameters of the student model are trained based on the loss value to obtain the target model.
[0173] The loss value is a metric that measures the difference between the prediction results of the learning model and the pseudo labels.
[0174] In some embodiments, the sample image further includes a second sample image with labeled data, and determining the loss value based on prediction results of the at least two teacher models for the first sample image and a prediction result of the student model for the first sample image includes:
[0175] Determining a first loss value based on prediction results of the at least two teacher models for the first sample image and a prediction result of the student model for the first sample image;
[0176] Determining a second loss value based on the prediction result of the student model for the second sample image and the labeled data;
[0177] Based on the first loss value and the second loss value, a loss value is determined.
[0178] In semi-supervised learning, the loss value includes two parts: a first loss value, which can be calculated based on the difference between the prediction results of at least two teacher models for the first sample image and the prediction results of the student model for the first sample image; a second loss value, which can be calculated based on the difference between the prediction results of the second sample image and the actual labeled data.
[0179] Exemplarily, the first loss value may be determined based on the following formula:
[0180] L u =L u-cls +γ2L u-reg ;
[0181] Where γ2 is the weight between the two loss terms in the first loss value, which can be determined based on experiments or experience, L u-cls and L u-reg are the classification loss term and regression loss term in the first loss value, respectively, and are defined as follows:
[0182]
[0183] in, The predicted type of the first sample image output by the student model, Predicting the first prediction type of the pseudo labels obtained by screening for multiple teacher models; is the predicted position of the first sample image output by the student model, It is the first predicted position of the pseudo label obtained by prediction-screening of multiple teacher models, and A' represents a specific data augmentation method (e.g., the second augmentation process).
[0184] Exemplarily, the second loss value may be determined based on the following formula:
[0185] L s =L s-cls +γ1L s-reg ;
[0186] Where γ1 is the weight between the two loss terms in the second loss value, which can be determined based on experiments or experience, L s-cls and L s-reg are the classification loss term and regression loss term in the second loss value, respectively, and are defined as follows:
[0187]
[0188] in, The predicted type of the second sample image output by the student model, The true label of the type information of the manually labeled sample road signs; is the predicted position of the second sample image output by the student model, is the true label of the location information of the manually labeled sample road signs, L cls is the FocalLoss loss function used to constrain the prediction type, L reg is the mean square error loss function used to constrain the predicted location and the cross entropy loss function used to predict the existence of the location.
[0189] In some embodiments, determining the loss value based on the first loss value and the second loss value includes:
[0190] The first loss value and the second loss value are weighted to obtain a loss value.
[0191] For example, the total loss function can be determined based on the following formula:
[0192] L=L s +λL u
[0193] Among them, L s is the second loss value, Lu is the first loss value, and λ is the weight for balancing the two, which can be determined based on experiments or experience. The loss value of the student model can be obtained based on the constructed loss function.
[0194] In some embodiments of the present specification, the combination of labeled data and unlabeled data provides a richer data distribution for the learning model, which helps the target model learn a wider range of data features, thereby improving its generalization ability in different scenarios; the introduction of a large amount of unlabeled data can reduce the target model's excessive dependence on labeled data, avoid overfitting, and make the target model more stable when facing unseen data; the cost of obtaining labeled data is high, while unlabeled data is relatively easy to obtain. By rationally utilizing unlabeled data, the performance of the model can be significantly improved without increasing too much labeling cost, so as to maximize the model performance under limited resources, which is particularly suitable for resource-constrained scenarios.
[0195] In some embodiments, the student model can be trained based on a training data set through various feasible methods. For example, parameter updates can be performed based on the gradient descent method. An exemplary training process includes: inputting a plurality of first sample images without labeled data and a second sample image with labeled data into the initial model, constructing a loss function through pseudo labels and the student model's prediction results for the first sample image, the student model's prediction results for the second sample image and the labeled data, and iteratively updating the parameters of the initial model based on the loss function through gradient descent or other methods. When the preset conditions are met, the model training is completed, and a trained student model is obtained. The preset conditions may be that the loss function converges, the number of iterations reaches a threshold, etc.
[0196] In some embodiments, the method further comprises:
[0197] The parameters of the teacher model are trained based on the loss value to obtain the trained teacher model.
[0198] In some embodiments, multiple teacher models and student models can be obtained through training. An exemplary joint training process is as follows: multiple first sample images without labeled data in a training data set are input into multiple teacher models to obtain prediction results output by multiple teacher models; multiple first sample images without labeled data and second sample images with labeled data are input into a student model to obtain prediction results of the first sample images and prediction results of the second sample images output by the student model; a loss function is constructed based on the prediction results and pseudo labels of the first sample images and the prediction results and labeled data of the second sample images output by the student model, and the parameters of the student model and multiple teacher models are updated simultaneously until a preset condition is met and the training is completed. The preset condition may be that the loss function is less than a threshold, converges, or the training cycle reaches a threshold.
[0199] The joint training of multiple teacher models and student models helps solve the problem of difficulty in obtaining labels when training the student model alone, improves the efficiency of adjusting model training, and reduces the difficulty of training.
[0200] In some embodiments, training the teacher model based on the loss value to obtain the trained teacher model includes:
[0201] Update the parameters of the student model based on the loss value to obtain the updated parameters of the student model;
[0202] Based on the updated parameters of the student model, the parameters of each teacher model are trained to obtain a trained teacher model.
[0203] In some embodiments, the prediction results of the student model can be used as soft labels to train the teacher model; the difference between the prediction results of the teacher model and the soft labels is calculated to obtain the loss value of the teacher model, and the parameters of the teacher model are trained.
[0204] In some embodiments, training parameters of each teacher model based on the updated parameters of the student model to obtain a trained teacher model includes:
[0205] The updated parameters of the student model and the parameters of the teacher model are weighted to obtain the updated parameters of the teacher model.
[0206] In some embodiments, the network parameters of the student model are updated by gradient descent backpropagation, while the network parameters of the teacher model are updated by an EMA exponential moving average strategy, as shown in the following formula:
[0207]
[0208] in, is the network parameter of the i-th teacher model at the t-th iteration, is the network parameter of the student model at the tth iteration, β is the weight to measure the importance of the two models, β∈[0,1].
[0209] In some embodiments of this specification, the student model is typically more lightweight than the teacher model. By performing "reverse" training on the teacher model through the student model, the effective knowledge learned in the student model (such as more concise feature expressions, more efficient decision paths, etc.) can be fed back to the teacher model. This helps the teacher model learn a wider range of data distributions while maintaining its own expressive power, enhances its robustness to data with different variants, and achieves better generalization performance on certain tasks.
[0210] In some embodiments, the method further comprises:
[0211] A first enhancement process is performed on the sample image to obtain a first enhanced image. The first enhanced image is used to be input into at least two teacher models respectively to obtain a prediction result output by each teacher model to train the student model.
[0212] In some embodiments, the parameters of the dual-teacher model and the student model can be randomly initialized at the same time. Different types of first enhancement processing A (such as horizontal flipping, random resizing, adding noise, etc.) are applied to the same sample image x without labeled data to obtain different first enhanced images. These images are input into the two teacher models to obtain corresponding prediction results as preliminary pseudo labels, as shown in the following formula:
[0213]
[0214] in, is the prediction result output by the first teacher model, f teacher-1 is the first teacher model, A(x)1 is the first enhanced image after a first enhancement process, is the prediction result output by the second teacher, f teacher-2 represents the second teacher model, A(x)2 is the first enhanced image based on a different enhancement process from the first one,
[0215] In some embodiments, the method further comprises:
[0216] performing a second enhancement process on the sample image to obtain a second enhanced image;
[0217] Based on the prediction results output by each teacher model and the prediction results of the student model for the second enhanced image, the student model is trained, and the first enhancement process is different from the second enhancement process.
[0218] In some embodiments, a second enhancement process A' (such as shearing, rotation, and brightness jitter) is applied to the same sample image x with labeled data, and the corresponding prediction result is obtained by inputting the student model, as shown in the following formula:
[0219] {y reg ,y cls}=f student (A'(x));
[0220] Among them, {y reg ,y cls} is the prediction result output by the student model, f student is the student model, and A'(x) is the second enhanced image after the second enhancement process.
[0221] In some embodiments, the first enhancement process has a smaller degree of transformation than the second enhancement process.
[0222] In some embodiments, the first enhancement process is a data enhancement method with a relatively small degree of transformation, and the first enhancement process will not significantly change basic features of the image.
[0223] The first enhancement processing may include, but is not limited to, random horizontal flipping, random translation, random image resizing, adding noise, etc.
[0224] The second enhancement process is a data enhancement method with a greater degree of transformation, and the second enhancement process will significantly change the basic features of the image.
[0225] In some embodiments, the second enhancement processing may include but is not limited to random cropping (e.g., cropping a portion of the image, or cropping it to a different aspect ratio, etc.), color jittering (e.g., significantly changing the brightness, contrast, saturation and hue of the image, etc.), random rotation, etc.
[0226] In some embodiments, based on a first sample image without labeled data in a sample image, multiple first enhanced images without labeled data can be obtained through different first enhancement processes, and respectively input into different teacher models to obtain prediction results output by multiple teacher models.
[0227] In some embodiments, based on the sample image (which includes a first sample image without labeled data and a second sample image with labeled data), a second enhanced image (which includes a second enhanced image without labeled data and a second enhanced image with labeled data) can be obtained through a second enhancement process and input into the corresponding student model to obtain the prediction results of the first sample image and the prediction results of the second sample image output by the student model.
[0228] In some embodiments of this specification, by performing different degrees of data enhancement processing (weak data enhancement and strong data enhancement) on sample images, multiple sets of enhanced sample images can be generated, which can be used to train different models to improve the generalization ability and robustness of the models. By reasonably selecting the type and degree of enhancement processing, the performance of the model can be effectively improved.
[0229] In some embodiments, at least two teacher models and the student model are models of different architectures, or models of the same architecture but with different initialization parameters.
[0230] In some embodiments, the model structure of the same architecture includes a backbone module for feature extraction, a neck module for feature fusion, a regression reg module, and a classification cls module. The backbone module uses the general image feature extraction model ResNet-101 network and combines it with the channel attention mechanism to improve the representation of useful features. The neck module uses the FPN feature pyramid structure to fuse features at different levels. The regression reg module uses a convolutional network to predict and regress the coordinate position of each lane line. The classification cls module predicts the category probability information of each lane line.
[0231] In some embodiments, at least two teacher models and student models are constructed based on the model structure of the same architecture, and the three models share the same structure, such as Figure 1 As shown. Where x represents the model input, θ represents the model parameters, and the definition is: Teacher model 1: f teacher-1 (x;θ teacher-1 ); Teacher Model 2: f teacher-2 (x;θ teacher-2 ); Student model: f student (x;θ student ).
[0232] It should be noted that the above description of the relevant processes is for illustration and purpose only and does not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to the processes under the guidance of this specification. However, such modifications and changes are still within the scope of this specification.
[0233] Figure 3 is an exemplary schematic diagram of a dual-teacher model-student model according to some embodiments of this specification.
[0234] It is understandable that the training process of semi-supervised learning will provide dynamic pseudo labels for unlabeled data, and the instability of pseudo labels will affect the convergence of the training model. In order to improve the quality of pseudo labels, a semi-supervised learning model structure of a dual teacher model-student model is proposed. Figure 3As shown, compared with the traditional single teacher model-student model structure, there may be a problem that due to the coupling relationship between the teacher model and the student model, the two become more and more similar as the number of iterations increases during the training process and cannot reach the expected convergence level. By using the dual teacher model to filter out more reliable prediction results for unlabeled data as pseudo labels, the student model is provided with more robust training data and the model accuracy is improved. Specifically, the first sample image without labeled data is inconsistently weakly enhanced to obtain a first enhanced image, which is input into the two teacher models respectively to obtain the prediction results output by multiple teacher models, and the hard voting strategy and the soft voting strategy are used to filter out more reliable classification pseudo labels (i.e., the first prediction type of the pseudo label) and regression pseudo labels (i.e., the first prediction position of the pseudo label), and the second sample image with labeled data and the first sample image without labeled data are strongly enhanced to obtain a second enhanced image, which is input into the student model to obtain the prediction result output by the student model.
[0235] Figure 4 This is an exemplary schematic diagram of another target model training method shown in some embodiments of this specification.
[0236] In some embodiments, as Figure 4 As shown, another target model training method includes:
[0237] The camera is used to obtain the image to be tested in front of the vehicle, and part of the data is divided for manual labeling of the coordinate points and types of road signs to form a labeled dataset, and the remaining data is used as an unlabeled dataset.
[0238] The labeled dataset is strongly augmented and input into the student model, forming a training example together with the manually annotated labels mentioned above.
[0239] The unlabeled dataset is strongly augmented and input into the student model. At the same time, the unlabeled dataset is weakly augmented and input into two teacher models respectively. The voting strategy is used to filter and generate the final pseudo labels to constitute the training examples.
[0240] The loss function is calculated using training examples, the parameters of the student model are updated by backpropagation, and the parameters of the teacher model are smoothly updated based on the parameters of the latest student model.
[0241] The trained student model is used as the final target model to process the image to be tested and obtain the detection results.
[0242] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0243] In another exemplary embodiment, a road sign detection method is also provided. Figure 6As shown, the method includes:
[0244] Step 510 , processing the image to be tested containing the target road sign based on the target model to obtain a detection result of the target road sign, wherein the target model is trained according to any target model training method provided in the embodiments of the present application.
[0245] For example, in the application scenario of vehicle driving, the trained student model is saved in the vehicle terminal. As the final target model, after the image to be tested x' is input into the model, the detection result of the lane line (or lane center line, etc.) is obtained, which includes the predicted position of the lane line and its lane line prediction type, as shown in the following formula:
[0246]
[0247] Among them, {y' reg ,y' cls} is the detection result output by the target model, f student is the trained student model (also known as the target model).
[0248] Figure 6 This is a schematic diagram of the structure of an electronic device according to some embodiments of this specification. Figure 6 As shown, the electronic device 600 may include: a processor 601, a memory 602. The electronic device 600 may also include one or more of a multimedia component 603, an input / output (I / O) component 604, and a communication component 605. In this embodiment, the electronic device 600 may be a device that implements the target model training method and the road sign detection method provided in this embodiment.
[0249] The processor 601 is used to control the overall operation of the electronic device 600 to complete all or part of the steps in the target model training method and road sign detection method described above. The memory 602 is used to store various types of data to support the operation of the electronic device 600. This data may include, for example, instructions for any application or method operating on the electronic device 600, as well as application-related data such as contact information, sent and received messages, images, audio, video, etc. The memory 602 may be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 603 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 602 or transmitted via the communication component 605. The audio component also includes at least one speaker for outputting audio signals. The I / O component 604 provides an interface between the processor 601 and other interface modules, which may include a keyboard, a mouse, buttons, etc. These buttons may be virtual or physical buttons. The communication component 605 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, Narrow Band Internet of Things (NB-IOT), Enhanced Machine Type Communication (eMTC), or other 5G technologies, or a combination thereof, is not limited here. Therefore, the corresponding communication component 605 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0250] In an exemplary embodiment, the electronic device 600 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-mentioned target model training method and road sign detection method.
[0251] In another exemplary embodiment, a computer-readable storage medium is provided, which stores a computer program. When the program instructions are executed by a processor, the program instructions implement the steps of the target model training method and the road sign detection method described above. For example, the computer-readable storage medium may be the memory 602 containing the program instructions. The program instructions may be executed by the processor 601 of the electronic device 600 to implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0252] Alternatively, when the instructions are executed by a computer, they implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of the present application.
[0253] In another exemplary embodiment, a computer program product is also provided, including a computer program or instructions, which, when executed by a processor, implement the steps of the target model training method and the road sign detection method described above. For example, the computer program product may be the aforementioned memory 602 including the computer program, which may be executed by the processor 601 of the electronic device 600 to implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0254] Alternatively, when the instructions are executed by a computer, they implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of the present application.
[0255] Figure 7 is an exemplary schematic diagram of a vehicle according to some embodiments of the present specification.
[0256] like Figure 7As shown, the present application also provides a vehicle equipped with the electronic device provided in any of the above embodiments, and configured to execute the target model training method and road sign detection method provided in any of the above embodiments. The vehicle may be a fuel-powered vehicle, a plug-in hybrid vehicle, or a new energy vehicle, and this specification does not specifically limit this.
[0257] In one embodiment, a vehicle can be configured for a fully or partially autonomous driving mode. For example, while in autonomous driving mode, the vehicle can control itself and, through human interaction, determine the current state of the vehicle and its surroundings, determine the possible behavior of at least one other vehicle in the surroundings, and determine a confidence level corresponding to the likelihood that the other vehicle will perform the possible behavior, and control the vehicle based on this information. While in autonomous driving mode, the vehicle can be configured to operate without human interaction.
[0258] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "plurality" means two or more, unless otherwise specifically defined.
[0259] The embodiments, implementation methods and related technical features of the present application can be combined and replaced with each other unless there is any conflict.
[0260] The above are only preferred embodiments of the present application and do not constitute any form of limitation to the present application. Although the descriptions of each embodiment in the embodiments of the present application have different focuses, for parts that are not described in detail in a certain embodiment, please refer to the relevant embodiments of other embodiments. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A target model training method, characterized in that: The method comprises: Based on the prediction results of at least two teacher models on sample images containing sample road signs, the student model is trained to obtain a target model.
2. The method according to claim 1, characterized in that The prediction result of the sample road sign includes the position and / or type of the sample road sign.
3. The method according to claim 1, characterized in that The road marking includes at least one of a lane line, a lane center line, and a roadside line.
4. The method according to claim 1, wherein The method of training a student model based on prediction results of at least two teacher models on sample images containing sample road signs to obtain a target model includes: Based on the prediction results output by the at least two teacher models, a pseudo label of the sample image is obtained by screening; Based on the pseudo labels, the student model is trained to obtain the target model.
5. The method according to claim 4, characterized in that The pseudo label includes a first predicted position and / or a first predicted type of the sample road sign in the sample image.
6. The method according to claim 4, characterized in that The step of screening and obtaining a pseudo label for the sample image based on the prediction results output by the at least two teacher models includes: Obtaining at least two second prediction types based on the prediction results output by the at least two teacher models; Based on the at least two second prediction types, a first prediction type of the pseudo label is obtained by screening.
7. The method according to claim 6, characterized in that The step of screening and obtaining the first prediction type of the pseudo label based on the at least two second prediction types includes: The second prediction type with the highest confidence among the at least two second prediction types is used as the first prediction type of the pseudo label.
8. The method according to claim 4, characterized in that The step of screening and obtaining a pseudo label for the sample image based on the prediction results output by the at least two teacher models includes: Obtaining at least two second predicted positions based on the prediction results output by the at least two teacher models; Based on the at least two second predicted positions, a first predicted position of the pseudo label is obtained.
9. The method according to claim 8, characterized in that The obtaining of the first predicted position of the pseudo label based on the at least two second predicted positions includes: A weighted process is performed on the at least two second predicted positions to obtain a first predicted position of the pseudo label.
10. The method according to claim 9, characterized in that The weighted processing of the at least two second predicted positions to obtain the first predicted position of the pseudo label includes: The second predicted positions whose confidences are greater than or equal to a preset confidence threshold are weighted to obtain the first predicted positions of the pseudo labels.
11. The method according to claim 9, characterized in that The weighted processing of the at least two second predicted positions to obtain the first predicted position of the pseudo label includes: When the deviation of the at least two second predicted positions is less than or equal to a preset deviation threshold, weighted processing is performed on the at least two second predicted positions to obtain the first predicted position of the pseudo label.
12. The method according to claim 1, characterized in that The sample image includes a first sample image without labeled data, and the method further includes: The student model is trained based on the prediction results of the at least two teacher models on the first sample image and the prediction result of the student model on the first sample image to obtain the target model.
13. The method according to claim 12, characterized in that The step of training a student model based on the prediction results of the at least two teacher models on the first sample image and the prediction result of the student model on the first sample image to obtain the target model includes: Determining a loss value based on prediction results of the at least two teacher models on the first sample image and a prediction result of the student model on the first sample image; The parameters of the student model are trained based on the loss value to obtain the target model.
14. The method according to claim 13, characterized in that The sample image further includes a second sample image with labeled data, and determining the loss value based on the prediction results of the at least two teacher models on the first sample image and the prediction result of the student model on the first sample image includes: Determining a first loss value based on prediction results of the at least two teacher models on the first sample image and a prediction result of the student model on the first sample image; Determining a second loss value based on a prediction result of the student model for the second sample image and the labeled data; The loss value is determined based on the first loss value and the second loss value.
15. The method according to claim 14, characterized in that The determining the loss value based on the first loss value and the second loss value includes: The first loss value and the second loss value are weighted to obtain the loss value.
16. The method according to claim 13, characterized in that The method further comprises: The parameters of the teacher model are trained based on the loss value to obtain a trained teacher model.
17. The method according to claim 16, characterized in that The step of training the teacher model based on the loss value to obtain a trained teacher model includes: Updating parameters of the student model based on the loss value to obtain updated parameters of the student model; Based on the updated parameters of the student model, the parameters of each teacher model are trained to obtain the trained teacher model.
18. The method according to claim 17, characterized in that The step of training the parameters of each teacher model based on the updated parameters of the student model to obtain the trained teacher model comprises: The updated parameters of the student model and the parameters of the teacher model are weighted to obtain the updated parameters of the teacher model.
19. The method according to claim 1, wherein The method further comprises: Performing a first enhancement process on the sample image to obtain a first enhanced image, wherein the first enhanced image is used to be input into the at least two teacher models respectively to obtain a prediction result output by each of the teacher models to train the student model.
20. The method according to claim 19, characterized in that The method further comprises: performing a second enhancement process on the sample image to obtain a second enhanced image; The student model is trained based on the prediction results output by each of the teacher models and the prediction results of the student model for the second enhanced image, and the first enhancement process is different from the second enhancement process.
21. The method according to claim 20, characterized in that The degree of transformation of the first enhancement process is smaller than that of the second enhancement process.
22. The method according to any one of claims 1 to 21, characterized in that The at least two teacher models and the student model are models of different architectures, or are models of the same architecture but with different initialization parameters.
23. A road sign detection method, characterized in that: The method comprises: An image to be tested containing a target road sign is processed based on a target model to obtain a detection result of the target road sign, wherein the target model is trained according to the target model training method according to any one of claims 1 to 22.
24. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 23.
25. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 23 are implemented.
26. A computer program product, characterized in that The method comprises a computer program or instructions, which implement the steps of the method according to any one of claims 1 to 23 when executed by a processor.
27. A vehicle, characterized in that: comprising the electronic device as claimed in claim 24, or performing the steps of the method as claimed in any one of claims 1 to 23.