A sea port monitoring ship small target tracking method, system and storage medium based on sea state reward driving positioning

CN122990503APending Publication Date: 2026-10-27CHONGQING BITMAP INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611436518.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0010]上述监督方式在通用场景尚可奏效,但移植到海港船小目标跟踪时暴露出以下缺陷:

Benefits of technology

[0094]第一,本发明将海面特征图上的船小目标定位显式建模为序贯决策过程,以帧级重叠反馈、序列级轨迹反馈与海域重捕获反馈三部分共同构成海况任务反馈信号,并将其作为强化学习训练奖励,使定位决策网络直接以海事监管实际关心的指标为优化目标进行策略迭代,摒弃了现有技术中人工预设空间分布模板所带来的目标失配缺陷。训练所得策略能够自适应地选择候选定位位置,港口复杂海面背景下船小目标的框选精度、轨迹连续性与长时跟踪成功率显著优于传统模板匹配结合密集置信预测的路线。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990503A_ABST
    Figure CN122990503A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on sea state reward driving positioning's sea port monitoring ship small target tracking method, system and storage medium, the method includes: obtaining template image and current search image containing small target to be tracked ship;Template image and current search image are visually coded, and initial search feature map is obtained;Sea surface background suppression is carried out to initial search feature map, and the search feature map after background suppression is obtained;Multi-scale decision space is constructed on search feature map, and each space grid position constitutes a decision option;Through positioning decision network, candidate positioning frame and decision score are generated for each decision option, and decision probability is obtained by normalization;According to decision probability, decision option is selected, and corresponding candidate positioning frame is output as tracking result.The application can unify training target and maritime evaluation index, improve the robustness, long-time stability and lock loss self-recovery ability of ship small target tracking under the complex dynamic background of sea surface, meet the real-time inference demand of port edge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual target tracking technology, and particularly to a method, system, and storage medium for tracking small targets on a harbor monitoring vessel based on sea state reward-driven positioning. Background Technology

[0002] With the advancement of "smart port" and "modern maritime supervision" construction, fixed cameras and PTZ (pan-tilt-zoom) high-definition surveillance cameras have been deployed on a large scale in coastal ports, inland waterways, anchorages, and berthing areas to build an all-weather electronic patrol and video surveillance system, serving as a visual supplement to the Vessel Traffic Service (VTS) system. Small vessel target tracking is the core perception capability of the harbor electronic patrol and video surveillance system, directly serving the following maritime scenarios:

[0003] Combating illegal boats / smuggling: Small speedboats, rubber boats, and unlicensed barges without AIS (Automatic Identification System) signals cross waterways at night or in foggy weather. Visual tracking is required to lock their tracks and coordinate law enforcement efforts.

[0004] Boundary crossing and intrusion prevention alarms: Real-time tracking and boundary crossing determination of small boats entering restricted navigation areas, anchorage protection areas, and dangerous areas for dock operations;

[0005] Channel order management: Continuously track passing vessels and assist in collision warning and overtaking / encounter event analysis;

[0006] Berthing and unberthing monitoring: Accurately record the movement trajectories of pilot boats, tugboats, and workboats during the berthing and unberthing process of large cargo ships;

[0007] Emergency rescue: Continuously lock onto small targets such as people who have fallen into the water, lifeboats, and drifting objects to provide coordinate relay for search and rescue.

[0008] In the above scenarios, due to limitations in imaging distance and target scale, the percentage of ship targets in harbor monitoring images is generally less than 1%, or even only tens of pixels. Moreover, they always operate on a complex and dynamic water surface background composed of sea clutter, waves, solar flares, fog, etc. This places much higher demands on the positioning accuracy, long-term stability, and real-time performance of tracking algorithms than on general target tracking.

[0009] Current harbor video tracking generally adopts a "template matching + dense confidence prediction" technical approach: using the target selected in the first frame as a template, a confidence level of the presence of the target is predicted at each spatial location in subsequent search frames, and then the tracking box is regressed at the peak of the confidence level. Its supervision signal usually relies on a manually preset spatial distribution template, such as superimposing a Gaussian peak or a binary mask at the center of the target to mark where the target is.

[0010] The above-mentioned monitoring methods are effective in general scenarios, but when applied to tracking small targets on harbor ships, the following shortcomings are exposed:

[0011] First, the monitoring objectives are disconnected from the needs of maritime regulation: the manually preset spatial distribution template only guides the network to reproduce a fixed response shape, and does not directly correspond to the indicators that maritime tracking is really concerned with, namely the overlap between the frame and the ground truth (IoU) and the long-term success rate (AUC). The network learns to "draw a beautiful response peak", but this does not mean that it can "accurately frame the ship for a long time".

[0012] Second, the response template fails under small targets: small targets only occupy one or two spatial positions on the feature map. The Gaussian peak radius and the signal-to-noise ratio of the binary mask are extremely low on small targets, and the template can hardly provide effective supervision.

[0013] Third, the dynamic background of the sea surface engulfs the target: interference such as sea clutter, waves, solar flares, water surface reflections, fog and rain and snow often present responses on the feature map that are similar to or even stronger than the appearance of the ship. Dense confidence predictions are easily attracted by background peaks and drift to the crest of waves or reflective spots.

[0014] Fourth, the target frequently disappears and reappears without locking: small boats frequently and briefly disappear due to obstruction by large ships, bridge piers / docks, or being submerged by waves. Existing frame-by-frame prediction lacks explicit optimization for long-term trajectory integrity and re-acquisition capability. Once the target is lost, it is difficult to automatically lock back, which is insufficient to support the actual needs of long-term electronic cruise.

[0015] Fifth, the lack of a task feedback loop: The ultimate goal of maritime tracking is boundary violation determination, trajectory integrity, and re-identification consistency, rather than frame-by-frame reproduction of response templates. Existing methods lack a task-level feedback mechanism.

[0016] In summary, existing port video tracking methods based on template matching and dense confidence prediction suffer from several problems, including a disconnect between the monitoring target and maritime regulatory needs, response template failure under small targets, severe interference from dynamic sea surface backgrounds, difficulty in self-recovery after target loss, and a lack of task feedback loops. These issues make it difficult to meet the actual needs of small vessel target tracking in port monitoring scenarios. Therefore, there is an urgent need for a small vessel target tracking method that can unify training targets with maritime evaluation indicators, is insensitive to sea surface background interference, and possesses long-term tracking stability and self-recovery capabilities after target loss. Summary of the Invention

[0017] To address the shortcomings of existing technologies, this invention provides a method, system, and storage medium for small target tracking of port monitoring vessels based on sea state reward-driven localization. The aim is to model small target localization as a sequential decision-making process on a sea surface feature map. It uses sea state task feedback signals, which integrate frame-level overlap, sequence-level success rate, and sea area recapture feedback, to drive localization strategy learning, replacing manually preset spatial distribution templates. This achieves a unified training objective and maritime regulatory evaluation indicators. Furthermore, it incorporates multi-scale small target decision space, sea surface background suppression coding, same-layer semantic temporal memory transfer, and target loss recapture management. This enhances the robustness, long-term stability, and self-recovery capability of small target tracking in complex dynamic sea environments while also meeting the real-time inference needs of edge devices.

[0018] According to an embodiment of the present invention, a method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning includes the following steps:

[0019] Obtain a template image containing the small target vessel to be tracked and the currently searched image;

[0020] Visual encoding is performed on the template image and the current search image to obtain an initial search feature map; wherein, the initial search feature map is divided into multiple spatial grid positions;

[0021] The initial search feature map is subjected to sea surface background suppression to obtain a background-suppressed search feature map;

[0022] A multi-scale decision space is constructed on the background-suppressed search feature map, where each spatial grid position constitutes a decision option;

[0023] The positioning decision network generates candidate positioning boxes and decision scores for each decision option, and performs softmax normalization on the decision scores to obtain the decision probability; wherein, the positioning decision network is trained by reinforcement learning and uses the sea state task feedback signal as training reward.

[0024] Based on the decision probability, a decision option is selected, and the candidate localization box corresponding to the selected decision option is used as the target tracking result of the current frame.

[0025] Preferably, the template image and the current search image are visually encoded to obtain an initial search feature map, including:

[0026] The template image is divided into blocks and embedded to obtain template code elements, and the current search image is divided into blocks and embedded to obtain search code elements;

[0027] The template code and the search code are concatenated and then input into a multi-layer coding layer for joint self-attention coding, so that the template features and the search image features interact layer by layer, and the initial search feature map is output.

[0028] Preferably, constructing a multi-scale decision space on the initial search feature map specifically includes:

[0029] The initial search feature map includes at least two search feature maps with different resolutions, and the search feature maps with different resolutions correspond to different scales;

[0030] On the search feature map at each scale, each spatial grid location constitutes a decision option with a corresponding scale label; the decision options at all scales and all locations constitute a multi-scale decision space.

[0031] Each scale is equipped with a corresponding positioning decision head, which is used to generate decision scores for decision options at the scale.

[0032] The decision probabilities are obtained by performing cross-scale joint softmax normalization on the decision scores of all decision options across all scales.

[0033] Preferably, each coding layer in the multi-layer coding system corresponds to a semantic level, and the temporal memory of each layer is initialized as a zero vector;

[0034] In the l-th coding layer, the template code, search code, temporal memory of the current frame in the l-th layer and the temporal memory of the previous frame in the l-th layer are concatenated and then input into the l-th coding layer for multi-head self-attention and feedforward network processing to obtain the updated template code, search code, temporal memory of the current frame in the (l+1)-th coding layer and the processed output code of the temporal memory of the previous frame in the l-th layer.

