A cross-domain target recognition method, device, equipment and medium

By aligning the feature distributions of the source and target domains in the frequency domain, and using the detection results of the source domain image as pseudo-labels to update the target domain model, the problems of feature distribution differences and unreliability of pseudo-labels in cross-domain target recognition are solved, achieving efficient and robust target recognition.

CN119863668BActive Publication Date: 2025-10-28TSINGHUA UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510352429.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-10-28
Estimated Expiration
2045-03-25

AI Technical Summary

Technical Problem

In cross-domain target recognition, differences in feature distribution lead to a decrease in model performance, and the unreliability of pseudo-labels weakens the model's cross-domain performance, making it difficult to achieve accurate target detection and classification.

Method used

By aligning the feature distributions of labeled source domain images and unlabeled target domain images in the frequency domain, the detection results of the source domain target images are used as pseudo-labels to label the target domain images. The target domain target detection model is then updated using the pseudo-labels, thus achieving target detection in the target domain.

Benefits of technology

It significantly alleviates the differences in feature distribution between domains, improves the adaptability and robustness of the target detection model in multi-domain scenarios, and enhances the performance and generalization ability of cross-domain target recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863668B_ABST
    Figure CN119863668B_ABST
Patent Text Reader

Abstract

This invention provides a cross-domain target recognition method, apparatus, device, and medium, relating to the field of target recognition. It includes: acquiring a labeled source domain image and an unlabeled target domain image; aligning the labeled source domain image to the unlabeled target domain image in the frequency domain to obtain a labeled source domain target image; inputting the source domain target image into a source domain target detection model to obtain the target detection result of the source domain target image as a pseudo-label for the unlabeled target domain image; labeling the unlabeled target domain image to obtain a target domain image with pseudo-labels; updating the parameters of the source domain target detection model using the target domain image with pseudo-labels to obtain a target domain target detection model for target detection of the target domain image to be detected, thereby obtaining the target detection result of the target domain image to be detected. This achieves domain transfer of the target detection model, improving the performance and generalization ability of cross-domain target recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target recognition, and more particularly to a cross-domain target recognition method, apparatus, device, and medium. Background Technology

[0002] In recent years, on the one hand, in object recognition tasks, differences in feature distribution have led to a decline in the cross-domain performance of object detection models. Because images from different domains exhibit significant differences in feature distribution, including target morphology, background complexity, lighting conditions, and noise distribution, the features learned by object detection models during training in the source domain often cannot effectively adapt to the target domain. This distributional difference causes the model to exhibit recognition bias or false detections for specific categories in the target domain. Especially when target region features overlap with background or other domain features, it becomes difficult to accurately locate and classify targets, ultimately significantly reducing the cross-domain recognition performance and generalization ability of object detection models.

[0003] On the other hand, in target recognition tasks, methods for generating pseudo-labels are widely used in cross-domain applications. However, the unreliability of pseudo-labels weakens the model's cross-domain performance: due to the difference in feature distribution between the target domain and the source domain, pseudo-labels often contain incorrect target localization or category labeling. This low reliability easily leads to the target detection model overfitting the noisy features in the pseudo-labels, making it difficult to accurately capture the key features of the target domain, thus significantly weakening the performance and generalization ability of cross-domain target recognition. Therefore, how to improve the performance and generalization ability of cross-domain target recognition is a technical problem that this invention urgently needs to solve. Summary of the Invention

[0004] Based on the above-mentioned technical problems, the present invention provides a cross-domain target recognition method, apparatus, device and medium, aiming to improve the performance and generalization ability of cross-domain target recognition.

[0005] The first aspect of this invention provides a cross-domain target recognition method, the method comprising:

[0006] Acquire a source domain image with labels and an unlabeled target domain image, wherein the labels carried by the source domain image represent the category and location bounding box of the target in the source domain image;

[0007] In the frequency domain, the labeled source domain image is aligned to the unlabeled target domain image to obtain a labeled source domain target image that is aligned with the feature distribution of the unlabeled target domain image;

[0008] The source domain target image is input into the source domain target detection model to obtain the target detection result of the source domain target image. The target detection result of the source domain target image represents the category and location box of the target in the source domain target image.

[0009] The target detection result of the source domain target image is used as the pseudo label of the unlabeled target domain image. The unlabeled target domain image is then labeled to obtain the target domain image carrying the pseudo label.

[0010] Using the target domain image carrying the pseudo-label, the parameters of the source domain target detection model are updated to obtain the target domain target detection model;

[0011] The target detection model of the target domain is used to perform target detection on the target domain image to obtain the target detection result of the target domain image to be detected. The target detection result of the target domain image to be detected represents the category and location box of the target in the target domain image to be detected.

[0012] A second aspect of the present invention provides a cross-domain target recognition device, the device comprising:

[0013] An image acquisition module is used to acquire a source domain image with labels and an unlabeled target domain image, wherein the labels carried by the source domain image represent the category and location bounding box of the target in the source domain image;

[0014] The distribution alignment module is used to align the labeled source domain image to the unlabeled target domain image in the frequency domain, so as to obtain a labeled source domain target image that is aligned with the feature distribution of the unlabeled target domain image;

[0015] The image processing module is used to input the source domain target image into the source domain target detection model to obtain the target detection result of the source domain target image, wherein the target detection result of the source domain target image represents the category and location box of the target in the source domain target image;

[0016] The pseudo-labeling module is used to use the target detection result of the source domain target image as a pseudo-label for the unlabeled target domain image, and to label the unlabeled target domain image to obtain a target domain image carrying pseudo-labels.

