Underwater target detection method based on vision-language model knowledge distillation
Through knowledge distillation technology based on vision-language model, the problem of low detection performance caused by scarcity of data and scene complexity in underwater target detection is solved, and a more efficient underwater target detection effect is achieved.
Patent Information
- Application Number
- CN202411570471.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The existing underwater target detection methods perform poorly in underwater environments, mainly due to the scarcity of data sets, difficulty in labeling and scene complexity, resulting in poor detection performance of the model in underwater environments.
Using a distillation method based on vision-language model knowledge, a high-quality training data set is constructed by collecting and cleaning multiple underwater data sets, and a CLIP model is used to fine-tune the big model. Then, a teacher network and student network are built, and through knowledge distillation technology, the student network learns the fine features of the teacher network, thereby improving detection performance.
Through the distillation technology of vision-language model knowledge, the detection performance and feature expression capabilities of the underwater target detection model are significantly improved, and can better adapt to complex scenarios in the underwater environment and make up for the problem of insufficient data.
Smart Images

Figure CN119445353A_ABST
Abstract
Description
Technical Field
[0001] The invention discloses an underwater target detection method based on vision-language model knowledge distillation, belongs to the field of computer application, and relates to an underwater target detection method. Background Art
[0002] Underwater object detection has important practical application value and potential scientific significance in many key fields, including marine science research, environmental monitoring and protection, military security and other important application fields. The widespread use and deployment of cameras in autonomous underwater vehicles (AUVs) and underwater unmanned vehicles (ROVs) facilitates the collection of underwater data sets. Therefore, the research on underwater object detection (UOD) based on deep learning is of great significance.
[0003] Compared with land detection scenes, underwater optical image detection faces various challenges. On the one hand, underwater target detection faces challenges in the underwater environment. The first is the haze effect, where the absorption and scattering of light by the medium and suspended particles can cause low contrast and foggy phenomena in underwater photography. The movement of image acquisition equipment (such as AUV and UUV) can also cause blur. The second is color deviation. Water absorbs reflected light mainly depending on the wavelength. As the water depth increases, longer wavelengths decay faster, while shorter wavelengths decay slower. Underwater images often look blue or green because blue and green light with shorter wavelengths are absorbed less than other colors. These all lead to problems such as unclear target features in underwater scenes. On the other hand, due to the great difficulty in collecting and annotating underwater images, it is difficult to integrate large underwater datasets with rich domain diversity. Therefore, it is a topic worthy of in-depth study to carry out underwater target detection research for underwater-related visual tasks to promote it to better serve application scenarios.
[0004] At present, most common underwater target detection methods are based on conventional target detection model design, and have not yet effectively utilized a large number of underwater data sets and multimodal large models. For example, application publication number CN115984681A (an underwater target detection method based on YOLOv5) only uses the target detection model; for example, CN116612379A (an underwater target detection method and system based on multi-knowledge distillation) only introduces conventional distillation methods into underwater target detection, which solves the problem of complex models to a certain extent, but lacks improvements for the problem of small underwater data and complex scenes. Summary of the invention
[0005] The underwater target detection scene is scarce due to the difficulty of labeling and the complexity of the scene. The existing target detection model is designed for the terrestrial environment, so most of them perform poorly in the underwater environment, and need targeted adjustment and optimization. Nowadays, multimodal large language models are constantly developing, and multimodal pre-training is gradually applied to downstream tasks. The CLIP model has realized the pre-training model of 400 million image-text pairs, and also showed excellent performance in various downstream tasks, which shows that the large model has better visual extraction capabilities. Therefore, the purpose of the present invention is to provide an underwater target detection method based on visual-language model knowledge distillation in view of the shortcomings of the background technology. Specifically, it is first necessary to collect the existing underwater data into a larger data set so as to fine-tune the visual language model so that the model can focus more on the underwater target features. Collect data, unify the format and fine-tune it on the CLIP model. After that, train your own target detection model on the underwater data set, use feature knowledge distillation, use the visual language model as the teacher network, and the target detection model as the student network. Under the guidance of the teacher network, the student network extracts features as close to the teacher network as possible. Finally, the visual-language model knowledge distillation is used to achieve underwater feature enhancement to make up for the problem of unclear features caused by insufficient underwater data.
[0006] In order to achieve the above object, the present invention is implemented by adopting the following technical solutions.
[0007] An underwater target detection method based on vision-language model knowledge distillation includes the following steps:
[0008] Step 1, data collection and fusion: collect multiple public underwater datasets, including but not limited to underwater target detection, classification, segmentation datasets, etc., and fuse them to build a rich and high-quality training dataset;
[0009] Step 2, data cleaning and preprocessing: clean and preprocess the collected underwater data, including label alignment, format unification, duplicate image removal, and annotation format conversion to ensure data consistency and quality;
[0010] Step 3: Fine-tune the large model: Introduce the vision-language model, use the CLIP method to align images and texts, improve the feature extraction capability through the correlation between vision and language, fine-tune the introduced vision-language large model, extract features through the alignment of images and texts, and generate accurate feature representations;
[0011] Step 4, teacher network construction: construct the teacher network Model_T, and use the fine-tuned large model backbone network to extract fine feature representations from it;
[0012] Step 5, knowledge distillation strategy: through the mean square error (MSE) loss function, the fine features extracted from the teacher network are transferred to the student network for feature migration;
[0013] Step 6, student network training: Train the student network Model_S, and through knowledge distillation, enable it to learn the fine features of the teacher network, improve the generalization ability and detection performance of the student network, and finally achieve robust detection of underwater targets.
[0014] As a preferred embodiment of the present invention, the specific process of step 1 is as follows:
[0015] 1.1 Obtain training set D from the public underwater segmentation, classification, and target detection dataset D train , and the corresponding labels of the training set, to ensure that the data sources are diverse, covering different underwater environments, target types and conditions, to increase the diversity and representativeness of the dataset;
[0016] 1.2 Training set D train Perform simple data cleaning and unify image names and label names.
[0017] As a preferred embodiment of the present invention, the specific process of step 2 is as follows:
[0018] 2.1 Label alignment and format unification:
[0019] Ensure that the label names and formats are consistent across datasets. Standardize the target category labels in all datasets to a unified naming and encoding method to avoid data confusion caused by inconsistent labels. Convert the images and annotation files of all datasets to a unified format. Convert all images to the same resolution and file format (such as JPEG), and convert annotation files to a unified text description to accommodate visual-text bimodal fine-tuning.
[0020] 2.2 Remove duplicate images:
[0021] Use image deduplication algorithms to detect and remove duplicate images, ensuring that each image appears only once in the dataset to avoid data redundancy and bias in model training.
[0022] 2.3 Text description annotation generation:
[0023] (1) Bounding box generates text description:
[0024] Bounding box generated text description generation can generate text descriptions using bounding box annotations and labels of target detection datasets. For target detection data, each image has a corresponding annotation, which records the bounding box of each target. A rule-based method is used to generate five different texts to describe the targets in the image. Specifically, the first two texts describe what targets are in the center of the image and around it respectively: the first text describes the object in the center of the image, and the image center range is defined according to the image size, which indicates which targets are in the middle of the image; while the second text describes objects that are not in the center, indicating which targets are around the image; this distinction provides additional context and information about the spatial distribution of targets in the image. The remaining three texts will randomly and specifically describe a certain target in the image, how many there are, etc. If an object appears more than ten times, a more general term (such as "a lot") will be used instead of the exact number to enhance the readability and variability of the text description;
[0025] (2) Mask to bounding box conversion:
[0026] For the segmentation dataset, the annotation corresponding to each image is a mask. The conversion of segmentation annotations to bounding box annotations is a key step to integrate the segmentation dataset into the bounding box generation text description. To achieve the conversion, the segmentation mask is processed by category and each pixel label is encoded to correspond to the target class. Next, the contour points of the connected area of each class in the mask image are identified. Specifically, we use the boundary tracking algorithm to extract the contour of the mask. Subsequently, we apply the boundary tracking algorithm to extract the topological structure of the connected components within the binary mask. By sorting the outer boundary contour points of each connected component, the minimum and maximum values on the horizontal and vertical axes are used as the coordinates of the horizontal bounding box of each connected component. Finally, all semantic segmentation annotations are converted to bounding box annotations through mask to bounding box, and then step (1) is performed to obtain the corresponding text description.
[0027] As a preferred embodiment of the present invention, the specific process of step 3 is as follows:
[0028] 3.1 First, obtain the training set D from steps 1.1 and 1.2 train The corresponding image-text pairs contained in , where the image is represented by {I1, I2, ..., I n}, and the corresponding text labels are represented as {T1, T2, …, T n};
[0029] 3.2 Then, the text corresponding to each image is input into the visual-language model (such as CLIP model) and the large model is fine-tuned. i Generate image features F(I i ), text label T iGenerate text features F(T i );
[0030] 3.3 Then, we use contrastive learning training and the InfoNCE contrastive loss function to make the features of matching image-text pairs more similar and the features of unmatched image-text pairs more dissimilar.
[0031]
[0032] sim represents the similarity function (such as cosine similarity) and is the temperature parameter;
[0033] 3.4 Finally, back propagation and parameter update are performed. After calculating the parameters, the optimization algorithm Adam is used to update the model parameters. Repeat the above process to gradually optimize the model parameters. After each round of iteration, the model performance is evaluated and the best model parameters are selected.
[0034] As a preferred solution of the present invention, the specific process of step 5 is:
[0035] 5.1 Initialize the teacher network parameters. Randomly initialize the teacher network Model_T and use the training set D after step 2 train’ ;
[0036] 5.2 Calculate the InfoNCE contrast loss function, in the training set D train' Train the teacher network Model_T until the model converges;
[0037] 5.3 Initialize the student network parameters. Randomly initialize the student network; obtain the characteristics of the teacher network and the student network after fine-tuning
[0038] 5.4 Extract collective knowledge from the teacher network; calculate the distillation loss function (MSE):
[0039]
[0040] As a preferred solution of the present invention, the specific process of step 7 is:
[0041] 6.1 Train the student network. Calculate the coordinate error loss L box , target confidence loss L obj And the classification loss L cls These three loss functions are used until the model converges;
[0042] 6.2 Calculation of detection loss L det =αL box +βL obj +γL cls .
[0043]
[0044] Among them, box, box gt Represents the center point of the predicted box and the center point of the real box, ρ 2 represents the Euclidean distance, c represents the diagonal length of the smallest rectangle containing the two boxes, IoU is the intersection over union ratio of the real box and the predicted box, α is the weight function, and v is used to measure the similarity of aspect ratios;
[0045] L obj = -(y log(p) + (1-y)log(1-p))
[0046] Where y is the true label (1 for the presence of an object and 0 for the absence of an object), and p is the confidence score of the prediction.
[0047]
[0048] Where C is the number of categories, y i is the true label, p i is the predicted class probability.
[0049] 6.3 Using L det and distillation loss L distill The student target detection network is trained by summing until the model converges. Finally, the underwater target detection network model is obtained.
[0050] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0051] 1. The underwater target detection method based on vision-language model knowledge distillation in the present invention solves the problems of label alignment, duplicate image cleaning, file format unification and annotation format conversion by collecting and cleaning public data sets, thereby improving data quality, reducing data noise, and providing higher quality training data for subsequent model training.
[0052] 2. The underwater target detection method based on the knowledge distillation of the vision-language model of the present invention uses a large-scale pre-trained model for fine-tuning. By inputting images of different data sets into the pre-trained model, effective features are extracted, thereby improving the adaptability and generalization ability of the model to different types of data. And by using knowledge distillation technology, the student network can better learn and imitate the feature representation of the teacher network, improving the detection performance and feature expression ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of the underwater target detection method based on vision-language model knowledge distillation of the present invention;
[0054] Figure 2It is a structural diagram of the underwater target detection method based on vision-language model knowledge distillation of the present invention;
[0055] Figure 3 It is a diagram showing the underwater target detection effect of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the attached Figures 1 to 3 The method of the present invention is described in detail with specific embodiments.
[0057] It is worth mentioning that the embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0058] Nowadays, multimodal large language models are constantly developing, and multimodal pre-training is gradually applied to downstream tasks. The CLIP model has realized the pre-training model on the 400 million image-text pair data set, and also showed excellent performance on various downstream tasks, which shows that the large model has better visual extraction capabilities. Therefore, the purpose of the present invention is to provide an underwater target detection method based on visual-language model knowledge distillation in view of the shortcomings of the background technology. Figure 1 As shown, the present invention proposes an underwater target detection method based on vision-language model knowledge distillation, comprising the following steps:
[0059] Step 1, data collection and fusion: collect multiple public underwater datasets, including but not limited to underwater target detection, classification, segmentation datasets, etc., and fuse them to build a rich and high-quality training dataset;
[0060] 1.1 Obtain training set D from the public underwater segmentation, classification, and target detection dataset D train , and the corresponding labels of the training set, to ensure that the data sources are diverse, covering different underwater environments, target types and conditions, to increase the diversity and representativeness of the dataset;
[0061] 1.2 Training set D train Perform simple data cleaning and unify image names and label names.
[0062] Step 2, data cleaning and preprocessing: clean and preprocess the collected underwater data, including label alignment, format unification, duplicate image removal, and annotation format conversion to ensure data consistency and quality;
[0063] 2.1 Label alignment and format unification:
[0064] Ensure that the label names and formats are consistent across datasets. Standardize the target category labels in all datasets to a unified naming and encoding method to avoid data confusion caused by inconsistent labels. Convert the images and annotation files of all datasets to a unified format. Convert all images to the same resolution and file format (such as JPEG), and convert annotation files to a unified text description to accommodate visual-text bimodal fine-tuning.
[0065] 2.2 Remove duplicate images:
[0066] Use image deduplication algorithms to detect and remove duplicate images, ensuring that each image appears only once in the dataset to avoid data redundancy and bias in model training;
[0067] 2.3 Text description annotation generation:
[0068] (1) Bounding box generates text description:
[0069] Bounding box generated text description generation can generate text descriptions using bounding box annotations and labels of target detection datasets. For target detection data, each image has a corresponding annotation, which records the bounding box of each target. A rule-based method is used to generate five different texts to describe the targets in the image. Specifically, the first two texts describe what targets are in the center of the image and around it respectively: the first text describes the object in the center of the image, and the image center range is defined according to the image size, which indicates which targets are in the middle of the image; while the second text describes objects that are not in the center, indicating which targets are around the image; this distinction provides additional context and information about the spatial distribution of targets in the image. The remaining three texts will randomly and specifically describe a certain target in the image, how many there are, etc. If an object appears more than ten times, a more general term (such as "a lot") will be used instead of the exact number to enhance the readability and variability of the text description;
[0070] (2) Mask to bounding box conversion:
[0071] For the segmentation dataset, the annotation corresponding to each image is a mask. The conversion of segmentation annotations to bounding box annotations is a key step in integrating the segmentation dataset into the bounding box generation text description. To achieve the conversion, the segmentation mask is processed by category, and each pixel label is encoded to correspond to the target class. Next, the contour points of the connected area of each class in the mask image are identified. Specifically, we use the boundary tracking algorithm to extract the contour of the mask. Subsequently, we apply the boundary tracking algorithm to extract the topological structure of the connected components within the binary mask. By sorting the outer boundary contour points of each connected component, the minimum and maximum values on the horizontal and vertical axes are used as the coordinates of the horizontal bounding box of each connected component. Finally, all semantic segmentation annotations are converted into bounding box annotations through mask to bounding box, and then (1) is performed to obtain the corresponding text description;
[0072] Some data set generation examples, Figure 3 The image shown generates the corresponding JSON annotation file format according to the rules in step 2 as follows:
[0073]
[0074]
[0075] Step 3: Fine-tune the large model: Introduce the vision-language model, use the CLIP method to align images and texts, improve the feature extraction capability through the correlation between vision and language, fine-tune the introduced vision-language large model, extract features through the alignment of images and texts, and generate accurate feature representations;
[0076] 3.1 First, obtain the training set D from steps 1.1 and 1.2 train The corresponding image-text pairs contained in , where the image is represented by {I1,I2,…,I n}, the corresponding text label is represented as {T1,T2,…,T n};
[0077] 3.2 Then, the text corresponding to each image is input into the visual-language model (such as CLIP model) and the large model is fine-tuned. i Generate image features F(I i ), text label T i Generate text features F(T i );
[0078] 3.3 Then, we use contrastive learning training and the InfoNCE contrastive loss function to make the features of matching image-text pairs more similar and the features of unmatched image-text pairs more dissimilar.
[0079]
[0080] sim represents the similarity function (such as cosine similarity) and is the temperature parameter;
[0081] 3.4 Finally, back propagation and parameter update are performed. After calculating the parameters, the optimization algorithm Adam is used to update the model parameters. Repeat the above process to gradually optimize the model parameters. After each round of iteration, the model performance is evaluated and the best model parameters are selected.
[0082] Step 4, teacher network construction: construct the teacher network Model_T, and use the fine-tuned large model backbone network to extract fine feature representations from it;
[0083] Step 5, knowledge distillation strategy: through the mean square error (MSE) loss function, the fine features extracted from the teacher network are transferred to the student network for feature migration;
[0084] 5.1 Initialize the teacher network parameters. Randomly initialize the teacher network Model_T and take out the training set D after step 2 train’ ;
[0085] 5.2 Calculate the InfoNCE contrast loss function, in the training set D train' Train the teacher network Model_T until the model converges;
[0086] 5.3 Initialize the student network parameters. Randomly initialize the student network; obtain the characteristics of the teacher network and the student network after fine-tuning
[0087] 5.4 Extract collective knowledge from the teacher network; calculate the distillation loss function (MSE):
[0088]
[0089] Step 6, student network training: Train the student network Model_S, and through knowledge distillation, enable it to learn the fine features of the teacher network, improve the generalization ability and detection performance of the student network, and finally achieve robust detection of underwater targets.
[0090] 6.1 Train the student network. Calculate the coordinate error loss L box , target confidence loss L obj And the classification loss L cls These three loss functions are used until the model converges.
[0091] 6.2 Calculation of detection loss L det =αL box +βL obj +γL cls .
[0092]
[0093] Among them, box, box gt Represents the center point of the predicted box and the center point of the real box, ρ 2 represents the Euclidean distance, c represents the diagonal length of the smallest rectangle containing the two boxes, IoU is the intersection over union ratio of the real box and the predicted box, α is the weight function, and v is used to measure the similarity of aspect ratios;
[0094] L obj = -(y log(p) + (1-y)log(1-p))
[0095] Where y is the true label (1 for the presence of an object and 0 for the absence of an object), and p is the confidence score of the prediction.
[0096]
[0097] Where C is the number of categories, y i is the true label, p i is the predicted class probability.
[0098] 6.3 Using L det and distillation loss L distill The student target detection network is trained by summing until the model converges. Finally, the underwater target detection network model is obtained.
[0099] The present invention provides an underwater target detection method based on vision-language model knowledge distillation, which combines data fusion, large model fine-tuning, knowledge distillation and other technologies. The combination of these technical solutions not only improves the accuracy and robustness of the model, but also reduces the computational complexity of the model, making the invention more efficient and practical in practical applications.
[0100] The above embodiments are only for illustrating the technical idea of the present invention, and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.
Claims
1. An underwater target detection method based on vision-language model knowledge distillation, characterized in that: The steps include: Step 1, data collection and fusion: collect several public underwater datasets, including underwater target detection, classification, and segmentation datasets, and fuse them to build a rich and high-quality training dataset; Step 2, data cleaning and preprocessing: clean and preprocess the collected underwater data, including label alignment, format unification, duplicate image removal, and annotation format conversion to ensure data consistency and quality; Step 3: Fine-tune the large model: Introduce the vision-language model, use the CLIP method to align images and texts, improve the feature extraction capability through the correlation between vision and language, fine-tune the introduced vision-language large model, extract features through the alignment of images and texts, and generate accurate feature representations; Step 4, teacher network construction: construct the teacher network Model_T, and use the fine-tuned large model backbone network to extract fine feature representations from it; Step 5, knowledge distillation strategy: through the mean square error loss function, the fine features extracted from the teacher network are transferred to the student network for feature migration; Step 6, student network training: Train the student network Model_S, and through knowledge distillation, enable it to learn the fine features of the teacher network, improve the generalization ability and detection performance of the student network, and finally achieve robust detection of underwater targets.
2. The underwater target detection method based on vision-language model knowledge distillation according to claim 1 is characterized in that: The data set fusion in step 1 includes integrating the images and annotation data of different data sets to build a unified data format and standard. The specific process is as follows: 1.1 Obtain training set D from the public underwater segmentation, classification, and target detection dataset D train , and the corresponding labels of the training set, the training set D train Covering different underwater environments, target types and conditions; 1.2 Training set D train Perform simple data cleaning and unify image names and label names.
3. According to claim 1, the underwater target detection method based on vision-language model knowledge distillation is characterized in that: The cleaning and preprocessing operations in step 2 further include label alignment, format unification, duplicate image removal, and annotation format conversion. The specific process is as follows: 2.1 Label alignment and format unification: Standardize the object category labels in all datasets into a unified naming and encoding method, convert the images and annotation files of all datasets into a unified format, convert all images to the same resolution and file format, and convert the annotation files into a unified text description to accommodate visual-text bimodal fine-tuning; 2.2 Remove duplicate images: Use image deduplication algorithms to detect and remove duplicate images, ensuring that each image appears only once in the dataset; 2.3 Text description annotation generation: (1) Bounding box generates text description: For target detection data, each image has a corresponding annotation, which records the bounding box of each target. A rule-based method is used to generate five different texts to describe the targets in the image. The first two texts describe the targets in the center and the surrounding of the image respectively. The first text describes the object in the center of the image, and defines the center range of the image according to the image size, which indicates which targets are in the middle of the image; while the second text describes the objects not in the center, indicating which targets are around the image; the remaining three texts will randomly describe the number of a certain target in the image. If an object appears more than ten times, more general terms will be used instead of the exact number to enhance the readability and variability of the text description; (2) Mask to bounding box conversion: For the segmentation dataset, the annotation corresponding to each image is a mask. First, the contour of the mask is extracted using the boundary tracking algorithm, and then the topological structure of the connected components in the binary mask is extracted using the boundary tracking algorithm. The outer boundary contour points of each connected component are sorted, and the minimum and maximum values on the horizontal and vertical axes are used as the coordinates of the horizontal bounding box of each connected component. Finally, all semantic segmentation annotations are converted into bounding box annotations through the mask to bounding box method, and then step (1) is executed to obtain the corresponding text description.
4. According to claim 1, the underwater target detection method based on vision-language model knowledge distillation is characterized in that: The large model fine-tuning process in step 3 includes adapting to specific tasks and data sets, optimizing model parameters through multiple rounds of iterations to obtain the best feature representation. The specific process is as follows: 3.1 First, obtain the training set D from steps 1.1 and 1.2 train The corresponding image-text pairs contained in , where the image is represented by {I1,I2,…,I n }, the corresponding text label is represented as {T1,T2,…,T n }; 3.2 Then, the text corresponding to each image is input into the visual-language model for large model fine-tuning. i Generate image features F(I i ), text label T i Generate text features F(T i ); 3.3 Next, we use contrastive learning training and the InfoNCE contrastive loss function to make the features of matching image-text pairs more similar and the features of unmatched image-text pairs less similar. The specific formula is as follows: sim represents the similarity function, τ is the temperature parameter; 3.4 Finally, perform back propagation and parameter update: After calculating the parameters, use the optimization algorithm Adam to update the model parameters. Repeat the above process to gradually optimize the model parameters. After each round of iteration, evaluate the model performance and select the best model parameters.
5. According to claim 1, the underwater target detection method based on vision-language model knowledge distillation is characterized in that: The knowledge distillation in step 5 calculates the feature difference between the teacher network and the student network through the mean square error loss function, and gradually optimizes the student network to make it close to the feature representation of the teacher network. The specific process is: 5.1 Initialize the teacher network parameters. Randomly initialize the teacher network Model_T and use the training set D after step 2 train’ ; 5.2 Calculate the InfoNCE contrast loss function, in the training set D train’ Train the teacher network Model_T until the model converges; 5.3 Initialize student network parameters: Randomly initialize the student network; obtain the characteristics of the teacher network and the student network after fine-tuning 5.4 Extract collective knowledge from the teacher network; calculate the distillation loss function:
6. According to claim 5, the underwater target detection method based on vision-language model knowledge distillation is characterized in that: The student network training process in step 6 is specifically as follows: 6.1 Training the student network: Calculating the coordinate error loss L box , target confidence loss L obj And the classification loss L cls These three loss functions are used until the model converges; 6.2 Calculation of detection loss L det =αL box +βL obj +γL cls , in, box, box gt Represents the center point of the predicted box and the center point of the real box, ρ 2 represents the Euclidean distance, c represents the diagonal length of the smallest rectangle containing the two boxes, IoU is the intersection over union ratio of the real box and the predicted box, α is the weight function, and v is used to measure the similarity of aspect ratios; L obj =-(ylog(p)+(1-y)log(1-p)) Where y is the true label, y is 1 for the presence of the target, y is 0 for the absence of the target, and p is the predicted confidence score: Where C is the number of categories, y i is the true label, p i is the predicted class probability; 6.3 Using L det and distillation loss L distill The student target detection network is trained by summing up until the model converges, and finally the underwater target detection network model is obtained.
Citation Information
Patent Citations
Underwater target detection method based on YOLOv5
CN115984681A
Image sample augmentation method and device, electronic equipment and storage medium
CN115761389A
Underwater target identification method based on quantitative distillation
CN116524341A
Underwater target detection method and system based on multi-knowledge distillation
CN116612379A
Visual positioning method, device and equipment based on double knowledge distillation and memory
CN116778140A
Cited By
Weak supervision underlying visual color imaging method and device based on multi-prompt learning
CN119649170A
Diatom detection method and system based on multi-modal large model
CN120088782A
A Diatom Detection Method and System Based on Multimodal Large Models
CN120088782B
Data set distillation method, device and equipment based on comparative learning and medium
CN120744492A
High-fidelity lightweight world model construction method for end-to-end automatic driving test
CN120909949A