[0035] The processed output code of the l-th layer temporal memory of the previous frame is discarded, and the temporal memory of the (l+1)-th layer of the current frame is retained as the input temporal memory of the (l+1)-th layer coding layer of the current frame, and participates in the processing in the (l+1)-th layer coding layer of the next frame as the temporal memory of the same layer as the previous frame.

[0036] Preferably, the step of performing sea surface background suppression on the initial search feature map to obtain a background-suppressed search feature map includes:

[0037] Obtain typical background feature maps of the sea area based on pre-statistical analysis of sea area images without ships;

[0038] The initial search feature map is concatenated with the typical background feature map of the sea area, and then channel-wise or position-wise suppression weights are generated through convolution and activation functions.

[0039] The initial search feature map is weighted element-wise using the suppression weights to suppress feature responses similar to the sea background, resulting in a background-suppressed search feature map.

[0040] Preferably, the typical background feature map of the sea area is obtained in the following way:

[0041] For fixed cameras, the typical background feature map of the location-dependent sea area is obtained by averaging point by point according to the spatial grid position on the sea area image without ships;

[0042] For PTZ cameras, channel-based statistical mean or variance is used to obtain typical background feature maps of sea areas without ships.

[0043] Preferably, the sea state task feedback signal is calculated using the following formula:

[0044]

[0045] Where t represents the frame number. Let represent the decision option sampled from the decision probabilities in frame t. Let τ represent the decision option sampled from the decision probabilities in the τ-th frame. This represents the candidate localization box corresponding to the sampling decision option in frame t. This represents the truth box of frame t. This represents the candidate localization box corresponding to the sampling decision option in the τth frame. This represents the truth box of the τth frame, where T represents the number of frames in the tracking segment. and For feedback weights, For overlap function, The quantitative metric representing sequence-level trajectory feedback is calculated by the area under the trajectory success rate curve on the tracked segment. This indicates feedback on the recapture of the sea area.

[0046] Preferably, the sea state task feedback signal includes frame-level overlap feedback, sequence-level trajectory feedback, and sea area recapture feedback;

[0047] The frame-level overlap feedback is determined based on the overlap between the candidate location box and the truth box corresponding to the selected decision option in the current frame: when the small target is visible in the t-th frame, the overlap between the candidate location box and the truth box corresponding to the selected decision option in the t-th frame is taken; when the small target is unlocked in the t-th frame, the frame-level overlap feedback is zero.

[0048] The sequence-level trajectory feedback is determined based on the area under the success rate curve of the upsampled trajectory of the tracking segment, and the sampled trajectory is composed of a sequence of candidate localization boxes corresponding to the selected decision options in each frame.

[0049] The sea area recapture feedback is determined based on the positioning overlap when the small target changes from a lost state to a visible state: when the small target is in a lost state in frame t-1 and in a visible state in frame t, the overlap between the candidate positioning box and the ground truth box corresponding to the selected decision option in frame t and the preset gain coefficient are used to determine the value; otherwise, the sea area recapture feedback is zero.

[0050] During the training phase, the visibility of the small ship target is determined based on the ground truth visibility annotation, which is used to indicate whether the small ship target is occluded or has left the field of view.

[0051] Preferably, the sea area recapture feedback is calculated using the following formula:

[0052]

[0053] Where t is the frame number. The visibility marker for the target vessel in frame t. This indicates that the target vessel is out of lock. This indicates that the target vessel is visible. and This indicates that the target vessel transitions from a lost-lock state to a visible state in frame t, where frame t is the recapture frame. The decision option selected for frame t; The candidate localization box corresponding to the decision option selected in frame t; This is the truth box for frame t. γ is the overlap function; γ is a preset gain coefficient greater than 1. For indicator functions, This is a comprehensive feedback signal.

[0054] Preferably, the area under the trajectory success rate curve is calculated in the following way:

[0055] In the tracking segment, each frame in the tracking segment is scanned with different overlap thresholds. The proportion of frames with the overlap between the candidate localization box and the ground truth box greater than or equal to the current overlap threshold is counted as the proportion of successful frames. The success frame proportion curve under each overlap threshold is obtained. The area under the trajectory success rate curve is obtained by integrating the success frame proportion curve over the overlap threshold interval.

[0056] Preferably, the localization decision network includes a bounding box regression head and a localization decision head, wherein the bounding box regression head is used to generate candidate localization boxes for each decision option, and the localization decision head is used to generate a decision score for each decision option;

[0057] The training process includes a pre-positioning calibration phase and a strategy co-optimization phase.

[0058] In the pre-localization calibration stage, the spatial grid positions corresponding to the ground truth target center on the feature map at each scale are used as the supervision positions of the bounding box regression heads at each scale. The sum of the generalized overlap (GIoU) ​​and L1 norm between the candidate localization boxes and the ground truth boxes at each scale supervision position is used as the calibration loss of the bounding box regression heads at each scale. The parameters of the bounding box regression heads at each scale are updated respectively. After calibration, the parameters of the bounding box regression heads at each scale are frozen.

[0059] During the strategy co-optimization phase, the positioning decision head is trained using reinforcement learning based on the sea state task feedback signal, with a state evaluation baseline, through a strategy gradient method.

[0060] Preferably, the positioning decision network further includes a state evaluation head, which is used to output a state evaluation value. During the training phase, the difference between the sea state task feedback signal of the current frame and the state evaluation value is calculated as an advantage signal; a policy loss is constructed based on the advantage signal to update the parameters of the positioning decision head; and a state evaluation loss is constructed based on the difference between the state evaluation value and the sea state task feedback signal to update the parameters of the state evaluation head.

[0061] Preferably, the strategy co-optimization is performed on a tracking segment consisting of T consecutive frames, with one decision option sampled from the decision probabilities in each frame;

[0062] The advantage signal Calculate according to the following formula: ;

[0063] In the formula, This is the sea state mission feedback signal for frame t. This is the state evaluation value for frame t;

[0064] The strategy loss Calculate according to the following formula: ;

[0065] In the formula, The dominant signal is for the t-th frame. For the decision options sampled in frame t, Let be the probability value of the decision option sampled in frame t, corresponding to the decision probability. The search feature map for frame t after background suppression;

[0066] The state assessment loss Calculate according to the following formula: ;

[0067] In the formula, Let be the state evaluation value for frame t. The sea state mission feedback signal for the t-th frame;

[0068] The training process aims to minimize the total loss, which is: ;

[0069] In the formula, β is the preset strategy-evaluation balance weight, and β=0.5.

[0070] Preferably, each scale is equipped with a state evaluation head, and the state evaluation head is also used to predict the state evaluation map of each spatial grid position at the corresponding scale;

[0071] The state evaluation value is obtained by performing cross-scale spatial average pooling on the state evaluation maps at each scale.

[0072] Preferably, the state evaluation head is used only during the training phase; during the inference phase, the state evaluation head is removed, and the sea state task feedback signal is not calculated. The decision option with the highest probability is determined based on the decision probability, and the corresponding candidate localization box is output; when the search feature map includes search feature maps of at least two scales, the state evaluation head corresponding to each scale is removed during the inference phase.

[0073] Preferably, selecting a decision option based on the decision probability includes:

[0074] During the training phase, decision options are sampled according to the stated decision probabilities;

[0075] During the reasoning phase, the decision option with the highest probability is selected.

[0076] Preferably, it also includes loss-of-lock recapture management:

[0077] During the inference phase, the maximum value of the original decision score of each decision option in the current frame before softmax normalization is mapped by the sigmoid function to obtain the tracking confidence.

[0078] When the tracking confidence is lower than a preset low threshold and remains at a preset number of frames, it is determined that the small target is lost. The target tracking result of the previous frame is used as the output of the current frame, or the result of extrapolation of the preset motion model is used as the output of the current frame, and the search area is expanded by increasing the search area magnification factor.

[0079] When the tracking confidence level rises above the preset high threshold again after a loss of lock, a successful re-capture is determined, and normal tracking is resumed.

[0080] Preferably, after acquiring the template image and the current search image of the small target vessel to be tracked, the method further includes sea state data enhancement; wherein, at least one of the following enhancement processes is performed on the template image, the current search image, or the search block cropped from the current search image: horizontal flipping, brightness jittering, sea fog simulation enhancement, water surface flare simulation enhancement, and surge jittering enhancement.

[0081] Preferably, the sea fog simulation enhancement includes superimposing the image to be enhanced with a fog density map using a random mixing coefficient; the water surface flare simulation enhancement includes superimposing bright stripe noise in the waterline region of the image to be enhanced; and the surge jitter enhancement includes applying an affine perturbation to the image to be enhanced.

[0082] Preferably, after obtaining the current search image, the method further includes:

[0083] Based on the pre-calibrated shoreline mask, the current search image is cropped to remove fixed areas of land or docks;

[0084] The template image is obtained by cropping the initial frame of the tracking start frame. The tracking start frame is a frame that is manually selected or a frame that provides the initial frame of the target ship in conjunction with radar and the Automatic Identification System (AIS).

[0085] Preferably, the method further includes: comparing the center position of the tracking box in the target tracking result with the pre-marked no-navigation area; when the center position enters the no-navigation area, generating a boundary crossing alarm and reporting it to the maritime supervision platform.

[0086] On the other hand, according to embodiments of the present invention, a small target tracking system for harbor monitoring vessels based on sea state reward-driven positioning is also provided, comprising:

[0087] The image acquisition module is used to acquire a template image containing the small target vessel to be tracked and the currently searched image;

