Elongate target tracking and counting methods, systems, and storage media with underwater vehicles
Patent Information
- Application Number
- CN202611088576.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-08-18
AI Technical Summary
当使用传统的矩形边界框来包围这些目标时,目标自身的形态弯曲会导致其外部包围框的面积、长宽比发生剧烈波动
第一,构建面向细长目标的中心点与方向联合建模与鲁棒数据关联机制:针对水下细长目标,特别是鳗鱼等游动时姿态变化剧烈、极易弯曲折叠的物理特性,突破传统多目标跟踪技术高度依赖边界框面积与交并比进行身份匹配的局限。本发明提出一种将目标从面积对象降维至几何骨架的新型表征策略,提取真实目标的中心点位置与主轴方向进行联合建模;同时,基于该新型表征构建以空间距离与运动方向一致性为主导的数据关联机制,从源头上彻底消除了目标由于局部姿态形变引发的包围框面积剧烈波动和交并比骤降问题,避免了低分辨率、低帧率声呐图像下频繁的匹配失效与轨迹断裂,实现了对易形变细长目标在复杂水下环境中的稳定、连续跟踪。
Smart Images

Figure CN122597970A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing and underwater detection technology, specifically to a method, counting system, and storage medium for tracking and accurately counting high-density, slender targets using forward-looking sonar, and to an underwater submersible. Background Technology
[0002] With the continuous development of underwater visual perception technology and marine engineering, forward-looking sonar (FLS) has become a core sensor for underwater unmanned vehicles, individual underwater operation equipment, and modern aquaculture detection systems due to its ability to perform active acoustic imaging in zero-visibility and turbid waters. In practical applications such as intensive aquaculture, including acoustic sampling and counting of pond eels or underwater special operations, high-precision multi-target tracking and target counting of continuous dynamic sonar video streams are required. However, forward-looking sonar images generally suffer from inherent imaging defects such as low resolution, low frame rate, and susceptibility to reverberation and acoustic shadowing; in addition, the unique morphology and high-density aggregation characteristics of underwater biological targets pose significant challenges to existing multi-target tracking and counting technologies.
[0003] Specifically, existing technologies face two main technical bottlenecks when handling the tracking and counting of such complex underwater targets: First, the geometric instability of slender and easily deformable targets causes traditional bounding box-based data association mechanisms to frequently fail. In the field of multi-target tracking, existing mainstream methods, such as SORT and DeepSORT, which rely on Kalman filtering and the Hungarian algorithm, heavily depend on the intersection-over-union (IoU) ratio of targets between consecutive frames to match and associate them with the same identity feature (ID). However, in real underwater scenarios, targets such as eels exhibit extremely slender proportions and undergo frequent bending, twisting, and other dramatic attitude changes during swimming. When using traditional rectangular bounding boxes to enclose these targets, the bending of the target's shape causes drastic fluctuations in the area and aspect ratio of its outer bounding box. This representation method, which treats targets as area objects, suffers from severe geometric instability: even if the actual displacement of the target in physical space is small, its attitude changes can cause the IoU ratio of the bounding boxes in consecutive frames to drop sharply or even approach zero. Furthermore, the low frame rate of sonar equipment leads to large inter-frame target displacements, causing the geometric overlap-based association mechanism to completely fail. The algorithm cannot correctly match the target in the current frame with historical trajectories, resulting in numerous trajectory breaks.
[0004] Second, the severe fragmentation of trajectories in high-density, homogeneous target scenarios leads to significant overestimation errors in traditional target counting mechanisms. In target counting tasks, existing solutions typically use the number of independent trajectories generated across virtual detection lines or within a statistical system as the counting benchmark. However, in a single frame image sampled by forward-looking sonar, there are often a large number of densely packed targets with extremely similar appearances and overlapping each other. In such high-density scenarios, speckle noise in the sonar image or mutual occlusion between targets can easily cause targets to be missed in some frames. Traditional trackers lack global contextual error correction capabilities when faced with such discontinuous temporal observations, and are prone to misclassifying the same real target that reappears after a brief loss as a new target entering the frame, assigning it a completely new trajectory ID. This results in a complete biological swimming trajectory in reality being fragmented into dozens of short-lived fragmented trajectories in the algorithm. If the counting is directly based on these fragmented trajectories generated from detection boxes, the final total number of targets will far exceed the actual physical number, completely losing its engineering reference value.
[0005] In summary, the current field of underwater visual perception and sonar image processing urgently needs a lightweight tracking and counting method that can break free from the constraints of traditional cross-comparison and comparison methods, accurately fit the shape of slender targets, and repair debris trajectories in high-density and crowded scenes. Summary of the Invention
[0006] One of the technical problems to be solved by this application is to overcome the defects of the above-mentioned related technologies and provide a method, counting system and storage medium for tracking and counting slender targets with high density of forward-looking sonar and an underwater vehicle. Based on the multi-target tracking technology of joint modeling of center point and direction and trajectory consistency constraints, a trajectory-level post-processing mechanism is introduced to upgrade the counting unit from the detection box to the complete trajectory, thereby effectively suppressing the repeated counting of high-density slender targets.
[0007] The technical solution adopted by this method for tracking and counting slender targets to solve the technical problem is as follows: A method for tracking and counting slender targets, comprising the following steps: S1. Acquire the real sonar video stream and perform filtering and preprocessing to extract the physical feature base map; S2. Dimensionality reduction and joint representation of center point-direction of slender target geometric skeleton: Target detection is performed on the physical feature base map, and the detected targets are dimensionally reduced and extracted into direction vectors containing the physical coordinates of the target center point and the physical deflection angle of the principal axis, and a set of geometric skeleton representations is constructed. S3. Deformation-resistant data association based on spatial and directional consistency: In continuous time frames, based on the extracted center point and direction vector, the spatial Euclidean distance cost and angular deflection cost between physical targets are calculated. The joint cost matrix is used and the Hungarian algorithm is used to complete the identity matching of the same source targets in the previous and next frames, and the initial target trajectory set is generated. S4. Global trajectory fragment merging based on spatiotemporal and motion consistency: Perform global post-processing on the initial target trajectory set, extract the life cycle breakpoints, spatial endpoint coordinates and motion velocity vectors of each short trajectory segment, comprehensively determine the temporal adjacency, spatial proximity and motion direction consistency, force connect and smooth repair multiple fragment trajectories belonging to the same physical target, and reconstruct them into continuous physical trajectories. S5. Deduplication verification and high-fidelity physical counting based on trajectory duration period: For each reconstructed continuous physical trajectory, evaluate its survival frame count and physical displacement in the sonar effective field of view, perform single-accumulation counting on real effective trajectories that exceed the preset life cycle threshold, and finally output the accurate total number of physical targets in the physical water area.
[0008] Preferably, the specific physical logic and mathematical model for the association between the center point-direction joint characterization and the deformation resistance data is as follows: Regarding the first i For each target, its geometric skeleton state vector is defined as follows: ,in For the goal i Coordinates of the center point on the physical section of the two-dimensional sonar. For the goal i The angle of the principal axis relative to the reference coordinate system; In the t -1 frame trajectory target i With the t New detection target of the frame j Construct a joint cost matrix between them, which matches the total cost. Defined as: ; in, α As a weighting factor for physical spatial distance, β As the directional consistency weighting factor, ( x j , y j ) as the new detection target j Coordinates of the center point on the physical section of the two-dimensional sonar. θ j For new detection targets j The angle of the principal axis relative to the reference coordinate system.
[0009] Preferably, the global trajectory fragment merging includes the following physical logic judgment mode. Suppose that there are any two independent fracture trajectories within the system buffer pool. Tr m and fracture trajectory Tr n Extract the fracture trajectory respectively Tr m Disappearance of terminal state With fracture trajectory Tr n The initial state of appearance ;in, fracture trajectory Tr m At the terminal moment, fracture trajectory Tr m The physical location coordinates of the terminal. fracture trajectory Tr m The velocity vector of the terminal, fracture trajectory Tr n At the beginning, fracture trajectory Tr n The physical coordinates of the initial end. fracture trajectory Tr n The initial velocity vector; The fracture trajectory is determined if and only if the following three physical conditions are met simultaneously. Tr m and fracture trajectory Tr n For fragments of the same physical target, perform trajectory stitching: Temporal adjacency: The time discontinuity of the two broken trajectories is within the maximum allowed number of lost frames. T gap Within the range; Spatial proximity: The recurring physical positional shift falls within the reasonable boundary of underwater organism swimming speed. D max Inside; Motion consistency: The physical velocity vectors of the target remain highly similar before and after the fracture. τ dir is the direction cosine similarity threshold.
[0010] Preferably, the deduplication verification logic is as follows: Extracting the physical survival time of the reconstructed continuous physical trajectoryT life ; Establish target total accumulator Count When a continuous physical trajectory terminates or leaves the sonar detection boundary, a decision is made: like Then the continuous physical trajectory is confirmed as a real and valid physical movement event. ; like If the trajectory is determined to be a false alarm trajectory caused by acoustic background noise or brief clutter, it will be discarded and not included in the total count. in, T life = t last - t first , t first The start time of the continuous physical trajectory. t last The termination time of the continuous physical trajectory; T valid This is the threshold for false alarm trajectories.
[0011] The technical solution adopted by this slender target tracking and counting system to solve the technical problem is as follows: a slender target tracking and counting system for implementing the above-mentioned slender target tracking and counting method, comprising: Real sonar data access and filtering module: used to receive and parse the raw baseband data stream of the underlying forward-looking sonar device in real time, and perform hard-line filtering preprocessing based on the real acoustic echo characteristics; Skeleton dimensionality reduction and feature extraction accelerator: Built-in lightweight convolution or perceptual neural network operators are responsible for parallel dimensionality reduction of target pixel blocks into multi-dimensional floating-point vector matrices with center point and orientation in physical memory; Deformation-resistant data association and trajectory stitching processor: Deploys computational units with cost models and logical judgments, dynamically maintains trajectory status, and performs matrix alignment and global stitching scheduling of historical fragment trajectories in the cache; Deduplication counting and visualization output module: Combines the continuous period of the trajectory to trigger the counting interrupt, and outputs the accurate physical statistics and sonar video stream with continuous trajectory IDs to the display terminal.
[0012] A storage medium storing a computer program that, when executed by a microprocessor, implements the above-described method for tracking and counting slender targets.
[0013] An underwater vehicle includes an acoustic detection sensor and an edge computing device. The edge computing device deploys the aforementioned slender target tracking and counting system. The edge computing device employs a low-power heterogeneous computing platform. The heterogeneous computing platform uses an FPGA, Ascend, or RK3588.
[0014] Compared with related technologies, the advantages of this method and system for tracking and counting slender targets are: First, a robust data association mechanism for joint modeling of the center point and direction of slender targets is constructed: Addressing the physical characteristics of slender underwater targets, especially eels and similar creatures, which exhibit drastic posture changes and are easily bent and folded during swimming, this invention overcomes the limitations of traditional multi-target tracking techniques that heavily rely on bounding box area and cross-union ratio (CUP) for identity matching. This invention proposes a novel representation strategy that reduces the target's dimension from an area object to a geometric skeleton, extracting the center point position and principal axis direction of the real target for joint modeling. Simultaneously, based on this novel representation, a data association mechanism is constructed that prioritizes the consistency of spatial distance and motion direction. This fundamentally eliminates the problems of drastic fluctuations in bounding box area and sharp drops in CUP caused by local posture deformation of the target, avoiding frequent matching failures and trajectory breaks in low-resolution, low-frame-rate sonar images. This enables stable and continuous tracking of easily deformable slender targets in complex underwater environments.
[0015] Secondly, this invention achieves fragment merging and high-fidelity deduplication counting based on trajectory consistency constraints: Addressing the pain points of high-density target clustering and highly homogeneous appearance in forward-looking sonar fields of view, and the susceptibility to temporary loss of detection boxes due to target occlusion and acoustic shadowing in real underwater environments, this invention overcomes the static limitations of traditional tracking frameworks that rely solely on detection boxes crossing virtual lines or simple accumulation to generate trajectories for counting. This invention introduces a global-view trajectory-level post-processing and optimization engine. This mechanism uses complete, continuous trajectories, rather than independent detection boxes, as the core counting unit. By comprehensively evaluating the temporal adjacency, spatial proximity, and similarity of motion directions of trajectory fragments, it accurately splices and merges multiple broken short trajectories belonging to the same real physical target. Simultaneously, it implements strict deduplication filtering based on the trajectory's continuous survival time. This significantly suppresses duplicate counting caused by frequent identity switching in high-density scenarios, ensuring the output of highly valuable physical statistics in intensive aquatic sampling.
[0016] Third, it provides a lightweight processing architecture suitable for real sonar video streams and low-power edge terminals: To meet the stringent requirements of real-time underwater target detection in engineering deployments, this invention abandons the reliance on highly complex external matching networks and unrealistic assumptions about simulated noise distribution. Instead, it directly focuses on the underlying physical characteristics of real forward-looking sonar video streams. Through a dual lightweight algorithm design of geometric skeleton dimensionality reduction representation and global trajectory deduplication, it significantly reduces the complex matrix operation overhead and memory usage in traditional data association processes. This mechanism not only achieves a logical closed loop of tracking and counting at the algorithm level but also greatly lowers the computational threshold on the edge, making this invention extremely suitable for efficient deployment on underwater edge computing platforms such as FPGAs and RK3588, which have strict limitations on power consumption and heat generation. This provides a low-latency, high-precision real-time sensing solution for high-frequency dynamic underwater scenarios. Attached Figure Description Figure 1 This is a flowchart of the slender target tracking and counting method of the present invention.
[0017] Figure 2 This is a schematic diagram of the slender target tracking and counting system of the present invention.
[0018] Figure 3 This is a schematic diagram of the main control system structure of the underwater vehicle of the present invention. Detailed Implementation
[0019] First, those skilled in the art should understand that these embodiments are merely used to explain the technical principles of the embodiments of this application and are not intended to limit the scope of protection of the embodiments of this application. Those skilled in the art can make adjustments as needed to adapt to specific application scenarios.
[0020] This invention aims to solve the technical problems existing in underwater multi-target tracking and counting technologies, such as the severe failure of traditional rectangular bounding boxes to associate with slender and deformed targets, frequent trajectory breakage leading to significantly higher target counts in high-density homogeneous target scenarios, and the excessive computational overhead of complex association algorithms on underwater hardware. Specifically, this invention strives to achieve the following objectives: First, a robust data association mechanism for joint modeling of center point and direction for slender targets is constructed: Addressing the physical characteristics of slender underwater targets, especially eels and similar creatures, which exhibit dramatic changes in posture and are easily bent and folded during swimming, this approach overcomes the limitations of traditional multi-target tracking technologies that heavily rely on bounding box area and intersection-union ratio (IU) for identity matching. Second, fragment merging and high-fidelity deduplication counting based on trajectory consistency constraints are achieved: Addressing the pain points of high-density target clustering and highly homogeneous appearance in the forward-looking sonar field of view, and the susceptibility to temporary loss of detection boxes due to target occlusion and acoustic shadowing in real underwater acoustic environments, this approach overcomes the static defects of traditional tracking frameworks that rely solely on detection boxes crossing virtual lines or simply accumulating trajectories for counting. Third, a lightweight processing architecture suitable for real sonar video streams and low-power edge terminals is provided: To meet the stringent requirements of real-time underwater target detection in engineering deployments, the reliance on highly complex external matching networks and unrealistic assumptions about simulated noise distribution is eliminated.
[0021] Specifically, such as Figure 1 As shown, the present invention is a slender target tracking and counting system for high-density slender targets in forward-looking sonar, comprising the following steps: Step S1: Acquisition of real sonar video stream and adaptive filtering preprocessing: Acquire the continuous dynamic real video stream collected by the forward-looking sonar of the underwater edge device. For the reverberation and speckle noise that actually exist in the underwater physical environment, directly perform filtering enhancement based on real acoustic features on the current input image frame to extract the physical feature base map and avoid feature distortion caused by the introduction of simulated Gaussian noise.
[0022] Step S2: Dimensionality Reduction and Center Point-Direction Joint Representation of Slender Target Geometric Skeleton: Target detection is performed on the physical feature map output from Step S1. Breaking through the limitations of traditional bounding box area representation, the detected physical targets are dimensionality reduced and extracted into high-dimensional spatial direction vectors containing the physical coordinates of the target's center point and the physical deflection angle of the principal axis. This constructs a geometric skeleton representation set robust to target attitude bending. For the first... i For each target, its geometric skeleton state vector is defined as follows: ,in For the goal i Coordinates of the center point on the physical section of the two-dimensional sonar. For the goal i The angle of the principal axis relative to the reference coordinate system.
[0023] Step S3: Deformation-resistant data association based on spatial and directional consistency: Between consecutive time frames, based on the physical coordinates of the center point and the direction vector extracted in step S2, calculate the spatial Euclidean distance cost and angular deflection cost between targets; abandon the traditional intersection-union-ratio matching, adopt the joint cost matrix and complete the identity matching of the same physical targets in the previous and next frames through the Hungarian algorithm, and generate the initial target trajectory set.
[0024] The specific physical logic and mathematical model for the deformation-resistant data association are as follows: In the t -1 frame trajectory target i With the t New detection target of the frame j Construct a joint cost matrix between them, which matches the total cost. Defined as: ; in, α As a weighting factor for physical spatial distance, β This is the directional consistency weighting factor (also known as the physical motion direction weighting factor). x j , y j ) as the new detection target j Coordinates of the center point on the physical section of the two-dimensional sonar. θ j For new detection targets j The angle of the principal axis relative to the reference coordinate system. In multi-target tracking data association for slender underwater targets, the physical spatial distance weighting factor... α Consistency weighting factor with direction β These are not absolute static constants, but rather dynamic adaptive hyperparameters determined by the target's physical flexibility and the spatiotemporal resolution of the sonar sensor. When processing real continuous sonar video streams, the torso bending of high-frequency deformable targets can cause transient changes in orientation parameters, requiring a higher confidence level for spatial displacement. For rigid targets, the constraint on the principal axis direction needs to be strengthened. On edge computing platforms with limited computing power, these weights can be pre-set as offline empirical lookup tables. By dynamically balancing the cost contributions of space and motion direction, the algorithm can maintain robustness under low frame rates and realistic acoustic speckle interference. For highly flexible and easily deformable targets such as eels, their bodies undergo violent twisting during swimming, causing changes in the principal axis direction between frames. θ Extremely unstable, but the physical displacement of the centroid is relatively continuous, and the physical spatial distance weighting factor... α The value ranges from approximately 0.75 to 0.85, representing the directional consistency weighting factor. β The value ranges from 0.15 to 0.25. For rigid or semi-rigid slender targets such as underwater pipes, whose physical shape is fixed, have extremely strong motion inertia, and whose principal axis direction remains almost absolutely consistent within consecutive frames, the physical spatial distance weighting factor... α The value ranges from approximately 0.40 to 0.50, representing the directional consistency weight factor. β The value range is 0.50 to 0.60.
[0025] During the process, the cosine distance was used to measure the angle difference, which completely avoided the sudden change in area caused by the deformation of the bounding box when slender targets bend at high frequency, thus ensuring the strong robustness of geometric matching in low-resolution sonar images.
[0026] Step S4: Global trajectory fragment merging based on spatiotemporal and motion consistency: To address the trajectory breakage problem caused by mutual occlusion of high-density homogeneous targets, global post-processing is performed on the initial target trajectory set generated in step S3. The life cycle breakpoints, spatial endpoint coordinates, and motion velocity vectors of each short trajectory segment are extracted. The temporal adjacency, spatial proximity, and motion direction consistency are comprehensively judged. Multiple fragment trajectories belonging to the same physical target (physical entity) are forcibly connected and smoothly repaired in physical space to reconstruct a complete continuous physical trajectory.
[0027] Global trajectory fragment merging includes the following physical logic judgment mode, where the matching is not based on the intersection-union ratio of the target bounding boxes: Suppose that there are any two independent fracture trajectories within the system buffer pool. Tr m and fracture trajectory Tr n Extract the fracture trajectory respectively Tr m Disappearance of terminal state With fracture trajectory Tr n The initial state of appearance The state parameters include time, physical position coordinates, and velocity vector. fracture trajectory Tr m At the terminal moment, fracture trajectory Tr m The physical location coordinates of the terminal. fracture trajectory Tr m The velocity vector of the terminal, fracture trajectory Tr n At the beginning, fracture trajectory Tr n The physical coordinates of the initial end. fracture trajectory Tr n The initial velocity vector; if and only if the following three physical conditions are met simultaneously, the two are determined to be fragments of the same target's fracture trajectory and trajectory splicing is performed: (1) Temporal adjacency: That is, the time discontinuity of the two broken trajectories within the maximum allowed number of lost frames. Tgap Within the range; (2) Spatial proximity: That is, the physical positional shift that occurs again falls within the reasonable boundary of the swimming speed of underwater organisms. D max Inside; (3) Motion consistency: That is, the physical velocity vectors before and after the target fracture remain highly similar in direction. τ dir is the direction cosine similarity threshold.
[0028] Step S5: Deduplication verification and high-fidelity physical counting based on trajectory duration: The complete continuous physical trajectory after fragment merging is used as the sole counting benchmark. The number of survival frames and physical displacement of each reconstructed continuous physical trajectory in the sonar effective field of view are evaluated. Only the real effective trajectories that exceed the preset life cycle threshold are counted once. Transient false trajectories caused by acoustic shadows or background noise are filtered out. Finally, the accurate total number of targets in the physical water area is output.
[0029] The deduplication verification logic is as follows: Extracting the physical lifespan of continuous physical trajectories after reconstruction T life , T life = t last - t first ; t first The start time of the continuous physical trajectory. t last The termination time is for the continuous physical trajectory. The system establishes a target total count accumulator. Count When a continuous physical trajectory terminates or leaves the sonar detection boundary, a decision is made: like Then the continuous physical trajectory is confirmed as a real and valid physical movement event. ;like Trajectories that are determined to be false alarms caused by acoustic background noise or transient clutter are discarded and not included in the total count. T valid This is a preset false alarm trajectory threshold. This measure upgrades the counting unit to the trajectory level, fundamentally suppressing falsely high counts in high-density, homogeneous scenarios.
[0030] A system for tracking and counting slender targets with high density in forward-looking sonar, such as... Figure 2 As shown, it includes: Real sonar data access and filtering module: Implements step S1, which is used to receive and parse the raw baseband data stream of the underlying forward-looking sonar device in real time, and perform hard-line filtering preprocessing based on the real acoustic echo characteristics; Skeleton dimensionality reduction and feature extraction accelerator: Implement step S2, with built-in lightweight convolution or perceptual neural network operators, responsible for parallel dimensionality reduction of target pixel blocks into multi-dimensional floating-point vector matrices of center point and direction in physical memory; Deformation-resistant data association and trajectory stitching calculator: Implements steps S3 and S4, deploys computational units with cost models and logical judgments, dynamically maintains the trajectory state machine, and performs matrix alignment and global stitching scheduling of historical fragment trajectories in the cache; Deduplication counting and visualization output module: Implements step S5, combines the continuous trajectory period to trigger the counting interrupt, and outputs the accurate physical statistics and sonar video stream with continuous trajectory ID to the display terminal.
[0031] A computer-readable storage medium having a computer program stored thereon, which, when executed by a microprocessor, implements the above-described method for tracking and counting slender targets.
[0032] An underwater vehicle, such as Figure 3 As shown, the system includes an acoustic detection sensor and a low-power edge computing device, within which the aforementioned system is deployed. The edge computing device employs a low-power heterogeneous computing platform such as FPGA, Ascend, or RK3588. Through the lightweight geometric skeleton representation and trajectory post-processing mechanism described in this invention, which eliminates the need to calculate complex intersection-union ratios and maintain large candidate boxes, the system's memory and computing power overhead are significantly reduced. This allows the underwater equipment to achieve high-frame-rate real-time continuous tracking and accurate counting of high-density, slender organisms or special operation targets in complex underwater acoustic environments, even under extremely stringent battery power constraints.
[0033] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for tracking and counting slender targets, characterized in that, Includes the following steps: S1. Acquire the real sonar video stream and perform filtering and preprocessing to extract the physical feature base map; S2. Dimensionality reduction and joint representation of center point-direction of slender target geometric skeleton: Target detection is performed on the physical feature base map, and the detected targets are dimensionally reduced and extracted into direction vectors containing the physical coordinates of the target center point and the physical deflection angle of the principal axis, and a set of geometric skeleton representations is constructed. S3. Deformation-resistant data association based on spatial and directional consistency: In continuous time frames, based on the extracted center point and direction vector, the spatial Euclidean distance cost and angular deflection cost between physical targets are calculated. The joint cost matrix is used and the Hungarian algorithm is used to complete the identity matching of the same source targets in the previous and next frames, and the initial target trajectory set is generated. S4. Global trajectory fragment merging based on spatiotemporal and motion consistency: Perform global post-processing on the initial target trajectory set, extract the life cycle breakpoints, spatial endpoint coordinates and motion velocity vectors of each short trajectory segment, comprehensively determine the temporal adjacency, spatial proximity and motion direction consistency, force connect and smooth repair multiple fragment trajectories belonging to the same physical target, and reconstruct them into continuous physical trajectories. S5. Deduplication verification and high-fidelity physical counting based on trajectory duration period: For each reconstructed continuous physical trajectory, evaluate its survival frame count and physical displacement in the sonar effective field of view, perform single-accumulation counting on real effective trajectories that exceed the preset life cycle threshold, and finally output the accurate total number of physical targets in the physical water area.
2. The method for tracking and counting slender targets according to claim 1, characterized in that, The specific physical logic and mathematical model for the association between the center point-direction joint characterization and the deformation resistance data are as follows: Regarding the first i For each target, its geometric skeleton state vector is defined as follows: ,in For the goal i Coordinates of the center point on the physical section of the two-dimensional sonar. For the goal i The angle of the principal axis relative to the reference coordinate system; In the t -1 frame trajectory target i With the t New detection target of the frame j Construct a joint cost matrix between them, which matches the total cost. Defined as: ; in, α As a weighting factor for physical spatial distance, β As the directional consistency weighting factor, ( x j , y j ) as the new detection target j Coordinates of the center point on the physical section of the two-dimensional sonar. θ j For new detection targets j The angle of the principal axis relative to the reference coordinate system.
3. The method for tracking and counting slender targets according to claim 1, characterized in that, The global trajectory fragment merging includes the following physical logic judgment mode. Suppose that there are any two independent fracture trajectories within the system buffer pool. Tr m and fracture trajectory Tr n Extract the fracture trajectory respectively Tr m Disappearance of terminal state With fracture trajectory Tr n The initial state of appearance ;in, fracture trajectory Tr m At the terminal moment, fracture trajectory Tr m The physical location coordinates of the terminal. fracture trajectory Tr m The velocity vector of the terminal, fracture trajectory Tr n At the beginning, fracture trajectory Tr n The physical coordinates of the initial end. fracture trajectory Tr n The initial velocity vector; The fracture trajectory is determined if and only if the following three physical conditions are met simultaneously. Tr m and fracture trajectory Tr n For fragments of the same physical target, perform trajectory stitching: Temporal adjacency: The time discontinuity of the two broken trajectories is within the maximum allowed number of lost frames. T gap Within the range; Spatial proximity: The recurring physical positional shift falls within the reasonable boundary of underwater organism swimming speed. D max Inside; Motion consistency: The physical velocity vectors of the target remain highly similar before and after the fracture. τ dir is the direction cosine similarity threshold.
4. The method for tracking and counting slender targets according to claim 1, characterized in that, The deduplication verification logic is as follows: Extracting the physical survival time of the reconstructed continuous physical trajectory T life ; Establish target total accumulator Count When a continuous physical trajectory terminates or leaves the sonar detection boundary, a decision is made: like Then the continuous physical trajectory is confirmed as a real and valid physical movement event. ; like If the trajectory is determined to be a false alarm trajectory caused by acoustic background noise or brief clutter, it will be discarded and not included in the total count. in, T life = t last - t first , t first The start time of the continuous physical trajectory. t last The termination time of the continuous physical trajectory; T valid This is the threshold for false alarm trajectories.
5. A slender target tracking and counting system for implementing the slender target tracking and counting method as described in claim 1, characterized in that, include: Real sonar data access and filtering module: used to receive and parse the raw baseband data stream of the underlying forward-looking sonar device in real time, and perform hard-line filtering preprocessing based on the real acoustic echo characteristics; Skeleton dimensionality reduction and feature extraction accelerator: Built-in lightweight convolution or perceptual neural network operators are responsible for parallel dimensionality reduction of target pixel blocks into multi-dimensional floating-point vector matrices with center point and orientation in physical memory; Deformation-resistant data association and trajectory stitching processor: Deploys computational units with cost models and logical judgments, dynamically maintains trajectory status, and performs matrix alignment and global stitching scheduling of historical fragment trajectories in the cache; Deduplication counting and visualization output module: Combines the continuous period of the trajectory to trigger the counting interrupt, and outputs the accurate physical statistics and sonar video stream with continuous trajectory IDs to the display terminal.
6. A storage medium having a computer program stored thereon, characterized in that, When executed by a microprocessor, the computer program implements the elongated target tracking and counting method as described in claim 1.
7. An underwater vehicle, comprising an acoustic detection sensor and an edge computing device, characterized in that, The edge computing device is equipped with the slender target tracking and counting system as described in claim 5, and the edge computing device adopts a low-power heterogeneous computing platform.
8. The underwater submersible according to claim 7, characterized in that, The heterogeneous computing platform uses FPGA, Ascend, or RK3588.