Target detection method, medium and device based on dual-domain teacher framework

CN118570442BActive Publication Date: 2026-09-04CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410615717.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2026-09-04
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

[0008]本发明的目的在于,提供一种基于双域教师框架的目标检测方法、介质和设备,能同时检测两个域中的对象来解决领域自适应检测问题

Benefits of technology

[0025]能同时检测两个域中的对象来解决领域自适应检测问题,从而减少了对完美对齐的需求;通过候选集细化策略,消除双域检测过程中产生的重复检测结果;基于最小方差的动态阈值方法,通过自适应调整到最优阈值来挖掘有价值的伪标签,通过更新最佳阈值来选择伪标签,使得模型能够学习到更多具有价值的伪标签。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570442B_ABST
    Figure CN118570442B_ABST
Patent Text Reader

Abstract

The application discloses a target detection method, medium and equipment based on a double-domain teacher framework, relates to the technical field of computer vision, and mainly comprises the following steps: obtaining source domain style images and target domain style images according to target domain images, source domain images and a CycleGAN model; initializing a student model and a teacher model to obtain pseudo labels of the target domain images and the source domain style images; training the student model by using the pseudo labels, updating network parameters of the teacher model, and obtaining a trained detection framework; obtaining target domain detection results and source domain detection results by using the trained detection framework; and obtaining final detection results by using a candidate set improvement strategy. The target detection method, medium and equipment based on the double-domain teacher framework can simultaneously detect objects in two domains to solve the problem of field self-adaptive detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and more specifically, to a target detection method, medium, and device based on a dual-domain teacher framework. Background Technology

[0002] Object detection is a challenging task that aims to identify and locate all instances of a specific category of objects in an image. In recent years, this field has made significant progress with supervised methods, which have been widely applied in image applications, including face recognition, autonomous driving, and medical detection. However,

[0003] When training and test data come from different distributions, the detector's performance drops sharply. Although manually collecting and annotating training samples in the target domain can alleviate the domain shift problem, this is very expensive and time-consuming.

[0004] Unsupervised domain adaptation techniques aim to improve the detection performance of the target domain by transferring knowledge acquired from the labeled source domain to the target domain. This field has received widespread attention and in-depth research. Most unsupervised domain adaptation methods align the feature distributions of the source and target domains through techniques such as adversarial feature learning and image-to-image transformation, enabling the learned model to generalize well to the target domain. These methods utilize image-level, instance-level, and pixel-level alignment to reduce cross-domain differences, making the distributions of the source and target domains more similar. Despite these efforts, achieving perfect distribution alignment across different domains remains challenging due to the lack of annotations in the target domain.

[0005] Many works also utilize training models on source domain images to generate pseudo-labels for target domain images, and then using these pseudo-labels to further train the model on the target domain. These methods encourage the model to align the feature distributions of the source and target domains through self-training. However, pseudo-labels generated by models trained from the source domain often contain a large number of errors and false positives. This is because domain adaptation scenarios typically involve a large domain gap between labeled and unlabeled data.

[0006] Recently, teacher-student frameworks have improved the performance of unsupervised domain detection by leveraging teacher models to generate pseudo-labels in the target domain. By utilizing an exponential moving average mechanism to update parameters, the teacher model effectively captures the distribution and features of the training data, resulting in more stable predictions of target pseudo-labels. However, due to domain bias, the teacher model tends to favor the source domain, which poses a challenge to improving the quality of target domain pseudo-labels.

[0007] To further enhance domain alignment in the teacher-student framework, an intuitive idea is to incorporate pixel-level or instance-level alignment into the teacher-student model to further reduce domain discrepancies and improve detection performance. However, instance-level alignment is challenging due to the lack of bounding box annotations in the target domain, while pixel-level alignment is highly complex and difficult to capture. Attempts to enhance the teacher-student model through distribution alignment return to the challenge of achieving perfect alignment, creating a perpetual loop. Therefore, researching a method that can enhance the generalization ability of object detection models and mitigate domain offset is of great significance for unsupervised domain-adaptive object detection tasks. Summary of the Invention