[0088] A visual encoding module is used to visually encode the template image and the current search image to obtain a search feature map with background suppression; wherein, the search feature map is divided into multiple spatial grid positions;

[0089] A decision space construction module is used to make each spatial grid location a decision option on the search feature map;

[0090] The decision generation module is used to generate candidate positioning boxes and decision scores for each decision option through a positioning decision network, and to perform softmax normalization on the decision scores to obtain the decision probability; wherein, the positioning decision network is trained by reinforcement learning and uses the sea state task feedback signal as the training reward.

[0091] The result output module is used to select a decision option based on the decision probability and use the candidate positioning box corresponding to the selected decision option as the target tracking result of the current frame.

[0092] In another aspect, according to embodiments of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the small target tracking method for harbor monitoring vessels based on sea state reward-driven positioning as described in any of the above technical solutions.

[0093] Compared with the prior art, the present invention has the following beneficial effects:

[0094] First, this invention explicitly models the localization of small targets on sea surface feature maps as a sequential decision-making process. The sea state task feedback signal is composed of three parts: frame-level overlap feedback, sequence-level trajectory feedback, and sea area recapture feedback. This feedback is used as a training reward for reinforcement learning, enabling the localization decision network to directly iterate its strategy based on indicators of practical interest to maritime regulators. This eliminates the target mismatch defects caused by manually preset spatial distribution templates in existing technologies. The trained strategy can adaptively select candidate localization locations. In the complex sea surface background of ports, the box selection accuracy, trajectory continuity, and long-term tracking success rate of small targets are significantly better than the traditional template matching combined with dense confidence prediction route.

[0095] Second, the invention obtains typical background feature maps of the sea area by pre-statistically analyzing images of empty sea areas without ships, and then generates channel-wise or position-wise suppression weights based on these features using a gating mechanism. This allows for adaptive attenuation of high-response interference similar to the sea area background in the current search feature map. Background components such as sea clutter, solar flares, and water surface reflections, which are similar to or even stronger than the ship's response, are significantly suppressed. This prevents the positioning decision process from being disturbed by the dynamic background of the sea surface, effectively overcoming the shortcomings of existing technologies where the tracking box drifts to wave crests or reflective spots, and significantly improving the positioning robustness and target background resolution under complex sea conditions.

[0096] Third, this invention derives multi-level search feature maps of different resolutions from different layer depths of the encoder, forming a multi-scale small target decision space. Through cross-scale joint normalization, all scales and spatial locations compete within the same probabilistic framework. This allows small boats to be precisely located at a high-resolution scale, while large ships are quickly locked at a low-resolution scale. This scale division of labor is automatically learned during training from sea state feedback signals. This mechanism significantly expands the candidate positioning locations while improving the precision and robustness of positioning. Furthermore, each scale positioning head uses lightweight convolutions, incurring almost no additional inference computation burden.

[0097] Fourth, this invention determines lock loss and recapture online by tracking confidence levels, and combines recapture feedback to form a closed loop of lock loss perception, freeze extrapolation, and recapture feedback. This significantly enhances the self-recovery capability of small targets under complex sea conditions such as obstruction and surges, effectively improving the reliability of continuous tracking in long-term electronic patrol scenarios in ports. Simultaneously, the temporal memory between each coding layer is only transferred frame-by-frame within the same layer, discarding old output symbols, ensuring that the number of symbols carried within a frame does not increase linearly with the number of coding layers. The dedicated state evaluation head and sea state task feedback calculation module used in the training phase are removed in the inference phase, enabling the model to meet real-time inference requirements on port edge computing boxes and smart cameras, achieving the aforementioned performance improvements while also considering the feasibility of engineering deployment. Attached Figure Description

[0098] Figure 1 A flowchart illustrating the steps of a small target tracking method for a harbor monitoring vessel based on sea state reward-driven positioning provided by this invention;

[0099] Figure 2 This invention provides a framework diagram of a small target tracking system for a harbor monitoring vessel based on sea state reward-driven positioning. Detailed Implementation

[0100] 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 in conjunction with specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0101] This invention provides a small target tracking method for harbor monitoring vessels based on sea state reward-driven localization, comprising an online inference phase and an offline training phase. The online inference phase includes video input and sea state preprocessing, visual encoding, multi-scale localization decision-making, target lock-loss re-acquisition and confidence management, and monitoring linkage, executed frame-by-frame. The offline training phase, building upon the visual encoding and multi-scale localization decision-making described in the online inference phase, further includes sea state task feedback calculation, pre-localization calibration, and policy co-optimization, used to train the localization decision network. The sea state task feedback signal and state evaluation value are only used for policy optimization during the training phase and are removed during the inference phase to avoid introducing additional computational burden.

[0102] In the description of this invention, "small vessel target" refers to a vessel target on the water surface with a small pixel ratio in the monitoring screen (usually less than 1% of the screen area, or even only tens of pixels), including but not limited to small speedboats, rubber boats, unlicensed barges, pilot boats, tugboats, workboats, lifeboats, and small-scale water surface targets such as people who have fallen into the water and drifting objects. "First," "second," etc. are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0103] The following detailed description is based on specific embodiments.

[0104] Example 1

[0105] like Figure 1 As shown in the figure, this invention proposes a small target tracking method for harbor monitoring vessels based on sea state reward-driven localization. The method models the localization of small targets as a sequential decision-making process on a sea surface feature map, using sea state task feedback signals to drive policy learning, replacing existing manual spatial distribution templates. The method includes the following steps:

[0106] Obtain a template image containing the small target vessel to be tracked and the currently searched image;

[0107] Visual encoding is performed on the template image and the current search image to obtain an initial search feature map; wherein, the initial search feature map is divided into multiple spatial grid positions;

[0108] The initial search feature map is subjected to sea surface background suppression to obtain a background-suppressed search feature map;

[0109] A multi-scale decision space is constructed on the background-suppressed search feature map, where each spatial grid position constitutes a decision option;

[0110] The positioning decision network generates candidate positioning boxes and decision scores for each decision option, and performs softmax normalization on the decision scores to obtain the decision probability; wherein, the positioning decision network is trained by reinforcement learning and uses the sea state task feedback signal as training reward.

[0111] Based on the decision probability, a decision option is selected, and the candidate localization box corresponding to the selected decision option is used as the target tracking result of the current frame.

[0112] In the specific implementation process, the real-time bitstream output from fixed cameras or pan-tilt cameras in the harbor is received. Each frame RGB image and Simultaneously, it receives the initial bounding box of the target ship or small target provided by manual selection of the first frame or by the linkage of radar and Automatic Identification System (AIS). The initial bounding box is composed of normalized coordinates, consisting of the coordinates of the top left corner and the bottom right corner.

[0113] First, based on the pre-marked shoreline mask The process involves cropping to remove fixed land or dock areas from the original image frames. A pre-calibrated binary mask is used to distinguish between water and land areas in the image. Because in existing technologies, the entire monitoring image is fed into the encoder, the continuous frame-by-frame response of fixed areas such as land, docks, and buildings can interfere with the localization of small targets like boats. Therefore, this step narrows the search range to the water area, reducing the amount of irrelevant background entering the search region, lowering the computational load, and thus improving the robustness of distinguishing between targets and background.

[0114] Secondly, construct template images. With search image sequence Centered on the target tracking result of the previous frame or the initial bounding box of the tracking start frame, within the original image frame after cropping the region of interest in the sea area, within the water area defined by the pre-calibrated shoreline mask, magnification is applied according to the first preset factor. Second preset amplification factor The template region and the search region are cropped to obtain the template image and the current search image, respectively, where the first preset magnification factor is used. For example, the value can be 1.5 to 2.5 (e.g., 2), and the second preset amplification factor is... Examples include 3 to 6 (e.g., 4). The template image is scaled to 128×128 resolution, and the current search image is scaled to 256×256 resolution. The tracking starts with the frame that provides the initial frame of the target vessel, either manually selected or through a combination of radar and AIS (Automatic Identification System). Existing technologies using the entire high-resolution original image frame-by-frame for tracking incur high inference overhead and are sensitive to changes in the gimbal's viewing angle. This step crops and scales the target prediction frame within a limited water area to a fixed resolution, ensuring the target remains near the center of the search area, balancing positioning accuracy and processing speed.

[0115] During the training phase, sea state data augmentation is also performed on the template image, the current search image, or a search patch cropped from the current search image, including at least one of the following augmentation processes:

[0116] Horizontal flip: Mirror the image to be enhanced horizontally along the vertical central axis.

[0117] Brightness jitter applies random brightness offsets to the pixel channel values ​​of the image to be enhanced to simulate changes in lighting at dawn, dusk, or night.

[0118] Sea fog simulation enhancement involves superimposing the image to be enhanced with a fog density map using random mixing coefficients, and then adding Gaussian white fog to the image using the following formula to simulate a sea fog scene:

[0119]

[0120] in, The image to be enhanced is either the template image, the current search image, or a search block cropped from the current search image. For the enhanced image, This is a Gaussian fog concentration graph. The fog enhancement mixing coefficient is randomly selected from the range of 0.4 to 1.0.

[0121] Water flare simulation enhancement involves randomly superimposing bright stripe noise within the waterline region of the image to be enhanced to simulate solar reflection.

[0122] The surge jitter is enhanced, and a small affine perturbation is applied to the search block to simulate the ship's attitude changes in the waves.

[0123] If common sea state disturbances such as sea fog, water surface glare, and wave surges are not adequately covered in the training data, the model's generalization ability will significantly decrease. This step performs data augmentation by simulating multiple types of sea state disturbances, allowing the model to be fully exposed to the image distribution corresponding to complex sea states during the training phase, thereby improving its sea state generalization ability.

