Target detection method based on double-domain teacher framework, medium and equipment

Generating style images through the dual-domain teacher framework and CycleGAN model, combined with dynamic threshold and exponential moving average mechanisms, solves the problem of domain differences in unsupervised domain adaptive target detection, improves detection performance and model generalization capabilities, and reduces repeated detections result.

CN118570442AActive Publication Date: 2024-08-30CHINA UNIV OF GEOSCIENCES (WUHAN)

Patent Information

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

AI Technical Summary

Technical Problem

In target detection tasks, especially in unsupervised domain adaptive target detection, the domain difference between the target domain and the source domain leads to a decrease in detection performance. It is difficult for the existing technology to achieve perfect distribution alignment, resulting in low pseudo-label quality and affecting the model. Generalization ability.

Method used

Adopt a method based on the dual-domain teacher framework to generate source domain style images and target domain style images through the CycleGAN model. Combined with the minimum variance dynamic threshold method and exponential moving average mechanism, the teacher and student models are initialized and updated to generate high-quality pseudo labels. , and eliminate duplicate detection results through the candidate set improvement strategy.

Benefits of technology

It effectively reduces domain differences, improves the generalization ability of the target detection model, reduces the need for perfect alignment, improves detection performance, enhances the quality of pseudo labels, and reduces duplicate detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570442A
    Figure CN118570442A
Patent Text Reader

Abstract

The invention discloses a target detection method based on a double-domain teacher framework, a medium and equipment, and relates to the technical field of computer vision, and the target detection method based on the double-domain teacher framework mainly comprises the steps: obtaining a source domain style image and a target domain style image according to a target domain image, a source domain image and a CycleGAN model; initializing the student model and the teacher model to obtain pseudo labels of the target domain image and the source domain style image; training the student model by using the pseudo tag, and updating network parameters of the teacher model to obtain a trained detection framework; obtaining a target domain detection result and a source domain detection result by using the trained detection framework; and a final detection result is obtained by using a candidate set perfection strategy. By implementing the target detection method based on the double-domain teacher framework, the medium and the equipment provided by the invention, the objects in the two domains can be detected at the same time to solve the field adaptive detection problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present 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 Art

[0002] Object detection is a challenging task that aims to identify and localize all object instances of a specific category in an image. In recent years, this direction has made great progress in supervised methods and has been widely used in image applications, including face recognition, autonomous driving, and medical detection. However,

[0003] When the training data and test data come from different distributions, the performance of the detector will drop sharply. Although manually collecting and annotating target domain training samples can alleviate the problem of domain shift, it is very expensive and time-consuming.

[0004] Unsupervised domain adaptation techniques aim to improve the detection performance in the target domain by transferring knowledge acquired from a labeled source domain to the target domain. This field has received extensive 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 translation, so that the learned model can generalize well to the target domain. These methods use image-level, instance-level, and pixel-level alignment to reduce cross-domain differences and make the distributions of the source and target domains more similar. Despite these efforts, achieving perfect distribution alignment between 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 use the 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, the pseudo labels generated from the model trained on the source domain usually contain a large number of errors and false positives. This is because the scenarios of domain adaptation usually involve a large domain gap between labeled and unlabeled data.

[0006] Recently, the teacher-student framework utilizes a teacher model to generate pseudo labels in the target domain to improve the performance of unsupervised domain detection. By utilizing an exponential moving average mechanism to update parameters, the teacher model can effectively capture the distribution and characteristics of the training data, resulting in more stable predictions of the target pseudo labels. However, due to the domain shift, the teacher model tends to be biased towards the source domain, which poses a challenge to improving the quality of the target domain pseudo labels.

[0007] To further enhance the 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 the domain difference and improve the 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 very 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 cycle. Therefore, studying a method that can enhance the generalization ability of object detection models and alleviate domain shift is of great significance for the task of unsupervised domain adaptation object detection. Summary of the invention

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

[0009] The present invention provides an object 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 comprises a teacher model and a student model; S2: acquiring a target domain image, a source domain image and a CycleGAN model, and obtaining a source domain style image and a target domain style image according to the target domain image, the source domain image and the CycleGAN model; S3: pre-training the student model using an ImageNet data set; 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: using a minimum variance-based method according to the target domain image and the source domain style image The dynamic threshold method and the initialized teacher model are used to obtain pseudo labels of the target domain image and the source domain style image; S5: the pseudo labels of the target domain image and the source domain style image are used to train the initialized student model 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; according to 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 sent to the trained detection framework to obtain the target domain detection result and the source domain detection result; S7: according to the target domain detection result and the source domain detection result, the candidate set is used to improve the strategy to obtain the final detection result.

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

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

