A method and system for tracking multiple ship targets in a high occlusion canal scene
Patent Information
- Application Number
- CN202610917222.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-09-25
AI Technical Summary
[0005]针对现有技术中船舶跟踪连续性与准确性较差的问题,本发明提出一种运河高遮挡场景下多船舶目标跟踪方法,具体包括如下步骤:
本发明采集运河目标遮挡场景的视频图像并进行预处理,提取每一帧内所有的船舶位置参数;根据所述船舶位置参数,在当前帧图像中截取对应的船舶图像区域;构建带高效通道注意力机制的外观特征提取网络,将所述船舶图像区域输入到外观特征提取网络,得到船舶外观特征;根据船舶历史跟踪结果中的历史位置参数,采用无迹卡尔曼滤波对船舶的运动状态进行预测,得到船舶下一帧的预测位置参数;根据船舶位置参数、船舶外观特征和预测位置参数进行联合代价计算,构建船舶轨迹的关联匹配矩阵;根据所述关联匹配矩阵进行船舶轨迹关联与船舶标识匹配,输出连续稳定的多船舶跟踪轨迹。通过采用带有高效通道注意力机制的特征提取网络,强化船舶有效特征,提升高遮挡场景下船舶区分能力。结合无迹卡尔曼滤波预测船舶位置,可以弥补遮挡时检测失效问题,有利于提高跟踪的连续性。同时,通过融合外观特征与运动位置信息进行联合代价匹配,优化轨迹关联逻辑,能够适配运河高遮挡的复杂通航环境,抗干扰能力强,有利于提高跟踪的准确性。
Smart Images