[0008] The purpose of this invention is to provide a target detection method, medium, and device based on a dual-domain teacher framework, which can simultaneously detect objects in two domains to solve the domain-adaptive detection problem.

[0009] This invention provides a target detection method based on a dual-domain teacher framework, comprising the following steps: S1: Constructing a detection framework for feature extraction and classification; the detection framework includes a teacher model and a student model; S2: Obtaining a target domain image, a source domain image, and a CycleGAN model; obtaining a source domain style image and a target domain style image based on the target domain image, the source domain image, and the CycleGAN model; S3: Pre-training the student model using the ImageNet dataset; initializing the student model and the teacher model using the source domain image and the target domain style image to obtain an initialized student model and an initialized teacher model; S4: Based on the target domain image and the source domain style image, using a minimum variance-based method... The dynamic thresholding method and the initialized teacher model are used to obtain pseudo-labels for the target domain image and the source domain style image; S5: The initialized student model is trained using the pseudo-labels of the target domain image and the source domain style image to obtain a trained student model; The network parameters of the initialized teacher model are updated using the trained student model to obtain a trained teacher model; Based on the trained student model and the trained teacher model, a trained detection framework is obtained; S6: The target domain image and the source domain style image are fed into the trained detection framework to obtain the target domain detection result and the source domain detection result; S7: Based on the target domain detection result and the source domain detection result, a candidate set is used to refine the strategy to obtain the final detection result.

[0010] Furthermore, the teacher and student models of the object detection method based on the dual-domain teacher framework mentioned above include the Faster R-CNN network, which includes the VGG-16 module.

[0011] Furthermore, step S2 of the above-mentioned object detection method based on the dual-domain teacher framework includes the following steps: S201: Obtain the target domain image, the source domain image, and the CycleGAN model; train the CycleGAN model using the target domain image and the source domain image to obtain the trained CycleGAN model; S202: Use the trained CycleGAN model to obtain the source domain style image and the target domain style image.

[0012] Furthermore, step S3 of the object detection method based on the dual-domain teacher framework mentioned above includes the following steps: S301: Obtain the ImageNet dataset and train the VGG-16 module of the student model using the ImageNet dataset to obtain a pre-trained student model; S302: Train the pre-trained student model using source domain images and target domain style images to obtain an initialized student model; S303: Pass the network parameters of the initialized student model to the teacher model to obtain an initialized teacher model.

[0013] Furthermore, step S4 of the above-mentioned object detection method based on the dual-domain teacher framework includes the following steps: S401: Perform object detection on the target domain image and the source domain style image using the initialized teacher model to obtain a detection candidate set and a confidence set; S402: Using the maximum mean constraint, sort the confidence set in descending order of confidence to obtain a rearranged confidence set and a corresponding detection candidate subset containing different elements, as shown in the formula:

[0014]

[0015] Where j represents the object category, and δ represents the number of epochs of mutual learning. It is a set of confidence levels rearranged from largest to smallest. Given a confidence set, `sort()` performs a rearrangement operation; S403: Based on the rearranged confidence set, obtain the confidence threshold for measuring the object category, as shown in the formula:

[0016]

[0017] in To measure the confidence threshold for object categories, This represents the variance of the top m candidate objects of object class j. Let m be the confidence score of the m-th candidate object of object category j. S404: Based on the subset of detection candidates containing different elements, the predicted objects are filtered using a confidence threshold that measures the object category, and the predicted objects with a confidence value greater than the threshold are used as pseudo-labels.

[0018] Furthermore, step S5 of the above-mentioned object detection method based on the dual-domain teacher framework includes the following steps: S501: Using the pseudo-labels of the target domain image and the source domain style image, train the student model using gradient descent to obtain a trained student model; S502: Update the network parameters of the teacher model using the trained student model through exponential moving average to obtain a trained teacher model, as shown in the formula:

