Method and device for domain adaptation training of neural network
The method addresses the limitations of conventional unsupervised domain adaptation by employing multi-sized anchor box feature alignment and dynamic self-training, enhancing the quality of pseudo-labels and improving feature alignment, thereby improving the accuracy and stability of object detection models across varying domains.
Patent Information
- Application Number
- JP2024031457
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-03
- Filing Date
- 2024-03-01
- Publication Date
- 2024-09-13
AI Technical Summary
Conventional unsupervised domain adaptation methods for object detection face challenges such as the inability to improve pseudo-label quality, lack of class-level feature alignment, and failure to align features of different sizes effectively, leading to loss of large object feature information.
A method for unsupervised domain adaptation that includes multi-sized anchor box feature alignment, dynamic self-training, and improved feature alignment using an enhanced loss function to minimize intra-class distances and maximize inter-class distances, while utilizing moving average class centers and undersampling to address feature imbalance.
Improves the performance of object detection models by maintaining detailed information across different sizes and enhancing the quality of pseudo-labels, resulting in better stability and accuracy on target domains.
Smart Images

Figure 2024125219000001
Abstract
Description
[Technical field]
[0001] The present disclosure relates generally to domain adaptation, and more particularly, to methods and apparatus for unsupervised domain adaptation training of neural networks for performing object detection. [Background technology]
[0002] Unsupervised domain adaptation means transferring a model trained using labeled source domain data to unlabeled target domain data while maintaining the performance of the model in the target domain as much as possible. Because there is data deviation between the source domain and the target domain and the target domain data is unlabeled, the model trained using the source domain data often has poor performance in the target domain. The training process of unsupervised domain adaptation can effectively reduce the domain difference and improve the robustness of the model by utilizing both the labeled data of the source domain and the unlabeled data of the target domain.
[0003] Currently, various unsupervised domain adaptation methods have been proposed. These methods learn domain invariant features through self-training or adversarial training, solve the problem of data deviation, and improve the model's performance in the target domain. However, traditional unsupervised domain adaptation methods for object detection have the following problems:
[0004] Most self-training methods are based on static pseudo-labels, and therefore cannot improve the quality of the pseudo-labels as the training process progresses.
[0005] Most traditional methods achieve feature distribution alignment, especially image-level global feature distribution alignment, but cannot effectively achieve class-level feature alignment.
[0006] Most importantly, traditional methods do not align features of different sizes separately. Features of different sizes contain diverse details, so if you align features of large objects and features of small objects, the feature information of the large object will be lost, which will affect the final performance. As an example of a traditional method, YOLOv5 extracts features for objects of different sizes without considering the size difference of each target in the image, and uses adversarial learning to align the feature distribution. Summary of the Invention [Problem to be solved by the invention]
[0007] To address one or more of the above problems of conventional unsupervised domain adaptation methods, the present disclosure provides a new unsupervised domain adaptation training method for neural networks for performing object detection. [Means for solving the problem]
[0008] In one aspect of the disclosure, a method for unsupervised domain adaptation training of a neural network for performing object detection includes the steps of: (a) extracting a plurality of source domain anchor box features of a plurality of sizes based on a labeled source domain image, and extracting a plurality of target domain anchor box features of the plurality of sizes based on an unlabeled target domain image; (b) generating a prediction of object detection for a corresponding anchor box in the source domain image based on the extracted source domain anchor box features, and generating a prediction of object detection for a corresponding anchor box in the target domain image based on the extracted target domain anchor box features; and for each size among the plurality of sizes, (c) extracting a plurality of source domain anchor box features having the size into a plurality of source domain anchor box features corresponding to a plurality of classes of objects, respectively, based on a label of the source domain image. (d) classifying a plurality of target domain anchor box features having the size into a plurality of target domain feature sets corresponding to the plurality of classes, respectively, based on the pseudo-labels of the target domain images; (e) performing inter-domain feature alignment by minimizing intra-class distance and maximizing inter-class distance such that a distance between a source domain anchor box feature included in the source domain feature set and a target domain anchor box feature included in the target domain feature set corresponding to the same class is small; and (f) receiving another source domain image with a label and another target domain image without a label, wherein the neural network is trained using a prediction loss function for the source domain images, a prediction loss function for the target domain images, and a feature alignment loss function by repeatedly performing steps (a) to (f).
[0009] In another aspect of the present disclosure, an apparatus for unsupervised domain adaptation training of a neural network for performing object detection includes a memory having a program stored thereon and one or more processors, the processor executing the program to (a) extract a plurality of source domain anchor box features of a plurality of sizes based on a labeled source domain image and extract a plurality of target domain anchor box features of the plurality of sizes based on an unlabeled target domain image; (b) generate a prediction of object detection for a corresponding anchor box in the source domain image based on the extracted source domain anchor box features and generate a prediction of object detection for a corresponding anchor box in the target domain image based on the extracted target domain anchor box features; and for each size among the plurality of sizes, (c) classify the plurality of source domain anchor box features having the size into a plurality of classes of objects based on a label of the source domain image. (d) classifying a plurality of target domain anchor box features having the sizes into a plurality of target domain feature sets corresponding to the plurality of classes based on a pseudo-label of the target domain image; (e) performing inter-domain feature alignment by minimizing intra-class distance and maximizing inter-class distance such that a distance between a source domain anchor box feature included in the source domain feature set and a target domain anchor box feature included in the target domain feature set corresponding to the same class is small; and (f) receiving another source domain image with a label and another target domain image without a label, wherein the processor is configured to train the neural network using a prediction loss function for the source domain image, a prediction loss function for the target domain image, and a feature alignment loss function by repeatedly performing steps (a) to (f).
[0010] In another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having a program stored thereon, the program, when executed by a computer, causing the computer to perform the method for unsupervised domain adaptation training of a neural network for performing object detection as described above. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is a schematic diagram showing alignment of multi-size anchor box features between domains according to the present disclosure. [Diagram 2] FIG. 1 is a schematic diagram showing a specific process of inter-domain anchor box feature alignment according to the present disclosure. [Diagram 3] FIG. 1 is a schematic diagram illustrating training of an object detection neural network according to the present disclosure. [Figure 4] 1 is a flow chart illustrating a method for domain adaptation training of a neural network according to the present disclosure. [Diagram 5] FIG. 2 is a block diagram illustrating modules of a neural network and training device according to the present disclosure. [Figure 6] FIG. 1 illustrates the training stability of various domain adaptation models. [Figure 7] FIG. 1 is a block diagram showing an exemplary configuration of computer hardware capable of implementing the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] The unsupervised domain adaptation method according to the present disclosure can be applied to object detection neural networks based on anchor boxes, such as YOLOvX (X=1,2,3,4,5), Yolict, Yolict++, Faster-RCNN, etc. An anchor box refers to each region obtained by dividing an image with a fixed size or a fixed aspect ratio, and is considered to be a priori box for object detection. In order to detect objects of different sizes in an image, an image may be divided with multiple types of fixed sizes or multiple types of fixed aspect ratios to obtain anchor boxes of multiple sizes. A label for each anchor box may be calculated based on the label of the entire image. The label of the anchor box may indicate whether the anchor box is a background or not, the class to which the object corresponding to the anchor box belongs, and the position information of the object.
[0013] The present disclosure adds a multi-size anchor box feature alignment module to the conventional object detection framework. The following describes the inter-domain multi-size anchor box feature alignment according to the present disclosure with reference to FIG.
[0014] As shown in FIG. 1, an anchor box based object detection framework typically includes a backbone network 110, a neck network 120, and preferably a head network (not shown). Both labeled source domain images and unlabeled target domain images are input to the backbone network, and the backbone network 110 extracts global features for the entire input image. To detect objects of different sizes in an image, the source domain image and the target domain image are divided into anchor boxes of multiple sizes. The neck network 120 extracts source domain anchor box features of various sizes from the global features of the source domain image, and extracts target domain anchor box features of various sizes from the global features of the target domain image. FIG. 1 shows a schematic diagram of "small anchor box features", "medium anchor box features", and "large anchor box features", where each size of anchor box feature includes multiple features corresponding to multiple anchor boxes with corresponding sizes. As an example, the small anchor box, medium anchor box, and large anchor box features in FIG. 1 may correspond to the anchor box features output from the 18th layer, the 21st layer, and the 24th layer of the YOLOv5 framework, respectively.
[0015] The head network (not shown) may also generate object detection predictions for corresponding anchor boxes in the source domain image based on the features of the source domain anchor boxes extracted by the neck network 120, and generate object detection predictions for corresponding anchor boxes in the target domain image based on the features of the target domain anchor boxes extracted. The predictions generated by the head network may include, for example, the probability that the anchor box is foreground or background, the probability that the object corresponding to the anchor box belongs to a class, predictions for a bounding box, etc., where the bounding box indicates the position and size of the anchor box.
[0016] As shown in Fig. 1, inter-domain feature alignment is performed for anchor box features of three sizes: large, medium, and small. Below, a specific process of inter-domain anchor box feature alignment will be described with reference to Fig. 2, taking a small anchor box feature as an example. Note that similar feature alignment processing is also performed for anchor box features of other sizes.
[0017] 2, the small anchor box features of the source domain image and the target domain image extracted by the neck network 120 are input. Preferably, L2 regularization may be performed on the input small anchor box features so that the magnitude of the feature vector becomes 1.
[0018] Then, based on the known labels of the source domain image, the anchor box features of the source domain image (shown as a "source domain anchor box feature space") are classified into a number of source domain anchor box feature sets corresponding to a number of classes, respectively. Figure 2 shows a schematic diagram of the classification of anchor box features in the source domain anchor box feature space into a number of sets, where each set may correspond to one of the classes, such as background, pedestrian, vehicle, etc.
[0019] For the anchor box features in the target domain anchor box feature space, first, a pseudo label for class and location information is set for each anchor box feature based on the pseudo label of the target domain image. In this disclosure, a dynamic self-training method is used to obtain the pseudo label of the target domain image (described later), and then stored in, for example, a pseudo label database. The pseudo label of the target domain image indicates the class and location information of all objects to be detected in the target domain image.
[0020] Specifically, calculate the union intersection (IOU) between the area covered by each anchor box in the target domain image and the area covered by each object to be detected included in the pseudo label of the target domain image. If the calculated IOU is greater than a predetermined threshold, set the pseudo label of the object to be detected to the pseudo label of the anchor box feature. The union intersection may be calculated according to the following formula (1):
[0021]
number
[0022] In the present disclosure, the following situation is considered: the previously input source domain or target domain image data has an anchor box feature corresponding to a certain class, but the currently input image data does not have an anchor box feature corresponding to the class. In view of such a missing class problem, in order to avoid the problem of wrong class of pseudo-label, the present disclosure calculates a moving average class center for each set of obtained source domain anchor box features and target domain anchor box features, and adds the calculated moving average class center to the corresponding set. Figure 2 shows the moving average class centers added to each set as a solid circle and a triangle, respectively.
[0023] The moving average class center may be calculated according to the following equations (2) to (5).
[0024]
number
[0025]
number
[0026]
number
[0027]
number
[0028] As shown in Equation (4) and Equation (5), when calculating the moving average class center, the moving average class center of the corresponding class calculated in the previous iteration is used, and the moving average class center C finally obtained in the current iteration is S k and C T k to the corresponding set, even if the current input image data is missing an anchor box feature corresponding to a class in the previous iteration, the result obtained in the current iteration will not be missing a feature set corresponding to the class. For example, as shown in Figure 2, if the anchor box features in the current target domain anchor box feature space are classified into four sets corresponding to four classes (no "pedestrian" class), five sets corresponding to five classes (including the "pedestrian" class) may be obtained by adding the moving average class centers. Here, the feature set corresponding to the "pedestrian" class is formed by the moving average class center of the "pedestrian" class calculated in the previous iteration.
[0029] Also, as shown in FIG. 2, the anchor box features in the source domain anchor box feature space are classified into five sets corresponding to five classes, and the anchor box features included in each set are different or significantly different from each other. The same is true for the target domain anchor box feature space. In order to alleviate the problem of feature imbalance between each class, the present disclosure uses undersampling to limit the number of source domain anchor box features included in each source domain anchor box feature set to within a predetermined value, and limits the number of target anchor box features included in each target domain anchor box feature set to within a predetermined value. As an example, the number of anchor box features in each set may be limited by randomly deleting one or more anchor box features. Also, an upper limit on the number of similar features may be set for the source domain anchor box feature set and the target domain anchor box feature set. For example, FIG. 2 shows a schematic diagram of deleting a part of the anchor box features in the source domain anchor box feature set corresponding to the "passenger car" class, so as to limit the number of features to three.
[0030] After obtaining the source domain anchor box feature set and the target domain anchor box feature set corresponding to each class, inter-domain feature alignment may be performed. In the present disclosure, the feature alignment is performed by minimizing the intra-class distance and maximizing the inter-class distance, so that the distance between the source domain anchor box feature included in the source domain feature set and the target domain anchor box feature included in the target domain feature set corresponding to the same class is small.
[0031] Specifically, in this disclosure, feature alignment is performed using an improved d-SNE method. The d-SNE method is introduced in the paper "d-SNE: Domain adaptation using stochastic neighborhood embedding" by Xu X, Zhou X, Venkatesan R et al., Proceedings of the IEEE / CVF Computer Vision and Pattern Recognition (CVPR) Conference, 2019, pp. 2497-2506. This method is currently the best performing feature alignment method based on sample points (e.g., objects in images). The d-SNE method achieves feature-level alignment based on sample points by minimizing the maximum intra-class distance between domains and maximizing the minimum inter-class distance between domains using the loss function shown in the following formula (6).
[0032]
number
[0033] Typically, for computational efficiency, we use the d-SNE loss function shown in Equation (7) below.
[0034]
number
[0035] However, the above d-SNE loss function merely increases the relative difference between the maximum intra-class distance and the minimum inter-class distance, and does not maximize the absolute minimum inter-class distance. Therefore, the present disclosure proposes an improved loss function L A We propose.
[0036]
number
[0037] The following describes in detail the method for training an object detection neural network according to the present disclosure with reference to Fig. 3. As shown in Fig. 3, a source domain image X S and target domain image X T The object detection neural network 300 extracts anchor box features having different sizes for the input image, and generates an object detection prediction result P for each of the source domain and the target domain based on the extracted features. S and P T Generate source domain image X S is label Y S Therefore, the label Y S and the predicted result P S Based on the detection loss L S It is possible to calculate the detection loss LS is the classification loss L cls_s and position loss L loc_s As an example, the classification loss L cls_s may include a cross-entropy loss function, and the position loss L loc_s may include an L1, L2 or smooth L1 loss function.
[0038] Unlabeled target domain image X T For the prediction result P T and the detection loss L for the target domain image based on pre-generated pseudo labels (e.g., stored in a pseudo label database). T You may calculate the detection loss L T is the classification loss L cls_t and position loss L loc_t As an example, the classification loss L cls_t may include a cross-entropy loss function, and the position loss L loc_t may include an L1, L2 or smooth L1 loss function.
[0039] Therefore, the total loss function L in training according to the present disclosure may be expressed by the following equation (9).
[0040]
number
[0041] Meanwhile, Fig. 3 also shows that the pseudo-label of the target domain image is generated by dynamic self-training. As shown in Fig. 3, for the current input target domain image X T For the prediction result P T, based on a predetermined confidence threshold and IOU threshold, a non-maximum suppression (NMS) algorithm is used to extract the target domain image X T Generate pseudo labels for
[0042] Specifically, the NMS algorithm may be implemented by performing the following steps.
[0043] First, all anchor boxes predicted as foreground (i.e., objects) in the currently input target domain image are sorted in descending order of confidence, where confidence means the predicted probability that the anchor box corresponds to the object. Then, anchor boxes with confidence lower than a predefined threshold are removed, and the remaining anchor boxes form a first set.
[0044] Next, the anchor box with the highest confidence is selected from the first set and added to the second set, and the anchor box whose IOU with the coverage area of the selected anchor box is larger than a predetermined threshold is removed from the first set. This step is repeated until the first set is empty. At this time, the anchor boxes and their prediction results included in the second set are calculated based on the currently input target domain image X T may be considered as a pseudo label.
[0045] We use the currently input target domain image X to update the previously memorized pseudo-labels. T After the pseudo labels are generated for the target domain image X, the pseudo labels may be stored in a pseudo label database. In particular, the updated pseudo labels are updated based on the pseudo labels for the target domain image X that is subsequently input (e.g., input in the next round of training). T Regarding the detection loss L T (as shown in Figure 3) and then used to determine the target domain anchor box feature set (as shown in Figure 2) corresponding to each class. T Detection loss for L TThe pseudo labels used in computing σ are still the previously stored pseudo labels retrieved from the pseudo label database.
[0046] FIG. 4 is a flow chart illustrating a method for domain adaptive training of a neural network according to the present disclosure, and FIG. 5 is a block diagram illustrating modules of a neural network and training apparatus according to the present disclosure.
[0047] As shown in Fig. 4, in step S410, a plurality of source domain anchor box features of a plurality of sizes are extracted based on a labeled source domain image, and a plurality of target domain anchor box features of the plurality of sizes are extracted based on an unlabeled target domain image. This step may be performed by a feature extractor 510 in a neural network as shown in Fig. 5.
[0048] In step S420, based on the extracted source domain anchor box features, a prediction of object detection is generated for the corresponding anchor box in the source domain image. Similarly, based on the extracted target domain anchor box features, a prediction of object detection is generated for the corresponding anchor box in the target domain image. This step may be performed by the object detection unit 520 in the neural network shown in FIG. 5.
[0049] Next, in step S430, for anchor box features of each size (e.g., small anchor box features), the source domain anchor box features having the size are classified into a plurality of source domain feature sets corresponding to a plurality of classes of objects based on the label of the source domain image. Similarly, in step S440, the target domain anchor box features having the size are classified into a plurality of target domain feature sets corresponding to the plurality of classes based on the pseudo label of the target domain image. Steps S430 and S440 may be performed by feature classifier 530 in FIG. 5.
[0050] Next, in step S450, an inter-domain feature alignment is performed such that the distance between the source domain anchor box feature included in the source domain feature set and the target domain anchor box feature included in the target domain feature set corresponding to the same class is reduced. This step may be performed by the feature alignment unit in FIG.
[0051] In step S460, the next labeled source domain image and the next unlabeled target domain image are received and the method returns to step S410.
[0052] By repeatedly executing steps S410 to S460, a prediction loss function L for the source domain image is calculated. S , the predicted loss function L for the target domain image T and the feature alignment loss function L A The neural network is trained based on the training result. The training process may be controlled by the training unit 550 in FIG.
[0053] It should be noted that the training method of the present disclosure does not necessarily have to be performed in the order shown in Fig. 4. For example, steps S430 and S440 may be performed simultaneously. Furthermore, steps S430 to S450 may be performed sequentially for anchor box features of each size, or may be performed in parallel for anchor box features of each size.
[0054] Table 1 shows a comparison of the performance of the neural network trained according to the method of the present disclosure with the model trained according to the conventional method. The test images are road images, and tests are performed on two target domains (daytime and nighttime images), and the mean average precision (mAP) is used as the evaluation metric. In Table 1, the source domain model represents a model trained using source domain image data and its labels. The model achieves the best performance (99.8) on the source domain test set, but its performance drops significantly (77.6, 48.6) on the target domain test set (daytime, nighttime). The target domain model represents a model trained using target domain image data and its labels. The performance of this model represents the upper limit of the performance achievable in the target domain. The remaining four models are models trained using the unsupervised domain adaptation method, which is a model trained using source domain image data and its labels and target domain image data (without labels). As can be seen from Table 1, the model trained by the method according to the present disclosure (i.e., dynamic self-training + multi-size anchor box feature alignment) achieved the best performance on both target domain test sets. In addition, the dynamic self-training method can obtain better performance than the static self-training method, so when combined with dynamic self-training, the cross-domain multi-size anchor box feature alignment method can further improve the performance.
[0055] [Table 1] In the unsupervised domain adaptation method, the validation set of the target domain is insufficient, so the best-performing model cannot be selected using the validation set of the target domain. In this case, training stability is important. Training stability means that the performance of the model in the training process improves steadily, and the performance of the model obtained in the last iteration is almost the same as the best performance of the model achieved in the entire training process. Figure 6 shows the training stability for the four unsupervised domain adaptation models in Table 1. Here, the horizontal axis represents the number of training epochs (epochs), and the vertical axis represents mAP@0.5, i.e., mAP when IoU is set to 0.5. (a) in Figure 6 is based on large object detection on the daytime target domain test set, and (b) is based on large object detection on the nighttime target domain test set. As can be seen from Figure 6, the model according to the present disclosure (i.e., dynamic self-training + multi-size anchor box feature alignment) has good training stability.
[0056] The above describes the unsupervised domain adaptation training method according to the present disclosure with reference to specific embodiments, which has the following features:
[0057] (1) Feature alignment of anchor boxes of multiple sizes: Since anchor box features of different sizes contain different richness of details, aligning source domain anchor box features and target domain anchor box features of the same size will not lose any detail information.
[0058] (2) Dynamic self-training: By constantly updating the pseudo labels of the target domain images in the training process, the quality of the pseudo labels can be improved.
[0059] (3) Instead of adopting feature distribution alignment methods, we align anchor box features point by point based on high-quality pseudo labels, which can reduce the distance between anchor box features of the same class and increase the distance between anchor box features of different classes.
[0060] (4) By using the moving average class center of each class, the adverse effects of missing classes and incorrect labels among pseudo-labels can be mitigated.
[0061] (5) Undersampling: By undersampling the anchor box features of a particular class, the problem of imbalance of anchor box features between classes can be mitigated.
[0062] The method according to the above embodiment may be realized by software, hardware, or a combination of software and hardware. The programs included in the software may be pre-stored in a storage medium installed inside or outside the device. As an example, during execution, these programs are written into a random access memory (RAM) and executed by a processor (e.g., a CPU) to realize each process described in this specification.
[0063] 7 is a block diagram showing an example of a computer hardware configuration that can realize the present disclosure. The computer hardware is an example of an apparatus for training an object detection neural network according to the present disclosure. The neural network according to the present disclosure may also be realized based on the computer hardware.
[0064] As shown in FIG. 7, in a computer 700, a central processing unit (CPU) 701, a read-only memory (ROM) 702, and a random access memory (RAM) 703 are interconnected by a bus 704.
[0065] The input / output interface 705 is further connected to the bus 704. Connected to the input / output interface 705 are an input unit 706 including a keyboard, mouse, microphone, etc., an output unit 707 including a display, speaker, etc., a storage unit 708 including a hard disk, non-volatile memory, etc., a communication unit 709 including a network interface card (such as a local area network (LAN) card, modem, etc.), and a driver 710 that drives a removable medium 711. The removable medium 711 is, for example, a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.
[0066] In a computer having the above configuration, the CPU 701 loads a program stored in the storage unit 708 into the RAM 703 via the input / output interface 705 and the bus 704, and executes the program to perform the above method.
[0067] The program executed by the computer (CPU 701) may be recorded in a removable medium 711, which is a package medium. The package medium is formed of, for example, a magnetic disk (including a floppy disk), an optical disk (including a compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), etc.), a magneto-optical disk, or a semiconductor memory. The program executed by the computer (CPU 701) may also be provided via a wired or wireless transmission medium of a local area network, the Internet, or digital satellite broadcasting.
[0068] When the removable medium 711 is installed in the driver 710, the program can be installed in the storage unit 708 via the input / output interface 705. Also, the program is received by the communication unit 709 via a wired or wireless transmission medium and installed in the storage unit 708. Alternatively, the program may be pre-installed in the ROM 702 or the storage unit 708.
[0069] The programs executed by the computer may be programs that perform operations in the order described in this specification, or may be programs that perform operations in parallel, or may perform operations on an as-needed basis (e.g., when called).
[0070] The devices or units described in this specification are logical and are not limited to physical devices or entities. For example, the functions of each unit described in this specification may be realized by multiple physical entities, or the functions of multiple units described in this specification may be realized by a single physical entity. In addition, features, components, elements, steps, etc. described in one embodiment are not limited to the embodiment, and may be applied to other embodiments, for example, and may be used in place of or combined with specific features, components, elements, steps, etc. of other embodiments.
[0071] The scope of the present disclosure is not limited to the specific embodiments described herein. As can be understood by those skilled in the art, various modifications or changes may be made to the embodiments herein according to design requirements and other factors without departing from the principles and spirit of the present disclosure. The scope of the present disclosure is limited by the appended claims and their equivalents.
[0072] In addition, the present disclosure further discloses the following supplementary notes regarding the embodiments including the above-mentioned examples, but is not limited to these supplementary notes. (Appendix 1) 1. A method for unsupervised domain adaptation training of a neural network for performing object detection, comprising: (a) extracting a plurality of source domain anchor box features of a plurality of sizes based on a labeled source domain image, and extracting a plurality of target domain anchor box features of the plurality of sizes based on an unlabeled target domain image; (b) generating a prediction of object detection for a corresponding anchor box in the source domain image based on the extracted source domain anchor box features, and generating a prediction of object detection for a corresponding anchor box in the target domain image based on the extracted target domain anchor box features; For each size among the plurality of sizes, (c) classifying a plurality of source domain anchor box features having the sizes into a plurality of source domain feature sets respectively corresponding to a plurality of classes of objects based on the labels of the source domain images; (d) classifying a plurality of target domain anchor box features having the sizes into a plurality of target domain feature sets respectively corresponding to the plurality of classes based on the pseudo-labels of the target domain images; (e) performing inter-domain feature alignment by minimizing the intra-class distance and maximizing the inter-class distance such that the distance between source domain anchor box features in the source domain feature set and target domain anchor box features in the target domain feature set corresponding to the same class is small; (f) receiving another source domain image with a label and another target domain image without a label; training the neural network using a prediction loss function for source domain images, a prediction loss function for target domain images, and a feature alignment loss function by repeatedly performing steps (a) through (f). (Appendix 2) (e') generating pseudo-labels for the target domain image based on the object detection predictions generated for each anchor box of the target domain image; 2. The method of claim 1, wherein steps (a) to (e), (e') and (f) are repeatedly performed. (Appendix 3) 3. The method of claim 2, further comprising generating the pseudo label of the target domain image from the predicted value of each anchor box using a non-maximum suppression algorithm based on a confidence threshold and an intersection of unions (IOU) threshold. (Appendix 4) The pseudo-labels used in step (d) are generated for the target domain images in a previous process; 3. The method of claim 2, further comprising: updating a previously generated pseudo label of the target domain image using the pseudo label of the target domain image generated in step (e'); and, in a subsequent process, determining the target domain feature set for the target domain image based on the updated pseudo label. (Appendix 5) Step (c) further includes calculating a moving average class center for each source domain feature set and adding the calculated moving average class center to the corresponding source domain feature set; Step (d) further includes calculating a moving average class center for each target domain feature set and adding the calculated moving average class center to the corresponding target domain feature set; 2. The method of claim 1, wherein step (e) is performed based on the source domain feature set and the target domain feature set with the moving average class centers added. (Appendix 6) limiting the number of source domain anchor box features included in each source domain feature set generated in step (c) to within a predetermined value; and limiting the number of target domain anchor box features included in each target domain feature set generated in step (d) to within the predetermined value; 2. The method of claim 1, wherein step (e) is performed based on a source domain feature set and a target domain feature set having a limited number of anchor box features. (Appendix 7) Construct a predictive loss function for the source domain image based on the label of the source domain image, and construct a predictive loss function for the target domain image based on the pseudo-label of the target domain image; Formula
[0073]
number
[0074]
number
Claims
1. 1. A method for unsupervised domain adaptation training of a neural network for performing object detection, comprising: (a) extracting a plurality of source domain anchor box features of a plurality of sizes based on a labeled source domain image, and extracting a plurality of target domain anchor box features of the plurality of sizes based on an unlabeled target domain image; (b) generating a prediction of object detection for a corresponding anchor box in the source domain image based on the extracted source domain anchor box features, and generating a prediction of object detection for a corresponding anchor box in the target domain image based on the extracted target domain anchor box features; For each size among the plurality of sizes, (c) classifying a plurality of source domain anchor box features having the sizes into a plurality of source domain feature sets respectively corresponding to a plurality of classes of objects based on the labels of the source domain images; (d) classifying a plurality of target domain anchor box features having the sizes into a plurality of target domain feature sets respectively corresponding to the plurality of classes based on the pseudo-labels of the target domain images; (e) performing inter-domain feature alignment by minimizing the intra-class distance and maximizing the inter-class distance such that the distance between source domain anchor box features in the source domain feature set and target domain anchor box features in the target domain feature set corresponding to the same class is small; (f) receiving another source domain image with a label and another target domain image without a label; training the neural network using a prediction loss function for source domain images, a prediction loss function for target domain images, and a feature alignment loss function by repeatedly performing steps (a) through (f).
2. (e') generating pseudo-labels for the target domain image based on the object detection predictions generated for each anchor box of the target domain image; The method of claim 1 , wherein steps (a) through (e), (e′) and (f) are performed repeatedly.
3. The method of claim 2 , further comprising generating the pseudo labels for the target domain image from the predicted values of each anchor box using a non-maximal suppression algorithm based on a confidence threshold and an intersection of union (IOU) threshold.
4. The pseudo-labels used in step (d) are generated for the target domain images in a previous process; 3. The method of claim 2, further comprising: updating a previously generated pseudo label of the target domain image using the pseudo label of the target domain image generated in step (e'); and, in a subsequent process, determining the target domain feature set for the target domain image based on the updated pseudo label.
5. Step (c) further comprises: calculating a moving average class center for each source domain feature set; and adding the calculated moving average class center to the corresponding source domain feature set; Step (d) further comprises: calculating a moving average class center for each target domain feature set; and adding the calculated moving average class center to the corresponding target domain feature set; The method of claim 1 , further comprising performing step (e) based on the source domain feature set and the target domain feature set with added moving average class centers.
6. limiting the number of source domain anchor box features included in each source domain feature set generated in step (c) to within a predetermined value; and limiting the number of target domain anchor box features included in each target domain feature set generated in step (d) to within the predetermined value; The method of claim 1 , further comprising performing step (e) based on source domain feature sets and target domain feature sets having a limited number of anchor box features.
7. Construct a predictive loss function for the source domain image based on the label of the source domain image, and construct a predictive loss function for the target domain image based on the pseudo-label of the target domain image; Formula [0010] The feature alignment loss function L A Build Here, x S represents the source domain anchor box feature, and x T represents the target domain anchor box feature, and O t represents the set of target domain anchor box features, and d(x s , x t ) is the source domain anchor box feature x S and target domain anchor box feature x T represents the square of the Euclidean distance between (Outside 1) 【number】 、 (Outside 2) 【number】 , y s is the source domain anchor box feature x s is the class label of the target Domain anchor box feature x t are the class labels of m and m 2 is a hyperparameter The method of claim 1 ,
8. 2. The method of claim 1 , further comprising: performing L2 regularization on the extracted source domain anchor box features and target domain anchor box features, respectively; and performing steps (c) to (f) based on the regularized source domain anchor box features and target domain anchor box features.
9. 1. An apparatus for unsupervised domain adaptation training of a neural network for performing object detection, comprising: A memory in which a program is stored; one or more processors; The processor executes the program, (a) extracting a plurality of source domain anchor box features of a plurality of sizes based on a labeled source domain image, and extracting a plurality of target domain anchor box features of the plurality of sizes based on an unlabeled target domain image; (b) generating a prediction of object detection for a corresponding anchor box in the source domain image based on the extracted source domain anchor box features, and generating a prediction of object detection for a corresponding anchor box in the target domain image based on the extracted target domain anchor box features; For each size among the plurality of sizes, (c) classifying a plurality of source domain anchor box features having the sizes into a plurality of source domain feature sets respectively corresponding to a plurality of classes of objects based on the labels of the source domain images; (d) classifying a plurality of target domain anchor box features having the sizes into a plurality of target domain feature sets respectively corresponding to the plurality of classes based on the pseudo-labels of the target domain images; (e) performing inter-domain feature alignment by minimizing the intra-class distance and maximizing the inter-class distance such that the distance between source domain anchor box features in the source domain feature set and target domain anchor box features in the target domain feature set corresponding to the same class is small; (f) receiving another source domain image with a label and another target domain image without a label; The processor is configured to train the neural network using a prediction loss function for source domain images, a prediction loss function for target domain images, and a feature alignment loss function by repeatedly performing steps (a) through (f).
10. A non-transitory computer-readable storage medium having a program stored thereon, the program causing the computer to execute a method for unsupervised domain adaptation training of a neural network for performing object detection according to any one of claims 1 to 8, when the program is executed by a computer.
Citation Information
Cited By
Hyperspectral image active domain adaptive classification method based on prototype alignment
CN119494989A
Self-adaptive wafer defect identification method and system in semi-supervised field
CN119600360A
A semi-supervised domain adaptive wafer defect recognition method and system
CN119600360B
Cross-domain target identification method and device, equipment and medium
CN119863668A
Domain adaptive target detection method based on big and small model feature collaboration
CN119888182A
