A camouflaged target detection method based on multi-task adapter fine-tuning
By building a fine-tuned camouflage object detection method for multitasking adapters, combining large pre-trained models and lightweight adapter modules, the problem of model limitation in camouflage object detection is solved, and precise positioning and generalization capabilities are improved in complex scenarios.
Patent Information
- Application Number
- CN202310401697.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-16
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-04-16
AI Technical Summary
In the prior art, in camouflage object detection, there is a problem that the model is limited to a specific scenario and cannot accurately locate the camouflage object.
Using a method based on multi-task adapter fine-tuning, a large pre-trained basic model, a lightweight adapter module and a COD detection head are built, combined with a multi-task learning framework, the loss function is used to optimize the model performance and achieve accurate positioning of the camouflage target.
It improves the accuracy and generalization ability of camouflage object detection, especially in complex scenarios, and can effectively identify camouflage objects in complex situations such as low contrast, occluded, small targets and multiple targets.
Smart Images

Figure CN116524183B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of disguised target detection, and in particular to a method for improving model detection performance and generalization capability based on a pre-trained large model and a multi-task adapter. Background Art
[0002] Camouflaged object detection (COD) aims to identify objects that are perfectly hidden in their surroundings and is typically formulated as a binary segmentation task. Because this camouflage strategy works by deceiving the observer's visual perception system, solving COD requires extensive visual perception knowledge and is more challenging than traditional salient object detection or segmentation. In recent years, camouflaged object detection has attracted growing research interest in the field of computer vision and has fostered numerous valuable real-life applications, such as disaster search and rescue efforts, rare species discovery, medical image segmentation, and agricultural locust detection.
[0003] Early work used low-level handcrafted features such as color, edges, or texture to detect camouflaged objects. These methods were limited in detection performance due to a lack of feature differentiation. The introduction of the new Camouflaged Targets (CAMO) dataset in 2019 promoted the application of deep neural networks to the COD task. Since then, numerous deep learning-based models have emerged. Some of these are based on feature fusion, improving multi-scale object detection performance by capturing rich contextual information and aggregating cross-layer features. Others exploit the rotational invariance and noise resistance of texture features to amplify the difference between camouflaged objects and their backgrounds. While these methods improve the performance of camouflaged object detection, they still have limitations in scenarios where the camouflaged object and the background have a high degree of similarity. To obtain precise boundaries and fine structure, a large body of research has designed more complex modules to accurately extract the target structure or utilized auxiliary tasks to enhance the discriminative capabilities of the main COD segmentation stream. Because camouflage strategies inherently deceive the visual perception system, edge-based detection still struggles to achieve good performance. To further mimic the behavior of predators in nature or the psychological patterns of human vision, a series of biomimetic methods have recently emerged, such as PFNet, MirrorNet, and ZoomNet. However, these works imitate the human visual system in a simplistic way, which limits their performance in various complex scenes such as low contrast, occlusion, small objects and multiple objects. Summary of the Invention
[0004] The technical problems to be solved by the present invention are:
[0005] In order to overcome the shortcomings of the existing technology that is limited to a specific model and cannot accurately locate the camouflaged target, the present invention provides a camouflaged target detection method based on multi-task adapter fine-tuning.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] A camouflaged target detection method based on multi-task adapter fine-tuning is characterized by the following steps:
[0008] Step 1: Prepare the dataset and divide it into 9 non-overlapping sub-datasets according to different semantic categories;
[0009] Step 2: Build a "pre-training, adaptation, and detection" network framework. The "pre-training, adaptation, and detection" network model consists of three parts: a large pre-trained base model, a lightweight adapter module, and a COD detection head.
[0010] The construction process of each part is as follows:
[0011] Step 2-1: Build a large pre-trained base model;
[0012] The large pre-trained base model can be pre-trained on various other datasets to learn feature representations containing rich semantics;
[0013] Step 2-2: Build a lightweight adapter module;
[0014] The lightweight adapter module is designed in parallel with the large pre-trained base model and contains only a small number of trainable parameters. It extracts the prior representation of the COD task and interacts with the base model to obtain multi-scale features of the COD task.
[0015] Step 2-3: Build the COD detection head;
[0016] The COD detection head receives the pyramid features output by the adapter module and combines low-resolution, semantically strong features with high-resolution, semantically weak features to jointly infer and discover the rich visual knowledge underlying the image to complete the COD accurate segmentation task.
[0017] Step 3: Design a loss function
[0018] Step 4: Training process
[0019] The training process first performs traditional training on the CAMO and COD10K joint training set according to the traditional protocol in step 4-1, and then trains the model using a multi-task learning framework on the multi-task dataset in steps 4-2 to 4-5 to explore whether this scheme can learn shared knowledge between different semantic categories;
[0020] Step 4-1: Traditional training;
[0021] Images containing disguised targets are fed simultaneously into a large pre-trained base model and a lightweight adapter module. The large base model is first pre-trained using multimodal data, and then its parameters are frozen while only the adapter module and detection head parameters are optimized. This allows the general knowledge learned by the base model to be effectively transferred to downstream COD tasks.
[0022] The entire process uses a loss function to supervise the model training on the training sets of CAMO and COD10K to obtain the trained network model. Finally, the effectiveness of the model is verified using the entire CHAMELEON and NC4K datasets, as well as the test sets of CAMO and COD10K.
[0023] Step 4-2: Initialize the multi-task adapter on the source task;
[0024] The nine divided sub-datasets are used as source tasks, and images from all source tasks are simultaneously input into a large pre-trained base model and a lightweight adapter module. The large base model is loaded with weights pre-trained on multimodal data and its parameters are kept frozen. The adapter module and the COD detection head are randomly initialized and then jointly trained on the training sets of all source tasks.
[0025] Step 4-3: Multi-task adapter adaptation on a single-target task;
[0026] Select one of the subtasks as the target task in turn, and input the images of this task into the large pre-trained base model and the lightweight adapter module; the large base model loads the weights pre-trained on multimodal data and keeps the parameters frozen, the adapter module is initialized using the source adapter in step 4-2, and the COD detection head is randomly initialized; then fine-tune the adapter on the training set of the separate target task; finally, test on the test set of the corresponding single target task to evaluate the model performance;
[0027] Step 4-4: Group similar tasks;
[0028] All subtasks are used as source tasks in turn, while other tasks are used as target tasks. The pre-trained base model parameters are kept frozen, and the model trainable parameters are tuned on the training set of each source task to initialize the adapters for different target tasks. The adapters are then tested directly on the test set of each target task without fine-tuning the entire model parameters. For each target task, the transfer performance of all source tasks is divided by the best performance score on that task to obtain a normalized result. Based on this result, the tasks with the best transfer performance on the same target task are selected as the most similar tasks and grouped together.
[0029] Step 4-5: Multi-task adapter adaptation on the grouped target task;
[0030] According to the grouping strategy in step 4-4, the most similar target tasks are selected from all subtasks in turn to form groups, and the images of the grouped tasks are simultaneously input into the large pre-trained base model and the lightweight adapter module; the large base model is loaded with weights pre-trained on multimodal data and the parameters are kept frozen, the adapter module is initialized using the source adapter pre-trained in step 4-2, and the COD detection head is randomly initialized; then the adapter module and detection head are fine-tuned within the target task group; finally, the model performance is evaluated by testing on the test set of each independent target task.
[0031] A further technical solution of the present invention: Step 1 is as follows:
[0032] Download four widely used COD datasets: CHAMELEON, CAMO, COD10K, and NC4K;
[0033] The entire COD10K dataset and the artificial camouflage part of the CAMO dataset are divided into 9 non-overlapping sub-datasets according to different semantic categories, as 9 different subtasks, including amphibians, arthropods, artificial camouflage, birds, insects, mammals, reptiles, first underwater animals and second underwater animals.
[0034] A further technical solution of the present invention: the loss function in step 3 includes a weighted binary cross entropy loss With weighted IoU loss
[0035] The overall loss function is expressed as:
[0036]
[0037] By calculating the difference between the central pixel and its surroundings, a different weight is assigned to each pixel, so that the difficult pixels get more attention. and They are used to form pixel constraints and global constraints on the network respectively.
[0038] A further technical solution of the present invention: Step 4-1 uses Vision Transformer as a pre-trained basic model.
[0039] A further technical solution of the present invention: Step 4-2 uses Vision Transformer Adapter as a lightweight non-pre-trained vision-specific adapter.
[0040] A further technical solution of the present invention: Step 4-3 uses UperNet as the COD detection head.
[0041] A computer system, characterized in that it includes: one or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method.
[0042] A computer-readable storage medium is characterized by storing computer-executable instructions, which are used to implement the above method when executed.
[0043] The present invention provides a "pre-training, adaptation and detection" framework from a new perspective to detect camouflaged objects. By learning more extensive knowledge on various tasks, it makes it more "intelligent" in the face of deception by camouflaged objects. Specifically, the basic model is first pre-trained using large-scale multimodal data, and then a lightweight adapter is inserted in parallel to adapt the pre-trained model to downstream tasks. After obtaining a finer feature map, the COD detection head is used to accurately detect pixel-level camouflaged targets. The present invention further provides a multi-task learning scheme for cross-task learning adapters. By initializing the multi-task adapter for the source task and adapting the multi-task adapter for the target task, shared knowledge between different semantic categories can be learned, thereby improving the generalization ability of the model. The beneficial effects are:
[0044] 1. The proposed framework approaches camouflaged object detection from a novel perspective: "pre-training, adaptation, and detection." Thanks to pre-training, this method achieves superior performance with only a few parameter adjustments, eliminating the need for elaborate design. This is the first camouflaged object detection method based on a large-scale pre-trained base model.
[0045] 2. The present invention further divides the dataset according to the semantic categories of disguised objects and proposes a multi-task learning mechanism for learning adapters, including multi-task adapter initialization and multi-task adapter adaptation, which improves the generalization ability of the model by utilizing the shareable knowledge between different semantic categories.
[0046] 3. This paper sets new records on four widely used benchmark datasets and provides a new evaluation protocol for exploring multi-task learning for COD tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like parts throughout the drawings.
[0048] Figure 1 It is the overall framework diagram of the method of the present invention.
[0049] Figure 2 It is a heat map of the task transferability results of the method of the present invention.
[0050] Figure 3 3 is a comparison chart of the visualization results of the method of the present invention and different classical COD methods in the examples. DETAILED DESCRIPTION
[0051] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0052] This paper provides a new “pre-training, adaptation and detection” framework to detect disguised objects, such as Figure 1 As shown in the figure, the base model is first pre-trained using large-scale multimodal data, and then a lightweight adapter is inserted in parallel to adapt the pre-trained model to downstream tasks. After obtaining more refined feature maps, the COD head is used to accurately detect camouflaged objects at the pixel level. The present invention further provides a multi-task learning scheme that learns cross-task adapters. By initializing the multi-task adapter for the source task and adapting it to the target task, the scheme learns shared knowledge between different semantic categories, thereby improving the generalization ability of the model.
[0053] The specific steps include:
[0054] Step 1: Dataset preparation;
[0055] First, we downloaded four widely used COD datasets: (1) CHAMELEON: contains 76 images in total; (2) CAMO: contains 1250 images in total (1000 for training and 250 for testing); (3) COD10K: contains 5066 images in total (3040 for training and 2026 for testing); (4) NC4K: contains 4121 images in total;
[0056] Then, the entire COD10K dataset and the artificial camouflage part of the CAMO dataset are further divided into 9 non-overlapping sub-datasets according to different semantic categories as 9 different tasks, including amphibians (344), arthropods (444), artificial camouflage (296), birds (549), insects (1438), mammals (658), reptiles (457), underwater animals 1 (640) and underwater animals 2 (413) (there are obvious differences between underwater animals 1 and underwater animals 2).
[0057] At this point, the dataset preparation is complete.
[0058] Step 2: Construction of the "pre-training, adaptation and detection" network framework;
[0059] The “pre-training, adaptation and detection” network model consists of three parts: a large pre-trained base model, a lightweight adapter module and a COD detection head, such as Figure 1 As shown in (a).
[0060] The specific construction process of each part is as follows:
[0061] Step 2-1: Build a large pre-trained base model;
[0062] The large pre-trained base model can be pre-trained on various other data sets (including large-scale multimodal data) to learn feature representations that contain rich semantics. In this embodiment, Vision Transformer (ViT) is used as the pre-trained base model. Because the transformer layer can fuzzy patch embedding, 3D patch embedding and token embedding, it is pre-trained using rich multimodal data (including images, videos and text). Specifically, all input data are projected into a two-dimensional vector representation and combined with a position representation vector. At the same time, a learnable "CLS" vector is added to gradually extract global feature representations. Then, they are fed into the L-layer encoder to calculate self-attention.
[0063] Step 2-2: Build a lightweight adapter module;
[0064] The lightweight adapter module is designed in parallel with the large pre-trained base model to help the pre-trained base model adapt to downstream COD tasks. In this embodiment, the Vision Transformer Adapter (ViT-Adapter) is introduced as a lightweight non-pre-trained vision-specific adapter, which contains less than 8% of the trainable parameters of ViT and is used to extract multi-scale features for COD tasks. Specifically, ViT-Adapter is parallel to ViT and includes a convolution-based spatial prior module for modeling the local spatial context of the input image; and N groups of cross-attention-based feature interaction modules, each group consisting of an injector module and an extractor module, where the injector module is used to inject spatial prior features into the backbone model, and the extractor module is used to extract multi-scale features from the backbone model. After N rounds of feature interaction, fine-grained hierarchical features with a resolution similar to that of ResNet are obtained.
[0065] Step 2-3: Build the COD detection head;
[0066] The COD detection head receives the pyramid features output from the adapter module, and by combining low-resolution, semantically strong features with high-resolution, semantically weak features, jointly infers and discovers the rich visual knowledge under the image to complete the COD accurate segmentation task. In this embodiment, UperNet is used as the COD detection head to receive the pyramid features obtained from the adapter. Specifically, the lowest resolution features of the backbone network are passed through a pyramid pooling module (PPM) to obtain an effective global prior representation, and then input it into the top-down branch in the feature pyramid network (FPN). FPN receives other resolution features output by the adapter through a top-down architecture with lateral connections, and fuses high-level semantic information into low and medium levels. Finally, the fused features are passed through a 3x3 convolutional layer and a classifier to complete the COD segmentation task.
[0067] Step 3: Loss function;
[0068] The loss function includes weighted binary cross entropy loss With weighted IoU loss
[0069] The overall loss function is expressed as:
[0070]
[0071] By calculating the difference between the central pixel and its surroundings, a different weight is assigned to each pixel, so that the difficult pixels get more attention. and They are used to form pixel constraints and global constraints on the network respectively.
[0072] Step 4: Network training;
[0073] Step 4-1: Traditional experimental training;
[0074] ① Training set: CAMO training set (1000 images) and COD10K training set (3040 images);
[0075] ② Experimental settings: ViT-Large is used as the pre-trained base model and initialized with the weights released by Uni-Perceiver-L. UperNet is used as the COD detection head. The image is uniformly resized to 512×512, and the initial learning rate is 6×10 -5 The model was optimized using the AdamW optimizer with a weight decay rate of 0.05 and a batch size of 2. The model was trained for 200 epochs. After each epoch, the network performance was tested using the validation set, and the best network parameters were saved.
[0076] ③ Training Process: Images containing disguised targets are fed simultaneously into a large pre-trained base model and a lightweight adapter module. The large base model is loaded with weights pre-trained on multimodal data and its parameters are frozen. The parameters of the adapter module and detection head are randomly initialized. Only the parameters of the adapter module and detection head are fine-tuned, allowing the general knowledge learned by the base model to be effectively transferred to downstream COD tasks.
[0077] Step 4-2: Initialize the multi-task adapter on the source task;
[0078] ① Training set: The training set consists of nine datasets representing different semantic categories, including amphibians (220), arthropods (274), artificial camouflage (194), birds (327), insects (840), mammals (370), reptiles (294), underwater animals 1 (396) and underwater animals 2 (241);
[0079] ② Experimental settings: ViT-Large is used as the pre-trained base model and initialized with the weights released by Uni-Perceiver-L. UperNet is used as the COD detection head. The image is uniformly resized to 512×512, and the initial learning rate is 6×10 -5 The model was optimized using the AdamW optimizer with a weight decay rate of 0.05 and a batch size of 2. The model was trained for 100 epochs. After each epoch, the network performance was tested using the validation set, and the best network parameters were saved.
[0080] ③Training process: such as Figure 1 As shown in (a), the nine divided datasets are used as source tasks, and images from all source tasks are simultaneously input into a large pre-trained base model and a lightweight adapter module. The large base model loads weights pre-trained on multimodal data and keeps the parameters frozen. The adapter module and COD detection head are randomly initialized and then jointly trained on the training sets of all source tasks.
[0081] Step 4-3: Multi-task adapter adaptation on a single-target task;
[0082] ① Training set: a training set of nine datasets representing different semantic categories;
[0083] ② Experimental settings: ViT-Large is used as the pre-trained base model and initialized with the weights released by Uni-Perceiver-L. The images are uniformly resized to 512×512 and the initial learning rate is 6×10 -5The model was optimized using the AdamW optimizer with a weight decay rate of 0.05 and a batch size of 2. The model was trained for 200 epochs. After each epoch, the network performance was tested using the validation set, and the best network parameters were saved.
[0084] ③Training process: such as Figure 1 As shown in (b), one of the nine datasets is selected as the target task. Images from that task are fed into a large pre-trained base model and a lightweight adapter module. The large base model is loaded with weights pre-trained on multimodal data and its parameters are frozen. The adapter module is initialized using the source adapter from step 4-2, and the COD detection head is randomly initialized. The adapter module and COD detection head are then fine-tuned on the training set of each target task.
[0085] Step 4-4: Group similar tasks;
[0086] The nine tasks are used as source tasks in turn, while the other tasks are used as target tasks. The model is fine-tuned for 200 epochs on the training set of each source task to initialize the adapters for different target tasks. Then, the model is directly tested on the test set of each target task without fine-tuning the entire model parameters. For each target task, the normalized result is obtained by dividing the transfer performance of all source tasks by the best performance score on that task (e.g. Figure 2 Then, based on the result, the three tasks with the best transfer performance on the same target task are selected as the most similar tasks to be grouped.
[0087] Step 4-5: Multi-task adapter adaptation on the grouped target task;
[0088] ① Training set: a training set of nine datasets representing different semantic categories;
[0089] ② Experimental settings: ViT-Large is used as the pre-trained base model and initialized with the weights released by Uni-Perceiver-L. UperNet is used as the COD detection head. The image is uniformly resized to 512×512, and the initial learning rate is 6×10 -5 The model was optimized using the AdamW optimizer with a weight decay rate of 0.05 and a batch size of 2. The model was trained for 200 epochs. After each epoch, the network performance was tested using the validation set, and the best network parameters were saved.
[0090] ③Training process: such as Figure 1As shown in (c), according to the grouping strategy in step 4-4, the three most similar target tasks are sequentially selected from the nine datasets to form groups. The images of the grouped tasks are simultaneously fed into a large pre-trained base model and a lightweight adapter module. The large base model is loaded with weights pre-trained on multimodal data and its parameters are kept frozen. The adapter module is initialized using the source adapter pre-trained in step 4-2, and the COD detection head is randomly initialized. The adapter module and detection head are then fine-tuned within the target task group.
[0091] Step 5: Network test;
[0092] Step 5-1: Traditional experimental testing;
[0093] ① Test set: CHAMELEON dataset (76 images), NC4K dataset (4121 images), CAMO test set (250 images) and COD10K test set (2026 images);
[0094] ② Experimental settings: The image input is uniformly resized to 512×512, and the output is resized to the initial size;
[0095] ③Testing process: Load the best network parameters saved in the training phase and test the input image to verify the effectiveness of the model;
[0096] ④ Output results: Visualization results such as Figure 3 As shown in the figure, from left to right are the original image, the ground truth (GT), the visualization results of the present invention, and the visualization results of other comparison methods. It can be seen that the present invention (third column) can successfully handle different types of challenging camouflage cases. For targets with extremely low contrast with the surrounding environment (rows 1 and 2), occluded targets (row 3), small targets (row 4), targets surrounded by confusing objects (row 5), multiple low-contrast targets (row 6), and targets with complex topology and a large number of dense edges (row 7), the method proposed by the present invention can accurately identify and segment the camouflaged targets, while other methods are more or less interfered with, resulting in incorrect positioning.
[0097] Step 5-2: Multi-task adapter adaptation on a single-target task;
[0098] ① Test set: a test set of nine datasets representing different semantic categories, including amphibians (124), arthropods (170), artificial camouflage (102), birds (222), insects (598), mammals (288), reptiles (163), underwater animals 1 (244) and underwater animals 2 (172);
[0099] ② Experimental settings: The image input is uniformly resized to 512×512, and the output is resized to the initial size;
[0100] ③Testing process: Load the best network parameters saved on each independent target task during the training phase, test them on the test set of the corresponding single target task, and evaluate the model performance.
[0101] Step 5-3: Multi-task adapter adaptation on grouped target tasks;
[0102] ① Test set: a test set of nine datasets representing different semantic categories;
[0103] ② Experimental settings: The image input is uniformly resized to 512×512, and the output is resized to the initial size;
[0104] ③Testing process: Load the best network parameters saved on each group target task during the training phase, and then test on the test set of each independent target task to evaluate the model performance.
[0105] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present invention, and these modifications or replacements should all be included in the scope of protection of the present invention.
Claims
1. A camouflaged target detection method based on multi-task adapter fine-tuning, characterized by Here are the steps: Step 1: Prepare the dataset and divide it into 9 non-overlapping sub-datasets according to different semantic categories; Step 2: Build a "pre-training, adaptation, and detection" network framework. The "pre-training, adaptation, and detection" network model consists of three parts: a large pre-trained base model, a lightweight adapter module, and a COD detection head. The construction process of each part is as follows: Step 2-1: Build a large pre-trained base model; The large pre-trained base model can be pre-trained on various other datasets to learn feature representations containing rich semantics; Step 2-2: Build a lightweight adapter module; The lightweight adapter module is designed in parallel with the large pre-trained base model and contains only a small number of trainable parameters. It extracts the prior representation of the COD task and interacts with the base model to obtain multi-scale features of the COD task. Step 2-3: Build the COD detection head; The COD detection head receives the pyramid features output by the adapter module and combines low-resolution, semantically strong features with high-resolution, semantically weak features to jointly infer and discover the rich visual knowledge underlying the image to complete the COD accurate segmentation task. Step 3: Design a loss function Step 4: Training process The training process first performs traditional training on the CAMO and COD10K joint training set according to the traditional protocol in step 4-1, and then trains the model using a multi-task learning framework on the multi-task dataset in steps 4-2 to 4-5 to explore whether this scheme can learn shared knowledge between different semantic categories; Step 4-1: Traditional training; Images containing disguised targets are fed simultaneously into a large pre-trained base model and a lightweight adapter module. The large base model is first pre-trained using multimodal data, and then its parameters are frozen while only the adapter module and detection head parameters are optimized. This allows the general knowledge learned by the base model to be effectively transferred to downstream COD tasks. The entire process uses a loss function to supervise the model training on the training sets of CAMO and COD10K to obtain the trained network model. Finally, the effectiveness of the model is verified using the entire CHAMELEON and NC4K datasets, as well as the test sets of CAMO and COD10K. Step 4-2: Initialize the multi-task adapter on the source task; The nine divided sub-datasets are used as source tasks, and images from all source tasks are simultaneously input into a large pre-trained base model and a lightweight adapter module. The large base model is loaded with weights pre-trained on multimodal data and its parameters are kept frozen. The adapter module and the COD detection head are randomly initialized and then jointly trained on the training sets of all source tasks. Step 4-3: Multi-task adapter adaptation on a single-target task; Select one of the subtasks as the target task in turn, and input the image of the task into the large pre-trained base model and the lightweight adapter module; The large base model is loaded with weights pre-trained on multimodal data and keeps the parameters frozen. The adapter module is initialized using the source adapter in step 4-2, and the COD detection head is randomly initialized. The adapter is then fine-tuned on the training set of the individual target tasks. Finally, the model performance is evaluated on the test set of the corresponding single target task. Step 4-4: Group similar tasks; All subtasks are used as source tasks in turn, while other tasks are used as target tasks. The pre-trained base model parameters are kept frozen, and the model trainable parameters are tuned on the training set of each source task to initialize the adapters for different target tasks. The adapters are then tested directly on the test set of each target task without fine-tuning the entire model parameters. For each target task, the transfer performance of all source tasks is divided by the best performance score on that task to obtain a normalized result. Based on this result, the tasks with the best transfer performance on the same target task are selected as the most similar tasks and grouped together. Step 4-5: Multi-task adapter adaptation on the grouped target task; According to the grouping strategy in step 4-4, the most similar target tasks are selected from all subtasks in turn to form groups, and the images of the grouped tasks are simultaneously input into the large pre-trained base model and the lightweight adapter module; the large base model is loaded with weights pre-trained on multimodal data and the parameters are kept frozen, the adapter module is initialized using the source adapter pre-trained in step 4-2, and the COD detection head is randomly initialized; then the adapter module and detection head are fine-tuned within the target task group; finally, the model performance is evaluated by testing on the test set of each independent target task.
2. The method for detecting disguised targets based on multi-task adapter fine-tuning according to claim 1, characterized in that: Step 1 is as follows: Download four widely used COD datasets: CHAMELEON, CAMO, COD10K, and NC4K; The entire COD10K dataset and the artificial camouflage part of the CAMO dataset are divided into 9 non-overlapping sub-datasets according to different semantic categories, as 9 different subtasks, including amphibians, arthropods, artificial camouflage, birds, insects, mammals, reptiles, first underwater animals and second underwater animals.
3. The camouflaged target detection method based on multi-task adapter fine-tuning according to claim 1, characterized in that: Its characteristics are: The loss function in step 3 includes weighted binary cross entropy loss With weighted IoU loss The overall loss function is expressed as: By calculating the difference between the central pixel and its surroundings, a different weight is assigned to each pixel, so that the difficult pixels get more attention. and They are used to form pixel constraints and global constraints on the network respectively.
4. The camouflaged target detection method based on multi-task adapter fine-tuning according to claim 1, characterized in that: Its characteristics are: Step 4-1 uses Vision Transformer as the pre-trained basic model.
5. The camouflaged target detection method based on multi-task adapter fine-tuning according to claim 1, characterized in that: Its characteristics are: Step 4-2 uses Vision Transformer Adapter as a lightweight non-pre-trained vision-specific adapter.
6. The camouflaged target detection method based on multi-task adapter fine-tuning according to claim 1, characterized in that: Its characteristics are: In step 4-3, UperNet is used as the COD detection head.
7. A computer system, characterized in that include: One or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method of claim 1.
8. A computer-readable storage medium, characterized in that Computer-executable instructions are stored, and when the instructions are executed, they are used to implement the method of claim 1.
Citation Information
Patent Citations
Ultrasonic image hybrid training method based on deep learning
CN112634208A
Adversarial method and system for generating user preferred contents
US20190026274A1