[0019] θ t =αθ t +(1-α)θ s

[0020] Where, θ t The network parameters θ represent the teacher model. s The network parameters represent the student model, and α is the update weight; S503: Based on the trained student model and the trained teacher model, the trained detection framework is obtained.

[0021] Furthermore, step S7 of the above-mentioned object detection method based on the dual-domain teacher framework includes the following steps: S701: Based on the target domain detection results and the source domain detection results, obtain the intersection-union ratio (IU) of each detected object in the source domain detection results with all detected objects in the target domain detection results; S702: When the IU is less than a preset similarity threshold, add the corresponding candidate bounding box as an additional detection object to the target detection results to obtain the final detection result; when the IU is not less than the preset similarity threshold, discard the detected object and continue to judge and select the next detected object in the source domain detection results until all detected objects in the source domain detection results are judged and selected to obtain the final detection result.

[0022] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the object detection method based on the dual-domain teacher framework described above.

[0023] The present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the target detection method based on the dual-domain teacher framework described above.

[0024] The object detection method, medium, and device based on the dual-domain teacher framework provided by this invention have the following beneficial effects:

[0025] It can simultaneously detect objects in two domains to solve the problem of domain-adaptive detection, thereby reducing the need for perfect alignment; it eliminates duplicate detection results generated during dual-domain detection through a candidate set refinement strategy; and it uses a dynamic thresholding method based on minimum variance to discover valuable pseudo-labels by adaptively adjusting to the optimal threshold and selecting pseudo-labels by updating the optimal threshold, enabling the model to learn more valuable pseudo-labels. Attached Figure Description

[0026] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0027] Figure 1 This is a flowchart of the object detection method based on a dual-domain teacher framework provided by the present invention;

[0028] Figure 2 This is a framework diagram of the object detection method based on a dual-domain teacher framework provided by the present invention;

[0029] Figure 3 This is a schematic diagram illustrating a specific implementation of the CSR strategy provided by the present invention;

[0030] Figure 4 This is a structural block diagram of the computer device provided by the present invention. Detailed Implementation

[0031] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0032] Figure 1 A schematic diagram of the object detection method based on the dual-domain teacher framework of this embodiment is shown. In this embodiment, the object detection method based on the dual-domain teacher framework includes the following steps:

[0033] S1: Construct a detection framework for feature extraction and classification; the detection framework includes a teacher model and a student model;

[0034] Specifically, the teacher and student models of the object detection method based on the dual-domain teacher framework mentioned above include the Faster R-CNN network, which includes the VGG-16 module.

[0035] S2: Obtain the target domain image, source domain image, and CycleGAN model. Based on the target domain image, source domain image, and CycleGAN model, obtain the source domain style image and the target domain style image.

[0036] Specifically, step S2 includes the following steps: S201: Obtain the target domain image, the source domain image, and the CycleGAN model; train the CycleGAN model using the target domain image and the source domain image to obtain the trained CycleGAN model; S202: Use the trained CycleGAN model to obtain the source domain style image and the target domain style image.

[0037] S3: Pre-train the student model using the ImageNet dataset; initialize the student and teacher models using source domain images and target domain style images to obtain initialized student and teacher models;

[0038] Specifically, step S3 includes the following steps: S301: Obtain the ImageNet dataset, and use the ImageNet dataset to train the VGG-16 module of the student model to obtain a pre-trained student model; S302: Use source domain images and target domain style images to train the pre-trained student model to obtain an initialized student model; S303: Pass the network parameters of the initialized student model to the teacher model to obtain an initialized teacher model.

[0039] S4: Based on the target domain image and the source domain style image, use the dynamic thresholding method based on minimum variance and the initialized teacher model to obtain the pseudo-labels of the target domain image and the source domain style image;

