Water surface target detection tracking method based on YOLOV5s and DeepSORT network

By combining YOLOV5s and DeepSORT networks, high accuracy and stability of water surface target detection and tracking are achieved, and the problem of insufficient target detection and tracking accuracy in complex water surface environments is solved. It is suitable for real-time monitoring and fast response application scenarios.

CN119540621APending Publication Date: 2025-02-28THE 704TH RES INST OF CHINA STATE SHIPBUILDING CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411598325.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is difficult to effectively combine YOLOv5s and DeepSORT in complex water surface environments, resulting in insufficient accuracy and stability of target detection and tracking, which cannot meet the needs of real-time monitoring and rapid response.

Method used

A water surface object detection and tracking method based on YOLOV5s and DeepSORT networks is proposed. By jointly training the YOLOv5s model and the DeepSORT model, real-time object detection is used using YOLOv5s, and the detection results are input to DeepSORT for tracking and correlation, stable tracking of water surface targets is achieved.

Benefits of technology

It improves the accuracy and stability of surface target detection and tracking, enhances the real-time performance of the system, is suitable for real-time monitoring and fast response application scenarios, and reduces the error detection rate and missed detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540621A_ABST
    Figure CN119540621A_ABST
Patent Text Reader

Abstract

The invention relates to a water surface target detection tracking method based on a YOLOV5s and DeepSORT network, the DeepSORT is combined with the YOLOV5s, more stable target tracking capability can be provided on the basis of target detection, the DeepSORT can effectively solve the problems of target shielding, target loss and target re-identification by introducing a target feature matching mechanism, and the tracking stability and accuracy are improved; yOLOv5s has relatively high calculation efficiency and real-time processing capability, after the YOLOv5s is combined with DeepSORT, the real-time performance of the system can be remarkably improved while the tracking precision is ensured, and the method is suitable for application scenes of real-time monitoring and quick response; the method has good adaptability to water surface target detection, so that the method can maintain high water surface target detection adaptability under different illumination, background complexity and water surface dynamic conditions; by optimizing the target detection and tracking process, the method can effectively reduce the false detection rate and the omission rate, thereby providing a more reliable target monitoring result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision and target detection, and in particular to a surface target detection and tracking method based on YOLOV5s and DeepSORT network. Background Art

[0002] In modern environmental monitoring, marine safety and surface operations, the detection and tracking of surface targets is an important and challenging task. The surface environment has dynamic characteristics, such as waves, reflections and target movement, which makes target detection and tracking complex and difficult.

[0003] Traditional target detection techniques, such as those based on classic machine learning, usually perform poorly when dealing with targets on the water surface. These methods often rely on manually designed features and are difficult to adapt to the complex visual features and lighting changes of the water surface. With the development of deep learning technology, the YOLO (You Only Look Once) series of target detection algorithms have made significant progress in the field of image recognition. In particular, YOLOv5s, as an efficient version of the YOLO series, has high detection accuracy and processing speed, and can perform real-time target detection in complex environments.

[0004] However, high-precision target detection alone is not enough to meet the needs of practical applications. In order to achieve continuous tracking of the target, it is usually necessary to combine target detection with a tracking algorithm. DeepSORT (Simple Online and Realtime Tracking with a Deep Association Metric) is an advanced target tracking algorithm that achieves stable tracking of the target by combining detection results and target appearance features. DeepSORT can handle the occlusion and reappearance problems of the target, but its performance is still challenging in a dynamic environment such as the water surface.

[0005] In the existing technology, although some studies have attempted to combine the YOLO series of algorithms with target tracking methods, how to effectively combine YOLOv5s and DeepSORT in complex water environments to improve the accuracy and stability of target detection and tracking is still a problem that needs to be solved urgently.

