A cross-domain target detection model training method, target detection method and device

By building a domain discrimination module and a prospect perception module in the object detection model for adversarial training, the problem of weak generalization ability of the object detection model in the autonomous driving scenario is solved, the detection ability and generalization ability are improved, and the detection ability is realized in complex scenarios Good detection effect.

CN118570610BActive Publication Date: 2024-11-15UESTC (SHENZHEN) ADVANCED RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411001398.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-15
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

The existing target detection model has weak generalization capabilities in autonomous driving scenarios, resulting in poor detection effects of complex and changeable actual scenarios.

Method used

By constructing a domain discriminant module and the initial detection model for adversarial training, obtaining adversarial results, and using the foreground perception module to constrain, alternate training to obtain a cross-domain object detection model, improving the detection ability and generalization ability of the model.

Benefits of technology

The detection capability and generalization capability of the target detection model are improved, so that it can better adapt to complex and changeable actual scenarios in autonomous driving scenarios and achieve good detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570610B_ABST
    Figure CN118570610B_ABST
Patent Text Reader

Abstract

The present invention discloses a cross-domain target detection model training method, a target detection method and a device, which relate to the field of target detection technology, and solve the technical problems that the target detection model has weak generalization ability and poor detection effect in complex and changeable actual scenes under autonomous driving scenarios. The method comprises: training according to the domain training samples to obtain an initial detection model; constructing a domain discrimination module, performing adversarial training with the initial detection model through the domain discrimination module, and outputting adversarial results through the domain discrimination module; obtaining the foreground weight information of the domain training samples, applying the constraints of the foreground weight information to the adversarial results, and constructing a foreground perception module; alternately training the initial detection model through the domain discrimination module and the foreground perception module to obtain a cross-domain target detection model. The detection model of the present invention has strong generalization ability and good detection effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection technology, and in particular to a cross-domain target detection model training method, a target detection method and a device suitable for autonomous driving. Background Art

[0002] With the development of big data and computer technology, artificial intelligence technology has gradually emerged in people's vision, especially object detection technology has been widely used in various fields. In the field of transportation, object detection is a key link in realizing autonomous driving, which can liberate a large number of labor forces, alleviate traffic congestion pressure, improve traffic efficiency, and greatly improve public transportation safety.

[0003] Target detection is to find all the targets (objects) of interest in an image and determine their categories and location information. It is the main task in the autonomous driving scene. In the autonomous driving scene, the images of the vehicle during driving are captured by the on-board camera. It is necessary to confirm all the vehicles, pedestrians, riders and other information that appear in the camera images, and assist the autonomous driving system to make corresponding decisions based on the detection results. However, the environment in the autonomous driving scene is often more complex and highly dynamic. Different cars are equipped with different camera models, and the images produced have great differences in image quality and style. At the same time, the cameras carried by different cars are in different positions, and the pictures taken in the car are not uniform. Even if the position is the same, different cars have different sizes and structures, and the heights and viewing angles of the cameras are inconsistent, so the images produced also have differences in viewing angles. In addition, when the camera acquires images, there will be differences due to factors such as ambient brightness and climatic conditions.

[0004] Many factors cause various differences in the images taken by the camera in different scenes, and the neural network model will have data dependence on the training samples in the same scene. That is, the neural network model trained in one scene cannot be well used in other scenes, resulting in the final target detection model with weak generalization ability and poor detection effect in the face of complex and changeable actual scenes.

[0005] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0006] At present, the generalization ability of target detection models is weak, and the detection effect is poor when facing the complex and changeable actual scenes in autonomous driving scenarios. Summary of the invention

[0007] The purpose of the present invention is to provide a cross-domain target detection model training method, target detection method and device suitable for autonomous driving, so as to solve the technical problems that the target detection model in the prior art has weak generalization ability and poor detection effect in complex and changeable actual scenes under autonomous driving scenes. The many technical effects that can be produced by the preferred technical solutions among the many technical solutions provided by the present invention are described in detail below.

[0008] To achieve the above object, the present invention provides the following technical solutions:

[0009] The present invention provides a cross-domain target detection model training method suitable for autonomous driving, comprising the following steps: pre-processing domain data in a constructed autonomous driving scenario to obtain domain training samples; wherein the domain training samples include source domain training samples and target domain training samples; training is performed according to the domain training samples to obtain an initial detection model; constructing a domain discrimination module, performing adversarial training with the initial detection model through the domain discrimination module, and outputting an adversarial result through the domain discrimination module; obtaining foreground weight information of the domain training samples, applying foreground weight information constraints to the adversarial result, and constructing a foreground perception module; according to the source domain training samples and the target domain samples, alternately training the initial detection model through the domain discrimination module and the foreground perception module to obtain a cross-domain target detection model;

[0010] In the foreground perception module, the weight information of the foreground is obtained through the prediction output network of the initial detection model, and the weight information is the probability of foreground features appearing in the image; the adversarial result output by the domain discrimination module is multiplied by the weight information of the foreground to construct the foreground perception module;

[0011] In alternately training the initial detection model through the domain discrimination module and the foreground perception module according to the source domain training samples and the target domain samples, training the initial detection model according to the source domain training samples includes the following steps: inputting the source domain training samples into the initial detection model, and obtaining a training loss function after training the initial detection model. ; The source domain training sample outputs a first feature map after passing through the feature fusion network of the initial detection model; the first feature map passes through the domain discrimination module to obtain a first adversarial result, the first adversarial result is multiplied by the foreground weight information output by the prediction output network, and the first BCE loss function is calculated with the first domain label ; Wherein, the first domain label is the label of the source domain training sample; calculate the first total loss function , training the initial detection model according to the first total loss function.

[0012] In the process of alternately training the initial detection model through the domain discrimination module and the foreground perception module according to the source domain training samples and the target domain samples, the initial detection model is trained through the target domain training samples, including the following steps: inputting the target domain training samples into the initial detection model, and outputting a second feature map after passing through the feature fusion network; the second feature map passes through the domain discrimination module to obtain a second adversarial result, the second adversarial result is multiplied by the foreground weight information output by the prediction output network, and a second BCE loss function is calculated with the second domain label ; Wherein, the second domain label is the label of the target domain training sample; calculate the second total loss function , training the initial detection model according to the second total loss function.

[0013] Optionally, the initial detection model includes a feature extraction network, a feature fusion network and a prediction output network; the construction of the domain discrimination module, performing adversarial training with the initial detection model through the domain discrimination module, and the domain discrimination module outputs the adversarial result, includes the following steps: constructing the domain discrimination module; wherein the domain discrimination module includes a gradient reverse layer and a domain discriminator; the output of the feature fusion network is subjected to gradient back propagation through the gradient reverse layer to obtain a fused feature; after performing N convolution operations on the fused feature through the domain discriminator, the adversarial result is output.

[0014] Optionally, after the domain discriminator receives the fused features and performs N convolution operations on the fused features, the adversarial result is output, in which data dimension reduction is performed on the fused features through N convolution operations, and then the adversarial result is output through the fully connected layer of the domain discriminator through the Sigmoid function; the output range of the adversarial result is [0,1].

[0015] Optionally, in the alternate training of the initial detection model through the domain discrimination module and the foreground perception module based on the source domain training samples and the target domain samples, the domain discrimination module and the foreground perception module are discarded after the training is completed, and the obtained target detection model does not include the domain discrimination module and the foreground perception module.

[0016] Optionally, the preprocessing of the domain data in the constructed autonomous driving scenario includes: performing Mosaic data enhancement, random rotation, HSV data enhancement and / or random horizontal flipping processing on the domain data.

[0017] Optionally, a YOLOX network model is used as a basic neural network for training the initial detection model.

[0018] A cross-domain target detection method suitable for autonomous driving, comprising: obtaining the cross-domain target detection model through any of the above-mentioned cross-domain target detection model training methods suitable for autonomous driving, and performing target detection on cross-domain targets through the cross-domain target detection model.

[0019] A cross-domain target detection device suitable for autonomous driving, used to execute any of the above cross-domain target detection model training methods suitable for autonomous driving, comprising:

[0020] A target input module, used for inputting the domain training samples;

[0021] A feature extraction module, used to obtain the domain training samples and extract image features of the domain training samples;

[0022] A feature fusion module is used to obtain the image features for feature fusion and generate a fusion feature map;

[0023] A prediction output module is used to obtain the fused feature map and predict foreground weight information;

[0024] A domain discrimination module, used to obtain the fusion feature map, perform feature adversarial training with the prediction output module, and output adversarial results;

[0025] A foreground perception module, used for multiplying the foreground weight information with the confrontation result to obtain a final confrontation result;

[0026] A model training module is used to perform training according to the final adversarial result to obtain the target detection model;

[0027] The target detection module is used to perform target detection on cross-domain targets through the target detection model.

[0028] Implementing one of the above technical solutions of the present invention has the following advantages or beneficial effects:

[0029] The present invention improves the existing target detection model by designing two parts: feature adversarial and foreground perception. By constructing a domain discrimination module, it is used to perform adversarial training with the target detection model, thereby improving the detection capability and generalization capability of the target detection model during the adversarial training. The foreground perception part is then used to strengthen the feature adversarial. Through the weight constraint of foreground perception, the detection model pays more attention to the alignment of sample foregrounds when performing feature alignment, further optimizing the adversarial effect of the domain discrimination module, and improving the generalization capability of the model, so as to cope with the complex and changeable actual scenarios in autonomous driving scenarios and achieve good detection effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. It is obvious that the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0031] Figure 1 is a flow chart of a cross-domain target detection model training method applicable to autonomous driving according to Embodiment 1 of the present invention;

[0032] Figure 2 This is a flowchart of step S3 of a cross-domain target detection model training method applicable to autonomous driving according to the first embodiment of the present invention;

[0033] Figure 3 is a flow chart of training an initial detection model according to source domain training samples in Embodiment 1 of the present invention;

[0034] Figure 4 is a flow chart of training an initial detection model according to target domain training samples in Embodiment 1 of the present invention;

[0035] Figure 5 This is a structural block diagram of a cross-domain target detection device suitable for autonomous driving according to embodiment 3 of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solutions and advantages of the present invention clearer, the various exemplary embodiments to be described below will refer to the corresponding drawings, which constitute a part of the exemplary embodiments, wherein various exemplary embodiments that may be used to implement the present invention are described. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present disclosure. It should be understood that they are only examples of processes, methods, devices, etc. that are consistent with some aspects of the present disclosure as detailed in the attached claims, and other embodiments may also be used, or the embodiments listed herein may be modified in structure and function without departing from the scope and essence of the present invention.

[0037] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", etc. indicate the orientation or positional relationship based on the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the elements referred to must have a specific orientation, be constructed and operated in a specific orientation. The terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. The term "multiple" means two or more. The terms "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, an integral connection, a mechanical connection, an electrical connection, a communication connection, a direct connection, an indirect connection through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.

[0038] In order to illustrate the technical solution of the present invention, a specific embodiment is used below for description, and only the parts related to the embodiment of the present invention are shown.

[0039] Embodiment 1:

[0040] like Figure 1 As shown, the present invention provides a cross-domain target detection model training method suitable for autonomous driving, comprising the following steps:

[0041] S1. Preprocess the domain data under the constructed autonomous driving scenario to obtain domain training samples; wherein, the domain training samples include source domain training samples and target domain training samples; S2. Train according to the domain training samples to obtain an initial detection model; S3. Construct a domain discrimination module, conduct adversarial training with the initial detection model through the domain discrimination module, and the adversarial result is output by the domain discrimination module; S4. Obtain the foreground weight information of the domain training samples, impose constraints on the foreground weight information on the adversarial results, and construct a foreground perception module; S5. According to the source domain training samples and the target domain samples, the initial detection model is alternately trained through the domain discrimination module and the foreground perception module to obtain a cross-domain target detection model.