[0012] Furthermore, step S3 of the above-mentioned target detection method based on the dual-domain teacher framework 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 the source domain image and the target domain style image 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.

[0013] Furthermore, step S4 of the above-mentioned target detection method based on the dual-domain teacher framework includes the following steps: S401: using the initialized teacher model to perform target 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, sorting the confidence set in order from large to small confidence, and obtaining a rearranged confidence set and a corresponding detection candidate subset containing different elements, such as the formula:

[0014]

[0015] Among them, j represents the object category, δ represents the number of epochs of mutual learning, is a confidence set rearranged from large to small according to the confidence level, is a confidence set, and sort() is a rearrangement operation; S403: according to the rearranged confidence set, a confidence threshold for measuring the object category is obtained, such as the formula:

[0016]

[0017] in To measure the confidence threshold of the object category, represents the variance of the top m candidates for object category j, is the confidence score of the mth candidate object of object category j, Represents the average confidence value of the first m candidate objects, N is the number of candidate objects, and K represents the total number of categories; S404: According to the detection candidate subset containing different elements, the confidence threshold of the object category is used to filter the predicted objects, and the predicted objects 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: training the student model using pseudo labels of the target domain image and the source domain style image according to the gradient descent method to obtain a trained student model; S502: updating the network parameters of the teacher model using the trained student model through the exponential moving average method to obtain a trained teacher model, as shown in the formula:

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

[0020] Among them, θ t represents the network parameters of the teacher model, θ s represents the network parameters of the student model, and α is the update weight; S503: according to the trained student model and the trained teacher model, a trained detection framework is obtained.

[0021] Furthermore, step S7 of the above-mentioned target detection method based on the dual-domain teacher framework includes the following steps: S701: According to the target domain detection result and the source domain detection result, obtain the intersection-and-union ratio of each detection object in the source domain detection result and all detection objects in the target domain detection result; S702: When the intersection-and-union ratio is less than the preset similarity threshold, the corresponding candidate bounding box is added to the target detection result as an additional detection object to obtain the final detection result; when the intersection-and-union ratio is not less than the preset similarity threshold, the detection object is discarded, and the next detection object in the source domain detection result is continued to be judged and selected, until all detection objects in the source domain detection result are judged and selected, and the final detection result is obtained.