[0006] Existing technologies are mainly used in land environments, while the water environment is more complex and data collection is more difficult. Traditional target detection algorithms have low target detection accuracy in highly dynamic environments such as water surfaces due to complex backgrounds or changes in lighting. Existing tracking methods cannot maintain stability when the target moves quickly or is obscured, resulting in tracking loss or mistracking. The processing speed is slow and cannot meet the needs of real-time monitoring and response, especially in the case of high-resolution video streams. Summary of the invention

[0007] Aiming at the problem that the existing surface target detection and tracking technologies lack accuracy and real-time performance in complex environments, a surface target detection and tracking method based on YOLOV5s and DeepSORT network was proposed.

[0008] The technical solution of the present invention is: a surface target detection and tracking method based on YOLOV5s and DeepSORT network, which specifically includes the following steps:

[0009] Step S1, using an imaging device to collect a target video stream under a complex background of a water surface to obtain a target image data set;

[0010] Step S2, preprocessing the target image data set to obtain a preprocessed image data set, and dividing the preprocessed image data set into a training set and a verification set;

[0011] Step S3, training the YOLOv5s model in the YOLOv5 algorithm to obtain a YOLOv5s target detection network model that meets the recognition accuracy requirements;

[0012] Step S4, using the trained YOLOv5s target detection network model obtained in S3, identifying the training data set, obtaining the target recognition candidate box as the training set of the DeepSORT model, inputting it into the DeepSORT model for training, and constructing a target detection and tracking recognizer with the trained DeepSORT model;

[0013] Step S5: Use the YOLOv5s target detection network model trained in S3 to identify the real-time image to obtain a real-time target frame, and send the obtained real-time target frame to the target detection and tracking identifier trained in S4 to perform real-time detection and tracking of the target.

[0014] Further, the specific implementation method of step S1 is:

[0015] Step S11, using an imaging device to perform continuous frame shooting sampling of the water surface and the sea surface under different complex backgrounds to obtain an initial image set;

[0016] Step S12, marking a real target detection frame in each image of the initial image set, constructing target label information, and the initial image set and the target label information together constitute a target image data set.

[0017] Further, the specific implementation method of step S2 is:

[0018] Step S21, the method for preprocessing the target image data set includes:

[0019] Preprocess the complete water surface target image dataset to obtain a preprocessed water surface target dataset; the preprocessing includes: image enhancement and denoising, target area extraction and cropping, data balancing, sample generation, and obtaining an effective image dataset with guaranteed quality;

[0020] Step S22, randomly selecting a number of frames of images from the preprocessed image data set, and performing data enhancement and denoising again on the selected frames of images to obtain an enhanced image data set, thereby improving the richness of the data set and the robustness of the model;

[0021] Step S23, shuffling the enhanced image data set in step S22 to obtain a final preprocessed image data set;

[0022] In step S24, the entire image dataset is divided into 80% training set and 20% validation set, ensuring that the training set has enough samples for effective learning and the validation set is large enough to provide meaningful performance evaluation.

[0023] Further, the specific implementation method of step S3 is:

[0024] Step S31, prepare a model configuration file and set the training parameters of the YOLOv5s target detection network model;

[0025] Step S32, inputting the training data set into the YOLOv5s target detection network model for iterative training, and ending the training after reaching the number of training iterations;

[0026] Step S33, using the validation data set to evaluate the performance of the YOLOv5s target detection network model, calculating the evaluation index of the YOLOv5s target detection network model on the validation set, and obtaining an evaluation result;

[0027] Step S34, save the weight file corresponding to the trained YOLOv5s target detection network model; the weight file includes the knowledge learned by the YOLOv5s target detection network model during the training process, and retains the connection weights and biases between different layers of the YOLOv5s target detection network model; by loading the weight file, the parameter values ​​are reloaded into the YOLOv5s target detection network model to obtain the trained YOLOv5s target detection network model.

[0028] Further, the specific implementation method of step S4 is:

[0029] Step S41, according to the weight parameters of the trained YOLOv5s model, re-input the data set pre-processed in step S2 into the YOLOv5s target detection network model to obtain the target recognition candidate box in each frame image, and the target recognition candidate box in each frame image constitutes the training set of the DeepSORT model;