[0042] This embodiment improves the existing target detection model by designing two parts: feature adversarial and foreground perception. By constructing a domain discrimination module, it is used to perform adversarial training with the target detection model, thereby improving the detection capability and generalization capability of the target detection model in the adversarial training. The foreground perception part is then used to strengthen the feature adversarial. Through the weight constraint of foreground perception, the detection model pays more attention to the alignment of sample foregrounds when performing feature alignment, further optimizing the adversarial effect of the domain discrimination module, and improving the generalization capability of the model, so that it can cope with complex and changeable actual scenarios in autonomous driving scenarios and achieve good detection effects.

[0043] Next, combine Figure 1-Figure 4 The specific implementation steps of the cross-domain target detection model training method for autonomous driving provided in this embodiment are introduced in detail:

[0044] First, execute step S1, pre-process the domain data under the constructed autonomous driving scenario to obtain domain training samples; wherein, the domain training samples include source domain training samples and target domain training samples; the domain data include source domain data and target domain data; the source domain data contains image information and annotation information under the autonomous driving scenario, and the target domain data only contains image information under the autonomous driving scenario. The two are data sets with certain domain differences obtained by taking pictures from different vehicle-mounted positions, different models of cameras, and under different weather and other environmental factors. This embodiment is to achieve the condition that the target domain data does not contain annotation information, and improve the detection accuracy of the target detection model on the source domain data through the learning transfer method. After obtaining the collected domain data, pre-processing is required, that is, data enhancement processing is performed, including: Mosaic data enhancement, random rotation, HSV data enhancement and / or random horizontal flipping processing are performed on the domain data, and the domain training samples are obtained after processing. Mosaic data enhancement is to splice four images by random scaling, random cropping, and random arrangement; HSV data enhancement enhances the image by changing the hue, saturation, and brightness; the above preprocessing methods can improve the sample quality and are more conducive to model training.

[0045] Secondly, execute step S2, train according to the domain training samples, and obtain the initial detection model; wherein the initial detection model includes a feature extraction network, a feature fusion network, and a prediction output network; specifically, the YOLOX network model is used as the basic neural network for training the initial detection model. The YOLOX network adopts a lightweight network structure, which has obvious advantages in computing speed and has a faster detection speed under the same detection accuracy. The initial detection model obtained by training with domain training samples is the most basic target detection network with weak generalization ability, so it needs to be optimized.

[0046] Next, execute step S3, construct a domain discrimination module, perform adversarial training with the initial detection model through the domain discrimination module, and the domain discrimination module outputs the adversarial result; by constructing the domain discrimination module, adversarial training is performed with the initial detection model to improve the generalization ability of the detection model.

[0047] Specifically, Figure 2 As shown, step S3 includes the following steps: S31, constructing a domain discrimination module; wherein the domain discrimination module includes a gradient reverse layer and a domain discriminator; S32, the output of the feature fusion network passes through the gradient reverse layer for gradient back propagation to obtain fusion features; S33, after N convolution operations are performed on the fusion features through the domain discriminator, the adversarial result is output. In step S3, feature adversarial is realized by constructing a domain discrimination module through a gradient reverse layer and a domain discriminator. The gradient reverse layer is a layer in a neural network. When the input passes forward, no processing is performed on the input. When the gradient value is back propagated, all gradient values ​​passing through the layer are multiplied by -1 to achieve the reverse of the gradient.

[0048] The domain discriminator receives the fusion features transmitted by the gradient reverse layer, and performs data dimension reduction on the fusion features through N convolution operations. Preferably, this embodiment performs 3 3*3 convolution operations, and then passes through the fully connected layer of the domain discriminator, and outputs the domain training sample adversarial results through the Sigmoid function; the output range of the domain training sample adversarial results is [0,1]. Among them, the closer the output adversarial result is to 0, the more likely the image is to come from the source domain data; the closer the adversarial result is to 1, the more likely the image is to come from the target domain data.