[0124] Example 2

[0125] This embodiment describes the implementation of a small target tracking method for harbor monitoring vessels based on sea state reward-driven positioning in the online tracking phase, specifically the implementation of visual encoding, multi-scale positioning decision-making, target lock-loss re-acquisition and confidence management, and regulatory linkage in the inference phase.

[0126] Visual encoding is performed by a visual encoder. The visual encoder employs a hierarchical visual Transformer structure. This backbone network is pre-trained on massive amounts of maritime video data and offers three configuration levels (large, medium, and small) to accommodate varying edge computing power requirements. Its processing procedure is as follows:

[0127] The input for visual encoding includes a template image. Current search image and the sequential memory of the previous frame at the same level L represents the number of coding layers.

[0128] The visual encoding backbone adopts a hierarchical visual backbone pre-trained on massive maritime videos, providing three configurations: large, medium, and small, denoted as SeaLoc-L256, SeaLoc-B256, and SeaLoc-T256, respectively. Its three-level hierarchical structure provides search features with three resolutions: 32×32, 16×16, and 8×8, corresponding to strides of 8, 16, and 32, to adapt to different edge computing power.

[0129] Visual encoding first performs block embedding. Using the visual stem structure of the Visual Transformer, the template image is... With the current search image The image is divided into several blocks, and linearly projected into serialized symbols to obtain the initial symbols of the template. With search initial code elements The finest step size is 8, which generates 32×32 symbols at a resolution of 256, and then downsamples to 16×16 and 8×8 levels. Block embedding compresses the pixel-level image into semantic units that can be processed by self-attention, while preserving the spatial arrangement. Each symbol corresponds to a spatial grid position on the search feature map, and the subsequent localization decision network makes localization decisions point by point based on these spatial grid positions.

[0130] Then, joint hierarchical encoding is performed to obtain the initial search feature map. The template code and search code are concatenated and fed into a multi-layer encoding system for joint self-attention encoding. Each encoding layer corresponds to a semantic level and includes multi-head self-attention and a feedforward network. Semantic temporal memory transfer within the same layer is performed during the encoding process. It should be noted that the search feature maps at each level directly output by the joint hierarchical encoding are the initial search feature maps. These initial search feature maps are divided into multiple spatial grid locations, which may contain high-response background interference such as sea clutter, solar flares, and water surface reflections. After sea surface background suppression processing, they are used to construct the multi-scale decision space.

[0131] Before the encoding of each frame begins, the temporal memory of each layer of that frame is initialized to a zero vector; the temporal memory of the remaining layers is obtained by updating the output of the next lower-level encoding layer layer by layer during the encoding process of this frame. In the l-th encoding layer, the template code of the current frame in the l-th layer, the search code of the current frame in the l-th layer, the temporal memory of the current frame in the l-th layer, and the temporal memory of the previous frame in the l-th layer are concatenated and input into the l-th encoding layer, that is:

[0132]

[0133] After processing by the l-th coding layer, the following is obtained:

[0134]

[0135] in, For the first Layer coding layer, For the template code of the l-th layer of the current frame, For the search codewords of the l-th layer of the current frame, This is the temporal memory of the l-th layer of the current frame. This is the temporal memory of the lth layer of the previous frame. For the updated template code of the (l+1)th layer of the current frame, For the search codewords of the (l+1)th layer of the updated current frame, For the updated temporal memory of the (l+1)th layer of the current frame, This is the output symbol of the l-th layer temporal memory of the previous frame after processing.

[0136] The processed output symbols of the l-th layer temporal memory of the previous frame Discard; store the temporal memory of the (l+1)th layer of the current frame. It is retained as the input temporal memory of the layer after the (l+1)th layer in the current frame, and participates in the processing as the same-layer temporal memory of the (l+1)th layer in the next frame.

[0137] This embodiment employs a single-branch joint coding network. Template symbols and search symbols are concatenated and fed into the same set of self-attention layers for joint processing, while non-template and search symbols follow independent branches. Each layer uses self-attention to repeatedly compare the ship-shaped appearance of the template with the candidate positions in the search region, refining feature responses similar to the target ship layer by layer. This allows the target appearance information and search region information to be fully integrated at each layer, helping to distinguish the target ship from background interference. Furthermore, directly injecting the high-level semantic memory from the deep layers of the previous frame into the shallow layers of the current frame would cause semantic mismatch, forcing the high-level ship shape semantics to interact with low-level edge texture features, thus interfering with the features of small targets. This embodiment uses same-layer semantic propagation, ensuring that shallow and deep layers only interact with their own layer's history. Each semantic level maintains independent cross-frame memory, avoiding semantic mismatch and improving the consistency of cross-frame feature propagation for small targets under surge and reflective interference. Discarding the processed output symbols from the previous frame's temporal memory ensures that the number of symbols carried within a frame does not increase linearly with the number of coding layers. This makes the computational load during inference only related to the current frame itself, and does not continuously increase due to the accumulation of historical frames. The default temporal memory capacity is [value missing]. Simplified model During inference, the historical state is obtained from the encoding of the previous frame, without adding extra computational overhead.

[0138] The hierarchical backbone outputs first-level search code elements at three levels: 32×32, 16×16, and 8×8, which are then rearranged into initial search feature maps for the corresponding resolutions. , where scale index ,and , (Increasing scale corresponds to decreasing resolution), for example, taking , , In the single-scale case, the intermediate level, i.e., the first level with a stride of 16×16, is used as the initial search feature map by default. The search feature map output by the shallow coding layer tends to encode edge and texture features such as ship hull lines and wave patterns, while the search feature map output by the deep coding layer tends to encode ship shape and semantic features such as the overall ship outline. The three-level features provide layered feature sources of different resolutions for downstream multi-scale decision-making.

[0139] It should be noted that, for ease of description, this embodiment uses a single-scale default path notation when describing the localization decision network, sea surface background suppression gating, and training feedback calculation: that is, the intermediate level (the level with a spatial resolution of 16×16) feature map is used as the working scale by default, denoted as:

[0140] , , ;

[0141] The formulas remain unchanged, where 's' is the index of the intermediate scale mentioned above. When multi-scale joint decision-making is required, simply restore the symbols with omitted scale subscripts to the form with scale 's' (e.g., ...). , , This is sufficient; subsequent formulas such as multi-scale joint softmax normalization are then expanded accordingly.

[0142] Next, sea surface background suppression is performed on the initial search feature map to obtain the background-suppressed search feature map. Sea surface background suppression is a weighted processing of the initial search feature map obtained from visual encoding. The processed search feature map is the background-suppressed search feature map. The two have the same dimension, the only difference being whether they have undergone weighted processing with sea surface background suppression gating.

[0143] By pre-statistically analyzing the feature distribution of airspace and sea area images without ships, a typical background feature map of the sea area with the same dimension as the search feature map is obtained. For fixed cameras, point-by-point averaging based on spatial location is used on images of sea areas without ships to obtain a location-dependent typical background feature map. For pan-tilt cameras, channel-statistical typical background feature maps are obtained by statistically analyzing the mean or variance of each channel on images of sea areas without ships. During the operation, the initial search feature map is... Typical background feature map of the corresponding scale of the sea area Channel concatenation is performed, followed by 1×1 convolution and sigmoid activation to generate channel-wise or position-wise suppression weights. These suppression weights are then used to multiply the initial search feature map element-wise to suppress feature responses similar to the marine background, resulting in a background-suppressed search feature map. This process can be represented as:

[0144]

[0145] in, For the initial search feature map, This is the search feature map after background suppression. Indicates channel splicing. This indicates element-wise multiplication. It is the sigmoid activation function. It is a 1×1 convolution.

[0146] Sea clutter, solar flares, and water surface reflections often generate feature responses similar to or even stronger than those of a ship. Conventional encoding can misclassify high background responses as targets, causing the tracking box to drift onto wave crests or reflective spots. This embodiment utilizes pre-collected typical sea area background feature maps and learns suppression weights from the differences between current features and prior background through 1×1 convolutions and sigmoid gating after channel splicing. Feature responses more similar to the typical sea area background feature map have suppression weights closer to 0 and are attenuated more strongly; feature responses more similar to ship targets have suppression weights closer to 1 and are preserved more completely. This mechanism achieves significant suppression of dynamic sea surface backgrounds with relatively low computational cost. In multi-scale scenarios, background suppression is applied to the initial search feature maps at each scale separately to obtain background-suppressed search feature maps at each scale. As an alternative implementation, background suppression can also be applied uniformly within the encoding backbone, i.e., uniform gating of features at each scale during the joint hierarchical encoding process.

[0147] Furthermore, a multi-scale decision space is constructed on the background-suppressed search feature map, and the decision results are output by the localization decision network. It should be noted that the construction of the aforementioned multi-scale decision space, as well as the generation of candidate localization boxes and decision scores, are all based on the background-suppressed search feature map, thereby ensuring that the decision-making process is not affected by the dynamic background of the sea surface.

[0148] The localization decision network consists of three parallel lightweight convolutional heads: a bounding box regression head, a localization decision head, and a state evaluation head. Each convolutional head is a lightweight structure with 5 layers of convolutions, normalization, and activation functions cascaded together. The kernel size is 3×3, and the stride is 1. The input is a search feature map after background suppression. In the single-scale case, it is a search feature map with an intermediate resolution of 16×16. In the multi-scale case, it is a search feature map with three resolutions: 32×32, 16×16, and 8×8. The output is the candidate bounding box, decision probability, and state evaluation value for each decision option.