[0030] Step S42, according to the training set of the DeepSORT model, determine the real position of the detected target in each frame of the image, and extract the features of the detected target in the frame, which include appearance features and motion features; Step S43, according to the real position of the target in the k-1th, k≥2th frame of the image, initialize the motion variable of the Kalman filter, and predict the position of the target in the kth frame of the image through the Kalman filter;

[0031] Step S44, using the Hungarian algorithm to perform cascade matching on the predicted position of the target in the k-th frame image and the actual position of the target in the k-th frame image;

[0032] Step S45, calculate the cost matrix through the result of cascade matching, use all the obtained cost matrices as the input of Hungarian algorithm, and obtain the linear matching result. At this time, there are three kinds of results: the result of the initial successful matching, the trajectory that was not matched for the first time, and the detection box that was not matched for the first time;

[0033] Step S46, performing cascade matching on the initially unmatched trajectory and the initially unmatched detection frame in step S45, to obtain a rematched successful result, a rematched trajectory, and a rematched detection frame;

[0034] Step S47, updating the parameters of the Kalman filter according to the result of the first successful matching and the result of the second successful matching;

[0035] Step S48, assign a new track and a new ID to the detection frame that is not matched again, and extract the feature set of the target object in the detection frame through ReID; at the same time, determine whether the track that is not matched again is in a determined state, retain the track that is in a determined state and has a mismatch number of less than 30 frames, and repeat steps S41 to S48;

[0036] Step S49, in the DeepSORT model, after obtaining trajectories with a certain state and a mismatch number less than 30 frames, these trajectories will be further used to train the identifier for target detection and tracking. The training is repeated 1000 times to obtain a weight file for target tracking.

[0037] A method for training a surface target detection and tracking network model comprises the following steps: using an imaging device to collect a target video stream under a complex background of a water surface, obtaining an image data set, preprocessing the target image data set, obtaining a target image data set suitable for training a target detection model, sending the target image data set into a YOLOv5s model for training, and obtaining a trained YOLOv5s target detection network model; sending the target image data set into the trained YOLOv5s target detection network model again, obtaining a target recognition candidate frame as a training set, sending the target recognition candidate frame as a training set into a DeepSORT model for training the DeepSORT model, and obtaining a trained target detection and tracking recognizer; using the trained YOLOv5s target detection network model for real-time processing to obtain a target recognition candidate frame, and combining the trained target detection and tracking recognizer to track and associate the target to obtain a finally trained surface target detection and tracking network model.

[0038] The beneficial effects of the present invention are as follows: the present invention is based on the surface target detection and tracking method of YOLOv5s and DeepSORT network. As an advanced target detection algorithm, YOLOv5s can provide higher detection accuracy in complex water surface environment; DeepSORT is combined with YOLOv5s to provide more stable target tracking capability on the basis of target detection. DeepSORT can effectively handle the problems of target occlusion, target loss and target re-identification by introducing the matching mechanism of target features, thereby improving the stability and accuracy of tracking; YOLOv5s has high computational efficiency and real-time processing capability. After combining with DeepSORT, the real-time performance of the system can be significantly improved while ensuring the tracking accuracy, and is suitable for application scenarios of real-time monitoring and rapid response; the present method has good adaptability to surface target detection. The flexible network structure of YOLOv5s and the tracking strategy of DeepSORT enable the method to maintain high adaptability to surface target detection under different lighting, background complexity and water surface dynamic conditions; by optimizing the target detection and tracking process, the present method can effectively reduce the false detection rate and missed detection rate, thereby providing more reliable target monitoring results. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a step diagram of the surface target detection and tracking method based on YOLOV5s and DeepSORT network of the present invention. DETAILED DESCRIPTION

[0040] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0041] like Figure 1As shown in the figure, the surface target detection and tracking method based on YOLOV5s and DeepSORT network includes the following steps:

[0042] Step S1, using an imaging device to collect a target video stream under a complex background of a water surface to obtain a target image data set;

[0043] Step S11, using an imaging device to perform continuous frame shooting sampling of the water surface and the sea surface under different complex backgrounds to obtain an initial image set;

[0044] Step S12, marking a real target detection frame in each image of the initial image set, constructing target label information, and the initial image set and the target label information together constitute a target image data set.

[0045] Step S2, preprocessing the target image data set to obtain a preprocessed image data set, and dividing the preprocessed image data set into a training set and a verification set;

[0046] Step S21, the method for preprocessing the target image data set includes:

[0047] Preprocess the complete water surface target image dataset to obtain a preprocessed water surface target dataset; the preprocessing includes: image enhancement and denoising, target area extraction and cropping, data balancing, sample generation, and obtaining an effective image dataset with guaranteed quality;

[0048] Step S22, randomly selecting a number of frames of images from the preprocessed image data set, and performing data enhancement and denoising again on the selected frames of images to obtain an enhanced image data set, thereby improving the richness of the data set and the robustness of the model;

[0049] Image enhancement includes: histogram equalization, contrast enhancement, color space conversion, image brightness, contrast, and color changes;

[0050] The denoising includes: Gaussian filtering and median filtering.

[0051] Step S23, shuffling the enhanced image data set in step S22 to obtain a final preprocessed image data set;

[0052] In step S24, the entire image dataset is divided into 80% training set and 20% validation set, ensuring that the training set has enough samples for effective learning and the validation set is large enough to provide meaningful performance evaluation.

[0053] Step S3, training the YOLOv5s model in the YOLOv5 algorithm to obtain a YOLOv5s target detection network model that meets the recognition accuracy requirements;

[0054] Step S31, prepare a model configuration file and set the training parameters of the YOLOv5s target detection network model;

[0055] Step S32, inputting the training data set into the YOLOv5s target detection network model for iterative training, and ending the training after reaching the number of training iterations;

[0056] Step S33, using the validation data set to evaluate the performance of the YOLOv5s target detection network model, calculating the evaluation index of the YOLOv5s target detection network model on the validation set, and obtaining an evaluation result;

[0057] Step S34, saving the weight file corresponding to the trained YOLOv5s target detection network model; the weight file includes the knowledge learned by the YOLOv5s target detection network model during the training process, and retains the connection weights and biases between different layers of the YOLOv5s target detection network model; by loading the weight file, the parameter values ​​are reloaded into the YOLOv5s target detection network model to obtain the trained YOLOv5s target detection network model;

[0058] Step S34, the evaluation index in step S32 includes: average precision mean.

[0059] Calculating the mean average precision includes:

[0060] The precision-recall curve of the detected bounding box for each category is obtained, the precision is interpolated on the precision-recall curve to obtain the average precision of a single category, and the average of the average precisions of all categories is calculated as the average precision mean, where the category is the category of the label.

[0061] Step S4, using the trained YOLOv5s target detection network model obtained in S3, identifying the training data set, obtaining the target recognition candidate box as the training set of the DeepSORT model, inputting it into the DeepSORT model for training, and constructing the trained DeepSORT model as a target detection and tracking recognizer;

[0062] Step S41, according to the weight parameters of the trained YOLOv5s model, re-input the data set pre-processed in step S2 into the YOLOv5s target detection network model to obtain the target recognition candidate box in each frame image, and the target recognition candidate box in each frame image constitutes the training set of the DeepSORT model;

