TKP-Net: A Three Keypoint Detection Network for Ships Using SAR Imagery

Remote-sensing ship monitoring is a crucial area of research with key applications in military and civilian fields. The ability to extract information, such as ship length, width, and heading from remote-sensing data, particularly from synthetic aperture radar (SAR) images, is of paramount importance. Current state-of-the-art SAR image ship monitoring focuses primarily on ship detection. Assessing the direction of ships usually relies on the observability of wake features. However, the observability of these wake features is often affected by factors, such as the SAR system parameters, ship attributes, and dynamic marine environments. This can make accurate direction assessments a challenging task. In response to these challenges, this study has presented a novel and effective algorithm for ship monitoring from SAR images based on an anchor-free framework and the powerful feature extraction capabilities of convolutional neural networks. The proposed method learned the scattering and morphological information of a ship's bow and stern from high-resolution SAR images to determine the ship's direction with a high level of accuracy using a rotating bounding box. The algorithm was tested on a dataset, achieving an average precision of 90.8% and bow classification accuracy of 92.5%, demonstrating its potential contributing to the advancement of remote sensing.

TKP-Net: A Three Keypoint Detection Network for Ships Using SAR Imagery Xiunan Li , Peng Chen , Jingsong Yang , Wentao An , Member, IEEE, Gang Zheng , Senior Member, IEEE, Dan Luo , Aiying Lu , and Zimu Wang Abstract-Remote-sensing ship monitoring is a crucial area of research with key applications in military and civilian fields.The ability to extract information, such as ship length, width, and heading from remote-sensing data, particularly from synthetic aperture radar (SAR) images, is of paramount importance.Current state-of-the-art SAR image ship monitoring focuses primarily on ship detection.Assessing the direction of ships usually relies on the observability of wake features.However, the observability of these wake features is often affected by factors, such as the SAR system parameters, ship attributes, and dynamic marine environments.This can make accurate direction assessments a challenging task.In response to these challenges, this study has presented a novel and effective algorithm for ship monitoring from SAR images based on an anchor-free framework and the powerful feature extraction capabilities of convolutional neural networks.The proposed method learned the scattering and morphological information of a ship's bow and stern from high-resolution SAR images to determine the ship's direction with a high level of accuracy using a rotating bounding box.The algorithm was tested on a dataset, achieving an average precision of 90.8% and bow classification accuracy of 92.5%, demonstrating its potential contributing to the advancement of remote sensing.Index Terms-Convolutional neural network (CNN), keypoint, ship detection, ship head classification, synthetic aperture radar (SAR).

