A method and system for underwater target localization based on side scan sonar data
By converting side-scan sonar data into a universal image format and combining it with convolutional neural networks and Kalman filtering algorithms, high-precision and real-time positioning of underwater targets is achieved, solving the problems of insufficient positioning accuracy and real-time performance in existing technologies. This technology is suitable for marine engineering inspection and underwater search and rescue.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN WEIZHUO SMART MARINE TECH CO LTD
- Filing Date
- 2025-08-01
- Publication Date
- 2026-07-21
Smart Images

Figure CN120932081B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of underwater detection and positioning technology, specifically relating to an underwater target positioning method and system based on side-scan sonar data. It can be widely used in scenarios requiring precise positioning of underwater targets, such as marine engineering inspection, underwater search and rescue, seabed resource exploration, and seabed mapping. Background Technology
[0002] Side-scan sonar, as an important tool for underwater detection, can acquire acoustic image information of underwater topography and target objects by emitting sound waves and receiving reflected echoes. Existing underwater target localization methods based on side-scan sonar data have several limitations: Positioning accuracy is greatly affected by the environment. Due to the complex and variable underwater environment, the inhomogeneity of the water medium and the refraction and scattering phenomena during sound wave propagation can cause distortion of the sonar echo signal, resulting in significant errors in the target position calculated based on echo time and angle. This is especially true in deep-sea and turbid water environments, where positioning accuracy drops significantly. Furthermore, relying solely on a single data source like side-scan sonar provides limited information, and existing methods often fail to fully integrate GPS positioning information, inertial navigation data, and other auxiliary information, making it difficult to further improve the accuracy and reliability of positioning. In addition, traditional methods require opening and analyzing the side-scan data in specialized software after the operation to identify and locate the target object, resulting in low timeliness.
[0003] In view of the above problems, there is an urgent need for a method that can overcome the shortcomings of existing technologies and improve the accuracy, reliability and real-time performance of underwater target positioning. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide an underwater target localization method and system based on side-scan sonar data to solve at least one of the above-mentioned technical problems.
[0005] To achieve the above objectives, in a first aspect, the present invention provides an underwater target localization method based on side-scan sonar data, comprising the following steps: S1: Read the side-scan sonar data file in the target format, parse and extract the sonar image data, and convert the sonar image data into sonar image data in a general image format; S2: Input the sonar image data in the general image format into a pre-trained convolutional neural network model for target detection, identify underwater targets, and output their relative coordinates (x', y') in the sonar image; S3: Parse the sonar device attitude data, ship attitude data, and ship position data from the side-scan sonar data file in the target format. Based on the Kalman filter algorithm, fuse the sonar device attitude data, ship attitude data, and ship position data to calculate the real-time geodetic coordinates (X', Y') of the side-scan sonar device when acquiring the sonar image data; wherein, the geodetic coordinates are based on the real-time Cartesian coordinate system. S4: Based on the relative coordinates (x', y') of the underwater target in the sonar image obtained in step S2, the real-time geodetic coordinates (X', Y') of the sonar device obtained in step S3, and combined with the water depth (h), the slant range (d) of the sound wave propagation, and the beam angle (θ) of the side-scan sonar at the time of data acquisition, the absolute geographic coordinates of the underwater target are calculated using the side-scan sonar beam propagation geometric model; wherein, the absolute geographic coordinates are latitude and longitude coordinates.
[0006] In a further embodiment, in step S1, after converting the sonar image data into a general image format, the sonar image data in the general image format undergoes the following preprocessing steps: denoising, gain adjustment, and horizontal and vertical balancing processing using statistical methods.
[0007] In a further embodiment, the training method of the pre-trained convolutional neural network model includes: Obtain a historical side-scan sonar image dataset containing bounding box information labeled with underwater target categories and their locations in sonar images; The historical side-scan sonar image data is preprocessed, including denoising, gain adjustment, lateral balancing, and longitudinal balancing. The preprocessed dataset is divided into training, validation and test sets according to a predetermined ratio, and data augmentation operations such as random rotation and brightness adjustment are applied to the training set data. Construct a convolutional neural network model, train the model using the training set, and monitor overfitting and optimize hyperparameters using the validation set during the training process. The hyperparameters include at least the learning rate and batch size. The performance of the convolutional neural network model is evaluated using the test set, and the trained model file is exported after the preset performance index is reached.
[0008] In a further embodiment, the step S3, which involves fusing sonar device attitude data, ship attitude data, and ship position data based on the Kalman filter algorithm, specifically includes: The sonar equipment attitude data, ship attitude data, and ship position data are used as input observations for the Kalman filter; The motion state of sonar equipment is predicted and updated using a Kalman filter; Based on the uncertainties and measurement errors during the movement of the sonar equipment, the position and attitude of the sonar equipment in space are predicted and updated, and finally the real-time geodetic coordinates (X', Y') of the sonar equipment with higher accuracy are output.
[0009] In a further embodiment, the conversion process of the side-scan sonar beam propagation geometry model in step S4 specifically includes: Based on the relative coordinates (x', y') of the underwater target in the sonar image and the horizontal dimension of the sonar image data in a common image format, combined with the beam angle (θ) of the side-scan sonar, the horizontal yaw angle of the underwater target relative to the sonar baseline is calculated. Using the slant distance (d) of sound wave propagation and the water depth (h), the horizontal projection distance L from the target to the sonar is calculated through a right triangle relationship; Using the real-time geodetic coordinates (X', Y') of the sonar equipment as a reference, and combining the horizontal yaw angle, the horizontal projection distance L, and the heading angle in the attitude data of the sonar equipment, the planar offset (ΔX, ΔY) of the underwater target relative to the real-time position coordinates (X', Y') of the sonar equipment in the horizontal plane is calculated. The planar offset (ΔX, ΔY) is superimposed on the real-time geodetic coordinates (X', Y') of the sonar device to obtain the two-dimensional planar coordinates of the underwater target in the real-time planar rectangular coordinate system; The two-dimensional plane coordinates are converted into latitude and longitude coordinates based on the latitude and longitude coordinate system.
[0010] In a further embodiment, the underwater target localization method further includes the following steps: S5: Write the latitude and longitude coordinates of the underwater target calculated in step S4, the acquisition timestamp of the side-scan sonar data file, and the sonar device attitude data parsed in step S3 into the output file in real time.
[0011] In a further embodiment, in step S1, the data parsed from the side-scan sonar data file of the target format also includes sound velocity profile data of the target water area. When calculating the slant range (d) in step S3 and / or when calculating using the slant range (d) in step S4, the sound velocity profile data is used to correct the sound wave propagation time or the corresponding distance.
[0012] In a second aspect, an underwater target localization system based on side-scan sonar data, which implements the method described in the first aspect, is provided, comprising: The data acquisition module is used to acquire side-scan sonar data files in a target format, the files containing sonar image data, sonar equipment attitude data, ship attitude data, and ship position data; The data processing and storage module is used to store the collected data and the data required for system operation; The image preprocessing module is used to parse the side-scan sonar data file of the target format, extract the sonar image data and convert it into a general image format, and perform noise reduction, gain adjustment, lateral balance and longitudinal balance processing on the sonar image data of the general image format. The target detection module contains a pre-trained convolutional neural network model, which is used to receive pre-processed sonar image data, identify underwater targets, and output their relative coordinates (x', y') in the image; The sonar equipment coordinate fusion module is used to parse sonar equipment attitude data, ship attitude data, and ship position data from the side-scan sonar data file in the target format, fuse the sonar equipment attitude data, ship attitude data, and ship position data based on the Kalman filter algorithm, and output the real-time geodetic coordinates (X', Y') of the side-scan sonar equipment when acquiring the sonar image data; wherein, the geodetic coordinates are based on a real-time plane rectangular coordinate system; The target absolute coordinate calculation module is used to calculate the latitude and longitude coordinates of the underwater target based on the relative coordinates (x', y') of the underwater target in the sonar image, the real-time geodetic coordinates (X', Y') of the sonar equipment, the water depth (h) when the data was collected, the slant range (d) of the sound wave propagation, and the beam angle (θ) of the side-scan sonar, through the side-scan sonar beam propagation geometric model. The output module is used to output the latitude and longitude coordinates and related positioning parameters of the underwater target in real time.
[0013] In some possible implementations, the image preprocessing module is further configured to: perform denoising, gain adjustment, and horizontal and vertical balancing on the sonar image data in the general image format using statistical methods.
[0014] In some possible implementations, the underwater target localization system further includes a model training module, which comprises: The data acquisition unit is used to acquire a historical side-scan sonar image dataset containing bounding box information labeled with the underwater target category and its location in the sonar image; The data preprocessing unit is used to perform preprocessing on the historical side-scan sonar image data, including denoising, gain adjustment, lateral balancing and longitudinal balancing. The dataset partitioning unit is used to divide the preprocessed dataset into training set, validation set and test set according to a predetermined ratio, and to apply data augmentation operations such as random rotation and brightness adjustment to the training set data. The model training unit is used to construct a convolutional neural network model, train the model using the training set, and monitor overfitting and optimize hyperparameters using the validation set during the training process. The hyperparameters include at least the learning rate and batch size. The model evaluation unit is used to evaluate the performance of the convolutional neural network model using the test set, and export the trained model file after the preset performance index is reached.
[0015] In some possible implementations, the sonar device coordinate fusion module includes: The observation input unit is used to take the sonar equipment attitude data, ship attitude data and ship position data as the input observation values of the Kalman filter; The state prediction unit is used to predict and update the motion state of the sonar equipment using a Kalman filter; The data fusion unit is used to comprehensively predict and update the position and attitude of the sonar equipment in space based on the uncertainties and measurement errors during the movement of the sonar equipment, and finally output the real-time geodetic coordinates (X',Y') of the sonar equipment with higher accuracy.
[0016] In some possible implementations, the target absolute coordinate calculation module specifically includes: The yaw angle calculation unit is used to calculate the horizontal yaw angle of the underwater target relative to the sonar baseline based on the relative coordinates (x', y') of the underwater target in the sonar image and the horizontal dimension of the sonar image data in a common image format, combined with the beam angle (θ) of the side-scan sonar. The horizontal distance calculation unit is used to calculate the horizontal projection distance L from the target to the sonar by using the slant range (d) of sound wave propagation and the water depth (h) through a right triangle relationship; The planar offset calculation unit is used to calculate the planar offset (ΔX, ΔY) of the underwater target relative to the real-time position coordinates (X', Y') of the sonar equipment in the horizontal plane, based on the real-time geodetic coordinates (X', Y') of the sonar equipment, combined with the horizontal yaw angle, the horizontal projection distance L, and the heading angle in the attitude data of the sonar equipment. The coordinate overlay unit is used to overlay the plane offset (ΔX, ΔY) onto the real-time geodetic coordinates (X', Y') of the sonar device to obtain the two-dimensional plane coordinates of the underwater target in the plane projection coordinate system; The coordinate transformation unit is used to convert the two-dimensional plane coordinates into latitude and longitude coordinates based on the latitude and longitude coordinate system.
[0017] In some possible implementations, the output module is further configured to write the latitude and longitude coordinates of the underwater target, the acquisition timestamp of the side-scan sonar data file, and the attitude data of the sonar device into the output file in real time.
[0018] In some possible implementations, the data acquisition module is further configured to: parse the sound velocity profile data of the target water area from the side-scan sonar data file of the target format; the target absolute coordinate calculation module is further configured to: when calculating using slant range (d), use the sound velocity profile data to correct the sound wave propagation time or the corresponding distance.
[0019] The above technical solution has the following beneficial effects: Step S1 converts the side-scan sonar data files into a universal image format, avoiding the dependence on specialized software required by traditional proprietary formats, thus improving the compatibility and convenience of data processing and providing a standardized image data foundation for subsequent target detection. Step S2 uses a pre-trained convolutional neural network model for target detection. Compared to traditional manual recognition or simple algorithms, this model can quickly and accurately identify underwater targets from sonar images and output their relative coordinates, significantly improving the efficiency and accuracy of target recognition. Step S3 fuses multi-source attitude and position data from the sonar equipment and the ship using a Kalman filter algorithm. This effectively integrates information from different data sources, reduces the impact of single data errors on the sonar equipment's own positioning, and significantly improves the real-time geodetic coordinate accuracy of the sonar. The reliability of the method is improved, which solves the problem of insufficient positioning accuracy caused by the limited information from a single data source in traditional methods. Step S4 combines relative coordinates, sonar geodetic coordinates, and parameters such as water depth, slant range, and beam angle. It realizes the mapping from image coordinates to latitude and longitude coordinates through the geometric model of side-scan sonar beam propagation. It fully considers the geometric relationship of sound wave propagation and environmental parameters, corrects the interference of underwater environment (such as water inhomogeneity and sound wave refraction and scattering) on positioning, and significantly improves the absolute positioning accuracy of underwater targets, especially in complex environments such as deep sea and turbid water. The whole process forms a closed loop from data processing to positioning output, realizing the real-time positioning of targets. It can effectively meet the needs of marine engineering inspection, underwater search and rescue and other scenarios for accurate, reliable and real-time positioning. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of an underwater target localization method based on side-scan sonar data according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the reading of an XTF file and its conversion into an image according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the calculation of relative coordinates using the target localization algorithm in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the calculation of latitude and longitude coordinates according to an embodiment of the present invention; Figure 5 This is a flowchart of an underwater target localization method based on side-scan sonar data according to an embodiment of the present invention; Figure 6 This is a functional block diagram of an underwater target localization system based on side-scan sonar data according to an embodiment of the present invention; Figure 7 This is a functional block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Example 1 This invention provides an underwater target localization method based on side-scan sonar data. By improving data processing and localization calculation methods and combining multi-source information fusion, it improves the localization accuracy, reliability, and real-time performance of single and multiple underwater targets in complex underwater environments, and solves the problems of large localization error and poor real-time performance of existing methods.
[0024] like Figure 1 As shown, an underwater target localization method based on side-scan sonar data includes the following steps: S1: Read the side-scan sonar data file in the target format, parse and extract the sonar image data, and convert the sonar image data into sonar image data in a general image format; S2: Input the sonar image data in the general image format into a pre-trained convolutional neural network model for target detection, identify underwater targets, and output their relative coordinates (x', y') in the sonar image; S3: Parse the sonar device attitude data, ship attitude data, and ship position data from the side-scan sonar data file in the target format. Based on the Kalman filter algorithm, fuse the sonar device attitude data, ship attitude data, and ship position data to calculate the real-time geodetic coordinates (X', Y') of the side-scan sonar device when acquiring the sonar image data; wherein, the geodetic coordinates are based on the real-time Cartesian coordinate system. S4: Based on the relative coordinates (x', y') of the underwater target in the sonar image obtained in step S2, the real-time geodetic coordinates (X', Y') of the sonar device obtained in step S3, and combined with the water depth (h), the slant range (d) of the sound wave propagation, and the beam angle (θ) of the side-scan sonar at the time of data acquisition, the absolute geographic coordinates of the underwater target are calculated using the side-scan sonar beam propagation geometric model; wherein, the absolute geographic coordinates are latitude and longitude coordinates.
[0025] This method reads and converts sonar data formats for standardized preprocessing, automatically identifies targets using a pre-trained convolutional neural network and outputs relative image coordinates, dynamically corrects the real-time geodetic coordinates of the sonar equipment by fusing sonar and ship attitude and position data through Kalman filtering, and finally converts the relative image coordinates into latitude and longitude coordinates by combining water depth, slant range, and beam angle, based on the side-scan sonar beam propagation geometry model. The coordinated operation of these steps, through multi-source data fusion and spatial geometric operations, effectively improves the accuracy, real-time performance, and reliability of underwater target positioning in complex marine environments.
[0026] In some embodiments, in step S1, after the sonar image data is converted into a general image format, the sonar image data in the general image format undergoes the following preprocessing steps: denoising, gain adjustment, and horizontal and vertical balancing using statistical methods. Specifically, after converting the sonar image data to a common format such as PNG or TIFF in step S1, the following preprocessing is required to improve image quality: Adaptive median filtering is used, processing pixel by pixel in a 3×3 initial window. Noise points exceeding the threshold are replaced with the median, and continuous noise is expanded to a 5×5 window to balance denoising and edge preservation. Adaptive gain adjustment based on histogram equalization is employed to enhance the difference between the target and the background by stretching or compressing the grayscale range. Lateral balancing is performed, calculating the grayscale mean and standard deviation row by row along the sonar beam scanning direction, and linearly adjusting rows that deviate from the overall mean to eliminate unevenness caused by beam sensitivity differences. Vertical balancing is performed, calculating the grayscale mean and standard deviation column by column along the ship's navigation direction, and linearly adjusting columns that deviate from the overall mean to eliminate drift caused by depth changes or scattering fluctuations. Ultimately, this results in suppressed image noise, balanced grayscale distribution, and prominent target features, providing reliable input for subsequent target detection.
[0027] In some embodiments, the training method of the pre-trained convolutional neural network model includes: Obtain a historical side-scan sonar image dataset containing bounding box information labeled with underwater target categories and their locations in sonar images; The historical side-scan sonar image data is preprocessed, including denoising, gain adjustment, lateral balancing, and longitudinal balancing. The preprocessed dataset is divided into training, validation and test sets according to a predetermined ratio, and data augmentation operations such as random rotation and brightness adjustment are applied to the training set data. A convolutional neural network model is constructed and trained using the training set. During training, the validation set is used to monitor overfitting and optimize hyperparameters. Hyperparameters include at least the learning rate and batch size; other hyperparameters may include optimizer parameters, such as the β1 and β2 momentum parameters of the Adam optimizer, which affect the stability of gradient estimation; regularization parameters, such as the L1 / L2 regularization coefficient and Dropout ratio, used to suppress overfitting; network structure parameters, including the number and size of convolutional kernels, pooling window size, and number of network layers, which determine the model's feature extraction capability; learning rate scheduling strategies, such as cosine annealing and step decay, to optimize the convergence process by dynamically adjusting the learning rate; and the number of training epochs should be combined with an early stopping mechanism to balance the sufficiency of model training with the risk of overfitting.
[0028] The performance of the convolutional neural network model is evaluated using the test set. Once the preset performance metrics are met, the trained model file is exported. These preset performance metrics may include: target detection accuracy ≥ 85%, recall ≥ 80%, F1 score ≥ 82% to balance detection precision and coverage; mean accuracy (mAP, IoU threshold 0.5) ≥ 80% to ensure stable detection capability for different types and shapes of targets; and inference speed ≥ 10 FPS to meet real-time processing requirements. These metrics need to be validated on a test set containing different water areas, noise levels, and target types. Once all metrics are met, the trained model file is exported.
[0029] In some embodiments, the step S3, which involves fusing sonar device attitude data, ship attitude data, and ship position data based on the Kalman filter algorithm, specifically includes: The sonar equipment attitude data, ship attitude data, and ship position data are used as input observations for the Kalman filter. Specifically, the sonar equipment attitude data includes real-time attitude parameters such as roll, pitch, and heading angles during sonar operation; the ship attitude data includes motion parameters such as roll, pitch, heading, and speed; and the ship position data mainly consists of real-time Cartesian coordinates obtained by the ship through GPS or other positioning devices. These data need to be time-synchronized before being input into the Kalman filter to ensure that each parameter corresponds to the same sampling time. Simultaneously, the attitude parameters in the ship's coordinate system need to be uniformly converted to the geodetic coordinate system through coordinate transformation to eliminate coordinate offsets caused by differences in equipment installation locations. This ultimately forms an observation vector containing multi-dimensional information, providing comprehensive measurement data for the filter.
[0030] The motion state of sonar equipment is predicted and updated using a Kalman filter. Specifically, in the prediction stage, based on the motion state of the sonar equipment at the previous moment (including position, velocity, attitude angle, etc.), and combined with a preset motion model (such as a uniform linear motion model or a uniformly accelerated motion model), the estimated state value at the current moment is inferred. This process introduces process noise to cover motion deviations caused by uncontrollable factors such as water flow interference and equipment vibration. In the update stage, the input observation value is compared with the estimated value in the prediction stage. By calculating the Kalman gain (which balances the reliability of the predicted value and the observation value; the gain is larger when the accuracy of the observation data is high, and smaller when the accuracy is low), the predicted value is corrected to obtain the optimal estimate of the current state that integrates multi-source information, realizing dynamic adjustment from theoretical prediction to experimental correction.
[0031] Based on the uncertainties and measurement errors inherent in the sonar equipment's movement, the system predicts and updates the sonar equipment's position and attitude in space, ultimately outputting more accurate real-time geodetic coordinates (X', Y'). Specifically, the uncertainties in the sonar equipment's movement mainly manifest as trajectory deviations caused by water flow impacts and attitude fluctuations induced by mechanical vibrations, which are quantified using a process noise covariance matrix. Measurement errors stem from the inherent accuracy limitations of the sensors (e.g., GPS positioning drift, attitude sensor measurement noise), and are characterized by an observation noise covariance matrix. During iteration, the Kalman filter continuously adjusts the prediction and update weights based on the statistical characteristics of these two types of errors: when the equipment's movement is stable and the measurement data is reliable, the filter relies more on observations to correct the state; when the movement is violent or the measurement data is abnormal, the filter increases the weights of the prediction model to smooth the errors. After multiple iterations, the sonar equipment position (X', Y') output by the filter effectively offsets the random errors and systematic biases of a single sensor, ultimately achieving real-time geodetic coordinates with 15%-30% higher accuracy than the original measurement data, providing a stable reference coordinate for subsequent underwater target positioning.
[0032] In some embodiments, the conversion process of the side-scan sonar beam propagation geometry model in step S4 specifically includes: S41: Based on the relative coordinates (x', y') of the underwater target in the sonar image and the horizontal pixel size of the image, combined with the beam angle (θ) of the side-scan sonar, calculate the horizontal yaw angle α of the underwater target relative to the sonar baseline; Specifically, the horizontal yaw angle α is the horizontal angle between the target direction and the sonar baseline. The calculation process is as follows: First, determine the pixel position (horizontal dimension / 2) corresponding to the center line of the sonar image. Then, multiply the deviation of the target's horizontal coordinate x' from the center line by half the image width by the half-beam angle (θ / 2) to obtain the horizontal yaw angle α. When the target is located at the far left of the image, α = -θ / 2; at the far right, α = θ / 2; and at the center, α = 0°. This mapping establishes a linear correspondence between the pixel coordinate system of the sonar image and the actual spatial angle.
[0033] S42: Using the slant distance (d) of sound wave propagation and the vertical water depth (h), calculate the horizontal projection distance L from the underwater target to the seabed projection point of the sonar equipment through a spatial right-angled trigonometric model; Specifically, the horizontal projection distance L refers to the straight-line distance from the underwater target on the horizontal plane to the projection point (point P) on the seabed directly below the sonar equipment. In the right triangle formed by the sonar, target, and projection point, the slant distance d from the sonar to the target is taken as the hypotenuse, and the vertical height h from the sonar to the seabed is taken as the leg. The length L of the horizontal leg is calculated using the Pythagorean theorem. In actual implementation, the slant distance d needs to be corrected for propagation time based on the sound velocity profile data, and the vertical water depth h needs to be obtained by converting pressure sensor data with seawater density.
[0034] S43: Using the real-time plane coordinates (X', Y') of the sonar equipment as a reference, combined with the horizontal yaw angle α, the horizontal projection distance L and the heading angle β (true north azimuth angle in the attitude data of the sonar equipment), calculate the plane offset (ΔX, ΔY) of the target in the horizontal plane. Specifically, the planar offset (ΔX, ΔY) characterizes the target's positional deviation relative to the sonar in the planar projected coordinate system. First, the target's absolute azimuth angle γ = β + α (the vector sum of the heading and yaw angles) is calculated. Then, through polar coordinate transformation: the eastward offset component ΔX is obtained by multiplying L by the sine of γ, and the northward offset component ΔY is obtained by multiplying L by the cosine of γ. The offset directions strictly correspond to the coordinate system axes (positive X-axis is east, positive Y-axis is north).
[0035] S44: Vector superposition of the planar offset (ΔX,ΔY) with the real-time planar coordinates (X',Y') of the sonar equipment to obtain the absolute coordinates (T_x,T_y) of the underwater target in the planar projected coordinate system (a type of plane rectangular coordinate system); Specifically, the calculation rule for the target plane coordinates is: T_x = X' + ΔX (eastward coordinate superposition), T_y = Y' + ΔY (northward coordinate superposition). This calculation enforces the principle of the same coordinate system (both sonar coordinates and offsets are based on the same plane projection coordinate system, such as CGCS2000 Gaussian projection), ensuring the mathematical validity of vector superposition.
[0036] S45: Convert the target plane coordinates (T_x, T_y) into latitude and longitude coordinates using a projection inverse algorithm; Specifically, based on the parameters of the planar projection coordinate system used by the sonar equipment coordinates (X', Y') (including projection type, central meridian, and ellipsoid parameters), the planar coordinates are inversely transformed into geographic coordinates using standard inverse kinematics formulas. The transformation process utilizes surveying tools such as the PROJ library, outputting latitude and longitude values conforming to the EPSG:4490 standard (longitude range [-180°, 180°], latitude range [-90°, 90°]), where longitude represents the angular distance between the target and the prime meridian, and latitude represents the angular distance between the target and the equatorial plane.
[0037] In some embodiments, the underwater target localization method further includes the step of: S5: Write the latitude and longitude coordinates of the underwater target calculated in step S4, the acquisition timestamp of the side-scan sonar data file, and the sonar device attitude data parsed in step S3 into the output file in real time.
[0038] In some embodiments, in step S1, the data parsed from the side-scan sonar data file of the target format also includes sound velocity profile data of the target water area. When calculating the slant range (d) in step S3 and / or when calculating using the slant range (d) in step S4, the sound velocity profile data is used to correct the sound wave propagation time or the corresponding distance.
[0039] The following describes in detail the underwater target localization method based on side-scan sonar data according to an embodiment of the present invention through specific examples. The specific steps are as follows: I. Data Acquisition and Preprocessing In the data acquisition step, side-scan sonar equipment is used to collect data in the target water area, simultaneously acquiring side-scan sonar echo data and the sonar equipment's own attitude data (including roll, pitch, and heading angles), and obtaining the ship's position and attitude information from the integrated navigation system. At the same time, sound speed profile data of the target water area is collected for subsequent sound wave propagation time correction.
[0040] In the XTF format conversion step, side-scan sonar typically outputs XTF format files, which require software like SonarWiz to read and recognize. This solution uses Python programming to read XTF format files and convert them into image format, facilitating subsequent image preprocessing and model training. Figure 2 As shown, it is a schematic diagram of reading an XTF file (left image) and converting it into an image (right image).
[0041] In the image preprocessing step, the acquired side-scan sonar echo data is denoised, and the image gain is adjusted to brighten the image for easier model recognition. Then, statistical methods are used to perform lateral and longitudinal balancing to filter out salt-and-pepper noise present in the image.
[0042] II. Model Training and Testing In the data preparation and annotation steps, the preprocessed side-scan sonar images are fully annotated, and the annotation content covers the category and location of the target object (e.g., bounding box).
[0043] In the dataset partitioning step, the labeled data is divided into a training set (70%), a validation set (15%), and a test set (15%) to ensure that the three types of data do not overlap.
[0044] In the model building and training steps, a convolutional neural network (CNN) model is built, which automatically learns local features of sonar images (such as edges and textures) through convolutional layers; data augmentation (such as random rotation and brightness adjustment) is introduced during the training phase to improve the model's generalization ability; and a validation set is used to monitor overfitting and optimize hyperparameters (such as learning rate and batch size).
[0045] In the model testing and evaluation step, the model performance is evaluated on the test set, and the target recognition effect is quantified by indicators such as accuracy and recall.
[0046] Finally, the trained model is saved as a file and deployed in the runtime environment. In actual operation, it can be recognized in real time based on the data collected by side scanning.
[0047] III. Coordinate Calculation of Underwater Targets In the relative coordinate calculation step, the target localization algorithm is run to calculate the target's relative coordinates (x', y') in the image. For example... Figure 3 As shown, the coordinates of the target point in the image are calculated to be (820, 413). Running the target localization algorithm refers to the process of performing target detection using a pre-trained CNN model.
[0048] In the position fusion step, based on the side-scan sonar attitude information, ship attitude and position information stored in the XTF file, the Kalman filter algorithm is used to predict and update the motion state and target position of the sonar equipment. Taking into account the uncertainties and measurement errors in the motion process of the sonar equipment, the geodetic coordinates (X', Y') of the side-scan sonar (based on EPSG:4528 coordinates) are calculated.
[0049] In the steps of calculating latitude and longitude coordinates, such as Figure 4As shown, based on the principle of side-scan sonar, the absolute coordinates of the target object are calculated by combining the water depth h, slant range d, and beam angle θ when the data is collected, along with the target's relative coordinates (x', y') and the side-scan sonar coordinates (X', Y'), and then converted into latitude and longitude coordinates, based on EPSG:4490 coordinates.
[0050] Specifically, such as Figure 4 As shown, Figure 4 A geometric model for underwater target localization based on side-scan sonar data is presented. The position of the side-scan sonar mounted on the bottom of the ship corresponds to the geodetic coordinates (X', Y') (calculated by fusing sonar attitude, ship attitude, and position information from the integrated navigation system using Kalman filtering); h is the water depth at the time of data acquisition (vertical distance from the sonar to the seabed), d is the slant range from the sonar to the underwater target (path length of sound wave propagation), and θ is the beam angle of the side-scan sonar (determining the lateral detection coverage); the relative coordinates (x', y') of the underwater target in the sonar image are detected and output by a neural network model (representing the target's position within the sonar image). Based on the above parameters, the horizontal offset of the target relative to the sonar is derived by using the beam propagation geometry of the side-scan sonar, combined with the water depth h, slant range d, and beam angle θ. Then, using the geodetic coordinates (X', Y') as a reference, the image relative coordinates (x', y') are mapped to the real geographic space, and finally converted into latitude and longitude coordinates (based on the EPSG:4490 coordinate system), realizing the conversion of underwater target from image recognition results to absolute geographic location.
[0051] IV. Real-time output like Figure 5 As shown, the target location information obtained from the positioning calculation is output to a file in real time for convenient subsequent statistics and analysis. This embodiment of an underwater target localization method based on side-scan sonar data includes the following steps: S1.Xtf file reading and conversion to images: Receives external input XTF format files (containing side-scan sonar echo data, sonar device attitude information, etc.), parses the file structure using Python programming, extracts sonar image data, and converts it into a common image format (e.g., JPEG, PNG), providing a visual data foundation for subsequent image preprocessing, model training, and detection.
[0052] S2. Image preprocessing of sample data (model training branch): For the sample images used for model training (from the conversion results of XTF files), perform denoising (e.g., median filtering to suppress salt and pepper noise), gain adjustment (to increase image brightness to enhance target visibility), and use statistical methods to achieve horizontal and vertical balance of the image (correcting sonar echo amplitude distortion) to optimize image quality to support efficient model learning.
[0053] S3. Neural Network Model Training: First, label the target category and bounding box position on the preprocessed sample images, and divide them into training set, validation set, and test set according to the ratio of 70%, 15%, and 15% respectively; construct a convolutional neural network (CNN) and use convolutional layers to extract local features of sonar images (such as edges and textures); introduce data augmentation (random rotation, brightness adjustment) during training to improve generalization ability, monitor overfitting and optimize hyperparameters such as learning rate and batch size through the validation set; finally, quantify the model performance on the test set by accuracy and recall to complete the training.
[0054] S4. Export Model: Save the trained neural network model as a deployable file format (e.g., .pth, .h5) for easy loading and calling in actual tasks to achieve object detection functionality.
[0055] S5. Image preprocessing of real data (target detection branch): For sonar images (converted from XTF files) acquired in actual operations, perform denoising, gain adjustment, and horizontal / vertical balancing operations consistent with sample preprocessing, and add an additional cropping step (focusing on the target region and reducing invalid data) to output high-quality images that meet the model input requirements.
[0056] S6. Run the model for target detection: Load the exported neural network model and input the preprocessed real sonar image into the model; the model identifies underwater targets through feature matching and outputs the target's existence, category, and location information within the image (e.g., bounding box coordinates).
[0057] S7. Check model execution results: Read the detection results output by the model and determine whether an underwater target was detected. If no target was detected, the process proceeds directly to "End"; if a target was detected, the process proceeds to the subsequent coordinate calculation steps.
[0058] S8. Target Coordinate Calculation: First, extract the target's relative coordinates (x', y') in the image; combine the sonar attitude (roll, pitch, and heading angles) and ship position / attitude (integrated navigation system data) from the XTF file, and use the Kalman filter algorithm to fuse motion errors and measurement noise to calculate the geodetic coordinates (X', Y') of the side-scan sonar (based on the EPSG:4528 coordinate system); then, combine the water depth h, slant range d, and beam angle θ, and according to the side-scan sonar principle, fuse the relative coordinates with the geodetic coordinates to obtain the target's latitude and longitude, based on the EPSG:4490 coordinate system.
[0059] S9. Output Results: Outputs target latitude and longitude, positioning parameters (such as attitude and time) and other information to a file (such as CSV or TXT) in real time to support subsequent statistical analysis and visualization applications.
[0060] The advantages of the embodiments of the present invention are as follows: By collecting sound velocity profile data to correct echo propagation time, and combining sonar equipment attitude, ship attitude calibration, and data fusion processing, the influence of underwater environmental factors on positioning is effectively compensated, and the positioning accuracy is improved by more than 10% compared with traditional methods.
[0061] By employing optimized data processing and positioning calculation algorithms, the model library can be run to locate the target immediately after a frame of data is collected, reducing the response time by more than 40%.
[0062] By fusing ship positioning data and relative positioning data from side-scan sonar, and utilizing the Kalman filter algorithm, the influence of multiple factors is comprehensively considered, effectively suppressing measurement errors and environmental interference, and improving the reliability and stability of positioning results.
[0063] Example 2 like Figure 6 As shown, an underwater target localization system based on side-scan sonar data includes: The data acquisition module is used to acquire side-scan sonar data files in a target format, the files containing sonar image data, sonar equipment attitude data, ship attitude data, and ship position data; The data processing and storage module is used to store the collected data and the data required for system operation; The image preprocessing module is used to parse the side-scan sonar data file of the target format, extract the sonar image data and convert it into a general image format, and perform noise reduction, gain adjustment, lateral balance and longitudinal balance processing on the sonar image data of the general image format. The target detection module contains a pre-trained convolutional neural network model, which is used to receive pre-processed sonar image data, identify underwater targets, and output their relative coordinates (x', y') in the image; The sonar equipment coordinate fusion module is used to parse sonar equipment attitude data, ship attitude data, and ship position data from the side-scan sonar data file in the target format, fuse the sonar equipment attitude data, ship attitude data, and ship position data based on the Kalman filter algorithm, and output the real-time geodetic coordinates (X', Y') of the side-scan sonar equipment when acquiring the sonar image data; wherein, the geodetic coordinates are based on a real-time plane rectangular coordinate system; The target absolute coordinate calculation module is used to calculate the latitude and longitude coordinates of the underwater target based on the relative coordinates (x', y') of the underwater target in the sonar image, the real-time geodetic coordinates (X', Y') of the sonar equipment, the water depth (h) when the data was collected, the slant range (d) of the sound wave propagation, and the beam angle (θ) of the side-scan sonar, through the side-scan sonar beam propagation geometric model. The output module is used to output the latitude and longitude coordinates and related positioning parameters of the underwater target in real time.
[0064] In some embodiments, the image preprocessing module is further configured to: perform denoising processing, gain adjustment, and horizontal and vertical balancing processing on the sonar image data in the general image format using statistical methods.
[0065] In some embodiments, the underwater target localization system further includes a model training module, the model training module comprising: The data acquisition unit is used to acquire a historical side-scan sonar image dataset containing bounding box information labeled with the underwater target category and its location in the sonar image; The data preprocessing unit is used to perform preprocessing on the historical side-scan sonar image data, including denoising, gain adjustment, lateral balancing and longitudinal balancing. The dataset partitioning unit is used to divide the preprocessed dataset into training set, validation set and test set according to a predetermined ratio, and to apply data augmentation operations such as random rotation and brightness adjustment to the training set data. The model training unit is used to construct a convolutional neural network model, train the model using the training set, and monitor overfitting and optimize hyperparameters using the validation set during the training process. The hyperparameters include at least the learning rate and batch size. The model evaluation unit is used to evaluate the performance of the convolutional neural network model using the test set, and export the trained model file after the preset performance index is reached.
[0066] In some embodiments, the sonar device coordinate fusion module includes: The observation input unit is used to take the sonar equipment attitude data, ship attitude data and ship position data as the input observation values of the Kalman filter; The state prediction unit is used to predict and update the motion state of the sonar equipment using a Kalman filter; The data fusion unit is used to comprehensively predict and update the position and attitude of the sonar equipment in space based on the uncertainties and measurement errors during the movement of the sonar equipment, and finally output the real-time geodetic coordinates (X',Y') of the sonar equipment with higher accuracy.
[0067] In some embodiments, the target absolute coordinate calculation module specifically includes: The yaw angle calculation unit is used to calculate the horizontal yaw angle of the underwater target relative to the sonar baseline based on the relative coordinates (x', y') of the underwater target in the sonar image and the horizontal dimension of the sonar image data in a common image format, combined with the beam angle (θ) of the side-scan sonar. The horizontal distance calculation unit is used to calculate the horizontal projection distance L from the target to the sonar by using the slant range (d) of sound wave propagation and the water depth (h) through a right triangle relationship; The planar offset calculation unit is used to calculate the planar offset (ΔX, ΔY) of the underwater target relative to the real-time position coordinates (X', Y') of the sonar equipment in the horizontal plane, based on the real-time geodetic coordinates (X', Y') of the sonar equipment, combined with the horizontal yaw angle, the horizontal projection distance L, and the heading angle in the attitude data of the sonar equipment. The coordinate overlay unit is used to overlay the plane offset (ΔX, ΔY) onto the real-time geodetic coordinates (X', Y') of the sonar device to obtain the two-dimensional plane coordinates of the underwater target in the plane projection coordinate system; The coordinate transformation unit is used to convert the two-dimensional plane coordinates into latitude and longitude coordinates based on the latitude and longitude coordinate system.
[0068] In some embodiments, the output module is further configured to write the latitude and longitude coordinates of the underwater target, the acquisition timestamp of the side-scan sonar data file, and the attitude data of the sonar device into the output file in real time.
[0069] In some embodiments, the data acquisition module is further configured to: parse the sound velocity profile data of the target water area from the side-scan sonar data file of the target format; the target absolute coordinate calculation module is further configured to: when calculating using slant range (d), use the sound velocity profile data to correct the sound wave propagation time or the corresponding distance.
[0070] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this invention. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0071] Example 3 See Figure 7 This application also provides an electronic device 700, which includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform an underwater target localization method based on side-scan sonar data in the foregoing method embodiments.
[0072] This application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute an underwater target localization method based on side-scan sonar data from the aforementioned method embodiments.
[0073] This application also provides a computer program product, which includes a computing program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform an underwater target localization method based on side-scan sonar data as described in the foregoing method embodiments.
[0074] The following is for reference. Figure 7 The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of this application. The electronic device 700 in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device 700 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0075] like Figure 7 As shown, the electronic device 70 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0076] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keys, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although an electronic device 700 with various devices is shown in the figure, it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0077] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of the embodiments of this application.
[0078] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof. The aforementioned computer-readable medium can be included in the aforementioned electronic device; or it can exist independently and not assembled into the electronic device.
[0079] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings.
[0081] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for underwater target localization based on side-scan sonar data, characterized in that, Includes the following steps: S1: Read the side-scan sonar data file in the target format, parse and extract the sonar image data, and convert the sonar image data into sonar image data in a general image format; S2: Input the sonar image data in the general image format into a pre-trained convolutional neural network model for target detection, identify underwater targets, and output their relative coordinates (x', y') in the sonar image; S3: Parse the sonar device attitude data, ship attitude data, and ship position data from the side-scan sonar data file in the target format. Based on the Kalman filter algorithm, fuse the sonar device attitude data, ship attitude data, and ship position data to calculate the real-time geodetic coordinates (X', Y') of the side-scan sonar device when acquiring the sonar image data; wherein, the geodetic coordinates are based on the real-time plane rectangular coordinate system. S4: Based on the relative coordinates (x', y') of the underwater target in the sonar image obtained in step S2, the real-time geodetic coordinates (X', Y') of the sonar equipment obtained in step S3, and combined with the water depth h, the slant range d of the sound wave propagation, and the beam angle θ of the side-scan sonar, the absolute geographic coordinates of the underwater target are calculated using the side-scan sonar beam propagation geometric model; wherein, the absolute geographic coordinates are latitude and longitude coordinates; The conversion process of the side-scan sonar beam propagation geometry model described in step S4 specifically includes: Based on the relative coordinates (x', y') of the underwater target in the sonar image and the horizontal dimension of the sonar image data in a common image format, combined with the beam angle θ of the side-scan sonar, the horizontal yaw angle of the underwater target relative to the sonar baseline is calculated. Using the slant distance d of sound wave propagation and the water depth h, the horizontal projection distance L from the target to the sonar is calculated through a right triangle relationship; Using the real-time geodetic coordinates (X', Y') of the sonar equipment as a reference, and combining the horizontal yaw angle, the horizontal projection distance L, and the heading angle in the attitude data of the sonar equipment, the planar offset (ΔX, ΔY) of the underwater target relative to the real-time position coordinates (X', Y') of the sonar equipment in the horizontal plane is calculated. The planar offset (ΔX, ΔY) is superimposed on the real-time geodetic coordinates (X', Y') of the sonar device to obtain the two-dimensional planar coordinates of the underwater target in the real-time planar rectangular coordinate system; The two-dimensional plane coordinates are converted into latitude and longitude coordinates based on the latitude and longitude coordinate system.
2. The underwater target positioning method according to claim 1, characterized in that, In step S1, after converting the sonar image data into a general image format, the sonar image data in the general image format undergoes the following preprocessing steps: denoising, gain adjustment, and horizontal and vertical balancing using statistical methods.
3. The underwater target positioning method according to claim 1 or 2, characterized in that, The training method for the pre-trained convolutional neural network model includes: Obtain a historical side-scan sonar image dataset containing bounding box information labeled with underwater target categories and their locations in sonar images; The historical side-scan sonar image data is preprocessed, including denoising, gain adjustment, lateral balancing, and longitudinal balancing. The preprocessed dataset is divided into training, validation and test sets according to a predetermined ratio, and data augmentation operations such as random rotation and brightness adjustment are applied to the training set data. Construct a convolutional neural network model, train the model using the training set, and monitor overfitting and optimize hyperparameters using the validation set during the training process. The hyperparameters include at least the learning rate and batch size. The performance of the convolutional neural network model is evaluated using the test set, and the trained model file is exported after the preset performance index is reached.
4. The underwater target positioning method according to claim 1, characterized in that, Step S3, which involves fusing sonar attitude data, ship attitude data, and ship position data using the Kalman filter algorithm, specifically includes: The sonar equipment attitude data, ship attitude data, and ship position data are used as input observations for the Kalman filter; The motion state of sonar equipment is predicted and updated using a Kalman filter; Based on the uncertainties and measurement errors during the movement of the sonar equipment, the position and attitude of the sonar equipment in space are predicted and updated, and finally the real-time geodetic coordinates (X',Y') of the sonar equipment with higher accuracy are output.
5. The underwater target positioning method according to claim 1, characterized in that, It also includes the following steps: S5: Write the latitude and longitude coordinates of the underwater target calculated in step S4, the acquisition timestamp of the side-scan sonar data file, and the sonar device attitude data parsed in step S3 into the output file in real time.
6. The underwater target positioning method according to claim 1, characterized in that, In step S1, the data parsed from the side-scan sonar data file of the target format also includes the sound velocity profile data of the target water area. In step S4, when calculating using the slant range d, the sound velocity profile data is used to correct the sound wave propagation time or the corresponding distance.
7. An underwater target localization system based on side-scan sonar data that implements the method as described in any one of claims 1-6, characterized in that, include: The data acquisition module is used to acquire side-scan sonar data files in a target format, the files containing sonar image data, sonar equipment attitude data, ship attitude data, and ship position data; The data processing and storage module is used to store the collected data and the data required for system operation; The image preprocessing module is used to parse the side-scan sonar data file of the target format, extract the sonar image data and convert it into a general image format, and perform noise reduction, gain adjustment, lateral balance and longitudinal balance processing on the sonar image data of the general image format. The target detection module contains a pre-trained convolutional neural network model, which is used to receive pre-processed sonar image data, identify underwater targets and output their relative coordinates (x', y') in the image; The sonar equipment coordinate fusion module is used to parse sonar equipment attitude data, ship attitude data, and ship position data from the side-scan sonar data file in the target format, fuse the sonar equipment attitude data, ship attitude data, and ship position data based on the Kalman filter algorithm, and output the real-time geodetic coordinates (X', Y') of the side-scan sonar equipment when acquiring the sonar image data; wherein, the geodetic coordinates are based on a real-time plane rectangular coordinate system; The target absolute coordinate calculation module is used to calculate the latitude and longitude coordinates of the underwater target based on the relative coordinates (x', y') of the underwater target in the sonar image, the real-time geodetic coordinates (X', Y') of the sonar equipment, the water depth h when the data was collected, the slant range d of the sound wave propagation, and the beam angle θ of the side-scan sonar, through the side-scan sonar beam propagation geometric model. The output module is used to output the latitude and longitude coordinates and related positioning parameters of the underwater target in real time.
8. The underwater target positioning system according to claim 7, characterized in that, The image preprocessing module is further configured to perform denoising, gain adjustment, and horizontal and vertical balancing on the sonar image data in the general image format using statistical methods.
9. The underwater target positioning system according to claim 7 or 8, characterized in that, It also includes a model training module, which includes: The data acquisition unit is used to acquire a historical side-scan sonar image dataset containing bounding box information labeled with the underwater target category and its location in the sonar image; The data preprocessing unit is used to perform preprocessing on the historical side-scan sonar image data, including denoising, gain adjustment, lateral balancing and longitudinal balancing. The dataset partitioning unit is used to divide the preprocessed dataset into training set, validation set and test set according to a predetermined ratio, and to apply data augmentation operations such as random rotation and brightness adjustment to the training set data. The model training unit is used to construct a convolutional neural network model, train the model using the training set, and monitor overfitting and optimize hyperparameters using the validation set during the training process. The hyperparameters include at least the learning rate and batch size. The model evaluation unit is used to evaluate the performance of the convolutional neural network model using the test set, and export the trained model file after the preset performance index is reached.