[0149] It should be further explained that, in terms of functional implementation, the aforementioned process of making each spatial grid position a decision option on the search feature map after background suppression and generating candidate localization boxes for each decision option is implemented by the decision space construction function in the localization decision network; the aforementioned process of generating decision scores for each decision option through the localization decision network is implemented by the decision generation function in the localization decision network. In the system embodiment, the corresponding functional modules are the decision space construction module and the decision generation module, respectively. In terms of specific hardware implementation, they can be integrated into the same processing chip or implemented by different processing units. This embodiment does not limit this.

[0150] In the single-scale case, the frame regression head Used to generate candidate bounding boxes for each decision option, each spatial grid location. This corresponds to a decision option. The bounding box regression head searches for each spatial grid position on the feature map. Predicted candidate bounding boxes:

[0151]

[0152] in, Candidate bounding boxes; This is the search feature map after background suppression in the single-scale case. , representing the normalized coordinates of the candidate bounding box corresponding to the spatial grid position, with the top-left corner coordinates. and the coordinates of the bottom right corner This is used to give the shape of the positioning frame for predicting the target ship at that location.

[0153] Positioning Decision Head This is used to generate decision scores for each decision option. The decision scores are raw scores without softmax normalization. Softmax normalization is applied to the decision scores of each decision option to obtain the decision probability. In the single-scale case, the decision probability is calculated as follows:

[0154]

[0155] in, Spatial grid position Corresponding decision options; The decision score for this decision option is... H and W represent the height and width of the search feature map, respectively, and the decision space is formed by the decision options for all spatial grid locations.

[0156] In the single-scale case, each spatial grid location on the search feature map represents a localization decision option. Localization is modeled as a decision across all spatial grid locations, rather than a fixed response shape as in traditional dense confidence prediction. This allows localization decisions to directly use maritime assessment metrics as optimization objectives. (State assessment head) Used to output the state evaluation value, which is obtained by spatial average pooling from the state evaluation graph output from the state evaluation header:

[0157]

[0158] in, The state evaluation head is used to estimate the expected return under the current sea state, serving as a baseline for policy learning to reduce gradient variance.

[0159] In multi-scale scenarios, each scale is configured with a frame regression head, a localization decision head, and a state assessment head.

[0160] If the aforementioned bounding box regression head, localization decision head, and state evaluation head are to default to operating on the intermediate-level (stride 16) single-resolution search feature map of the visual encoder (when the search resolution is 256×256, its spatial size is H×W=16×16), then there is a significant deficiency for small targets such as port ships. Since the pixel proportion of small targets such as port ships is usually less than 1% of the entire image, they often only cover 1 to 2 spatial locations on a 16×16 feature map. This leads to two problems: First, there are too few candidate localization locations. The small target occupies almost only one point on the feature map, and the "selection range" for localization decision is extremely small. Once a small deviation occurs, it will cause the entire bounding box to shift, limiting the localization accuracy and robustness. Second, the single receptive field is difficult to match the scale of small targets. The receptive field of the intermediate-level feature map is relatively large and has strong semantic information, but the spatial resolution is relatively coarse. Although it is beneficial for locking larger ships, it is difficult to provide sufficiently fine localization coordinates for small targets with a size of only tens of pixels.

[0161] To address this, this invention adds a multi-scale hierarchical decision space to the single-scale decision space. Utilizing the hierarchical structure of the visual encoder (high resolution and small receptive field in shallow layers, and low resolution and large receptive field in deeper layers), multiple search feature maps of different resolutions are derived from different depths. Each feature map is connected to a complete set of three heads: "box regression / localization decision / state evaluation," and all spatial locations at all scales are uniformly incorporated into the same set of decision options. The core idea is that small targets are precisely localized at a high-resolution scale (providing more candidate locations and finer spatial grids), while large targets are quickly locked at a low-resolution scale (providing a larger receptive field and stronger semantics). Cross-scale joint normalization enables competition among scales within the same probabilistic framework, ultimately learning the division of labor—"small boats rely on high-resolution scales, large boats rely on low-resolution scales"—from the feedback signal. This mechanism significantly expands the number of candidate localization locations for small targets without significantly increasing inference computation (each scale head is a lightweight convolution, and the state evaluation head is removed during the inference stage), making it one of the core designs of this embodiment for small targets in harbors.

[0162] In the multi-scale scenario, at each spatial grid location on the search feature map after background suppression at each scale. This constitutes a decision option with corresponding scale labels. .

[0163] Decision options at all scales and locations constitute a multi-scale decision space:

[0164]

[0165] The cardinality of the multi-scale decision space, i.e., the total number of candidate decision options, is Compared to the height and width of a single-scale search feature map With significantly increased scale, small targets can obtain a multiple increase in candidate positioning locations at the highest resolution scale. Due to the presence of scale labels, positions with the same coordinates at different scales are treated as different decision options, avoiding scale confusion.

[0166] The positioning decision head corresponding to each scale generates decision scores for each decision option at that scale s. Cross-scale joint softmax normalization is performed on the decision scores of all decision options across all scales to obtain a unified decision probability. The cross-scale joint softmax normalization is calculated using the following formula:

[0167]

[0168] in, The corresponding decision options, This represents the decision score for the decision option, where S is the total number of scales. and respectively scale The height and width of the search feature map.

[0169] It should be noted that when the total number of scales S=1, multi-scale decision-making... Degenerates into a single-scale decision score The multi-scale decision space degenerates into a single-scale decision space. Decision scores at each scale are not normalized individually, but rather uniformly normalized across scales, ensuring competition across all scales and locations under the same probability distribution. Consequently, during training, the model adaptively weighs each scale using sea state task feedback signals. When smaller targets are more likely to receive high-overlap feedback at a high-resolution scale, the decision score for that scale is boosted, naturally leading to a preference for high-resolution target localization. Conversely, larger targets tend to be localized at lower resolution scales. This scale competition and feedback-driven mechanism eliminates the need for manual specification of multi-scale division of labor, as it is adaptively learned from sea state task feedback signals.

[0170] During the training phase, decision options are sampled according to decision probabilities. The sampled decision options in the multi-scale case are denoted as follows: This involves the joint selection of spatial grid location coordinates and scale labels; during the inference phase, the decision option with the highest multi-scale decision probability is selected. , The optimal decision location selected during inference; output the candidate bounding box for the corresponding scale and location of this decision option. This serves as the target tracking result for the current frame.

[0171] In the multi-scale case, the state evaluation value is obtained as follows: the state evaluation head at each scale predicts the state evaluation map for each spatial grid location at the corresponding scale, and the state evaluation maps at each scale are merged by cross-scale spatial average pooling to obtain the scalar state evaluation value. As an alternative implementation, the state evaluation value corresponding to the scale where the selected decision option is located can also be directly taken as the state evaluation value of the frame.

[0172] During the inference phase, after obtaining the target tracking results, further execution is performed on target re-capture and confidence management:

[0173] Inputs include: the highest decision score in the current frame. (From the localization decision head, which is the only available source during inference), truth visibility annotations during training. The previous frame output box during inference ;

[0174] Output includes: visibility flags With tracking confidence .

[0175] During the inference phase, the tracking confidence level is determined by the following formula: ;

[0176] The tracking confidence score is obtained by mapping the maximum value of the original decision score of each decision option in the current frame before softmax normalization to the sigmoid function.

[0177] This embodiment uses the original decision score before softmax normalization, rather than the normalized decision probability, to calculate the tracking confidence. The reason is that in a multi-scale decision space, the total number of multi-scale decision options can reach thousands. After normalization, the probability of a single decision option is too small, and its maximum value is difficult to compare with a fixed threshold. The original decision score, however, is not diluted by the total number of decision options, and after being mapped to the interval 0 to 1 by sigmoid, it can be stably compared with the threshold. Tracking Confidence Only the raw decision values ​​from the positioning decision head are derived, without using the state evaluation values ​​output by the state evaluation head. The reason is that the state evaluation head is only used as a dominant baseline during the training phase, and is removed along with the state evaluation head during the inference phase; if the tracking confidence depends on the state evaluation value, it cannot be calculated during the inference phase. This ensures that the lock loss and recapture decisions can be performed independently during the inference phase.

[0178] Visibility Mark The determination is divided into training mode and inference mode.

[0179] In training mode, truth value visibility labels are directly taken. As a sign of visibility It does not rely on tracking confidence. This ensures the objectivity of visibility markers in the feedback signal and avoids circular dependencies caused by using the confidence level of the trained signal to define the training reward.

[0180] In inference mode, when tracking confidence Below the preset low threshold For example, 0.2, and continuously maintain a preset number of frames. For example, at frame 5, it is determined that the small target on the ship has lost lock. At this point, the output box is frozen, and the target tracking result of the previous frame is used as the output of the current frame, or the result extrapolated from the preset motion model is used as the output of the current frame. The cropping range of the next frame's search image is expanded by increasing the search region magnification factor. For example, the magnification factor is increased... Increased to 6 to prepare for recapture; track confidence after lock loss. Again exceeding the preset high threshold For example, if the value is 0.5, then capture is considered successful. Normal tracking has resumed.

[0181] Thus, the target loss and recapture, along with the recapture feedback in the confidence management and sea state task feedback calculation, form a closed loop of sensing loss, freezing extrapolation, and recapture feedback: during the training phase, the recapture feedback learns to recapture based on the truth visibility labeling-driven strategy; during the inference phase, the tracking confidence determines loss and recapture online, achieving self-recovery from loss during long-term tracking.