I. INTRODUCTION
M ONITORING ships is of considerable importance in military and civilian fields [1], including maintaining national marine security, supervising water traffic, maritime fishery management, and maritime rescue [2].Optical remotesensing images have clear details and textures, which have the key advantages for identifying ship types.However, this process is easily impeded by weather conditions, including clouds, rain, and fog, and can only be conducted during daylight hours.In contrast, synthetic aperture radar (SAR) can be used at night and has fewer limitations imposed by weather conditions.Therefore, it is widely used in ship detection [3].With the development of high-resolution SAR satellites, finer scale ship information [4], such as the length, width [5], and direction, can be extracted from high-resolution SAR images.
Traditional SAR image detection algorithms first need to perform sea and land segmentation to remove land interference, and then perform ship detection.The ship detection results are often affected by the accuracy of land and sea segmentation [6].The classic algorithm used in this context is the constant false alarm rate (CFAR) algorithm, such as the cell average CFAR detector [7], two-parameter CFAR detector [8], and order statistics CFAR detector [9].The CFAR-based detection algorithm adaptively selects an appropriate detection threshold for ship detection based on the background clutter statistical distribution model (such as the K distribution [10] and gamma distribution [11]) [12].This method works well when the sea surface clutter estimation model is consistent with the detection image distribution.However, this algorithm type requires manual analysis of the target and background.The parameter design is complex, lacks versatility, and makes it difficult to deal with complex sea conditions and ship motion blur, sidelobe effects, and interference generated by near-shore ships [12].It is also difficult to extract the accurate length, width, and bow information using the CFAR method.
Recently, target detection algorithms based on deep convolutional neural networks (DCNN) have made considerable progress, and their powerful feature extraction and learning capabilities have strongly surpassed those of the traditional methods in terms of accuracy and robustness, and have received considerable attention from researchers.Depending on whether an anchor exists, this method can be anchor-based or anchor-free.Anchor-based methods predominantly include R-CNN [13], fast R-CNN [14], faster R-CNN [15], R-FCN [16], SSD [17], YOLOv2 [18], YOLOv3 [19], and YOLOv4 [20].
The anchor-based method needs to manually set many anchor boxes and introduce an excess number of hyperparameters, such as the scale, ratio, and quantity of anchors.A relatively small number of anchor boxes can match the target, causing an imbalance between the target and background that affects the convergence speed.The anchor-free method does not need to set the anchor box parameters.It is simple to use and its accuracy is comparable with that of the anchor-based algorithm and is now being used by an increasing number of researchers.CornerNet [21], ExtremeNet [22], and CenterNet [23] are representative anchor-free methods based on keypoints.CornerNet uses two keypoint in the upper left and lower right corners to locate the upper left and lower right corners of the object bounding box.It then uses the embedding vector to determine whether the two keypoints belong to the same object.ExtremeNet detects objects by predicting extreme and center points and grouping keypoints according to the geometric structure.CenterNet only uses the central keypoint to locate the target.The width and height parameters of the target are obtained through regression, which substantially improves the detection speed.
Based on a DCNN, the current SAR ship detection algorithm omits the sea-land segmentation strategy of the traditional algorithm and uses an end-to-end method to send SAR images to the DCNN for detection.It then directly outputs ship detection results, which improves the efficiency and accuracy of detection [24].Based on CenterNet, Guo et al. [25] proposed CenterNet++, which introduced a feature refinement module to extract contextual information for detecting small ships.Considering the multiscale and multiangle characteristics of SAR image scenes and ship targets, Hu et al. [6] proposed a BANet-based anchor-free method for multiscale ship detection in SAR images.By introducing a deformable convolution, local ship features can be extracted effectively.Deng et al. [26] proposed a novel and effective method for learning deep ship detection from scratch, which achieved a high level of detection performance using Sentinel-1 data.
The aforementioned algorithms all employ horizontal bounding boxes (HBBs) for object detection.However, in the case of remote-sensing images captured from an aerial perspective, objects in the image can have arbitrary orientations, and the use of HBBs can result in poor detection performance for densely arranged, arbitrarily oriented, and variably scaled objects.This is partly due to the inclusion of a significant amount of irrelevant background information within the HBBs, which results in imprecise object representations, as well as the nonmaximum suppression (NMS) algorithm's tendency to remove highly overlapping ships, resulting in missed detections.
Recently, detection methods based on an oriented bounding box (OBB) have been proposed to solve these problems.Xia et al. [27] used a method of returning four vertex coordinates to generate an OBB based on a faster R-CNN algorithm.Gliding vertex [28] works on the assumption that the order of coordinates generated by this method of returning four vertices is easy to confuse.Therefore, they choose to return four ratios, which represent the relative sliding offsets on each side of the HBB.Yang and Yan [29] represented the OBB as a center point, length, width, and angle, and the angle was predicted by classification rather than regression.He et al. [30] proposed a keypoint-based anchor-free algorithm to generate SAR ship OBBs by learning polar coordinate encoding.Although the OBB algorithm obtained a compact bounding box and had certain direction information, it had 180°ambiguity and could not be used to obtain the precise direction of each ship [see Fig. 1(a)].
Estimating the direction of motion of a ship from SAR images is usually performed indirectly using the ship-wake method [see Fig. 1(b)].Ship wakes typically occur in many forms.The most common are turbulent wakes, Kelvin wakes, and narrow V-wakes [31].Turbulent wakes occurring as dark lines along the longitudinal axis of a ship are the most commonly observed wakes in SAR images [32].A narrow V-tail typically appears as a bright edge next to a darker trail [33].The Kelvin wake is composed of shear, divergent, and sharp waves, and its V-shaped angle is approximately 39° [34], which is usually smaller than the angle in SAR images.Ship wakes are predominantly shown as linear structures in the image [35].The most common method is to use the Radon or Hough transform to detect lines [36].The lines and ships detected are combined to obtain the ship's navigation direction [37].However, the visibility of wake information in SAR images is affected by radar parameters, ship parameters, and background sea conditions [38] and is difficult to observe in many cases.We proposed a keypoint-based OBB detection algorithm that could automatically extract high-resolution SAR position and bow information using DCNN and keypoints without wakes [see Fig. 1(c)].The proposed dataset reflected a strong performance.The contributions of this study were given as follows.
1) We proposed an end-to-end ship detection method based on three keypoints for arbitrary direction SAR.The rotation angle-prediction problem was transformed into an estimation and matching problem for keypoints, which avoided the angle periodicity problem based on the regression method.2) Aiming to address the problem of 180°ambiguity in the current OBB detection method for determining ship direction, we automatically obtained the shape and scattering information of the SAR bow and stern through two keypoints.We then assessed whether the two keypoints were the bow and obtained the accurate bow classification.3) We exploited the difference in information extracted from two keypoints to construct a simple and practical analytical model to evaluate the bow classification results.The rest of this article is organized as follows.In Section II, the proposed method is described in detail.Section III presents the experimental datasets and comparisons.Section IV discusses the limitations of our method.Finally, Section V concludes this article.