[0017] The model update module is used to update the parameters of the source domain target detection model using the target domain image carrying the pseudo-label, so as to obtain the target domain target detection model.

[0018] The target detection module is used to perform target detection on the target domain image through the target domain target detection model, and obtain the target detection result of the target domain image, wherein the target detection result of the target domain image represents the category and location box of the target in the target domain image.

[0019] A third aspect of the present invention provides an electronic device, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the cross-domain target recognition method as described in the first aspect of the present invention.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the cross-domain target recognition method of the first aspect of the present invention.

[0021] The cross-domain target recognition method in this embodiment aligns the labeled source domain image to the unlabeled target domain image in the frequency domain, resulting in a labeled source domain target image aligned with the feature distribution of the unlabeled target domain image. This significantly alleviates the problem of feature distribution differences between domains by aligning the feature distributions of the source and target domains. Next, the source domain target image is input into the source domain target detection model to obtain the target detection result of the source domain target image, which serves as a pseudo-label for the unlabeled target domain image. Thus, this embodiment performs style transfer on the source domain data in the frequency domain, mapping the features of the source domain data to a feature space similar to the target domain distribution, thereby generating high-quality labeled data (i.e., pseudo-labels) that match the target domain, further guiding model optimization. Finally, the target domain image carrying the pseudo-label is used to update the parameters of the source domain target detection model, resulting in a target domain target detection model, thus achieving domain transfer of the target detection model. In this embodiment, target domain distribution data is generated by feature distribution alignment, and unsupervised optimization is performed on the target domain data (i.e., the target domain image is not labeled, but pseudo-labels are generated by feature distribution alignment to achieve unsupervised optimization). This not only effectively avoids the performance loss caused by pseudo-label generation error, but also significantly improves the adaptability and robustness of the target detection model in multi-domain scenarios, and improves the target recognition performance and generalization ability in cross-domain complex tasks, thereby achieving efficient and robust target recognition in cross-domain scenarios. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating the steps of a cross-domain target recognition method according to an embodiment of the present invention;

[0024] Figure 2This is an overall schematic diagram illustrating a target recognition method based on source domain memory and category-level alignment according to an embodiment of the present invention;

[0025] Figure 3 This is a structural block diagram of a cross-domain target recognition device provided in an embodiment of the present invention;

[0026] Figure 4 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the steps of a cross-domain target recognition method according to an embodiment of the present invention. Figure 1 As shown, the cross-domain target recognition method provided in this embodiment includes at least the following steps:

[0029] Step S11: Obtain a source domain image with labels and an unlabeled target domain image, wherein the labels carried by the source domain image represent the category and location bounding box of the target in the source domain image.

[0030] In this embodiment, labeled source domain images and unlabeled target domain images can be acquired. Unlabeled target domain images are image samples in the target domain used for training the object detection model (object recognition model, used for object recognition in images), and these image samples do not carry labels. Source domain images are image samples in the source domain used for object detection (i.e., object recognition). These source domain images carry labels, and the labels on the source domain images characterize the category and location bounding box of the object in the source domain image. The source domain is the area where the object detection model has been pre-trained, and the target domain is the area where the object detection model will be applied; that is, the target domain is the domain to be transferred. In this embodiment, the source domain can include one or more different domains. In an optional embodiment, the lighting conditions (brightness), noise distribution, and / or background complexity of the images differ between one domain and another.

[0031] Step S12: Align the labeled source domain image to the unlabeled target domain image in the frequency domain to obtain a labeled source domain target image that is aligned with the feature distribution of the unlabeled target domain image.

[0032] In this embodiment, the labeled source domain image can be aligned to the unlabeled target domain image in the frequency domain to adjust the labeled source domain image, resulting in a labeled source domain target image that is aligned with the feature distribution of the unlabeled target domain image. In other words, the source domain target image in this embodiment is the source domain image after feature distribution alignment adjustment. This source domain target image achieves feature distribution alignment with the unlabeled target domain image, and the source domain target image carries a label, which is the same label carried by the original source domain image before adjustment.

[0033] Step S13: Input the source domain target image into the source domain target detection model to obtain the target detection result of the source domain target image. The target detection result of the source domain target image represents the category and location box of the target in the source domain target image.

[0034] In this embodiment, after obtaining the source domain target image, the source domain target image can be input into the source domain target detection model to obtain the target detection result of the source domain target image. The target detection result of the source domain target image represents the category and location bounding box of the target in the source domain target image. The source domain target detection model is a pre-trained target detection model in the source domain.

[0035] Step S14: Use the target detection result of the source domain target image as the pseudo-label of the unlabeled target domain image, and label the unlabeled target domain image to obtain the target domain image carrying the pseudo-label.

[0036] In this embodiment, the target detection result of the source domain target image is used as the pseudo-label of the unlabeled target domain image, and the unlabeled target domain image is labeled to obtain the target domain image carrying the pseudo-label.

[0037] In this embodiment, the target detection result corresponding to the source domain target image after feature distribution alignment is used as the pseudo-label of the unlabeled target domain image, generating labeled data (target domain image carrying pseudo-labels) that is highly similar to the target domain distribution. Compared with related pseudo-label generation methods, this fundamentally avoids the introduction of potential errors in the pseudo-label generation process.

[0038] Step S15: Using the target domain image carrying the pseudo-label, update the parameters of the source domain target detection model to obtain the target domain target detection model.