[0040] Specifically, step S4 includes the following steps: S401: Using the initialized teacher model, perform object detection on the target domain image and the source domain style image to obtain a detection candidate set and a confidence set; S402: Using the maximum mean constraint, sort the confidence set in descending order of confidence to obtain a rearranged confidence set and a corresponding detection candidate subset containing different elements, as shown in the formula:

[0041]

[0042] Where j represents the object category, and δ represents the number of epochs of mutual learning. It is a set of confidence levels rearranged from largest to smallest. Given a confidence set, `sort()` performs a rearrangement operation; S403: Based on the rearranged confidence set, obtain the confidence threshold for measuring the object category, as shown in the formula:

[0043]

[0044] in To measure the confidence threshold for object categories, This represents the variance of the top m candidate objects of object class j. Let m be the confidence score of the m-th candidate object of object category j. S404: Based on the subset of detection candidates containing different elements, the predicted objects are filtered using a confidence threshold that measures the object category, and the predicted objects with a confidence value greater than the threshold are used as pseudo-labels.

[0045] S5: Train the initialized student model using pseudo-labels from the target domain image and the source domain style image to obtain a trained student model; update the network parameters of the initialized teacher model using the trained student model to obtain a trained teacher model; and obtain a trained detection framework based on the trained student model and the trained teacher model.

[0046] Specifically, step S5 includes the following steps: S501: Using the pseudo-labels of the target domain image and the source domain style image, train the student model using gradient descent to obtain a trained student model; S502: Update the network parameters of the teacher model using the trained student model through exponential moving average to obtain a trained teacher model, as shown in the formula:

[0047] θ t =αθ t +(1-α)θ s

[0048] Where, θ t The network parameters θ represent the teacher model. s The network parameters represent the student model, and α is the update weight; S503: Based on the trained student model and the trained teacher model, the trained detection framework is obtained;

[0049] S6: Feed the target domain image and the source domain style image into the trained detection framework to obtain the target domain detection result and the source domain detection result;

[0050] S7: Based on the target domain detection results and the source domain detection results, the candidate set is used to improve the strategy and obtain the final detection results;

[0051] Specifically, step S7 includes the following steps: S701: Based on the target domain detection results and the source domain detection results, obtain the intersection-union ratio (IU) of each detected object in the source domain detection results with all detected objects in the target domain detection results; S702: When the IU is less than a preset similarity threshold, add the corresponding candidate bounding box as an additional detection object to the target detection results to obtain the final detection results; when the IU is not less than the preset similarity threshold, discard the detected object and continue to judge and select the next detected object in the source domain detection results until all detected objects in the source domain detection results are judged and selected to obtain the final detection results.

[0052] In some embodiments, the object detection method based on the dual-domain teacher framework described above can also be implemented in the following ways.

[0053] Object detection methods based on a dual-domain teacher framework include:

[0054] S1: Construct a dual-domain teacher framework, which consists of a teacher model and a student model;

[0055] In step S1, a dual-domain teacher framework is constructed, such as... Figure 2 As shown, the network consists of a teacher model and a student model, and its specific steps are as follows:

[0056] S101: Construct a detection framework based on teacher and student models;

[0057] S102: The student model uses Faster-RCNN as the basic detection model, and the teacher model has the same structure as the student model.

[0058] S2: Using the CycleGAN model, source domain style images and target domain style images are generated using target domain and source domain images;

[0059] In step S2, the specific steps for sample generation are as follows: the CycleGAN model is trained using source domain images and target domain images to generate source domain style images and target domain style images;

[0060] S3: During the training phase, the source domain image D... s and target domain style image D t←s Input the student network to extract initial features and initialize the teacher-student framework;

[0061] In step S3, the generated samples are fed into the teacher-student framework to obtain the initial features; the initial feature network contains 13 Conv layers, 13 ReLU layers, and 4 pooling layers. The VGG16 network has been pre-trained on ImageNet;

[0062] Faster R-CNN was used as the base object detector, and VGG-16 was pre-trained on ImageNet. During training, all images were adjusted to 600 on the short side while maintaining the original aspect ratio.