II. PROPOSED METHOD
Our proposed method is shown in Fig. 2 and has been divided into three main parts, that is, feature extraction and fusion, target detection head, and prediction module.The feature extraction and fusion module was used to extract the features of multiscale ships.The target detection head module was used to generate keypoint heatmaps, keypoint offsets, two side lengths of OBB boxes, direction vectors, and bow classification results.The prediction module combines the information from the detection head module to form the OBB and the head point position.

A. Feature Extraction and Fusion Module
The feature extraction and fusion modules comprised two parts.The first part used the classic ResNet50 [39] structure for feature extraction.The second part used feature maps from different scales of the ResNet residual module for layer-by-layer fusion.We employ skip connections to fuse multiscale features at different layers, aiming to capture both fine-grained details and high-level contextual information.Unlike feature pyramid network [40], our method does not adopt the multibranch prediction head because the multibranch prediction head is more computationally intensive.The resolution of the feature map of the last layer of the ResNet was 32 times lower than that of the original image.For small-scale objects, the loss of information after repeated downsampling is relatively high, and small objects are easily missed.The semantic information was combined with shallow, high-resolution morphological information.As shown in Fig. 3, C4 was fused with C5 to obtain P4; P4 and C3 were fused to obtain P3; and P3 and C2 were fused to obtain P2.Taking the fusion of C4 and C5 as an example, assuming that where N is the number of objects in the image, and H and W are the height and width, respectively.After downsampling the image four times, α and β are the hyperparameters (α = 2 and β = 4), hm hw is the predicted heatmap value, and hm hw is the heatmap value of the real label.The coordinate position of the original image to the coordinate position of the heatmap is d times smaller than that of the original image and is rounded down.Therefore, there is a deviation between the coordinates of the keypoints extracted from the heatmap and those of the original image.An offset parameter was used to quantify this error, as shown in Fig. 5.The deviation at any keypoint is given as follows: where x and y are the real coordinates of the keypoint, and d is the scaling factor.The loss function uses the L1 smoothing loss function as follows: where o k is the predicted bias and ôk is the true bias.

2) Scale Parameters Regression:
The scale parameters of the rotating box are represented by the long side l and the short side s.The loss function uses a smooth L1 loss function, as shown in the following equations: 3) Keypoints Matching: When two or more keypoints are used to locate the target, a keypoint matching problem occurs.The proposed method uses a vector from the center point to the endpoint, and the distance from the endpoint coordinates meets a certain threshold to confirm whether they belong to the same target, especially for the regression vector numerical stability.We mapped the prediction vector − → v k between 0 and 1.The loss function of the vectors is given as follows:

4) Bow Classification:
To facilitate the extraction of information related to the bow and stern of the ship, we use two Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.independent classification branch modules in the architecture.These classification modules are designed to extract information from positions corresponding to the upper and lower keypoints.The purpose of introducing these two independent classification modules is to capture features specifically associated with the ship's bow and stern regions.The upper and lower keypoints serve as reference points, allowing the classification modules to focus on extracting relevant information in proximity to these keypoints.There are two keypoints at the bow and stern of the ship.We need to use the BCE loss function at these two endpoints to determine the probability that the point is the bow.The L hc loss function was designed as follows: ) where hc k is the predicted result and hc k is the real label.