[0039] In this embodiment, after obtaining the target domain image carrying pseudo-labels, the model parameters of the source domain target detection model can be updated using at least the target domain image carrying pseudo-labels to obtain the target domain target detection model. In one example, the result obtained by processing the target domain image using the source domain target detection model can be used to calculate the loss with the pseudo-labels corresponding to the target domain image. The model parameters of the source domain target detection model can then be updated based on the loss until the loss converges and the model parameters are fixed, thus obtaining the target domain target detection model. This target domain target detection model is the target detection model trained in that target domain.

[0040] Step S16: Using the target detection model of the target domain, perform target detection on the target domain image to be detected, and obtain the target detection result of the target domain image to be detected. The target detection result of the target domain image to be detected represents the category and location box of the target in the target domain image to be detected.

[0041] In this embodiment, after obtaining the target domain target detection model, this model is used to perform target detection in the target domain image. The target domain image to be detected can be input into the target domain target detection model, and target detection is performed on the target domain image through the target domain target detection model, resulting in the target detection result of the target domain image output by the target domain target detection model. Here, the target domain image to be detected is the image in the target domain that needs target recognition, and the target detection result of the target domain image represents the category and location bounding box of the target in the target domain image.

[0042] In this embodiment, the labeled source domain image is aligned to the unlabeled target domain image in the frequency domain, resulting in a labeled source domain target image aligned with the feature distribution of the unlabeled target domain image. This embodiment significantly alleviates the problem of feature distribution differences between the two domains by aligning the feature distributions of the source and target domains. Next, the source domain target image is input into the source domain target detection model to obtain the target detection result of the source domain target image, which serves as a pseudo-label for the unlabeled target domain image. Thus, this embodiment performs style transfer on the source domain data in the frequency domain, mapping the features of the source domain data to a feature space similar to the target domain distribution, thereby generating high-quality labeled data (i.e., pseudo-labels) that match the target domain, further guiding model optimization. Finally, the source domain target detection model is updated with parameters using the target domain image carrying the pseudo-label, resulting in a target domain target detection model, thus achieving domain transfer of the target detection model. In this embodiment, target domain distribution data is generated by feature distribution alignment, and unsupervised optimization is performed on the target domain data (i.e., the target domain image is not labeled, but pseudo-labels are generated by feature distribution alignment to achieve unsupervised optimization). This not only effectively avoids the performance loss caused by pseudo-label generation error, but also significantly improves the adaptability and robustness of the target detection model in multi-domain scenarios, and improves the target recognition performance and generalization ability in cross-domain complex tasks, thereby achieving efficient and robust target recognition in cross-domain scenarios.

[0043] In conjunction with the above embodiments, in one implementation, the present invention also provides a cross-domain target recognition method, in which step S12 may specifically include steps S21 to S24:

[0044] Step S21: From the labeled source domain images, select the first labeled source domain images that are aligned with the category of the unlabeled target domain images.

[0045] In this embodiment, there are multiple labeled source domain images. The labeled source domain images that align with the category of the unlabeled target domain image are selected as the first labeled source domain image. In this embodiment, category alignment is characterized by the target category in the first source domain image being the same as or similar to the target category in the unlabeled target domain image. After category alignment, this embodiment selects the part closest to the current target domain category (i.e., the first source domain image), and then performs subsequent feature distribution alignment based on this closest part to the current target domain category, thus better learning the knowledge of this category.

[0046] Step S22: Perform Fourier transform on the first source domain image and the unlabeled target domain image respectively to obtain the frequency domain features of the first source domain image and the unlabeled target domain image respectively. The frequency domain features include phase spectrum and amplitude spectrum.

[0047] In this embodiment, after obtaining the first source domain image carrying the label, Fourier transforms can be performed on both the first source domain image and the unlabeled target domain image to map them from the spatial domain to the frequency domain, extracting the frequency domain features of each image. These frequency domain features include the phase spectrum and the amplitude spectrum. In other words, this step yields the phase spectrum and amplitude spectrum of the first source domain image, as well as the phase spectrum and amplitude spectrum of the unlabeled target domain image.

[0048] Step S23: While keeping the phase spectrum of the first source domain image unchanged, keep the other regions of the amplitude spectrum of the first source domain image unchanged, replace the central region of the amplitude spectrum of the first source domain image with the corresponding central region of the amplitude spectrum of the unlabeled target domain image, and obtain the adjusted frequency domain features of the first source domain image.

[0049] In this embodiment, the frequency domain features of the first source domain image are adjusted based on the amplitude spectrum of the unlabeled target domain image: while keeping the phase spectrum of the first source domain image unchanged, the central region of the amplitude spectrum of the first source domain image is replaced with the corresponding central region of the amplitude spectrum of the unlabeled target domain image, and the other regions of the amplitude spectrum of the first source domain image remain unchanged, resulting in the adjusted frequency domain features of the first source domain image, thereby achieving distribution alignment in the frequency domain space. The other regions refer to the regions in the amplitude spectrum other than the central region. In an optional example, the size of the central region can be set to a learnable parameter b, and the central region can be flexibly adjusted to different geometric shapes according to the specific needs of the target recognition task.

[0050] Step S24: Perform an inverse Fourier transform on the adjusted frequency domain features of the first source domain image to obtain the source domain target image carrying the label.

[0051] In this embodiment, after obtaining the adjusted frequency domain features of the first source domain image, an inverse Fourier transform is performed on the adjusted frequency domain features of the first source domain image to restore the adjusted frequency domain features of the first source domain image from the frequency domain to the spatial domain, resulting in a labeled source domain target image. This source domain target image has a distribution that is closer to that of the unlabeled target domain image. The source domain target image is a labeled source domain image that is stylistically similar to the unlabeled target domain image; that is, it is a labeled source domain image that is aligned with the categories of the unlabeled target domain image. This labeled image can be used for subsequent target detection model optimization to adapt to the target domain data.