[0049] The domain discrimination module is used to distinguish whether the image comes from the source domain or the target domain, so that the target detection model pays more attention to the unique features of the domain data, resulting in a large difference between the source domain and the target domain after the target detection model passes through the target detection model. Therefore, through the gradient reversal layer, all the gradient values ​​passed are multiplied by -1 for back propagation, so that the target detection model does not pay attention to the unique features of the domain data, but pays more attention to the features shared by the domain. Through the adversarial training of the target detection model and the domain discrimination module, a target detection model that pays more attention to the features shared by the domain is finally obtained. When extracting features, the target detection model pays more attention to the features shared by different domains, so the differences between different domains are reduced at the feature level, thereby improving the detection ability in cross-domain difference scenarios, and realizing the improvement of the detection ability and generalization ability of the detection model.

[0050] Then, execute step S4, obtain the foreground weight information of the domain training sample, impose the foreground weight information constraint on the adversarial result, and construct a foreground perception module; optimize the feature adversarial module by constructing the foreground perception module. In feature adversarial, there may be some irrelevant information such as background and texture that affects the effect of adversarial training. When aligning features, the contributions of foreground and background are different. When aligning features, more attention should be paid to positive sample information (i.e., foreground information) and the influence of negative sample information (i.e., background information) should be reduced; this embodiment optimizes the feature adversarial module by reducing the weight of background information during alignment.

[0051] In the foreground perception module, additional foreground weight information is added to the feature map of feature adversarial to optimize the feature adversarial module. The prediction result of the foreground is obtained from the prediction output network of the initial detection model. The prediction result is the probability of the foreground feature appearing in the image, that is, the weight information of the foreground. The discrimination result output by the domain discrimination module is multiplied by the weight information of the foreground to obtain the final adversarial result.

[0052] Next, step S5 is performed to alternately train the initial detection model through the domain discrimination module and the foreground perception module according to the source domain training samples and the target domain samples to obtain a cross-domain target detection model. Alternating the model through source domain samples and target domain samples can improve the detection capability of the model for target domain data when the target domain data does not contain annotation information.

[0053] Specifically, Figure 3 As shown, training the initial detection model according to the source domain training samples includes the following steps: S501, inputting the source domain training samples into the initial detection model, and obtaining the training loss function after the initial detection model is trained. ; S502, the source domain training sample is passed through the feature fusion network of the initial detection model to output the first feature map; S503, the first feature map is passed through the domain discrimination module to obtain the first adversarial result, the first adversarial result is multiplied with the foreground weight information output by the prediction output network of the initial detection model, and the first BCE loss function is calculated with the first domain label ; Wherein, the first domain label is the label of the source domain training sample; S504, calculate the first total loss function , the initial detection model is trained according to the first total loss function.

[0054] like Figure 4As shown, training the initial detection model through the target domain training samples includes the following steps: S511, inputting the target domain training samples into the initial detection model, and outputting the second feature map after passing through the feature fusion network; S512, the second feature map passes through the domain discrimination module to obtain the adversarial result, and the adversarial result is multiplied by the foreground weight information output by the prediction output network, and the second BCE loss function is calculated with the second domain label. ; Wherein, the second domain label is the label of the target domain training sample; S513, calculate the second total loss function , the initial detection model is trained according to the second total loss function.

[0055] As an optional implementation method, when the initial detection model is alternately trained by the domain discrimination module and the foreground perception module according to the source domain training samples and the target domain samples, the domain discrimination module and the foreground perception module are discarded after the training is completed, and the obtained target detection model does not include the domain discrimination module and the foreground perception module. In this embodiment, the target detection model is trained only by setting the domain discrimination module and the foreground perception module. After the training is completed, the domain discrimination module and the foreground perception module are discarded. The network structure of the target detection model is not adjusted. Only additional modules are introduced during training. In the testing and application stages, the target detection model with the original network structure is used. Therefore, no additional parameters and calculations are introduced, and the detection effect is improved at zero cost during runtime.

[0056] This embodiment solves the problem of weak generalization ability of the existing cross-domain target detection model through the feature adversarial algorithm, and further improves the generalization ability of the model through the foreground perception algorithm, so that the trained target detection model can be applied to various complex autonomous driving scenarios. And it is only optimized in the training stage of the model, and no additional parameters and calculations will be added in actual application, reducing the cost of model deployment.