[0063] (Differences between yolov5s and DeepSORT training data sets:

[0064] Labeling method: YOLOv5 uses bounding box labeling, which is labeling by framing the boundaries of the target object. DeepSORT needs to track the target, so it usually needs to use bounding box labeling with the target ID.

[0065] Number of samples: YOLOv5 usually requires a larger dataset for training because it requires a large number of samples for object detection tasks. DeepSORT can usually use a smaller dataset for tracking tasks compared to YOLOv5.

[0066] Data enhancement: YOLOv5 usually performs various enhancement operations on the training data, such as random scaling, random cropping, color perturbation, etc., to increase the diversity and robustness of the data. DeepSORT has relatively low requirements for data enhancement because the tracking task has lower requirements for data diversity and robustness than the target detection task. )

[0067] Step S42, according to the training set of the DeepSORT model, determine the actual position of the detected target in each frame of the image, and extract the features in the frame of the detected target, which include appearance features (to facilitate feature comparison and avoid IDswitch) and motion features (motion features facilitate Kalman filtering to predict it).

[0068] Step S43, initializing the motion variable of the Kalman filter according to the real position of the target in the k-1th (k≥2)th frame image, and predicting the position of the target in the kth frame image by the Kalman filter;

[0069] Step S44, using the Hungarian algorithm to perform cascade matching on the predicted position of the target in the k-th frame image and the actual position of the target in the k-th frame image;

[0070] Step S45, calculate the cost matrix through the result of cascade matching, use all the obtained cost matrices as the input of Hungarian algorithm, and obtain the linear matching result. At this time, there are three kinds of results: the result of the initial successful matching, the trajectory that was not matched for the first time, and the detection box that was not matched for the first time;

[0071] Step S46, performing cascade matching on the initially unmatched trajectory and the initially unmatched detection frame in step S45, to obtain a rematched successful result, a rematched trajectory, and a rematched detection frame;

[0072] Step S47, updating the parameters of the Kalman filter according to the result of the first successful matching and the result of the second successful matching;

[0073] Step S48, assign a new track and a new ID to the detection frame that is not matched again, and extract the feature set of the target object in the detection frame through ReID; at the same time, determine whether the track that is not matched again is in a confirmed state.

[0074] The trajectories in the determined state and with the number of mismatches less than 30 frames are retained, and steps S41 to S48 are repeated.

[0075] In the DeepSORT model, after obtaining trajectories with a certain state and a mismatch number of less than 30 frames, these trajectories will be further used to train the recognizer for target detection and tracking. The training is repeated 1000 times to obtain the weight file for target tracking.

[0076] Step S5, using the YOLOv5s target detection network model trained in step S3 to identify the real-time image to obtain a real-time target frame, and sending the obtained real-time target frame to the target detection and tracking identifier obtained in step S4 to perform real-time detection and tracking on the target;

[0077] Step S51, setting the operating parameters in the target detection and tracking recognizer (the operating parameters set include: the maximum distance threshold for calculating the association cost between the target and the trajectory, the confidence threshold for target detection, the maximum overlap threshold during the non-maximum suppression (NMS) operation, the maximum IOU (intersection-over-union) distance threshold for calculating the association cost between the target and the trajectory, the maximum number of unupdated frames of the trajectory, the initial number of frames, the budget for storing the nearest neighbor matching results, and whether to use CUDA accelerated calculation), and loading the weight parameters of the YOLOv5s model obtained in S3 into the YOLOv5s model, and loading the weight parameters of the DeepSORT model obtained in S4 into the target detection and tracking recognizer;

[0078] Step S52, using an imaging device to collect a real-time image of the surface target, and performing enhancement processing on the collected real-time image to obtain an enhanced real-time image;

[0079] Step S53, input the enhanced real-time image into the YOLOV5s model, set the confidence level to 0.01, and obtain the real-time target frame;

[0080] In step S54, the real-time target frame is input into the target detection and tracking identifier, the threshold of the cascade matching is set to 0.45, the filtered real-time target frame is obtained, and the target frames below the threshold in the filtered real-time target frame are removed to generate the final target detection frame to achieve real-time tracking of the target.

[0081] The correlation between the data sets in the two network training is specifically reflected in:

[0082] Original Dataset: First, there is an original target image dataset.

