Target detection model construction method based on target data set and secondary transfer learning
By creating an acoustic-optical data set in underwater target detection and using a secondary transfer learning method, the YOLOv5 model is trained in one-stage and two-stage, solving the problems of computational complexity and data dependence in the existing technology, and improving underwater performance. Object detection accuracy and real-time performance.
Patent Information
- Application Number
- CN202410600476.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Existing underwater target detection methods in the field of deep learning have high computational complexity, poor real-time performance, and strong dependence on annotated data. In particular, they have difficulties in obtaining large enough data sets to meet the needs of offshore and offshore exploration at the same time.
Using a method based on target data sets and secondary transfer learning, an acoustic-optical underwater disaster target detection data set was created, the data set was expanded through data enhancement methods, and the YOLOv5 model was used for one-stage and two-stage training, combining acoustic and optical detection data to improve detection performance.
It significantly improves the accuracy and efficiency of underwater target detection, reduces the dependence on a large amount of labeled data, and achieves higher detection accuracy and real-time performance.
Smart Images

Figure CN118537534A
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of underwater disaster target detection, and in particular, relates to a method for constructing a target detection model based on a target data set and secondary transfer learning. Background Art
[0002] With the continuous progress and development of human society, the exploration and excavation of marine resources are deepening. Underwater target detection is the key to the development of marine exploration. Therefore, optimizing the existing underwater target detection methods is a very important issue. Considering the wide application prospects of deep learning and its potential to further improve the intelligence level of marine exploration, many methods choose to introduce deep learning methods into marine exploration tasks. At present, many deep learning algorithms serve target detection tasks. Among them, R-CNN, SPP-Net and Faster RCNN are commonly used two-stage models. In terms of their advantages, they show high accuracy and low false positive rate, while in terms of their disadvantages, they have the characteristics of high computational complexity, poor real-time performance and high dependence on annotation data. At present, the more popular single-stage detection methods include YOLO and SSD, because they only need one stage to complete the detection task, which determines their high real-time and simple and fast characteristics. Compared with the two-stage detection algorithm, the single-stage algorithm can better achieve the unity of accuracy and real-time performance. Considering the above characteristics, the single-stage detection model YOLOv5 is more suitable for actual use needs. However, when using the single-stage detection model YOLOv5 for target detection, it is difficult to obtain a large enough data set, which limits the accuracy of detection and the effectiveness of the model. And using only acoustic detection or optical detection methods alone cannot meet the needs of offshore and nearshore exploration at the same time. Summary of the invention
[0003] The present application provides a method for constructing a target detection model based on a target data set and secondary transfer learning, which solves the current problem of low accuracy in underwater disaster target detection.
[0004] The present application embodiment provides a method for constructing a target detection model based on a target data set and secondary transfer learning, comprising the following steps:
[0005] Step 1: Create an acoustic-optical underwater disaster target detection dataset;
[0006] Step 2: Use data enhancement method to expand the acoustic-optical underwater disaster target detection dataset. At the same time, randomly extract part of the expanded acoustic-optical underwater disaster target detection dataset to form a dataset and use the extracted dataset to perform one-stage training on the YOLOv5 model, and use the optimal weight in the training process as the first-stage weight;
[0007] Step three, use the first-stage weights to perform two-stage training on the YOLOv5 model on the expanded acoustic-optical underwater disaster target detection dataset to obtain the underwater disaster target detection model.
[0008] Optionally, in step one, light waves are used to detect shallow water areas to obtain diving area data information; sonar is used to detect deep water areas to obtain deep water area data information, and the diving area data information and the deep water area data information constitute an acoustic-optical underwater disaster target detection data set.
[0009] Optionally, the data enhancement method in step 2 is to modify images in the acoustic-optical underwater disaster target detection dataset.
[0010] Optionally, the image can be altered by rotating, flipping, cropping, resizing, translating, adjusting brightness, adjusting contrast, adding noise, and Gaussian blurring.
[0011] Optionally, the YOLOv5 model that performs one-stage training in step 2 includes a YOLOv5m model.
[0012] Optionally, YOLOv5m adopts the CloU loss function to incorporate additional losses for the scale and aspect ratio of the bounding box, CIoU loss The formula is as follows:
[0013]
[0014] Where, CIoU loss represents the loss based on the intersection-over-union between the predicted bounding box and the ground-truth bounding box, p represents the predicted probability that the object appears in the bounding box, c represents the confidence score of the predicted bounding box, α represents the importance of the confidence score in the loss function, and v represents the variance of the bounding box coordinates.
[0015] Step three, use the first-stage weights to perform two-stage training on the YOLOv5 model on the expanded acoustic-optical underwater disaster target detection dataset to obtain the final model weights.
[0016] Optionally, in step three, the YOLOv5m model that has completed the first-stage training is subjected to the second-stage training on the expanded acoustic-optical underwater disaster target detection dataset, and the weight parameters of the YOLOv5m model need to be fine-tuned during the training process.
[0017] Optionally, fine-tuning method 1: When the acoustic-optical underwater disaster target detection dataset is very similar to the dataset of the one-stage training, the YOLOV5m model fine-tunes all layers using the features learned in the one-stage training.
[0018] Optionally, fine-tuning method 2: when the difference between the acoustic-optical underwater disaster target detection dataset and the dataset trained in the first stage is relatively large, freeze some layers of the YOLOV5m model and fine-tune the unfrozen layers.
[0019] Optionally, the underwater disaster target detection model constructed by the method is applied to underwater target detection.
[0020] The present application provides a method for constructing a target detection model based on a target data set and secondary transfer learning. First, an acoustic-optical underwater disaster target data set is created, and the data set is expanded using traditional data enhancement methods. The pre-trained model weights are used to train a one-stage model YOLOv5 on a data set formed by randomly extracting a portion of the expanded acoustic-optical underwater disaster target detection data set, and the optimal weights in the training process are used as the first-stage weights. Then, based on the first-stage weights, the model is trained in the second stage for the previously created expanded underwater data set. The combination of secondary transfer learning and acoustic-optical data sets is used to improve the detection performance of the model and reduce the difficulty of the existing model in detecting underwater disaster targets. Compared with the method of using only acoustic-optical data sets, the efficiency and accuracy of detection are greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 This is the structural diagram of the YOLOv5 model for this application;
[0023] Figure 2 This is a sample diagram of the detection results of the acoustic-optical underwater disaster target detection dataset of this application;
[0024] Figure 3 Schematic diagram of an optical image sample processed using a traditional data enhancement method;
[0025] Figure 4 A schematic diagram of sonar image samples processed using traditional data enhancement methods;
[0026] Figure 5-1 The confusion matrix diagram generated during the training process using only the acoustic-optical underwater disaster target detection dataset;
[0027] Figure 5-2Various loss functions and detection accuracy statistics obtained during the training process using only the acoustic-optical underwater disaster target detection dataset;
[0028] Figure 5-3 This is an example diagram of detection result samples obtained by using only the acoustic-optical underwater disaster target detection dataset during the training process;
[0029] Figure 6-1 The confusion matrix diagram obtained during the training process of the model constructed by acoustic-optical underwater disaster target detection dataset and secondary transfer learning was used for this application;
[0030] Figure 6-2 For this application, the acoustic-optical underwater disaster target detection dataset and the various loss functions and detection accuracy statistics obtained during the training process of the model built by secondary transfer learning were used;
[0031] Figure 6-3 This application uses the acoustic-optical underwater disaster target detection dataset and the detection sample example diagram of the model built by secondary transfer learning during the training process;
[0032] Figure 7-1 A schematic diagram of the indicators obtained during the validation process using only the acoustic-optical dataset;
[0033] Figure 7-2 This is a schematic diagram of indicators obtained during the verification process of the target detection model constructed using the construction method of the present application. DETAILED DESCRIPTION
[0034] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0035] A method for constructing a target detection model based on a target data set and secondary transfer learning provided in an embodiment of the present application is now described. A method for constructing a target detection model based on a target data set and secondary transfer learning comprises the following steps:
[0036] Step 1: Create an acoustic-optical underwater disaster target detection dataset;
[0037] Step 2: Use data enhancement method to expand the acoustic-optical underwater disaster target detection dataset. At the same time, randomly extract part of the expanded acoustic-optical underwater disaster target detection dataset to form a dataset and use the extracted dataset to perform one-stage training on the YOLOv5 model, and use the optimal weight in the training process as the first-stage weight.
[0038] Step three, using the first-stage weights obtained in step two, perform two-stage training on the YOLOv5 model on the expanded acoustic-optical underwater disaster target detection dataset to obtain the final model weights, that is, to obtain the underwater disaster target detection model.
[0039] Specifically, in step 1, light waves are used to detect shallow water areas (coastal areas) to form an optical data set; sonar is used to detect deep water areas (remote oceans) to form an acoustic data set; the optical data set and the acoustic data set together constitute an acoustic-optical underwater disaster target detection data set, see Figure 2 , which are samples detected using the acoustic-optical underwater disaster target detection dataset.
[0040] The use of light waves to detect shallow water areas solves the problems of complex and unstable propagation of sound waves in shallow water areas, poor detection accuracy and low efficiency. The complex marine environment near the coast, the interference of marine life and frequent human activities have seriously hindered the propagation of sound waves, making sonar detection less effective in most coastal waters; at the same time, the propagation of sound waves in shallow water areas is affected by the shallow water effect, and there will be problems such as scattering, refraction and enhanced attenuation, which further affects the effect of acoustic detection in shallow sea areas. The use of light waves for shallow water area detection effectively solves the above problems. It can not only clearly depict the terrain and biological conditions in the shallow water environment; but also provide real-time image data, which is convenient for timely and accurate monitoring of the shallow water environment, and has strong real-time capabilities; compared with sonar detection, optical detection will not interfere with the offshore marine ecology, and has the advantages of non-invasive, green and environmentally friendly detection.
[0041] Sonar is used to detect deep water areas (remote oceans). Sound waves not only travel quickly in water, which helps cover a wide range of ocean areas, but can also quickly locate and detect deep-sea targets, which can improve the accuracy and efficiency of deep-sea detection. Sound waves also have a long transmission distance in water and can travel for tens of thousands of kilometers with little attenuation, thus enabling extensive exploration of deep-sea areas. Compared with other signals, sound waves can achieve higher transmission intensity in water, which facilitates long-distance detection in the deep sea.
[0042] In step 2, the data enhancement method is an existing traditional data enhancement method, including operations such as rotation, flipping, cropping, resizing, translating, brightness adjustment, contrast adjustment, noise addition, Gaussian blurring, etc. on the images in the acoustic-optical underwater disaster target detection dataset.
[0043] Specifically, the optical image in the optical data set is modified, such as Figure 3As shown in the figure, samples of optical images processed using traditional data enhancement methods are shown. By changing the optical images, each optical image changes in angle, direction, image size, color and contrast. Each optical image that has been processed differently is a different input, so that a data set that is expanded several times can be obtained. This image processing process increases the sample capacity of the data set and thus improves the generalization ability of the model for the target task. At the same time, there is an imbalance in the number of optical image samples of different categories in the optical data set. Therefore, by applying the above data enhancement method to minority class objects and increasing the number of minority class samples, the problem of data imbalance can be solved, and the model's ability to recognize minority class optical images can be improved, thereby improving the robustness of the model, so that the model can accurately recognize and analyze optical images of the detection target under different lighting conditions. Training the YOLOv5 model with this enhanced optical data set can greatly improve the model's ability to detect targets.
[0044] The above-mentioned modification process for the optical images in the optical dataset is also applicable to the sonar images in the acoustic dataset, such as Figure 4 Shown are sonar image samples processed using traditional data augmentation methods.
[0045] By using a combination of acoustic detection and optical detection, the performance of the ocean environment detection model can be greatly improved, laying a solid foundation for more accurate and efficient detection of the ocean environment.
[0046] The one-stage model YOLOv5 in step 2 uses the YOLOv5m model it contains, which has a smaller model, faster detection speed, and can also achieve relatively high detection accuracy.
[0047] See also Figure 1 , the YOLOv5m model includes: input layer(input), backbone network(backbone), neck network(neck) and head network(head).
[0048] YOLOv5m utilizes the CloU (Complete Cross-Union) loss function, incorporating additional losses for the scale and aspect ratio of the bounding box. This enhancement ensures that the predicted box is better aligned with the ground-truth box. loss The formula is as follows:
[0049]
[0050] Where, CIoU loss represents the loss based on the intersection over union (IoU) between the predicted bounding box and the ground-truth bounding box, p represents the predicted probability that the object appears in the bounding box, c represents the confidence score of the predicted bounding box, α represents the importance of the confidence score in the loss function, and v represents the variance of the bounding box coordinates.
[0051] CIo loss Function combines IoU loss , confidence loss and variance loss are used to optimize the performance of the target detection model, measure the difference between the predicted box and the actual box more accurately, and encourage the model to better predict the target bounding box that is consistent with the actual situation.
[0052] The YOLOv5m model is used to achieve a combination of accuracy, speed, and ease of use. The YOLOv5m model has high-speed real-time performance. The YOLOv5m model has a faster detection speed while maintaining high accuracy, making it suitable for real-time object detection applications, solving the shortcomings of previous models in real-time performance; high accuracy, the YOLOv5m model improves the accuracy of object detection by adopting a deeper model structure and more feature pyramid layers; multi-scale detection, the YOLOv5m model uses multiple feature pyramid layers and predictions of different scales to achieve detection of objects of various sizes, and is suitable for scenes with objects of different scales; easy to use: The YOLOv5m model provides user-friendly code and pre-trained weight files, which are convenient for users to fine-tune or customize their object detection tasks.
[0053] The target detection method of the present application adopts secondary transfer learning to alleviate the impact of the YOLOV5m model's dependence on a large amount of labeled data in the target task. Secondary transfer learning is a deep learning method that transfers knowledge from an already similar task to another task, which can further solve the problem of over-reliance on a large amount of labeled data. The first stage of training in secondary transfer learning is to perform learning tasks in tasks related to the target task (i.e., the acoustic-optical underwater disaster target detection dataset of the present application), and the learning tasks are completed by training the model through tasks (tasks related to the target task) based on the use of pre-trained weight files. The second stage of training in secondary transfer learning is to use the target task (i.e., the acoustic-optical underwater disaster target detection dataset of the present application) to train the model based on the optimal weight of the first stage of training. The pre-trained model (YOLOV5m model) is an open source file. Using this file to train the model can greatly reduce the training time and difficulty of training and improve the accuracy of training. Using the first stage weights adjusted and obtained in the previous training process by the YOLOV5m model that has been trained for one stage can reduce the training time and sample requirements on the target task.
[0054] Through the first phase of training, the YOLOV5m model learns general features and representations that are useful for the target task. By training the YOLOV5m model that has been trained once for the target task again, and fine-tuning the YOLOV5m model parameters in the process, the pertinence of the YOLOV5m model for the target task can be improved. That is, step three, during the second phase of training, you can choose to fine-tune the model according to the specific situation and requirements. Fine-tuning includes two methods:
[0055] Method 1: When the acoustic-optical underwater disaster target detection dataset is highly similar to the dataset of the one-stage training, the YOLOV5m model is fine-tuned using the features learned in the one-stage training, that is, all layers are fine-tuned.
[0056] Fine-tuning all layers includes selecting a base model, freezing weights, adding a new fully connected layer, training a new layer, unfreezing weights, and continuing training. Neural networks include multiple layers, each with corresponding weights. Fine-tuning means that when migrating one model to another, if the two models are very similar, you can make small adjustments to the weights on each layer.
[0057] Method 2: When the difference between the acoustic-optical underwater disaster target detection dataset and the dataset trained in the first stage is relatively large, the YOLOV5m model freezes some layers and fine-tunes the unfrozen layers.
[0058] Typically, the model weights of lower-level convolutional layers or feature extraction layers are frozen and no longer changed, while the model weight parameters of high-level fully connected layers or classifier layers are fine-tuned.
[0059] The above-mentioned fine-tuning process requires data expansion. During the fine-tuning and training process of the acoustic-optical underwater disaster target detection dataset, data expansion techniques can be applied to increase the diversity of training data. Random transformation, rotation, and cropping can be applied to the training data to increase the number and diversity of training samples, thereby improving the generalization ability of the model.
[0060] The fine-tuned acoustic-optical underwater disaster target detection dataset is validated using a validation set: During the fine-tuning or training process, part of the acoustic-optical underwater disaster target detection dataset is used as a validation set, which can be used to adjust the model's hyperparameters and training strategies. For example, the optimal learning rate, batch size, number of training times and other training parameters can be adjusted during the training process based on the validation results to achieve the best training results.
[0061] Because the dataset used in the first-stage training is a part of the expanded underwater disaster target detection dataset, and is very similar to the acoustic-optical underwater disaster target detection dataset of the second-stage training, the weight parameters of all layers of the YOLOV5m model obtained by one-to-one stage training are fine-tuned. In the actual execution of the task, the weights of the official pre-trained model file "yolov5m.pt" are used for the first-stage training of the model, and the optimal weights of the first-stage training are transferred to the training of the acoustic-optical underwater disaster target detection dataset, and the weights on all neural network layers are fine-tuned by fine-tuning all layers, so as to obtain a model with strong recognition ability for specific underwater targets.
[0062] In this application, the acoustic-optical underwater disaster target detection dataset is used for all training and testing processes. The difference between the two comparative experiments is that one experiment uses the acoustic-optical underwater disaster target detection dataset and the secondary transfer learning method, while the other experiment only uses the acoustic-optical underwater disaster target detection dataset for training. The experiments were conducted on a personal computer with an NVIDIA GeForce RTX 4060 and Max-Q Design 6144MiB graphics card. The detection data obtained during the training process of the two experiments are shown in Figure 2. Figure 5-1 , Figure 5-2 , Figure 5-3 , Figure 6-1 , Figure 6-2 , Figure 6-3 As shown in Figures 7-1 and 7-2, the indicators obtained during the verification process of the two experiments are shown in Figures 7-1 and 7-2. Figure 5-1 , Figure 5-2 and Figure 5-3 The detection data is obtained by training using only the acoustic-optical underwater disaster target detection dataset; Figure 6-1 , Figure 6-2 and Figure 6-3 The detection data obtained from the training process using the acoustic-optical underwater disaster target detection dataset and the secondary transfer learning method; Figure 7-1 and Figure 7-2 These are the indicator curves obtained by two comparative experiments during the verification process.
[0063] in, Figure 6-2In the example, Confusion matrix: confusion matrix, Wrecks: wrecks, Background: background, Train / box loss: box regression loss in training, Train / obj loss: target confidence loss in training, Train / cls_loss: category classification loss in training, etrics / precision: precision rate, Metrics: regression rate, Val / box loss: box regression loss in verification process, Val / obj loss: target confidence loss in verification process, Val / cls_loss: category classification loss in verification process, Metrics / mAP_0.5: average precision under IoU threshold of 0.5, Metrics / mAP_0.5:0.95: average precision between IoU thresholds of 0.5 and 0.96.
[0064] The detection samples and data were obtained from the validation process. The data obtained from the validation process is somewhat different from the data obtained during the training process. In order to more intuitively see the differences between different experimental groups, various indicators obtained during the training process are listed in Table 1. For convenience, the group that only uses the acoustic-optical dataset is used as the control group, and the group that uses the acoustic-optical underwater disaster target detection dataset and the secondary transfer learning method is used as the experimental group. The F1 confidence curve, precision-recall curve, precision confidence curve, and recall confidence curve obtained from the validation process are shown in Figure 1. Figure 7-2 shown.
[0065] Table 1 Data of different groups
[0066] Group Precision Recall mAP@0.5 mAP@50-95 Control group 0.779 0.592 0.641 0.412 Experimental Group 0.793 0.621 0.671 0.439
[0067] By comparing the different results obtained by the different groups mentioned in Table 1, it can be seen that in terms of accuracy and efficiency of underwater target detection, the results obtained by training with the secondary transfer learning and acoustic-optical dataset methods are better than those obtained by training only on the acoustic-optical underwater disaster target detection dataset, especially the two indicators of F1 confidence and recall. The test results show that when using the secondary transfer learning method and the acoustic-optical dataset, the precision / confidence can be improved by 1.79%, the recall rate is improved by 4.90%, the mAP@0.5 is increased by 4.68%, and the mAP@50-95 is increased by 6.55% compared with the method using only the acoustic-optical dataset. The F1 confidence score combines precision and recall into a single metric, providing a balanced measure of the performance of the YOLOv5m model. A higher mAP@0.5 indicates that the model can accurately detect and identify objects with higher confidence, which means that the model has a better ability to distinguish between objects and backgrounds. A higher mAP@50-95 indicates that the model performs well in accurately detecting and identifying objects over a wide range of IoU thresholds. The above results show that the model can maintain high precision and recall even if there are different degrees of overlap between the predicted bounding box and the true bounding box. Therefore, it can be inferred from the results that the experimental group data shows higher positioning accuracy and is less affected by environmental uncertainty during the detection process.
[0068] In the results, because the only target marked in training is the wreckage, this can also be understood from the classification loss calculation formula, which is as follows:
[0069] C loss =-l*log(p)+(l-1)*log(1-p) (2)
[0070] In (2), l refers to the label of the sample. The corresponding value of the positive sample is 1, and the corresponding value of the negative sample is 0. p refers to the probability of the positive sample. Since there are only positive samples in each image, the value of p is always 1. It can be concluded that C loss Always 0.
[0071] The underwater disaster target detection model constructed by the model construction method of the present application is applied to underwater target detection to improve detection efficiency and accuracy.
[0072] The present application provides a method for constructing a target detection model based on a target data set and secondary transfer learning, and uses a method combining secondary transfer learning and an acoustic-optical underwater disaster target detection data set to improve detection performance and reduce the difficulty of detecting underwater disaster targets by existing models. First, an acoustic-optical underwater disaster target detection data set is created, and the data set is expanded using traditional data enhancement methods. First, a one-stage model YOLOv5 is trained on a data set formed by a part randomly selected from the expanded data set, and its optimal weight is used as the one-stage weight. Then, the previously created expanded acoustic-optical underwater disaster target detection data set is trained in two stages using the one-stage weight to obtain the final model. It can be seen from the test results that the detection performance of the model is improved by combining secondary transfer learning with an acoustic-optical data set, and the difficulty of detecting underwater disaster targets by existing models is reduced. Compared with the method of using only an acoustic-optical data set, the detection efficiency and accuracy are improved, the precision is increased by 1.79%, the recall rate is increased by 4.90%, the mAP@0.5 is increased by 4.68%, and the mAP@50-95 is increased by 6.55%.
[0073] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. Method for constructing target detection model based on target dataset and secondary transfer learning, It is characterized in that The following steps are involved: Step 1: Create an acoustic-optical underwater disaster target detection dataset; Step 2: Use data enhancement method to expand the acoustic-optical underwater disaster target detection dataset. At the same time, randomly extract part of the expanded acoustic-optical underwater disaster target detection dataset to form a dataset and use the extracted dataset to perform one-stage training on the YOLOv5 model, and use the optimal weight in the training process as the first-stage weight; Step three, use the first-stage weights to perform two-stage training on the YOLOv5 model on the expanded acoustic-optical underwater disaster target detection dataset to obtain the underwater disaster target detection model.
2. The method for constructing a target detection model based on a target data set and secondary transfer learning as claimed in claim 1, It is characterized in that In step one, light waves are used to detect shallow water areas to obtain data information of diving areas; sonar is used to detect deep water areas to obtain data information of deep water areas. The data information of diving areas and deep water areas constitute the acoustic-optical underwater disaster target detection data set.
3. The method for constructing a target detection model based on a target dataset and secondary transfer learning as claimed in claim 1, It is characterized in that The data enhancement method in step 2 is to change the images in the acoustic-optical underwater disaster target detection dataset.
4. The method for constructing a target detection model based on a target data set and secondary transfer learning as claimed in claim 3, It is characterized in that The ways to make changes to an image include rotating, flipping, cropping, resizing, translating, adjusting brightness, adjusting contrast, adding noise, and Gaussian blurring.
5. The method for constructing a target detection model based on a target data set and secondary transfer learning as claimed in claim 1, It is characterized in that The YOLOv5 model that performs one-stage training in step 2 includes the YOLOv5m model.
6. The method for constructing a target detection model based on a target data set and secondary transfer learning as claimed in claim 5, It is characterized in that YOLOv5m uses the CloU loss function to incorporate additional losses for the scale and aspect ratio of the bounding box, CIoU loss The formula is as follows: Where, CIoU loss represents the loss based on the intersection-over-union between the predicted bounding box and the ground-truth bounding box, p represents the predicted probability that the object appears in the bounding box, c represents the confidence score of the predicted bounding box, α represents the importance of the confidence score in the loss function, and v represents the variance of the bounding box coordinates.
7. The method for constructing a target detection model based on a target dataset and secondary transfer learning as claimed in claim 1, It is characterized in that In step three, the YOLOv5m model that has completed the first-stage training is trained in the second stage on the expanded acoustic-optical underwater disaster target detection dataset. During the second-stage training, the weight parameters of the YOLOv5m model obtained in the first-stage training need to be fine-tuned.
8. The method for constructing a target detection model based on a target data set and secondary transfer learning as claimed in claim 7, It is characterized in that Fine-tuning method 1: When the acoustic-optical underwater disaster target detection dataset is highly similar to the dataset trained in the first stage, the YOLOV5m model weights obtained in the first stage training are fine-tuned for all layers.
9. The method for constructing a target detection model based on a target data set and secondary transfer learning as claimed in claim 7, It is characterized in that Fine-tuning method 2: When the difference between the acoustic-optical underwater disaster target detection dataset and the dataset of the first-stage training is large, freeze some layers of the YOLOV5m model weights obtained in the first-stage training, and fine-tune the unfrozen layers.
10. The method for constructing a target detection model based on a target dataset and secondary transfer learning according to claim 1, It is characterized in that The underwater disaster target detection model constructed by this method is applied to underwater target detection.
Citation Information
Patent Citations
Underwater target detection method based on small sample machine learning and hyper-parameter optimization
CN113239980A
Forward-looking sonar image target detection method and system based on YOLOv5
CN114677602A
Small sample target detection method based on self-supervised contrast constraint
CN114841257A
Forward-looking sonar image underwater multi-target tracking method based on deep learning
CN116883766A
Underwater small target detection method based on underwater sonar image
CN117315453A