[0182] In inference mode, the visibility flag of the output. With tracking confidence Report to the maritime regulatory platform together; in training mode, the visibility indicator is... It is also fed into the recapture feedback calculation in the sea state task feedback calculation.

[0183] In terms of regulatory coordination, when the center of the tracking box in the target tracking result enters the pre-marked no-navigation area, i.e., the no-navigation polygon or warning polygon, a boundary crossing alarm is generated and reported to the maritime supervision platform; when a loss of lock or recapture event occurs, it is also reported through the maritime supervision platform.

[0184] The removal of the state evaluation head and the omission of sea state task feedback signals during the inference phase are based on the real-time inference requirements of edge cameras or edge computing boxes. Sea state task feedback signals and state evaluation values ​​are only used for training and do not require computational resources during inference. Simultaneously, the computational load of the multi-scale localization decision head does not increase with the accumulation of historical frames; although training is performed on video clips, there is no additional overhead during testing. To verify edge real-time performance, the inference speeds of the three models on an NVIDIA RTX 4090 are approximately 91 FPS for SeaLoc-T256, approximately 50 FPS for SeaLoc-B256, and approximately 32 FPS for SeaLoc-L256. SeaLoc-T256 can also run at approximately 21 FPS on an Intel i9 CPU and approximately 32 FPS on a Jetson AGX, meeting the deployment requirements of harbor edge computing boxes and smart cameras.

[0185] Example 3

[0186] This embodiment provides a specific implementation of sea state task feedback calculation during the training phase, as well as pre-positioning calibration and policy co-optimization. During the training phase, based on visual encoding, sea surface background suppression, and the positioning decision network, the sea state task feedback signal is further calculated, and the positioning decision network undergoes two-stage training. The sea state task feedback signal includes three parts: frame-level overlap feedback, sequence-level trajectory feedback, and sea area reacquisition feedback.

[0187] Existing technologies use manually preset spatial distribution templates as monitoring signals, which only guide the network to reproduce fixed response shapes. This is disconnected from the overlap and long-term success rate that are of concern in actual maritime supervision. As a result, although the network can draw response peaks with good shapes, it may not be able to accurately frame the target ship for a long time. To overcome this deficiency, this embodiment unifies the training objectives with actual maritime evaluation indicators, and quantifies the sea state task feedback signals, namely, maritime evaluation indicators such as frame-level overlap, sequence-level success rate, and recapture success rate.

[0188] The sea state mission feedback signal is calculated using the following formula:

[0189]

[0190] Where t represents the frame number. This represents the decision option sampled from the decision probabilities in frame t, in the multi-scale case. , Let τ represent the decision option sampled from the decision probabilities in the τ-th frame. This represents the candidate localization box corresponding to the sampling decision option in frame t. This represents the truth box of frame t. This represents the candidate localization box corresponding to the sampling decision option in the τth frame. This represents the truth box of the τth frame, where T represents the number of frames in the tracking segment. and For feedback weights, the default value is... ; For overlap function, A quantitative indicator representing sequence-level trajectory feedback. This indicates feedback on the recapture of the sea area.

[0191] The target visibility flags used in this embodiment are provided by the target loss and recapture and confidence management stage, i.e., from the truth value visibility label sequence or the tracking confidence determination in the inference stage. Determining the visibility flags from the truth value visibility labels during the training stage ensures that the target state on which the feedback signal is based is an objective truth value, and that the sea state task feedback signal is unbiased.

[0192] Frame-level overlap feedback is determined based on the overlap between the candidate bounding box and the ground truth bounding box corresponding to the selected decision option in the current frame. The overlap is calculated using the following formula:

[0193]

[0194] When the small target on the ship is visible in frame t. Take the overlap between the candidate localization box and the ground truth box corresponding to the selected decision option in frame t; when the small target is in an unlocked state in frame t. The frame-level overlap feedback is set to zero. Frame-level overlap feedback provides immediate feedback on the quality of the current frame and is set to zero when the target is lost, thus avoiding putting incorrect positioning pressure on invisible targets.

[0195] Sequence-level trajectory feedback based on the entire The area under the success rate curve of the sampled trajectory on the frame tracking segment is determined, and the sampled trajectory consists of a sequence of candidate localization boxes corresponding to the selected decision options in each frame. Specifically, on the tracking segment, different overlap thresholds are used. Scan each frame internally and count the proportion of frames where the overlap between the candidate bounding box and the ground truth bounding box is greater than or equal to the current overlap threshold out of the total number of frames. As a percentage of successful frames We obtain the success frame percentage curve under each overlap threshold, and then integrate the success frame percentage curve over the overlap threshold interval to obtain the area under the trajectory success rate curve.

[0196]

[0197] Sequence-level trajectory feedback is shared across all frames within the tracking segment. The area under the success rate curve of the entire trajectory is used as feedback to encourage the selection of decision sequences that can improve the quality of the entire trajectory, explicitly optimizing long-term tracking stability, which corresponds to the indicators that are of great interest to long-term electronic cruise in ports.

[0198] The sea area recapture feedback is determined based on the localization overlap when the small target changes from a locked state to a visible state. If the small target is locked in frame t-1 and visible in frame t, the overlap between the candidate localization box and the ground truth box corresponding to the selected decision option in frame t is multiplied by a preset gain coefficient; otherwise, the sea area recapture feedback is zero. The sea area recapture feedback is calculated using the following formula:

[0199]

[0200] Where t is the frame number. The visibility marker for the target vessel in frame t. This indicates that the target vessel is out of lock. This indicates that the target vessel is visible. and This indicates that the target vessel transitions from a lost-lock state to a visible state in frame t, where frame t is the recapture frame. The decision option selected for frame t; The candidate localization box corresponding to the decision option selected in frame t; This is the truth box for frame t. γ is the overlap function; γ is a preset gain coefficient greater than 1. For indicator functions, This is a comprehensive feedback signal.

[0201] Small boats in ports often disappear briefly and then reappear due to obstruction by larger ships, bridge piers or docks, or being submerged by waves. During the period of loss of lock, the strategy lacks effective learning signals, resulting in weak re-acquisition capabilities. This embodiment utilizes marine re-acquisition feedback to provide a γ-fold enhancement to the strategy that immediately provides high-overlap localization on the re-acquisition frame when the target transitions from a lost-lock state to a visible state. The explicit excitation strategy locks back the target the moment it reappears, improving the self-recovery capability of long-term maritime tracking.

[0202] The training process is divided into a pre-localization calibration phase and a policy co-optimization phase. Learning the policy directly from scratch is less stable because sampling a decision option at a certain location is only effective if the regressed bounding box at that location is already meaningful. Therefore, this embodiment first calibrates how to regress the bounding box, and then learns where to place the bounding box.

[0203] In the pre-localization calibration phase, before policy optimization, the bounding box regression head is pre-calibrated. The spatial grid position corresponding to the ground truth target center on the background-suppressed search feature map is used as the supervision position. The sum of the generalized overlap (GIoU) ​​and L1 norm between the candidate bounding boxes and the ground truth bounding boxes at the supervision positions is used as the calibration loss to update the parameters of the bounding box regression head. After calibration, the parameters of the bounding box regression head are frozen. The pre-localization calibration phase is only used to calibrate the regression ability of each candidate bounding box; it does not update the parameters of the localization decision head. That is, this phase only calibrates how to regress bounding boxes at a given location, without learning where to place the bounding boxes.

[0204] In multi-scale scenarios, the bounding box regression heads for each scale are pre-calibrated. Sampled decision options... The sampling trajectory, including the scale label s(t), is constructed from the sequence of candidate localization boxes corresponding to the sampling decision options in each frame. The calibration loss is calculated using the following formula:

[0205]

[0206] in, Indicates the true objective center at scale The corresponding spatial grid positions on the search feature map after background suppression This represents the candidate bounding box corresponding to the supervised location. Represents a truth box. Indicates the degree of generalized overlap. It is an L1 norm; the single-scale case degenerates into a single location. The regression heads for each scale frame degenerate into single-scale frame regression heads.

[0207] In the strategy co-optimization phase, the positioning decision head is trained using reinforcement learning based on sea state task feedback signals, with a state evaluation baseline. The purpose of employing strategy co-optimization with a state evaluation baseline is to use the state evaluation value output by the state evaluation head as a baseline to reduce the variance of the policy gradient in the calculation of the dominant signal, thus making the training more stable. In the multi-scale case, the state evaluation value is obtained by cross-scale spatial average pooling as described in Example 2; in the single-scale case, it is obtained as described in Example 2. The aforementioned definition. Sea state task feedback signals, namely overlap, area under the success rate curve, and recapture feedback, do not require differentiability and can therefore be directly used as reward signals for reinforcement learning, aligning training objectives with maritime evaluation metrics.

[0208] Specifically, in a tracking segment consisting of T consecutive frames, one decision option is sampled from the decision probabilities for each frame. This sampling can be implemented as multinomial random sampling based on the decision probabilities of each option, i.e., random selection using the decision probabilities as weights for each option's selection. The difference between the sea state task feedback signal and the state assessment value for each frame is calculated as the dominance signal.

[0209]

[0210] in, This is the dominant signal in frame t. This is the sea state mission feedback signal for frame t. This is the state evaluation value for frame t;

[0211] Strategy Loss Calculate according to the following formula:

[0212]

[0213] in, For the decision options sampled in frame t, Let be the probability value of the decision option sampled in frame t, corresponding to the decision probability. The search feature map for frame t after background suppression;