[0083] Preprocessed dataset (step S2): This dataset has been preprocessed by image enhancement, denoising, target region extraction and cropping, data balancing, and sample generation. These operations are designed to improve data quality, highlight target features, and make the dataset more suitable for training target detection models.

[0084] YOLOv5s object detection: The preprocessed dataset is input into the trained YOLOv5s model, which performs object detection on each image and outputs candidate boxes for object recognition. These candidate boxes locate the possible locations of objects in the image.

[0085] DeepSORT training set: The target recognition candidate boxes output by the YOLOv5s model are used as the training set of the DeepSORT model. Specifically, these candidate boxes provide the location information of the target in consecutive frames, which is crucial for the DeepSORT model to learn how to track and associate targets.

[0086] It can be said that the training set of the DeepSORT model is composed of the target recognition candidate boxes obtained by processing the preprocessed data set in step S2 through the YOLOv5s target detection network model. These candidate boxes not only provide the location information of the target, but also imply the dynamic changes of the target in consecutive frames, thereby helping the DeepSORT model learn the tracking and association rules of the target. The two models trained in this way are subsequently used to collaborate in surface target detection and tracking, ensuring that surface target detection has good adaptability, while also optimizing target tracking and reducing false detection and missed detection rates.

[0087] The above-mentioned embodiments only express the specific implementation of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

Claims

1. A surface target detection and tracking method based on YOLOV5s and DeepSORT network, characterized in that: The specific steps include: Step S1, using an imaging device to collect a target video stream under a complex background of a water surface to obtain a target image data set; Step S2, preprocessing the target image data set to obtain a preprocessed image data set, and dividing the preprocessed image data set into a training set and a verification set; Step S3, training the YOLOv5s model in the YOLOv5 algorithm to obtain a YOLOv5s target detection network model that meets the recognition accuracy requirements; Step S4, using the trained YOLOv5s target detection network model obtained in S3, identifying the training data set, obtaining the target recognition candidate box as the training set of the DeepSORT model, inputting it into the DeepSORT model for training, and constructing a target detection and tracking recognizer with the trained DeepSORT model; Step S5: Use the YOLOv5s target detection network model trained in S3 to identify the real-time image to obtain a real-time target frame, and send the obtained real-time target frame to the target detection and tracking identifier trained in S4 to perform real-time detection and tracking of the target.

2. The surface target detection and tracking method based on YOLOV5s and DeepSORT network according to claim 1 is characterized in that: The specific implementation method of step S1 is as follows: Step S11, using an imaging device to perform continuous frame shooting sampling of the water surface and the sea surface under different complex backgrounds to obtain an initial image set; Step S12, marking a real target detection frame in each image of the initial image set, constructing target label information, and the initial image set and the target label information together constitute a target image data set.

3. According to the surface target detection and tracking method based on YOLOV5s and DeepSORT network according to claim 2, it is characterized in that: The specific implementation method of step S2 is: Step S21, the method for preprocessing the target image data set includes: Preprocess the complete water surface target image dataset to obtain a preprocessed water surface target dataset; the preprocessing includes: image enhancement and denoising, target area extraction and cropping, data balancing, sample generation, and obtaining an effective image dataset with guaranteed quality; Step S22, randomly selecting a number of frames of images from the preprocessed image data set, and performing data enhancement and denoising again on the selected frames of images to obtain an enhanced image data set, thereby improving the richness of the data set and the robustness of the model; Step S23, shuffling the enhanced image data set in step S22 to obtain a final preprocessed image data set; In step S24, the entire image dataset is divided into 80% training set and 20% validation set, ensuring that the training set has enough samples for effective learning and the validation set is large enough to provide meaningful performance evaluation.

