Model generation method and apparatus, vehicle, and storage medium
Patent Information
- Application Number
- CN202410344091.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2044-03-25
AI Technical Summary
而当面临较为复杂的泊车场景时,基于规则的自动泊车功能中用于生成可泊车路径的路径生成模型往往缺乏可扩展性和适应性
[0008] This application provides a model generation method, apparatus, vehicle, and storage medium. A training scene dataset is obtained, which is determined based on a base scene dataset and an unlabeled scene dataset. The training scene dataset is processed using a path planning algorithm to obtain multiple path clusters corresponding to the training scene dataset. The training scene dataset and the multiple path clusters are input into a model to be trained, and the model is iteratively trained until the training termination condition is met, resulting in a path generation model. The training scene dataset is obtained by expanding the base scene database using the unlabeled scene dataset, allowing it to include more complex parking scenarios. Training the path generation model with this more data-rich training scene dataset improves the generalization ability of the path generation model.
Smart Images

Figure CN118468018B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the automotive field, specifically relating to a model generation method, apparatus, vehicle, and readable storage medium. Background Technology
[0002] Currently, mainstream automatic parking functions are based on rules that dynamically respond to real-time parking scenario environment information to generate and execute planned paths. However, when faced with more complex parking scenarios, the path generation models used in rule-based automatic parking functions to generate feasible parking paths often lack scalability and adaptability. Summary of the Invention
[0003] In view of the above problems, this application proposes a model generation method, apparatus, vehicle and storage medium to improve the above problems.
[0004] In a first aspect, embodiments of this application provide a model generation method, the method comprising: acquiring a training scenario dataset, the training scenario dataset including multiple scene data corresponding to multiple driving scenarios, the training scenario dataset being determined based on a basic scenario dataset and an unlabeled scenario dataset, the basic scenario dataset including scene data corresponding to multiple driving scenarios and scene labels corresponding to each scene data, the unlabeled scenario dataset including multiple unlabeled scene data; processing the training scenario dataset using a path planning algorithm to obtain multiple path clusters corresponding to the training scenario dataset, wherein one driving scenario corresponds to one path cluster, and each path cluster includes multiple paths; inputting the training scenario dataset and the multiple path clusters into a model to be trained, iteratively training the model to be trained until the training termination condition is met, thereby obtaining a path generation model.
[0005] Secondly, embodiments of this application provide a model generation apparatus, the apparatus comprising: a dataset acquisition unit, configured to acquire a training scenario dataset, the training scenario dataset including multiple scene data corresponding to multiple driving scenarios, wherein the training scenario dataset is obtained by expanding a scene dataset to be expanded based on a data expander, the scene dataset to be expanded being determined based on a basic scene dataset and an unlabeled scene dataset, the basic scene dataset including scene data corresponding to multiple driving scenarios and scene labels corresponding to each scene data, the unlabeled scene dataset including multiple unlabeled scene data; a path cluster acquisition unit, configured to process the training scenario dataset using a path planning algorithm to obtain multiple path clusters corresponding to the training scenario dataset, wherein one driving scenario corresponds to one path cluster, and each path cluster includes multiple paths; and a model training unit, configured to input the training scenario dataset and the multiple path clusters into a model to be trained, and iteratively train the model to be trained until the training termination condition is met, thereby obtaining a path generation model.
[0006] Thirdly, embodiments of this application provide a vehicle including one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the methods described above.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run.
[0008] This application provides a model generation method, apparatus, vehicle, and storage medium. A training scene dataset is obtained, which is determined based on a base scene dataset and an unlabeled scene dataset. The training scene dataset is processed using a path planning algorithm to obtain multiple path clusters corresponding to the training scene dataset. The training scene dataset and the multiple path clusters are input into a model to be trained, and the model is iteratively trained until the training termination condition is met, resulting in a path generation model. The training scene dataset is obtained by expanding the base scene database using the unlabeled scene dataset, allowing it to include more complex parking scenarios. Training the path generation model with this more data-rich training scene dataset improves the generalization ability of the path generation model. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A flowchart of a model generation method according to an embodiment of this application is shown;
[0011] Figure 2 A flowchart of a model generation method according to another embodiment of this application is shown;
[0012] Figure 3 A flowchart of a model generation method according to another embodiment of this application is shown;
[0013] Figure 4 A flowchart of a model generation method according to another embodiment of this application is shown;
[0014] Figure 5 A flowchart of a model generation method according to another embodiment of this application is shown;
[0015] Figure 6 This paper shows a structural block diagram of a model generation method according to another embodiment of the present application;
[0016] Figure 7 This diagram illustrates a structural block diagram of a vehicle used to execute the model generation method of the embodiments of this application in real time.
[0017] Figure 8 The present application shows a storage unit for storing or carrying program code that implements the model generation method according to the embodiments of the present application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server comprising a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0020] In this application embodiment, the inventors propose a model generation method, apparatus, vehicle, and storage medium. The model generation method includes: This application embodiment provides a model generation method, apparatus, vehicle, and storage medium. The method includes: acquiring a training scene dataset, wherein the training scene dataset is determined based on a basic scene dataset and an unlabeled scene dataset; processing the training scene dataset using a path planning algorithm to obtain multiple path clusters corresponding to the training scene dataset; inputting the training scene dataset and the multiple path clusters into a model to be trained, iteratively training the model until the training termination condition is met, thereby obtaining a path generation model. The training scene dataset is obtained by expanding the basic scene database using the unlabeled scene dataset, allowing the training scene dataset to include more complex parking scenarios. Training the path generation model using this training scene dataset, which includes more data, can improve the generalization ability of the path generation model.
[0021] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0022] Please see Figure 1 This application provides a model generation method, the method comprising:
[0023] Step S110: Obtain the training scenario dataset, which includes multiple scene data corresponding to multiple driving scenarios. The training scenario dataset is determined based on the basic scenario dataset and the unlabeled scenario dataset. The basic scenario dataset includes scene data corresponding to multiple driving scenarios and scene labels corresponding to each scene data. The unlabeled scenario dataset includes multiple unlabeled scene data.
[0024] In this embodiment, scene labels are used to determine the driving scenario to which the scene data belongs. Driving scenarios can include different parking scenarios such as parking spaces with no cars on both sides, parking spaces with cars on both sides, parking spaces with blurred backgrounds, and parking lots on asphalt roads in rainy weather, etc., without specific limitations. Each scene data included in a driving scenario can include grid maps collected by the target vehicle's own equipment, BEV (Bird's eye view) image sequences, ultrasonic data, millimeter-wave data, drivable areas, and feature data describing the relative positional relationship between the target vehicle and vehicles in surrounding parking spaces, etc., without specific limitations. In this solution, the acquired training scene dataset, if the number of scene data included in the basic scene dataset and the unlabeled scene dataset is sufficient, consists of the basic scene dataset and the unlabeled scene dataset; if the number of scene data included in the basic scene dataset and the unlabeled scene dataset is insufficient, the training scene dataset includes the basic scene dataset and the unlabeled scene dataset, and also includes scene data generated by a data expander, wherein the data expander is used to expand the scene data in each driving scenario.
[0025] Step S120: Process the training scenario dataset using a path planning algorithm to obtain multiple path clusters corresponding to the training scenario dataset, wherein one driving scenario corresponds to one path cluster, and each path cluster includes multiple paths.
[0026] In this embodiment of the application, a path planning algorithm is used to process each scene data in each driving scene included in the training scene dataset to determine multiple paths corresponding to each scene data. Thus, multiple paths corresponding to each driving scene can be determined, and the multiple paths corresponding to each driving scene are taken as the path cluster corresponding to that driving scene. In this way, multiple path clusters corresponding to multiple driving scenes included in the training scene dataset can be obtained.
[0027] Step S130: Input the training scene dataset and the multiple path clusters into the model to be trained, and iteratively train the model to be trained until the training termination condition is met to obtain the path generation model.
[0028] In this embodiment, a training scenario dataset and multiple path clusters are input into the model to be trained. The model to be trained is iteratively trained using each scenario data in each driving scenario included in the training scenario dataset and the multiple paths corresponding to each scenario data, until the training of the model to be trained is completed using the last scenario data in the last driving scenario included in the training scenario dataset and the multiple paths corresponding to the last scenario data. The training termination condition is then met, and a path generation model is obtained.
[0029] The model generation method provided in this application expands the basic scene database with an unlabeled scene dataset to obtain a training scene dataset, so that the training scene dataset can include more complex parking scenarios. By training the path generation model with this training scene dataset containing more data, the generalization ability of the path generation model can be improved.
[0030] Please see Figure 2 This application provides a model generation method, the method comprising:
[0031] Step S201: Obtain the basic scene dataset and the unlabeled scene dataset.
[0032] In this embodiment, the basic scenario dataset includes multiple driving scenarios, and each driving scenario includes multiple scenario data. Each scenario data carries a scenario label, and the driving scenario to which the scenario data belongs can be determined by viewing the corresponding scenario label. The unlabeled scenario data includes multiple unlabeled scenario data, which do not carry scenario labels, so it is impossible to query which driving scenario the unlabeled scenario data belongs to. Engineers prepare a basic scenario dataset with pre-labeled scenario data and send it to the electronic device. At the same time, multiple test vehicles are prepared for multiple users to drive, thereby collecting the unlabeled scenario dataset generated by the multiple test vehicles during driving, and sending the unlabeled scenario dataset to the electronic device.
[0033] Step S202: Input the basic scene dataset and the unlabeled scene dataset into the scene recognition model to be trained, and iteratively train the scene recognition model to be trained until the training termination condition is met, thereby obtaining the scene recognition model and the training scene dataset. The training scene dataset is obtained based on the basic scene dataset and the target scene data of each training round. The target scene data of each training round is the unlabeled scene data of the multiple unlabeled scene data corresponding to each training round whose membership degree with the driving scene is greater than a preset membership degree threshold.
[0034] In this embodiment, a basic scene dataset and an unlabeled scene dataset are input into the scene recognition model to be trained. The model is then iteratively trained using these datasets. During each training iteration, the model calculates the membership degree of each unlabeled scene data point in the unlabeled scene dataset for each driving scenario, selecting the driving scenario with the highest membership degree as the target driving scenario. Simultaneously, engineers pre-set a preset membership degree threshold and determine the relationship between the highest membership degree of each unlabeled scene data point and the preset threshold. If the highest membership degree is greater than the preset threshold, the unlabeled scene data is identified as the target scenario data; otherwise, it is determined that the highest membership degree is less than or equal to the preset threshold. Repeating this process yields the target scenario data for each training round. In this scheme, the basic scene dataset and the unlabeled scene dataset are input into the scene recognition model to be trained, and the model is iteratively trained. In each training epoch, target scene data is identified from the unlabeled scene dataset and transferred to the base scene dataset. This transferred base scene dataset is then input into the scene recognition model to be trained. Training continues until a training termination condition is met, completing the training of the scene recognition model and yielding the training scene dataset. The training termination condition can be that all unlabeled scene data from the unlabeled scene dataset has been transferred to the base scene dataset. The training scene dataset is the dataset after the base scene dataset has received all the transferred unlabeled scene data.
[0035] Step S203: Obtain the training scenario dataset, which includes multiple scenario data corresponding to multiple driving scenarios. The training scenario dataset is determined based on the basic scenario dataset and the unlabeled scenario dataset.
[0036] Step S203 can be found in the detailed explanation in the above embodiments, and therefore will not be repeated in this embodiment.
[0037] Step S204: Based on the heuristic cost functions corresponding to each of the multiple driving scenarios, the path planning algorithm is processed to obtain multiple processed path planning algorithms.
[0038] In this embodiment, different heuristic cost functions are set for different driving scenarios, and the path planning algorithm is processed by these different heuristic cost functions to obtain multiple processed path planning algorithms. Different heuristic cost functions will lead to differences in the parking paths calculated by the path planning algorithms. These different heuristic cost functions can be understood as reflecting the priorities considered during the parking process: for example, when the weights of factors such as comfort, safety, and efficiency are different, there will be different feasible paths from the starting point to the destination. Of course, a single heuristic cost function can also be set for multiple driving scenarios.
[0039] Step S205: Based on the multiple processed path planning algorithms, process the multiple scene data corresponding to each of the multiple driving scenarios in the training scene dataset to obtain multiple path clusters corresponding to the multiple driving scenarios included in the training scene dataset.
[0040] In this embodiment, after determining multiple processed path planning algorithms, since different processed path planning algorithms are determined based on heuristic cost functions corresponding to different driving scenarios, different processed path planning algorithms correspond to different driving scenarios. For each processed path planning algorithm, the driving scenarios in the training scenario dataset corresponding to the processed path planning algorithm are determined, and multiple scenario data in the driving scenario are processed according to the processed path planning algorithm to obtain the path cluster corresponding to the driving scenario. Repeating the above process, multiple path clusters corresponding to multiple driving scenarios can be obtained. Among them, after a processed path planning algorithm processes a scenario data, it can obtain multiple paths corresponding to the scenario data. It is pre-set that the number of paths generated for each driving scenario is the same, that is, the multiple paths corresponding to the multiple scenario data included in a driving scenario are used as the path clusters corresponding to the driving scenario, thereby obtaining multiple path clusters corresponding to multiple driving scenarios.
[0041] In one approach, when a path planning algorithm is processed using only one heuristic cost function, there is only one processed path planning algorithm. This processed path planning algorithm will then process the multiple scene data included in each of the multiple driving scenarios in the training scenario dataset, thereby obtaining multiple path clusters corresponding to the multiple driving scenarios.
[0042] Step S206: Input the training scene dataset and the multiple path clusters into the model to be trained, and iteratively train the model to be trained until the training termination condition is met to obtain the path generation model.
[0043] In this embodiment, for each training round, each scene data and the corresponding path of each driving scenario included in the training scenario dataset are input into the model to be trained to train the model. The above process is repeated to achieve iterative training of the model to be trained until the last scene data and the corresponding path of the last scene data in the training scenario dataset are input into the model to be trained to train the model, and the training termination condition is met, thus obtaining the path generation model.
[0044] The specific process of step S206 can be described as described in steps S2061-S20612.
[0045] Step S2061: In each training round, input each scene data in each driving scene included in the training scene dataset into the first encoder to obtain the first encoded feature output by the first encoder.
[0046] Step S2062: Divide the path corresponding to the scene data into path segments near the endpoint, path segments far from the endpoint, and the endpoint location.
[0047] In this embodiment of the application, the path corresponding to the scene data is divided into path segments closer to the endpoint, path segments farther from the endpoint, and the endpoint location based on a distance percentage method. For example, if the length of the path is determined, the range of 20% from the endpoint is defined as the path segment closer to the endpoint, and the remaining range of 80% from the starting point is the path segment farther from the endpoint.
[0048] Step S2063: Input the path segment near the endpoint into the second encoder to obtain the second encoded feature output by the second encoder.
[0049] Step S2064: Input the path segment far from the destination into the third encoder to obtain the third encoding feature output by the third encoder.
[0050] Step S2065: Input the endpoint position into the fourth encoder to obtain the fourth encoded feature output by the fourth encoder.
[0051] Step S2066: Input the first coding feature, the second coding feature, the third coding feature and the fourth coding feature into the probability space encoder to obtain the probability space coding features and multivariate normal distribution output by the probability space encoder.
[0052] Step S2067: Input the probability space encoded features into the probability space decoder to obtain the first decoded features and the second decoded features output by the probability space decoder.
[0053] Step S2068: Input the first decoding feature into the fifth encoder to obtain the fifth encoding feature output by the fifth encoder.
[0054] Step S2069: Input the second decoding feature into the sixth encoder to obtain the sixth encoding feature output by the sixth encoder.
[0055] Step S20610: Input the first encoding feature, the third encoding feature, the fifth encoding feature and the sixth encoding feature into the decoder to obtain the decoding path output by the decoder.
[0056] Step S20611: Based on the path, the decoding path, and the multivariate normal distribution, update the first encoder, the second encoder, the third encoder, the fourth encoder, the probability space decoder, and the decoder to obtain the updated first encoder, the updated second encoder, the updated third encoder, the updated fourth encoder, the updated probability space decoder, and the updated decoder.
[0057] In this embodiment, after obtaining the decoding path, the differences between the path and the decoding path, as well as the differences between the multivariate normal distribution X~N(μ,∑) and white noise Z~N(0,I), are calculated based on the chain rule. The gradients of these two differences with respect to the model parameters of the first encoder, second encoder, third encoder, fourth encoder, probability space decoder, and decoder are determined. The gradient descent method is then used to update the model parameters of the first encoder, second encoder, third encoder, fourth encoder, probability space decoder, and decoder, thereby completing the update of the first encoder, second encoder, third encoder, fourth encoder, probability space decoder, and decoder. Here, white noise Z~N(0,I) represents a standard N-variate normal distribution. The difference between the multivariate normal distribution X~N(μ,∑) and white noise Z~N(0,I) is the KL (kullback-Leibler) divergence.
[0058] Step S20612: Based on the updated first encoder, the updated second encoder, the updated third encoder, the updated fourth encoder, the updated probability space decoder, and the updated decoder, execute the next training round until every scene data in every driving scenario included in the training scene dataset is traversed, and the training termination condition is determined to be met. Then, the first encoder, the second encoder, the third encoder, the fourth encoder, the probability space decoder, and the decoder are updated to obtain the path generation model.
[0059] In this embodiment of the application, after updating the first encoder, second encoder, third encoder, fourth encoder, probability space decoder and decoder, the next training round is continued based on the updated first encoder, updated second encoder, updated third encoder, updated fourth encoder, updated probability space decoder and updated decoder, until every scene data in every driving scene included in the training scene dataset is traversed, and the training termination condition is determined to be met, thus obtaining the path generation model.
[0060] Step S207: After the parking function is enabled, acquire the scene data to be processed.
[0061] In this embodiment, when the parking function is activated, the equipment equipped on the target vehicle is turned on. This equipment includes cameras, ultrasonic radar, and lidar, which are not specifically limited here. When it is determined that the target vehicle is in the parking space search phase, the scene data corresponding to the parking space search phase is acquired in real time through the target vehicle's own equipment, and this scene data is used as the scene data to be processed. Specifically, when the target vehicle determines that the user is looking for a parking space in the parking lot, it is determined that the target vehicle is in the parking space search phase. In order to determine a good parking space, the parking space search phase will last for a certain period of time.
[0062] Step S208: Input the scene data to be processed into a pre-trained scene recognition model to obtain the driving scene corresponding to the scene data to be processed output by the scene recognition model.
[0063] In this embodiment of the application, after the database search stage is completed, the scene data to be processed corresponding to the database search stage is input into the scene recognition model. The scene recognition model calculates the membership degree of the scene data to be processed for each driving scene, and selects the driving scene with the highest membership degree as the driving scene corresponding to the number of scenes to be processed.
[0064] Step S209: Input the scene data to be processed and the driving scene corresponding to the scene data to be processed into the path generation model, and obtain the parking path output by the path generation model.
[0065] In this embodiment, the scene data to be processed and the driving scenario corresponding to the scene data to be processed are input into the path generation model. The path generation model calculates the scene data to be processed and the driving scenario corresponding to the scene data to be processed, and then outputs the parking path.
[0066] Step S210: Based on the parking path, control the target vehicle to park in the available parking space.
[0067] In this embodiment of the application, after obtaining the parking path, the target vehicle is controlled to drive on the parking path until it is parked in a parking space.
[0068] As one approach, after determining that the target vehicle has entered a parking space, the scene data recorded by the equipment on the target vehicle during the period from the search phase to the parking space is transmitted back to the corresponding driving scenario. The path generation model is then trained based on this transmitted scene data, thereby improving the generalization ability of the path generation model to the data.
[0069] The model generation method provided in this application expands the basic scene database with an unlabeled scene dataset to obtain a training scene dataset, so that the training scene dataset can include more complex parking scenarios. By training the path generation model with this training scene dataset containing more data, the generalization ability of the path generation model can be improved.
[0070] Please see Figure 3 This application provides a model generation method, the method comprising:
[0071] Step S301: Obtain the basic scene dataset and the unlabeled scene dataset.
[0072] Step S301 can be specifically explained in the detailed explanation of the above embodiments, and therefore will not be repeated in this embodiment.
[0073] Step S302: In the current training round, input each scene data in each driving scenario included in the basic scene dataset into the data encoder, and obtain the feature vector corresponding to each scene data output by the data encoder.
[0074] In this embodiment of the application, in the current training round, each scene data in each driving scene included in the basic scene dataset is input into the data encoder. Under the mapping action of the data encoder, the scene data is transformed into a feature vector, and the feature vector output by the data encoder is obtained.
[0075] Step S303: Input the feature vector corresponding to each scene data into the discrimination model, and obtain the discrimination scene label corresponding to each scene data output by the discrimination model.
[0076] In this embodiment of the application, the feature vector corresponding to each scene data is input into the discrimination model, which calculates the membership degree between the scene data and each of the multiple driving scenarios, thereby obtaining multiple membership degrees. The driving scenario corresponding to the highest membership degree is selected as the driving scenario corresponding to the scene data. At the same time, the scene label of the driving scenario corresponding to the scene data is determined as the discrimination scene label corresponding to the scene data.
[0077] Step S304: Based on the difference between the discriminative scene label corresponding to the scene data and the scene label corresponding to the scene data, update the data encoder and the discriminative model to obtain the updated data encoder and the updated discriminative model corresponding to the current training round, wherein the scene label is a pre-labeled scene label.
[0078] In this embodiment, the scene label carried by the scene data is determined, and the corresponding discrimination scene label is also determined. The difference between the scene label and the discrimination scene label of the scene data is calculated by the cross-entropy function, and the data encoder and the discrimination model are updated by the difference, so as to obtain the updated data encoder and the updated discrimination model corresponding to the current training round.
[0079] Step S305: Input the multiple unlabeled scene data included in the unlabeled scene dataset into the updated data encoder corresponding to the current training round, and obtain multiple unlabeled feature vectors corresponding to the multiple unlabeled scene data output by the updated data encoder corresponding to the current training round, wherein one unlabeled scene data corresponds to one unlabeled feature vector.
[0080] In this embodiment of the application, after obtaining the updated data encoder corresponding to the current training round, the multiple unlabeled scene data included in the unlabeled scene dataset are input into the updated data encoder corresponding to the current training round. Under the mapping action of the updated data encoder corresponding to the current training round, the multiple unlabeled scene data are transformed into multiple unlabeled feature vectors, and the multiple unlabeled feature vectors are output.
[0081] Step S306: Input the multiple unlabeled feature vectors corresponding to the multiple unlabeled scene data into the updated discrimination model corresponding to the current training round, and obtain the multiple discrimination scene labels corresponding to the multiple unlabeled feature vectors output by the updated discrimination model corresponding to the current training round, wherein one unlabeled feature vector corresponds to one discrimination scene label.
[0082] In this embodiment, multiple unlabeled feature vectors are input into the updated discriminant model corresponding to the current training round. For an unlabeled feature vector, the updated discriminant model corresponding to the current training round calculates the membership degree between the unlabeled feature vector and each of the multiple driving scenarios, and selects the driving scenario corresponding to the largest membership degree as the discriminant driving scenario of the unlabeled feature vector. By repeating the above calculation process, multiple discriminant scenario labels corresponding to multiple unlabeled feature vectors can be obtained, that is, multiple discriminant scenario labels corresponding to multiple unlabeled scenario data are determined.
[0083] Step S307: Among the multiple unlabeled scene data, the unlabeled scene data whose membership degree with the driving scene is greater than a preset threshold is taken as the target scene data for the current training round.
[0084] In this embodiment, for each unlabeled scene data, it is determined whether the maximum membership degree corresponding to the unlabeled scene data is greater than a preset membership degree threshold. If it is greater, the unlabeled scene data is used as the target scene data for the current training round; if it is less than or equal to, the unlabeled scene data is not used as the target scene data for the current training round. The above discrimination process is repeated to select the target scene data for the current training round from multiple unlabeled scene data.
[0085] Step S308: Based on the discrimination scene label corresponding to the target scene data in the current training round, transfer the target scene data of the current training round to the basic scene dataset to obtain the transferred basic scene dataset and the transferred unlabeled scene dataset corresponding to the current training round.
[0086] In this embodiment, after the target scene data is determined from multiple unlabeled scene data in the current training round, the discrimination scene label corresponding to the target scene data is determined, and the scene is transferred to the driving scene corresponding to the same scene label in the basic scene dataset based on the discrimination scene label. This results in the transferred basic scene dataset and the transferred unlabeled scene dataset corresponding to the current training round. Clearly, the transferred basic scene dataset corresponding to the current training round includes not only the multiple scene data included in each of the multiple driving scenarios, but also the target scene data corresponding to the current training round. However, the transferred unlabeled scene dataset corresponding to the current training round no longer includes the target scene data corresponding to the current training round.
[0087] For example, in the current training round, there are three target scene data: target scene data 1, target scene data 2, and target scene data 3. The discrimination scene label for target scene data 1 and target scene data 2 is scene label A, and the discrimination scene label for target scene data 3 is scene label B. Therefore, when transferring target scene data 1, target scene data 2, and target scene data 3, target scene data 1 and target scene data 2 are transferred to the driving scene corresponding to scene label A in the basic scene dataset, and target scene data 3 is transferred to the driving scene corresponding to scene label B in the basic scene dataset.
[0088] Step S309: Based on the transferred basic scene dataset and the transferred unlabeled scene dataset corresponding to the current training round, continue to execute the next training round until all the multiple unlabeled scene data are transferred to the basic scene dataset, obtain the training scene dataset, determine that the training termination condition is met, complete the training of the data encoder and the discriminant model, and obtain the scene recognition model.
[0089] In this embodiment, based on the transferred basic scene dataset and the transferred unlabeled scene dataset corresponding to the current training round, the next training round is continued until no more scene data with a membership degree greater than a preset membership degree threshold can be obtained from the unlabeled scene dataset. At this time, if there is still unlabeled scene data remaining in the unlabeled scene dataset, a new driving scene is created in the basic scene dataset, and the remaining unlabeled scene data is transferred to the new driving scene, thereby completing the transfer of the unlabeled scene dataset. The transferred basic scene dataset corresponding to the last training round is used as the training dataset. It is determined that the training termination condition is met at this time, and the training of the data encoder and the discrimination model is completed to obtain the scene recognition model.
[0090] Step S310: Obtain the training scenario dataset, which includes multiple scenario data corresponding to multiple driving scenarios. The training scenario dataset is determined based on the basic scenario dataset and the unlabeled scenario dataset.
[0091] Step S311: Based on the heuristic cost functions corresponding to each of the multiple driving scenarios, the path planning algorithm is processed to obtain multiple processed path planning algorithms.
[0092] Step S312: Based on the multiple processed path planning algorithms, process the multiple scene data corresponding to each of the multiple driving scenarios in the training scene dataset to obtain multiple path clusters corresponding to the multiple driving scenarios included in the training scene dataset.
[0093] Step S313: Input the training scene dataset and the multiple path clusters into the model to be trained, and iteratively train the model to be trained until the training termination condition is met to obtain the path generation model.
[0094] Steps S310-S313 can be referred to the detailed explanation in the above embodiments, and therefore will not be repeated in this embodiment.
[0095] This application provides a model generation method that expands a basic scene database with an unlabeled scene dataset to obtain a training scene dataset, so that the training scene dataset can include more complex parking scenarios. By training the path generation model with this training scene dataset containing more data, the generalization ability of the path generation model can be improved.
[0096] Please see Figure 4 This application provides a model generation method, the method comprising:
[0097] Step S401: Obtain the basic scene dataset and the unlabeled scene dataset.
[0098] Step S402: Input the basic scene dataset and the unlabeled scene dataset into the scene recognition model to be trained, and iteratively train the scene recognition model to be trained until the training termination condition is met, thereby obtaining the scene recognition model and the training scene dataset. The training scene dataset is obtained based on the basic scene dataset and the target scene data of each training round. The target scene data of each training round is the unlabeled scene data among the multiple unlabeled scene data corresponding to each training round whose membership degree with the driving scene is greater than a preset membership degree threshold.
[0099] Step S403: Obtain the training scenario dataset, which includes multiple scenario data corresponding to multiple driving scenarios. The training scenario dataset is determined based on the basic scenario dataset and the unlabeled scenario dataset.
[0100] Steps S401-S403 can be referred to the detailed explanation in the above embodiments, and therefore will not be repeated in this embodiment.
[0101] Step S404: Input the training scene dataset and feature dataset into the data expander to be trained, and iteratively train the data expander to be trained until the training termination condition is met to obtain the data expander. The feature dataset is a dataset determined from white noise.
[0102] In this embodiment, if the training scene dataset contains sufficient scene data, the training data expander can be skipped, and the training model can be trained directly based on the training scene dataset. That is, if the training scene dataset contains insufficient scene data, a data expander needs to be trained to expand the training scene dataset, thus including more scene data. The feature dataset is randomly sampled from white noise Z to N(0,I), and the number of feature data in the feature dataset is the same as the number of scene data in the training scene dataset. The training scenario dataset and feature dataset are input into the data expander to be trained. In one training round, the data expander to be trained is trained using multiple scenario data and the same number of feature data as the scenario data included in a driving scenario in the training scenario dataset. The above process is repeated to iteratively train the data expander to be trained until the training of the data expander to be trained is completed using the last driving scenario and feature data in the training scenario dataset. The training termination condition is then met, and the data expander is obtained. The obtained data expander has the ability to generate scenario data corresponding to a specific scenario label from a feature dataset sampled from white noise Z~N(0,I).
[0103] Step S405: Input the training scene dataset into the data expander to obtain the expanded scene dataset output by the data expander, wherein the expanded scene dataset includes the training scene dataset and scene data generated by the data expander based on the training scene dataset.
[0104] In this embodiment of the application, the training scenario dataset is input into the data expander, which generates scenario data for each driving scenario included in the training scenario dataset and sends the generated scenario data to the corresponding driving scenario, thereby completing the expansion of the training scenario dataset to obtain the expanded scenario dataset, and then outputting the expanded scenario dataset.
[0105] Step S406: Process the expanded scene dataset using a path planning algorithm to obtain multiple path clusters corresponding to the expanded scene dataset.
[0106] In this embodiment, the path planning algorithm is processed by the heuristic cost function corresponding to each of the multiple driving scenarios included in the expanded scenario dataset, thereby obtaining multiple processed path planning algorithms. For each processed path planning algorithm, the driving scenario in the expanded scenario dataset corresponding to the processed path planning algorithm is determined, and the multiple scenario data in the driving scenario are processed according to the processed path planning algorithm to obtain the path cluster corresponding to the driving scenario. By repeating the above process, multiple path clusters corresponding to multiple driving scenarios can be obtained by including multiple driving scenarios in the expanded scenario dataset.
[0107] Step S407: Input the expanded scene dataset and the multiple path clusters corresponding to the expanded scene dataset into the model to be trained, and iteratively train the model to be trained until the training termination condition is met to obtain the path generation model.
[0108] In this embodiment, for each training round, each scene data and the corresponding path of each driving scenario included in the expanded scene dataset are input into the model to be trained. The above process is repeated to achieve iterative training of the model to be trained until the last scene data in the expanded scene dataset and the corresponding path of that scene data are input into the model to be trained, and the training termination condition is met, thus obtaining the path generation model.
[0109] Step S408: After the parking function is enabled, acquire the scene data to be processed.
[0110] Step S409: Input the data to be processed into a pre-trained scene recognition model to obtain the driving scene corresponding to the data to be processed output by the scene recognition model.
[0111] Step S410: Input the scene data to be processed and the driving scene corresponding to the scene data to be processed into the path generation model, and obtain the parking path output by the path generation model.
[0112] Step S411: Based on the parking path, control the target vehicle to park in the available parking space.
[0113] Steps S408-S411 can be referred to in detail in the above embodiments, and therefore will not be repeated in this embodiment.
[0114] The model generation method provided in this application expands the basic scene database with an unlabeled scene dataset to obtain a training scene dataset, so that the training scene dataset can include more complex parking scenarios. By training the path generation model with this training scene dataset containing more data, the generalization ability of the path generation model can be improved.
[0115] Please see Figure 5 This application provides a model generation method, the method comprising:
[0116] Step S501: Obtain the basic scene dataset and the unlabeled scene dataset.
[0117] Step S502: Input the basic scene dataset and the unlabeled scene dataset into the scene recognition model to be trained, and iteratively train the scene recognition model to be trained until the training termination condition is met, thereby obtaining the scene recognition model and the training scene dataset. The training scene dataset is obtained based on the basic scene dataset and the target scene data of each training round. The target scene data of each training round is the unlabeled scene data with a membership degree greater than a preset threshold among the multiple unlabeled scene data corresponding to each training round.
[0118] Step S503: Obtain the training scenario dataset, which includes multiple scenario data corresponding to multiple driving scenarios. The training scenario dataset is determined based on the basic scenario dataset and the unlabeled scenario dataset.
[0119] Step S504: In each training round, input multiple scene data from each driving scenario included in the training scenario dataset into the data encoder, and obtain multiple first feature vectors corresponding to the multiple scene data output by the data encoder.
[0120] In this embodiment of the application, in each training round, multiple scene data from each driving scenario included in the training scenario dataset are extracted and input into the data encoder. Under the mapping action of the data encoder, the multiple scene data are transformed into multiple first feature vectors and the multiple first feature vectors are output.
[0121] Step S505: Sample multiple feature data from white noise, and randomly assign a scene label to each feature data. The number of feature data is the same as the number of scene data.
[0122] In this embodiment of the application, multiple features are obtained by randomly sampling from white noise Z to N(0,I), and each feature is randomly assigned a scene label.
[0123] Step S506: Input the multiple feature data and the multiple scene labels corresponding to the multiple feature data into the generative coding model, and obtain multiple scene data output by the generative coding model, wherein one scene data corresponds to one feature data.
[0124] In this embodiment of the application, multiple feature data and multiple scene labels corresponding to the multiple feature data are input into the generator encoder, which converts each feature data and each scene label corresponding to the feature data into scene data, thereby converting multiple feature data and multiple scene labels corresponding to the multiple feature data into multiple scene data, and outputting the multiple scene data.
[0125] Step S507: Input the multiple scene data into the feature data encoder to obtain multiple second feature vectors output by the feature data encoder, wherein one second feature vector corresponds to one scene data.
[0126] In this embodiment, multiple scene data are input into a feature data encoder. Under the mapping action of the feature data encoder, the multiple scene data are converted into multiple second feature vectors, and the multiple second feature vectors are output. Since the number of feature data and the number of scene data are the same in the current training round, the number of second feature vectors determined based on the feature data is the same as the number of first feature vectors.
[0127] Step S508: Input the plurality of first feature vectors and the plurality of second feature vectors into the probability model, and obtain the plurality of first feature probabilities corresponding to the plurality of first feature vectors and the plurality of second feature probabilities corresponding to the plurality of second feature vectors output by the probability model, wherein one first feature vector corresponds to one first feature probability and one second feature vector corresponds to one second feature probability.
[0128] Step S509: Based on the plurality of first feature probabilities and the plurality of second feature probabilities, update the generative coding model, the feature data encoder and the probability model to obtain the updated generative coding model, the updated feature data encoder and the updated probability model.
[0129] In this embodiment, after obtaining multiple first feature probabilities corresponding to multiple first feature vectors and multiple second feature probabilities corresponding to multiple second feature vectors, the difference between each first feature vector and each second feature vector is calculated based on the chain rule, and the gradient of the difference with the model parameters corresponding to the generative coding model, the feature data encoder, and the probability model is determined. Then, the model parameters corresponding to the generative coding model, the feature data encoder, and the probability model are updated using the gradient descent method, thereby completing the update of the generative coding model, the feature data encoder, and the probability model, and obtaining the updated generative coding model, the updated feature data encoder, and the updated probability model.
[0130] Step S510: Based on the updated generative encoding model, the updated feature data encoder, and the updated probability model, continue to execute the next training round until the processing of multiple scene data in the last driving scene included in the training scene dataset is completed, determine that the training termination condition is met, complete the training of the generative encoder, the feature data encoder, and the probability model, and obtain the data expander.
[0131] In this embodiment, the next training round is executed based on the updated generative encoder, the updated feature data encoder, and the updated probability model, until the generative encoder, the feature data encoder, and the probability model are updated using multiple scene data from the last driving scenario included in the training scenario dataset, and the training termination condition is met, thus obtaining the data expander.
[0132] As another approach, the training termination condition can also be that the update magnitude of the corresponding model parameters of the generative coding model, feature data encoder, and probabilistic model is less than a preset threshold. At this point, the training of the generative coding model, feature data encoder, and probabilistic model is considered to have converged, and the data augmenter is obtained.
[0133] Step S511: Input the training scene dataset into the data expander to obtain the expanded scene dataset output by the data expander, wherein the expanded scene dataset includes the training scene dataset and scene data generated by the data expander based on the training scene dataset.
[0134] Step S512: Process the expanded scene dataset using a path planning algorithm to obtain multiple path clusters corresponding to the expanded scene dataset.
[0135] Step S513: Input the expanded scene dataset and the multiple path clusters corresponding to the expanded scene dataset into the model to be trained, and iteratively train the model to be trained until the training termination condition is met to obtain the path generation model.
[0136] Steps S511-S513 can be referred to the detailed explanation in the above embodiments, and therefore will not be repeated in this embodiment.
[0137] The model generation method provided in this application expands the basic scene database with an unlabeled scene dataset to obtain a training scene dataset, so that the training scene dataset can include more complex parking scenarios. By training the path generation model with this training scene dataset containing more data, the generalization ability of the path generation model can be improved.
[0138] Please see Figure 6This application provides a model generation apparatus 600, the apparatus 600 comprising:
[0139] The dataset acquisition unit 610 is used to acquire a training scenario dataset, which includes multiple scene data corresponding to multiple driving scenarios. The training scenario dataset is determined based on a basic scenario dataset and an unlabeled scenario dataset. The basic scenario dataset includes scene data corresponding to multiple driving scenarios and scene labels corresponding to each scene data. The unlabeled scenario dataset includes multiple unlabeled scene data.
[0140] As one approach, the dataset acquisition unit 610 also acquires a basic scene dataset and an unlabeled scene dataset; inputs the basic scene dataset and the unlabeled scene dataset into the scene recognition model to be trained, and iteratively trains the scene recognition model until the training termination condition is met, thereby obtaining the scene recognition model and the training scene dataset. The training scene dataset is obtained based on the basic scene dataset and the target scene data for each training round. The target scene data for each training round is the unlabeled scene data among the multiple unlabeled scene data corresponding to each training round whose membership degree with the driving scene is greater than a preset threshold.
[0141] Optionally, the dataset acquisition unit 610 is further configured to, in the current training round, input each scene data in each driving scenario included in the basic scene dataset into the data encoder to obtain the feature vector corresponding to each scene data output by the data encoder; input the feature vector corresponding to each scene data into the discriminant model to obtain the discriminant scene label corresponding to each scene data output by the discriminant model; update the data encoder and the discriminant model based on the difference between the discriminant scene label corresponding to the scene data and the scene label corresponding to the scene data, to obtain the updated data encoder and the updated discriminant model corresponding to the current round, wherein the scene label is a pre-labeled scene label; input multiple unlabeled scene data included in the unlabeled scene dataset into the updated data encoder corresponding to the current round to obtain multiple unlabeled feature vectors corresponding to the multiple unlabeled scene data output by the updated data encoder corresponding to the current round, wherein one unlabeled scene data corresponds to An unlabeled feature vector is used; multiple unlabeled feature vectors corresponding to the multiple unlabeled scene data are input into the updated discriminant model corresponding to the current round, and multiple discriminant scene labels corresponding to the multiple unlabeled feature vectors output by the updated discriminant model corresponding to the current round are obtained, wherein one unlabeled feature vector corresponds to one discriminant scene label; among the multiple unlabeled scene data, the unlabeled scene data that meets the preset conditions is used as the target scene data; based on the discriminant scene label corresponding to the target scene data, the target scene data is transferred to the basic scene dataset, and the transferred basic scene dataset and the transferred unlabeled scene dataset are obtained. The transferred basic scene dataset includes the transferred scene data, and the unlabeled scene dataset does not include the transferred scene data; the next training round is continued until all the multiple unlabeled scene data are transferred to the basic scene dataset, and the training termination condition is determined to be met, thus completing the training of the data encoder and the discriminant model, and obtaining the scene recognition model.
[0142] Optionally, the dataset acquisition unit 610 is further configured to input the training scene dataset and the feature dataset into the data expander to be trained, iteratively train the data expander to be trained until the training termination condition is met, and obtain the data expander, wherein the feature dataset is a dataset determined from white noise; input the training scene dataset into the data expander, and obtain the expanded scene dataset output by the data expander, wherein the expanded scene dataset includes the training scene dataset and scene data generated by the data expander based on the training scene dataset.
[0143] Optionally, the dataset acquisition unit 610 is further configured to, in each training round, input multiple scene data from each driving scenario included in the expanded scene dataset into the data encoder to obtain multiple first feature vectors corresponding to the multiple scene data output by the data encoder; sample multiple feature data from white noise, randomly assign scene labels to each feature data, the number of feature data being the same as the number of scene data; input the multiple feature data and the multiple scene labels corresponding to the multiple feature data into the generative coding model to obtain multiple scene data output by the generative coding model, wherein one scene data corresponds to one feature data; input the multiple scene data into the feature data encoder to obtain multiple second feature vectors output by the feature data encoder, wherein one second feature vector corresponds to one scene data; and input the multiple first feature vectors and the multiple scene labels corresponding to the scene data into the feature data encoder. The second feature vector is input into the probability model to obtain multiple first feature probabilities corresponding to the multiple first feature vectors output by the probability model, and multiple second feature probabilities corresponding to the multiple second feature vectors, wherein one first feature vector corresponds to one first feature probability, and one second feature vector corresponds to one second feature probability; based on the multiple first feature probabilities and the multiple second feature probabilities, the generative coding model, the feature data encoder, and the probability model are updated to obtain the updated generative coding model, the updated feature data encoder, and the updated probability model; the next training round continues until the processing of multiple scene data in the last driving scenario included in the expanded scene dataset is completed, and the training termination condition is determined to be met, thus completing the training of the generative encoder, the feature data encoder, and the probability model to obtain the data expander.
[0144] Optionally, the dataset acquisition unit 610 is further configured to process the path planning algorithm based on the heuristic cost function corresponding to each of the multiple driving scenarios to obtain multiple processed path planning algorithms; and based on the multiple processed path planning algorithms, process the multiple scenario data corresponding to each of the multiple driving scenarios in the training scenario dataset to obtain multiple path clusters corresponding to the multiple driving scenarios included in the training scenario dataset.
[0145] Optionally, the dataset acquisition unit 610 is further configured to process the path planning algorithm based on the heuristic cost function corresponding to each of the multiple driving scenarios to obtain multiple processed path planning algorithms; and based on the multiple processed path planning algorithms, process the multiple scenario data corresponding to each of the multiple driving scenarios in the training scenario dataset to obtain multiple path clusters corresponding to the multiple driving scenarios included in the training scenario dataset.
[0146] The path cluster acquisition unit 620 is used to process the training scenario dataset through a path planning algorithm to obtain multiple path clusters corresponding to the training scenario dataset. Each driving scenario corresponds to one path cluster, and each path cluster includes multiple paths.
[0147] In one approach, the path cluster acquisition unit 620 is also used to process the expanded scene dataset using a path planning algorithm to obtain multiple path clusters corresponding to the expanded scene dataset.
[0148] The model training unit 630 is used to input the training scenario dataset and the multiple path clusters into the model to be trained, and to iteratively train the model to be trained until the training termination condition is met, thereby obtaining the path generation model.
[0149] In one approach, the model training unit 630 is also used to input the extended scene dataset and the multiple path clusters corresponding to the extended scene dataset into the model to be trained, and to iteratively train the model to be trained until the training termination condition is met, thereby obtaining a path generation model.
[0150] Optionally, the model training unit 630 is further configured to, in each training round, input each scene data in each driving scenario included in the training scene dataset into the first encoder to obtain the first encoded feature output by the first encoder; divide the path corresponding to the scene data into a path segment near the destination, a path segment far from the destination, and the destination position; input the path segment near the destination into the second encoder to obtain the second encoded feature output by the second encoder; input the path segment far from the destination into the third encoder to obtain the third encoded feature output by the third encoder; input the destination position into the fourth encoder to obtain the fourth encoded feature output by the fourth encoder; input the first encoded feature, the second encoded feature, the third encoded feature, and the fourth encoded feature into the probability space encoder to obtain the probability space encoded feature and the multivariate normal distribution output by the probability space encoder; input the probability space encoded feature into the probability space decoder to obtain the first decoded feature and the second decoded feature output by the probability space decoder; input the first decoded feature into the fifth encoder to obtain the fifth encoded feature output by the fifth encoder; and input the second decoded feature into the fifth encoder to obtain the fifth encoded feature output by the fifth encoder. The first encoder, the third encoder, the fifth encoder, and the sixth encoder are input into the decoder to obtain the decoding path output by the decoder. Based on the path, the decoding path, and the multivariate normal distribution, the first encoder, the second encoder, the third encoder, the fourth encoder, the probability space decoder, and the decoder are updated to obtain the updated first encoder, the updated second encoder, the updated third encoder, the updated fourth encoder, the updated probability space decoder, and the updated decoder. Based on the updated first encoder, the updated second encoder, the updated third encoder, the updated fourth encoder, the updated probability space decoder, and the updated decoder, the next training round is executed until every scene data in every driving scene included in the training scene dataset is traversed, and the training termination condition is determined to be met. The updates to the first encoder, the second encoder, the third encoder, the fourth encoder, the probability space decoder, and the decoder are completed to obtain the path generation model.
[0151] Optionally, the model training unit 630 is further configured to, when the parking function is activated, acquire scene data to be processed; input the scene data to be processed into a pre-trained scene recognition model to acquire the driving scene corresponding to the scene data to be processed output by the scene recognition model; input the scene data to be processed and the driving scene corresponding to the scene data to be processed into the path generation model to acquire the parking path output by the path generation model; and control the target vehicle to park in a parking space based on the parking path.
[0152] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.
[0153] The following will combine Figure 7 This application describes one type of vehicle.
[0154] Please see Figure 7 Based on the aforementioned data processing method and apparatus, this application also provides another vehicle 700 capable of executing the aforementioned data processing method. The vehicle 700 includes one or more (only one shown in the figure) processors 702, a memory 704, and a network module 706 coupled together. The memory 704 stores programs capable of executing the contents of the aforementioned embodiments, and the processor 702 can execute the programs stored in the memory 704.
[0155] The processor 702 may include one or more processing cores. The processor 702 connects to various parts within the vehicle 700 via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in the memory 704, and calling data stored in the memory 704 to perform various functions of the server 700 and process data. Optionally, the processor 702 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 702 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 702 and may be implemented separately using a communication chip.
[0156] The memory 704 may include random access memory (RAM) or read-only memory (ROM). The memory 704 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 704 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 700 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0157] The network module 706 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby communicating with communication networks or other devices, such as audio playback devices. The network module 706 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM cards), memory, etc. The network module 706 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices through wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks (WLANs), or metropolitan area networks (MANs). For example, the network module 706 can interact with base stations.
[0158] Please refer to Figure 8 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable storage medium 800 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0159] The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
[0160] This application provides a model generation method, apparatus, vehicle, and storage medium. The method includes: acquiring a training scene dataset, wherein the training scene dataset is determined based on a base scene dataset and an unlabeled scene dataset; processing the training scene dataset using a path planning algorithm to obtain multiple path clusters corresponding to the training scene dataset; inputting the training scene dataset and the multiple path clusters into a model to be trained, and iteratively training the model until the training termination condition is met to obtain a path generation model. Expanding the base scene database with an unlabeled scene dataset to obtain the training scene dataset allows the training scene dataset to include more complex parking scenarios. Training the path generation model with this more data-rich training scene dataset can improve the generalization ability of the path generation model.
[0161] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
Claims
1. A model generation method, characterized in that, The method includes: Obtain a training scenario dataset, which includes multiple scenario data corresponding to multiple driving scenarios. The training scenario dataset is determined based on a basic scenario dataset and an unlabeled scenario dataset. The basic scenario dataset includes scenario data corresponding to multiple driving scenarios and scenario labels corresponding to each scenario data. The unlabeled scenario dataset includes multiple unlabeled scenario data. The training scenario dataset is processed by a path planning algorithm to obtain multiple path clusters corresponding to the training scenario dataset. Each driving scenario corresponds to one path cluster, and each path cluster includes multiple paths. The step of processing the training scenario dataset using a path planning algorithm to obtain multiple path clusters corresponding to the training scenario dataset includes: Based on the heuristic cost functions corresponding to each of the multiple driving scenarios, the path planning algorithm is processed to obtain multiple processed path planning algorithms. Based on the multiple processed path planning algorithms, the multiple scene data corresponding to each of the multiple driving scenarios in the training scene dataset are processed to obtain multiple path clusters corresponding to the multiple driving scenarios included in the training scene dataset. The training scenario dataset and the multiple path clusters are input into the model to be trained, and the model to be trained is iteratively trained until the training termination condition is met, thus obtaining the path generation model.
2. The method according to claim 1, characterized in that, Before obtaining the training scenario dataset, the following steps are also included: Obtain the basic scene dataset and the unlabeled scene dataset; The basic scene dataset and the unlabeled scene dataset are input into the scene recognition model to be trained, and the scene recognition model to be trained is iteratively trained until the training termination condition is met, thereby obtaining the scene recognition model and the training scene dataset. The training scene dataset is obtained based on the basic scene dataset and the target scene data of each training round. The target scene data of each training round is the unlabeled scene data with a membership degree greater than a preset threshold among the multiple unlabeled scene data corresponding to each training round.
3. The method according to claim 2, characterized in that, The scene recognition model to be trained includes a data encoder and a discriminant model; the step of inputting the basic scene dataset and the unlabeled scene dataset into the scene recognition model to be trained, and iteratively training the scene recognition model to be trained until the training termination condition is met, to obtain the scene recognition model and the training scene dataset, includes: In the current training round, each scene data in each driving scenario included in the basic scene dataset is input into the data encoder to obtain the feature vector corresponding to each scene data output by the data encoder; The feature vector corresponding to each scene data is input into the discrimination model to obtain the discrimination scene label corresponding to each scene data output by the discrimination model; Based on the difference between the discriminative scene label corresponding to the scene data and the scene label corresponding to the scene data, the data encoder and the discriminative model are updated to obtain the updated data encoder and the updated discriminative model corresponding to the current training round. The scene label is a pre-labeled scene label. The unlabeled scene dataset includes multiple unlabeled scene data, which are input into the updated data encoder corresponding to the current training round. Multiple unlabeled feature vectors corresponding to the multiple unlabeled scene data are obtained from the updated data encoder corresponding to the current training round. One unlabeled scene data corresponds to one unlabeled feature vector. The multiple unlabeled feature vectors corresponding to the multiple unlabeled scene data are input into the updated discrimination model corresponding to the current training round, and the multiple discrimination scene labels corresponding to the multiple unlabeled feature vectors output by the updated discrimination model corresponding to the current training round are obtained, wherein one unlabeled feature vector corresponds to one discrimination scene label; Among the multiple unlabeled scene data, the unlabeled scene data with a membership degree greater than a preset threshold with the driving scene is used as the target scene data for the current training round; Based on the discrimination scene label corresponding to the target scene data in the current training round, the target scene data in the current training round is transferred to the basic scene dataset to obtain the transferred basic scene dataset and the transferred unlabeled scene dataset corresponding to the current training round. Based on the transferred basic scene dataset and the transferred unlabeled scene dataset corresponding to the current training round, the next training round is executed until all the unlabeled scene data are transferred to the basic scene dataset, the training scene dataset is obtained, the training termination condition is determined to be met, the training of the data encoder and the discriminant model is completed, and the scene recognition model is obtained.
4. The method according to claim 2, characterized in that, The method further includes: The training scenario dataset and feature dataset are input into the data expander to be trained, and the data expander to be trained is iteratively trained until the training termination condition is met to obtain the data expander. The feature dataset is a dataset determined from white noise. The training scene dataset is input into the data expander to obtain the expanded scene dataset output by the data expander, wherein the expanded scene dataset includes the training scene dataset and scene data generated by the data expander based on the training scene dataset; The step of processing the training scenario dataset using a path planning algorithm to obtain multiple path clusters corresponding to the training scenario dataset includes: The expanded scene dataset is processed by a path planning algorithm to obtain multiple path clusters corresponding to the expanded scene dataset; The step of inputting the training scenario dataset and the multiple path clusters into the model to be trained, and iteratively training the model to be trained until the training termination condition is met to obtain the path generation model includes: The extended scene dataset and the multiple path clusters corresponding to the extended scene dataset are input into the model to be trained, and the model to be trained is iteratively trained until the training termination condition is met, thus obtaining the path generation model.
5. The method according to claim 4, characterized in that, The data augmenter to be trained includes a generative coding model, a feature data encoder, and a probabilistic model; the step of inputting the training scenario dataset and the feature dataset into the data augmenter to be trained, and iteratively training the data augmenter until the training termination condition is met to obtain the data augmenter, includes: In each training round, multiple scene data from each driving scenario included in the training scenario dataset are input into the data encoder to obtain multiple first feature vectors corresponding to the multiple scene data output by the data encoder. Multiple feature data are sampled from white noise, and each feature data is randomly assigned a scene label, wherein the number of feature data is the same as the number of scene data. The multiple feature data and the multiple scene labels corresponding to the multiple feature data are input into the generative coding model to obtain multiple scene data output by the generative coding model, wherein one scene data corresponds to one feature data. The multiple scene data are input into the feature data encoder to obtain multiple second feature vectors output by the feature data encoder, wherein one second feature vector corresponds to one scene data. The plurality of first feature vectors and the plurality of second feature vectors are input into the probability model to obtain the plurality of first feature probabilities corresponding to the plurality of first feature vectors and the plurality of second feature probabilities corresponding to the plurality of second feature vectors output by the probability model, wherein one first feature vector corresponds to one first feature probability and one second feature vector corresponds to one second feature probability. Based on the plurality of first feature probabilities and the plurality of second feature probabilities, the generative coding model, the feature data encoder, and the probability model are updated to obtain the updated generative coding model, the updated feature data encoder, and the updated probability model. Based on the updated generative coding model, the updated feature data encoder, and the updated probability model, the next training round continues until the processing of multiple scene data in the last driving scene included in the training scene dataset is completed, the training termination condition is determined to be met, and the training of the generative coding model, the feature data encoder, and the probability model is completed, thus obtaining the data expander.
6. The method according to claim 1, characterized in that, The model to be trained includes a first encoder, a second encoder, a third encoder, a fourth encoder, a probability space encoder, and a decoder; the step of inputting the training scene dataset and the multiple path clusters into the model to be trained, and iteratively training the model until the training termination condition is met to obtain a path generation model includes: In each training round, each scene data in each driving scenario included in the training scenario dataset is input into the first encoder to obtain the first encoded feature output by the first encoder; The path corresponding to the scene data is divided into path segments close to the endpoint, path segments far from the endpoint, and the endpoint location; The path segment near the endpoint is input into the second encoder to obtain the second encoded feature output by the second encoder; The path segment far from the destination is input into the third encoder to obtain the third encoded feature output by the third encoder; The endpoint position is input into the fourth encoder to obtain the fourth encoded feature output by the fourth encoder; The first coding feature, the second coding feature, the third coding feature, and the fourth coding feature are input into the probability space encoder to obtain the probability space coding features and multivariate normal distribution output by the probability space encoder. The probability space encoded features are input into the decoder to obtain the first decoded features and the second decoded features output by the decoder. The first decoding feature is input into the fifth encoder to obtain the fifth encoding feature output by the fifth encoder; The second decoding feature is input into the sixth encoder to obtain the sixth encoding feature output by the sixth encoder; The first encoding feature, the third encoding feature, the fifth encoding feature, and the sixth encoding feature are input into the decoder to obtain the decoding path output by the decoder; Based on the path, the decoding path, and the multivariate normal distribution, the first encoder, the second encoder, the third encoder, the fourth encoder, the probability space encoder, and the decoder are updated to obtain the updated first encoder, the updated second encoder, the updated third encoder, the updated fourth encoder, the updated probability space encoder, and the updated decoder. Based on the updated first encoder, the updated second encoder, the updated third encoder, the updated fourth encoder, the updated probability space encoder, and the updated decoder, the next training round is executed until every scene data in every driving scenario included in the training scene dataset is traversed, and the training termination condition is determined to be met. The first encoder, the second encoder, the third encoder, the fourth encoder, the probability space encoder, and the decoder are then updated to obtain the path generation model.
7. The method according to claim 1, characterized in that, The step of inputting the training scene dataset and the multiple path clusters into the model to be trained, iteratively training the model until the training termination condition is met, and obtaining the path generation model, further includes: Once the parking function is enabled, acquire the data for the scene to be processed; The scene data to be processed is input into a pre-trained scene recognition model to obtain the driving scene corresponding to the scene data to be processed output by the scene recognition model. The scene data to be processed and the driving scene corresponding to the scene data to be processed are input into the path generation model to obtain the parking path output by the path generation model. Based on the parking path, control the target vehicle to park in an available parking space.
8. A model generation apparatus, characterized in that, The device includes: The dataset acquisition unit is used to acquire a training scenario dataset, which includes multiple scenario data corresponding to multiple driving scenarios. The training scenario dataset is obtained by expanding the scenario dataset to be expanded based on a data expander. The scenario dataset to be expanded is determined based on a basic scenario dataset and an unlabeled scenario dataset. The basic scenario dataset includes scenario data corresponding to multiple driving scenarios and a scenario label corresponding to each scenario data. The unlabeled scenario dataset includes multiple unlabeled scenario data. The path cluster acquisition unit is used to process the training scenario dataset using a path planning algorithm to obtain multiple path clusters corresponding to the training scenario dataset. Each driving scenario corresponds to one path cluster, and each path cluster includes multiple paths. The process of processing the training scenario dataset using the path planning algorithm to obtain the multiple path clusters corresponding to the training scenario dataset includes: processing the path planning algorithm based on the heuristic cost function corresponding to each of the multiple driving scenarios to obtain multiple processed path planning algorithms; and processing the multiple scenario data corresponding to each of the multiple driving scenarios in the training scenario dataset based on the multiple processed path planning algorithms to obtain multiple path clusters corresponding to the multiple driving scenarios included in the training scenario dataset. The model training unit is used to input the training scenario dataset and the multiple path clusters into the model to be trained, and to iteratively train the model to be trained until the training termination condition is met, thereby obtaining the path generation model.
9. A vehicle, characterized in that, It includes one or more processors and memory, wherein one or more programs are stored in the memory and configured to be executed by one or more processors according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, which includes instructions for performing the method as claimed in any one of claims 1-7.
11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1-7.
Citation Information
Patent Citations
Automatic parking method and device, storage medium and computer equipment
CN115520178A
Scene recognition method and device
CN115880651A