[0052] In this embodiment, maintaining the phase spectrum ensures that the image content in the source domain target image remains the same as that of the original source domain image. By locally replacing frequency domain features (replacing the center region of the amplitude spectrum), the spectral characteristics of the labeled source domain target image are made closer to the distribution characteristics of the unlabeled target domain image. This process achieves alignment of neighborhood distribution and dynamic adjustment of key features in the target recognition task, thereby enabling accurate modeling of target domain characteristics and improving recognition performance. This embodiment generates labeled data that is highly similar to the target domain distribution by aligning the distribution of images with the same category in the source and target domains (i.e., the first source domain image and the target domain image) in the frequency domain, fundamentally avoiding the potential error introduction during pseudo-label generation. Furthermore, the frequency domain distribution alignment method in this embodiment does not rely on large amounts of data or complex model training, offering higher efficiency and flexibility.

[0053] In an optional embodiment, combining the above embodiments, under extreme conditions, distribution alignment can be achieved with a single unlabeled target domain image, significantly enhancing the adaptability and generalization ability of the target detection model. It is worth noting that in this embodiment, each new unlabeled target domain image can theoretically be considered as an image in an independent new domain for the aforementioned domain migration processing, thus providing great flexibility and robustness for multi-domain application scenarios.

[0054] In conjunction with the above embodiments, the present invention also provides a cross-domain target recognition method, in which step S15 may specifically include step S31:

[0055] Step S31: Using the source domain target image with the label and the target domain image with the pseudo label, update the parameters of the source domain target detection model to obtain the target domain target detection model.

[0056] In this embodiment, the target domain image carrying pseudo-labels is combined with the source domain target image carrying labels to further optimize the source domain target detection model: the source domain target detection model is updated using the source domain target image carrying labels and the target domain image carrying pseudo-labels to obtain the target domain target detection model. In one example, the source domain target image carrying labels and the target domain image carrying pseudo-labels can be input into the source domain target detection model to obtain the result obtained by the source domain target detection model after processing the target domain image, and the result obtained by the source domain target detection model after processing the source domain target image; then, based on the result obtained by the source domain target detection model after processing the target domain image and the pseudo-labels corresponding to the target domain image, and the result obtained by the source domain target detection model after processing the source domain target image and the labels corresponding to the source domain target image, the loss is calculated, and the model parameters of the source domain target detection model are updated based on the loss until the loss converges and the model parameters are fixed to obtain the target domain target detection model.

[0057] This embodiment is similar to a fine-tuning operation. It does not rely on the true labels of the target domain image for loss calculation. Instead, it uses the source domain target image after distribution alignment as the optimization basis. Through several rapid optimization iterations, the target detection model can efficiently adjust parameters to better adapt to the feature distribution of the target domain, thereby improving target recognition performance and adaptability in unknown domains. Compared to related domain transfer methods, this embodiment significantly optimizes the performance of the target detection model by dynamically calling existing source domain training data during the inference process and combining frequency domain transformation and fine-tuning strategies. This effectively enhances the generalization ability and adaptability of the target detection model in unknown domains.

[0058] In conjunction with the above embodiments, in one implementation, the present invention also provides a cross-domain target recognition method. In this method, in addition to the steps described above, step S41 may be included, and step S21 may specifically include steps S42 to S44:

[0059] Step S41: Extract features and cluster the source domain images carrying labels stored in the memory bank to obtain k categories and the cluster centers of each of the k categories.

[0060] In this embodiment, the memory bank stores multiple source domain images with labels. In order to make efficient use of the source domain images in the memory bank, the source domain images with labels stored in the memory bank can be preprocessed: feature extraction and clustering (such as K-means clustering) are performed on all the source domain images with labels stored in the memory bank to generate cluster centers (category centers) to reduce the search range, and k categories and their respective cluster centers are obtained to help extract source domain images with similar categories to the unlabeled target domain images in the subsequent extraction. k is an integer greater than 1.

[0061] Step S42: Read the cluster centers of each of the k categories from the memory.

[0062] In this embodiment, when determining the first source domain image, the cluster centers of each of the k categories can be read from the memory bank.

[0063] Step S43: Extract the features of the unlabeled target domain image and determine the matching degree between the features of the unlabeled target domain image and the cluster centers of each of the k categories read.

[0064] In this embodiment, features of the unlabeled target domain image can be extracted, and the matching degree between the features of the unlabeled target domain image and the cluster centers of each of the k read categories can be determined. For example, based on the features of the unlabeled target domain image and the cluster centers of each of the k read categories, the similarity between the features of the unlabeled target domain image and the cluster centers of each category is calculated, and the similarity is used as the matching degree.

[0065] In one alternative implementation, features of the unlabeled target domain image and the labeled source domain image can be extracted based on a pre-trained feature extraction network.

[0066] Step S44: Determine the n first source domain images carrying labels that belong to the category with the highest matching degree, where n is an integer greater than 1.

[0067] In this embodiment, based on the calculated multiple matching degrees, the category with the highest matching degree can be determined, and from the multiple source domain images carrying labels belonging to the category with the highest matching degree, n source domain images carrying labels can be selected as the first source domain images.

[0068] In one optional example, the size of n can be dynamically adjusted to suit the needs of different target recognition tasks, providing high-quality support for subsequent model optimization.

