Feature decomposition-based cross-domain target detection method, computer program product, storage medium and terminal
By generating intermediate domains and feature decomposition modules using CycleGAN, and combining multi-scale feature fusion and subtask alignment, the problem of decreased detection accuracy in cross-domain object detection is solved, achieving efficient object detection under unsupervised conditions.
Patent Information
- Application Number
- CN202511584410.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-13
AI Technical Summary
Existing unsupervised domain-adaptive target detection techniques suffer from performance bottlenecks in cross-domain scenarios, especially when domain offset is severe, resulting in decreased detection accuracy. Existing methods struggle to achieve stable and accurate target detection without relying on target domain labeled data.
A cross-domain target detection method based on feature decomposition is adopted. An intermediate domain is generated by CycleGAN, and multi-scale feature fusion, feature decomposition and subtask alignment modules are combined to optimize feature extraction and task separation, thereby achieving cross-domain feature alignment and task optimization.
It significantly improves the accuracy and robustness of target detection, enhances detection precision in complex domain offset scenarios, and achieves stability and generalization ability for unsupervised domain adaptation.
Smart Images

Figure CN121527554A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and in particular to a cross-domain target detection method, computer program product, storage medium and terminal based on feature decomposition. Background Technology
[0002] Object detection, a core technology in computer vision, plays a crucial role in real-world scenarios such as autonomous driving and security monitoring. However, existing models experience significant performance degradation in cross-domain scenarios. For instance, a model trained in clear weather suffers a substantial drop in detection accuracy when applied to foggy environments due to domain shift. Domain shift arises from the distributional differences between the source domain (labeled data) and the target domain (unlabeled data), manifesting as variations in image style, lighting conditions, and object appearance, leading to insufficient generalization ability of the model in the target domain. Traditional solutions rely on manually labeling the target domain data to retrain the model, but large-scale data labeling is costly and impractical, especially in complex and variable real-world scenarios.
[0003] To address this issue, Unsupervised Domain Adaptation (UDA) has been extensively studied. The basic principle of UDA is to maintain consistent feature distributions across domains while preserving task-specific discriminative capabilities. It aims to optimize model performance in unlabeled target domains by leveraging knowledge from labeled source domains and combining sophisticated distribution adaptation and feature extraction techniques.
[0004] Currently, UDA research mainly focuses on two categories of methods. One category is adversarial learning-based methods, which force the feature extractor to learn domain-invariant features by introducing a domain discriminator and a gradient inversion layer (GRL), thereby making the feature distributions of the source and target domains more consistent. For example, Domain Adaptive Faster R-CNN has achieved some success through adversarial training at the global and instance levels. Although this type of method has achieved some success, it has inherent limitations: First, the adversarial training process itself is unstable and difficult to converge; second, coarse-grained global or instance feature alignment may not be able to fully capture complex inter-domain differences, resulting in insufficient or over-alignment and loss of task-related discriminative information; finally, most methods do not fully consider the differences in feature requirements between the classification and localization subtasks in object detection, and a simple uniform alignment strategy may not be optimal.
[0005] Another type of approach is based on image-to-image transformation techniques, which use style transfer to convert the target domain image into a style similar to the source domain, reducing visual differences. CycleGAN is a typical example of this approach, which uses cycle consistency loss to ensure that the semantics of the transformed image remain unchanged. While this method can effectively alleviate differences in visual appearance, it also introduces new problems: the style transfer process may unintentionally destroy or distort key semantic structures and geometric information in the image, such as the precise outlines and spatial relationships of objects. This can negatively impact bounding box regression tasks that rely on fine spatial information.
[0006] In recent years, researchers have attempted to integrate various strategies such as adversarial learning, image transformation and statistical matching, hoping to fully utilize their respective advantages and further improve the adaptability of UDA in tasks such as object detection and image classification. However, in high-dimensional and complex feature spaces, simple statistical moment matching may not be sufficient to capture nonlinear distribution differences and has a high computational cost.
[0007] In summary, existing unsupervised domain-adaptive target detection techniques have encountered performance bottlenecks due to limitations in addressing the aforementioned key issues. Therefore, there is an urgent need for a new method capable of fine-grained feature decoupling, full fusion of contextual information, decoupling subtask optimization, and secure construction of transition domains to achieve stable and accurate target detection in broader and more complex cross-domain scenarios. Summary of the Invention
[0008] The purpose of this invention is to overcome the problems existing in the prior art and to provide a cross-domain target detection method, computer program product, storage medium and terminal based on feature decomposition.
[0009] The objective of this invention is achieved through the following technical solution: Firstly, an unsupervised adaptive target detection method is provided, which includes the following steps: Step 1: Intermediate Domain Generation Using a CycleGAN-based intermediate domain generator, intermediate domain images are generated from source domain images, and the high-level semantic information of the source and target domains is preserved by leveraging its domain adversarial training and cycle consistency loss mechanism.
[0010] Step 2: Feature Extraction When images from the source and target domains are input into the backbone network (such as VGG-16 or ResNet-101), multi-level features are extracted for subsequent processing.
[0011] Step 3, Feature Fusion: A feature fusion module is employed to integrate multi-scale features from the last three layers of the backbone network. This module combines a multi-scale attention mechanism with a gradient inversion layer (GRL) for feature fusion. Notably, the features from the penultimate layer are first processed by a feature decomposition module before being fused with features from other layers. Finally, the fused multi-scale features are input into the domain classifier. The model can adaptively adjust feature weights, enabling it to fully utilize both deep and shallow features in domain classification tasks.
[0012] Step 4, Feature decomposition: The fused features are decomposed by a feature decomposition module, which includes two core modules: a global decoupling module (GDM) and an instance-level decoupling module (IDM). By decoupling and fully utilizing features, the features are decomposed along the three dimensions of channel, height, and width, which improves the utilization rate of contextual information in multi-source domain images, effectively separates key information from redundant data, reduces information redundancy, and enhances feature representation.
[0013] Step 5: Subtask Alignment A sub-task alignment module is employed to independently optimize the classification and localization tasks. This module decouples the classification and localization tasks through multiple classifiers and localizers, achieving cross-domain feature alignment. Specifically, multiple classifiers and localizers are used as auxiliary predictors, which are trained on labeled data in the source domain. During training, the module focuses on detecting inconsistencies in the behavior of auxiliary predictors in the target domain and promotes predictor diversification by maximizing the inconsistency-perceived loss. Simultaneously, a generator produces transferable features.
[0014] Step 6, Training Optimization: The overall model is optimized by combining domain adaptation loss, feature decoupling loss, and subtask alignment loss. By balancing these loss terms, domain-invariant features are learned.
[0015] Step 7, Iterative Training: After completing one round of training, the system enters the next iteration to continuously optimize model parameters and improve cross-domain detection performance.
[0016] In one example, the objective function of the CycleGAN-based intermediate domain generator is: Where G and F are generators, X represents the source domain sample, and Y represents the target domain sample. and It is a discriminator. Indicates adversarial loss. Representing the cycle consistency loss, this intermediate domain generator can preserve high-level image information while performing style transfer, reducing the loss of semantic information in traditional image transfer.
[0017] In one example, the Feature Decomposition (FDM) module performs feature decomposition along the channel, height, and width dimensions, generating 3r learnable vectors. Where r is the iteration number, and C, H, and W represent the number of channels, height, and width of the feature map, respectively; the Global Decoupling Module (GDM) adopts a triplet optimization strategy based on squared Euclidean distance, and its loss function is: in This represents the squared Euclidean distance between domain predictions, where m is a margin of 0.25. This module can effectively separate domain-related and domain-independent features, enhancing the utilization of contextual features.
[0018] In one example, the instance-level decoupling module (IDM) extracts local features through a region proposal network (RPN) and an ROI Align layer, and its loss function is defined using cosine similarity: in This module addresses the domain bias problem at the local feature level and improves cross-domain consistency of instance-level features.
[0019] In one example, the domain adaptation loss function for the classification task in the subtask alignment module (SA) is Shannon Entropy, and the domain adaptation loss function for the localization task is standard deviation. Their calculation expressions are as follows: in, , It is a column vector of the predicted probabilities of all classifiers in the i-th class, where C is the total number of classes, N is the number of classifiers, and M is the number of localizers. This module enables independent optimization of classification and localization tasks, solving the problem that coupled feature representations in the two-stage detector architecture hinder task-specific optimization.
[0020] In one example, the domain classifier loss function Combined with cross-entropy loss and Focal Loss Its calculation expression is: in, For the corresponding domain classifier, i represents the corresponding domain label. Let W and H represent the total number of images in a batch in the source and target domains, respectively, and let W and H be the width and height of the feature map. This loss function enhances model stability and effectively handles hard-to-classify samples.
[0021] In one example, the total loss function of the method is: ; in, For the domain classifier loss, and As a balancing factor, by optimizing this loss function, the model can achieve a significant improvement in cross-domain object detection performance without the need for target domain labeled data.
[0022] It should be further noted that the technical features corresponding to the above examples can be combined or substituted to form new technical solutions.
[0023] The present invention also includes a computer program product comprising a computer program that, when executed by a processor, implements the steps of the cross-domain target detection method based on feature decomposition formed by any or a combination of the above examples.
[0024] The present invention also includes a storage medium storing computer instructions that, when executed, perform the steps of the cross-domain target detection method based on feature decomposition formed by any or more of the above examples.
[0025] The present invention also includes a terminal comprising a memory and a processor, the memory storing computer instructions executable on the processor, the processor executing the steps of the cross-domain target detection method based on feature decomposition formed by any or more of the above examples when executing the computer instructions.
[0026] Compared with the prior art, the beneficial effects of the present invention are: 1. In one example, this invention achieves multi-level feature decoupling at the image and instance levels through a Feature Decomposition Module (FDM), effectively solving the problem of insufficient utilization of contextual information caused by coarse-grained feature alignment in existing methods. FDM decomposes features along the channel, height, and width dimensions to generate domain-dependent and domain-independent components, and optimizes them through a Global Decoupling Module (GDM) and an Instance-Level Decoupling Module (IDM) respectively, enabling the model to capture cross-domain differences more finely. In cases of severe domain shift (such as scene transition from sunny to foggy weather), this method can retain more semantic contextual information, significantly improving the accuracy and robustness of object detection. Experiments show that mAP is improved by 2.2% in the Cityscapes to Foggy Cityscapes task, effectively addressing the challenges brought by complex domain shifts.
[0027] 2. In one example, the subtask alignment module (SA) proposed in this invention decouples the classification and localization tasks, solving the problem that coupled feature representations in existing two-stage detector architectures hinder task-specific optimization. By introducing multiple classifiers and localizers, the SA module can independently optimize the classification and localization tasks, avoiding mutual interference between tasks. The classification task uses Shannon Entropy to quantify inconsistencies, and the localization task uses standard deviation to measure cross-domain differences, enabling the model to optimize different subtasks in a targeted manner. Experimental results show that this method improves classification accuracy by 3.1% and bounding box localization accuracy by 2.7% in the Pascal VOC to Clipart style transfer task, significantly improving the overall performance of object detection.
[0028] 3. In one example, this invention constructs a smooth intermediate domain between the source and target domains using a CycleGAN-based intermediate domain generator, effectively reducing the loss of high-level semantic information during traditional image-to-image conversion. This intermediate domain generator combines domain adversarial training and cycle consistency loss to preserve key high-level features while performing style transfer. Compared to directly converting the source to the target domain, the intermediate domain strategy significantly reduces inter-domain distribution differences, making feature alignment more effective. In the Cityscapes to Foggy Cityscapes task, integrating intermediate domain generation further improves mAP by 1.7%, demonstrating the effectiveness of this strategy in handling complex domain shift problems.
[0029] 4. In one example, this invention enhances domain discrimination capability by adaptively integrating features from the last three layers of the backbone network through a multi-scale feature fusion module (FFM). The FFM, combined with a multi-scale attention mechanism and a gradient reversal layer, effectively addresses the performance degradation caused by domain drift. Experiments show that when integrating FDM, intermediate domain generation, and SA modules, this invention achieves 44.1% mAP on the Cityscapes to Foggy Cityscapes task, a 1.5% improvement over the current best method OMLF; and 45.8% mAP on the Pascal VOC to Clipart task, also surpassing OMLF by 1.5%. Ablation experiments further demonstrate the strong complementarity between the modules. In the weather adaptation task, integrating all modules improves mAP by 3.9% compared to the baseline, and in the style transfer task by 4.7%, significantly improving the overall performance of unsupervised domain adaptive object detection. Attached Figure Description
[0030] Figure 1 This is a flowchart of an unsupervised adaptive target detection method according to the present invention; Figure 2 This is a schematic diagram of the overall framework of the model of the present invention; Figure 3 This is a schematic diagram illustrating the inconsistency quantification of the present invention; Figure 4 This is a comparison chart showing the visualization results of the adaptation of the Cityscapes to Foggy Cityscapes domains in this invention; Figure 5 This is a comparison chart showing the visualization results of the adaptation of the Pascal VOC to the Clipart domain in this invention. Detailed Implementation
[0031] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] It should be noted that the defects in the solutions in the prior art are all the results of the inventors' practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of this application in the following text should be the inventors' contributions to this application in the process of invention and creation, and should not be understood as technical content known to those skilled in the art.
[0033] In view of the technical problems pointed out in the background art, the present invention provides the following embodiments: In one exemplary embodiment, a cross-domain target detection method based on feature decomposition is provided, such as... Figure 1 As shown, it includes the following steps: S1. A CycleGAN-based intermediate domain generator is used to convert the source domain image into an intermediate domain image, wherein the intermediate domain generator preserves the high-level semantic features of the source and target domains through domain adversarial training and cycle consistency loss. S2. Extract multi-scale features from source domain images, intermediate domain images, and target domain images using a backbone network; S3. A feature fusion module is used to integrate the multi-scale features of the last three layers of the backbone network for fusion. The feature fusion module combines a multi-scale attention mechanism and a gradient reversal layer to perform feature fusion. S4. The fused features are decomposed by a feature decomposition module, which includes a global decoupling module and an instance-level decoupling module, for performing feature decomposition along the channel, height and width dimensions; S5. A subtask alignment module is used to independently optimize the classification task and the localization task. The subtask alignment module decouples the classification and localization tasks through multiple classifiers and localizers and achieves cross-domain feature alignment.
[0034] Specifically, the overall framework of the model (FDC) used in this method is as follows: Figure 2 As shown, firstly, in the intermediate domain, the source domain image is processed by CycleGAN and then input into the backbone network along with the target domain image. Then, in the Feature Fusion (FFM) module, multi-scale features from different layers are adaptively fused using MS-CAM and GRL, achieving optimal utilization of both deep and shallow features. In the Feature Decomposition (FDM) module, the framework achieves hierarchical feature decoupling through GDM and IDM, and utilizes ROI Align for instance-level adaptation. Finally, in the Subtask Alignment (SA) module, multiple auxiliary classifiers and localizers are combined with GRL to optimize classification and localization features respectively, thereby enhancing the model's domain adaptability.
[0035] In step S1, the source domain labeled images and the target domain unlabeled images are initialized. The source domain labeled images include image datasets with complete annotation information, such as Cityscapes and Pascal VOC; the target domain unlabeled images include image datasets that require object detection but lack annotation information, such as Foggy Cityscapes and Clipart. In this example, the source domain is the Cityscapes dataset (urban road scenes under sunny weather), and the target domain is the Foggy Cityscapes dataset (urban road scenes under foggy conditions). There is a significant domain shift between the two, mainly manifested in differences in lighting conditions, contrast, and visibility. The source domain image resolution is 2048×1024, the target domain image resolution is 2048×1024, and the number of image channels is 3 (RGB). This example uses ResNet-101 as the backbone network, with an input image size of 1024×2048, a batch size of 2, and one image each for the source and target domains.
[0036] Furthermore, CycleGAN is used to generate intermediate domain images, leveraging its domain adversarial training and cycle consistency loss mechanism to preserve high-level semantic information of the source and target domains. The complete objective function is: Where G and F represent the generator, X is the source sample, Y is the target sample, D is the discriminator, and λ is the balance factor. Adversarial loss function ( ) Ensures that the distribution generated by the generator approximates the real data distribution, while the cycle consistency loss function ( This maintains bidirectional consistency between the samples generated by the two generators. The optimization objective function is: .
[0037] In step S2, the source domain image, intermediate domain image, and target domain image are input into the backbone network (ResNet-101 in this example) to extract multi-scale features. The feature maps of the last three layers of the backbone network are denoted as F1, F2, and F3, with spatial resolutions of H / 8×W / 8, H / 16×W / 16, and H / 32×W / 32, respectively, where H and W are the height and width of the input image, respectively.
[0038] In step S3, FFM first calculates the attention weights between features at different levels using a multi-scale channel attention mechanism (MS-CAM). MS-CAM obtains global information for each feature channel through global average pooling, and then generates channel attention weights through a fully connected layer and a sigmoid activation function. The mathematical expression for feature fusion is as follows: Where M represents the MS-CAM attention mechanism, This represents the Hadamard product.
[0039] It's worth noting that the features from the penultimate layer are first processed by the feature decomposition module before being fused with features from other layers. Finally, the fused multi-scale features are input into the domain classifier. The final domain classifier loss function incorporates cross-entropy loss. and Focal Loss ( To enhance model stability, the loss function of the domain-adaptive classifier is expressed as follows: In step S4, the FDM includes a Global Decoupling Module (GDM) and an Instance-Level Decoupling Module (IDM). Each module employs three independent feature generators, each containing global pooling, 1×1 convolution, and sigmoid activation operations. The FDM generates 3r learnable vectors by performing r consecutive iterations along the channel, height, and width dimensions. C, H, and W represent the number of channels, height, and width of the feature map, respectively.
[0040] 1. Global Decoupling Module (GDM) GDM decomposes features into domain-shared features and domain-specific features, representing cross-domain consistent semantic information and domain-specific style information, respectively. GDM employs a triplet optimization strategy based on squared Euclidean distance, with the following loss function: in Let m be the squared Euclidean distance between the predictions in the domain. To prevent convergence to trivial solutions with overly homogeneous features, m is set to a boundary value of 0.25 to ensure... and The domain probability prediction is close to 0.5. and These represent the domain-shared characteristics of the source and target domains, respectively. and These represent the domain-specific features of the source and target domains, respectively.
[0041] In its implementation, GDM generates domain-shared features and domain-specific features through two fully connected layers, and then calculates the aforementioned loss function. During optimization, the stochastic gradient descent (SGD) algorithm is used, with a learning rate of 0.001 and a momentum of 0.9.
[0042] GDM achieves global feature adaptation by eliminating domain-specific factors, but domain bias still exists at the level of local features of individual targets. To address this issue, instance-level decoupling modules (IDM) are introduced.
[0043] 2. Instance-Level Decoupling Module (IDM) IDM optimizes the distribution separation between domain-shared and domain-specific instance features by minimizing cosine similarity. It extracts local features using operations such as ROI Align, thereby achieving instance-level domain decoupling. The formula is expressed as follows: ; The MLP consists of a flattening layer and a fully connected layer. Here, I_s^s and I_s^t represent domain-shared instance features, while I_p^s and I_p^t represent domain-specific instance features.
[0044] The loss function for IDM is defined using cosine similarity: in, , represents the cosine similarity, and its value ranges from [0,1].
[0045] In this example, the RPN generates approximately 300 region proposals, the ROI Align outputs a 7×7 feature size, and the MLP contains a flattening layer and a 512-dimensional fully connected layer. The IDM loss function is optimized using the Adam optimizer with a learning rate of 0.0001.
[0046] In step S5, the SA module decouples the classification task and the localization task and optimizes them separately. Specifically, the SA module introduces N auxiliary classifiers for the classification task and M auxiliary localizers for the localization task. In this example, N=3 and M=3.
[0047] 1. Multi-predictor deployment Multiple classifiers and localizers are used as auxiliary predictors. These predictors are trained on source domain labeled data and independently optimize the classification and localization tasks.
[0048] 2. Inconsistency Quantification During training, the focus is on detecting behavioral inconsistencies in the auxiliary predictors within the target domain. By maximizing the inconsistency-aware loss, predictor diversification is promoted. Simultaneously, a generator produces transferable features, such as... Figure 3 As shown, Figure 3 (a) shows the original domain-adaptive class distribution. Figure 3 (b) shows the method for maximizing inconsistency differences, which utilizes Shannon entropy to measure similarity between different categories and redefines the decision boundary. Figure 3 (c) shows how to further utilize standard deviation to minimize differences within the same category.
[0049] The classification inconsistency loss is defined (based on Shannon entropy) as follows: in, p is the entropy vector, C is the total number of categories, and q represents the average probability vector.
[0050] The SA module backpropagates the domain adaptation loss to the feature extractor through a gradient inversion layer (GRL), making the feature representations for classification and localization tasks more domain-invariant. In this example, the domain adaptation loss weights for classification and localization tasks... and Set them to 0.5 and 0.3 respectively.
[0051] Location inconsistency loss is defined as (based on standard deviation): Let i be the i-th column vector in the prediction matrix of M auxiliary locators.
[0052] Furthermore, this method also includes an optimization training process for the model. Specifically, this includes: 1. A joint optimization model based on feature alignment loss and pseudo-labels.
[0053] The overall model is optimized by combining domain adaptation loss, feature decoupling loss, and subtask alignment loss. By balancing these loss terms, domain-invariant features are learned.
[0054] The overall objective function integrates the losses of each module, and its expression is: 2. Iterative training After completing one round of training, the system enters the next iteration, continuously optimizing model parameters and improving cross-domain detection performance. In this example, the model is trained using the SGD optimizer with a learning rate of 0.001, momentum of 0.9, and weight decay of 0.0001. The training process consists of two phases: the first phase trains the intermediate domain generator for 200 epochs; the second phase jointly trains the entire model for 50,000 iterations. During training, validation is performed every 1,000 iterations, and the model with the highest mAP on the validation set is selected as the final model.
[0055] This invention introduces a feature decomposition and subtask alignment mechanism, utilizing the FDC (Feature Decomposition for Unsupervised Cross-Domain Adaptation Object Detection) method to construct an unsupervised domain adaptive object detection model. To address the insufficient utilization of contextual information in multi-layered complex domain adaptation tasks, this model achieves refined feature alignment for classification and localization tasks through a feature decomposition module (FDM) and a subtask alignment module (SA), effectively separating domain-related and domain-independent features. This significantly improves cross-domain detection performance without requiring target domain labeled data. Simultaneously, it solves the problem of coupled feature representations hindering task-specific optimization in two-stage detector architectures, enhancing the model's robustness and generalization ability in complex domain offset scenarios. Furthermore, the Feature Decomposition (FDM) module performs feature decomposition along the channel, height, and width dimensions to generate domain-related and domain-independent components. A triplet optimization strategy based on squared Euclidean distance is adopted to effectively separate domain-shared features from domain-specific features, avoiding feature confusion. The Subtask Alignment (SA) module decouples the classification and localization tasks, allowing for independent optimization of each task. This ensures sufficient optimization of task-specific feature representations, thereby guaranteeing the model's detection accuracy and localization accuracy in cross-domain scenarios.
[0056] Meanwhile, by using a CycleGAN-based intermediate domain generator, a smooth intermediate domain is constructed between the source and target domains, effectively reducing the loss of high-level semantic information during traditional image-to-image conversion. Furthermore, by adaptively integrating features from the last three layers of the backbone network through a multi-scale feature fusion module (FFM), the domain discrimination capability is enhanced, achieving 44.1% mAP on the Cityscapes to Foggy Cityscapes task, a 1.5% improvement over the current state-of-the-art method OMLF. Figure 4 As shown in Table 1; Table 1. Comparison of different models generalizing the Cityscapes dataset to Foggy Cityscapes. Achieving 45.8% mAP on the Pascal VOC to Clipart task also surpasses OMLF by 1.5%, as shown below. Figure 5 As shown in Table 2, the overall performance of unsupervised adaptive target detection is significantly improved.
[0057] Table 2 Comparison of different models generalizing Pascal VOC to Clipart As shown in Tables 3 and 4, the ablation experiments further demonstrate that the modules have strong complementarity. In the weather adaptation task, integrating all modules improved mAP by 3.9% compared to the baseline, and in the style transfer task, it improved by 4.7%, significantly improving the overall performance of unsupervised adaptive target detection.
[0058] Table 3 Ablation experiments on the Cityscapes and Foggy Cityscapes datasets of this invention Table 4 Ablation experiments of this invention on the Pascal VOC and Clipart datasets In another exemplary embodiment, based on the same inventive concept as the method, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the cross-domain target detection method based on feature decomposition formed by any or a combination of the above examples. The processor may be a single-core or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present invention.
[0059] In another exemplary embodiment, based on the same inventive concept as the method, the present invention also provides a storage medium having the same inventive concept as the feature decomposition-based cross-domain target detection method formed by any or more of the above examples, wherein computer instructions are stored thereon, which, when executed, perform the steps of the feature decomposition-based cross-domain target detection method formed by any or more of the above examples.
[0060] Based on this understanding, the technical solution of this embodiment, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0061] In another exemplary embodiment, based on the same inventive concept as the method, the present invention also provides a terminal having the same inventive concept as any example or combination of examples corresponding to the above-described cross-domain target detection method based on feature decomposition, including a memory and a processor. The memory stores computer instructions executable on the processor, and the processor executes the steps of the above-described cross-domain target detection method based on feature decomposition when executing the computer instructions. The processor may be a single-core or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present invention.
[0062] In one example, the terminal, i.e., the electronic device, is represented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: at least one processing unit (processor) mentioned above, at least one storage unit mentioned above, and a bus connecting different system components (including storage units and processing units).
[0063] The storage unit stores program code that can be executed by the processing unit, causing the processing unit to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit can perform the aforementioned cross-domain target detection method based on feature decomposition.
[0064] The storage unit may include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 3201 and / or a cache storage unit, and may further include a read-only memory (ROM).
[0065] The storage unit may also include a program / utility having a set (at least one) of program modules, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0066] A bus can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus that uses any of the various bus structures.
[0067] The electronic device can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be performed via input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. The network adapter communicates with other modules of the electronic device via a bus. It should be understood that other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0068] Through the above description, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to this exemplary embodiment can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method of the exemplary embodiment of this application.
[0069] The above detailed embodiments are a description of the present invention. It should not be considered that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, several simple deductions and substitutions can be made without departing from the concept of the present invention, and all of these should be considered to fall within the protection scope of the present invention.
Claims
1. A cross-domain target detection method based on feature decomposition, characterized in that, Includes the following steps: S1. A CycleGAN-based intermediate domain generator is used to convert the source domain image into an intermediate domain image, wherein the intermediate domain generator preserves the high-level semantic features of the source and target domains through domain adversarial training and cycle consistency loss. S2. Extract multi-scale features from source domain images, intermediate domain images, and target domain images using a backbone network; S3. A feature fusion module is used to integrate the multi-scale features of the last three layers of the backbone network for fusion. The feature fusion module combines a multi-scale attention mechanism and a gradient reversal layer to perform feature fusion. S4. The fused features are decomposed by a feature decomposition module, which includes a global decoupling module and an instance-level decoupling module, for performing feature decomposition along the channel, height and width dimensions; S5. A subtask alignment module is used to independently optimize the classification task and the localization task. The subtask alignment module decouples the classification and localization tasks through multiple classifiers and localizers and achieves cross-domain feature alignment.
2. The cross-domain target detection method based on feature decomposition according to claim 1, characterized in that, The objective function of the intermediate domain generator is: Where G and F are generators, X represents the source domain sample, and Y represents the target domain sample. and It is a discriminator. It is a counter-loss. This represents the loss of cycle consistency.
3. The cross-domain target detection method based on feature decomposition according to claim 1, characterized in that, Step S3 specifically includes: The attention weights between the features of the first and second layers are calculated using a multi-scale attention mechanism. ; Generate intermediate features ; Calculate intermediate features using a multi-scale attention mechanism. and third layer features Attention weights between Generate final fusion features ,in This represents the Hadamard product of the feature maps.
4. The cross-domain target detection method based on feature decomposition according to claim 1, characterized in that, The Global Decoupling Module (GDM) employs a triplet optimization strategy based on squared Euclidean distance, with the following loss function: , in This represents the squared Euclidean distance between neighborhood predictions, where m is a margin set to 0.
25. The instance-level decoupling module extracts local features through a region proposal network and an ROI Align layer, and its loss function is defined using cosine similarity: , in The cosine similarity between two vectors is defined as: , and These represent instance characteristics that are shared by the domain and specific to the domain, respectively.
5. The cross-domain target detection method based on feature decomposition according to claim 1, characterized in that, The domain adaptation loss function for the classification task in the subtask alignment module is: ; in , where p represents the entropy vector, c is the total number of categories, and q represents the average probability vector; The domain adaptation loss function for the localization task in the subtask alignment module is: , It is a column vector of the predicted probabilities of all classifiers for class i.
6. The cross-domain target detection method based on feature decomposition according to claim 1, characterized in that, The loss function of the domain classifier: 。 7. The cross-domain target detection method based on feature decomposition according to claim 1, characterized in that, The total loss function of the method is: 。 8. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the cross-domain target detection method based on feature decomposition as described in any one of claims 1-7.
9. A storage medium storing computer instructions thereon, characterized in that, When the computer instructions are executed, they perform the steps of the cross-domain target detection method based on feature decomposition as described in any one of claims 1-7.
10. A terminal comprising a memory and a processor, wherein the memory stores computer instructions executable on the processor, characterized in that, When the processor executes the computer instructions, it performs the steps of the cross-domain target detection method based on feature decomposition as described in any one of claims 1-7.