[0063] S4: The teacher model utilizes a minimum variance-based dynamic thresholding (MVDT) module to apply a threshold to the target domain image D. t and source domain style image D s←tThe specific steps for generating pseudo-tags are as follows:

[0064] S401: Detecting D using the initialized teacher model t and D s←t The target in the sample is used to obtain the candidate set for detection. and confidence set Where j represents the object category and δ represents the number of epochs of mutual learning;

[0065] S402: Under the constraint of maximum mean, first sort the confidence sets in descending order of confidence level. Sort the elements and construct candidate subsets containing distinct elements;

[0066]

[0067] S403: Next calculation confidence variance of a subset As a confidence threshold for measuring object categories;

[0068]

[0069] in This represents the variance of the top m candidate objects of object category j. represents the average confidence score of the top m candidates, and K represents the total number of categories. The smaller the variance of a subset, the higher the degree of clustering of the candidate confidence levels corresponding to that subset. The minimum confidence score is selected from the subset with the smallest variance as the current confidence threshold, and dynamically adjusted during the training process.

[0070] S404: Use the current dynamic confidence threshold to filter the predicted objects and use them as pseudo-labels;

[0071] S5: The teacher generates pseudo-labels to train the student model. The student model updates the weights of the teacher model using an exponential moving average strategy. The student model is trained using gradient descent.

[0072] In step S5, the student model is trained using gradient descent, with the student updating weights with the teacher via exponential moving average. The specific steps are as follows:

[0073] S501: Use the pseudo-labels generated by the teacher to train the student model, thereby updating the student model;

[0074] S502: The student model updates the parameters of the teacher model using an exponential moving average. The update formula is defined as follows;

[0075] θ t =αθ t +(1-α)θ s

[0076] Where θ t and θ s These represent the network parameters for teachers and students, respectively.

[0077] S6: During the testing phase, a dual-domain detection method is used to detect targets in both the target domain and the source domain style images simultaneously.

[0078] In step S6, a dual-domain detection method is used to simultaneously detect targets in both the target domain and the source domain style data. First, it is theoretically proven that after achieving perfect image-level alignment, domain-adaptive target detection can be achieved by simultaneously detecting objects in both the target domain data and its corresponding source domain style data. The target detection problem is considered as P(C,B|I), where C and B represent the target category and bounding box, and I represents the image. If I can be expressed as I={I D1 +I D2}, where I D1 and I D2 Let C and B be the images in domains D1 and D2, respectively, where the images in D1 and D2 have no overlap. Then the joint probability distribution P(C,B|I) can be expressed as follows:

[0079]

[0080] When image-level alignment is achieved between domains D1 and D2, P(I D1 )=P(I D2 If ), then the above formula can be expressed as follows:

[0081]

[0082] As mentioned above, the dual-domain detection problem can be solved by simultaneously detecting targets in two domains and merging the detection outputs when the two domains have no overlap and image-level alignment is achieved.

[0083] In the detection process of this embodiment, D1 is set as the target domain, i.e. D2 represents the source domain style after the target domain has been transformed by CycleGAN, i.e. The target domain image and its corresponding source domain style image are simultaneously fed into the detector for detection.

[0084] S7: The results of dual-domain detection contain duplicate detection results. This embodiment proposes a Candidate Set Refinement (CSR) strategy to solve the above-mentioned redundant detection results. It removes duplicate detection results from the target domain data and the source domain style data, and merges the detection results of the two domains into the final result, further solving the problem of duplicate detection results generated in the dual-domain detection process. The specific steps are as follows:

[0085] S701: Use the Intersection of Union (IoU) ratio to determine the similarity between the detected object S1 in the source domain style image and all detected objects in the target domain;

[0086] S702: If the IoU of all target domain detection results is less than the similarity threshold ξ (set to 0.68 in the experiment), the corresponding candidate bounding boxes are added as additional detection objects to the target detection results. If the IoU exceeds the threshold, the next object S2 is calculated. This continues until all candidate objects in the source domain style image are fully calculated.