C. Prediction in Test Stage
We extracted the top-k coordinates from the predicted heat maps and then added the corresponding offset, as shown in (8), to obtain the k keypoint coordinates.We utilize a relatively large value of k, such as 500, to perform an initial selection in each patch.This ensures a comprehensive coverage of ship candidates, even in scenarios where the number of ships may be high.Next, we refine the selection process by considering the confidence scores associated with the detected ships.As shown in Fig. 6 An image contains multiple targets, and many keypoints are generated simultaneously.It is necessary to confirm the keypoints belonging to the same target.Taking the center keypoint as a reference, the coordinates of the center point and vector predicted were added to obtain the coordinates of the two endpoints.We then compared them with the coordinates of the two endpoints extracted from the heat map.If the Euclidean distance between them was less than a certain threshold, the same goal was considered, as in ( 9)-( 11), the coordinates of the central keypoint C (Cx, Cy), the coordinates of the upper Keypoint T (T x, T y), and the coordinates of the lower keypoint B (Bx, By).The vector from the central keypoint to the upper endpoint is V ct, that from the lower endpoint is V cb, and s k is the threshold.The keypoint matching is shown in Fig. 6(b) We only required the coordinates of the center point and any endpoint, plus the length of the short side of the ship, to obtain the coordinates of the OBB.If a center point matches the upper and lower keypoints simultaneously, two OBBs appear simultaneously.The OBB box score is the average of the center point and endpoint scores.Finally, NMS was used to remove the box with an excessive overlap rate.Fig. 6(c) shows the OBB calculated using the keypoint coordinates and the length of the short side.
The upper and lower keypoints set by this algorithm were only related to the spatial position of the center point and did not contain category information.This method decoupled the target detection and bow classification.The two keypoints T and B matched the spatial positions of the bow and stern.This was beneficial for extracting the features of the head and tail.Two classifiers were used at the two endpoints to predict whether a point is a bow.When the center point only matched one endpoint and the classification threshold of this point was greater than 0.5, it was the bow.Otherwise, it was the stern.When two endpoints were matched simultaneously, the scores of the two keypoints were compared, and the classification threshold of the point was used to calculate the position of the bow if the score was relatively large.In Fig. 6(d), the yellow circle represents the ship's bow.

D. Bow Classification Analysis Model
We established a simple bow classification analysis model, as shown in (12).h t represents the bow classification threshold at point T, h b represents the bow classification threshold at point B, h u represents the uncertainty of bow classification, and a value Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
III. EXPERIMENT

A. Data
The data used in this study were obtained from the RSDD-SAR [42] and FUSAR-ship [43] datasets.RSDD-SAR, which includes Gaofen-3 and TerraSAR-X satellite data, has multiple imaging modes, polarization modes, and resolutions.The FUSAR-ship high-resolution ship dataset contained 15 main ship classes.The data slices were taken from 126 GF-3 remotesensing images.The polarization mode included HH and VV, the resolution was 1.124 m × 1.728 m, and the imaging mode was the UFS mode, covering various sea, land, coast, river, and island scenes.A total of 1237 data slices were selected from the RSDD-SAR dataset, and 533 data slices were selected from the FUSAR-ship dataset.We selected 80% of the data from the two subsets as the training set and 20% as the test set.We relabeled the selected data using four corner points and four head points for labeling purposes (see Fig. 7).
In this study, the identification process of the SAR bow and stern is shown in Fig. 8.For SAR ship slices with maritime mobile service identification information, the bow and stern are determined by comparing real photos.For the existence of an optical image matching the SAR, the bow and stern of the ship can be determined by comparing the optical image.For ship slices without additional auxiliary information, the discriminative knowledge accumulated through a large number of comparisons is used for discrimination.This is also the basis for the slice selection of the two datasets.
There are three main bases for assessing the bow and stern of a ship in high-resolution SAR images, that is, shape, scattering, and wake information.The inclusion of wakes in our data was

