Domain adaptation target detection method and system based on partial graph matching and electronic equipment
By constructing a cosmic graph and partial graph matching strategy, the problem of existing domain adaptive object detection methods ignoring the difference in the foreground and background distribution in the feature alignment process is solved, achieving higher generalization and detection accuracy.
Patent Information
- Application Number
- CN202510235993.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-27
AI Technical Summary
The existing domain adaptive object detection method is difficult to extract robust domain invariant class representations during information modeling and fusion, and the class condition distribution differences between prospects and backgrounds cannot be effectively considered in the category alignment strategy, resulting in a decrease in model generalization and detection accuracy.
The domain adaptive object detection method based on partial graph matching is adopted, and a cosmic map that integrates the category information of the source domain and the target domain is constructed, and a multi-layer graph convolutional network is used for joint reasoning to achieve cross-domain feature interaction. At the same time, only the foreground instances are matched and aligned to avoid background interference and improve alignment effect.
The distribution alignment effect of different domains is enhanced, the generalization and accuracy of object detection is improved, and the problem of existing methods ignore the differences in the foreground and background distribution in the process of feature alignment is overcome.
Smart Images

Figure CN120219706A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision, and in particular to a domain adaptation object detection method, system and electronic device based on partial graph matching. Background Art
[0002] With the gradual popularization and application of autonomous driving in life, the requirements for the accuracy and generalization of autonomous driving technology are also gradually increasing. Affected by the differences brought by weather, scenes, lighting in each city and camera devices of different vehicles, the autonomous driving technology based on object detection will be seriously affected, resulting in false detections or failure to identify targets in a timely manner. In this case, domain adaptation object detection can help the autonomous driving system achieve more reliable and applicable object detection. The main factor affecting the performance of object detection is the large distribution difference in different data, and how to align the data features in different distributions becomes the key to this problem. In order to improve the accuracy and generalization of object detectors, previous methods have reduced domain bias through adversarial learning to achieve the effect of aligning two different distributions, and finally performed class alignment through a more fine-grained class feature alignment strategy.
[0003] However, the previous methods have two main defects: 1. In the process of information modeling and fusion, it is difficult to extract robust domain-invariant class representations by fusing information from the source domain and the target domain in isolation. As a result, the model method is affected by domain bias and it is difficult to align the source domain and the target domain features, affecting the generalization of the object detection model. 2. In the class alignment strategy, the previous methods failed to effectively consider the differences in the class-conditional distributions between the foreground and the background, resulting in the model ignoring the distribution inconsistency between the background information and the foreground information when aligning class features. This distribution difference may cause the background information to be misaligned with the foreground class features, thereby affecting the detection performance and causing classification errors and a decrease in detection accuracy. Therefore, we provide a domain adaptation object detection method, system and electronic device based on partial graph matching. Summary of the Invention
[0004] Aiming at the above-mentioned shortcomings of the prior art, the first object of the present invention is to provide a domain adaptation object detection method, system and electronic device based on partial graph matching to solve the problems in the above background art.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A domain adaptation object detection method, system and electronic device based on partial graph matching, comprising the following steps:
[0007] Obtain the labeled source domain and unlabeled target domain images respectively;
[0008] The source domain and target domain image features extracted by the shared feature extractor are used to train the target detector; it includes a feature extractor module, a graph neural network feature fusion module, and a partial graph matching module;
[0009] The trained feature extractor is used to perform target classification and localization on the image to be predicted, and the target detection result is obtained;
[0010] The target detection model is trained with source domain and target domain data, and its steps include:
[0011] Step S1, the image-level features of the source domain and target domain are extracted by the pre-trained feature extractor and the target detector;
[0012] Step S2, the instance-level features are obtained by sampling the extracted image-level features, and the information is fused to construct the universe graph;
[0013] Step S3, a graph convolutional neural network is built according to the graph structure data, and the fused features are supervised and trained using a class-guided loss function;
[0014] Step S4, the instance-level alignment result is supervised and trained using partial graph matching.
[0015] The present invention is further set as: in the step S1, the image-level features are obtained through the following steps:
[0016] Any street scene image data that has completed manual annotation is used as the source domain image data, and the street scene image data is collected using any camera device as the target domain image data;
[0017] The image-level features of the source domain and target domain are extracted by the pre-trained feature extractor and the target detector;
[0018] The image feature is defined as V img = f(X);
[0019] where X is the set of source domain images and target domain images, and f is the pre-trained feature extractor and the target detector.
[0020] The present invention is further set as: in the step S2, the instance-level features are sampled and the universe graph is fused through the following steps:
[0021] By performing uniform sampling within the bounding box of the source domain image, a pixel-level foreground feature set is obtained By performing random sampling outside the bounding box of the source domain image, a pixel-level background feature set is obtained After mixing, the source domain pixel-level feature set V s ;
[0022] In the target domain image, according to the output result of the feature extractor classifier, pixels with classification scores greater than a fixed threshold are sampled as the pixel-level foreground feature set V t f , and pixels with classification scores less than the fixed threshold are sampled as the pixel-level background feature set V t b , and after mixing, the target domain pixel-level feature set V is obtained t ;
[0023] The source domain and target domain features are fused category by category through the following formula to generate the cosmic graph feature set:
[0024]
[0025] In the formula is the node feature set of the k-th category in the source domain, V t k is the node feature set of the k-th category in the target domain, cat represents the concatenation operation, and MLP is a multi-layer perceptron.
[0026] The present invention is further configured as: in the step S3, a graph convolutional neural network is built according to the graph structure data, and a category-guided loss function is used to supervise and train the fused features;
[0027] The source domain graph nodes and the cosmic graph nodes are fused through the following formula to obtain the fused features:
[0028] F s / t / u = CGR[IGR(V s / t , E s / t ), IGR(V u , E u ), E su / tu
[0029] where F s / t / u represents the fused instance-level feature, CGR is a cross-domain fusion function, IGR is a domain-internal enhancement function, and E represents the relationship between instance-level features.
[0030] The present invention is further configured as: in the step S4, the partial graph matching completed by cosmic graph guidance implemented through the following formula can achieve foreground-aware feature alignment in the graph matching stage;
[0031] M su = F s AF u T M tu = F t AF u T
[0032] In the formula, M su is the matching matrix between the source domain graph and the universe graph, M tu is the matching matrix between the target domain graph and the universe graph, A is the shared learnable parameter, F s is the set of source domain graph node features, F t is the set of target domain graph node features is the transposed matrix of the universe graph fusion features
[0033] The present invention is further configured such that: the partial graph matching is implemented by a matrix cropping operation on the matching result;
[0034] M = M su [:,:N bg M tu [:,:N bg T
[0035] wherein, M is the instance-level matching result of the source domain and the target domain, N bg is the number of background nodes in the universe graph, and [:,:N] is the matrix cropping operation for removing the last N columns
[0036] The present invention is further configured such that: it includes a processor and a memory, the memory stores multiple instructions executable by the processor, and the processor is used to read the instructions and execute the target detection method as described in claims 1-6
[0037] The present invention is further configured such that: the multiple computer programs readable by a computer are stored with multiple computer programs readable by a computer, and the computer programs can be executed by the processor to perform the target detection method as described in claims 1-6
[0038] Advantageous effects
[0039] Adopting the technical solution provided by the present invention, compared with the known public technology, it has the following advantageous effects:
[0040] 1. The present invention constructs a universe graph that fuses the category information of the source domain and the target domain, and performs joint reasoning through a multi-layer graph convolutional network to achieve more refined cross-domain feature interaction. It overcomes the problem of the existing method that the isolated reasoning lacks domain-invariant feature learning, resulting in a decline in generalization. The present invention uses the joint reasoning of the universe graph to enhance the distribution alignment effect of different domains, thereby improving the generalization of target detection in practical applications
[0041] 2. The present invention uses a partial graph matching strategy to only match and align foreground instances. It overcomes the problem that the existing domain adaptation target detection method ignores the class conditional distribution difference between foreground and background during the feature alignment process. By avoiding the background interference strategy, it improves the accuracy and generalization of cross-domain target detection
[0042] 3. The method of the present invention is not only applicable to the autonomous driving scenario, but also can be applied to multiple fields such as unmanned aerial vehicle monitoring, intelligent security, and remote sensing image analysis, solving the adaptability problem of cross-scenario object detection, and having high engineering application value and promotion potential. Description of the Drawings
[0043] Figure 1 It is a schematic structural diagram of a domain adaptation object detection system based on partial graph matching of the present invention;
[0044] Figure 2 It is a deployment schematic diagram of a domain adaptation object detection method based on partial graph matching of the present invention;
[0045] Figure 3 It is a schematic diagram of the module electrical connection of a domain adaptation object detection method based on partial graph matching of the present invention. Detailed Embodiments
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0047] The present invention will be further described below in conjunction with the embodiments.
[0048] Embodiment 1
[0049] As Figures 1 - 3 shown, the present invention provides a solution: a domain adaptation object detection method, system, and electronic device based on partial graph matching, including the following steps:
[0050] Obtain the labeled source domain and unlabeled target domain images respectively;
[0051] Train the target detector through the source domain and target domain image features extracted by the shared feature extractor; including a feature extractor module, a graph neural network feature fusion module, and a partial graph matching module;
[0052] Perform object classification and localization on the image to be predicted through the trained feature extractor to obtain the object detection result;
[0053] Train the object detection model through the source domain and target domain data, and its steps include:
[0054] Step S1, extract the image-level features of the source domain and target domain through the pre-trained feature extractor and target detector;
[0055] Step S2: Sample instance-level features by performing sampling on the extracted image-level features, and fuse the information to construct a universe graph;
[0056] Step S3: Build a graph convolutional neural network based on the graph structure data, and use a class-guided loss function to supervise the training of the fused features;
[0057] Step S4: Use partial graph matching to supervise the training of the instance-level alignment results;
[0058] In the said step S1, the image-level features are obtained through the following steps:
[0059] Use any artificially annotated street scene image data as the source domain image data, and use any camera device to collect street scene image data as the target domain image data;
[0060] Extract the image-level features of the source domain and the target domain through a pre-trained feature extractor and a target detector;
[0061] The said image features are defined as V img = f(X);
[0062] where X is the set of source domain images and target domain images, and f is the pre-trained feature extractor and the target detector;
[0063] In the said step S2, the instance-level features are sampled and the universe graph is constructed through the following steps: The method for obtaining the universe graph
[0064] Perform uniform sampling within the bounding boxes of the source domain images to obtain a set of pixel-level foreground features Perform random sampling outside the bounding boxes of the source domain images to obtain a set of pixel-level background features Mix them to obtain the source domain pixel-level feature set V s ;
[0065] In the target domain images, according to the output results of the feature extractor classifier, sample the pixels with classification scores greater than a fixed threshold as the pixel-level foreground feature set V t f , and sample the pixels with classification scores less than the fixed threshold as the pixel-level background feature set V t b , and mix them to obtain the target domain pixel-level feature set V t ;
[0066] Generate a universe graph feature set by fusing the source domain and target domain features category by category through the following formula:
[0067]
[0068] In the formula The set of node features for the k-th class in the source domain, V t k is the set of node features for the k-th class in the target domain, cat represents the concatenation operation, and MLP is a multi-layer perceptron;
[0069] In step S3, a graph convolutional neural network is constructed based on the graph structure data, and the fused features are supervised and trained using a class-guided loss function; joint graph reasoning
[0070] The source domain graph nodes and the cosmic graph nodes are fused through the following formula to obtain fused features:
[0071] F s / t / u = CGR[IGR(V s / t , E s / t ), IGR(V u , E u ), E su / tu )
[0072] where F s / t / u represents the instance-level features after fusion, CGR is a cross-domain fusion function, IGR is a domain-enhancement function, and E represents the relationship between instance-level features.
[0073] In step S4, the partial graph matching completed under the guidance of the cosmic graph, which is achieved through the following formula, can realize foreground-aware feature alignment in the graph matching stage; the source domain and the target domain respectively calculate the affinity with the cosmic graph
[0074] M su = F s AF u T M tu = F t AF u T
[0075] In the formula, M su is the matching matrix between the source domain graph and the cosmic graph, M tu is the matching matrix between the target domain graph and the cosmic graph, A is a shared learnable parameter, F s is the set of source domain graph node features, F t is the set of target domain graph node features, F u T is the transpose matrix of the cosmic graph fused features;
[0076] The partial graph matching is implemented through matrix cropping operation on the matching result; partial graph matching method
[0077] M = M su [:,:N bg M tu [:,:Nbg T
[0078] Among them, M is the instance-level matching result of the source domain and the target domain, and N bg is the number of background nodes in the cosmic graph, and [:,:N] is the matrix cropping operation to remove the last N columns.
[0079] In this embodiment, through the data reading module 1, the cosmic graph generation module 2, the joint graph reasoning module 3, and the instance-level matching module 4, the data reading module 1 is connected to the cosmic graph generation module 2, the cosmic graph generation module 2 is connected to the joint graph reasoning module 3, and the joint graph reasoning module is connected to the instance-level matching module 4;
[0080] The data reading module 1 includes the following steps:
[0081] (1): Obtain the source domain image data and the target domain image data. In the autonomous driving system, the collected urban street images (without labels) are used as the target domain, and the existing labeled urban street image dataset is used as the source domain to jointly train our object detection method;
[0082] Collect the labeled source domain image dataset and the unlabeled target domain image dataset. The categories included in the source domain and target domain image datasets should be the same, and there can be differences such as weather differences, style differences, and shooting device differences.
[0083] (2): Extract the image-level features of the images through the feature extractor and the object detector. In the embodiment of the present invention, VGG-16 is selected as the feature extractor and FCOS as the object detector. After this step, the image-level features of the source domain and the target domain are obtained.
[0084] The cosmic graph generation module 2 includes the following steps:
[0085] (1): Construct the graph structure data according to the source domain and target domain image features and categories;
[0086] Specifically, for the source domain images, the present invention will perform uniform sampling within the source domain detection boxes, and use the pixel features as the instance-level features of the foreground of this category. At the same time, random sampling will be performed outside the detection boxes, and the pixel features will be used as the instance-level features of the background category. For the target domain images, the present invention will use the classifier scores of the object detection head as the sampling basis, sample the scores higher than the fixed threshold as the instance-level features of the foreground of this category, and sample the scores lower than the fixed threshold as the instance-level features of the background category;
[0087] (2): Fuse the graph structure data of the same category to obtain the cosmic graph structure data;
[0088] Specifically, the cosmic graph is obtained by fusing the same-category nodes of the two domains through the following formula:
[0089]
[0090] In the above formula, represents the feature set belonging to the k-th class in the source domain node feature set, V t k represents the feature set belonging to the k-th class in the target domain node feature set, cat represents the concatenation operation, and MLP is a multi-layer perceptron;
[0091] The joint graph inference module 3 includes the following steps:
[0092] Build multiple graph convolutional neural networks based on the graph structure data to extract and enhance the source domain image data, target domain image data, and cosmic graph structure data, and obtain the first enhanced feature;
[0093] Build a cross-graph convolutional neural network based on the graph structure data to fuse the source domain image data, target domain image data, and cosmic graph structure data, and obtain the second fused feature;
[0094] F s / t / u = CGR[IGR(V s / t , E s / t ), IGR(V u , E u ), E su / tu
[0095] where F s / t / u represents the fused instance-level feature, CGR is a cross-domain fusion function, IGR is a within-domain enhancement function, and E represents the relationship between instance-level features.
[0096] Supervise and train multiple graph neural networks through a class-guided classification alignment strategy to fully fuse the instance-level features of the same class.
[0097] For the class-guided classification alignment strategy, it is implemented through the following loss function:
[0098]
[0099] where f cls () is a classifier implemented by a fully connected network, y i is the class label corresponding to the i-th instance-level feature, is the i-th instance-level feature.
[0100] The instance-level matching module 4 includes the following steps:
[0101] (1): Calculate the instance-level matching between the source domain and the cosmic graph and between the target domain and the cosmic graph respectively according to the following formula based on the second fused feature;
[0102] M su = F s AF u T
[0103] M tu = F t AF u T
[0104] In the above formula, M su is the instance-level matching score between the source domain and the universe graph, and M tu is the instance-level matching score between the target domain and the universe graph, and A is a learnable parameter;
[0105] (2): According to the instance-level matching scores between the source domain and the universe graph and between the target domain and the universe graph, remove the instance-level feature matching scores of the instances that match the background points of the universe graph; according to the instance-level matching scores between the universe graph and between the target domain and the universe graph, obtain the instance-level matching result between the source domain and the target domain according to the following formula:
[0106] M = M su [:,:N bg M su [:,:N bg T
[0107] In the above formula, M is the instance-level matching result between the source domain and the target domain.
[0108] The instance-level matching loss of the node is implemented by a second loss function, and the second loss function is as follows:
[0109]
[0110] In the formula, L is the second loss function, M is the instance-level matching result, Y is the true value of the matching result, nodes of the same category in Y are considered to match each other, ||||1 is the L1 norm, and ⊙ is the element-wise multiplication;
[0111] The instance-level structure matching loss of the node is implemented by a third loss function, and the third loss function is as follows:
[0112]
[0113] In the formula, L is the third loss function, Es is the relationship between the instance-level features of the source domain, and Et is the relationship between the instance-level features of the target domain.
[0114] Example 2
[0115] As Figures 1 - 3 As shown, a domain adaptation object detection method, system and electronic device based on partial graph matching, including a processor and a memory, the memory stores multiple instructions executable by the processor, and the processor is configured to read the instructions and execute the object detection method as described in claims 1-6;
[0116] The multiple computer programs readable by a computer can be executed by the processor to perform the object detection method as described in claims 1-6, and multiple computer programs readable by a computer are stored thereon.
[0117] In this embodiment, the trained object detector is used to perform object detection on the image to be predicted, and the object prediction position and category are obtained.
[0118] Based on the same concept, an embodiment of the present invention provides a domain adaptation object detection system based on partial graph matching, including a data reading module, a training module and an object detection module. The data reading module is configured to read the source domain image data and target domain image data required by the training module. The training module is configured to train the object detection module through the source domain image data and target domain image data. The domain adaptation object detection model includes an object detector, multiple graph convolutional neural networks and a graph matching solver. The object detection module is configured to output a prediction result for the image to be predicted through the trained network, including the object position and the object category.
[0119] The training module includes:
[0120] A data reading module, configured to extract the image-level features of the source domain image data and target domain image data through a pre-trained feature extractor and an object detector;
[0121] A graph data construction module, configured to construct the graph node relationship between the source domain and target domain instance-level features;
[0122] A cosmic graph construction module, which fuses features according to the relationship between the same categories in the source domain and target domain to obtain virtual cosmic instance-level nodes;
[0123] A first enhancement module, which receives the instance-level node features of the source domain, target domain and cosmic graph, builds multiple graph convolutional neural networks according to the graph structure, and extracts and enhances the instance-level features of the same category through the multiple graph convolutional neural networks to obtain first enhanced features;
[0124] A second fusion module, which receives the first enhanced features of the source domain, target domain and cosmic graph, and fuses the instance-level features of different domains according to the relevance between the source domain and target domain and the virtual cosmic graph respectively to obtain second fusion features;
[0125] A first supervision module, configured to perform supervised training on the second fusion features of the source domain and target domain through a category-guided classification loss;
[0126] A partial graph matching module that receives the second fusion features of the source domain, target domain, and universe graph, and is used to achieve foreground instance-level matching between the source domain and the target domain through partial graph matching implemented based on the universe graph;
[0127] A second supervision module for supervising and training the foreground instance-level feature alignment between the source domain and the target domain through category-guided matching loss to obtain a trained object detection model.
[0128] After training, it can be directly applied as an object detection system in fields such as autonomous driving and industrial fault detection. Input any image into the data reading module. After the data reading module receives the image input, the feature extractor and the object detector output the target position to be predicted and the target category.
[0129] Working principle:
[0130] In the actual use process of the present invention, any labeled object detection data set is used as the source domain data, and this data set should include: pictures, the corresponding positions of the targets existing in the pictures, and the corresponding categories of the targets existing in the pictures. This data set can be any publicly available object detection data set or can be collected by the user himself. Any image is used as the target domain data set, which can have differences in style, weather, camera equipment, etc. from the source domain.
[0131] Any image feature extractor or image encoder is used to generate the image features of the source domain and the target domain. Any object detection framework is used to generate the target position and category predictions of the source domain and the target domain using the image features, and the corresponding labels are used for training the source domain predictions.
[0132] Using the target position and category of the target domain generated in the previous step, sample the image features of the target domain: if the object detector believes that a certain position belongs to a certain category, then sample the image features at this position as the instance-level features of this category. In the source domain, sample the image features at the corresponding position of the target as the instance-level features of the corresponding category of this target.
[0133] The collected instance-level features are denoted as V s and V t , with the subscript s representing the source domain and the subscript t representing the target domain. In order to reduce the domain bias to achieve a better domain alignment effect, a domain with a smaller domain bias is constructed by fusing the source domain and the target domain, which is called the universe graph, and the construction method of the universe graph is achieved through the following formula:
[0134] V u = MLP[cat(V s , V t )]
[0135] where MLP represents a multi-layer perceptron, cat represents a concatenation operation, and Vu Represents the instance-level features of the cosmic graph.
[0136] The collected instance-level features are enhanced through a graph neural network to strengthen the correlation between features, and are respectively interacted and fused with the cosmic graph to obtain instance-level features with smaller domain biases. The enhancement and fusion method is achieved through the following formula:
[0137] F s / t / u = CGR[IGR(V s / t , E s / t ), IGR(V u , E u ), E su / tu )
[0138] where F s / t / u represents the fused instance-level features, CGR is the cross-domain fusion function, IGR is the intra-domain enhancement function, and E represents the relationship between instance-level features.
[0139] After obtaining the fused features output in the previous step, the instance-level matching between the source domain and the cosmic graph is obtained through the following steps:
[0140] M su = F s AF u T
[0141] where M su is the instance-level matching result between the source domain and the cosmic graph, is the transpose matrix of the cosmic graph fusion features, and A is a learnable parameter.
[0142] Similarly, the instance-level matching between the target domain and the cosmic graph is obtained through the following steps:
[0143] M tu = F t AF u T
[0144] In the formula, M tu is the instance-level matching result between the target domain and the cosmic graph
[0145] Using the instance-level matching result of the cosmic graph obtained in the previous step, the foreground-aware partial graph matching is calculated through the following formula:
[0146] M = M su [:,:N bg M tu [:,:N bg T
[0147] where M is the instance-level matching result between the source domain and the target domain, and N bg is the number of background nodes in the cosmic graph, M su [:,:N bg is the instance-level matching score between the source domain after removal and the cosmic graph for N columns, M tu [:,:N bg is the instance-level matching score between the target domain after removal and the cosmic graph for N columns.
[0148] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A domain adaptation object detection method based on partial graph matching, characterized in that: The following steps are involved: Obtain labeled source domain and unlabeled target domain images respectively; The object detector is trained by sharing the source domain and target domain image features extracted by the feature extractor; It includes feature extractor module, graph neural network feature fusion module and partial graph matching module; The trained feature extractor is used to classify and locate the target in the predicted image to obtain the target detection result; The target detection model is trained using source and target domain data. The steps include: Step S1, extracting image-level features of the source domain and the target domain through a pre-trained feature extractor and an object detector; Step S2, sampling the extracted image-level features to obtain instance-level features, and fusing the information to construct graph data; Step S3, building a graph convolutional neural network based on the graph structure data, and using a category-guided loss function to supervise the fusion features; Step S4: Use partial graph matching to perform supervised training on the instance-level alignment results.
2. The domain adaptation target detection method based on partial graph matching according to claim 1, characterized in that: In step S1, the image-level features are obtained by the following steps: Using any manually annotated street scene image data as source domain image data, and using any camera device to collect street scene image data as target domain image data; Extract image-level features of the source and target domains through pre-trained feature extractors and object detectors; The image feature is defined as V img =f(X); Where X is the set of source domain images and target domain images, and f is the pre-trained feature extractor and object detector.
3. The domain adaptation target detection method based on partial graph matching according to claim 1, characterized in that: In step S2, the instance-level features are sampled and fused to construct graph data through the following steps: By performing uniform sampling within the marked box of the source domain image, we obtain the pixel-level foreground feature set V s f , by performing random sampling outside the marked box of the source domain image, we obtain the pixel-level background feature set V s b , after mixing, we get the source domain pixel-level feature set V s ; In the target domain image, according to the output results of the feature extractor classifier, the pixel samples with classification scores greater than a fixed threshold are taken as the pixel-level foreground feature set V t f , the pixel samples whose classification scores are less than the fixed threshold are taken as the pixel-level background feature set V t b , after mixing, we get the target domain pixel-level feature set V t ; The cosmological graph feature set is generated by fusing the source domain and target domain features category by category through the following formula: In the formula is the node feature set of the kth category in the source domain, V t k is the node feature set of the kth class in the target domain, cat represents the connection operation, and MLP is a multi-layer perceptron.
4. The domain adaptation target detection method based on partial graph matching according to claim 1, characterized in that: In the step S3, a graph convolutional neural network is built according to the graph structure data, and a category-guided loss function is used to supervise the fusion features for training; The source domain graph nodes and the universe graph nodes are fused by the following formula to obtain the fusion feature: F s / t / u =CGR[IGR(V s / t ,E s / t ),IGR(V u ,E u ),E su / tu ] where F s / t / u represents the fused instance-level features, CGR is the cross-domain fusion function, IGR is the intra-domain enhancement function, and E represents the relationship between instance-level features. The category-guided loss function is implemented as follows where f cls () is the classifier implemented by the fully connected network, y i is the category label corresponding to the i-th instance-level feature, is the i-th instance-level feature.
5. The domain adaptation target detection method based on partial graph matching according to claim 1, characterized in that: In step S4, partial graph matching is performed by guiding the cosmic graph using the following formula, which can achieve foreground-aware feature alignment in the graph matching stage; M su =F s OF u T M tu =F t OF u T Among them, M su is the matching matrix between the source domain map and the universe map, M tu is the matching matrix between the target domain graph and the universe graph, A is a shared learnable parameter, and F s is the source domain graph node feature set, F t is the target domain graph node feature set, is the transposed matrix of the fusion features of the universe graph.
6. The domain adaptation target detection method based on partial graph matching according to claim 5, characterized in that: The partial graph matching is achieved by performing a matrix clipping operation on the matching result; M=M su [:,:N bg ]M tu [:,:N bg ] T Among them, M is the instance-level matching result between the source domain and the target domain, N bg is the number of background nodes in the universe graph, and [:,:N] is the matrix pruning operation to remove the last N columns.
7. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores multiple instructions that can be executed by the processor, and the processor is used to read the instructions and execute the target detection method as described in claims 1-6.
8. An electronic device according to claim 7, characterized in that: The plurality of computer-readable computer programs can be executed by a processor to form the target detection method as described in claims 1-6, and a plurality of computer-readable computer programs are stored on the processor.