[0057] The embodiment is only a specific example and does not represent only one implementation mode of the present invention.

[0058] Embodiment 2:

[0059] The present invention also provides a cross-domain target detection method suitable for autonomous driving, a cross-domain target detection model is obtained through a cross-domain target detection model training method suitable for autonomous driving described in Example 1, and target detection is performed on cross-domain targets through the cross-domain target detection model.

[0060] The cross-domain target detection method suitable for autonomous driving provided in this embodiment detects cross-domain targets through the cross-domain target detection model provided in Example 1. The cross-domain target detection model uses the feature adversarial algorithm idea to solve the problem of performance degradation of target detection networks commonly found in autonomous driving scenarios due to weak generalization ability in complex and changeable scenarios. The generalization ability of the target detection network is improved by the feature adversarial method, and the foreground perception method is further used to make the feature adversarial method focus on more effective foreground objects during feature adversarial, thereby further improving the effect of the feature adversarial algorithm. The two methods work together to greatly improve the detection ability and generalization ability of the target detection model. In addition, the model only introduces additional network structures in the training stage, and removes these network structures after the training is completed. In the testing and application stages, the original target detection network structure is used to avoid introducing additional parameters and calculation amount into the model, thereby improving the detection effect without increasing the cost.

[0061] Embodiment three:

[0062] The difference between the third embodiment and the first embodiment is that: Figure 5 As shown, a cross-domain target detection system suitable for autonomous driving is used to execute any of the above-mentioned cross-domain target detection model training methods suitable for autonomous driving, including: a target input module 1, used to input domain training samples; a feature extraction module 2, used to obtain domain training samples and extract domain training sample image features;

[0063] The feature fusion module 3 is used to obtain the image features of the domain training samples for feature fusion and generate a fusion feature map; the prediction output module 4 is used to obtain the fusion feature map of the domain training samples and predict the foreground weight information; the domain discrimination module 5 is used to obtain the fusion feature map of the domain training samples, perform feature adversarial training with the domain training sample prediction output module, and output the adversarial result; the foreground perception module 6 is used to multiply the foreground weight information of the domain training samples with the adversarial result of the domain training samples to obtain the final adversarial result; the model training module 7 is trained according to the final adversarial result of the domain training samples to obtain the domain training sample target detection model; the target detection module 8 is used to perform target detection on cross-domain targets through the domain training sample target detection model.

[0064] The cross-domain target detection system for autonomous driving provided in this embodiment is used to execute the cross-domain target detection model training method for autonomous driving provided in Embodiment 1. The target detection model trained by the system has strong generalization ability, can cope with detection in various complex scenarios, and has good detection effect.

[0065] The above description is only the preferred embodiment of the present invention. It is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application belong to the protection scope of the present invention.

Claims

1. A cross-domain target detection model training method suitable for autonomous driving, characterized in that: The following steps are involved: Preprocessing the domain data in the constructed autonomous driving scenario to obtain domain training samples; wherein the domain training samples include source domain training samples and target domain training samples; the domain data include source domain data and target domain data; the source domain data includes image information and annotation information in the autonomous driving scenario, and the target domain data only includes image information in the autonomous driving scenario; Perform training according to the field training samples to obtain an initial detection model; Constructing a domain discrimination module, performing adversarial training on the domain discrimination module and the initial detection model, and having the domain discrimination module output an adversarial result; Obtaining foreground weight information of the domain training sample, applying constraints of the foreground weight information to the adversarial result, and constructing a foreground perception module; According to the source domain training samples and the target domain samples, the initial detection model is alternately trained through the domain discrimination module and the foreground perception module to obtain a cross-domain target detection model; In the foreground perception module, the weight information of the foreground is obtained through the prediction output network of the initial detection model, and the weight information is the probability of foreground features appearing in the image; the adversarial result output by the domain discrimination module is multiplied by the weight information of the foreground to construct the foreground perception module; In alternately training the initial detection model through the domain discrimination module and the foreground perception module according to the source domain training samples and the target domain samples, training the initial detection model according to the source domain training samples includes the following steps: The source domain training samples are input into the initial detection model, and the training loss function is obtained after the initial detection model is trained. ; The source domain training sample is passed through the feature fusion network of the initial detection model to output a first feature map; The first feature map is passed through the domain discrimination module to obtain a first adversarial result, the first adversarial result is multiplied by the foreground weight information output by the prediction output network, and the first BCE loss function is calculated with the first domain label ; Wherein, the first domain label is the label of the source domain training sample; Calculate the first total loss function , training the initial detection model according to the first total loss function; In alternately training the initial detection model by the domain discrimination module and the foreground perception module according to the source domain training samples and the target domain samples, training the initial detection model by the target domain training samples comprises the following steps: Inputting the target domain training sample into the initial detection model, and outputting a second feature map after passing through the feature fusion network; The second feature map is passed through the domain discrimination module to obtain a second adversarial result, the second adversarial result is multiplied by the foreground weight information output by the prediction output network, and the second BCE loss function is calculated with the second domain label ; Wherein, the second domain label is the label of the target domain training sample; Calculate the second total loss function , training the initial detection model according to the second total loss function.