TABLE II SIZE DISTRIBUTION OF TRAINING DATASET AND TEST DATASET
sparse and predominantly relied on morphological and scattering information.Fig. 9 shows the key components needed for identifying the bow and stern of a ship.
Table II presents the size distributions of the training and test sets and the size division references [44].The proportions of large, medium, and small particles in the training and test sets were relatively consistent (see Table II).The proportion of medium objects was the largest, followed by small objects and large objects.In Fig. 10, an interval of 10°was used to obtain statistics on the distribution of the bow angle of the training and test sets, and the heading of the bow in the dataset is distributed in all directions.Fig. 11 shows the width and height distributions of the OBB.The width and height distribution is uneven, and the aspect ratio is relatively large.

B. Experimental Details
Our deep-learning framework was based on Pytorch1.6,and the GPU model was an NVIDIA GTX 1080Ti.The training and testing image sizes were 512 × 512 pixels.The images were randomly rotated and flipped during training.The initial learning rate was set to 0.000125, the optimizer was Adam, the learning rate decay strategy was exponential decay, and iterative training was performed 200 epochs.

C. Comparison of OBB Ship Detection Algorithms
In this section, the OBB detection performances of our proposed algorithm and five other algorithms (gliding vertex [28], oriented RCNN [45], R3Det [46], YOLOv5 + CSL [29], and faster R-CNN (OBB) [15]) were compared.For a fair comparison, other algorithms, except for the YOLOv5 + CSL model, including the algorithm proposed in this study, used ResNet50 as the backbone network for feature extraction.The evaluation indicators used were precision rate (Precision), recall rate (Recall), F1-score (F1-score), transmission frames per second (FPS), and average accuracy rate (AP), where AP50 means merge, and the average accuracy rate when the intersection over union (IoU) threshold was 0.5.As shown in Table III, the proposed algorithm obtained the most successful results for the F1-score and AP, which were 0.979 and 0.908, respectively.The R3Det algorithm had the highest recall rate and a lower precision rate, resulting in the lowest F1-score.The AP values of the R3Det and oriented RCNN algorithms were second only to those of the proposed algorithm, and the fastest algorithm in terms of speed was the YOLOv5 + CSL algorithm, which reached 50FPS.The speeds of the other algorithms did not differ significantly.The slowest algorithm was R3Det because it uses multiple refinement schemes to improve accuracy.This can be observed in Fig. 12 that the gliding vertex, oriented RCNN, and faster R-CNN (OBB) algorithms produced more false alarms near the shore, whereas R3Det and YOLOv5 + CSL produce more missed detections.Our proposed method showed better performance results near the shore.In the third row, the oriented RCNN algorithm missed small targets, while other algorithms detected small targets.In the fourth row, oriented RCNN and YOLOv5 + CSL missed the target.The rotating box obtained using the gliding vertex algorithm did not correctly surround the target.Although the faster R-CNN (OBB) algorithm detected the correct target, it also detected the noise generated by the ship's motion.R3Det and the proposed algorithm correctly detected objects, and the proposed algorithm obtained bounding boxes that were more consistent with the ground truth.

D. Bow Discriminant Analysis
Table IV compares the three methods relying on keypoints for bow differentiation.The C + head method, such as CHPDet [47], is an anchor-free method that uses the center point and head point to determine the OBB and bow.C + T + B used the center point and the up and down points to determine the OBB.It then compared the thresholds of the upper and lower keypoints.A point with a larger threshold uses the bow classifier where the point is located to determine whether the point is the bow.The T + B method uses only the upper and lower endpoints for detection.Its bow classification strategy is consistent with that of C + T + B. In the C + T + B method, the accuracy rate of bow differentiation was the highest, and the accuracy rate of bow classification (accurate) was the ratio of the number of objects correctly classified as bows to the total number of objects.The T + B scheme was lower than the C + T + B Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.scheme for each accuracy index.The C + head scheme had the highest accuracy rate, but a low recall rate.The F1-score was not as high as that of the C + T + B scheme.The main defect of the C + head scheme was that when the model could not identify the bow of the ship, and the detection target was not recognized, resulting in missed detection.The proposed method divided bow differentiation and ship detection into two stages such that the bow discrimination result does not affect the detection result.Fig. 13 showed the OBB detection results of SAR ships with bow marks.