[0087] The following is a detailed explanation of the relevant details in the above method:

[0088] (1) The following is a detailed explanation of the dual-domain detection technique during the training process.

[0089] This method attempts to solve the problem of neighborhood adaptive detection by simultaneously detecting targets in the target domain image and the corresponding source domain style image, thereby reducing the need for perfect alignment; such as Figure 3 As shown, the target domain image and the corresponding source domain style image generated by the CycleGAN network are simultaneously fed into the detector to obtain the prediction results in the target domain and the source domain style image, respectively. These are then fed into the CSR to eliminate duplicate detection results and obtain the final detection result.

[0090] (2) The CSR strategy is explained in detail below.

[0091] like Figure 3 As shown, the similarity between the detected object S1 in the source domain style data and all detected objects in the target domain is first determined using IoU. If the IoU of all target domain detection results is less than the similarity threshold ξ (set to 0.68 in the experiment), the corresponding candidate bounding box is added as an additional detection object to the target detection results. If the IoU exceeds the threshold, the next object S2 is calculated. This continues until all candidate objects in the source domain style data have been fully calculated.

[0092] To verify the effectiveness of the method of this invention, experiments were conducted on three mainstream object detection datasets, including Cityscapes, Foggy Cityscapes, and KITTI:

[0093] Cityscapes contains community scenes from 50 different cities, spanning spring, summer, and autumn. It includes 2,975 images for training and 500 images for validation. All images have a resolution of 1024*2048.

[0094] Foggy Cityscapes is synthesized by adding different levels of fog to a city landscape. It inherits the Cityscape tag and shares the same structure. We made domain adjustments from the city landscape to the fog city landscape.

[0095] KITTI is another street view dataset. This data was collected using cameras in cities different from Cityscapes. We focus on the car categories shared between KITTI and Cityscapes.

[0096] Evaluation metrics: This method uses mean accuracy (mAP) to evaluate the performance of our proposed method in the target domain.

[0097] Experimental indicators:

[0098] Table 1: Evaluation of Experimental Performance on CITYSCAPES-to-Foggy Cityscapes

[0099]

[0100] Table 2: Evaluation of Experimental Performance on KITTI-to-CITYSCAPES

[0101]

[0102] The experimental results in Tables 1 and 2 show that our method is significantly better than existing methods, demonstrating its superiority.

[0103] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the target detection method based on the dual-domain teacher framework described above. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0104] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the object detection method based on the dual-domain teacher framework described above.

[0105] like Figure 4As shown, the computer device may include: at least one processor 121, such as a CPU (Central Processing Unit), at least one communication interface 123, memory 124, and at least one communication bus 122. The communication bus 122 is used to enable communication between these components. The communication interface 123 may include a display screen and a keyboard; optionally, the communication interface 123 may also include a standard wired interface or a wireless interface. The memory 124 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk drive. Optionally, the memory 124 may also be at least one storage device located remotely from the processor 121. The memory 124 stores application programs, and the processor 121 calls the program code stored in the memory 124 to execute any of the aforementioned method steps. The communication bus 122 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 122 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4The term 124 is represented by a single line, but this does not imply a single bus or a single type of bus. The memory 124 may include volatile memory, such as random-access memory (RAM); it may also include non-volatile memory, such as flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory. The processor 121 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 121 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. Optionally, the memory 124 is also used to store program instructions. The processor 121 can call the program instructions to implement the target detection method based on the dual-domain teacher framework as described in this embodiment.