[0069] In one optional example, if the number m of labeled source domain images belonging to the category with the highest matching degree is greater than n, the similarity between each labeled source domain image belonging to the category with the highest matching degree and the unlabeled target domain image is calculated, and n labeled first source domain images are selected in descending order of similarity. If the number m of labeled source domain images belonging to the category with the highest matching degree is less than n, the m labeled source domain images belonging to the category with the highest matching degree are first selected as m labeled first source domain images. Then, nm labeled first source domain images are selected from the labeled source domain images belonging to the category with the second highest matching degree, thus obtaining n labeled first source domain images. If the total number of images selected from the categories with the highest and second highest matching degrees is less than n, the selection is then performed from the category with the third highest matching degree, or so on, until n labeled first source domain images are obtained.

[0070] In conjunction with the above embodiments, in one implementation, the present invention also provides a cross-domain target recognition method. In this method, after step S16 above, "using the target domain target detection model to perform target detection on the target domain image to be detected, and obtaining the target detection result of the target domain image to be detected," steps S51 to S54 may be further included:

[0071] Step S51: Use the target detection result of the target domain image to be detected as the label carried by the target domain image to be detected.

[0072] In this embodiment, after obtaining the target detection result of the target domain image to be detected, the target detection result of the target domain image to be detected can be used as the label carried by the target domain image to be detected.

[0073] Step S52: Determine whether the category of the target in the target domain image to be detected is the same as any of the k categories.

[0074] In this embodiment, it can be determined whether the category of the target in the target domain image to be detected is the same as any category among the k clustered categories in the memory bank.

[0075] Step S53: If the category of the target in the target domain image to be detected is different from all k categories, add all the target domain images to be detected with labels to the memory bank to obtain the category-expanded memory bank.

[0076] In this embodiment, if the category of a target in the target domain image to be detected is different from all k categories, it is determined to be a new category. At this time, all target domain images carrying labels of this new category are added to the memory bank, resulting in a category-expanded memory bank. That is to say, in this embodiment, when a new category is added, the data corresponding to the new category will be preferentially stored in the memory unit as new information.

[0077] Step S54: Using the expanded memory of the category, update the parameters of the target detection model of the target domain to obtain a target detection model of another target domain.

[0078] In this embodiment, the expanded memory of this category can be used as the memory for the next domain migration. Using the expanded memory of this category, the target detection model of the target domain obtained in this domain migration is updated with parameters to obtain the target detection model of another target domain, that is, the target detection model of the target domain for the next domain migration.

[0079] In this embodiment, the data categories stored in the memory bank are continuously expanded as the scene expands, thereby enhancing the target detection model's ability to identify new categories and complex scenes, and providing more comprehensive and accurate support for target recognition.

[0080] In conjunction with the above embodiments, in one implementation, the present invention also provides a cross-domain target recognition method. In this method, after step S16 above, "using the target domain target detection model to perform target detection on the target domain image to be detected, and obtaining the target detection result of the target domain image to be detected," steps S61 to S64 may be further included:

[0081] Step S61: Use the target detection result of the target domain image to be detected as the label carried by the target domain image to be detected.

[0082] Step S62: Determine whether the category of the target in the target domain image to be detected is the same as any of the k categories.

[0083] Steps S61 and S62 in this embodiment are the same as or similar to steps S51 and S52 described above, and will not be repeated here.

[0084] Step S63: If the category of the target in the target domain image to be detected is one of the k categories, for that category, select a portion of the target domain images to be detected carrying labels in descending order of confidence and add them to the memory bank to obtain the domain-expanded memory bank.

[0085] In this embodiment, when the target category in the target domain image to be detected is one of k categories, a portion of the labeled target domain images to be detected can be selected for that category and added to the memory bank in descending order of confidence, resulting in an expanded memory bank. That is, in this embodiment, when no new categories are added, a clustering algorithm can be used to select a certain number of labeled target domain images to be detected from the k categories to form new memory information and store it in the memory bank, thereby expanding the currently successfully migrated target domain. Here, the confidence level in this embodiment is the confidence level corresponding to the target category in the target domain image output by the target domain detection model.

[0086] Step S64: Using the expanded memory of the domain, update the parameters of the target detection model of the target domain to obtain the target detection model of another target domain.

[0087] In this embodiment, the expanded memory of the domain can be used as the memory for the next domain migration. Using the expanded memory, the target detection model of the target domain obtained in this domain migration is updated with parameters to obtain the target detection model of another target domain, which is the target detection model of the target domain for the next domain migration.

[0088] In this embodiment, the initial data stored in the memory consists of labeled data from the source domain, serving as the foundational knowledge base for training the object detection model. As the object detection model is applied in different scenarios, the memory dynamically absorbs data from the target domain, continuously updating and iterating to gradually enrich its content as prior knowledge for domain transfer in the object detection model. Each update of the memory not only integrates feature information from the target domain but also enhances the object detection model's adaptability to feature distributions across multiple domains. This dynamic update mechanism of the memory in this embodiment effectively avoids performance loss caused by pseudo-label generation errors and significantly improves the adaptability and robustness of the object detection model in multi-domain scenarios, demonstrating significantly better performance than related technologies in complex cross-domain tasks.

[0089] In conjunction with the above embodiments, in one implementation, the present invention also provides a cross-domain target recognition method. In this method, after obtaining the target detection results for each of the multiple target domain images to be detected, steps S71 to S73 may be further included:

[0090] Step S71: Use the target detection results of each of the multiple target domain images to be detected as the labels carried by each of the multiple target domain images to be detected.

[0091] In this embodiment, after obtaining the target detection results of multiple target domain images to be detected, the target detection results of multiple target domain images to be detected can be used as the labels carried by each of the multiple target domain images to be detected.

[0092] Step S72: Add multiple labeled target domain images to the memory bank as labeled source domain images of different source domains to obtain the domain-expanded memory bank.