TABLE III COMPARISON OF DIFFERENT OBB ALGORITHMS
Deep learning relies on a single categorical variable to make decisions which may be a problem of overconfidence [48].In many remote-sensing applications, it is critical to estimate prediction uncertainty.The proposed method could simultaneously predict two bow classification results at the same time in most cases, and 82% of the test samples could simultaneously obtain two bow classification results at the same  time.The two classification results were used to determine whether the point was the bow of the ship.Owing to the influence of accidental and perceptual uncertainties, there are contradictions between the two classification results.Using this contradiction can reduce the inconsistencies to a certain extent.Table V presents the proportions of incorrectly and correctly classified samples in the bow classification test samples under different thresholds.As the threshold increases, the proportion of misclassified samples far exceeds the proportion of correctly classified samples.Assuming that we have higher requirements for the reliability of the bow classification, we can set a large threshold.With a threshold of 0.9, our method can label 61.5% of the wrong samples as low confidence samples, and only 4.6% of the correctly classified samples are affected.This approach provides an analytical tool for decision reliability.

E. Ship Detection in Large-Scale SAR Images
Large-scale SAR image testing can be used to validate and evaluate the performance of ship detection algorithms in realworld scenarios.Utilizing large-scale SAR images for testing enables a more accurate assessment of algorithm performance in handling complex backgrounds, multiple targets, occlusions, and other challenging situations.
We tested on two large-scale SAR images, as shown in Fig. 14(a), and ship detection had some false alarms on land or islands.As shown in Fig. 14(b), the detection result of large-scale SAR ships on the sea surface was better when there was no interference from land or islands.We selected ships with wakes on the image to verify the accuracy of our bow classification.As shown in Fig. 14(c), the direction of most ships was consistent with the direction verified by ship wakes.This can prove to a certain extent that our method has good performance in extracting ship direction from large-scale SAR images.

F. Ship Detection and Bow Discrimination in Dense Ports
This study addresses the task of ship detection and bow discrimination in dense port environments as one aspect of our brder research focus.We conduct an experiment to evaluate the proposed method and the obtained performance metrics are listed in   such as high ship density, background interference, and ship diversity.There are usually a large number of ships berthing or passing through the port area, and the distance between the ships is relatively close, which increases the overlapping and occlusion of ships.In addition, various objects and structures in the port area, such as docks, buildings, cranes, and stacked cargo, will generate a lot of interference and occlusion, making the detection of ships more difficult.In addition, the port area frequently moors and passes the ships of various types and sizes, including cargo ships, passenger ships, fishing boats, etc., which adds to the complexity of ship classification and identification.As shown in Fig. 15(a), there is no dense arrangement of ships, and the detection effect is better when the ships are docked at the port.As shown in Fig. 15(b), missed detection occurs when ships are densely arranged.
Therefore, our proposed method suffers from some limitations in dense port areas.
Our proposed method exhibits an average inference time of 73.6 s for large-scale SAR images.The image dimensions

G. Accuracy of Direction for Different Types of Ships
We selected data with class labels from the test set to test the accuracy of bow classification.It can be seen from Table VII that the classification accuracy of the bow is the highest for oil tankers and the lowest for fishing boats.It can be seen from Fig. 16 that the objects classified incorrectly by the bow are basically relatively small.Because the scattering structure of the small target is not clear enough, the amount of information provided is also small.

