An online passive domain target detection method and device based on dynamic feature accumulation, equipment and medium
By using the student-teacher network dynamic feature accumulation method of YOLOv5 architecture, pseudo-source domain features are generated and the model is optimized, which solves the problem of low model update efficiency in online passive domain adaptation and achieves efficient detection and improved stability of the target domain.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-24
AI Technical Summary
Existing online passive domain adaptation methods struggle to efficiently utilize target domain data for model updates in real-time scenarios and lack effective accumulation of source domain features, resulting in insufficient model detection stability and generalization ability in the target domain.
A student-teacher network based on the YOLOv5 architecture is adopted to generate pseudo-source domain features through dynamic feature accumulation. The teacher network is used for channel affine modulation and memory bank update. The model is trained and optimized by combining high-confidence target detection results and positive and negative sample pairs to generate a target detection model.
Without requiring source domain data, the model's real-time adaptability and detection performance in the target domain are improved, and the detection accuracy and stability in the target domain are enhanced.
Smart Images

Figure CN121415205B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence and machine learning, and particularly relates to an online unsupervised domain target detection method based on dynamic feature accumulation, device, equipment and medium. BACKGROUND
[0002] Traditional target detection methods rely on a large amount of labeled data for supervised learning, but in actual deployment, it is often costly and unfeasible to obtain labeled data of the target domain, while unsupervised domain adaptation aims to use a model trained on labeled data of the source domain to adapt to unlabeled data of the target domain, thereby improving the performance of the model in the target domain. In recent years, with the increasing demand for online learning and real-time data processing, online unsupervised domain adaptation has become a research hotspot, which requires the model to be able to process the target domain data stream in real time and dynamically update its parameters to adapt to the changes in the target domain.
[0003] Online unsupervised domain adaptation technology further requires the model to be able to process the target domain data stream in real time and dynamically update the model parameters. Existing methods include: first, quickly adapting by minimizing the prediction entropy, usually only updating the batch normalization (BN) layer or the channel affine parameter. Second, introducing an IoU filtering mechanism to select high-quality pseudo-labels, thereby enhancing the model performance during single-image testing. Third, using a memory bank to store the prototype features of the target domain, and optimizing the model performance through contrastive learning. Fourth, selecting the frame with the largest difference from the history through incremental clustering, and combining a teacher-student network to realize online adaptation. However, some methods based on contrastive learning require a large batch size and complex input enhancement, making it difficult to run efficiently in real-time scenarios, and usually require a certain amount of target domain data to be accumulated before updating, which cannot meet the real-time requirements in online scenarios. At the same time, during the dynamic updating process, there is a lack of effective accumulation and utilization of source domain features.
[0004] Therefore, there is an urgent need for a more efficient and accurate target detection method to dynamically update the model to improve the detection stability and generalization ability of the model in the target domain under the condition that the source domain data is inaccessible and the target domain data stream gradually arrives. SUMMARY
[0005] The main purpose of the present application is to provide an online unsupervised domain target detection method based on dynamic feature accumulation, device, equipment and medium, which aims to solve the technical problem of how to dynamically update the model to adapt to the distribution changes of the target domain.
[0006] To achieve the above purpose, the present application provides an online unsupervised domain target detection method based on dynamic feature accumulation, comprising:
[0007] Obtaining unlabeled images of the target domain;
[0008] inputting the unlabeled image of the target domain into a preset target detection model for inference to generate a target detection result, wherein the target detection result comprises target bounding box position and category information;
[0009] Before the step of inputting the unlabeled image of the target domain into a preset target detection model for inference to generate a target detection result, the method further comprises:
[0010] obtaining a historical sample image and constructing an initial target detection model, wherein the initial target detection model comprises a student network and a teacher network, the unified architecture of the student network and the teacher network is a YOLOv5 architecture, and the YOLOv5 architecture comprises a backbone network, a feature fusion module and a detection head;
[0011] initializing parameters of the student network and the teacher network, and loading core parameters of a source domain detector as initial weights of the student network and the teacher network, wherein the core parameters comprise backbone network weights and detection head parameters;
[0012] performing confidence evaluation on the historical sample image by a source domain detector to obtain a sample confidence;
[0013] when the sample confidence is greater than a preset gating threshold, performing a dynamic feature accumulation strategy on the historical sample image to generate pseudo-source domain features;
[0014] injecting the pseudo-source domain features into the teacher network for channel affine modulation to generate pseudo-labels and anchor box features;
[0015] performing confidence filtering on the pseudo-labels to obtain high-confidence target detection results;
[0016] updating a global memory bank based on the anchor box features to obtain an updated memory bank, wherein the global memory bank is used to store prototype patterns of target distribution;
[0017] performing retrieval in the updated memory bank by the student network to obtain a positive and negative sample pair related to the anchor box features;
[0018] training and optimizing the student network in combination with the high-confidence target detection results and the positive and negative sample pair to obtain a preset target detection model.
[0019] In an embodiment, the step of performing a dynamic feature accumulation strategy on the historical sample image to generate pseudo-source domain features comprises:
[0020] performing forward propagation on the historical sample image by a teacher network to obtain a feature tensor of a backbone network;
[0021] Calculate a mean value and a standard deviation on a channel dimension based on the feature tensor, and obtain a channel statistic;
[0022] Update a global cumulative statistic based on the channel statistic, and obtain an updated cumulative statistic, wherein the global cumulative statistic includes a channel mean cumulative sum, a channel standard deviation cumulative sum, and an effective count;
[0023] Perform normalization processing on the global cumulative statistic, and obtain a normalized cumulative statistic;
[0024] Generate a pseudo-source domain feature according to the normalized cumulative statistic.
[0025] In an embodiment, the step of injecting the pseudo-source domain feature into the teacher network for channel affine modulation to generate a pseudo-label and an anchor box feature includes:
[0026] Input the pseudo-source domain feature into a P4 layer of the teacher network for small-amplitude channel affine modulation to obtain a modulated P4 layer feature;
[0027] Input the modulated P4 layer feature into a feature fusion module of the teacher network for feature fusion and enhancement to obtain a fused feature;
[0028] Input the fused feature into a detection head of the teacher network for prediction to output a candidate target bounding box and a class probability;
[0029] Determine a class confidence of each candidate target bounding box according to the class probability to generate a pseudo-label;
[0030] Extract a feature vector corresponding to an anchor box based on the candidate target bounding box to obtain an anchor box feature.
[0031] In an embodiment, the step of updating a global memory bank based on the anchor box feature to obtain an updated memory bank includes:
[0032] Project the anchor box feature into a key vector through a first fully connected layer in the teacher network;
[0033] Project the anchor box feature into a value vector through a second fully connected layer in the teacher network;
[0034] Calculate each memory item in the global memory bank as a query with the key vector to obtain a cross-attention score;
[0035] Weighted aggregation according to the cross-attention score and the value vector updates the memory item in the global memory bank;
[0036] Store the updated memory item into the global memory bank to form an updated global memory bank.
[0037] In an embodiment, the step of searching in the updated memory bank through the student network to obtain a positive-negative sample pair related to the anchor box feature includes:
[0038] inputting the anchor box feature into a full connection layer in the student network for projection to obtain a student query feature;
[0039] calculating the student query feature and each memory item in the updated global memory bank to obtain a cross-attention score;
[0040] screening based on the cross-attention score according to a first screening requirement to obtain a positive sample related to the anchor box feature;
[0041] screening based on the student query feature and each memory item in the updated global memory bank according to a second screening requirement and a preset proportion to obtain a negative sample related to the anchor box feature;
[0042] combining the positive sample and the negative sample to obtain a positive-negative sample pair related to the anchor box feature.
[0043] In an embodiment, the step of training and optimizing the student network in combination with the high-confidence target detection result and the positive-negative sample pair to obtain a preset target detection model includes:
[0044] performing strong enhancement processing on a historical sample image to obtain a strong enhancement view sample;
[0045] inputting the strong enhancement view sample into the student network to obtain a prediction result;
[0046] calculating based on the prediction result and the high-confidence target detection result to obtain a cross-entropy loss;
[0047] performing Euclidean norm normalization on the feature vectors in the positive-negative sample pair to calculate the similarity between the positive sample pairs and the similarity between the negative sample pairs;
[0048] calculating based on the similarity to obtain a memory contrast loss;
[0049] weighting and summing the cross-entropy loss and the memory contrast loss according to a preset weight to obtain a student network total loss;
[0050] updating the parameters of the student network by using a gradient descent algorithm to perform back propagation on the student network total loss;
[0051] Set a sample interval, trigger a stabilization update after accumulating and processing samples in the sample interval, align the student network parameters to the teacher network parameters, repeat the training until the total loss of the student network is less than a preset loss threshold, and obtain a preset target detection model.
[0052] In an embodiment, the step of inputting the target domain unlabeled image into the preset target detection model for inference to generate a target detection result comprises:
[0053] Preprocessing the target domain unlabeled image to obtain a processed input image;
[0054] Performing forward inference on the processed input image by a preset target detection model to obtain an initial prediction result, wherein the initial prediction result includes a candidate target bounding box and class information;
[0055] Performing non-maximum suppression processing on the initial prediction result to eliminate redundant bounding boxes to obtain an optimized prediction result;
[0056] Performing confidence screening on the optimized prediction result according to a preset confidence requirement to obtain a target bounding box and corresponding class information;
[0057] Integrating the target bounding box and the corresponding class information to generate a target detection result.
[0058] In addition, to achieve the above object, the application further provides an online passive domain target detection device based on dynamic feature accumulation, which comprises:
[0059] An acquisition module configured to acquire a target domain unlabeled image;
[0060] The result module is configured to input the target domain unlabeled image into a preset target detection model for inference to generate a target detection result, wherein the target detection result comprises target bounding box position and category information; and configured to obtain historical sample images and construct an initial target detection model, wherein the initial target detection model comprises a student network and a teacher network, the unified architecture of the student network and the teacher network is a YOLOv5 architecture, the YOLOv5 architecture comprises a backbone network, a feature fusion module and a detection head; the parameters of the student network and the teacher network are initialized, and the core parameters of a source domain detector are loaded as the initial weights of the student network and the teacher network, wherein the core parameters comprise backbone network weights and detection head parameters; the historical sample images are subjected to confidence evaluation by the source domain detector to obtain sample confidence; when the sample confidence is greater than a preset gating threshold, a dynamic feature accumulation strategy is performed on the historical sample images to generate pseudo-source domain features; the pseudo-source domain features are injected into the teacher network for channel affine modulation to generate pseudo-labels and anchor box features; the pseudo-labels are subjected to confidence filtering to obtain high-confidence target detection results; the global memory bank is updated based on the anchor box features to obtain an updated memory bank, wherein the global memory bank is used to store prototype patterns of target distribution; the student network is searched in the updated memory bank to obtain positive and negative sample pairs related to the anchor box features; and the student network is trained and optimized in combination with the high-confidence target detection results and the positive and negative sample pairs to obtain a preset target detection model.
[0061] In addition, to achieve the above object, the application further provides a storage medium, which is a computer readable medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the online passive domain target detection method based on dynamic feature accumulation.
[0062] In addition, to achieve the above object, the application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the online passive domain target detection method based on dynamic feature accumulation.
[0063] The application initializes the weights of the student network and the teacher network by constructing an initial model comprising a student-teacher network of the YOLOv5 architecture and loading the core parameters of a source domain detector; after confidence screening of the historical sample images, pseudo-source domain features are generated by dynamically accumulating features and injected into the teacher network to generate pseudo-labels and anchor box features, and the global memory bank is updated; the student network searches the memory bank to obtain positive and negative sample pairs, and the student network is trained and optimized in combination with the high-confidence pseudo-labels to obtain a preset target detection model, which is used for target domain unlabeled image detection, and in the case that no source domain data is needed, the real-time adaptability and generalization ability of the model in the target domain are improved, and the target domain detection performance is optimized. BRIEF DESCRIPTION OF DRAWINGS
[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
[0065] Figure 1 The flowchart of the first embodiment of the online passive domain target detection method based on dynamic feature accumulation of the present application;
[0066] Figure 2 The flowchart of the second embodiment of the online passive domain target detection method based on dynamic feature accumulation of the present application;
[0067] Figure 3 The flowchart of the third embodiment of the online passive domain target detection method based on dynamic feature accumulation of the present application;
[0068] Figure 4 The module structure diagram of the online passive domain target detection device based on dynamic feature accumulation of the first embodiment of the online passive domain target detection method based on dynamic feature accumulation of the present application;
[0069] Figure 5 The device structure diagram of the hardware running environment involved in the online passive domain target detection method based on dynamic feature accumulation in the embodiments of the present application.
[0070] The purpose implementation, functional features and advantages of the present application will be further explained with reference to the embodiments and the drawings. DETAILED DESCRIPTION
[0071] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0072] In order to better understand the technical solutions of the present application, the drawings in the specification and the specific embodiments will be described in detail.
[0073] Online unsupervised domain adaptation techniques further require the model to process target domain data stream in real-time and dynamically update model parameters. Existing methods include: first, fast adaptation by minimizing prediction entropy, usually only updating batch normalization layers or channel affine parameters. Second, filter high-quality pseudo labels by introducing an IoU filtering mechanism, thereby enhancing model performance when testing single images. Third, use a memory bank to store prototype features of the target domain, and optimize model performance through contrastive learning. Fourth, select the frame with the largest historical difference for updating through incremental clustering, and realize online adaptation combined with teacher-student networks. However, some contrastive learning-based methods require large batch sizes and complex input enhancements, making it difficult to run efficiently in real-time scenarios, and usually require a certain amount of target domain data to be accumulated before updating, which cannot meet the real-time requirements in online scenarios. At the same time, in the process of dynamic updating, there is a lack of effective accumulation and utilization of source domain features.
[0074] Based on the above, the embodiments of the present application provide an online unsupervised domain target detection method based on dynamic feature accumulation. Referring to Figure 1 , Figure 1 The flowchart of the first embodiment of the online unsupervised domain target detection method based on dynamic feature accumulation of the present application is shown in the figure.
[0075] In this embodiment, the online unsupervised domain target detection method based on dynamic feature accumulation includes steps S10-S20:
[0076] Step S10, obtaining target domain unlabeled images.
[0077] It should be noted that the target domain refers to the scene where the model is actually deployed and applied, and its data distribution may be significantly different from the source domain (i.e. the domain where the labeled data used for model training is located), such as different environmental conditions (e.g. weather, lighting), sensor characteristics (e.g. camera model, resolution) or scene content (e.g. urban streets and rural roads). These differences result in a significant drop in performance when directly applying the model trained in the source domain to the target domain. Target domain unlabeled images refer to image data collected in the target application scenario, which have not been manually labeled (such as target class, location, etc.).
[0078] In practical applications, the acquisition method of target domain images is various. For example, in the automatic driving scene, the target domain images may come from the cameras on the vehicle, which capture image data in the road environment in real time. These images contain various targets (such as vehicles, pedestrians, traffic signs, etc.), but they are usually unlabeled due to the high cost of labeling and the difficulty of real-time labeling. In the security monitoring field, the target domain images may come from the monitoring cameras, which record the activities in the monitoring area uninterruptedly. Similarly, these image data are huge and lack of labeling information. In these scenarios, the purpose of acquiring target domain unlabeled images is to enable the target detection model to adapt to environmental changes in real time, such as weather changes, changes in lighting conditions, or dynamic changes in targets in the scene.
[0079] Acquiring high-quality target domain unlabeled images is the basis for the success of online source-free target detection technology. First, the resolution and quality of the image have a direct impact on the performance of the model. High-resolution and high-quality images can provide more detailed information, which helps the model to detect targets more accurately. Second, the image acquisition frequency is also important. In dynamic scenarios such as autonomous driving or real-time monitoring, images need to be collected at a high frequency to ensure that the model can capture the dynamic changes of the target in time. In addition, the performance and parameter settings of the image acquisition device (such as the camera) will also affect the quality of the image. For example, the exposure time, aperture size, focal length, and other parameters of the camera need to be optimized according to the specific application scenario to ensure that the acquired images can meet the requirements of target detection.
[0080] Step S20, inputting the target domain unlabeled image into the preset target detection model for inference to generate a target detection result.
[0081] It should be noted that the preset target detection model is composed of a student network and a teacher network, and the unified architecture of the two is based on YOLOv5. This architecture selection provides important support for the efficiency and adaptability of the model. YOLOv5 is an advanced single-stage target detection architecture, which has been widely used in various application scenarios due to its efficiency and real-time performance. Its architecture mainly consists of three parts: backbone network, feature fusion module and detection head. The backbone network is responsible for extracting features from the input image, usually using a deep convolutional neural network (such as CSPDarknet) to achieve this. These networks can extract low-level features (such as edges, textures) and high-level semantic features (such as target shape and category information) from images. The feature fusion module is used to fuse features at different levels to enhance the expression ability of the features. For example, through structures such as feature pyramid network (FPN) or path aggregation network (PANet), shallow features and deep features can be effectively combined to improve the detection accuracy of the model. The detection head part is responsible for mapping the fused features to the target detection result, including the position and category information of the target bounding box. Usually, the detection head will further process the features through convolutional layers and fully connected layers, etc., and finally output the target detection result, which includes the target bounding box position and category information.
[0082] In this embodiment, the preset target detection model is composed of a student network and a teacher network. This design draws on the idea of the teacher-student framework. The role of the teacher network is to provide stable guidance signals to help the student network better learn the feature distribution of the target domain. The teacher network provides supervision information for the target domain data through methods such as pseudo-label generation and memory bank updating, thereby guiding the training of the student network. The student network is responsible for performing the actual detection task in the target domain and continuously optimizes its own parameters through interaction with the teacher network. This design not only makes full use of the unlabeled data in the target domain, but also enables effective adaptation of the model when the source domain is inaccessible. When the target domain unlabeled image is input into the preset target detection model, it is first processed by the backbone network for feature extraction. The backbone network converts the original pixel information of the input image into semantic feature representations through a series of convolutional layers and residual blocks. These feature representations contain target information such as target location, shape, and category features. Subsequently, the feature fusion module further processes these features through cross-scale feature fusion and path aggregation to enhance the robustness and expressiveness of the features. This process is crucial for improving the model's ability to detect targets in different scales and complex backgrounds. After processing by the feature fusion module, the features are sent to the detection head part for final target detection. The detection head processes the features through convolutional layers and fully connected layers to generate target detection results. These results include the location information of the target bounding box (such as x, y coordinates and width and height) and the category information of the target. In this process, the detection head part usually uses techniques such as non-maximum suppression (NMS) to remove redundant bounding boxes and ensure that each target is detected only once. It is worth noting that although the target domain images have no labeled information, the teacher network can generate high-quality pseudo-labels through confidence evaluation of historical sample images. These pseudo-labels provide supervision signals for the student network, enabling it to effectively learn on unlabeled data. At the same time, the teacher network also provides stable feature representations for the target domain data through the memory bank updating mechanism. The student network uses these pseudo-labels and feature information in the memory bank to further optimize its detection performance during inference.
[0083] Further, the experimental data is analyzed and illustrated in this section, which provides a detailed description of the experimental verification process of the method (PSFA) in this embodiment. This section covers various aspects such as experimental setup, experimental data set, evaluation criteria, baseline setting, and experimental results and analysis. The experiment uses YOLOv5 as the unified backbone architecture for both the teacher network and the student network, specifically including YOLOv5s (small model) and YOLOv5l (large model) of two sizes to ensure the comparability and practicality of the experiment. The teacher network uses the exponential moving average (EMA) mechanism to synchronize the student network parameters, with an EMA coefficient of 0.99; the student network uses the stabilization update (SSM) mechanism to suppress parameter drift and maintain consistency with the offline experimental setting. In the sample screening stage, the fixed source domain detector is used to evaluate the confidence of the target domain samples, with a preset gating threshold of 0.5. Only when the sample-level average confidence is greater than or equal to 0.5, the sample participates in the pseudo-source domain feature accumulation and memory contrast learning. The pseudo-label generation uses a confidence threshold of 0.9 combined with non-maximum suppression (NMS) and cross-scale consistency screening protocol to filter low-quality pseudo-labels; the global memory bank size is set to 512, which is used to store the prototype patterns of the target domain distribution.
[0084] Four public data sets were selected for the experiment, constituting three adaptation scenarios: normal weather → bad weather (Cityscapes → FoggyCityscapes, C2F), cross-camera / collection conditions (KITTI → Cityscapes, K2C), and synthetic → real (Sim10K → Cityscapes, S2C). These data sets cover three types of domain differences: cross-weather, cross-camera / collection conditions, and synthetic → real, which can comprehensively evaluate the adaptation ability of the model.
[0085] Cityscapes: daytime, good weather street view images from 50 cities, annotated with 8 categories (bus, bicycle, car, motorcycle, person, rider, train, truck), with 2975 training images and 500 validation images.
[0086] FoggyCityscapes: synthetic fog effect on Cityscapes to simulate bad weather; use fog intensity 0.02 (about 150m visibility) according to the passing protocol.
[0087] KITTI: autonomous driving / mobile robot scene data, 2D detection training set contains 7481 real labeled images; similar to Cityscapes but with differences in camera modalities, etc.
[0088] Sim10K: a synthetic car dataset generated based on the GTA-V engine, with 10,000 images, commonly used for synthetic → real domain adaptation evaluation.
[0089] Adaptation scenarios and category caliber: adopt C2F (normal weather -> fog), K2C (cross camera / scene), S2C (synthetic -> real) three benchmarks; since Sim10K only annotates cars, follow the literature to evaluate car class AP in S2C, K2C scenarios, and evaluate 8-class mAP in C2F. The experiment adopts precision (Precision), recall (Recall), average precision (AP) and mAP value four kinds of indexes to comprehensively measure the performance of each method in the task of offline unsupervised domain adaptation detection. These indicators comprehensively evaluate the performance of the model in the domain adaptation target detection task from different angles.
[0090] To comprehensively evaluate the performance of PSFA, four representative online unsupervised domain target detection methods are selected as baselines: first, Tent, which realizes fast adaptation by minimizing prediction entropy during testing, as a weak baseline; second, F-TTAOD, which filters pseudo labels through IoUFilter to improve single-image adaptation stability; third, MemCLR, which adopts a cross-attention memory module to build a global memory bank to alleviate the dependence of contrastive learning on large batches of data; fourth, O-SFDA, which optimizes sample selection through a two-stage sample collection strategy.
[0091] According to the comparison results of BDGN-YOLO and online domain adaptation methods in C2F scenarios shown in Table 1 and the comparison results of BDGN-YOLO and online domain adaptation methods in K2C and S2C scenarios shown in Table 2.
[0092] Table 1 Comparison results of PSFA and online domain adaptation methods in C2F scenarios
[0093]
[0094] Table 2 Comparison results of PSFA and online domain adaptation methods in K2C and S2C scenarios
[0095]
[0096] It can be seen that first, in the 8-class target detection task, the mAP@0.5 of the online baseline method from low to high is Tent (26.8), F-TTAOD (26.9), MemCLR (29.8), and O-SFDA (32.1). PSFA performs significantly better: the mAP@0.5 of the YOLOv5s version (PSFA-v5s) reaches 35.5, which is 3.4 higher than O-SFDA, with an increase of 10.6%; the mAP@0.5 of the YOLOv5l version (PSFA-v5l) is as high as 47.6, which is 15.5 higher than O-SFDA, with an increase of 48.3%. In terms of class performance, PSFA has the most obvious improvement on long vehicle classes such as train (train) and truck (truck) that are prone to degradation in foggy weather, with the train class AP of PSFA-v5l increasing by 102.6% and the truck class AP increasing by 51.9%, verifying the repair capability of pseudo-source domain feature accumulation to environmental domain bias. Second, in the car class single target detection task, PSFA still maintains a leading advantage. In the K2C scene, the AP@0.5 of PSFA-v5s is 43.4, which is 3.9 higher than O-SFDA, with an increase of 9.9%; the AP@0.5 of PSFA-v5l reaches 65.5, which is 26.0 higher than O-SFDA, with an increase of 65.8%, even exceeding the Oracle model (58.5) trained by full supervision by 7.0. In the S2C scene (synthetic to real), the benefits of PSFA are more significant: the AP@0.5 of PSFA-v5s is 52.7, which is 19.0 higher than the model trained only in the source domain, with an increase of 56.4%; the AP@0.5 of PSFA-v5l reaches 69.3, which is 23.3 higher than O-SFDA, with an increase of 50.7%, which is 10.8 higher than the Oracle model, with a relative increase of 18.5%. Third, under the same method framework, the performance of YOLOv5l (large model) is significantly improved over YOLOv5s (small model), with relative increases of 34.1%, 50.9%, and 31.5% in the C2F, K2C, and S2C scenes, respectively, proving that greater channel capacity and deeper receptive field can more fully absorb the benefits of pseudo-source domain feature accumulation and memory contrast learning, and verifying the adaptability of the method and model size.
[0097] In this embodiment, the target domain unlabeled image is obtained, and then the dual domain generation network is used to extract the style features by the source domain encoder, extract the semantic features by the target domain encoder, and generate a new domain image by fusing the source domain style and the target domain semantics through the style fusion module and the decoder. Finally, the new domain image is input into the preset student-teacher network for reasoning to obtain a prediction result containing target categories, positions and confidence. Without the source domain data, the adaptability and detection accuracy of the target detection model to the target domain are effectively improved.
[0098] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can refer to the above introduction, and the subsequent will not be described. On this basis, please refer to Figure 2 , the online passive domain target detection method based on dynamic feature accumulation further comprises steps S201-S209 before step S20:
[0099] Step S201, acquire historical sample images and construct an initial target detection model.
[0100] It should be noted that acquiring historical sample images is a key prerequisite for constructing an initial target detection model. These historical sample images are usually derived from early data of the target domain, although they may not have annotation information, but they provide the model with preliminary information about the data distribution of the target domain. These images can be unannotated images collected from the target domain environment, or they can be representative images after preliminary screening. The acquisition of these images is diverse, for example, in the automatic driving scene, the historical sample images may come from the images collected by the vehicle camera within a certain time period; in the security monitoring field, the historical sample images may come from the images collected by the monitoring camera at different time periods or in different scenes. The selection and acquisition of these images need to consider the diversity and complexity of the target domain, so as to ensure that the model can adapt to various situations of the target domain.
[0101] After obtaining the historical sample images, the next step is to construct an initial target detection model. The initial target detection model includes a student network and a teacher network, which draws on the idea of the teacher-student framework. The role of the teacher network is to provide stable guidance signals to help the student network better learn the feature distribution of the target domain. The teacher network provides supervision information for the target domain data through methods such as pseudo-label generation and memory bank updating, thereby guiding the training of the student network. The student network is responsible for performing the actual detection task in the target domain and continuously optimizes its parameters through interaction with the teacher network. The unified architecture of the student network and the teacher network is the YOLOv5 architecture, which includes a backbone network, a feature fusion module, and a detection head. The backbone network is responsible for extracting features from input images and is usually implemented using a deep convolutional neural network (such as CSPDarknet). These networks can extract low-level features (such as edges and textures) and high-level semantic features (such as target shape and class information) from images. The feature fusion module is used to fuse features at different levels to enhance the expressiveness of the features. For example, through structures such as the Feature Pyramid Network (FPN) or the Path Aggregation Network (PANet), shallow features and deep features can be effectively combined to improve the detection accuracy of the model. The detection head part is responsible for mapping the fused features to the target detection results, including the position and class information of the target bounding box. Usually, the detection head will further process the features through convolutional layers and fully connected layers, and finally output the detection results.
[0102] Step S202, initialize the parameters of the student network and the teacher network, and load the core parameters of the source domain detector as the initial weights of the student network and the teacher network.
[0103] It should be noted that parameter initialization is an important step in deep learning model training, which directly affects the convergence speed and final performance of the model. In the target detection task, especially in the unsupervised domain adaptation scenario, the model needs to effectively learn and optimize on the target domain data. Since the target domain data usually has no labeled information and has distribution differences with the source domain data, the model needs a reasonable initial state to guide subsequent adaptive learning. Therefore, by loading the core parameters of the source domain detector as the initial weights, the model can inherit the general feature representation and detection ability learned in the source domain, thereby converging faster and achieving better performance in the target domain.
[0104] Specifically, the core parameters include backbone network weights and detection head parameters. The backbone network is the foundation of the target detection model, responsible for extracting features from input images. It is usually composed of a series of convolutional layers and residual blocks, capable of extracting low-level features (such as edges, textures) and high-level semantic features (such as target shape and category information) in images, therefore, the loading of backbone network weights not only includes the weights of convolutional layers, but also the weights in residual blocks and the parameters of normalization layers. The detection head is responsible for mapping the extracted features to the target detection results, including the position and category information of the target bounding box. The detection head is usually implemented through structures such as convolutional layers and fully connected layers, which classify and regress the features, therefore, the loading of detection head parameters includes the weights and biases of classification layers and regression layers. In the source domain detector, these parameters are obtained by supervised learning training on source domain data. The source domain data usually has rich annotation information, enabling the model to learn general feature representations and detection strategies for the target detection task. The application of these parameters in the target domain provides the model with prior knowledge about the target detection task, helping the model quickly adapt in the target domain.
[0105] By loading the core parameters of the source domain detector, the teacher network and the student network have similar feature extraction capabilities and detection strategies in the initial state.
[0106] Step S203, confidence evaluation of historical sample images is performed by the source domain detector to obtain sample confidence.
[0107] It should be noted that the source domain detector is a target detection model trained based on source domain data, which has high detection performance in the source domain. The source domain data usually has rich annotation information, enabling the model to learn general feature representations and detection strategies for the target detection task. In the source domain adaptation task, the source domain detector provides an initial detection capability to help the model perform preliminary analysis and screening in the target domain. By applying the source domain detector to the target domain images, the confidence scores of each detection result can be obtained, which reflect the model's confidence level for the detection result. Confidence evaluation is an important part of the target detection task, which is used to measure the model's confidence level for the detection result. In the source domain adaptation scenario, the target domain data usually has no annotation information, so it cannot be directly used to evaluate the model's performance. By performing confidence evaluation on the target domain images using the source domain detector, the model can filter out the detection results that it trusts, thereby reducing the impact of noise and errors on model training. This screening mechanism helps improve the model's adaptability and stability in the target domain, especially when there is a significant difference between the target domain data distribution and the source domain.
[0108] Specifically, when performing confidence evaluation on historical sample images, the sample confidence of each image needs to be calculated. The sample confidence is obtained by averaging or weighted averaging the confidence scores of all detection results in the image. Specifically, for an image containing multiple detection results, the average of the confidence scores of all detection results can be calculated as the sample confidence of the image. For example, if an image has 3 detection results with confidence scores of 0.7, 0.8 and 0.9, the sample confidence of the image is (0.7+0.8+0.9) / 3=0.8. The calculation of sample confidence can also consider the class distribution and number of detection results. For example, if there are more detection results of a certain class in an image, the confidence scores of that class can be weighted averaged to reflect the importance of that class in the image. In addition, the calculation of sample confidence can also introduce other factors, such as the size of the bounding box of the detection result, the position of the target, etc., to more comprehensively evaluate the confidence of the image. Through confidence evaluation, the model can filter out high-quality data, reduce the impact of noise and false information on training, and improve the adaptability and stability of the model in the target domain.
[0109] Step S204, when the sample confidence is greater than the preset gating threshold, performing a dynamic feature accumulation strategy on the historical sample images to generate pseudo-source domain features.
[0110] It should be noted that the purpose of this process is to simulate the feature distribution of the source domain by dynamically accumulating feature information in the target domain, so as to help the model better adapt to the feature changes in the target domain in the case of not being able to directly access the source domain data. The gating threshold is a pre-set confidence threshold used to determine which sample images can be used for subsequent feature accumulation and model optimization. In the target domain, since the data has no annotation information, the model cannot directly judge the accuracy of the detection results. Therefore, by setting the gating threshold, the model can filter out sample images with high confidence, which are considered to have high reliability in the target detection task. The setting of the gating threshold needs to be adjusted according to the distribution of the target domain data and the performance of the model. For example, if the distribution of the target domain data is significantly different from that of the source domain, the gating threshold can be appropriately increased to ensure that the filtered sample images have high quality.
[0111] Further, step S204 also includes: First, forward propagating the historical sample images through the teacher network to obtain the feature tensors of the backbone network. Specifically, during the forward propagation process, the input image first passes through multiple convolutional layers and residual blocks of the backbone network to progressively extract the image's feature information. Each convolutional layer performs a convolution operation on the input features to extract local features, while the residual blocks avoid the gradient vanishing problem through skip connections, ensuring that the network can learn deeper feature representations. Finally, the feature tensor output by the backbone network is a multi-dimensional tensor, whose dimensions typically include the number of channels, height, and width. The number of channels represents the depth of the feature, while height and width represent the spatial dimension of the feature. These feature tensors not only contain local information of the image but also integrate global information through the deep structure of the network, providing rich feature representations for subsequent feature processing. These feature tensors contain low-level features (such as edges and textures) and high-level semantic features (such as the shape and category information of the target) in the image. The backbone network of the teacher network typically uses a deep convolutional neural network (such as CSPDarknet), which can effectively extract feature information from the image.
[0112] Next, the mean and standard deviation along the channel dimension are calculated based on the feature tensor, yielding the channel statistics. The specific formula for calculating the mean is as follows:
[0113]
[0114] in, Indicates the first The average of each channel, and These represent the height and width of the feature tensor, respectively. Indicates the first Each channel is located in The characteristic value of . The formula for calculating the standard deviation is as follows:
[0115]
[0116] in, Indicates the first The standard deviation of each channel is used to obtain the complete channel statistics through the mean and standard deviation of each channel.
[0117] Next, the global cumulative statistics are updated based on the channel statistics, resulting in the updated cumulative statistics, which include the cumulative sum of channel means, the cumulative sum of channel standard deviations, and the effective count. The specific update formula is as follows:
[0118]
[0119] in, and respectively represent the channel mean sum and the channel standard deviation sum in the global cumulative statistics. represents the cumulative statistics interpolation coefficient. At the same time, the effective count is also increased accordingly:
[0120]
[0121] In this way, the global cumulative statistics can dynamically record the feature distribution information of the target domain data, providing a basis for subsequent pseudo source domain feature generation.
[0122] Then, the global cumulative statistics are normalized to obtain normalized cumulative statistics. The purpose of normalization is to standardize the global cumulative statistics, making them comparable. The specific formula is as follows:
[0123]
[0124] wherein, and respectively represent the normalized channel mean and standard deviation. Normalization can eliminate the scale difference between different sample images, ensuring that the generated pseudo source domain features have uniform statistical properties.
[0125] Finally, pseudo source domain features are generated according to the normalized cumulative statistics. Specifically, the generation process of pseudo source domain features is achieved through channel affine modulation. Channel affine modulation is a method of adjusting the channel level of feature tensors, which can make the statistical properties of feature tensors close to the normalized cumulative statistics. This adjustment process can help the model better adapt to the feature distribution of the source domain in the target domain. First, according to the normalized cumulative statistics and the channel statistics of the current sample, the target scale and bias are calculated. The calculation formula of the target scale and bias is:
[0126]
[0127] wherein, represents a control parameter used to adjust the strength of convergence to the cumulative statistics. Then, the channel affine modulation is performed on the feature tensor of the current sample to obtain the pseudo source domain feature, and the specific formula is:
[0128]
[0129] wherein, The pseudo-source domain feature represents the pseudo-source domain feature. The purpose of generating the pseudo-source domain feature is to provide a stable feature background for the model, so that the model can better adapt to the change of feature distribution in the target domain. The generation process of the pseudo-source domain feature simulates the feature distribution of the source domain by dynamically accumulating the feature information in the target domain. This simulation of feature distribution not only helps to reduce the distribution difference between the source domain and the target domain, but also can improve the detection performance of the model in the target domain.
[0130] In step S205, the pseudo-source domain feature is injected into the teacher network for channel affine modulation to generate pseudo-labels and anchor box features.
[0131] It should be noted that this process not only adjusts the feature representation of the teacher network through the pseudo-source domain feature to make it closer to the feature distribution of the source domain, but also provides supervision information for the target domain data by generating high-quality pseudo-labels and anchor box features, thereby guiding the training and optimization of the student network.
[0132] Further, step S205 includes: first, input the pseudo-source domain feature into the P4 layer of the teacher network for small channel affine modulation to obtain the modulated P4 layer feature. Specifically, the P4 layer of the teacher network is an important feature layer in the backbone network, usually located in the middle position of the feature pyramid, and has rich semantic information and certain spatial resolution. The P4 layer feature is crucial to the target detection task, because it can better balance the details and semantic information of the target. Injecting the pseudo-source domain feature into the P4 layer for channel affine modulation can effectively adjust the feature distribution of the P4 layer to make it closer to the feature distribution of the source domain. The modulated P4 layer feature is obtained by processing it through the same channel affine modulation formula as S204 above.
[0133] Next, the modulated P4 layer features are input into the feature fusion module of the teacher network for feature fusion and enhancement, obtaining the fused features. Specifically, the feature fusion module is an important component of the target detection model. In the YOLOv5 architecture, the feature fusion module usually adopts structures such as Path Aggregation Network (PANet) or Feature Pyramid Network (FPN). Its role is to fuse features of different levels to enhance the expression ability of the features. After inputting the modulated P4 layer features into the feature fusion module, the feature fusion module will further process the P4 layer features to enhance their feature expression ability. The feature fusion module will fuse the P4 layer features with features from other levels to generate fused features. Specifically, the feature fusion module will upsample fuse the P4 layer features with features from higher levels (such as P5 layer) to enhance the semantic information of the features. Then, the fused features are downsampled with features from lower levels (such as P3 layer) to enhance the detail information of the features. Through this cross-scale feature fusion, the feature fusion module can generate fused features with stronger expression ability, and these structures can effectively combine the detail information of low-level features and the semantic information of high-level features, thereby improving the detection accuracy of the model on targets.
[0134] Next, the fused features are input into the detection head of the teacher network for prediction, outputting candidate target bounding boxes and class probabilities. The detection head is the final output part of the target detection model, which maps the fused features to the target detection results. In the YOLOv5 architecture, the detection head usually processes the features through convolution layers and fully connected layers, finally outputting the positions of target bounding boxes and class probabilities. After inputting the fused features into the detection head, the detection head will perform classification and regression processing on the features to generate candidate target bounding boxes and class probabilities. The detection head will process the features through convolution layers to generate probability distributions for each target class and regression parameters for bounding boxes. These probability distributions and regression parameters are finally combined into candidate target bounding boxes and class probabilities as the output of the detection head. Specifically, first, the detection head processes the fused features through convolution layers to generate probability distributions for each target class. Then, the detection head processes the features through regression layers to generate regression parameters for bounding boxes. Finally, the detection head combines the probability distributions and regression parameters into candidate target bounding boxes and class probabilities as the final detection results.
[0135] Then, the class confidence of each candidate target bounding box is determined according to the class probability, and a pseudo label is generated. Specifically, for each candidate target bounding box, the detection head outputs a class probability distribution representing the probability that the bounding box belongs to each target class. The class confidence is the maximum value in the probability distribution, representing the highest confidence level of the model for the class to which the bounding box belongs. For example, if the class probability distribution of a candidate target bounding box is [0.1, 0.8, 0.1], its class confidence is 0.8, indicating that the model has 80% confidence that the bounding box belongs to the second class. According to the class confidence, a pseudo label can be generated. The pseudo label is a label containing the location and class information of the target bounding box, representing the model's detection result of the target, which is used for subsequent training and optimization. The purpose of generating a pseudo label is to provide supervision information for the target domain data, so that the student network can effectively learn and optimize on unlabelled data. Through the pseudo label, the student network can adjust its own parameters and gradually improve its detection performance in the target domain.
[0136] Finally, the anchor box features corresponding to the candidate target bounding box are extracted based on the anchor box features, and the anchor box features are obtained. Specifically, for each candidate target bounding box, the detection head outputs a corresponding feature vector representing the feature representation of the bounding box. These feature vectors are extracted from the fused features and contain the location and class information of the target. The role of the anchor box features is to provide stable feature representation for the target domain data, so that the student network can better understand and process the target features in the target domain. Through the anchor box features, the student network can better learn the feature distribution of the target domain, thereby improving the detection performance in the target domain.
[0137] Step S206, confidence filtering is performed on the pseudo label to obtain high-confidence target detection results.
[0138] It should be noted that the purpose of confidence filtering is to filter out those detection results that the model trusts from the generated pseudo labels. These high-confidence detection results usually have high accuracy and reliability, and can provide more accurate supervision information for the model. In this way, the model can avoid learning incorrect information, thereby improving its adaptability and generalization ability in the target domain. For each generated pseudo label, check whether its class confidence is higher than a pre-set confidence threshold. If the class confidence is higher than the threshold, the detection result is considered reliable and can be accepted; otherwise, the detection result is considered unreliable and will be filtered out. High-confidence target detection results play an important role in online unsupervised domain target detection. These results not only provide high-quality supervision information for the target domain data, but also provide stable feature representation for the target domain data through the memory bank update mechanism. The screening mechanism of high-confidence target detection results helps to reduce the impact of noise and incorrect information on model training, and improves the adaptability and stability of the model in the target domain.
[0139] At step S207, the global memory bank is updated based on the anchor box features, obtaining an updated memory bank.
[0140] It should be noted that the global memory bank is used to store the prototype patterns of the target distribution, which are obtained by accumulating and updating the anchor box features in the target domain, reflecting the feature representation and distribution characteristics of the target in the target domain. By updating the global memory bank, the model can dynamically accumulate the feature information in the target domain, thereby better adapting to the changes in the target domain and improving the detection performance.
[0141] Further, step S207 includes projecting the anchor box features through a first fully connected layer in the teacher network to a key vector. Specifically, the anchor box features are input to the first fully connected layer in the teacher network, and the key vector is output. The purpose of the key vector is to capture the main feature representation of the anchor box features, so as to subsequently perform similarity calculation with other memory items. The dimension of the key vector is usually low to reduce the computational complexity while retaining the key information. For example, if the dimension of the anchor box features is 256, the dimension of the key vector can be set to 128, which is specifically represented as:
[0142]
[0143] wherein, is the i-th anchor box feature, represents the weight matrix of the fully connected layer for generating the key vector, represents the key vector of the i-th anchor box. The anchor box features are projected through a second fully connected layer in the teacher network to a value vector. Specifically, the anchor box features are input to the second fully connected layer in the teacher network, and the value vector is output. The purpose of the value vector is to provide detailed information of the anchor box features for updating the memory items in the memory bank. The dimension of the value vector is usually the same as that of the key vector, but can be adjusted according to specific requirements, which is specifically represented as:
[0144]
[0145] wherein,
[0146] is the i-th anchor box feature, represents the weight matrix of the fully connected layer for generating the value vector, represents the value vector of the i-th anchor box.
[0147] Each memory item in the global attention memory is treated as a query and its similarity to the current anchor box feature is calculated. Specifically, the global attention memory stores prototype patterns of the target domain, and each memory item can be considered a query. To update the attention memory, the similarity between each memory item and the current anchor box feature needs to be calculated. This is done by treating each memory item in the global attention memory as a query and performing a dot product with the key vector to obtain the cross-attention score. The cross-attention score reflects the correlation between the memory item and the current anchor box feature, and the specific formula is as follows:
[0148]
[0149] in, Indicates at time step Time The anchor point box feature and the first Cross-attention score between memory items Indicates the first One memory item, The temperature parameter is used to scale the dot product result and affects the smoothness of the attention distribution; a smaller value indicates a lower temperature. A higher value will make attention more focused, while a higher value will make attention more focused. The value will make attention smoother. Represents the set of memory items in the global memory bank. Indicates the first One memory item, For indexing, all memory entries in the entire memory are traversed to calculate their relevance to the current anchor box features. This represents the exponential function, used to map the dot product result to the non-negative real number field for normalization.
[0150] The global attention database (GMR) entries are updated based on a weighted aggregation of the cross-attention score and the value vector. After obtaining the cross-attention score, the next step is to update the GMR entries based on the cross-attention score and the value vector. This update process is achieved through weighted aggregation, as shown in the following formula:
[0151]
[0152] in, This represents the updated memory item. Indicates the current number One memory item, This represents the set of anchor point boxes.
[0153] The updated memory entries are stored in the global memory, forming the updated global memory. Through a dynamic update mechanism, the global memory can record feature information in the target domain in real time, thus providing a stable feature background for the target domain data. This feature background not only helps reduce the distribution differences between the source and target domains but also improves the model's generalization ability in the target domain.
[0154] Step S208: Search the updated memory through the student network to obtain positive and negative sample pairs related to the anchor box features.
[0155] It's important to note that in the object detection task, the student network's detection head generates multiple anchor boxes, each predicting the location and category of the bounding box. These anchor box features are extracted from the student network's feature fusion module and contain information about the target's location and category. To further optimize the student network's performance, positive and negative sample pairs related to the current anchor box features need to be retrieved from the global memory for comparative learning. The global memory stores prototype patterns of the target domain, obtained by accumulating and updating features from historical data, reflecting the feature distribution of targets within the domain. By retrieving these patterns, the student network can find the most similar positive samples and the least similar negative samples to the current anchor box features, thus enabling comparative learning.
[0156] Further, step S208 includes: First, projecting the anchor box features into a fully connected layer in the student network to obtain student query features. Specifically, projecting the anchor box features into a fully connected layer in the student network to obtain student query features is specifically represented as follows:
[0157]
[0158] in, Indicates the first Student query characteristics of anchor boxes This represents the weight matrix used by the fully connected layer to generate the query vector. Indicates the first The anchor box features are used to retrieve similar items from the memory. The fully connected layer transforms the anchor box features into a low-dimensional feature representation for subsequent similarity calculations. For example, if the anchor box features have a dimension of 256, the fully connected layer can project them into a 128-dimensional feature space.
[0159] Next, the cross-attention score between the query feature and each memory item in the updated global memory bank is calculated. The cross-attention score is usually used to measure the similarity between the query feature and the memory item. The cross-attention score is a simple and effective similarity calculation method that can measure the correlation between two vectors. The specific formula is as follows:
[0160]
[0161] wherein, represents the cross-attention score between the i-th query feature and the j-th memory item, represents the i-th query feature, represents the j-th memory item, represents the temperature parameter, which is used to scale the dot product result and affects the smoothness of the attention distribution. A smaller value will make the attention more focused, while a larger value will make the attention more smooth, represents the set of memory items in the global memory bank, represents the i-th memory item, is the index that traverses all memory items in the memory bank to calculate the relevance to the current anchor box feature, represents the exponential function, which is used to map the dot product result to the non-negative real number domain to facilitate normalization processing. Next, based on the cross-attention score, the first screening requirement is screened to obtain the positive samples related to the anchor box feature. Specifically, the positive sample refers to the memory item most similar to the current anchor box feature, which usually represents a similar feature pattern to the current target. The specific formula is as follows:
[0162] wherein, represents the positive sample pair. The above first screening requirement will sort all memory items in descending order of dot product similarity. According to the preset threshold or quantity requirement, the top few memory items with the highest similarity are selected as positive samples. For example, the top 10% of memory items with the highest similarity can be selected as positive samples.
[0163]
[0164] wherein, represents the positive sample pair. The above first screening requirement will sort all memory items in descending order of dot product similarity. According to the preset threshold or quantity requirement, the top few memory items with the highest similarity are selected as positive samples. For example, the top 10% of memory items with the highest similarity can be selected as positive samples.
[0165] represents the positive sample pair. The above first screening requirement will sort all memory items in descending order of dot product similarity. According to the preset threshold or quantity requirement, the top few memory items with the highest similarity are selected as positive samples. For example, the top 10% of memory items with the highest similarity can be selected as positive samples.Then, based on the student query features and each memory item in the updated global memory bank, negative samples related to the anchor box features are obtained according to the second screening criteria and a preset ratio. Specifically, negative samples refer to memory items that are least similar to the current anchor box features. These memory items typically represent feature patterns different from the current target. Specifically, the similarity between the student query features and each memory item is first calculated using the following formula:
[0166]
[0167] in, Indicates the first The query feature and the first Similarity between memory items Indicates the first Each query feature This represents the modulo operation. The second screening requirement is to sort all memory items from lowest to highest based on their dot product similarity, and select a certain percentage of memory items with the lowest similarity as negative samples according to a preset ratio. For example, the top 10% of memory items with the lowest similarity can be selected. As a set of negative sample pairs Finally, the positive and negative samples are combined to obtain positive and negative sample pairs related to the anchor box features. These positive and negative sample pairs will be used for subsequent contrastive learning to enhance the student network's ability to distinguish target domain features.
[0168] Step S209: Combine the high-confidence target detection results and positive and negative samples to train and optimize the student network, and obtain the preset target detection model.
[0169] It should be noted that this step utilizes high-confidence pseudo-labels to provide direct supervision information for the target domain data, and also enhances the model's ability to distinguish target domain features through a contrastive learning mechanism, thereby achieving effective learning and optimization of the target domain data.
[0170] Further, step S209 includes: First, performing strong enhancement processing on the historical sample images to obtain strongly enhanced view samples. Specifically, strong enhancement processing is a data augmentation technique designed to increase the diversity of samples and improve the generalization ability of the model through random transformations (such as random cropping, color dithering, Gaussian blur, etc.). Strongly enhanced view samples can help student networks better adapt to various changes in the target domain.
[0171] Next, the strongly augmented view samples are input into the student network to obtain prediction results. Specifically, the strongly augmented view samples are input into the student network to obtain prediction results. These prediction results include the location and category information of the target bounding boxes. The goal of the student network is to make its detection results as close as possible to the high-confidence target detection results, thereby improving detection performance in the target domain.
[0172] Next, the cross-entropy loss is calculated based on the prediction results and the high-confidence object detection results. Cross-entropy loss is a commonly used classification loss function used to measure the difference between the student network's class predictions and the high-confidence object detection results, specifically expressed as:
[0173]
[0174] in, Indicates the first The true label of a sample is usually a one-hot encoded vector, where only one position is 1 and the rest are 0, indicating the category to which the sample belongs. Indicates the prediction of the first The probability distribution of each sample belonging to each category. The logarithmic function, representing the natural logarithm, is used to convert probabilities into logarithmic form to facilitate loss calculation. Specifically, the predicted class value, confidence value, and bounding box position value are extracted from the prediction results of the student network. Then, the true class value, true confidence value, and true bounding box position value are extracted from the high-confidence object detection results. Next, the cross-entropy loss is calculated based on the predicted class value and the true class value, the confidence loss is calculated based on the predicted confidence value and the true confidence value, and the bounding box regression loss is calculated based on the predicted bounding box position value and the true bounding box position value. Finally, preset weights are assigned to the three types of losses, and the cross-entropy loss, confidence loss, and bounding box regression loss are weighted and summed according to their respective weights to obtain the complete detection task loss.
[0175] Next, Euclidean norm normalization is applied to the feature vectors of the positive and negative sample pairs, and the similarity between positive and negative sample pairs is calculated. Specifically, Euclidean norm normalization is a commonly used feature normalization method that can unify the length of feature vectors, thereby improving the accuracy of similarity calculation. The similarity between normalized feature vectors can be calculated using dot product or cosine similarity. By calculating the similarity between positive and negative sample pairs, the student network can better learn the feature distribution of the target domain and enhance its ability to distinguish features.
[0176] Subsequently, based on similarity, the memory contrastive loss is calculated. Specifically, the memory contrastive loss is a contrastive learning loss function used to shorten the distance between positive sample pairs and widen the distance between negative sample pairs. The formula for calculating the memory contrastive loss is as follows:
[0177]
[0178] in, Indicates the first One negative sample, represents the negative sample set, and the role of the memory contrast loss is to enhance the student network's ability to distinguish target domain features, enabling the model to better identify similar target features while distinguishing different target features.
[0179] Then, the cross-entropy loss and the memory contrast loss are weighted and summed according to the preset weight to obtain the total loss of the student network, and the specific formula is as follows:
[0180]
[0181] wherein, is a weight coefficient used to balance the weight between the cross-entropy loss and the contrast loss. Its value range is usually between 0 and 1.
[0182] Then, the gradient descent algorithm is used to perform backpropagation on the total loss of the student network to update the parameters of the student network. Gradient descent is a commonly used optimization algorithm that calculates the gradient of the total loss function to adjust the parameters of the model, thereby minimizing the loss function. To further improve the stability of the model, stabilization update mechanisms such as exponential moving average (EMA) and student stabilization mechanism (SSM) can be used. These mechanisms smooth the parameter updates to reduce oscillations in the model during training. During training, the teacher model does not directly participate in gradient descent, but is passively updated by the exponential moving average. At the same time, to prevent overfitting of the student model during the update process, the student model will perform a student stabilization mechanism update after learning a fixed number of samples, fusing the student model's bottom parameters with the current teacher model's parameters by a certain percentage.
[0183] Finally, set the sample interval, trigger the stabilization update after processing the sample interval of samples, align the student network parameters with the teacher network parameters, and repeat the training until the total loss of the student network is less than the preset loss threshold to obtain the preset target detection model. Specifically, the sample interval refers to triggering the stabilization update once every certain number of samples during training. The purpose of setting the sample interval is to introduce a regular parameter correction mechanism during model training to ensure that the student network can gradually and stably learn the feature distribution of the target domain. The size of the sample interval can be adjusted according to the characteristics of the specific task and data stream. The preset loss threshold is a parameter used to control the stopping condition of training. When the total loss of the student network is less than the preset loss threshold, it is considered that the model has reached a satisfactory performance level and training can be stopped. The setting of the preset loss threshold needs to be adjusted according to the specific task and data set. A lower loss threshold means that the model needs to achieve a higher performance level, but will increase the training time and computational cost.
[0184] The embodiment adopts YOLOv5 architecture to construct student and teacher networks, and is initialized by loading core parameters of a source domain detector. Pseudo source domain features are generated by using a dynamic feature accumulation strategy, and pseudo label and anchor box features are injected into the teacher network. High-confidence detection results are obtained by confidence filtering, and a global memory bank is updated. The student network retrieves positive and negative sample pairs in the updated memory bank, and is trained and optimized in combination with the high-confidence results, so that a preset target detection model is finally obtained. The unlabeled target domain data is effectively utilized, the detection performance is improved through adaptive learning, the generalization ability of the detection model is enhanced, and the detection model is suitable for cross-domain detection tasks.
[0185] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as the above embodiment one can be referred to the above introduction, and will not be described in detail. On this basis, please refer to Figure 3 , the online unsupervised domain target detection method based on dynamic feature accumulation further includes steps S301-S305:
[0186] Step S301, pre-processing the target domain unlabeled image to obtain a processed input image.
[0187] It should be noted that the target domain unlabeled image is usually directly collected from the actual application scene. These images may contain various noise, illumination changes, resolution differences and other problems, which will affect the detection performance of the model. The purpose of pre-processing is to make the image data more consistent with the input requirements of the model through a series of standardization and enhancement operations, while reducing the interference of environmental factors on the detection task. Pre-processing not only improves the robustness of the model, but also enhances the ability of the model to extract target features, so as to realize more accurate detection in the target domain.
[0188] The specific pre-processing steps include: first, reading the unlabeled image from the target domain. These images can be collected in real time or loaded from a storage device. Adjust the image to the input size required by the model. This step is usually completed using an interpolation method to avoid image distortion.
[0189] Normalize the image pixel values to a specific range. This step is achieved by subtracting the mean value and dividing by the standard deviation to ensure that the pixel value distribution of different images is more consistent. Randomly transform the image, such as cropping, rotating, flipping, color jittering, etc., to increase the diversity of the image. This step helps to improve the generalization ability of the model. Remove noise in the image through filtering or other denoising techniques. This step can smooth the image and reduce the interference of noise on feature extraction. Adjust the brightness and contrast of the image through histogram equalization or other adaptive methods to enhance the target features.
[0190] Step S302, performing forward inference on the processed input image through a preset target detection model to obtain an initial prediction result.
[0191] It should be noted that forward inference refers to the process of gradually calculating and generating detection results by inputting the image through the network structure of the preset target detection model. Specifically, forward inference includes the following key steps:
[0192] Feature extraction: The input image is first passed through the backbone network of the model, which is usually a deep convolutional neural network (such as ResNet, CSPDarknet, etc.). The role of the backbone network is to extract multi-scale feature representations from the input image, which contains edge, texture, shape, etc. information in the image, providing a basis for subsequent target detection.
[0193] Feature fusion: The extracted features are usually processed through a feature fusion module (such as FPN, PANet, etc.). The role of the feature fusion module is to combine features at different levels to enhance the expression ability of the features. For example, low-level detail features are fused with high-level semantic features to improve the detection accuracy of the model for targets.
[0194] Target detection: The fused features are input to the detection head, which further processes the features through convolutional layers and fully connected layers, etc. to generate candidate target bounding boxes and class information. Specifically, the detection head outputs the bounding box position (usually including x, y coordinates, width, and height) and class probability distribution of each candidate target.
[0195] The initial prediction result includes candidate target bounding boxes and class information. Specifically, the detection head generates multiple candidate target bounding boxes, each of which represents the position of a potential target in the image. The position of the bounding box is usually obtained through bounding box regression, which optimizes the difference between the predicted bounding box and the true bounding box. The class information is obtained through a classifier (usually a fully connected layer), which determines the class of each candidate target based on the feature representation.
[0196] Step S303, performing non-maximum suppression on the initial prediction result to eliminate redundant bounding boxes and obtain an optimized prediction result.
[0197] It should be noted that in the forward inference process of the target detection model, the detection head usually generates multiple candidate target bounding boxes, which may correspond to the same target. Due to the uncertainty of the model's prediction, there will be slight differences in the position and size of these bounding boxes, resulting in multiple overlapping bounding boxes. The role of non-maximum suppression is to select the bounding box that is most likely to contain the target while suppressing other overlapping bounding boxes, thereby eliminating redundancy and obtaining more accurate detection results.
[0198] After non-maximum suppression processing, each target finally only retains one bounding box that is most likely to contain the target, thereby obtaining an optimized prediction result.
[0199] In step S304, the optimized prediction result is subjected to confidence screening according to a preset confidence requirement, to obtain a target bounding box and corresponding category information.
[0200] It should be noted that in the output of the target detection model, each prediction result is usually accompanied by a confidence score indicating the degree of confidence of the model for the prediction result. The role of confidence screening is to filter out prediction results with low confidence according to a predefined confidence threshold, thereby retaining detection results that the model is more certain about. According to the requirements of specific tasks and the performance of the model, a predefined confidence threshold is set. This threshold is usually a value between 0 and 1, such as 0.5 or 0.7. The selection of the confidence threshold needs to be adjusted according to the distribution of the target domain data and the performance of the model, to ensure that the screened detection results have high accuracy and reliability. This process helps to improve the overall quality of the detection results and reduce the possibility of false positives and false negatives.
[0201] In step S305, the target bounding box and the corresponding category information are integrated to generate a target detection result.
[0202] It should be noted that the bounding box position usually includes the center point coordinates (x, y) of the target, the width (w) and the height (h), and the category information is a probability distribution indicating the confidence of the bounding box belonging to each category. After non-maximum suppression and confidence screening, the remaining bounding boxes and their corresponding category information are considered as the final detection results of the model.
[0203] The embodiment preprocesses the unlabeled images in the target domain to adapt to the input requirements of the model. Then, the preset target detection model is used to perform forward inference on the preprocessed images to generate initial prediction results containing candidate target bounding boxes and category information. Non-maximum suppression processing is used to reduce redundant bounding boxes and improve prediction accuracy. Then, the optimized prediction results are screened according to the preset confidence threshold, and the final target bounding box and category information are integrated to generate a target detection result. The preprocessing and NMS improve the detection accuracy, and the confidence screening ensures the reliability of the detection.
[0204] Based on the first embodiment of the present application, the present application also provides an online passive domain target detection device based on dynamic feature accumulation. Please refer to Figure 4 , the device comprises:
[0205] The acquisition module 10 is configured to acquire an unlabeled image in a target domain.
[0206] The result module 20 is configured to input the target domain unlabeled image into a preset target detection model for inference to generate a target detection result, wherein the target detection result includes target bounding box position and category information; further configured to obtain historical sample images and construct an initial target detection model, wherein the initial target detection model includes a student network and a teacher network, the unified architecture of the student network and the teacher network is a YOLOv5 architecture, the YOLOv5 architecture includes a backbone network, a feature fusion module and a detection head; the parameters of the student network and the teacher network are initialized, and the core parameters of a source domain detector are loaded as the initial weights of the student network and the teacher network, wherein the core parameters include backbone network weights and detection head parameters; the historical sample images are subjected to confidence evaluation by the source domain detector to obtain sample confidence; when the sample confidence is greater than a preset gating threshold, a dynamic feature accumulation strategy is performed on the historical sample images to generate pseudo-source domain features; the pseudo-source domain features are injected into the teacher network for channel affine modulation to generate pseudo-labels and anchor box features; the pseudo-labels are subjected to confidence filtering to obtain high-confidence target detection results; the global memory bank is updated based on the anchor box features to obtain an updated memory bank, wherein the global memory bank is used to store prototype patterns of target distribution; the student network is searched in the updated memory bank to obtain positive and negative sample pairs related to the anchor box features; and the student network is trained and optimized in combination with the high-confidence target detection results and the positive and negative sample pairs to obtain a preset target detection model.
[0207] The online unsupervised domain target detection device based on dynamic feature accumulation provided in the application adopts the online unsupervised domain target detection method based on dynamic feature accumulation in the above embodiment, and can solve the technical problem of how to dynamically update the model to adapt to the distribution change of the target domain. Compared with the prior art, the online unsupervised domain target detection device based on dynamic feature accumulation provided in the application has the same beneficial effects as the online unsupervised domain target detection method based on dynamic feature accumulation provided in the above embodiment, and other technical features in the online unsupervised domain target detection device based on dynamic feature accumulation are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0208] The application provides an online unsupervised domain target detection device based on dynamic feature accumulation, which comprises at least one processor and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the online unsupervised domain target detection method based on dynamic feature accumulation in the above embodiment one.
[0209] AsFigure 5 As shown, the online unsupervised domain target detection device based on dynamic feature accumulation can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the online unsupervised domain target detection device based on dynamic feature accumulation are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. In general, the following can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the online unsupervised domain target detection device based on dynamic feature accumulation to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows the online unsupervised domain target detection device based on dynamic feature accumulation with various components, it should be understood that not all of the shown components are required to be implemented or possessed. More or less can be alternatively implemented or possessed.
[0210] The online unsupervised domain target detection device based on dynamic feature accumulation provided in the present application adopts the online unsupervised domain target detection method based on dynamic feature accumulation in the above-mentioned embodiments, and can solve the technical problem of how to dynamically update the model to adapt to the distribution change of the target domain. Compared with the prior art, the online unsupervised domain target detection device based on dynamic feature accumulation provided in the present application has the same beneficial effects as the online unsupervised domain target detection method based on dynamic feature accumulation provided in the above-mentioned embodiments, and other technical features in the online unsupervised domain target detection device based on dynamic feature accumulation are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0211] The present application provides a computer readable medium having stored thereon computer readable program instructions (i.e., computer programs) for executing the online unsupervised domain target detection method based on dynamic feature accumulation in the above-mentioned embodiments.
[0212] The computer readable medium provided in the application may be, for example, a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor, or device, or any combination of the above. The computer readable medium may be contained in an online passive domain target detection device based on dynamic feature accumulation, or may exist independently without being assembled into the online passive domain target detection device based on dynamic feature accumulation.
[0213] The readable medium provided in the application is a computer readable medium, which stores computer readable program instructions (i.e., a computer program) for executing the above-mentioned online passive domain target detection method based on dynamic feature accumulation, and can solve the technical problem of how to dynamically update a model to adapt to the distribution change of a target domain. Compared with the prior art, the computer readable medium provided in the application has the same beneficial effects as the online passive domain target detection method based on dynamic feature accumulation provided in the above-mentioned embodiments, which will not be described here.
[0214] The application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned online passive domain target detection method based on dynamic feature accumulation.
[0215] The computer program product provided in the application can solve the technical problem of how to dynamically update a model to adapt to the distribution change of a target domain. Compared with the prior art, the computer program product provided in the application has the same beneficial effects as the online passive domain target detection method based on dynamic feature accumulation provided in the above-mentioned embodiments, which will not be described here.
[0216] The above-mentioned only some embodiments of the application, and not therefore limit the patent scope of the application, any equivalent structural transformation made by using the content of the application specification and drawings, or direct / indirect application in other related technical fields are included in the patent protection scope of the application.
Claims
1. An online passive domain target detection method based on dynamic feature accumulation, characterized in that, The method includes: Obtain unlabeled images of the target domain; The unlabeled image of the target domain is input into a preset target detection model for inference to generate target detection results, wherein the target detection results include target bounding box location and category information; Before the step of inputting the unlabeled image of the target domain into a preset target detection model for inference and generating target detection results, the method further includes: Historical sample images are acquired, and an initial target detection model is constructed. The initial target detection model includes a student network and a teacher network. The unified architecture of the student network and the teacher network is the YOLOv5 architecture, which includes a backbone network, a feature fusion module, and a detection head. Initialize the parameters of the student network and the teacher network, and load the core parameters of the source domain detector as the initial weights of the student network and the teacher network. The core parameters include the backbone network weights and the detector head parameters. The confidence level of the historical sample images is obtained by evaluating the confidence level using a source domain detector. When the confidence level of the sample is greater than the preset gating threshold, a dynamic feature accumulation strategy is executed on the historical sample image to generate pseudo source domain features. The pseudo-source domain features are injected into the teacher network for channel affine modulation to generate pseudo-labels and anchor box features. The pseudo-labels are filtered by confidence to obtain high-confidence target detection results; The global memory is updated based on the anchor box features to obtain the updated memory, wherein the global memory is used to store the prototype pattern of the target distribution. The student network retrieves positive and negative sample pairs related to the anchor box features by searching the updated memory. The student network is trained and optimized by combining the high-confidence target detection results and the positive and negative samples to obtain a preset target detection model. The step of performing a dynamic feature accumulation strategy on the historical sample images to generate pseudo-source domain features includes: The historical sample images are forward-propagated through the teacher network to obtain the feature tensor of the backbone network. The mean and standard deviation of the channel dimension are calculated based on the feature tensor, and the channel statistics are obtained. The global cumulative statistics are updated based on the channel statistics to obtain the updated cumulative statistics, wherein the global cumulative statistics include the cumulative sum of channel means, the cumulative sum of channel standard deviations, and the effective count; The global cumulative statistics are normalized to obtain normalized cumulative statistics; Pseudo-source domain features are generated based on the normalized cumulative statistics.
2. The method as described in claim 1, characterized in that, The step of injecting the pseudo-source domain features into the teacher network for channel affine modulation to generate pseudo-labels and anchor box features includes: The pseudo-source domain features are input into the P4 layer of the teacher network and subjected to small-amplitude channel affine modulation to obtain the modulated P4 layer features. The modulated P4 layer features are input into the feature fusion module of the teacher network for feature fusion and enhancement to obtain the fused features. The fused features are input into the detection head of the teacher network for prediction, and the candidate target bounding boxes and class probabilities are output. Based on the category probability, determine the category confidence of each candidate target bounding box and generate pseudo-labels; Based on the candidate target bounding box, the feature vector corresponding to the anchor box is extracted to obtain the anchor box feature.
3. The method as described in claim 1, characterized in that, The step of updating the global memory based on the anchor box features to obtain the updated memory includes: The anchor box features are projected as key vectors through the first fully connected layer in the teacher network; The anchor box features are projected into a value vector through the second fully connected layer in the teacher network; The cross-attention score is calculated by treating each memory item in the global memory as a query and using the key vector. Update the memory items in the global memory bank based on the cross-attention score and the weighted aggregation of the value vector; The updated memory items are stored in the global memory, forming the updated global memory.
4. The method as described in claim 1, characterized in that, The step of retrieving positive and negative sample pairs related to the anchor box features through the student network in the updated memory includes: The anchor box features are input into the fully connected layer in the student network and projected to obtain the student query features. The cross-attention score is calculated by comparing the student query features with each memory item in the updated global memory. Based on the cross-attention score, positive samples related to the anchor box features are obtained by filtering according to the first filtering requirement. Based on the student query features and each memory item in the updated global memory bank, the samples are filtered according to the second filtering requirements and the preset ratio to obtain negative samples related to the anchor box features. The positive and negative samples are combined to obtain a positive and negative sample pair related to the anchor box features.
5. The method as described in claim 1, characterized in that, The step of training and optimizing the student network by combining the high-confidence target detection results and the positive and negative samples to obtain the preset target detection model includes: The historical sample images are subjected to strong enhancement processing to obtain strongly enhanced view samples; The enhanced view sample is input into the student network to obtain the prediction result; The cross-entropy loss is calculated based on the prediction results and the high-confidence target detection results. Perform Euclidean norm normalization on the feature vectors of the positive and negative sample pairs, and calculate the similarity between positive sample pairs and the similarity between negative sample pairs. The memory contrast loss is calculated based on the similarity. The cross-entropy loss and the memory contrast loss are weighted and summed according to preset weights to obtain the total loss of the student network. The gradient descent algorithm is used to backpropagate the total loss of the student network and update the parameters of the student network. Set a sample interval, and trigger a stabilization update after processing samples within the specified interval. Align the student network parameters with the teacher network parameters, and repeat the training until the total loss of the student network is less than a preset loss threshold to obtain a preset target detection model.
6. The method as described in claim 1, characterized in that, The step of inputting the unlabeled image of the target domain into a preset target detection model for inference to generate target detection results includes: The unlabeled image of the target domain is preprocessed to obtain the processed input image; The processed input image is subjected to forward inference by a preset target detection model to obtain an initial prediction result, wherein the initial prediction result includes candidate target bounding boxes and category information; The initial prediction results are subjected to non-maximum suppression processing to eliminate redundant bounding boxes, resulting in optimized prediction results. The optimized prediction results are filtered according to a preset confidence requirement to obtain the target bounding box and the corresponding category information; The target bounding box and the corresponding category information are integrated to generate the target detection result.
7. An online passive domain target detection device based on dynamic feature accumulation, characterized in that, The device includes: The acquisition module is used to acquire unlabeled images of the target domain; The results module is used to input the unlabeled image of the target domain into a preset target detection model for inference, generating target detection results, wherein the target detection results include target bounding box positions and category information; it is also used to acquire historical sample images and construct an initial target detection model, wherein the initial target detection model includes a student network and a teacher network, the unified architecture of the student network and the teacher network is a YOLOv5 architecture, the YOLOv5 architecture includes a backbone network, a feature fusion module and a detection head; initialize the parameters of the student network and the teacher network, and load the core parameters of the source domain detector as the initial weights of the student network and the teacher network, the core parameters including the backbone network weights and the detection head parameters; evaluate the confidence of the historical sample images through the source domain detector to obtain the sample confidence; when the sample confidence is greater than a preset gating threshold, execute a dynamic feature accumulation strategy on the historical sample images to generate pseudo-source domain features; inject the pseudo-source domain features into the teacher network for channel affine modulation to generate pseudo-labels and anchor boxes. Features; confidence filtering is performed on the pseudo-labels to obtain high-confidence target detection results; the global memory is updated based on the anchor box features to obtain an updated memory, wherein the global memory is used to store the prototype pattern of the target distribution; the student network searches in the updated memory to obtain positive and negative sample pairs related to the anchor box features; the student network is trained and optimized by combining the high-confidence target detection results and the positive and negative samples to obtain a preset target detection model; it is also used to perform forward propagation on the historical sample images through the teacher network to obtain the feature tensor of the backbone network; the mean and standard deviation of the channel dimension are calculated based on the feature tensor to obtain channel statistics; the global cumulative statistics are updated based on the channel statistics to obtain an updated cumulative statistics, wherein the global cumulative statistics include the cumulative sum of channel means, the cumulative sum of channel standard deviations, and the effective count; the global cumulative statistics are normalized to obtain normalized cumulative statistics; pseudo-source domain features are generated based on the normalized cumulative statistics.
8. An online passive domain target detection device based on dynamic feature accumulation, characterized in that, The device includes: a memory, a processor, and an online passive domain target detection program based on dynamic feature accumulation stored in the memory and running on the processor, the online passive domain target detection program based on dynamic feature accumulation being configured to implement the steps of the online passive domain target detection method based on dynamic feature accumulation as described in any one of claims 1-6.
9. A storage medium, characterized in that, The storage medium stores an online passive domain target detection program based on dynamic feature accumulation, which, when executed by a processor, implements the steps of the online passive domain target detection method based on dynamic feature accumulation as described in any one of claims 1-6.
Citation Information
Patent Citations
Real-time domain adaptive defect detection method based on double alignment and uncertainty filtering
CN121120647A
Target lightweight detection method and system based on attention feature enhancement
CN121147496A