4. The surface target detection and tracking method based on YOLOV5s and DeepSORT network according to claim 3 is characterized in that: The specific implementation method of step S3 is as follows: Step S31, prepare a model configuration file and set the training parameters of the YOLOv5s target detection network model; Step S32, inputting the training data set into the YOLOv5s target detection network model for iterative training, and ending the training after reaching the number of training iterations; Step S33, using the validation data set to evaluate the performance of the YOLOv5s target detection network model, calculating the evaluation index of the YOLOv5s target detection network model on the validation set, and obtaining an evaluation result; Step S34, save the weight file corresponding to the trained YOLOv5s target detection network model; the weight file includes the knowledge learned by the YOLOv5s target detection network model during the training process, and retains the connection weights and biases between different layers of the YOLOv5s target detection network model; by loading the weight file, the parameter values ​​are reloaded into the YOLOv5s target detection network model to obtain the trained YOLOv5s target detection network model.

5. The surface target detection and tracking method based on YOLOV5s and DeepSORT network according to claim 4 is characterized in that: The specific implementation method of step S4 is as follows: Step S41, according to the weight parameters of the trained YOLOv5s model, re-input the data set pre-processed in step S2 into the YOLOv5s target detection network model to obtain the target recognition candidate box in each frame image, and the target recognition candidate box in each frame image constitutes the training set of the DeepSORT model; Step S42, determining the real position of the detected target in each frame of the image according to the training set of the DeepSORT model, and extracting the features in the frame of the detected target, the features including the appearance features and the motion features; Step S43, initializing the motion variable of the Kalman filter according to the real position of the target in the k-1th, k≥2th frame image, and predicting the position of the target in the kth frame image by the Kalman filter; Step S44, using the Hungarian algorithm to perform cascade matching on the predicted position of the target in the k-th frame image and the actual position of the target in the k-th frame image; Step S45, calculate the cost matrix through the result of cascade matching, use all the obtained cost matrices as the input of Hungarian algorithm, and obtain the linear matching result. At this time, there are three kinds of results: the result of the initial successful matching, the trajectory that was not matched for the first time, and the detection box that was not matched for the first time; Step S46, performing cascade matching on the initially unmatched trajectory and the initially unmatched detection frame in step S45, to obtain a rematched successful result, a rematched trajectory, and a rematched detection frame; Step S47, updating the parameters of the Kalman filter according to the result of the first successful matching and the result of the second successful matching; Step S48, assign a new track and a new ID to the detection frame that is not matched again, and extract the feature set of the target object in the detection frame through ReID; at the same time, determine whether the track that is not matched again is in a confirmed state. Keep the trajectories in the determined state and with a mismatch number less than 30 frames, and repeat steps S41 to S48; Step S49, in the DeepSORT model, after obtaining trajectories with a certain state and a mismatch number less than 30 frames, these trajectories will be further used to train the identifier for target detection and tracking. The training is repeated 1000 times to obtain a weight file for target tracking.

6. A surface target detection and tracking network model training method, characterized in that: An imaging device is used to collect a target video stream under a complex background of the water surface to obtain an image data set, and the target image data set is preprocessed to obtain a target image data set suitable for training a target detection model. The target image data set is sent to the YOLOv5s model for training to obtain a trained YOLOv5s target detection network model; the target image data set is sent to the trained YOLOv5s target detection network model again to obtain a target recognition candidate box as a training set and sent to the DeepSORT model to train the DeepSORT model to obtain a trained target detection and tracking identifier; the trained YOLOv5s target detection network model is used to process in real time to obtain a target recognition candidate box, and the trained target detection and tracking identifier is combined to track and associate the target to obtain the final trained surface target detection and tracking network model.

Citation Information

Patent Citations

  • Ship multi-target tracking method based on YOLO V5 algorithm

    CN113269073A

  • Multi-target tracking method and system for monitoring video

    CN114596340A

  • Statistical filtering infrared small target detection tracking method based on YOLOv5 and Deepsort

    CN114677554A

  • Moving target detection and tracking method for robot navigation

    CN117333833A

  • Method and system for identifying running state of water feeding pump and storage medium

    CN118332389A