IV. DISCUSSION
The method we proposed for ship detection and bow classification has numerous advantages and innovations in the field.However, we also acknowledge certain limitations that need to be considered and addressed in further research and applications.
First, our algorithm requires high-resolution SAR data.Lower resolution SAR data may result in decreased algorithm performance, affecting the accuracy of ship detection and recognition.Therefore, our algorithm may be constrained by data resolution limitations in certain data sources or application scenarios.Second, our algorithm has certain requirements regarding the clarity of ship scattering structures.If the scattering structures of ships are too blurry or indistinct, the accuracy of the algorithm may be compromised.Polarization information provides valuable insights into the scattering behavior of objects, including ships, and helps enhance the detection and characterization of ships in SAR images [49], [50].In the future, we can consider incorporating polarization information into our method to improve its performance.
In addition, our algorithm's performance may decline when dealing with densely packed port areas.This is due to potential occlusion, overlap, or interference between ships in such congested port regions.In these cases, our algorithm may experience false detections or missed detections, requiring further improvements to enhance its capability in handling dense port areas.
To address the aforementioned limitations, we can explore the following avenues for improvement.
1) Investigating techniques to adapt to low-resolution SAR data, such as image enhancement or multiscale processing methods, to enhance the algorithm's robustness.2) Conducting further research on feature extraction and model design for ship scattering structures to address the challenges posed by blurry scattering structures.3) Explore the utilization of prior knowledge or other sensor data to assist in ship detection and recognition tasks in dense port areas.It is important to emphasize that our algorithm demonstrates good performance and robustness in most cases.However, further research and improvements are required to address the aforementioned limitations.An honest and comprehensive description of these limitations is crucial for readers to gain the accurate understanding of our research work and to provide guidance and inspiration for future studies.
In future research, we will strive to overcome these limitations and propose the corresponding improvement strategies to further enhance the performance and applicability of our algorithm.

V. CONCLUSION
In this study, a method for obtaining various ship information, including position, length, width, and direction from high-resolution SAR images, was proposed.A ship detection method for any direction based on three keypoints without an anchor box has been proposed.In the first step of the method, the angle-prediction problem of the rotating box was converted into an estimation and matching problem for the keypoint position to determine the rotating box.In the second step, bow discrimination was performed using classifiers placed at two keypoints.
The experimental results show that our method achieves good performance with an AP of 90.8, an F1-score of 97.9%, and an accuracy of 92.5% for bow classification in nondense port area ship detection.We also used the difference in information extracted from the two keypoints to establish a simple and effective uncertainty analysis method.

Fig. 2 .
Fig.2.Overall architecture of our method.The network structure can be divided into three parts, that is, feature extraction and fusion module, detection head module, and prediction part.After the data had passed through the feature extraction and fusion module, the feature map, offset, size parameter, vector, and ship head layers had five parameter parts.The feature map and the offset were combined to generate keypoint coordinates.The size parameters and vectors were used to match the keypoint coordinates to generate OBB, and the ship head layers were used to determine which keypoint the bow was on.

Fig. 4 .
Fig. 4. Division of keypoints.(a) When the coordinates of keypoints B and T are not on the X-axis, the keypoint above the X-axis is T, and the keypoint below the X-axis is B. (b) When the coordinates of points B and T are on the X-axis, the left side of the Y-axis is keypoint B, and the right side is the keypoint T.

Fig. 5 .
Fig. 5. Offset of the feature map to the original image.

Fig. 6 .
Fig. 6.Prediction in the test stage.(a) Keypoint heatmap.(b) Keypoint matching.(c) Rotating box generation.(When two boxes are generated, then a low score can be removed using NMS).(d) Bow classification.

Fig. 8 .
Fig. 8. Process of determining the direction of the ship.

Fig. 9 .
Fig. 9. Key components needed for differentiating between the bow and stern.

Fig. 10 .
Fig. 10.Distribution of bow angles in the training set and test set.(a) Number distribution of ships from different angles in the training set.(b) Number distribution of ships from different angles in the test set.

Fig. 14 .
Fig. 14. Results in large-scale SAR images.(a) Large-scale SAR image with islands.(b) Sea surface SAR image without islands.(c) Bow extraction result with wake verification.The red circle represents the wrong classification result.

Fig. 15 .
Fig. 15.Ship detection and bow extraction in dense port areas.(a) Ships docked on the shore alone.(b) Ships are densely packed together.

Fig. 16 .
Fig. 16.Bow extraction results of different types of ships.The green circle is the ground truth label, and the yellow circle is the predicted bow coordinates.

TABLE I FEATURE
EXTRACTION AND FUSION MODULE STRUCTURE

TABLE IV COMPARISON
OF TWO KEYPOINTS AND THREE KEYPOINTS

TABLE V ANALYSIS
OF BOW DIRECTION

Table VI .
It can be seen fromTable VI that the performance of ship detection and bow discrimination in dense ports has declined.Ship detection in dense port areas faces challenges,

TABLE VI DETECTION
PERFORMANCE IN DENSE PORTS

TABLE VII BOW
EXTRACTION ACCURACY OF DIFFERENT TYPES OF SHIPS