[0093] In this embodiment, multiple labeled target domain images can be added to the memory bank as labeled source domain images of different source domains to obtain a domain-expanded memory bank.

[0094] Step S73: Using the expanded memory of the domain, update the parameters of the target detection model of the target domain to obtain the target detection model of another target domain.

[0095] In this embodiment, the expanded memory of the domain can be used as the memory for the next domain migration. Using the expanded memory, the target detection model of the target domain obtained in this domain migration is updated with parameters to obtain the target detection model of another target domain, which is the target detection model of the target domain for the next domain migration.

[0096] Furthermore, in conjunction with the above embodiments, in another embodiment, the labeled source domain image and the unlabeled target domain image can be preprocessed using standardization. This normalizes the pixel values ​​of the labeled source domain image and the unlabeled target domain image to a uniform numerical range (e.g., [0,1] or [0,255]), reducing feature inconsistencies caused by differences in numerical ranges between different data sources. Additionally, in one embodiment, the source domain images stored in the memory must be stored and processed using a consistent data format to avoid interference with target recognition performance due to data inconsistencies. This standardization operation in this embodiment not only improves the stability and convergence speed of the target detection model training but also provides a more reliable data foundation for subsequent feature extraction and recognition tasks.

[0097] In one embodiment, such as Figure 2 As shown, Figure 2 This is a schematic diagram illustrating an overall target recognition method based on source domain memory and category-level alignment, as shown in an embodiment of the present invention. Figure 2This method can accept image inputs from multiple domains, generate target domain distribution data through category-level alignment, and perform unsupervised optimization on the target domain data, thereby achieving efficient and robust target recognition in cross-domain scenarios. Specifically, the image data is first preprocessed to normalize the pixel values ​​of all images to a uniform numerical range, thereby reducing feature inconsistencies caused by differences in numerical ranges between different data sources. Then, category calculations are performed on the source domain image and the unlabeled target domain image to determine the category with the highest matching degree to the unlabeled target domain image. From the source domain images belonging to the highest matching degree, the labeled first source domain image, aligned with the category of the unlabeled target domain image, is selected. Next, Fourier transforms are performed on both the first source domain image and the unlabeled target domain image to obtain their respective frequency domain features. While keeping the phase spectrum of the first source domain image unchanged, other regions of its amplitude spectrum are also kept unchanged. The central region of the amplitude spectrum of the first source domain image is replaced with the corresponding central region of the amplitude spectrum of the unlabeled target domain image, achieving feature transformation and obtaining the adjusted frequency domain features of the first source domain image. This is then used to generate the labeled source domain target image. Finally, based on the source domain target image and the source domain target detection model, pseudo-labels for the target domain image are generated. The parameters of the source domain target detection model are updated using the target domain image carrying the pseudo-labels, resulting in the target domain target detection model, thus achieving target domain transfer of the target detection model. After successful target domain migration, the target domain data (the target detection results output by the target domain target detection model are used as labels to obtain the target domain image to be detected with labels) is dynamically stored into the memory unit (i.e., the memory bank) for subsequent domain migration.

[0098] In this embodiment, category-level alignment significantly alleviates the problem of feature distribution differences between domains by aligning the category-level distributions of features in the source and target domains. By performing style transfer on the source domain data in the frequency domain, the features of the source domain data are mapped to a feature space with a distribution similar to that of the target domain, thereby generating high-quality labeled data that matches the target domain and further guiding model optimization. Furthermore, when a new category appears, a dynamic update mechanism can be used to update the data information stored in the memory module. The recognition method based on category-level alignment and dynamic memory update not only effectively avoids performance loss caused by false label generation errors but also significantly improves the model's adaptability and robustness in multi-domain scenarios, greatly enhancing performance in complex cross-domain tasks. The method provided in this embodiment can significantly improve the accuracy and speed of target detection in wide-field-of-view, high-resolution scenarios, providing an image content analysis device for next-generation imaging systems.

[0099] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0100] Based on the same inventive concept, one embodiment of the present invention provides a cross-domain target recognition device. (Reference) Figure 3 , Figure 3 This is a structural block diagram of a cross-domain target recognition device provided in an embodiment of the present invention. Figure 3 As shown, the cross-domain target recognition device in this embodiment may include:

[0101] An image acquisition module is used to acquire a source domain image with labels and an unlabeled target domain image, wherein the labels carried by the source domain image represent the category and location bounding box of the target in the source domain image;

[0102] The distribution alignment module is used to align the labeled source domain image to the unlabeled target domain image in the frequency domain, so as to obtain a labeled source domain target image that is aligned with the feature distribution of the unlabeled target domain image;

[0103] The image processing module is used to input the source domain target image into the source domain target detection model to obtain the target detection result of the source domain target image, wherein the target detection result of the source domain target image represents the category and location box of the target in the source domain target image;

[0104] The pseudo-labeling module is used to use the target detection result of the source domain target image as a pseudo-label for the unlabeled target domain image, and to label the unlabeled target domain image to obtain a target domain image carrying pseudo-labels.

[0105] The model update module is used to update the parameters of the source domain target detection model using the target domain image carrying the pseudo-label, so as to obtain the target domain target detection model.

[0106] The target detection module is used to perform target detection on the target domain image through the target domain target detection model, and obtain the target detection result of the target domain image, wherein the target detection result of the target domain image represents the category and location box of the target in the target domain image.

[0107] Optionally, the distribution alignment module includes:

[0108] The category alignment module is used to filter out first source domain images with labels that are aligned with the category of the unlabeled target domain image from the labeled source domain images;