[0106] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A target detection method based on a dual-domain teacher framework, characterized in that, Includes the following steps: S1: Construct a detection framework for feature extraction and classification; the detection framework includes a teacher model and a student model; S2: Obtain the target domain image, the source domain image, and the CycleGAN model; based on the target domain image, the source domain image, and the CycleGAN model, obtain the source domain style image and the target domain style image. S3: Pre-train the student model using the ImageNet dataset; initialize the student model and teacher model using the source domain image and the target domain style image to obtain the initialized student model and the initialized teacher model; S4: Based on the target domain image and the source domain style image, using the minimum variance-based dynamic thresholding method and the initialized teacher model, obtain pseudo-labels for the target domain image and the source domain style image, including: S401: Using the initialized teacher model, target detection is performed on the target domain image and the source domain style image to obtain a detection candidate set and a confidence set; S402: Using the maximum mean constraint, sort the confidence set in descending order of confidence level to obtain a rearranged confidence set and a corresponding subset of detection candidates containing different elements, as shown in the formula: in, j Represents the category of objects. δ The number of epochs representing mutual learning. It is a set of confidence levels rearranged from largest to smallest. Given a set of confidence scores, sort() performs a rearrangement operation. S403: Based on the rearranged confidence set, obtain the confidence threshold for measuring the object category, as shown in the formula: in To measure the confidence threshold for object categories, Represents object category The former The variance of each candidate object For object categories The Confidence level of each candidate Representative before The average confidence score of each candidate object, where N is the number of candidate objects and K represents the total number of categories; S404: Based on the detection candidate subset containing different elements, filter the predicted objects using the confidence threshold for measuring the object category, and use the predicted objects that are greater than the threshold as pseudo-labels. S5: Train the initialized student model using the pseudo-labels of the target domain image and the source domain style image to obtain a trained student model; update the network parameters of the initialized teacher model using the trained student model to obtain a trained teacher model; obtain a trained detection framework based on the trained student model and the trained teacher model. S6: Input the target domain image and the source domain style image into the trained detection framework to obtain the target domain detection result and the source domain detection result; S7: Based on the target domain detection results and source domain detection results, a candidate set improvement strategy is used to obtain the final detection results, including: S701: Based on the target domain detection results and the source domain detection results, obtain the intersection-union ratio of each detected object in the source domain detection results and all detected objects in the target domain detection results; S702: When the intersection-union ratio is less than the preset similarity threshold, the corresponding candidate bounding box is added as an additional detection object to the target detection result to obtain the final detection result; when the intersection-union ratio is not less than the preset similarity threshold, the detected object is discarded, and the next detected object in the source domain detection result is judged and selected until all detected objects in the source domain detection result are judged and selected to obtain the final detection result.

2. The target detection method based on a dual-domain teacher framework according to claim 1, characterized in that, The teacher and student models include a Faster R-CNN network, which includes a VGG-16 module.

3. The target detection method based on a dual-domain teacher framework according to claim 2, characterized in that, Step S2 includes the following steps: S201: Obtain the target domain image, the source domain image, and the CycleGAN model; train the CycleGAN model using the target domain image and the source domain image to obtain the trained CycleGAN model. S202: Using the trained CycleGAN model, obtain source domain style images and target domain style images.

4. The target detection method based on a dual-domain teacher framework according to claim 2, characterized in that, Step S3 includes the following steps: S301: Obtain the ImageNet dataset and use the ImageNet dataset to train the VGG-16 module of the student model to obtain a pre-trained student model. S302: Train the pre-trained student model using the source domain image and the target domain style image to obtain an initialized student model; S303: Pass the network parameters of the initialized student model to the teacher model to obtain the initialized teacher model.

5. The target detection method based on a dual-domain teacher framework according to claim 2, characterized in that, Step S5 includes the following steps: S501: Using the pseudo-labels of the target domain image and the source domain style image, the student model is trained according to the gradient descent method to obtain a trained student model. S502: The network parameters of the teacher model are updated using the trained student model through an exponential moving average method to obtain a trained teacher model, as shown in the formula: in, Network parameters representing the teacher model, Network parameters representing the student model, α To update the weights; S503: Based on the trained student model and the trained teacher model, obtain the trained detection framework.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of any of the object detection methods based on the dual-domain teacher framework as described in claims 1-5.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of any of the object detection methods based on the dual-domain teacher framework as described in claims 1-5.