[0214] This embodiment uses the policy gradient method to update the localization decision head. Based on the policy gradient theorem, the policy loss is... By calculating the gradients of the positioning decision head's parameters and updating them using gradient descent, the decision probability distribution can be gradually shifted towards directions that yield better sea state feedback during training. In other words, the decision probability corresponding to spatial grid positions that lead to better tracking results will be gradually increased.

[0215] Condition assessment loss Calculate according to the following formula:

[0216]

[0217] in, Let be the state evaluation value for frame t. This is the sea state mission feedback signal for the t-th frame.

[0218] The total loss is calculated using the following formula:

[0219]

[0220] Wherein, β is the preset strategy-evaluation balance weight, and β=0.5.

[0221] Minimize the total loss to update the parameters of the localization decision head and the state evaluation head. Policy co-optimization encourages reward-driven exploration, meaning that spatial grid locations that lead to better tracking results are more likely to be selected, and long-term tracking stability is explicitly improved by optimizing the entire trajectory on the training segment rather than optimizing frame by frame.

[0222] The optimizer uses AdamW, and the learning rate is... Weight decay The training process involved 90 rounds, with 2500 sequences sampled per round. The learning rate decreased by a factor of 10 after the 72nd round. SeaLoc-B256 and SeaLoc-L256 were trained using a dual-template approach, while SeaLoc-T256 was trained using a single-template approach.

[0223] The training input is the sea state tracking training set, including publicly available tracking datasets and port-collected labeled data. The hyperparameters are segment length T=8, feedback weights λ1=1, λ2=0.5, and policy-evaluation balance weights β=0.5. The training output is the parameters of the trained localization decision network, including the parameters of the frozen part of the bounding box regression head, as well as the parameters of the localization decision head and the state evaluation head.

[0224] Compared to the traditional approach of template matching combined with dense confidence prediction, this invention achieves a unified approach encompassing training objectives, maritime evaluation metrics, and actual regulatory tasks. During the training phase, maritime evaluation metrics such as overlap, area under the success rate curve, and re-acquisition success rate are directly optimized using sea state task feedback signals. In the inference phase, the positioning decision head outputs decision probabilities, and the tracking box is output based on the decision option with the highest probability. Simultaneously, by combining sea surface background suppression gating, multi-scale small target decision space, same-layer semantic temporal memory transfer, and target lock-out re-acquisition and confidence management, the positioning accuracy, long-term stability, and lock-out self-recovery capability of small targets in complex sea surface environments are improved. This also meets the real-time requirements of port monitoring scenarios and can serve maritime regulatory scenarios such as black vessel inspection, boundary crossing alarms, waterway supervision, berthing and departure records, and emergency rescue.

[0225] Example 4

[0226] A small target tracking system for harbor monitoring vessels based on sea state reward-driven positioning includes:

[0227] The image acquisition module is used to acquire a template image containing the small target vessel to be tracked and the currently searched image;

[0228] A visual encoding module is used to visually encode the template image and the current search image to obtain a search feature map with background suppression; wherein, the search feature map is divided into multiple spatial grid positions;

[0229] A decision space construction module is used to make each spatial grid location a decision option on the search feature map;

[0230] The decision generation module is used to generate candidate positioning boxes and decision scores for each decision option through a positioning decision network, and to perform softmax normalization on the decision scores to obtain the decision probability; wherein, the positioning decision network is trained by reinforcement learning and uses the sea state task feedback signal as the training reward.

[0231] The result output module is used to select a decision option based on the decision probability and use the candidate positioning box corresponding to the selected decision option as the target tracking result of the current frame.

[0232] It should be noted that the image acquisition module performs the cropping of the sea area region of interest, the construction of the template image and the current search image as described in Embodiment 1; the input is the real-time bitstream output by the fixed camera in the harbor or the PTZ camera, as well as the initial bounding box of the target ship small target given by manual selection of the first frame or by the linkage of radar and automatic identification system.

[0233] The visual encoding module performs visual encoding on the template image and the current search image to obtain a background-suppressed search feature map. The visual encoding employs the block embedding and joint hierarchical encoding described in Embodiment 2 to obtain the initial search feature map; the background suppression employs the sea surface background suppression gating described in Embodiment 2, that is, using a typical sea area background feature map as a background prior to generate suppression weights, and weighting the initial search feature map to obtain the background-suppressed search feature map. As an alternative implementation, background suppression can also be uniformly applied within the visual encoding backbone, that is, uniformly gating features at each scale during the joint hierarchical encoding process. The search feature map obtained after processing by the visual encoding module is divided into multiple spatial grid positions.

[0234] The decision space construction module constructs a decision option for each spatial grid location on the search feature map. In the single-scale case, each spatial grid location on the search feature map is a decision option; in the multi-scale case, each scale and each spatial grid location constitutes a decision option with a corresponding scale label, and the decision options for all scales and all locations constitute a multi-scale decision space.

[0235] The decision generation module generates candidate bounding boxes and decision scores for each decision option through a positioning decision network, and performs softmax normalization on the decision scores to obtain the decision probability. The candidate bounding boxes are generated by the box regression head, and the decision scores are generated by the positioning decision head. Normalization is spatial normalization in the single-scale case and cross-scale joint normalization in the multi-scale case. The positioning decision network is trained through reinforcement learning, using sea state task feedback signals as training rewards; the specific training method is described in Example 3.

[0236] The result output module selects a decision option based on the decision probability and uses the candidate localization box corresponding to the selected decision option as the target tracking result of the current frame. During the inference phase, the decision option with the highest decision probability is selected, and the candidate localization box corresponding to the decision option is output. Furthermore, in conjunction with the target loss re-capture and confidence management described in Embodiment 2, the visibility flag and tracking confidence are reported to the maritime supervision platform together.

[0237] In practical implementation, the above five modules can be deployed on the processor of a harbor edge computing box or a smart camera. The modules can be stored in memory in software form and executed by the processor, or they can be integrated in hardware form. The five modules can be integrated into the same processing chip, or they can be implemented by different processing units. This embodiment does not limit this. The technical effects achieved by this system are the same as those described in embodiments one to three, and will not be repeated here.

[0238] Example 5

[0239] This embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the small target tracking method for harbor monitoring vessels based on sea state reward-driven positioning as described in embodiments one to three.

[0240] The computer-readable storage medium may be any type of medium known in the art, such as non-volatile memory, volatile memory, flash memory, read-only memory, random access memory, removable disk or optical disk, and this embodiment does not limit its specific form.

[0241] The processor can be a general-purpose central processing unit, a graphics processing unit, a neural network processor, or an embedded processor deployed in a harbor edge computing box or a smart camera, such as a Jetson AGX. This embodiment does not limit its specific type. The execution effect of the method carried by this storage medium is the same as that described in embodiments one to three, and will not be repeated here.

[0242] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for small target tracking on a harbor monitoring vessel based on sea state reward-driven positioning, characterized in that, Includes the following steps: Obtain a template image containing the small target vessel to be tracked and the currently searched image; Visual encoding is performed on the template image and the current search image to obtain an initial search feature map; wherein, the initial search feature map is divided into multiple spatial grid positions; The initial search feature map is subjected to sea surface background suppression to obtain a background-suppressed search feature map; A multi-scale decision space is constructed on the background-suppressed search feature map, where each spatial grid position constitutes a decision option; The positioning decision network generates candidate positioning boxes and decision scores for each decision option, and performs softmax normalization on the decision scores to obtain the decision probability; wherein, the positioning decision network is trained by reinforcement learning and uses the sea state task feedback signal as training reward. Based on the decision probability, a decision option is selected, and the candidate localization box corresponding to the selected decision option is used as the target tracking result of the current frame.

2. The method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, Visual encoding is performed on the template image and the current search image to obtain an initial search feature map, including: The template image is divided into blocks and embedded to obtain template code elements, and the current search image is divided into blocks and embedded to obtain search code elements; The template code and the search code are concatenated and then input into a multi-layer coding layer for joint self-attention coding, so that the template features and the search image features interact layer by layer, and the initial search feature map is output.

3. The method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 2, characterized in that, The construction of a multi-scale decision space on the initial search feature map specifically includes: The initial search feature map includes at least two search feature maps with different resolutions, and the search feature maps with different resolutions correspond to different scales; On the search feature map at each scale, each spatial grid location constitutes a decision option with a corresponding scale label; the decision options at all scales and all locations constitute a multi-scale decision space. Each scale is equipped with a corresponding positioning decision head, which is used to generate decision scores for decision options at the scale. The decision probabilities are obtained by performing cross-scale joint softmax normalization on the decision scores of all decision options across all scales.

4. The method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 2, characterized in that, Each coding layer in the multi-layer coding system corresponds to a semantic level, and the temporal memory of each layer is initialized as a zero vector. In the l-th coding layer, the template code, search code, temporal memory of the current frame in the l-th layer and the temporal memory of the previous frame in the l-th layer are concatenated and then input into the l-th coding layer for multi-head self-attention and feedforward network processing to obtain the updated template code, search code, temporal memory of the current frame in the (l+1)-th coding layer and the processed output code of the temporal memory of the previous frame in the l-th layer. The processed output code of the l-th layer temporal memory of the previous frame is discarded, and the temporal memory of the (l+1)-th layer of the current frame is retained as the input temporal memory of the (l+1)-th layer coding layer of the current frame, and participates in the processing in the (l+1)-th layer coding layer of the next frame as the temporal memory of the same layer as the previous frame.

5. The method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, The step of performing sea surface background suppression on the initial search feature map to obtain a background-suppressed search feature map includes: Obtain typical background feature maps of the sea area based on pre-statistical analysis of sea area images without ships; The initial search feature map is concatenated with the typical background feature map of the sea area, and then channel-wise or position-wise suppression weights are generated through convolution and activation functions. The initial search feature map is weighted element-wise using the suppression weights to suppress feature responses similar to the sea background, resulting in a background-suppressed search feature map.

6. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 5, characterized in that, The method for obtaining the typical background feature map of the sea area is as follows: For fixed cameras, the typical background feature map of the location-dependent sea area is obtained by averaging point by point according to the spatial grid position on the sea area image without ships; For PTZ cameras, channel-based statistical mean or variance is used to obtain typical background feature maps of sea areas without ships.

7. A method for tracking small targets on a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, The sea state task feedback signal is calculated using the following formula: Where t represents the frame number. Let represent the decision option sampled from the decision probabilities in frame t. Let τ represent the decision option sampled from the decision probabilities in the τ-th frame. This represents the candidate localization box corresponding to the sampling decision option in frame t. This represents the truth box of frame t. This represents the candidate localization box corresponding to the sampling decision option in the τth frame. This represents the truth box of the τth frame, where T represents the number of frames in the tracking segment. and For feedback weights, For overlap function, The quantitative metric representing sequence-level trajectory feedback is calculated by the area under the trajectory success rate curve on the tracked segment. This indicates feedback on the recapture of the sea area.

8. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 7, characterized in that, The sea state mission feedback signal includes frame-level overlap feedback, sequence-level trajectory feedback, and sea area re-capture feedback. The frame-level overlap feedback is determined based on the overlap between the candidate localization box and the truth box corresponding to the selected decision option in the current frame: when the small target is visible in the t-th frame, the overlap between the candidate localization box and the truth box corresponding to the selected decision option in the t-th frame is taken. When the small target is in a unlocked state in frame t, the frame-level overlap feedback value is zero; The sequence-level trajectory feedback is determined based on the area under the success rate curve of the upsampled trajectory of the tracking segment, and the sampled trajectory is composed of a sequence of candidate localization boxes corresponding to the selected decision options in each frame. The sea area recapture feedback is determined based on the positioning overlap when the small target changes from a lost state to a visible state: when the small target is in a lost state in frame t-1 and in a visible state in frame t, the overlap between the candidate positioning box and the ground truth box corresponding to the selected decision option in frame t and the preset gain coefficient are used to determine the value; otherwise, the sea area recapture feedback is zero. During the training phase, the visibility of the small ship target is determined based on the ground truth visibility annotation, which is used to indicate whether the small ship target is occluded or has left the field of view.

9. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 7, characterized in that, The sea area recapture feedback is calculated using the following formula: Where t is the frame number. The visibility marker for the target vessel in frame t. This indicates that the target vessel is out of lock. This indicates that the target vessel is visible. and This indicates that the target vessel transitions from a lost-lock state to a visible state in frame t, where frame t is the recapture frame. The decision option selected for frame t; The candidate localization box corresponding to the decision option selected in frame t; This is the truth box for frame t. γ is the overlap function; γ is a preset gain coefficient greater than 1. For indicator functions, This is a comprehensive feedback signal.

10. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 7, characterized in that, The area under the trajectory success rate curve is calculated in the following way: In the tracking segment, each frame in the tracking segment is scanned with different overlap thresholds. The proportion of frames with the overlap between the candidate localization box and the ground truth box greater than or equal to the current overlap threshold is counted as the proportion of successful frames. The success frame proportion curve under each overlap threshold is obtained. The area under the trajectory success rate curve is obtained by integrating the success frame proportion curve over the overlap threshold interval.

11. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, The localization decision network includes a bounding box regression head and a localization decision head. The bounding box regression head is used to generate candidate localization boxes for each decision option, and the localization decision head is used to generate decision scores for each decision option. The training process includes a pre-positioning calibration phase and a strategy co-optimization phase. In the pre-localization calibration stage, the spatial grid positions corresponding to the ground truth target center on the feature map at each scale are used as the supervision positions of the bounding box regression heads at each scale. The sum of the generalized overlap (GIoU) ​​and L1 norm between the candidate localization box and the ground truth box at each scale supervision position is used as the calibration loss of the bounding box regression heads at each scale. The parameters of the bounding box regression heads at each scale are updated respectively. After calibration, the parameters of the bounding box regression heads at each scale are frozen. During the strategy co-optimization phase, the positioning decision head is trained using reinforcement learning based on the sea state task feedback signal, with a state evaluation baseline, through a strategy gradient method.

12. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 11, characterized in that, The positioning decision network also includes a state evaluation head, which is used to output a state evaluation value. During the training phase, the difference between the sea state task feedback signal and the state evaluation value in the current frame is calculated as the advantage signal. A strategy loss is constructed based on the advantage signal to update the parameters of the positioning decision head; a state evaluation loss is constructed based on the difference between the state evaluation value and the sea state task feedback signal to update the parameters of the state evaluation head.

13. A method for tracking small targets on a harbor monitoring vessel based on sea state reward-driven positioning according to claim 12, characterized in that, The strategy co-optimization is performed on a tracking segment consisting of T consecutive frames, with one decision option sampled from the decision probabilities in each frame; The advantage signal Calculate according to the following formula: ; In the formula, This is the sea state mission feedback signal for frame t. This is the state evaluation value for frame t; The strategy loss Calculate according to the following formula: ; In the formula, The dominant signal is for the t-th frame. For the decision options sampled in frame t, Let be the probability value of the decision option sampled in frame t, corresponding to the decision probability. The search feature map for frame t after background suppression; The state assessment loss Calculate according to the following formula: ; In the formula, Let be the state evaluation value for frame t. The sea state mission feedback signal for the t-th frame; The training process aims to minimize the total loss, which is: ; In the formula, β is the preset strategy-evaluation balance weight, and β=0.

5.

14. A method for tracking small targets on a harbor monitoring vessel based on sea state reward-driven positioning according to claim 12, characterized in that, Each scale is equipped with a state evaluation head, which is also used to predict the state evaluation map of each spatial grid position at the corresponding scale. The state evaluation value is obtained by performing cross-scale spatial average pooling on the state evaluation maps at each scale.

15. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 12, characterized in that, The state evaluation head is used only during the training phase; during the inference phase, the state evaluation head is removed, and the sea state task feedback signal is not calculated. The decision option with the highest probability is determined based on the decision probability, and the corresponding candidate localization box is output; when the search feature map includes search feature maps of at least two scales, the state evaluation head corresponding to each scale is removed during the inference phase.

16. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, The step of selecting a decision option based on the decision probability includes: During the training phase, decision options are sampled according to the stated decision probabilities; During the reasoning phase, the decision option with the highest probability is selected.

17. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, It also includes lost-lock recapture management: During the inference phase, the maximum value of the original decision score of each decision option in the current frame before softmax normalization is mapped by the sigmoid function to obtain the tracking confidence. When the tracking confidence is lower than a preset low threshold and remains at a preset number of frames, it is determined that the small target is lost. The target tracking result of the previous frame is used as the output of the current frame, or the result of extrapolation of the preset motion model is used as the output of the current frame, and the search area is expanded by increasing the search area magnification factor. When the tracking confidence level rises above the preset high threshold again after a loss of lock, a successful re-capture is determined, and normal tracking is resumed.

18. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, After acquiring the template image and the current search image of the small target vessel to be tracked, the process also includes sea state data enhancement; wherein, at least one of the following enhancement processes is performed on the template image, the current search image, or a search block cropped from the current search image: horizontal flipping, brightness jittering, sea fog simulation enhancement, water surface flare simulation enhancement, and surge jittering enhancement.

19. A method for tracking small targets on a harbor monitoring vessel based on sea state reward-driven positioning according to claim 18, characterized in that, The sea fog simulation enhancement includes superimposing the image to be enhanced with a fog density map using a random mixing coefficient; the water surface flare simulation enhancement includes superimposing bright stripe noise in the waterline region of the image to be enhanced; the surge jitter enhancement includes applying affine perturbation to the image to be enhanced.

20. A method for small target tracking of a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, After obtaining the current search image, the method further includes: Based on the pre-calibrated shoreline mask, the current search image is cropped to remove fixed areas of land or docks; The template image is obtained by cropping the initial frame of the tracking start frame. The tracking start frame is a frame that is manually selected or a frame that provides the initial frame of the target ship in conjunction with radar and the Automatic Identification System (AIS).

21. A method for tracking small targets on a harbor monitoring vessel based on sea state reward-driven positioning according to claim 1, characterized in that, Also includes: The center position of the tracking box in the target tracking result is compared with the pre-marked no-navigation area. When the center position enters the no-navigation area, a boundary crossing alarm is generated and reported to the maritime supervision platform.

22. A small target tracking system for harbor monitoring vessels based on sea state reward-driven positioning, characterized in that, include: The image acquisition module is used to acquire a template image containing the small target vessel to be tracked and the currently searched image; A visual encoding module is used to visually encode the template image and the current search image to obtain a search feature map with background suppression; wherein the search feature map is divided into multiple spatial grid positions; A decision space construction module is used to make each spatial grid location a decision option on the search feature map; The decision generation module is used to generate candidate positioning boxes and decision scores for each decision option through a positioning decision network, and to perform softmax normalization on the decision scores to obtain the decision probability; wherein, the positioning decision network is trained by reinforcement learning and uses the sea state task feedback signal as the training reward. The result output module is used to select a decision option based on the decision probability and use the candidate positioning box corresponding to the selected decision option as the target tracking result of the current frame.

23. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the small target tracking method for harbor monitoring vessels based on sea state reward-driven positioning as described in any one of claims 1 to 21.