[0109] The first transformation module is used to perform Fourier transform on the first source domain image and the unlabeled target domain image respectively to obtain the frequency domain features of the first source domain image and the unlabeled target domain image respectively, wherein the frequency domain features include phase spectrum and amplitude spectrum;

[0110] The local replacement module is used to replace the central region of the amplitude spectrum of the first source domain image with the corresponding central region of the amplitude spectrum of the unlabeled target domain image while keeping the phase spectrum of the first source domain image unchanged and keeping other regions of the amplitude spectrum of the first source domain image unchanged, thereby obtaining the adjusted frequency domain features of the first source domain image.

[0111] The second transformation module is used to perform an inverse Fourier transform on the adjusted frequency domain features of the first source domain image to obtain the source domain target image carrying the label.

[0112] Optionally, the model update module includes:

[0113] The model training module is used to update the parameters of the source domain target detection model using the source domain target image with the label and the target domain image with the pseudo label, so as to obtain the target domain target detection model.

[0114] Optionally, the device further includes:

[0115] The clustering module is used to extract features and cluster the labeled source domain images stored in the memory bank to obtain k categories and the cluster centers of each of the k categories.

[0116] The category alignment module includes:

[0117] A reading module is used to read the cluster centers of each of the k categories from the memory.

[0118] The matching module is used to extract features from the unlabeled target domain image and determine the matching degree between the features of the unlabeled target domain image and the cluster centers of each of the k read categories;

[0119] The filtering module is used to determine the n first source domain images with labels that belong to the category with the highest matching degree, where n is an integer greater than 1.

[0120] Optionally, the device further includes:

[0121] The first label determination module is used to, after performing target detection on the target domain image through the target domain target detection model and obtaining the target detection result of the target domain image, use the target detection result of the target domain image as the label carried by the target domain image.

[0122] The first category determination module is used to determine whether the category of the target in the target domain image to be detected is the same as any category among the k categories;

[0123] The first adding module is used to add all labeled target domain images to the memory bank when the category of the target in the target domain image to be detected is different from all k categories, so as to obtain a category-expanded memory bank.

[0124] The first update module is used to update the parameters of the target detection model in the target domain using the expanded memory of the category, so as to obtain a target detection model in another target domain.

[0125] Optionally, the device further includes:

[0126] The second label determination module is used to, after performing target detection on the target domain image through the target domain target detection model and obtaining the target detection result of the target domain image, use the target detection result of the target domain image as the label carried by the target domain image.

[0127] The second category determination module is used to determine whether the category of the target in the target domain image to be detected is the same as any of the k categories;

[0128] The second addition module is used to add a portion of the target domain images carrying labels to the memory bank when the category of the target in the target domain image to be detected is one of the k categories, in descending order of confidence, so as to obtain the domain-expanded memory bank.

[0129] The second update module is used to update the parameters of the target detection model of the target domain using the expanded memory of the domain, so as to obtain the target detection model of another target domain.

[0130] Optionally, the device further includes:

[0131] The third label determination module is used to, after obtaining the target detection results of each of the multiple target domain images to be detected, use the target detection results of each of the multiple target domain images to be detected as the labels carried by each of the multiple target domain images to be detected.

[0132] The third addition module is used to add multiple labeled target domain images to the memory bank as labeled source domain images of different source domains, so as to obtain the domain-expanded memory bank.

[0133] The third update module is used to update the parameters of the target detection model of the target domain using the memory bank after the domain expansion, so as to obtain the target detection model of another target domain.

[0134] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the cross-domain target recognition method as described in any of the above embodiments of the present invention.

[0135] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, the program implements the steps of the cross-domain target recognition method described in any of the above embodiments of the present invention.

[0136] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0137] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0138] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0139] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0142] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0143] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0144] The present invention provides a detailed description of a cross-domain target recognition method, apparatus, device, and medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A cross-domain target recognition method, characterized in that, The method includes: Acquire a source domain image with labels and an unlabeled target domain image, wherein the labels carried by the source domain image represent the category and location bounding box of the target in the source domain image; In the frequency domain, the labeled source domain image is aligned to the unlabeled target domain image to obtain a labeled source domain target image that is aligned with the feature distribution of the unlabeled target domain image; The source domain target image is input into the source domain target detection model to obtain the target detection result of the source domain target image. The target detection result of the source domain target image represents the category and location box of the target in the source domain target image. The target detection result of the source domain target image is used as the pseudo label of the unlabeled target domain image. The unlabeled target domain image is then labeled to obtain the target domain image carrying the pseudo label. Using the target domain image carrying the pseudo-label, the parameters of the source domain target detection model are updated to obtain the target domain target detection model; The target detection model of the target domain is used to perform target detection on the target domain image to be detected, and the target detection result of the target domain image to be detected is obtained. The target detection result of the target domain image to be detected represents the category and location box of the target in the target domain image to be detected. After obtaining the target detection results of each of the multiple target domain images to be detected, the target detection results of each of the multiple target domain images to be detected are used as the labels carried by each of the multiple target domain images to be detected. Multiple labeled target domain images to be detected are added to the memory as labeled source domain images of different source domains to obtain the domain-expanded memory. Using the expanded memory, the target detection model of the target domain is updated to obtain a target detection model of another target domain. Aligning the labeled source domain image to the unlabeled target domain image in the frequency domain to obtain a labeled source domain target image aligned with the feature distribution of the unlabeled target domain image includes: From the labeled source domain images stored in the memory bank, select the first labeled source domain image that is aligned with the category of the unlabeled target domain image; Perform Fourier transform on the first source domain image and the unlabeled target domain image respectively to obtain the frequency domain features of the first source domain image and the unlabeled target domain image respectively, wherein the frequency domain features include phase spectrum and amplitude spectrum; While keeping the phase spectrum of the first source domain image unchanged, and keeping other regions of the amplitude spectrum of the first source domain image unchanged, the central region of the amplitude spectrum of the first source domain image is replaced with the corresponding central region of the amplitude spectrum of the unlabeled target domain image to obtain the adjusted frequency domain features of the first source domain image. Perform an inverse Fourier transform on the adjusted frequency domain features of the first source domain image to obtain the source domain target image carrying the label.

