Recognition of flanges on LNG (“Liquefied Natural Gas”) vessels and distance determination are key prerequisites for automated docking of an unloading arm, and in complex environments, flange detection faces challenges such as low accuracy and large distance measurement errors. Therefore, an improved lightweight high-precision approach based on YOLOv8s that integrates the C2f_Ghost module, a CBAM, and Concat_BiFPN was proposed. In addition, a monocular ranging algorithm based on pixel width and coordinate transformation was introduced to estimate the 3D coordinates of a flange. Specifically, the original Bottleneck in the C2f module was replaced by the Ghost module, which combines dynamic convolution and dynamic depth-separable convolution to enhance feature representation while reducing model complexity. A CBAM was introduced in the middle layer of the backbone module to improve the model’s focus on key features with minimal parameter increases, and Concat_BiFPN was used in the neck to facilitate cross-scale feature fusion. To ensure the reproducibility of the experiments, this study primarily employed a fixed random seed (0), and experimental validation analysis was conducted on a flange dataset. The results show that for the improved model, mAP@0.5 reached 97.5% and mAP@0.5:0.95 reached 82.3% with a parameter size of 9.34 M, representing improvements in accuracy of 0.6% and 13.4%, respectively, and a reduction in the parameter size of 16.2% compared with the original YOLOv8s. The average ranging errors of the X-axis, Y-axis, and Z-axis were 2.43%, 2.77%, and 0.71%, respectively. Therefore, the combination of the two algorithms significantly improves the detection and ranging accuracy of flanges in complex environments.
To autonomously dock LNG unloading arms under adverse sea states, this study formulates a dynamic docking process as a trajectory forecasting task. By integrating visual-perception-based spatial localization with trajectory acquisition and forecasting, a comprehensive operational pipeline is established. To predict the dynamic trajectory of the vessel flange, an improved KSE-GRU model is proposed. By extracting implicit kinematic features, the model effectively enhances trajectory characterization under extreme sea states, thereby significantly improving forecasting accuracy and worst-case error constraints. To ensure the operational feasibility of autonomous docking, a robust control strategy is introduced to complement the trajectory predictions. The experimental results demonstrate that the proposed model outperforms traditional time-series forecasting models across all evaluation metrics. Compared with the baseline neural network models, the Mean-3D error is reduced by 19.14%, and the Max-3D error is capped at 348.77 mm, representing an 8.8% improvement over the baseline. Furthermore, the model demonstrates clear advantages in maintaining trajectory consistency and forecasting reliability. In summary, in this study, a robust trajectory forecasting model is developed for vessel target flanges integrated with a comprehensive control framework, thereby offering a practical approach to autonomous docking under dynamic oceanic conditions.