Figure CN122820768A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual target tracking technology, and in particular to a method and system for tracking multiple ship targets in a canal with high occlusion. Background Technology
[0002] In canal navigation management, waterway security monitoring, and vessel order control, the precise tracking of multiple vessel targets under high obstruction environments can monitor vessel navigation dynamics in real time, regulate navigation order, and improve the level of intelligent waterway supervision, thus possessing significant practical application value.
[0003] The canal waterway presents complex obstruction scenarios, including bridges, riverside vegetation, and vessels occupying each other. Existing vessel tracking methods often rely solely on visual appearance feature matching or single motion trajectory calculation. These traditional methods are prone to problems such as target loss, incorrect vessel markings, and broken navigation trajectories when vessels are obstructed. Furthermore, feature extraction is susceptible to interference from river environment noise, and mismatches between vessels are common, making it difficult to guarantee the continuity and accuracy of vessel tracking during obstruction periods. Consequently, these methods cannot meet the practical requirements for long-term stable tracking in the complex obstruction scenarios of canals.
[0004] Therefore, developing a multi-ship target tracking method and system for canal high-obstruction scenarios is of great significance for improving the continuity and accuracy of ship tracking. Summary of the Invention
[0005] To address the issues of poor continuity and accuracy in ship tracking in existing technologies, this invention proposes a multi-ship target tracking method for high-obstruction scenarios in canals, specifically including the following steps: S1. Acquire video images of the canal target occlusion scene and preprocess them to extract all ship position parameters in each frame; S2. Based on the ship position parameters, extract the corresponding ship image region from the current frame image; S3. Construct an appearance feature extraction network with an efficient channel attention mechanism, input the ship image region into the appearance feature extraction network, and obtain the ship appearance features; S4. Based on the historical position parameters in the ship's historical tracking results, use unscented Kalman filtering to predict the ship's motion state and obtain the predicted position parameters for the ship's next frame. S5. Calculate the joint cost based on the ship's position parameters, ship's appearance features, and predicted position parameters, and construct the association matching matrix of the ship's trajectory; S6. Based on the association matching matrix, perform ship trajectory association and ship identifier matching, and output continuous and stable multi-ship tracking trajectories.
[0006] Furthermore, in S1, video images of the canal target occlusion scene are acquired and preprocessed to extract all ship position parameters in each frame, including: performing grayscale conversion, noise reduction and scale normalization on the video images; based on the preprocessed video images, the ships in each frame are located by a preset detection method, and the ship position parameters are output; the ship position parameters include the ship detection box coordinates and the ship center point pixel coordinates.
[0007] Furthermore, in step S2, according to the ship position parameters, the corresponding ship image region is extracted from the current frame image, including: using the ship detection box coordinates in the ship position parameters as the boundary, a partial image containing only the ship is extracted from the current frame image to obtain the ship image region.
[0008] Furthermore, in S3, an appearance feature extraction network with an efficient channel attention mechanism is constructed. The ship image region is input into the appearance feature extraction network to obtain the ship appearance features. This includes: constructing the appearance feature extraction network using lightweight convolutional layers; connecting an efficient channel attention mechanism module after the convolutional layers of the appearance feature extraction network; inputting the ship image region into the appearance feature extraction network, extracting basic convolutional features through convolutional layers, and then weighting the basic convolutional features through the efficient channel attention mechanism module to output the ship appearance features.
[0009] Furthermore, the basic convolutional features are weighted through an efficient channel attention mechanism module, including: performing global average pooling on the basic convolutional features to obtain channel feature description vectors; learning the weight coefficients of each channel based on the channel feature description vectors; and weighting and fusing the weight coefficients with the basic convolutional features of the corresponding channels to output the ship appearance features.
[0010] Furthermore, in step S4, based on the historical position parameters in the ship's historical tracking results, an unscented Kalman filter is used to predict the ship's motion state to obtain the predicted position parameters for the next frame. This includes: using the historical position parameters as observations, constructing an unscented Kalman filter state equation that includes the ship's position, velocity, and acceleration; and predicting the ship's motion state based on the unscented Kalman filter state equation to obtain the predicted position parameters for the next frame.
[0011] Furthermore, in S5, a joint cost calculation is performed based on the ship's position parameters, ship's appearance features, and predicted position parameters to construct an association matching matrix for the ship's trajectory. This includes: calculating the feature similarity cost based on the ship's appearance features; calculating the position deviation cost based on the ship's position parameters and predicted position parameters; weightedly fusing the feature similarity cost and the position deviation cost to obtain the total ship association cost; and constructing the association matching matrix for the ship's trajectory based on the total ship association cost.
[0012] Furthermore, in step S6, ship trajectory association and ship identifier matching are performed according to the association matching matrix to output continuous and stable multi-ship tracking trajectories, including: matching the ship position parameters of the current frame to the historical tracking trajectory in the ship historical tracking results according to the ship association cost value recorded in the association matching matrix; filling in the missing points on the historical tracking trajectory according to the predicted position parameters, and outputting continuous and stable multi-ship tracking trajectories.
[0013] Furthermore, after outputting continuous and stable multi-ship tracking trajectories, the method also includes: binding the multi-ship tracking trajectories with real-time ship images at the corresponding time; and continuously collecting evidence of ship violations based on the bound trajectory and image data.
[0014] The present invention also provides a multi-ship target tracking system for canal high-obscurity scenarios, the system being used to execute the multi-ship target tracking method for canal high-obscurity scenarios described in any of the preceding claims, the system comprising: The acquisition module is used to acquire video images of the canal target occlusion scene and perform preprocessing to extract all ship position parameters in each frame; The region cropping module is used to crop the corresponding ship image region in the current frame image according to the ship position parameters; The network construction module is used to construct an appearance feature extraction network with an efficient channel attention mechanism. The ship image region is input into the appearance feature extraction network to obtain the ship appearance features. The prediction module is used to predict the motion state of the ship based on the historical position parameters in the ship's historical tracking results, and to obtain the predicted position parameters of the ship in the next frame. The matrix construction module is used to perform joint cost calculation based on ship position parameters, ship appearance features, and predicted position parameters, and construct the association matching matrix of the ship trajectory; The matching output module is used to perform ship trajectory association and ship identifier matching based on the association matching matrix, and output continuous and stable multi-ship tracking trajectories.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention acquires and preprocesses video images of canal target occlusion scenarios, extracting all ship position parameters in each frame. Based on these ship position parameters, a corresponding ship image region is extracted from the current frame. An appearance feature extraction network with an efficient channel attention mechanism is constructed, and the ship image region is input into the appearance feature extraction network to obtain ship appearance features. Based on historical position parameters from historical ship tracking results, an unscented Kalman filter is used to predict the ship's motion state, obtaining the predicted position parameters for the next frame. A joint cost calculation is performed based on the ship position parameters, ship appearance features, and predicted position parameters to construct a ship trajectory association matching matrix. Based on the association matching matrix, ship trajectory association and ship identifier matching are performed, outputting continuous and stable multi-ship tracking trajectories. By employing a feature extraction network with an efficient channel attention mechanism, effective ship features are enhanced, improving ship discrimination capabilities in highly occluded scenarios. Combining unscented Kalman filtering to predict ship positions can compensate for detection failures during occlusion, thus improving tracking continuity. Meanwhile, by integrating appearance features and motion position information for joint cost matching and optimizing trajectory association logic, it can adapt to the complex navigation environment of the canal with high obstruction, has strong anti-interference ability, and is conducive to improving tracking accuracy. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart of a multi-ship target tracking method in a canal with high obstruction provided by an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a multi-ship target tracking system in a canal with high obstruction, provided by an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0019] The specific embodiments of the present invention will be described below.
[0020] To address the issues of poor continuity and accuracy in ship tracking in existing technologies, this invention acquires video images of canal target occlusion scenes and extracts ship position parameters within each frame. It then extracts the corresponding ship image region from the current frame; constructs an appearance feature extraction network with an efficient channel attention mechanism, inputting the ship image region into the network to obtain ship appearance features; employs unscented Kalman filtering to predict the ship's motion state, obtaining predicted position parameters for the next frame; performs joint cost calculation based on the ship position parameters, ship appearance features, and predicted position parameters to construct an association matching matrix for the ship trajectory; and performs ship trajectory association and ship identifier matching based on the association matching matrix, outputting continuous and stable multi-ship tracking trajectories. This invention offers improved tracking continuity and accuracy.
[0021] Example 1 This invention provides a method for tracking multiple ship targets in a canal with high obstruction. Figure 1 This is a flowchart of a multi-ship target tracking method in a canal with high obstruction provided by an embodiment of the present invention, such as... Figure 1 As shown, the specific steps include the following: S1. Acquire video images of the canal target occlusion scene and preprocess them to extract all ship position parameters in each frame.
[0022] Canal target occlusion scenarios refer to complex monitoring scenarios within canal waterways where vessels are partially or completely obscured by bridges, shore structures, trees, and passing ships. Vessel position parameters are quantitative data used to characterize the spatial location of vessels in an image.
[0023] Specifically, video images of the canal target occlusion scene are acquired and preprocessed to extract all ship position parameters in each frame, including: grayscale conversion, noise reduction and scale normalization of the video images; based on the preprocessed video images, ships in each frame are located by a preset detection method, and ship position parameters are output; the ship position parameters include the ship detection box coordinates and the ship center point pixel coordinates.
[0024] Grayscale conversion refers to converting a color image into a single-channel grayscale image, which simplifies data and reduces computational complexity. Noise reduction refers to using filtering algorithms to remove noise interference from video images, improving image clarity. Scale normalization refers to scaling video images to a preset fixed resolution, eliminating target scale differences caused by variations in shooting distance, viewing angle, and image resolution, ensuring consistent model input size. Preset detection methods refer to pre-trained visual detection algorithms that can be directly used for ship target localization, such as deep learning-based detection methods. Ship detection box coordinates refer to the pixel coordinates of the rectangular boundary used to locate the ship target, composed of the pixel coordinates of the top-left and bottom-right corners of the rectangle. These are key parameters characterizing the ship's position and range in the image. The ship center point pixel coordinates refer to the pixel coordinates of the center position of the ship detection box.
[0025] Real-time video images were acquired under complex scenarios such as canal bridge occlusion, shore vegetation occlusion, and multiple ship encounters causing obstruction. The acquired raw video was broken down frame by frame into single-frame images. Preprocessing operations were performed on each frame sequentially: color images were converted to single-channel grayscale images through grayscale conversion; filtering algorithms were used to remove Gaussian noise, salt-and-pepper noise, and water surface ripples; and images of different resolutions and shooting distances were scaled and adjusted to a preset fixed size. The preprocessed standardized images were input into a pre-trained ship detection model, which used a preset detection method to perform global traversal and ship identification, accurately locating the position and range of all ships within each frame, and outputting the coordinates of the ship detection box and the pixel coordinates of the ship's center point for each ship.
[0026] By employing grayscale conversion, noise reduction, and scale normalization, environmental interference such as changes in illumination, water surface clutter, and inconsistent resolution is effectively suppressed, improving image quality and data standardization. Pre-defined detection methods are used to locate ships in the pre-processed images, enabling accurate identification of ship targets and complete delineation of ship ranges in complex environments with high occlusion in canals. This enhances the stability and accuracy of ship detection, achieving reliable extraction and quantitative characterization of ship positions.
[0027] S2. Based on the ship position parameters, extract the corresponding ship image region from the current frame image.
[0028] Specifically, this includes: using the coordinates of the ship detection box in the ship position parameters as the boundary, cropping a local image containing only the ship in the current frame image to obtain the ship image region.
[0029] A ship image region refers to a local image captured from the current frame, bounded by the ship detection box, that contains only the ship. Using the ship detection box coordinates as precise boundaries, local cropping is performed on the current video frame image according to the coordinate range, retaining only the main body of the ship within the box and removing irrelevant background areas such as the river surface, shoreline scenery, and obstructions, resulting in a clean and independent ship image region.
[0030] By cropping the image region of a ship, it is possible to accurately focus on the ship itself, reduce background interference and redundant information, reduce the amount of subsequent data processing, and at the same time improve the purity and integrity of the ship target features, thereby enhancing the ability to focus on and represent ship targets in highly occluded and complex backgrounds.
[0031] S3. Construct an appearance feature extraction network with an efficient channel attention mechanism, input the ship image region into the appearance feature extraction network, and obtain the ship appearance features.
[0032] The efficient channel attention mechanism is a lightweight channel attention module for convolutional neural networks. Its core function is to adaptively learn the importance weights of features from different channels, enhancing effective features and suppressing redundant features. The appearance feature extraction network refers to a deep learning model based on a convolutional neural network, used to extract the semantic features of a ship's appearance from an input image. Ship appearance features refer to high-dimensional feature vectors extracted by the appearance feature extraction network that characterize the differences in the ship's shape, texture, and structure.
[0033] Specifically, an appearance feature extraction network with an efficient channel attention mechanism is constructed. The ship image region is input into the appearance feature extraction network to obtain the ship appearance features. This includes: constructing the appearance feature extraction network using lightweight convolutional layers; connecting an efficient channel attention mechanism module after the convolutional layers of the appearance feature extraction network; inputting the ship image region into the appearance feature extraction network, extracting basic convolutional features through convolutional layers, and then weighting the basic convolutional features through the efficient channel attention mechanism module to output the ship appearance features.
[0034] Lightweight convolutional layers refer to convolutional operation units that have undergone structural optimization of traditional standard convolutions. Examples include depthwise separable convolutions and grouped convolutions. Lightweight convolutional layers can reduce the number of parameters and computational cost while maintaining feature extraction capabilities. Basic convolutional features refer to the multidimensional feature maps output after the input image has undergone stacked convolutional layer operations; these are the initial visual features of ships extracted by the convolutional layers.
[0035] A lightweight convolutional layer forms the core of the appearance feature extraction backbone. An efficient channel attention mechanism module is embedded at the output of the convolutional layer to form a complete feature extraction network. After inputting the cropped image region containing only the ship's main body into the network, basic convolutional features are extracted step-by-step through multiple lightweight convolutional layers. These basic convolutional features are then input into the efficient channel attention mechanism module. Based on the inter-channel dependencies, the importance weights of each feature channel are learned, and adaptive weighted calibration is performed on the basic convolutional features, outputting an optimized ship appearance feature vector.
[0036] By employing lightweight convolutional layers to construct the appearance feature extraction network, basic visual features can be extracted quickly while reducing computational cost and resource consumption. By integrating an efficient channel attention mechanism module after the convolutional layers, the basic convolutional features can be adaptively weighted and optimized, enhancing effective ship features and suppressing interference information caused by environment and occlusion.
[0037] The efficient channel attention mechanism module performs weighted processing on the basic convolutional features, including: performing global average pooling on the basic convolutional features to obtain channel feature description vectors; learning the weight coefficients of each channel based on the channel feature description vectors; and weighting and fusing the weight coefficients with the basic convolutional features of the corresponding channels to output the ship appearance features.
[0038] Global average pooling refers to the operation of averaging the basic convolutional features by channel, compressing the two-dimensional feature map into a one-dimensional vector. The channel feature description vector is a one-dimensional vector used to represent the overall information of the features in each channel. Weighted fusion is a feature enhancement operation that multiplies the learned weight coefficients with the corresponding channel's basic convolutional features channel by channel.
[0039] Global average pooling is performed on the basic convolutional features to obtain channel feature description vectors that can represent the overall information of each channel. Based on the channel feature description vectors, weight coefficients that can distinguish the importance of features are generated. The weight coefficients are multiplied with the basic convolutional features of the corresponding channels one by one for weighted fusion, and the output is a more discriminative ship appearance feature.
[0040] By compressing features through global average pooling and learning channel weights, it can adaptively highlight feature channels that are useful for ship identification, weaken invalid channels caused by occlusion and environmental interference, and further enhance the effective feature expression through weighted fusion. This can improve the recognizability and anti-interference ability of ship appearance features, making ship features more stable and reliable in high occlusion scenarios.
[0041] S4. Based on the historical position parameters in the ship's historical tracking results, an unscented Kalman filter is used to predict the ship's motion state, and the predicted position parameters for the ship's next frame are obtained.
[0042] Ship historical tracking results refer to the collection of ship position, trajectory, and identification information obtained from multiple consecutive frames tracked up to the current frame. Historical position parameters are the sequence of bounding box coordinates and center point pixel coordinates extracted from the ship historical tracking results to describe the ship's past positions. Unscented Kalman filtering is a state estimation and position prediction algorithm applicable to nonlinear motion models. Predicted position parameters are the quantized spatial position of the ship in the next frame image, derived based on historical motion patterns.
[0043] Specifically, based on the historical position parameters in the ship's historical tracking results, an unscented Kalman filter is used to predict the ship's motion state to obtain the predicted position parameters for the next frame. This includes: using the historical position parameters as observations to construct an unscented Kalman filter state equation that includes the ship's position, velocity, and acceleration; and using the unscented Kalman filter state equation to predict the ship's motion state to obtain the predicted position parameters for the next frame.
[0044] Historical position parameters from multiple consecutive frames in the ship's historical tracking results are extracted and set as the observation values used for filtering operations. Considering the characteristics of ship navigation in canal waters, an unscented Kalman filter state equation integrating ship position, speed, and acceleration is constructed. Based on the constructed state equation, corresponding sampling feature points are selected, and sample data is updated using a nonlinear transformation method. The ship's current overall motion state is continuously corrected based on historical position change patterns, gradually predicting the ship's subsequent course and calculating its position in the next video frame, thus determining the predicted position parameters for the next frame.
[0045] By constructing state equations encompassing multiple motion elements, the actual navigation state of the ship is fully reconstructed. Leveraging the computational characteristics of the unscented Kalman filter to adapt to nonlinear motion, position prediction errors during ship turning and speed changes are effectively reduced. Continuous correction of the motion state based on historical observation data ensures that the prediction results closely match the ship's actual navigation trajectory, improving the accuracy of ship position prediction in obstructed environments and maintaining the stability and consistency of ship motion state prediction.
[0046] S5. Calculate the joint cost based on the ship's position parameters, ship appearance features, and predicted position parameters to construct the association matching matrix of the ship's trajectory.
[0047] Joint cost calculation is a computational method that integrates multi-dimensional information such as position, appearance, and motion to quantify the degree of difference in matching between the currently detected vessel and its historical trajectory. The association matching matrix is a structured data matrix that stores the matching cost between each detected vessel and its historical trajectory, used to intuitively represent the degree of association between the two.
[0048] Specifically, a joint cost calculation is performed based on the ship's position parameters, ship appearance features, and predicted position parameters to construct an association matching matrix for the ship's trajectory. This includes: calculating the feature similarity cost based on the ship's appearance features; calculating the position deviation cost based on the ship's position parameters and predicted position parameters; weighted fusion of the feature similarity cost and the position deviation cost to obtain the total ship association cost; and constructing the association matching matrix for the ship's trajectory based on the total ship association cost.
[0049] Feature similarity cost is a quantitative indicator that measures the degree of matching between the ship's appearance features in the current frame and the existing appearance features in the historical tracking trajectory. Position deviation cost is a quantitative indicator that measures the degree of spatial offset between the ship's measured position and its predicted position. The total ship association cost is a comprehensive matching error value obtained by weighted fusion of the appearance and position costs.
[0050] The system retrieves acquired ship appearance features, calculates the feature similarity cost between ships, and quantifies the degree of appearance difference. Combining the ship's measured position parameters with the predicted position parameters from the filtered output, it calculates the position deviation cost between the two, characterizing the ship's motion deviation error. The feature similarity cost and position deviation cost are weighted and fused according to a preset weight ratio to obtain the total ship association cost. The total association costs corresponding to all ships and their historical trajectories are then arranged in an ordered manner to construct a ship trajectory association matching matrix.
[0051] By splitting the cost into two categories—appearance features and spatial location—the matching evaluation dimensions are refined, accurately distinguishing between differences in ship appearance and motion offset errors. A weighted fusion method is used to obtain the total associated cost, reasonably balancing the weight proportions of appearance features and motion location to avoid the bias caused by a single cost evaluation. This reduces the probability of mismatches in canal-occluded scenarios and improves the data rationality and discriminative reliability of the association matching matrix.
[0052] S6. Based on the association matching matrix, perform ship trajectory association and ship identifier matching, and output continuous and stable multi-ship tracking trajectories.
[0053] Specifically, this includes: matching the ship position parameters of the current frame to the historical tracking trajectory in the ship historical tracking results based on the ship association cost values recorded in the association matching matrix; filling in the missing points on the historical tracking trajectory based on the predicted position parameters, and outputting a continuous and stable multi-ship tracking trajectory.
[0054] The pre-constructed association matching matrix is retrieved, and the total association cost values of each ship stored within the matrix are read. Based on the optimal matching principle of minimizing cost, the optimal pairing relationship between the ship in the current frame and the historical tracking trajectory is selected. According to the optimal pairing relationship, the ship position parameters detected in the current frame are matched to the corresponding historical tracking trajectory, realizing the association and binding of ship identifiers and trajectories. For missing trajectory points caused by factors such as ship occlusion, missed detections, and feature interference, the predicted position parameters output by the unscented Kalman filter are retrieved. These predicted position parameters replace the missing measured coordinates, and interpolation is used to fill in and repair the missing position points in the historical tracking trajectory. Finally, the measured and predicted ship position coordinates are integrated to generate a continuous, smooth, stable, and reliable multi-ship tracking trajectory.
[0055] By fusing appearance feature similarity and motion position deviation through an association matching matrix for joint verification, the accuracy of trajectory association is improved. At the same time, the predicted position parameters of the unscented Kalman filter are used to interpolate and fill in the missing time periods due to occlusion, eliminating trajectory breaks caused by short-term detection failures and ensuring the continuity and integrity of multi-ship tracking results.
[0056] Based on the above embodiments, after outputting continuous and stable multi-ship tracking trajectories, the method further includes: binding the multi-ship tracking trajectories with real-time ship images at corresponding times; and continuously collecting evidence of ship violations based on the bound trajectory and image data.
[0057] After generating continuous and stable multi-ship tracking trajectories, real-time ship images are collected at the corresponding time points of each tracking trajectory, enabling the associated storage of trajectory motion data and visualized image data. Based on the combined image and trajectory data, information on the entire ship navigation process is continuously stored, allowing for uninterrupted monitoring of the ship's navigation status and continuous evidence collection of ship violations.
[0058] By binding trajectory data with real-time images, motion data and visual images can be stored synchronously, continuously recording the entire process of ship navigation, avoiding fragmented evidence collection, and providing real, traceable and effective evidence for determining ship violations.
[0059] This embodiment acquires and preprocesses video images of a canal target occlusion scene, extracting all ship position parameters in each frame. Based on these ship position parameters, the corresponding ship image region is extracted from the current frame. An appearance feature extraction network with an efficient channel attention mechanism is constructed, and the ship image region is input into the appearance feature extraction network to obtain ship appearance features. Based on the historical position parameters in the ship's historical tracking results, an unscented Kalman filter is used to predict the ship's motion state, obtaining the predicted position parameters for the next frame. A joint cost calculation is performed based on the ship position parameters, ship appearance features, and predicted position parameters to construct a ship trajectory association matching matrix. Based on the association matching matrix, ship trajectory association and ship identifier matching are performed, outputting continuous and stable multi-ship tracking trajectories. By employing a feature extraction network with an efficient channel attention mechanism, effective ship features are enhanced, improving the ship discrimination capability in highly occluded scenes. Combining unscented Kalman filtering to predict ship positions can compensate for detection failures during occlusion, thus improving the continuity of tracking. Meanwhile, by integrating appearance features and motion position information for joint cost matching and optimizing trajectory association logic, it can adapt to the complex navigation environment of the canal with high obstruction, has strong anti-interference ability, and is conducive to improving tracking accuracy.
[0060] Example 2 This invention also provides a multi-ship target tracking system for high-obstruction scenarios in canals. Figure 2 This is a schematic diagram of the structure of a multi-ship target tracking system in a canal with high obstruction, provided by an embodiment of the present invention. Figure 2 As shown, the system includes: The acquisition module is used to acquire video images of the canal target occlusion scene and perform preprocessing to extract all ship position parameters in each frame; The region cropping module is used to crop the corresponding ship image region in the current frame image according to the ship position parameters; The network construction module is used to construct an appearance feature extraction network with an efficient channel attention mechanism. The ship image region is input into the appearance feature extraction network to obtain the ship appearance features. The prediction module is used to predict the motion state of the ship based on the historical position parameters in the ship's historical tracking results, and to obtain the predicted position parameters of the ship in the next frame. The matrix construction module is used to perform joint cost calculation based on ship position parameters, ship appearance features, and predicted position parameters, and construct the association matching matrix of the ship trajectory; The matching output module is used to perform ship trajectory association and ship identifier matching based on the association matching matrix, and output continuous and stable multi-ship tracking trajectories.
[0061] The multi-ship target tracking system in the canal high-obscurity scenario in this embodiment is used to execute the multi-ship target tracking method in the canal high-obscurity scenario in any of the above embodiments, and has the beneficial effects of any of the above embodiments, which will not be repeated here.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.
Claims
1. A method for tracking multiple ships in a canal with high obstruction, characterized in that, include: S1. Acquire video images of the canal target occlusion scene and preprocess them to extract all ship position parameters in each frame; S2. Based on the ship position parameters, extract the corresponding ship image region from the current frame image; S3. Construct an appearance feature extraction network with an efficient channel attention mechanism, input the ship image region into the appearance feature extraction network, and obtain the ship appearance features; S4. Based on the historical position parameters in the ship's historical tracking results, use unscented Kalman filtering to predict the ship's motion state and obtain the predicted position parameters for the ship's next frame. S5. Calculate the joint cost based on the ship's position parameters, ship's appearance features, and predicted position parameters, and construct the association matching matrix of the ship's trajectory; S6. Based on the association matching matrix, perform ship trajectory association and ship identifier matching, and output continuous and stable multi-ship tracking trajectories.
2. The method for tracking multiple ship targets in a canal with high obstruction as described in claim 1, characterized in that, In step S1, video images of the canal target occlusion scene are acquired and preprocessed to extract all ship position parameters in each frame, including: Perform grayscale conversion, noise reduction, and scale normalization on video images; Based on the preprocessed video images, the ships in each frame are located using a preset detection method, and the ship position parameters are output; the ship position parameters include the coordinates of the ship detection box and the pixel coordinates of the ship's center point.
3. The method for tracking multiple ship targets in a canal with high obstruction as described in claim 2, characterized in that, In step S2, based on the ship position parameters, the corresponding ship image region is extracted from the current frame image, including: Using the ship detection box coordinates in the ship position parameters as the boundary, a partial image containing only the ship is cropped from the current frame image to obtain the ship image region.
4. The method for tracking multiple ship targets in a canal with high obstruction as described in claim 1, characterized in that, In step S3, an appearance feature extraction network with an efficient channel attention mechanism is constructed. The ship image region is input into the appearance feature extraction network to obtain the ship appearance features, including: A lightweight convolutional layer is used to construct the appearance feature extraction network; An efficient channel attention mechanism module is connected after the convolutional layer of the appearance feature extraction network; The ship image region is input into the appearance feature extraction network. Basic convolutional features are extracted through convolutional layers, and then the basic convolutional features are weighted through an efficient channel attention mechanism module to output the ship appearance features.
5. The method for tracking multiple ship targets in a canal with high obstruction as described in claim 4, characterized in that, The basic convolutional features are weighted using an efficient channel attention mechanism module, including: Global average pooling is performed on the basic convolutional features to obtain the channel feature description vector; The weight coefficients of each channel are learned based on the channel feature description vectors; The weighting coefficients are weighted and fused with the basic convolutional features of the corresponding channels to output the ship's appearance features.
6. The method for tracking multiple ship targets in a canal with high obstruction as described in claim 1, characterized in that, In step S4, based on the historical position parameters in the ship's historical tracking results, an unscented Kalman filter is used to predict the ship's motion state, obtaining the predicted position parameters for the ship's next frame, including: Using historical position parameters as observations, an unscented Kalman filter state equation containing ship position, velocity, and acceleration is constructed. The motion state of the ship is predicted based on the state equation of the unscented Kalman filter, and the predicted position parameters of the ship in the next frame are obtained.
7. The method for tracking multiple ship targets in a canal with high obstruction as described in claim 1, characterized in that, In step S5, a joint cost calculation is performed based on the ship's position parameters, ship appearance features, and predicted position parameters to construct an association matching matrix for the ship's trajectory, including: Calculate the feature similarity cost based on the ship's appearance characteristics; Calculate the cost of position deviation based on the ship's position parameters and the predicted position parameters; The total ship association cost is obtained by weighted fusion of feature similarity cost and positional deviation cost. Construct a ship trajectory association matching matrix based on the total ship association cost.
8. The method for tracking multiple ship targets in a canal with high obstruction as described in claim 1, characterized in that, In step S6, ship trajectory association and ship identifier matching are performed based on the association matching matrix to output continuous and stable multi-ship tracking trajectories, including: Based on the ship association cost value recorded in the association matching matrix, the ship position parameters of the current frame are matched to the historical tracking trajectory in the ship historical tracking results; Based on the predicted position parameters, the missing points on the historical tracking trajectory are filled in, and a continuous and stable multi-ship tracking trajectory is output.
9. The method for tracking multiple ship targets in a canal with high obstruction as described in claim 1, characterized in that, After outputting continuous and stable multi-ship tracking trajectories, it also includes: Bind multiple ship tracking trajectories to real-time ship images at corresponding times; Based on the bound trajectory and image data, continuous evidence collection of vessel violations is carried out.
10. A multi-ship target tracking system for high-obstruction scenarios in canals, characterized in that, The system is used to execute the multi-ship target tracking method in a canal with high occlusion scenario as described in any one of claims 1-9, and the system includes: The acquisition module is used to acquire video images of the canal target occlusion scene and perform preprocessing to extract all ship position parameters in each frame; The region cropping module is used to crop the corresponding ship image region in the current frame image according to the ship position parameters; The network construction module is used to construct an appearance feature extraction network with an efficient channel attention mechanism. The ship image region is input into the appearance feature extraction network to obtain the ship appearance features. The prediction module is used to predict the motion state of the ship based on the historical position parameters in the ship's historical tracking results, and to obtain the predicted position parameters of the ship in the next frame. The matrix construction module is used to perform joint cost calculation based on ship position parameters, ship appearance features, and predicted position parameters, and construct the association matching matrix of the ship trajectory; The matching output module is used to perform ship trajectory association and ship identifier matching based on the association matching matrix, and output continuous and stable multi-ship tracking trajectories.