2. The cross-domain target recognition method according to claim 1, characterized in that, Using the target domain image carrying the pseudo-label, the parameters of the source domain target detection model are updated to obtain the target domain target detection model, including: The source domain target image carrying the label and the target domain image carrying the pseudo-label are used to update the parameters of the source domain target detection model to obtain the target domain target detection model.

3. The cross-domain target recognition method according to claim 1, characterized in that, The method further includes: Feature extraction and clustering are performed on the source domain images carrying labels stored in the memory bank to obtain k categories and the cluster centers of each of the k categories; From the labeled source domain images, filtering out labeled first source domain images that align with the category of the unlabeled target domain image includes: Read the cluster centers of each of the k categories from the memory; Extract the features of the unlabeled target domain image and determine the matching degree between the features of the unlabeled target domain image and the cluster centers of each of the k read categories; Identify the n labeled first source domain images that belong to the category with the highest matching degree, where n is an integer greater than 1.

4. The cross-domain target recognition method according to claim 3, characterized in that, After performing target detection on the target domain image using the target domain detection model to obtain the target detection result of the target domain image, the method further includes: The target detection result of the target domain image to be detected is used as the label carried by the target domain image to be detected; Determine whether the category of the target in the target domain image to be detected is the same as any of the k categories; If the category of the target in the target domain image to be detected is different from all k categories, all the target domain images to be detected with labels are added to the memory bank to obtain the category-expanded memory bank. Using the expanded memory of the aforementioned categories, the parameters of the target detection model in the target domain are updated to obtain a target detection model in another target domain.

5. The cross-domain target recognition method according to claim 3, characterized in that, After performing target detection on the target domain image using the target domain detection model to obtain the target detection result of the target domain image, the method further includes: The target detection result of the target domain image to be detected is used as the label carried by the target domain image to be detected; Determine whether the category of the target in the target domain image to be detected is the same as any of the k categories; If the target category in the target domain image to be detected is one of the k categories, for that category, a portion of the target domain images to be detected carrying labels are selected in descending order of confidence and added to the memory bank to obtain the domain-expanded memory bank. Using the expanded memory, the target detection model of the target domain is updated to obtain a target detection model for another target domain.

6. A cross-domain target recognition device, characterized in that, The device includes: An image acquisition module is used to acquire a source domain image with labels and an unlabeled target domain image, wherein the labels carried by the source domain image represent the category and location bounding box of the target in the source domain image; The distribution alignment module is used to align the labeled source domain image to the unlabeled target domain image in the frequency domain, so as to obtain a labeled source domain target image that is aligned with the feature distribution of the unlabeled target domain image; The image processing module is used to input the source domain target image into the source domain target detection model to obtain the target detection result of the source domain target image, wherein the target detection result of the source domain target image represents the category and location box of the target in the source domain target image; The pseudo-labeling module is used to use the target detection result of the source domain target image as a pseudo-label for the unlabeled target domain image, and to label the unlabeled target domain image to obtain a target domain image carrying pseudo-labels. The model update module is used to update the parameters of the source domain target detection model using the target domain image carrying the pseudo-label, so as to obtain the target domain target detection model. The target detection module is used to perform target detection on the target domain image through the target domain target detection model, and obtain the target detection result of the target domain image, wherein the target detection result of the target domain image represents the category and location box of the target in the target domain image; The device further includes: The third label determination module is used to, after obtaining the target detection results of each of the multiple target domain images to be detected, use the target detection results of each of the multiple target domain images to be detected as the labels carried by each of the multiple target domain images to be detected. The third addition module is used to add multiple labeled target domain images to the memory as labeled source domain images of different source domains, so as to obtain the domain-expanded memory. The third update module is used to update the parameters of the target detection model of the target domain using the memory bank after the domain expansion, so as to obtain the target detection model of another target domain. The distribution alignment module includes: The category alignment module is used to filter out a first source domain image with a label that is aligned with the category of the unlabeled target domain image from the source domain images with labels stored in the memory bank; The first transformation module is used to perform Fourier transform on the first source domain image and the unlabeled target domain image respectively to obtain the frequency domain features of the first source domain image and the unlabeled target domain image respectively, wherein the frequency domain features include phase spectrum and amplitude spectrum; The local replacement module is used to replace the central region of the amplitude spectrum of the first source domain image with the corresponding central region of the amplitude spectrum of the unlabeled target domain image while keeping the phase spectrum of the first source domain image unchanged and keeping other regions of the amplitude spectrum of the first source domain image unchanged, thereby obtaining the adjusted frequency domain features of the first source domain image. The second transformation module is used to perform an inverse Fourier transform on the adjusted frequency domain features of the first source domain image to obtain the source domain target image carrying the label.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the cross-domain target recognition method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by a processor, it implements the cross-domain target recognition method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Domain adaptive target detection method and system considering category semantic matching

    CN113807420A

  • Cross-domain deep forgery detection model training method, deep forgery detection method and system

    CN116385817A

  • Eye fundus image segmentation method and system based on unsupervised domain self-adaption and consistency self-supervised learning and application

    CN118505993A