2. According to claim 1, a cross-domain target detection model training method suitable for autonomous driving is characterized in that: The initial detection model includes a feature extraction network, a feature fusion network and a prediction output network; The constructing of the domain discrimination module, performing adversarial training with the initial detection model through the domain discrimination module, and outputting adversarial results by the domain discrimination module, comprises the following steps: Constructing the domain discrimination module; wherein the domain discrimination module includes a gradient reversal layer and a domain discriminator; The output of the feature fusion network is subjected to gradient back propagation through the gradient reverse layer to obtain fusion features; After performing N convolution operations on the fused features through the domain discriminator, the adversarial result is output.

3. The cross-domain target detection model training method suitable for autonomous driving according to claim 2, characterized in that: The domain discriminator receives the fused features, performs N convolution operations on the fused features, and outputs the adversarial result. The fused features are subjected to data dimension reduction through N convolution operations, and then pass through the fully connected layer of the domain discriminator, and the adversarial result is output through the Sigmoid function; the output range of the adversarial result is [0,1].

4. The cross-domain target detection model training method suitable for autonomous driving according to claim 1, characterized in that: In the alternate training of the initial detection model through the domain discrimination module and the foreground perception module according to the source domain training samples and the target domain samples, the domain discrimination module and the foreground perception module are discarded after the training is completed, and the obtained target detection model does not include the domain discrimination module and the foreground perception module.

5. The cross-domain target detection model training method suitable for autonomous driving according to claim 1, characterized in that: The preprocessing of the domain data in the constructed autonomous driving scenario includes: performing Mosaic data enhancement, random rotation, HSV data enhancement and / or random horizontal flipping processing on the domain data.

6. The cross-domain target detection model training method suitable for autonomous driving according to claim 1, characterized in that: The YOLOX network model is used as the basic neural network for training the initial detection model.

7. A cross-domain target detection method suitable for autonomous driving, characterized in that: The cross-domain target detection model is obtained by a cross-domain target detection model training method suitable for autonomous driving as described in any one of claims 1 to 6, and target detection is performed on cross-domain targets by using the cross-domain target detection model.

8. A cross-domain target detection device suitable for autonomous driving, characterized in that: A cross-domain target detection model training method suitable for autonomous driving, used to execute any one of claims 1-6, comprising: A target input module, used for inputting the domain training samples; A feature extraction module, used to obtain the domain training samples and extract image features of the domain training samples; A feature fusion module is used to obtain the image features for feature fusion and generate a fusion feature map; A prediction output module is used to obtain the fused feature map and predict foreground weight information; A domain discrimination module, used to obtain the fused feature map, perform feature adversarial training with the prediction output module, and output adversarial results; A foreground perception module, used for multiplying the foreground weight information with the confrontation result to obtain a final confrontation result; A model training module is used to perform training according to the final adversarial result to obtain the target detection model; The target detection module is used to perform target detection on cross-domain targets through the target detection model.