Scene migration method and apparatus, and electronic device
By constructing a migration relationship model and using iterative migration technology, the problem of insufficient accuracy of AI perception models in extreme scenarios was solved, thereby improving the accuracy and efficiency of scene migration.
Patent Information
- Application Number
- CN202011554392.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2040-12-24
AI Technical Summary
Existing AI perception models lack accuracy in recognizing extreme or rare scenarios, making it difficult to guarantee recognition results through training with a small amount of data, and extreme scenarios are difficult to collect and accumulate.
By constructing a migration relationship model, image samples from the source scene are migrated to the target scene. The model trained on the source dataset is used to filter and iteratively migrate image samples, and a migration dataset is constructed to ensure the accuracy and efficiency of scene migration.
It enables image sample transfer between different scenarios, improving data accuracy and recognition performance in extreme or rare scenarios, while reducing transfer complexity and cost.
Smart Images

Figure CN114677575B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and Internet technology, and particularly relates to a scene migration method and device and electronic equipment. BACKGROUND
[0002] At present, a machine learning algorithm is usually used to train an artificial intelligence (AI) perception model for identifying a scene, for example, a deep convolutional neural network. The identification accuracy of the AI perception model is highly dependent on the number of training data and the richness of the sample set containing the scene. However, due to the characteristics of the real world scene, such as infinite richness, difficulty in exhausting, complex combination, and difficulty in predicting, for example, variable weather, complex traffic environment, and dynamic driving state, it is difficult to collect some extreme or rare scenes. Moreover, even if some extreme or rare scenes are collected by chance, due to their low frequency, it is difficult to accumulate enough data, so the accuracy of the AI perception model trained based on these small amount of data cannot be guaranteed. SUMMARY
[0003] Embodiments of the present application provide a scene migration method, device and electronic equipment, which can guarantee the accuracy of scene migration and ensure the effect of scene migration. In addition, the present application also provides a scene migration method that can perform iterative migration, which can obtain a data set of a scene with low frequency and difficult to collect through multiple iterative migrations.
[0004] In a first aspect, embodiments of the present application provide a scene migration method, and the method comprises:
[0005] obtaining a source data set of a source scene and a target data set of a target scene, the source data set comprising a first number of first image samples, the target data set comprising a second number of second image samples, the first number being greater than the second number, each image sample having a corresponding first label, the source scene and the target scene being scenes encountered during vehicle driving, the occurrence frequency of the source scene being higher than that of the target scene;
[0006] inputting at least one second image sample in the target data set into a source perception model to obtain a predicted label set, the predicted label set comprising a second label corresponding to each second image sample in the at least one second image sample, the second label being used to represent a result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set;
[0007] obtaining a migration relationship model based on the at least one second image sample, the first label of each of the at least one second image sample, and the set of predicted labels, the migration relationship model being used to represent a migration relationship from the source scene to the target scene;
[0008] inputting the at least one first image sample in the source data set into the migration relationship model to obtain a first data set in which the at least one first image sample in the source data set is migrated to the target scene, the first data set including at least one migrated image sample;
[0009] screening the migrated image sample in the first data set to obtain a migration data set, the migration data set including at least one migrated image sample, and the migration data set being a data set of a scene formed by migration of the source scene to the target scene.
[0010] Thus, for different source scenes and / or target scenes, different migration relationships from the source scene to the corresponding target scene can be constructed, and the migration of the image sample in the scene can be realized based on the migration relationship, so that the migration of the scene can be purposefully performed each time, which is beneficial to guarantee the accuracy of the data of the image sample after the migration of the scene and guarantees the effect of the migration of the scene.
[0011] In a possible implementation, obtaining the migration relationship model based on the at least one second image sample, the first label of each of the at least one second image sample, and the set of predicted labels includes:
[0012] obtaining a target deviation value between the first label of each second image sample and the second label corresponding to each second image sample, the target deviation value being used to represent a similarity between the first label and the second label;
[0013] constructing a second data set based on each second image sample and the target deviation value, the image sample in the second data set being each second image sample, and the label of the image sample in the second data set being the target deviation value corresponding to each second image sample;
[0014] training the image sample in the second data set to obtain the migration relationship model.
[0015] In a possible implementation, obtaining the target deviation value between the first label of each second image sample and the second label corresponding to each second image sample includes:
[0016] using a plurality of similarity relationship functions to respectively calculate a similarity value between the first label of each second image sample and the second label corresponding to each second image sample, wherein each similarity value corresponds to a similarity relationship function;
[0017] The similarity value corresponding to each second image sample is calculated based on each similarity function, to obtain a first similarity value corresponding to each similarity function, and the first similarity value is used to represent the similarity between the source scene and the target scene.
[0018] A similarity function corresponding to a minimum first similarity value is selected from the plurality of first similarity values as a target similarity function.
[0019] The similarity value of each second image sample calculated by using the target similarity function is used as a target deviation value corresponding to each second image sample.
[0020] In a possible implementation, the migration image samples in the first data set are screened to obtain a migration data set, including:
[0021] A second similarity value between at least one second image sample in the target data set and at least one migration image sample in the first data set is obtained, and the second similarity value is used to represent the similarity between the second image sample and the migration image sample.
[0022] The migration image samples in the first data set are screened based on the second similarity value to obtain a third data set.
[0023] The at least one second image sample in the target data set and the image samples in the third data set are collectively used as image samples in the migration data set, to obtain the migration data set.
[0024] In a possible implementation, the screening of the migration image samples in the first data set based on the second similarity value includes:
[0025] If the second similarity value is in the target range interval, the migration image sample is retained.
[0026] If the second similarity value is not in the target range interval, the migration image sample is removed.
[0027] In a possible implementation, after the migration data set is obtained by screening the migration image samples in the first data set, the method further includes:
[0028] The image samples in the migration data set are trained to obtain a target perception model.
[0029] In a second aspect, the embodiments of the present application provide a scene migration method, including:
[0030] obtaining a source dataset of a source scene and target datasets of a plurality of target scenes, the source dataset comprising first image samples, each of the target datasets comprising second image samples, a number of the second image samples in each of the target datasets being less than a number of the first image samples in the source dataset, each of the image samples having a corresponding first label, the source scene and the target scenes being scenes encountered by a vehicle during driving, a frequency of occurrence of the source scene being higher than a frequency of occurrence of the target scenes;
[0031] performing iterative scene migration on the source scene and the plurality of target scenes to obtain a target migrated scene;
[0032] wherein, for each round of scene migration, a third similarity value between a target source scene and each first target scene is obtained, the target source scene being the migrated scene obtained in a previous round of scene migration or the source scene, the first target scene being a target scene that has not been subjected to scene migration, the third similarity value representing similarity between the target source scene and the first target scene;
[0033] based on the third similarity value, a second target scene that performs the current round of scene migration is selected from the first target scenes;
[0034] migrating the first image samples in the source dataset of the target source scene to the second target scene to obtain a current round of migrated dataset, the current round of migrated dataset comprising at least one image sample, the current round of migrated dataset being a dataset of a source scene for a next round of scene migration or a dataset of the target migrated scene.
[0035] Thus, each time scene migration is performed, a target scene with the highest similarity to the current round of source scene is selected from target scenes that have not been subjected to scene migration, so that the similarity between the two scenes for each round of scene migration is the highest and the difference is the smallest, thereby improving the data quality of the dataset of the migrated scene, and further realizing generation of a dataset that is difficult to obtain or has a high acquisition cost through iterative migration of a large amount of easily collected data. In addition, the similarity between the two scenes for each round of scene migration is the highest and the difference is the smallest, which reduces the difficulty of each round of scene migration, and further reduces the complexity of iterative migration and improves the efficiency of iterative migration.
[0036] In a possible implementation, the third similarity value between the target source scene and each first target scene is obtained, comprising:
[0037] For any first target scene, input at least one second image sample in the target data set of any first target scene to the source perception model to obtain a predicted label set, the predicted label set including a second label corresponding to each second image sample in the at least one second image sample, the second label being used to represent the result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set;
[0038] Based on the first label of each second image sample in the at least one second image sample and the second label corresponding to each second image sample, a third similarity value corresponding to any first target scene is obtained.
[0039] In a possible implementation, based on the first label of each second image sample in the at least one second image sample and the second label corresponding to each second image sample, a third similarity value corresponding to any first target scene is obtained, including:
[0040] Using a plurality of similarity relationship functions, a similarity value between the first label of each second image sample and the second label corresponding to each second image sample is calculated respectively, wherein each similarity value corresponds to a similarity relationship function;
[0041] Based on the similarity value corresponding to each second image sample calculated by each similarity relationship function, a fourth similarity value corresponding to each similarity relationship function is obtained, the fourth similarity value being used to represent the similarity between the source scene and any first target scene;
[0042] From the plurality of fourth similarity values, the smallest one is selected as the third similarity value.
[0043] In a possible implementation, the third similarity value is multiple, and based on the third similarity value, a second target scene performing the current round of scene migration is selected from the first target scene, including:
[0044] The first target scene corresponding to the largest third similarity value is selected as the second target scene.
[0045] In a possible implementation, the first image sample in the source data set of the target source scene is migrated to the second target scene to obtain a current round of migration data set, including:
[0046] Using the method provided in the first aspect, at least one first image sample in the source data set of the target source scene is migrated to the second target scene to obtain a current round of migration data set.
[0047] In a possible implementation, after the iterative scene migration of the source scene and the plurality of target scenes obtains a target migration scene, further including:
[0048] The target perception model is obtained by training image samples in a data set of a target migration scene.
[0049] In a third aspect, an embodiment of the present application provides a scene migration device, the device comprising:
[0050] The acquisition module is configured to acquire a source data set of a source scene and a target data set of a target scene, the source data set comprising a first number of first image samples, the target data set comprising a second number of second image samples, the first number being greater than the second number, each image sample having a corresponding first label, the source scene and the target scene being scenes encountered during vehicle driving, the source scene having a higher occurrence frequency than the target scene;
[0051] The processing module is configured to input at least one second image sample in the target data set to the source perception model to obtain a predicted label set, the predicted label set comprising a second label corresponding to each second image sample in the at least one second image sample, the second label being used to represent a result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set;
[0052] The processing module is further configured to obtain a migration relationship model based on the at least one second image sample, the first label of each second image sample in the at least one second image sample, and the predicted label set, the migration relationship model being used to represent a migration relationship from the source scene to the target scene;
[0053] The processing module is further configured to input at least one first image sample in the source data set to the migration relationship model to obtain a first data set in which the at least one first image sample in the source data set is migrated to the target scene, the first data set comprising at least one migrated image sample;
[0054] The processing module is further configured to filter the migrated image samples in the first data set to obtain a migration data set, the migration data set comprising at least one migrated image sample, the migration data set being a data set of a scene formed by migration of the source scene to the target scene.
[0055] In a possible implementation, the acquisition module is further configured to:
[0056] The target deviation value between the first label of each second image sample and the second label corresponding to each second image sample is obtained, the target deviation value being used to represent a similarity between the first label and the second label;
[0057] Based on each second image sample and the target deviation value, a second data set is constructed, the image samples in the second data set being each second image sample, and the label of the image sample in the second data set being the target deviation value corresponding to each second image sample;
[0058] The image samples in the second data set are trained to obtain a migration relationship model.
[0059] In a possible implementation, the obtaining module is further configured to:
[0060] The similarity values between the first labels of each second image sample and the second labels corresponding to each second image sample are respectively calculated by using a plurality of similarity relationship functions, wherein each similarity value corresponds to a similarity relationship function;
[0061] The first similarity degree values corresponding to each similarity relationship function are obtained based on the similarity values corresponding to each second image sample calculated by using each similarity relationship function, and the first similarity degree values are used to represent the similarity between the source scene and the target scene.
[0062] The similarity relationship function corresponding to the smallest first similarity degree value is selected from the plurality of first similarity degree values as a target similarity relationship function.
[0063] The similarity value of each second image sample calculated by using the target similarity relationship function is used as the target deviation value corresponding to each second image sample.
[0064] In a possible implementation, the processing module is further configured to:
[0065] The second similarity degree values between at least one second image sample in the target data set and at least one migration image sample in the first data set are obtained, and the second similarity degree values are used to represent the similarity between the second image sample and the migration image sample.
[0066] The migration image samples in the first data set are screened based on the second similarity degree values to obtain a third data set.
[0067] The at least one second image sample in the target data set and the image samples in the third data set are collectively used as the image samples in a migration data set to obtain the migration data set.
[0068] In a possible implementation, the processing module is further configured to:
[0069] If the second similarity degree value is in the target range interval, the migration image sample is retained.
[0070] If the second similarity degree value is not in the target range interval, the migration image sample is removed.
[0071] In a possible implementation, the processing module is further configured to:
[0072] The image samples in the migration data set are trained to obtain a target perception model.
[0073] In a fourth aspect, an embodiment of the present application provides a scene migration device, the device comprising:
[0074] an acquisition module configured to acquire a source data set of a source scene and target data sets of a plurality of target scenes, the source data set comprising first image samples, each target data set comprising second image samples, the number of second image samples in each target data set being less than the number of first image samples in the source data set, each image sample having a corresponding first label, the source scene and the target scenes being scenes encountered by a vehicle during driving, the source scene having a higher occurrence frequency than the target scenes;
[0075] a processing module configured to perform iterative scene migration on the source scene and the plurality of target scenes to obtain a target migrated scene;
[0076] For each round of scene migration, the acquisition module is further configured to acquire a third similarity value between a target source scene and each first target scene, the target source scene being the migrated scene obtained in the previous round of scene migration or the source scene, the first target scene being a target scene that has not been subjected to scene migration, the third similarity value representing the similarity between the target source scene and the first target scene;
[0077] The processing module is further configured to select, based on the third similarity value, a second target scene from the first target scenes to perform the current round of scene migration, and migrate the first image samples in the source data set of the target source scene to the second target scene to obtain a current round of migration data set, the current round of migration data set comprising at least one image sample, the current round of migration data set being the data set of the source scene for the next round of scene migration or the data set of the target migrated scene.
[0078] In a possible implementation, the acquisition module is further configured to:
[0079] For any first target scene, input at least one second image sample in the target data set of the first target scene to the source perception model to obtain a predicted label set, the predicted label set comprising a second label corresponding to each second image sample in the at least one second image sample, the second label representing the result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set;
[0080] Based on the first label of each second image sample in the at least one second image sample and the second label corresponding to each second image sample, obtain a third similarity value corresponding to the first target scene.
[0081] In a possible implementation, the acquisition module is further configured to:
[0082] The similarity values between the first labels of each second image sample and the second labels corresponding to each second image sample are calculated using a plurality of similarity function, wherein each similarity value corresponds to a similarity function;
[0083] The fourth similarity values corresponding to each similarity function are obtained based on the similarity values corresponding to each second image sample calculated by each similarity function, and the fourth similarity values are used to represent the similarity between the source scene and any first target scene.
[0084] The smallest fourth similarity value is selected from the plurality of fourth similarity values as the third similarity value.
[0085] In a possible implementation, the third similarity value is multiple, and the processing module is further configured to:
[0086] The first target scene corresponding to the largest third similarity value is selected as the second target scene.
[0087] In a possible implementation, the processing module is further configured to:
[0088] The source data set of the target source scene is migrated to the second target scene by using the method provided in the first aspect, and a current migration data set is obtained.
[0089] In a possible implementation, the processing module is further configured to:
[0090] The image samples in the data set of the target migration scene are trained to obtain a target perception model.
[0091] In the fifth aspect, the embodiments of the present application provide a sample migration method, which comprises:
[0092] A source domain sample set and a target domain sample set are obtained, the source domain sample set comprises a first number of source samples, the target domain sample set comprises a second number of target samples, the first number is greater than the second number, and each sample has a corresponding sample label;
[0093] At least one target sample in the target domain sample set is input into a source domain perception model to obtain a predicted label set, the predicted label set comprises a predicted label corresponding to each target sample in the at least one target sample, the predicted label is used to represent the result of the source domain perception model identifying the target sample corresponding to the predicted label, and the source domain perception model is a model trained based on the source samples in the source domain sample set;
[0094] A migration relationship model is obtained based on the at least one target sample, the sample label of each target sample in the at least one target sample, and the predicted label set, and the migration relationship model is used to represent the migration relationship from the source domain sample set to the target domain sample set.
[0095] inputting the at least one source sample in the source domain sample set into the migration relationship model to obtain a first sample set in which the at least one source sample in the source domain sample set is migrated to the target domain sample set, the first sample set including at least one migration sample;
[0096] obtaining the migration sample set based on the at least one target sample in the target domain sample set and the first sample set.
[0097] Thus, the sample migration is performed based on the migration relationship between the source domain sample set and the target domain sample set, so that the sample migration can be performed purposefully each time, which is beneficial to ensuring the accuracy of the sample migration, improving the generalization capability of the sample migration learning, and ensuring the effect of the sample migration.
[0098] In a possible implementation, the migration relationship model is obtained based on the at least one target sample, a sample label of each target sample in the at least one target sample, and the predicted label set, and includes:
[0099] obtaining a target deviation value between the sample label of each target sample and the predicted label corresponding to each target sample;
[0100] constructing a second sample set based on each target sample and the target deviation value, the samples in the second sample set being each target sample, and the sample label of the samples in the second sample set being the target deviation value corresponding to each target sample;
[0101] training the samples in the second sample set to obtain the migration relationship model. Thus, the migration relationship from the source domain sample set to the target domain sample set is obtained.
[0102] In a possible implementation, the target deviation value between the sample label of each target sample and the predicted label corresponding to each target sample is obtained, and includes:
[0103] using a plurality of similarity relationship functions to respectively calculate a similarity value between the sample label of each target sample and the predicted label corresponding to each target sample, wherein each similarity value corresponds to a similarity relationship function;
[0104] obtaining a first similarity value corresponding to each similarity relationship function based on the similarity value corresponding to each target sample calculated by each similarity relationship function, the first similarity value being used to represent the similarity between the source domain sample set and the target domain sample set;
[0105] selecting, from the plurality of first similarity values, a similarity relationship function corresponding to a smallest first similarity value as a target similarity relationship function;
[0106] The similarity value of each target sample calculated by using the target similarity function is taken as the target bias value corresponding to each target sample. Thus, the target bias value between the sample label of each target sample in the target domain sample set and the predicted label corresponding to each target sample is obtained.
[0107] In a possible implementation, the migration sample set is obtained based on at least one target sample in the target domain sample set and the first sample set, and includes the following steps.
[0108] A second similarity value between the at least one target sample in the target domain sample set and at least one migration sample in the first sample set is obtained, and the second similarity value is used to represent the similarity between the target sample and the migration sample.
[0109] The migration samples in the first sample set are screened based on the second similarity value, and a third sample set is obtained.
[0110] The at least one target sample in the target domain sample set and the migration samples in the third sample set are collectively taken as samples in the migration sample set, so as to obtain the migration sample set. Thus, by using the active sample screening strategy, the samples with high similarity between the source domain sample set and the target domain sample set are maximally retained, the quality of the sample data after migration is improved, and the availability of the samples is maintained.
[0111] In a possible implementation, the migration samples in the first sample set are screened based on the second similarity value, and includes the following steps.
[0112] If the second similarity value is in the target range interval, the migration sample is retained.
[0113] If the second similarity value is not in the target range interval, the migration sample is removed. Thus, the screening of the migration sample is realized.
[0114] In a possible implementation, the migration sample set is obtained based on at least one target sample in the target domain sample set and the first sample set, and includes the following steps.
[0115] The at least one target sample in the target domain sample set and the migration samples in the first sample set are collectively taken as samples in the migration sample set, so as to obtain the migration sample set. Thus, the migration sample set is obtained.
[0116] In a possible implementation, after the migration sample set is obtained based on at least one target sample in the target domain sample set and the first sample set, the following steps are further included.
[0117] The samples in the migration sample set are trained to obtain a target perception model. Thus, the target perception model is obtained to identify the corresponding scene.
[0118] In a sixth aspect, an embodiment of the present application provides a sample migration method, which includes the following steps.
[0119] obtain a source domain sample set and a plurality of target domain sample sets, the source domain sample set comprising source samples, each of the target domain sample sets comprising target samples, the number of target samples in each of the target domain sample sets being less than the number of source samples, each of the samples having a corresponding sample label;
[0120] perform iterative sample migration on the source domain sample set and the plurality of target domain sample sets to obtain a target migrated sample set;
[0121] In each round of sample migration, a third similarity value between a target source domain sample set and each first target domain sample set is obtained, the target source domain sample set being the migrated sample set obtained in the previous round of sample migration or the source domain sample set, the first target domain sample set being a target domain sample set that has not undergone sample migration, the third similarity value representing the similarity between the target source domain sample set and the first target domain sample set;
[0122] Based on the third similarity value, a second target domain sample set is selected from the first target domain sample set for performing sample migration in the current round;
[0123] The source samples in the target source domain sample set are migrated to the second target domain sample set to obtain a current round of migrated sample set, the current round of migrated sample set being the source domain sample set for the next round of sample migration or the target migrated sample set.
[0124] Thus, in each round of sample migration, a target domain sample set with the highest similarity to the current round of source domain sample set is selected from the target domain sample sets that have not undergone sample migration for sample migration, so that the similarity between the two sample sets in each round of sample migration is the highest and the difference is the smallest, thereby improving the quality of the migrated sample data, and further realizing the generation of a data set that is difficult to obtain or has a high acquisition cost by iterative migration of a large amount of easily collected data. In addition, the similarity between the two sample sets in each round of sample migration is the highest and the difference is the smallest, which reduces the difficulty of each round of sample migration, thereby reducing the complexity of iterative sample migration and improving the efficiency of iterative sample migration.
[0125] In a possible implementation, obtaining the third similarity value between the target source domain sample set and each first target domain sample set comprises:
[0126] For any first target domain sample set, at least one target sample in the first target domain sample set is input into the source domain perception model to obtain a predicted label set, the predicted label set comprising a predicted label corresponding to each target sample in the at least one target sample, the predicted label representing the result of the source domain perception model identifying the target sample corresponding to the predicted label, the source domain perception model being a model trained based on the source samples in the source domain sample set;
[0127] Based on the sample label of each target sample in the at least one target sample and the predicted label corresponding to each target sample, a third similarity value corresponding to any first target domain sample set is obtained. In this way, the third similarity value corresponding to any first target domain sample set is obtained.
[0128] In a possible implementation, based on the sample label of each target sample in the at least one target sample and the predicted label corresponding to each target sample, a third similarity value corresponding to any first target domain sample set is obtained, including:
[0129] Using a plurality of similarity relationship functions, the similarity value between the sample label of each target sample and the predicted label corresponding to each target sample is calculated respectively, wherein each similarity value corresponds to a similarity relationship function;
[0130] Based on the similarity value corresponding to each target sample calculated by each similarity relationship function, a fourth similarity value corresponding to each similarity relationship function is obtained, and the fourth similarity value is used to represent the similarity between the source domain sample set and any first target domain sample set;
[0131] From the plurality of fourth similarity values, the smallest fourth similarity value is selected as the third similarity value. In this way, the similarity value between each target domain sample set and the source domain sample set is obtained.
[0132] In a possible implementation, the third similarity value is multiple, and based on the third similarity value, a second target domain sample set performing sample migration in the current round is selected from the first target domain sample set, including:
[0133] The first target domain sample set corresponding to the largest third similarity value is selected as the second target domain sample set. In this way, the second target domain sample set is selected.
[0134] In a possible implementation, the source sample in the target source domain sample set is migrated to the second target domain sample set to obtain a sample set migrated in the current round, including:
[0135] Using the method provided in the first aspect, the source sample in the target source domain sample set is migrated to the second target domain sample set to obtain a sample set migrated in the current round. In this way, the migration of the target source domain sample set to the second target domain sample set is realized.
[0136] In a possible implementation, after the iterative sample migration is performed on the source domain sample set and the plurality of target domain sample sets to obtain a target migration sample set, the method further includes:
[0137] The samples in the target migration sample set are trained to obtain a target perception model. In this way, the target perception model is obtained to identify extreme or rare scenes.
[0138] In a possible implementation, the source samples in the source domain sample set are image samples collected by the vehicle in a first driving scene, and the target samples in the target domain sample set are image samples collected by the vehicle in a second driving scene, where different target domain sample sets correspond to different second driving scenes, and the first driving scene occurs more frequently than the second driving scene.
[0139] In a seventh aspect, an embodiment of the present application provides a sample migration device, the device comprising:
[0140] The acquisition module is configured to acquire a source domain sample set and a target domain sample set, the source domain sample set comprising a first number of source samples, the target domain sample set comprising a second number of target samples, the first number being greater than the second number, and each sample having a corresponding sample label;
[0141] The processing module is configured to input at least one target sample in the target domain sample set into a source domain perception model to obtain a predicted label set, the predicted label set comprising a predicted label corresponding to each target sample in the at least one target sample, the predicted label being used to represent a result of identifying the target sample corresponding to the predicted label by the source domain perception model, and the source domain perception model being a model trained based on the source samples in the source domain sample set;
[0142] The processing module is further configured to obtain a migration relationship model based on the at least one target sample, the sample label of each target sample in the at least one target sample, and the predicted label set, the migration relationship model being used to represent a migration relationship from the source domain sample set to the target domain sample set;
[0143] The processing module is further configured to input at least one source sample in the source domain sample set into the migration relationship model to obtain a first sample set in which at least one source sample in the source domain sample set is migrated to the target domain sample set, the first sample set comprising at least one migration sample;
[0144] The processing module is further configured to obtain a migration sample set based on the at least one target sample in the target domain sample set and the first sample set.
[0145] In a possible implementation, the acquisition module is further configured to:
[0146] Obtain a target deviation value between the sample label of each target sample and the predicted label corresponding to each target sample;
[0147] Construct a second sample set based on each target sample and the target deviation value, the samples in the second sample set being each target sample, and the sample label of the samples in the second sample set being the target deviation value corresponding to each target sample;
[0148] Train the samples in the second sample set to obtain the migration relationship model.
[0149] In a possible implementation, the obtaining module is further configured to:
[0150] The similarity values between the sample labels of each target sample and the corresponding predicted labels of each target sample are respectively calculated by using a plurality of similarity relationship functions, wherein each similarity value corresponds to a similarity relationship function;
[0151] The first similarity degree value corresponding to each similarity relationship function is obtained based on the similarity value corresponding to each target sample calculated by using each similarity relationship function, and the first similarity degree value is used to represent the similarity between the source domain sample set and the target domain sample set;
[0152] The similarity relationship function corresponding to the minimum first similarity degree value is selected as the target similarity relationship function from the plurality of first similarity degree values;
[0153] The similarity value of each target sample calculated by using the target similarity relationship function is used as the target deviation value corresponding to each target sample.
[0154] In a possible implementation, the processing module is further configured to:
[0155] A second similarity degree value between at least one target sample in the target domain sample set and at least one transfer sample in the first sample set is obtained, and the second similarity degree value is used to represent the similarity between the target sample and the transfer sample;
[0156] The transfer samples in the first sample set are screened based on the second similarity degree value, and a third sample set is obtained;
[0157] At least one target sample in the target domain sample set and the transfer samples in the third sample set are collectively used as samples in a transfer sample set, so as to obtain the transfer sample set.
[0158] In a possible implementation, the processing module is further configured to:
[0159] If the second similarity degree value is in the target range interval, the transfer sample is retained;
[0160] If the second similarity degree value is not in the target range interval, the transfer sample is removed.
[0161] In a possible implementation, the processing module is further configured to:
[0162] At least one target sample in the target domain sample set and the transfer samples in the first sample set are collectively used as samples in a transfer sample set, so as to obtain the transfer sample set.
[0163] In a possible implementation, the processing module is further configured to:
[0164] The target perception model is obtained by training samples in the migration sample set.
[0165] In an eighth aspect, an embodiment of the present application provides a sample migration device, the device comprising:
[0166] The acquisition module is configured to acquire a source domain sample set and a plurality of target domain sample sets, the source domain sample set comprising source samples, each target domain sample set comprising target samples, the number of target samples in each target domain sample set being less than the number of source samples, and each sample having a corresponding sample label.
[0167] The processing module is configured to perform iterative sample migration on the source domain sample set and the plurality of target domain sample sets to obtain a target migration sample set.
[0168] For each round of sample migration, the acquisition module is further configured to acquire a third similarity value between a target source domain sample set and each first target domain sample set, the target source domain sample set being the migration sample set obtained in the last round of sample migration or the source domain sample set, the first target domain sample set being a target domain sample set that has not undergone sample migration, and the third similarity value being used to represent the similarity between the target source domain sample set and the first target domain sample set.
[0169] The acquisition module is further configured to: based on the third similarity value, select a second target domain sample set from the first target domain sample set for performing the current round of sample migration; and migrate the source samples in the target source domain sample set to the second target domain sample set to obtain a current round migration sample set, the current round migration sample set being the source domain sample set for the next round of sample migration or the target migration sample set.
[0170] In a possible implementation, the acquisition module is further configured to:
[0171] For any first target domain sample set, at least one target sample in the first target domain sample set is input into the source domain perception model to obtain a predicted label set, the predicted label set comprising a predicted label corresponding to each target sample in the at least one target sample, the predicted label being used to represent the result of the source domain perception model identifying the target sample corresponding to the predicted label, and the source domain perception model being a model trained based on the source samples in the source domain sample set.
[0172] Based on the sample label of each target sample in the at least one target sample and the predicted label corresponding to each target sample, a third similarity value corresponding to any first target domain sample set is obtained.
[0173] In a possible implementation, the acquisition module is further configured to:
[0174] The similarity values between the sample labels of each target sample and the corresponding predicted labels of each target sample are calculated by using a plurality of similarity function, wherein each similarity value corresponds to a similarity function.
[0175] The fourth similarity values corresponding to each similarity function are obtained based on the similarity values corresponding to each target sample calculated by each similarity function, and the fourth similarity values are used to represent the similarity between the source domain sample set and any first target domain sample set.
[0176] The smallest fourth similarity value is selected from the plurality of fourth similarity values as the third similarity value.
[0177] In a possible implementation, the third similarity value is multiple, and the processing module is further configured to:
[0178] The first target domain sample set corresponding to the largest third similarity value is selected as the second target domain sample set.
[0179] In a possible implementation, the processing module is further configured to:
[0180] The source samples in the target source domain sample set are migrated to the second target domain sample set by using the method provided in the first aspect to obtain a migrated sample set.
[0181] In a possible implementation, the processing module is further configured to:
[0182] The target perception model is obtained by training the samples in the target migrated sample set.
[0183] In a possible implementation, the source samples in the source domain sample set are image samples collected by a vehicle in a first driving scene, and the target samples in the target domain sample set are image samples collected by the vehicle in a second driving scene, wherein different target domain sample sets correspond to different second driving scenes, and the frequency of the first driving scene is higher than that of the second driving scene.
[0184] In a ninth aspect, an embodiment of the present application provides an electronic device, comprising:
[0185] a memory configured to store a program;
[0186] a processor configured to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is configured to execute the method provided in the above aspects.
[0187] In a tenth aspect, an embodiment of the present application provides a computer storage medium, and the computer storage medium stores instructions, when the instructions are run on a computer, the computer is caused to execute the method provided in the above aspects.
[0188] In a eleventh aspect, an embodiment of the present application provides a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the method provided in any of the aspects above.
[0189] In a twelfth aspect, an embodiment of the present application provides a chip, comprising at least one processor and an interface;
[0190] the interface is configured to provide program instructions or data for the at least one processor;
[0191] The at least one processor is configured to execute program instructions to implement the method provided in any of the aspects above. BRIEF DESCRIPTION OF DRAWINGS
[0192] Figure 1 is a schematic diagram of an iterative transfer learning framework provided by an embodiment of the present application;
[0193] Figure 2 is a schematic diagram of a system architecture of a one-round scene transfer process provided by an embodiment of the present application;
[0194] Figure 3 is a schematic diagram of a screening strategy provided by an embodiment of the present application;
[0195] Figure 4 is a flowchart of a scene transfer method provided by an embodiment of the present application;
[0196] Figure 5 is a schematic diagram of a step of determining a transfer relationship model provided by an embodiment of the present application;
[0197] Figure 6 is a schematic diagram of a step of image sample screening provided by an embodiment of the present application;
[0198] Figure 7 is a schematic diagram of a step of obtaining a target deviation value between a first label of each second image sample and a second label corresponding to each second image sample provided by an embodiment of the present application;
[0199] Figure 8 is a flowchart of another scene transfer method provided by an embodiment of the present application;
[0200] Figure 9 is a schematic diagram of a step of a one-round scene transfer method provided by an embodiment of the present application;
[0201] Figure 10 is a schematic diagram of a step of obtaining a third similarity value between a target source scene and each first target scene provided by an embodiment of the present application;
[0202] Figure 11is a step schematic diagram for determining a third similarity value corresponding to any first target scene provided by an embodiment of the present application.
[0203] Figure 12 is a structural schematic diagram of a scene migration device provided by an embodiment of the present application.
[0204] Figure 13 is a structural schematic diagram of another scene migration device provided by an embodiment of the present application.
[0205] Figure 14 is a structural schematic diagram of an electronic device provided by an embodiment of the present application.
[0206] Figure 15 is a structural schematic diagram of a chip provided by an embodiment of the present application. DETAILED DESCRIPTION
[0207] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below with reference to the drawings.
[0208] In the description of the embodiments of the present application, the words “exemplary”, “for example”, or “for instance” are used to mean serving as an example, instance or illustration. Any embodiment or design solution described as “exemplary”, “for example” or “for instance” in the embodiments of the present application should not be interpreted as being more preferred or having more advantages than other embodiments or design solutions. In fact, the words “exemplary”, “for example” or “for instance” are used to present related concepts in a specific manner.
[0209] In the description of the embodiments of the present application, the term “and / or” is merely used to describe an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, B alone and A and B simultaneously. In addition, unless otherwise specified, the term “multiple” means two or more. For example, multiple systems mean two or more systems, and multiple terminals mean two or more terminals.
[0210] In addition, the terms “first” and “second” are used for description purposes only and should not be interpreted or implied to indicate or suggest relative importance or implicitly indicate the indicated technical features. Therefore, the features defined with “first” and “second” can explicitly or implicitly include one or more features. The terms “include”, “contain”, “have” and their variants mean “include but are not limited to”, unless otherwise specifically emphasized.
[0211] First, the terms possibly involved in the present solution are explained and described.
[0212] (1) Source scene
[0213] The source scene can be a specific scene that an autonomous vehicle can encounter during driving, which is characterized by high frequency of occurrence of the scene and low cost of data collection. For example, a sunny daytime urban road scene.
[0214] (2) Source data set
[0215] The source data set can be a data set of image samples of the scene collected under the source scene. The source data set is characterized by a sufficient amount of data in the data set, which can be used to train an AI perception model for recognizing the source scene, and then to recognize the source scene.
[0216] (3) Target scene
[0217] The target scene can be a specific scene that an autonomous vehicle can encounter during driving, which is characterized by low frequency of occurrence of the scene, belongs to an extreme and rare scene, and has a high data collection cost or a high risk level. For example, a thunderstorm night highway scene.
[0218] (4) Target data set
[0219] The target data set can be a scene data set collected under the target scene. The data in the target data set is characterized by a low frequency of occurrence of the scene, a high cost of collection, and a high risk level of collecting data, so that only a small amount of data can be collected. The amount of data in the data set is insufficient to train an AI perception model for recognizing the target scene, and to recognize the target scene.
[0220] (5) Image sample
[0221] The image sample can be data in the source data set or the target data set. In this scheme, the image sample can be a picture.
[0222] Figure 1 A schematic diagram of an iterative transfer learning framework provided for the application embodiment. As shown in Figure 1 The iterative transfer learning framework can start from a source scene 1, go through multiple scene transfer learning, and finally obtain a transfer data set, wherein the transfer data set is a data set of the scene formed after the scene transfer, and the transfer data set includes at least one image sample. The source scene 1 can be one, and the target scene can be n, n being a positive integer greater than 0.
[0223] In each round of scene migration, the source scene is the scene obtained by the last round of scene migration, and the target scene is the scene with the highest similarity to the source scene in the current round. For example, in the first round of scene migration, the source scene can be selected as source scene 1, and target scene 1 is the target scene with the highest similarity to source scene 1 in n target scenes; in the second round of scene migration, the source scene is the scene formed after source scene 1 is migrated to target scene 1, and target scene 2 is the target scene with the highest similarity to the current source scene (i.e., source scene 2) in n target scenes. It can be understood that target scene 1 can be excluded when determining target scene 2; in the n th round of scene migration, the source scene is the scene formed by the (n-1) th round of migration, and target scene n is the remaining one of the n target scenes that has not been migrated; the scene formed by the last round of scene migration is the target migration scene obtained by the iterative migration learning. Thus, a large amount of easily collected data is iteratively migrated to generate a data set of a target migration scene that is difficult to obtain or has a high acquisition cost.
[0224] For ease of understanding, the process of each round of scene migration in the iterative migration learning in the present scheme will be explained below by taking the first round of scene migration as an example.
[0225] It should be noted that in the present scheme, the source data set contained in the source scene is D so ={X so ,y so}, where X so may represent a source sample or a sample feature, etc. In the present scheme, the source sample can be an image sample; y so may represent the label of the source sample, where each source sample can have a sample label. In the present scheme, when the source sample is an image sample, the sample label is the image sample label of the image sample. The target data set contained in the target scene is D tr ={X tr ,y tr}, where X tr may represent a target sample or a sample feature, etc. In the present scheme, the target sample can also be an image sample; y tr may represent the label of the target sample, where each target sample can have a sample label. In the present scheme, when the target sample is also an image sample, the sample label is the image sample label of the image sample.
[0226] Figure 2 is a system architecture diagram of a one-round scene migration process provided by an embodiment of the present application. As shown in FIG. 1, the system architecture of the one-round scene migration process includes a source scene, a target scene, a source scene migration model, a target scene migration model, and a scene migration model. Figure 2As shown, the system architecture may include a pre-migration module 11, a migration relationship training module 12, a sample migration module 13, and a sample selection module 14. The process by which data from the source and / or target scene datasets sequentially flows through the pre-migration module 11, the migration relationship training module 12, the sample migration module 13, and the sample selection module 14 constitutes this round of scene migration. Each module in the system will be described in detail below.
[0227] (1) Pre-migration module
[0228] The pre-migration module 11 mainly determines the target scene with the highest similarity to the source scene from n target scenes before migrating the data (such as image samples) in the source dataset of the source scene to the target scene, where n is a positive integer greater than 0; and determines the similarity relationship function that can describe the similarity between the source scene and the target scene from multiple similarity relationship functions, so as to increase the data quality of the image sample data in subsequent iterative migrations.
[0229] In one example, after obtaining the source dataset of the source scene, the data (such as image samples) of the source dataset can be trained to obtain a source perception model, which can perform perception and recognition of the source scene. For example, artificial intelligence models such as deep convolutional neural networks can be used to train the data (such as image samples) of the source dataset of the source scene. It is understood that the pre-transfer module 11 can pre-train the data (such as image samples) of the source dataset of the source scene using artificial intelligence models such as deep convolutional neural networks to obtain the source perception model. Furthermore, the pre-transfer module 11 can also train the data (such as image samples) of the source dataset of the source scene in real time using artificial intelligence models such as deep convolutional neural networks to obtain the source perception model; for example, during iterative transfer, since the source scene is different each time, the data (such as image samples) of the source dataset of the current source scene can be trained in real time to obtain the required source perception model for that transfer.
[0230] After obtaining the source-aware model, the target dataset D of the target scene can be... tr ={X tr y tr Image sample X in} tr The data is partially or entirely input into the source sensing model; subsequently, the source sensing model can output each image sample X it has identified. tr The predicted label, which can represent the image sample X identified by the source-aware model. tr The result. Where each image sample X tr Each of these can correspond to a prediction label, and these prediction labels can form a prediction label set.
[0231] After obtaining the predicted label set, the similarity between the source scene and the target scene can be determined by the plurality of similarity relationship functions stored in the pre-migration module 11. In one example, the similarity degree can be generally described from three aspects, i.e., bias, scale, and hybrid, and therefore, the similarity relationship functions in the present scheme can include bias-type functions, scale-type functions, and hybrid-type functions. For example, the bias-type function can be h1(x) = F tr (x) - F so (x), the scale-type function can be h2(x) = F tr (x) / F so (x), and the hybrid-type function can be h3(x) = a1(F tr (x) - F so (x)) + a2(F tr (x) / F so (x), where F tr (x) can be y tr , i.e., the image sample label of the image sample in the target data set of the target scene, F S0 (x) can be the predicted label obtained by inputting the image sample corresponding to the image sample label represented by F tr (x) into the source perception model, and F SO (x) can be understood as the source perception model. It can be understood that the similarity relationship function can also be in other forms, such as h1(x) = a(F tr (x) - F so (x) + λ) β , and the like, which can be selected according to actual conditions and can achieve the same effect as the above functions, and are not limited herein.
[0232] It should be noted that when determining the similarity degree between the source scene and the target scene, a plurality of similarity relationship functions can be used to calculate the similarity value, such as the bias value, between the image sample label of each image sample in the target data set of the target scene and the predicted label corresponding to each second image sample in the target data set of the target scene. Then, the similarity value corresponding to each image sample calculated by each similarity relationship function is obtained. Finally, from the plurality of similarity values, the smallest similarity value is selected as the similarity value between the source scene and the target scene, which can represent the similarity between the source scene and the target scene. In this way, the similarity value between the source scene and each target scene is calculated respectively, i.e., the similarity values between the source scene and part or all of the target scenes are obtained, and then a target scene with the highest similarity to the source scene is selected as the target scene of the current scene migration.
[0233] The similarity between the source scene and a target scene is taken as an example to explain the present application.
[0234] The source perception model trained based on the image samples in the source data set of the source scene is F S0 The target data set of the target scene includes image samples X1, X2 and X3, the image sample label of X1 is Y1, the image sample label of X2 is Y2, and the image sample label of X3 is Y3. The image samples X1, X2 and X3 are input into the source perception model F SO , and the predicted labels obtained are F SO (X1), F S0 (X2) and F S0 (X3) respectively. Then, the similarity values between the image sample labels and the predicted labels of the corresponding image samples are calculated by using the similarity function.
[0235] If the similarity function is the similarity function h1(x) and h2(x) described above, the similarity values between the image sample label Y1 and the predicted label F S0 (X1), the similarity values between the image sample label Y2 and the predicted label F S0 (X2), and the similarity values between the image sample label Y3 and the predicted label F S0 (X3) can be calculated by using the similarity function h1(x) respectively, and the calculation results are: h1(X1) = Y1-F so (X1), h1(X2) = Y2-F so (X2), and h1(X3) = Y3-F so (X3).
[0236] Then, the similarity values between the image sample label Y1 and the predicted label F S0 (X1), the similarity values between the image sample label Y2 and the predicted label F S0 (X2), and the similarity values between the image sample label Y3 and the predicted label F S0 (X3) can be calculated by using the similarity function h2(x) respectively, and the calculation results are: h2(X1) = Y1-F SO (X1), h2(X2) = Y2-F SO (X2), and h2(X3) = Y3-F SO (X3).
[0237] After obtaining the similarity value between the image sample label and the predicted label of the corresponding image sample, the root mean square error and average value of the similarity values calculated by the same similarity function can be calculated, and the resulting value can be used as the similarity value between the source scene and the target scene calculated by the similarity function. For example, using the average value as the similarity value, the similarity value calculated by the similarity function h1(x) can be H1 = (h1(X1) + h1(X2) + h1(X3)) / 3; the similarity value calculated by the similarity function h2(x) can be H2 = (h2(X1) + h2(X2) + h3(X3)) / 3.
[0238] After obtaining the similarity value corresponding to each similarity function, the magnitudes of the various similarity values can be compared, and the smallest similarity value can be selected as the similarity value between the source scene and the target scene, thus obtaining the similarity value between the source scene and the target scene. For example, if H1 is greater than H2, then H2 is selected as the similarity value between the source scene and the target scene. In one example, the pre-transfer module 11 can also determine the optimal similarity relationship that can describe the similarity between the source scene and the target scene using the similarity values calculated by each similarity function. For example, the similarity function corresponding to the smallest calculated similarity value can be selected as the optimal similarity relationship to describe the similarity between the source scene and the target scene.
[0239] Understandably, the smaller the similarity value calculated by the similarity function, the better the similarity function can describe the similarity between the source scene and the target scene. For example, if the similarity functions stored in the pre-migration module 11 are the deviation function h1(x), the scaling function h2(x), and the hybrid function h3(x) described above, then the optimal similarity function describing the similarity between the source scene and the target scene can be: h(X) tr )=min{h1(X tr ), h2(X tr ), h3(X tr For example, if the similarity value calculated by h1(x) is H1, the similarity value calculated by h2(x) is H2, and the similarity value calculated by h3(x) is H3, then the optimal similarity relationship describing the similarity between the source scene and the target scene can be: h(x) = min{H1, H2, H3}, that is, the similarity relationship function corresponding to the smallest value among H1, H2, and H3 can describe the optimal similarity relationship between the source scene and the target scene.
[0240] (2) Transfer Relationship Training Module
[0241] After the pre-migration module 11 determines the target scene required for the current scene migration and the optimal similarity relationship between the target scene and the source scene, the migration relationship training module 12 can construct a second data set according to the optimal similarity relationship. The second data set can be D h = {X tr , h(X tr )}, X tr may represent an image sample in the target data set of the target scene, and h(X tr ) may represent a similarity value between the source scene and the target scene; wherein h(X tr ) can be understood as a sample label in the second data set, which is used to describe the similarity between the source scene and the target scene. Since the image samples in the second data set represent discrete sample points, they cannot completely describe the migration relationship from the source scene to the target scene, therefore, the image samples in the second data set can be used to train the migration relationship, and then obtain a migration relationship model, wherein the migration relationship model can be used to represent the migration relationship from the source scene to the target scene. In one example, Gaussian process model, neural network module, support vector machine, etc. can be used to train the image samples in the second data set.
[0242] For ease of understanding, the following examples are used to illustrate the construction of the migration data set.
[0243] The target data set of the target scene includes image samples X1, X2 and X3, and the optimal similarity relationship between the target scene and the source scene is the similarity relationship function h1(x) described above, then the second data set at this time can be D h = {X1, X2, X3, h1(X1), h1(X2), h1(X3)}. Wherein h1(X1) is the image sample label of image sample X1 in the second data set, h1(X2) is the image sample label of image sample X2 in the second data set, and h1(X3) is the image sample label of image sample X3 in the second data set. In one example, h1(X) can be understood as the similarity between image sample X and the image samples in the source data set of the source scene, which can represent the migration relationship between the image samples in the source data set of the source scene and the image sample X.
[0244] (3) Sample migration module
[0245] After the migration relationship model is trained by the migration relationship training module 12, the sample migration module 13 can input the image samples in the source data set of the source scene to the migration relationship model to obtain a first data set in which the image samples in the source data set of the source scene are migrated to the target scene, and the first data set can include at least one migrated image sample. For example, the source data set of the source scene is D so = {Xso , y so}, the migration relationship described by the migration relationship model from the source scene to the target scene can be represented as H(·), and the image samples in the source dataset of the source scene migrating to the target scene can obtain y tf = H -1 (X so ,f so (X so )), thus the first dataset of the image samples in the source dataset of the source scene migrating to the target scene can be obtained as D tf = { X so ,y tf}. Wherein, X so can be understood as the image sample in the first dataset, and y tf can be understood as the sample label of the image sample in the first dataset.
[0246] It can be understood that the migration of the image samples in the source dataset of the source scene to the target scene is essentially a high-dimensional mapping of the image samples in the source dataset of the source scene, wherein the mapping kernel function can be the kernel function of the Gaussian process model. Then a simple similarity relationship between the source scene and the target scene is constructed in the high-dimensional space, wherein the simple similarity relationship that makes the source scene and the target scene closest can be obtained by training the model. Then the high-dimensional space data is reflected into the target scene by reflection, thereby obtaining the picture set from the source scene to the target scene. In an example, the Gaussian process model can be used to train the simple similarity relationship that makes the source scene and the target scene closest.
[0247] (4) Sample screening module
[0248] After obtaining the first dataset from the source scene to the target scene by the migration module 13, the image samples in the first dataset and the image samples in the target dataset of the target scene can be used as the image samples in the migration dataset formed after the sample migration of this round. However, directly using the image samples in the first dataset may have the following problems:
[0249] a. Since the image samples in the source dataset and the image samples in the target dataset are highly nonlinear, and the image samples in the target dataset are sparse, the migration relationship obtained by training may not be completely accurate. As shown in FIG. 1, in the overlapping area of the image samples in the first dataset and the target dataset, the data of the image samples in the target dataset is small but has the highest credibility, while the data of the image samples in the first dataset is large but has relatively low credibility. A large amount of low-credibility data will drown out a small amount of real data, affecting the quality of the dataset. Figure 3
[0250] b. In the iterative transfer learning process, the irrelevant data with large difference will accumulate with the increase of the number of transfers, and the accumulated data will affect the training of the perception model in the training data set, and ultimately affect the effect of the iterative transfer learning. For reference Figure 3 In the non-overlapping region of the image samples in the first data set and the target data set, if the similarity between the image samples is too low, it means that the difference between the image samples in the source data set and the image samples in the target data set is large, and if no screening is performed, it may cause negative transfer.
[0251] In order to reduce the probability of the above two problems, in the present scheme, after obtaining the first data set of the source scene to the target scene through the transfer module 13, the image samples in the first data set can be screened through the sample screening module 14. In one example, the image samples in the first data set can be screened based on the similarity value between the image samples in the first data set and the image samples in the target data set. When the similarity value between the image sample in the first data set and the second image sample in the target data set is too large, the similarity between the image sample in the first data set and the second image sample in the target data set is too high at this time, and the two are highly overlapped, so at this time in order to avoid the occurrence of the above problem a, the corresponding image sample in the first data set can be removed. When the similarity value between the image sample in the first data set and the image sample in the target data set is too low, the similarity between the image sample in the first data set and the image sample in the target data set is too low at this time, and the credibility of the image sample in the first data set is low at this time, so at this time in order to avoid the occurrence of problem b, the corresponding image sample in the first data set can be removed. Exemplarily, the similarity value between the image sample in the first data set and the image sample in the target data set can be determined using the kernel function in the Gaussian process model, wherein the kernel function can be used to calculate the covariance between the image sample in the first data set and the image sample in the target data set. The greater the covariance, the higher the similarity between the two. In addition, other ways can also be used to determine the similarity value between the image sample in the first data set and the image sample in the target data set, such as Euclidean distance, or using clustering method to determine, etc., which are not limited herein.
[0252] In one example, the similarity value interval between the image sample in the first data set and the image sample in the target data set can be set, when the similarity value between the two is in the interval, the corresponding image sample in the first data set is retained, otherwise, the corresponding image sample in the first data set is removed. Exemplarily, for reference Figure 3 , k max may be used as the upper limit of screening, k min may be used as the lower limit of screening, and k min and kmax between the image samples in the other interval.
[0253] Exemplarily, the final migration obtained migration dataset can be D aug = D tf ∪ D tr , wherein D tf is the first dataset obtained by the sample migration module 13, and D tr is the target dataset.
[0254] It should be noted that after obtaining the final migration obtained migration dataset, the current scene migration ends, that is, the next round of scene migration can be started. The migration dataset obtained in the final migration in the current round is the source dataset of the source scene required for the next round of scene migration, that is, the migration dataset can be migrated from the source scene to the dataset of the scene formed by the target scene.
[0255] For ease of understanding, the scene iterative migration in the scheme is briefly introduced below by taking the driving scene of a vehicle in different weather conditions as an example.
[0256] The driving data collected by the vehicle in the sunny weather in the daytime is relatively safe, and the frequency of this scene is very high, so the cost of collecting the image samples in this scene is relatively low, and the number of image samples that can be collected is relatively sufficient, so the sunny weather in the daytime can be taken as the source scene, and the pictures collected by the vehicle in the sunny weather in the daytime can be taken as the image samples in the source dataset of the source scene. Other driving scenes, such as night, rainstorm, lightning, and the like, and the extreme and rare driving scene of night rainstorm plus lightning formed by the combination of these scenes, are relatively rare, so it is difficult to collect data of such extreme scenes, so the extreme scene can be taken as the target scene; and the pictures collected in the extreme scene can be taken as the image samples in the target dataset of the target scene. When the pictures in the dataset of the extreme scene (such as the scene of night rainstorm plus lightning) are obtained, the pictures in the sunny weather in the daytime can be migrated to the night scene first, then the pictures migrated to the night scene can be migrated to the rainstorm scene, and finally the pictures migrated to the rainstorm scene can be migrated to the lightning scene, that is, the driving scene of night rainstorm plus lightning can be obtained. The detailed process involved in each scene migration can be referred to the description in the above, which will not be described herein.
[0257] It can be understood that the above source scene and target scene can also be replaced by other scenes, at this time the source dataset and the target dataset are also the collection of data collected in the replaced scenes, and the image samples in the source dataset and the target dataset are the samples in the corresponding source dataset and target dataset, such as voice samples, video samples, and the like.
[0258] Next, a scenario migration method provided by the system architecture of the iterative transfer learning framework and / or the scenario transfer process shown in Figure 1 Figure 2 Next, a scenario migration method provided by the system architecture of the iterative transfer learning framework and / or the scenario transfer process shown in
[0259] Figure 4 is a flowchart of a scenario migration method provided by an embodiment of the present application. It can be understood that the method can be executed by any device, equipment, terminal, platform, device cluster, etc. with computing and processing capabilities. As shown in Figure 4 The scenario migration method at least includes the following steps:
[0260] In step S101, a source data set of a source scene and a target data set of a target scene are obtained, the source data set includes a first number of first image samples, the target data set includes a second number of second image samples, the first number is greater than the second number, each image sample has a corresponding first label, the source scene and the target scene are scenes encountered during vehicle driving, and the occurrence frequency of the source scene is higher than that of the target scene.
[0261] The first label possessed by each image sample can be understood as a sample label of each image sample, which can indicate what the corresponding image sample is. The source data set of the source scene and the target data set of the target scene can be pre-collected and stored in a storage device. When the source data set and the target data set are needed, they can be retrieved from the storage device. The storage device can be a server, a hard disk, or any other device with storage function.
[0262] In step S102, at least one second image sample in the target data set is input into a source perception model to obtain a predicted label set, the predicted label set includes a second label corresponding to each second image sample in the at least one second image sample, the second label is used to represent the result of the source perception model identifying the second image sample corresponding to the second label, and the source perception model is a model trained based on the first image samples in the source data set.
[0263] Specifically, the first image samples in the source data set of the source scene can be trained by using an artificial intelligence model such as a deep neural network through the pre-migration module 11 described above to obtain the source perception model. Then, part or all of the second image samples in the target data set of the target scene can be input into the source perception model to obtain the predicted label set. The predicted label set includes a second label corresponding to each second image sample in the at least one second image sample, and the second label is used to represent the result of the source perception model identifying the second image sample corresponding to the second label. For details, please refer to the description of the pre-migration module 11 above, which will not be repeated here. It can be understood that the second label can be the predicted label described above.
[0264] Step S103, obtaining a transfer relationship model based on the at least one second image sample, the first label of each second image sample in the at least one second image sample, and the set of predicted labels, the transfer relationship model being used to represent a transfer relationship from the source scene to the target scene.
[0265] Specifically, the pre-transfer module 11 described above can be used to calculate the first label of each second image sample and the second label corresponding to the second image sample, and obtain the optimal similarity relationship between the similarity of the source scene and the target scene. Then, the second data set is obtained by using the transfer relationship training module 12 described above. Finally, the image samples in the second data set are trained by using the transfer relationship training module 12 described above to obtain the transfer relationship model, wherein the transfer relationship model can represent the transfer relationship from the source scene to the target scene.
[0266] As a possible implementation manner, as shown in Figure 5 the following steps are included:
[0267] Step S201, obtaining a target deviation value between the first label of each second image sample and the second label corresponding to each second image sample, the target deviation value being used to represent the similarity between the first label and the second label.
[0268] Specifically, the target deviation value can be understood as the similarity value between the picture label of the second image sample calculated based on the similarity relationship function described above and the predicted label corresponding to the second image sample. For details, refer to the description of the pre-transfer module 11 described above, which will not be repeated here.
[0269] Step S202, constructing a second data set based on each second image sample and the target deviation value, the image sample in the second data set being each second image sample, and the label of the image sample in the second data set being the target deviation value corresponding to each second image sample.
[0270] Specifically, in the second data set, the second image sample in the target data set can be used as the image sample thereof, and the target deviation value corresponding to the second image sample can be used as the sample label of the second image sample in the second data set. For details, refer to the description of the transfer relationship training module 12 described above, which will not be repeated here.
[0271] Step S203, training the image samples in the second data set to obtain a transfer relationship model.
[0272] Specifically, the image samples in the second data set can be trained by using, but not limited to, a Gaussian process model, a neural network module, a support vector machine, etc., to obtain the transfer relationship model.
[0273] Then, after obtaining the migration relationship model, the following steps can be performed.
[0274] In step S104, at least one first image sample in the source data set is input into the migration relationship model to obtain a first data set in which at least one first image sample in the source data set is migrated to the target scene, and the first data set includes at least one migrated image sample.
[0275] Specifically, after obtaining the migration relationship model, the first image sample in the source data set can be input into the migration relationship model to obtain a first data set in which the first image sample in the source data set is migrated to the target data set, and the first data set can include at least one migrated image sample. The first data set can be understood as the first data set D tf = {X so , y tf} described above. For example, this step can be performed by the sample migration module 13 described above.
[0276] In step S105, the migrated image samples in the first data set are screened to obtain a migration data set, and the migration data set includes at least one migrated image sample and is a data set of a scene formed by migration of the source scene to the target scene.
[0277] Specifically, after obtaining the first data set, the migrated image samples in the first data set can be screened to obtain a migration data set. The migration data set can include at least one migrated image sample, and the migration data set is a data set of a scene formed by migration of the source scene to the target scene.
[0278] As a possible implementation, at least one second image sample in the target data set and the migrated image samples in the first data set can be collectively used as image samples in the migration data set to obtain the migration data set.
[0279] As another possible implementation, the migrated image samples in the first data set can be screened to improve the data quality of the image samples in the migration data set. For example, Figure 6 As shown in the following steps:
[0280] In step S301, a second similarity value between at least one second image sample in the target data set and at least one migrated image sample in the first data set is obtained, and the second similarity value is used to represent the similarity between the second image sample and the migrated image sample.
[0281] Specifically, the similarity value between the transfer image sample in the first data set and the second image sample in the target data set can be determined using a kernel function in a Gaussian process model, where the kernel function can be used to calculate the covariance between the transfer image sample in the first data set and the second image sample in the target data set, and the greater the covariance, the higher the similarity between the two. In addition, other ways can also be used to determine the similarity value between the transfer image sample in the first data set and the second image sample in the target data set, such as Euclidean distance, etc., or using a clustering method to determine, etc. Wherein, the similarity value can represent the similarity between the second image sample and the transfer image sample.
[0282] Step S302, based on the second similarity value, the transfer image sample in the first data set is screened to obtain a third data set.
[0283] Specifically, after determining the second similarity value, the transfer image sample in the first data set can be screened based on the second similarity value to obtain a third data set. In one example, if the second similarity value is in the target range interval, the transfer image sample is retained; if the second similarity value is not in the target range interval, the transfer image sample is removed.
[0284] Step S303, at least one second image sample in the target data set and the image sample in the third data set are jointly used as the image sample in the transfer data set to obtain the transfer data set.
[0285] Specifically, after obtaining the third data set, the second image sample in the target data set and the transfer image sample in the third data set can be jointly used as the image sample in the transfer data set to obtain the transfer data set.
[0286] It can be understood that after obtaining the transfer data set, the image sample in the transfer data set can be trained using an artificial intelligence model such as a deep neural network to obtain a target perception model, and then the corresponding scene can be identified through the target perception model.
[0287] It can be understood that the scene transfer method in the present scheme can be realized by Figure 2 the pre-transfer module 11, the transfer relationship training module 12, the sample transfer module 13 and the sample screening module 14 shown in FIG. 1, and the implementation principle and process can be referred to the description above, which will not be repeated here.
[0288] It can be understood that in the scheme, different source scenes and / or target scenes can be constructed to build different migration relationships from the source scene to the corresponding target scene, and the migration of the image samples in the scene is realized based on the migration relationship, so that each scene migration can be purposeful, which is beneficial to guarantee the accuracy of the data of the image samples after the scene migration, and guarantees the effect of the scene migration.
[0289] In one example, as shown in Figure 7 the target deviation value between the first label of each second image sample and the second label corresponding to each second image sample can include the following steps:
[0290] Step S401, using a plurality of similarity relationship functions, respectively calculating the similarity value between the first label of each second image sample and the second label corresponding to each second image sample, wherein each similarity value corresponds to a similarity relationship function.
[0291] Step S402, based on the similarity value corresponding to each second image sample calculated by each similarity relationship function, obtaining the first similarity value corresponding to each similarity relationship function, and the first similarity value is used to represent the similarity between the source scene and the target scene.
[0292] Step S403, selecting the similarity relationship function corresponding to the minimum first similarity value from the plurality of first similarity values as the target similarity relationship function.
[0293] Step S404, taking the similarity value of each second image sample calculated by the target similarity relationship function as the target deviation value corresponding to each second image sample.
[0294] It should be noted that the implementation process and principle corresponding to steps S401-S404 can be referred to the description of the pre-migration module 11 in the above, which will not be repeated here.
[0295] Next, another scene migration method provided by the system architecture based on the iterative migration learning framework shown in Figure 1 and / or the scene migration process shown in Figure 2 is described.
[0296] Figure 8 is a flowchart of another scene migration method provided by the embodiment of the present application. It can be understood that the method can be executed by any device, equipment, terminal, platform, device cluster, etc. with computing and processing capability. As shown in Figure 8 the scene migration method includes at least the following steps:
[0297] Step S501: Obtain the source dataset of the source scene and the target dataset of multiple target scenes. The source dataset includes a first image sample, and each target dataset includes a second image sample. The number of second image samples in each target dataset is less than the number of first image samples in the source dataset. Each image sample has a corresponding first label. Both the source scene and the target scene are scenes encountered during vehicle driving. The occurrence frequency of the source scene is higher than that of the target scene.
[0298] In this context, the first label of each image sample can be understood as a sample label, indicating what the corresponding image sample is. Both the source dataset of the source scene and the target dataset of the target scene can be pre-collected and stored in a storage device. When the source dataset and target dataset are needed, they can be retrieved from the storage device. The storage device can be a server, hard drive, or other device with storage capabilities.
[0299] Step S502: Iteratively migrate the source scene and multiple target scenes to obtain the target migration scene.
[0300] Specifically, after obtaining the source dataset of the source scene and the target datasets of multiple target scenes, iterative scene migration can be performed on the source scene and the multiple target scenes to obtain the target migrated scene. In one example, iterative scene migration can be understood as follows: first, the image samples in the source dataset of the source scene are migrated to one of the target scenes to obtain the first migrated scene; then, the image samples in the dataset of the first migrated scene are migrated to another target scene to obtain the second migrated scene; then, the image samples in the dataset of the second migrated scene are migrated to yet another target scene to obtain the third migrated scene, and so on, until the target migrated scene is obtained.
[0301] In this solution, each round of scene migration can be carried out in the following ways, such as... Figure 9 As shown, it includes the following steps:
[0302] Step S5021: Obtain the third similarity value between the target source scene and each first target scene. The target source scene is the migrated scene or source scene obtained from the previous round of scene migration, and the first target scene is the target scene that has not undergone scene migration. The third similarity value is used to characterize the similarity between the target source scene and the first target scene.
[0303] As one possible implementation, such as Figure 10 As shown, it includes the following steps:
[0304] Step S601, for any first target scene, input at least one second image sample in the target data set of any first target scene to the source perception model to obtain a predicted label set, the predicted label set including a second label corresponding to each of the at least one second image sample, the second label being used to represent the result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set.
[0305] Specifically, at the beginning of each round of scene migration, the first image samples in the data set of the target source scene can be trained to obtain the source perception model. Then, at least one second image sample in the target data set of any one of the first target scenes is input into the source perception model, i.e., a predicted label set can be obtained. The predicted label set can include a second label corresponding to each of the at least one second image sample, and the second label can represent the result of the source perception model identifying the second image sample corresponding to the second label. For details, refer to the description of the pre-migration module 11 above, which will not be repeated here.
[0306] Step S602, based on the first label of each of the at least one second image sample and the second label corresponding to each second image sample, obtain a third similarity value corresponding to any first target scene.
[0307] Specifically, after obtaining the predicted label set, the third similarity value corresponding to any first target scene can be obtained based on the sample label (i.e., the first label) of the second image sample and the corresponding second label. For details, refer to the description of the pre-migration module 11 above, which will not be repeated here. It can be understood that repeating steps S601 to S602 can obtain the third similarity value between the target source scene and each first target scene.
[0308] Then, after obtaining the third similarity value between the target source scene and each first target scene, step S5022 can be performed.
[0309] Step S5022, based on the third similarity value, screening a second target scene from the first target scenes to perform the current round of scene migration.
[0310] Specifically, when the first target scenes are multiple, the third similarity values are also multiple, and at this time, the first target scene corresponding to the maximum third similarity value can be selected as the second target scene.
[0311] When the first target scene is one, the third similarity value is also one, and at this time, the first target scene is taken as the second target scene.
[0312] Step S5023, migrating the first image sample in the source data set of the target source scene to a second target scene to obtain a current round of migration data set, the current round of migration data set including at least one image sample, and the current round of migration data set being a data set of a next round of source scene migration or a data set of a target migration scene.
[0313] Specifically, the scene migration method provided above can be used to migrate the first image sample in the source data set of the target source scene to a second target scene to obtain a current round of migration data set. The current round of migration data set includes at least one image sample, and the current round of migration data set is a data set of a next round of source scene migration or a data set of a target migration scene. Figure 4
[0314] It can be understood that after obtaining the data set of the target migration scene, an artificial intelligence model such as a deep neural network can be used to train the image samples in the data set of the target migration scene to obtain a target perception model, and then the target perception model is used to identify extreme or rare scenes.
[0315] It can be understood that in this solution, each time the scene migration is performed, a target scene with the highest similarity to the current round of source scene is selected from the target scenes that have not been subjected to scene migration, so that the similarity between the two scenes subjected to scene migration each time is the highest and the difference is the smallest, thereby improving the data quality of the data set of the migrated scene, and further achieving the generation of a data set that is difficult to obtain or has a high acquisition cost through iterative migration of a large amount of easily collected data. In addition, the similarity between the two scenes subjected to scene migration each time is the highest and the difference is the smallest, which reduces the difficulty of each scene migration, thereby reducing the complexity of the iterative migration and improving the efficiency of the iterative migration.
[0316] In one example, as shown in Figure 11 Based on the first label of each second image sample and the second label corresponding to each second image sample, the third similarity value corresponding to any first target scene can include the following steps:
[0317] Step S701, using a plurality of similarity relationship functions to calculate the similarity value between the first label of each second image sample and the second label corresponding to each second image sample, wherein each similarity value corresponds to a similarity relationship function.
[0318] Step S702, based on the similarity value corresponding to each second image sample calculated by each similarity relationship function, obtaining a fourth similarity value corresponding to each similarity relationship function, and the fourth similarity value is used to represent the similarity between the source scene and any first target scene.
[0319] Step S703, selecting a minimum one of the plurality of fourth similarity values as a third similarity value.
[0320] It should be noted that the implementation process and principle corresponding to steps S701-S703 can be referred to the description of the pre-migration module 11 in the foregoing, and will not be repeated here.
[0321] In one example, the scene migration method provided in the present scheme can also be understood as a sample migration method. When understood as a sample migration method, the source data set of the source scene can be a source domain sample set, and the target data set of the target scene can be a target domain sample set; and the first image sample in the source data set can be a source sample in the source domain sample set, and the second image sample in the target data set can be a target sample in the target data set, wherein the source sample and the target sample can be image samples, voice samples, video samples, graphic samples, etc.; and the sample label of each image sample can be the sample label of each sample. In addition, the similarity between the source scene and the target scene can be understood as the similarity between the source domain sample set and the target domain sample set. It can be understood that the source domain sample set can describe a source scene, and the target domain sample set can describe a target scene, at this time, the source scene and the target scene can both not be limited to the scenes encountered in the vehicle driving process.
[0322] Based on the method in the above embodiment, the present embodiment further provides a scene migration device. Please refer to Figure 12 , Figure 12 is a structural schematic diagram of a scene migration device provided by the present embodiment, as Figure 12 shown, the scene migration device 1200 comprises:
[0323] The acquisition module 1201 is configured to acquire a source data set of a source scene and a target data set of a target scene, the source data set comprising a first number of first image samples, the target data set comprising a second number of second image samples, the first number being greater than the second number, each image sample having a corresponding first label, the source scene and the target scene both being scenes encountered in the vehicle driving process, the occurrence frequency of the source scene being higher than that of the target scene.
[0324] The processing module 1202 is configured to input at least one second image sample in the target data set into the source perception model to obtain a predicted label set, the predicted label set comprising a second label corresponding to each second image sample in the at least one second image sample, the second label being used to represent the result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set.
[0325] The processing module 1202 is further configured to obtain a migration relationship model based on the at least one second image sample, the first label of each second image sample in the at least one second image sample, and the set of predicted labels, where the migration relationship model is used to represent a migration relationship from the source scene to the target scene.
[0326] The processing module 1202 is further configured to input the at least one first image sample in the source data set into the migration relationship model to obtain a first data set in which the at least one first image sample in the source data set is migrated to the target scene, and the first data set includes at least one migrated image sample.
[0327] The processing module 1202 is further configured to filter the migrated image sample in the first data set to obtain a migration data set, where the migration data set includes at least one migrated image sample, and the migration data set is a data set of a scene formed by migration of the source scene to the target scene.
[0328] In a possible implementation, the obtaining module 1201 is further configured to:
[0329] Obtain a target deviation value between the first label of each second image sample and the second label corresponding to each second image sample, where the target deviation value is used to represent a similarity between the first label and the second label.
[0330] Based on each second image sample and the target deviation value, construct a second data set, where an image sample in the second data set is each second image sample, and a label of the image sample in the second data set is the target deviation value corresponding to each second image sample.
[0331] Train the image sample in the second data set to obtain the migration relationship model.
[0332] In a possible implementation, the obtaining module 1201 is further configured to:
[0333] Use a plurality of similarity relationship functions to respectively calculate a similarity value between the first label of each second image sample and the second label corresponding to each second image sample, where each similarity value corresponds to a similarity relationship function.
[0334] Based on the similarity value corresponding to each second image sample calculated by each similarity relationship function, obtain a first similarity value corresponding to each similarity relationship function, where the first similarity value is used to represent a similarity between the source scene and the target scene.
[0335] Select, from the plurality of first similarity values, a similarity relationship function corresponding to a smallest first similarity value as a target similarity relationship function.
[0336] Take the similarity value of each second image sample calculated by using the target similarity relationship function as the target deviation value corresponding to each second image sample.
[0337] In a possible implementation, the processing module 1202 is further configured to:
[0338] obtain a second similarity value between at least one second image sample in the target data set and at least one migration image sample in the first data set, the second similarity value being used to represent the similarity between the second image sample and the migration image sample;
[0339] based on the second similarity value, screening the migration image sample in the first data set to obtain a third data set;
[0340] collecting the at least one second image sample in the target data set and the image sample in the third data set as image samples in a migration data set to obtain the migration data set.
[0341] In a possible implementation, the processing module 1202 is further configured to:
[0342] if the second similarity value is in the target range interval, the migration image sample is retained;
[0343] if the second similarity value is not in the target range interval, the migration image sample is removed.
[0344] In a possible implementation, the processing module 1202 is further configured to:
[0345] training the image sample in the migration data set to obtain a target perception model.
[0346] It should be understood that the above apparatus is configured to execute the method in the above embodiments Figure 4 , the corresponding program modules in the apparatus have similar implementation principles and technical effects to those described in the above method, and the working process of the apparatus can refer to the corresponding process in the above method, which will not be described here.
[0347] Based on the method in the above embodiments, the embodiments of the present application further provide another scene migration apparatus. Please refer to Figure 13 , Figure 13 is a structural diagram of another scene migration apparatus provided by the embodiments of the present application, as shown in Figure 13 , the scene migration apparatus 1300 comprises:
[0348] The acquisition module 1301 is configured to acquire a source data set of a source scene and target data sets of a plurality of target scenes, the source data set comprising first image samples, each target data set comprising second image samples, the number of the second image samples in each target data set being less than the number of the first image samples in the source data set, each image sample having a corresponding first label, the source scene and the target scenes being scenes encountered by a vehicle during driving, the occurrence frequency of the source scene being higher than that of the target scenes.
[0349] The processing module 1302 is configured to perform iterative scene migration on the source scene and the plurality of target scenes to obtain a target migrated scene.
[0350] For each round of scene migration, the acquisition module 1301 is further configured to acquire a third similarity value between a target source scene and each first target scene, the target source scene being the migrated scene obtained in the last round of scene migration or the source scene, the first target scene being a target scene that has not been subjected to scene migration, and the third similarity value representing the similarity between the target source scene and the first target scene.
[0351] The processing module 1302 is further configured to filter, based on the third similarity value, a second target scene from the first target scenes for performing the current round of scene migration, and migrate the first image samples in the source data set of the target source scene to the second target scene to obtain a current round of migration data set, the current round of migration data set comprising at least one image sample, the current round of migration data set being the data set of the source scene for the next round of scene migration or the data set of the target migrated scene.
[0352] In a possible implementation, the acquisition module 1301 is further configured to:
[0353] For any first target scene, input at least one second image sample in the target data set of the first target scene to the source perception model to obtain a predicted label set, the predicted label set comprising a second label corresponding to each second image sample in the at least one second image sample, the second label representing a result of the source perception model identifying the second image sample corresponding to the second label, and the source perception model being a model trained based on the first image samples in the source data set.
[0354] Based on the first label of each second image sample in the at least one second image sample and the second label corresponding to each second image sample, obtain a third similarity value corresponding to any first target scene.
[0355] In a possible implementation, the acquisition module 1301 is further configured to:
[0356] The similarity values between the first label of each second image sample and the second label corresponding to each second image sample are calculated using multiple similarity relationship functions, wherein each similarity value corresponds to a similarity relationship function.
[0357] The fourth similarity values corresponding to each similarity relationship function are obtained based on the similarity values corresponding to each second image sample calculated by each similarity relationship function, and the fourth similarity values are used to represent the similarity between the source scene and any first target scene.
[0358] The smallest fourth similarity value is selected from the multiple fourth similarity values as the third similarity value.
[0359] In a possible implementation, the third similarity value is multiple, and the processing module 1302 is further configured to:
[0360] The first target scene corresponding to the largest third similarity value is selected as the second target scene.
[0361] In a possible implementation, the processing module 1302 is further configured to:
[0362] The source data set of the target source scene is migrated to the second target scene by using the method described above, to obtain a migrated data set of this round.
[0363] In a possible implementation, the processing module 1302 is further configured to:
[0364] The image samples in the data set of the target migration scene are trained to obtain a target perception model.
[0365] It should be understood that the apparatus described above is configured to execute the method in the above-described embodiments Figure 8 , the implementation principles and technical effects of the corresponding program modules in the apparatus are similar to those described in the above method, and the working process of the apparatus can refer to the corresponding process in the above method, which will not be described here.
[0366] The following describes an electronic device provided in an embodiment of the present application.
[0367] Figure 14 is a structural schematic diagram of an electronic device provided in an embodiment of the present application. As Figure 14 indicated, the electronic device provided in the embodiment of the present application can be used to implement the method described in the method embodiment.
[0368] The electronic device includes at least one processor 1401, which can support the electronic device to implement the method provided in the embodiment of the present application.
[0369] The processor 1401 can be a general-purpose processor or a special-purpose processor. For example, the processor 1401 may include a central processing unit (CPU) and / or a baseband processor. The baseband processor can be used to process communication data, while the CPU can be used to implement corresponding control and processing functions, execute software programs, and process data from the software programs.
[0370] Furthermore, the electronic device may also include a transceiver unit 1405 for receiving and transmitting signals. For example, the transceiver unit 1405 may include a transceiver or an RF chip. The transceiver unit 1405 may also include a communication interface.
[0371] Optionally, the electronic device may also include an antenna 1406, which can be used to support the transceiver unit 1405 in realizing the transceiver function of the electronic device.
[0372] Optionally, the electronic device may include one or more memories 1402 storing a program (or instructions or code) 1404. The program 1404 can be executed by a processor 1401, causing the processor 1401 to perform the methods described in the above method embodiments. Optionally, the memory 1402 may also store data. Optionally, the processor 1401 may also read data stored in the memory 1402, which may be stored at the same memory address as the program 1404, or it may be stored at a different memory address than the program 1404.
[0373] The processor 1401 and memory 1402 can be configured separately or integrated together, for example, integrated on a single board or system on a chip (SOC).
[0374] For a detailed description of the operations performed by the electronic device in the various possible designs described above, please refer to the description in the embodiments of the methods provided in this application, and will not be repeated here.
[0375] Based on the methods described in the above embodiments, this application also provides a chip. Please refer to... Figure 15 , Figure 15 This is a schematic diagram of a chip structure provided in an embodiment of this application. Figure 15 As shown, chip 1500 includes one or more processors 1501 and interface circuitry 1502. Optionally, chip 1500 may also include a bus 1503. Wherein:
[0376] The processor 1501 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware in the processor 1501 or the instruction in the form of software. The processor 1501 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method and step disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor.
[0377] The interface circuit 1502 can be used for sending or receiving data, instructions or information. The processor 1501 can process the data, instructions or other information received by the interface circuit 1502, and can send the processed information out through the interface circuit 1502.
[0378] Optionally, the chip further includes a memory, which can include a read-only memory and a random access memory, and provides operation instructions and data for the processor. Part of the memory can also include a non-volatile random access memory (NVRAM).
[0379] Optionally, the memory stores executable software modules or data structures, and the processor can execute corresponding operations by calling the operation instructions stored in the memory (which can be stored in an operating system).
[0380] Optionally, the interface circuit 1502 can be used to output the execution result of the processor 1501.
[0381] It should be noted that the functions of the processor 1501 and the interface circuit 1502 respectively can be realized by hardware design, software design or combination of hardware and software, which is not limited here.
[0382] It should be understood that each step of the above method embodiment can be completed by the logic circuit in the form of hardware or the instruction in the form of software in the processor.
[0383] It can be understood that the processor in the embodiments of the present application can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor.
[0384] The method steps in the embodiments of the present application can be realized by hardware or by the processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), a register, a hard disk, a mobile hard disk, a CD-ROM or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC.
[0385] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in or transmitted by a computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)) and the like.
[0386] It can be understood that various numerical numbers involved in the embodiments of the present application are only distinguished for convenience of description, and are not used to limit the scope of the embodiments of the present application.
Claims
1. A method of scene migration, the method comprising: The method comprises: obtaining a source data set of a source scene and a target data set of a target scene, the source data set comprising a first number of first image samples, the target data set comprising a second number of second image samples, the first number being greater than the second number, each image sample having a corresponding first label, the source scene and the target scene being scenes encountered during vehicle driving, the source scene having a higher occurrence frequency than the target scene; inputting at least one second image sample in the target data set into a source perception model to obtain a predicted label set, the predicted label set comprising a second label corresponding to each second image sample in the at least one second image sample, the second label being used to represent a result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set; obtaining a migration relationship model based on the at least one second image sample, the first label of each second image sample in the at least one second image sample, and the predicted label set, the migration relationship model being used to represent a migration relationship from the source scene to the target scene; inputting at least one first image sample in the source data set into the migration relationship model to obtain a first data set in which the at least one first image sample in the source data set is migrated to the target scene, the first data set comprising at least one migrated image sample; screening the migrated image samples in the first data set to obtain a migration data set, the migration data set comprising at least one migrated image sample, the migration data set being a data set of a scene formed by migration of the source scene to the target scene.
2. The method of claim 1, wherein, The method comprises: obtaining a target deviation value between the first label of each second image sample and the second label corresponding to each second image sample, the target deviation value being used to represent a similarity between the first label and the second label; based on each second image sample and the target deviation value, constructing a second data set, the image samples in the second data set being the each second image sample, and the labels of the image samples in the second data set being the target deviation value corresponding to the each second image sample; training the image samples in the second data set to obtain the migration relationship model.
3. The method of claim 2, wherein, The method comprises: using a plurality of similarity relationship functions to respectively calculate a similarity value between the first label of each second image sample and the second label corresponding to each second image sample, wherein each similarity value corresponds to a similarity relationship function. obtaining a first similarity value corresponding to each similarity function, the first similarity value being used to represent the similarity between the source scene and the target scene; selecting a similarity function corresponding to a minimum first similarity value from the plurality of first similarity values as a target similarity function; using the target similarity function to calculate the similarity value of each second image sample as a target bias value corresponding to each second image sample.
4. The method of claim 1, wherein, The screening of the transfer image samples in the first data set to obtain a transfer data set comprises: obtaining a second similarity value between at least one second image sample in the target data set and at least one transfer image sample in the first data set, the second similarity value being used to represent the similarity between the second image sample and the transfer image sample; screening the transfer image samples in the first data set based on the second similarity value to obtain a third data set; using at least one second image sample in the target data set and the image samples in the third data set as image samples in the transfer data set to obtain the transfer data set.
5. The method of claim 4, wherein, The screening of the transfer image samples in the first data set based on the second similarity value comprises: if the second similarity value is in a target range interval, the transfer image sample is retained; if the second similarity value is not in the target range interval, the transfer image sample is removed.
6. The method according to any one of claims 1 to 5, characterized in that, After the screening of the transfer image samples in the first data set to obtain the transfer data set, the method further comprises: training the image samples in the transfer data set to obtain a target perception model.
7. A method of scene migration, the method comprising: The method comprises: obtaining a source data set of a source scene and target data sets of a plurality of target scenes, the source data set comprising first image samples, each target data set comprising second image samples, the number of second image samples in each target data set being less than the number of first image samples in the source data set, each image sample having a corresponding first label, the source scene and the target scenes being scenes encountered during vehicle driving, the occurrence frequency of the source scene being higher than that of the target scenes; performing iterative scene transfer on the source scene and the plurality of target scenes to obtain a target transfer scene; wherein, for each round of scene transfer, obtaining a third similarity value between a target source scene and each first target scene, the target source scene being the transfer scene obtained in the last round of scene transfer or the source scene, the first target scene being a target scene that has not been subjected to scene transfer, the third similarity value being used to represent the similarity between the target source scene and the first target scene; based on the third similarity value, screening a second target scene from the first target scene for performing the current round of scene transfer; migrate the first image sample in the source data set of the target source scene to the second target scene to obtain a current round of migration data set, the current round of migration data set including at least one image sample, and the current round of migration data set being a data set of a next round of scene migration or a data set of the target migration scene.
8. The method of claim 7, wherein, The third similarity value between the target source scene and each first target scene is obtained by: For any first target scene, input at least one second image sample in a target data set of the any first target scene into a source perception model to obtain a predicted label set, the predicted label set including a second label corresponding to each second image sample in the at least one second image sample, the second label being used to represent a result of the source perception model identifying the second image sample corresponding to the second label, and the source perception model being a model trained based on the first image sample in the source data set; Based on the first label of each second image sample in the at least one second image sample and the second label corresponding to each second image sample, a third similarity value corresponding to the any first target scene is obtained.
9. The method of claim 8, wherein, The third similarity value corresponding to the any first target scene is obtained based on the first label of each second image sample in the at least one second image sample and the second label corresponding to each second image sample, including: Using a plurality of similarity relationship functions, a similarity value between the first label of each second image sample and the second label corresponding to each second image sample is calculated respectively, wherein each similarity value corresponds to a similarity relationship function; Based on the similarity value corresponding to each second image sample calculated by each similarity relationship function, a fourth similarity value corresponding to each similarity relationship function is obtained, and the fourth similarity value is used to represent similarity between the source scene and the any first target scene; From a plurality of fourth similarity values, a minimum fourth similarity value is selected as the third similarity value.
10. The method of claim 7, wherein, The third similarity value is multiple, and the second target scene performing the current round of scene migration is selected from the first target scene based on the third similarity value, including: The first target scene corresponding to the maximum third similarity value is selected as the second target scene.
11. The method according to any one of claims 7-10, characterized in that, The first image sample in the source data set of the target source scene is migrated to the second target scene to obtain a current round of migration data set, including: At least one first image sample in the source data set of the target source scene is migrated to the second target scene to obtain a current round of migration data set by using the method of any one of claims 1-6.
12. The method according to any one of claims 7-10, characterized in that, After the iterative scene migration of the source scene and a plurality of target scenes is performed to obtain a target migration scene, the method further includes: Training an image sample in a data set of the target migration scene to obtain a target perception model.
13. A scene migration apparatus characterized by comprising: The device includes: The acquisition module is configured to acquire a source data set of a source scene and a target data set of a target scene, the source data set including a first number of first image samples, the target data set including a second number of second image samples, the first number being greater than the second number, each image sample having a corresponding first label, the source scene and the target scene being scenes encountered by a vehicle during driving, the source scene having a higher occurrence frequency than the target scene; The processing module is configured to input at least one second image sample in the target data set into a source perception model to obtain a predicted label set, the predicted label set including a second label corresponding to each second image sample in the at least one second image sample, the second label being used to represent a result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set; The processing module is further configured to obtain a migration relationship model based on the at least one second image sample, the first label of each second image sample in the at least one second image sample, and the predicted label set, the migration relationship model being used to represent a migration relationship from the source scene to the target scene; The processing module is further configured to input at least one first image sample in the source data set into the migration relationship model to obtain a first data set in which the at least one first image sample in the source data set is migrated to the target scene, the first data set including at least one migrated image sample; The processing module is further configured to filter the migrated image samples in the first data set to obtain a migration data set, the migration data set including at least one migrated image sample, the migration data set being a data set of a scene formed by migration of the source scene to the target scene.
14. The apparatus of claim 13, wherein, The acquisition module is further configured to: obtain a target deviation value between the first label of each second image sample and the second label corresponding to each second image sample, the target deviation value being used to represent a similarity between the first label and the second label; construct a second data set based on each second image sample and the target deviation value, the image samples in the second data set being the each second image sample, and the labels of the image samples in the second data set being the target deviation value corresponding to the each second image sample; train the image samples in the second data set to obtain the migration relationship model.
15. The apparatus of claim 14, wherein, The acquisition module is further configured to: calculate a similarity value between the first label of each second image sample and the second label corresponding to each second image sample by using a plurality of similarity relationship functions, wherein each similarity value corresponds to a similarity relationship function; obtain a first similarity value corresponding to each similarity relationship function based on the similarity value corresponding to each second image sample calculated by each similarity relationship function, the first similarity value being used to represent a similarity between the source scene and the target scene; and obtain a second similarity value corresponding to each second image sample based on the first similarity value corresponding to each similarity relationship function and the target deviation value corresponding to each second image sample, the second similarity value being used to represent a similarity between the source scene and the target scene. select a similarity relation function corresponding to a minimum one of the first similarity values as a target similarity relation function; calculate a similarity value of each second image sample by using the target similarity relation function, and use the similarity value as a target bias value corresponding to the second image sample.
16. The apparatus of claim 13, wherein, The processing module is further configured to: obtain a second similarity value between at least one second image sample in the target data set and at least one migration image sample in the first data set, the second similarity value being used to represent similarity between the second image sample and the migration image sample; filter the migration image samples in the first data set based on the second similarity value to obtain a third data set; collect the at least one second image sample in the target data set and the image samples in the third data set as image samples in the migration data set to obtain the migration data set.
17. The apparatus of claim 16, wherein, The processing module is further configured to: if the second similarity value is in a target range interval, retain the migration image sample; if the second similarity value is not in the target range interval, discard the migration image sample.
18. The apparatus of any of claims 13-17, wherein, The processing module is further configured to: train the image samples in the migration data set to obtain a target perception model.
19. A scene migration apparatus characterized by comprising: The apparatus comprises: an acquisition module configured to acquire a source data set of a source scene and target data sets of multiple target scenes, the source data set comprising first image samples, each target data set comprising second image samples, the number of second image samples in each target data set being less than the number of first image samples in the source data set, each image sample having a corresponding first label, the source scene and the target scenes being scenes encountered during vehicle driving, the source scene having a higher occurrence frequency than the target scenes; a processing module configured to perform iterative scene migration on the source scene and the multiple target scenes to obtain a target migration scene; for each round of scene migration, the acquisition module is further configured to acquire third similarity values between a target source scene and each first target scene, the target source scene being the migration scene obtained in a previous round of scene migration or the source scene, the first target scene being a target scene that has not been subjected to scene migration, the third similarity values being used to represent similarity between the target source scene and the first target scene; the processing module is further configured to filter a second target scene for performing the current round of scene migration from the first target scenes based on the third similarity values, and migrate the first image samples in the source data set of the target source scene to the second target scene to obtain a current round of migration data set, the current round of migration data set comprising at least one image sample, the current round of migration data set being a data set of a next round of scene migration or a data set of the target migration scene.
20. The apparatus of claim 19, wherein, the acquisition module is further configured to: For any first target scene, input at least one second image sample in a target data set of the any first target scene to a source perception model to obtain a predicted label set, the predicted label set including a second label corresponding to each second image sample in the at least one second image sample, the second label used to represent a result of the source perception model identifying the second image sample corresponding to the second label, the source perception model being a model trained based on the first image samples in the source data set; Based on the first label of each second image sample in the at least one second image sample and the second label corresponding to each second image sample, a third similarity value corresponding to the any first target scene is obtained.
21. The apparatus of claim 20, wherein, The acquisition module is further configured to: Calculate a similarity value between the first label of each second image sample and the second label corresponding to each second image sample using a plurality of similarity relationship functions, wherein each similarity value corresponds to a similarity relationship function; Based on the similarity value corresponding to each second image sample calculated by each similarity relationship function, a fourth similarity value corresponding to each similarity relationship function is obtained, the fourth similarity value used to represent the similarity between the source scene and the any first target scene; Select a minimum fourth similarity value from a plurality of fourth similarity values as the third similarity value.
22. The apparatus of claim 19, wherein, The third similarity value is multiple, and the processing module is further configured to: Select a first target scene corresponding to a maximum third similarity value as the second target scene.
23. The apparatus of any of claims 19-22, wherein, The processing module is further configured to: Migrate at least one first image sample in the source data set of the target source scene to the second target scene using the method of any one of claims 1-6 to obtain a current migration data set.
24. The apparatus of any one of claims 19-22, wherein, The processing module is further configured to: Train the image samples in the data set of the target migration scene to obtain a target perception model.
25. An electronic device, comprising: Comprise: A memory for storing a program; A processor for executing the program stored in the memory, when the program stored in the memory is executed, the processor is configured to execute the method of any one of claims 1-12.
26. A computer storage medium having instructions stored therein, when the instructions are run on a computer, the computer is caused to execute the method of any one of claims 1-12.
27. A computer program product comprising instructions which, when executed on a computer, cause the computer to carry out the method of any one of claims 1-12.
28. A chip, characterized by Comprise at least one processor and an interface; The interface is configured to provide program instructions or data for the at least one processor; The at least one processor is configured to execute the program instructions to implement the method of any one of claims 1-12.
Citation Information
Patent Citations
A method and apparatus for training a prediction model for a target scene
CN109214436A
Crowd density determination method and device, storage medium and processor
CN112001274A