[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 target detection method based on the dual-domain teacher framework as 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, the steps of the target detection method based on the dual-domain teacher framework as described above are implemented.

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

[0025] It can simultaneously detect objects in two domains to solve the domain adaptive detection problem, thereby reducing the need for perfect alignment; through the candidate set refinement strategy, it eliminates the duplicate detection results generated in the dual-domain detection process; based on the minimum variance dynamic threshold method, it mines valuable pseudo-labels by adaptively adjusting to the optimal threshold, and selects pseudo-labels by updating the optimal threshold, so that the model can learn more valuable pseudo-labels. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 is a flow chart of a target detection method based on a dual-domain teacher framework provided by the present invention;

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

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

[0030] Figure 4 It is a structural block diagram of the computer device provided by the present invention. DETAILED DESCRIPTION

[0031] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.

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

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

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

[0035] S2: Obtain a target domain image, a source domain image, and a CycleGAN model, and obtain a source domain style image and a target domain style image according to the target domain image, the source domain image, and the CycleGAN model;

[0036] Specifically, step S2 includes the following steps: S201: obtaining a target domain image, a source domain image and a CycleGAN model, and training the CycleGAN model using the target domain image and the source domain image to obtain a trained CycleGAN model; S202: obtaining a source domain style image and a target domain style image using the trained CycleGAN model;

[0037] S3: Use the ImageNet dataset to pre-train the student model; use the source domain image and the target domain style image to initialize the student model and the teacher model to obtain the initialized student model and the initialized teacher model;

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

[0039] S4: According to the target domain image and the source domain style image, the pseudo labels of the target domain image and the source domain style image are obtained by using the dynamic threshold method based on minimum variance and the initialized teacher model;

[0040] Specifically, step S4 includes the following steps: S401: using the initialized teacher model to perform target 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, sorting the confidence set in descending order of confidence to obtain a rearranged confidence set and a corresponding detection candidate subset containing different elements, such as the formula:

[0041]

[0042] Among them, j represents the object category, δ represents the number of epochs of mutual learning, is a confidence set rearranged from large to small according to the confidence level, is a confidence set, and sort() is a rearrangement operation; S403: according to the rearranged confidence set, a confidence threshold for measuring the object category is obtained, such as the formula:

[0043]

[0044] in To measure the confidence threshold of the object category, represents the variance of the top m candidates for object category j, is the confidence score of the mth candidate object of object category j, represents the average confidence value of the first m candidate objects, N is the number of candidate objects, and K represents the total number of categories; S404: according to the detection candidate subset containing different elements, the confidence threshold of the object category is used to screen the predicted objects, and the predicted objects greater than the threshold are used as pseudo labels;

[0045] S5: Use the pseudo labels of the target domain image and the source domain style image to train the initialized student model to obtain a trained student model; use the trained student model to update the network parameters of the initialized teacher model to obtain a trained teacher model; 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: According to the gradient descent method, the 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; S502: Through the exponential moving average method, the network parameters of the teacher model are updated using the trained student model to obtain a trained teacher model, as shown in the formula:

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

[0048] Among them, θ t represents the network parameters of the teacher model, θ s represents the network parameters of the student model, and α is the update weight; S503: according to the trained student model and the trained teacher model, a trained detection framework is obtained;

[0049] S6: Send the target domain image and the source domain style image to 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 result;

[0051] Specifically, step S7 includes the following steps: S701: according to the target domain detection result and the source domain detection result, obtain the intersection-over-union ratio of each detection object in the source domain detection result and all detection objects in the target domain detection result; S702: when the intersection-over-union ratio is less than a preset similarity threshold, the corresponding candidate bounding box is added to the target detection result as an additional detection object to obtain the final detection result; when the intersection-over-union ratio is not less than the preset similarity threshold, the detection object is discarded, and the next detection object in the source domain detection result is continuously judged and selected, until all detection objects in the source domain detection result are judged and selected, and the final detection result is obtained.

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

[0053] Object detection methods based on the 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 in Figure 1, the network consists of a teacher model and a student model, and the specific steps are:

[0056] S101: Build a detection framework based on teacher model and student model;

[0057] S102: Faster-RCNN is used as the basic detection model in the student model, and the structure of the teacher model is the same as that of the student model;

[0058] S2: With the help of the CycleGAN model, the target domain and source domain images are used to generate source domain style images and target domain style images;

[0059] In step S2, the specific steps of sample generation are: using the source domain image and the target domain image to train the CycleGAN model, thereby generating a source domain style image and a target domain style image;

[0060] S3: Training phase, the source domain image D s and the target domain style image D t←s Send it to 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 is used as the basic object detector, and VGG-16 is pre-trained on ImageNet. During the training process, all images are resized to 600 on the short side while maintaining the original aspect ratio;

[0063] S4: The teacher model uses the Minimum Variance-based Dynamic Threshold (MVDT) module to provide a t and the source domain style image D s←tGenerate pseudo labels, the steps are as follows:

[0064] S401: Use the initialized teacher model to detect D t and D s←t The target in the detection candidate set is obtained and confidence set Where j represents the object category and δ represents the number of epochs of mutual learning;

[0065] S402: Under the constraint of the maximum mean, firstly sort the confidence set in descending order. Sort and construct candidate subsets containing different elements;

[0066]

[0067] S403: Next calculation Confidence variance of the neutron set As a confidence threshold for measuring object categories;

[0068]

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

[0070] S404: Use the current dynamic confidence threshold to filter the predicted object and use it as a pseudo label;

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

[0072] In step S5, the student model is trained by gradient descent, and the student updates the weights with the teacher through exponential moving average. The specific steps are:

[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 through exponential moving average, and the update formula is defined as follows;

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

[0076] where θ t and θ s represents the network parameters of the teacher and the student respectively;

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

[0078] In step S6, the dual-domain detection method is used to simultaneously detect objects in the target domain and the source domain style data. First, it is theoretically proved that after achieving perfect image-level alignment, domain-adaptive object detection can be achieved by simultaneously detecting objects in the target domain data and its corresponding source domain style data. The object detection problem is regarded as P(C, B|I), where C and B represent the category and bounding box of the object, and I represents the image. If I can be expressed as I={I D1 +I D2}, where I D1 and I D2 D 1 and D 2 domain, where D 1 and D 2 There is no intersection between the images in . Then the joint probability distribution P(C,B|I) can be expressed as follows:

[0079]

[0080] When D 1 and D 2 When image-level alignment is achieved in the domain, P(I D1 )=P(I D2 ), then the above formula can be expressed as follows:

[0081]

[0082] As mentioned above, the dual-domain detection problem can be divided into detecting objects in two domains simultaneously and merging the detection output results when the two domains have no intersection and achieve image-level alignment;

[0083] In the detection process of this embodiment, D 1 Set to the target domain, i.e. D 2 is the source domain style after the target domain is converted by CycleGAN, that is The target domain image and the corresponding source domain style image are simultaneously sent to the detector for detection;

[0084] S7: The results of the dual-domain detection include repeated detection results. This embodiment proposes a candidate set refinement strategy (CSR) to solve the above redundant detection results, remove the repeated detection results in the target domain data and the source domain style data, and merge the detection results of the two domains into the final result, further solving the problem of repeated detection results generated in the dual-domain detection process. The specific steps are as follows:

[0085] S701: Determine the object S detected in the source domain style image using the Intersection of Union (IoU) 1 Similarity with 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 box is added to the target detection result as an additional detection object. If the IoU exceeds the threshold, continue to calculate the next object S 2 This continues until all candidate objects in the source domain style image are fully calculated.

[0087] The following is a detailed description of the relevant details in the writing method:

[0088] (1) The dual-domain detection technology during training is described as follows

[0089] This method attempts to solve the domain adaptive detection problem by simultaneously detecting objects in the target domain image and the corresponding source domain style image, thereby reducing the need for perfect alignment; Figure 3 As shown in the figure, the target domain image and the corresponding source domain style image generated by the CycleGAN network are sent to the detector at the same time, and the prediction results of the target domain and source domain style images are obtained respectively. They are sent to CSR to eliminate duplicate detection results and obtain the final detection results.

[0090] (2) The CSR strategy is described in detail as follows

[0091] like Figure 3 As shown, we first use IoU to determine the object S detected in the source domain style data. 1 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 to the target detection result as an additional detection object. If the IoU exceeds the threshold, the next object S is calculated. 2 This continues until all candidate objects in the source domain style data are fully calculated.

[0092] In order to verify the effectiveness of the method of the present invention, experiments are conducted on three mainstream object detection datasets, including Cityscapes, Foggy Cityscapes and KITTI:

[0093] Cityscapes contains neighborhood scenes from 50 different cities in spring, summer, and autumn. It contains 2,975 images for training and 500 images for validation. The resolution of all images is 1024*2048.

[0094] Foggy Cityscapes is synthesized by adding different levels of fog to Cityscapes. It inherits the tags of Cityscape and shares the same structure. We performed domain adaptation from Cityscapes to Foggy Cityscapes.

[0095] KITTI is another street scene dataset. The data was collected using cameras in cities different from Cityscapes. We focus on the car category which is shared between KITTI and Cityscape.

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

[0097] Experimental indicators:

[0098] Table 1: Experimental performance evaluation on CITYSCAPES-to-Foggy Cityscapes

[0099]

[0100] Table 2: Experimental performance evaluation on KITTI-to-CITYSCAPES

[0101]

[0102] From the experimental results in Table 1 and Table 2, it can be seen that the proposed method is significantly better than the existing method, proving the superiority of the proposed method.

[0103] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the target detection method based on the dual-domain teacher framework are implemented. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned 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, the steps of the target detection method based on the dual-domain teacher framework are implemented.

[0105] like Figure 4 As shown, the computer device may include: at least one processor 121, such as a CPU (Central Processing Unit), at least one communication interface 123, a memory 124, and at least one communication bus 122. Among them, the communication bus 122 is used to realize the connection and communication between these components. Among them, the communication interface 123 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 123 may also include a standard wired interface and a wireless interface. The memory 124 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 124 may also be at least one storage device located away from the aforementioned processor 121. Among them, the memory 124 stores an application program, and the processor 121 calls the program code stored in the memory 124 to perform any of the above method steps. Among them, 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 an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4Only one line is used to represent it, but it does not mean that there is only one bus or one type of bus. Among them, the memory 124 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 124 may also include a combination of the above-mentioned types of memory. Among them, the processor 121 may be a central processing unit (English: central processing unit, abbreviated: CPU), a network processor (English: network processor, abbreviated: NP) or a combination of CPU and NP. Among them, the processor 121 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (English: application-specific integrated circuit, abbreviated: ASIC), a programmable logic device (English: programmable logic device, abbreviated: PLD) or a combination thereof. The 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 program instructions to implement the target detection method based on the dual-domain teacher framework of the present embodiment.

[0106] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A target detection method based on a dual-domain teacher framework, characterized in that The following steps are involved: S1: construct a detection framework for feature extraction and classification; the detection framework includes a teacher model and a student model; S2: Obtain a target domain image, a source domain image, and a CycleGAN model, and obtain a source domain style image and a target domain style image according to the target domain image, the source domain image, and the CycleGAN model; S3: Pre-train the student model using the ImageNet dataset; initialize 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: According to the target domain image and the source domain style image, using a dynamic threshold method based on minimum variance and the initialized teacher model, pseudo labels of the target domain image and the source domain style image are obtained; S5: training 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; updating the network parameters of the initialized teacher model using the trained student model to obtain a trained teacher model; obtaining a trained detection framework based on the trained student model and the trained teacher model; S6: sending 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: According to the target domain detection result and the source domain detection result, the candidate set is used to improve the strategy to obtain the final detection result.

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

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

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

5. The object detection method based on the dual-domain teacher framework according to claim 2 is characterized in that: Step S4 includes the following steps: S401: Performing 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, the confidence set is sorted in descending order of confidence, to obtain a rearranged confidence set and a corresponding detection candidate subset containing different elements, such as the formula: Among them, j represents the object category, δ represents the number of epochs of mutual learning, is a confidence set rearranged from large to small according to the confidence level, is the confidence set, sort() is the rearrangement operation; S403: According to the rearranged confidence set, a confidence threshold for measuring the object category is obtained, such as the formula: in To measure the confidence threshold of the object category, represents the variance of the top m candidates for object category j, is the confidence score of the mth candidate object of object category j, represents the average confidence value of the first m candidate objects, N is the number of candidate objects, and K represents the total number of categories; S404: According to the detection candidate subsets containing different elements, the predicted objects are screened using the confidence threshold of the measurement object category, and the predicted objects with a confidence threshold greater than the threshold are used as pseudo labels.

6. The object detection method based on the dual-domain teacher framework according to claim 2 is characterized in that: Step S5 includes the following steps: S501: training a student model using pseudo labels of the target domain image and the source domain style image in a gradient descent manner to obtain a trained student model; S502: Update the network parameters of the teacher model using the trained student model by exponential moving average to obtain a trained teacher model, as shown in the formula: i t =θ t +(1-α)θ s Among them, θ t represents the network parameters of the teacher model, θ s represents the network parameters of the student model, α is the update weight; S503: Obtain a trained detection framework according to the trained student model and the trained teacher model.

7. The object detection method based on the dual-domain teacher framework according to claim 2 is characterized in that: Step S7 includes the following steps: S701: Obtaining, according to the target domain detection result and the source domain detection result, an intersection-over-union ratio of each detected object in the source domain detection result and all detected objects in the target domain detection result; S702: When the intersection-over-union ratio is less than a preset similarity threshold, the corresponding candidate bounding box is added to the target detection result as an additional detection object to obtain a final detection result; when the intersection-over-union ratio is not less than the preset similarity threshold, the detection object is discarded, and the next detection object in the source domain detection result is continuously judged and selected, until all detection objects in the source domain detection result are judged and selected to obtain a final detection result.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the target detection method based on the dual-domain teacher framework as claimed in any one of claims 1 to 7 are implemented.

9. 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, the steps of the target detection method based on the dual-domain teacher framework as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Medical image segmentation method, device and equipment and storage medium

    CN110570394A

  • Percentile-based pseudo-label selection for multi-label semi-supervised classification

    US20240071056A1

Cited By

  • Image text feature fusion domain adaptive target detection method for intelligent driving scene

    CN119810600A

  • Real-time domain adaptive defect detection method based on double alignment and uncertainty filtering

    CN121120647A

  • Cross-domain target detection method and system, device, and storage medium

    WO2026091816A1