# Deep Learning for Visual Leading of Ships: AI for Human Factor Accident Prevention
## 2 Materials and Methods
### Video Recording  
The video recording process was carried out using a tripod-mounted camera placed at the pilot's expected eye level, ensuring a realistic perspective from the navigation bridge. The camera captured footage at a resolution of 16 megapixels. To replicate realistic night-time conditions, the simulator bridge lighting was dimmed, as is standard practice on real merchant vessels during night operations.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Architecture** & \multicolumn{2}{c}{**Key Advantages**} & \multicolumn{2}{c}{**Limitations**} & **Suitability for This Task** \\ \hline CNN (e.g., & - & Excellent at spatial pattern & - & Limited temporal \\ SqueezeNet) & - & Legthweight and fast inference & & modeling & \\  & - & Robust to noise and local & - & Requires labeled & \\  & - & distortions & & image data & navigation \\ \hline Fully Connected & - & Simpler architecture & - & Poor spatial structure & Low: Not suitable for \\ Network (FCN) & - & Easy to implement & - & learning & spatial pattern recognition \\ \hline RNN/LSTM & - & Effective for time-sequential & - & High training time & Low–Medium: Not ideal \\  & - & Good for motion and event & - & Poor image feature & for static image \\  & - & tracking & & representation & classification \\ \hline Transformer (ViT) & - & High performance on large & - & Requires large dataset & Medium: Promising, but \\  & - & Attention mechanism for & - & Computationally & not suited for real-time \\  & - & feature relevance & & expensive & onboard use yet \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparative analysis of deep learning architectures for visual ship leading detection.  
A professional pilot with over 15 years of experience performed the navigation maneuvers. Initially, a scenario with correct leading alignment at a distance of 2 nautical miles was recorded. This was followed by controlled port and starboard deviations, generating diverse image samples for each condition. Subsequently, navigation sequences from greater distances (10 nautical miles or more) were recorded to capture both correct and incorrect leading perspectives, including cases where only a single light could be perceived due to the distance.  
The bow's position within the image frame is a critical reference for assessing visual alignment. Therefore, as shown in Figures 2 and 3, the bow was consistently placed in the center of the main display screen during all recordings. As will be discussed in the following sections, the video footage was later segmented into still images with a resolution of 1280 \(\times\) 720 pixels for processing.  
Figure 3: Example of images taken from the bridge during night navigation.  
Figure 2: Sample daytime images captured from the simulator bridge.  
Correct alignment was defined as the presence of two grey lights positioned vertically, one above the other, clearly indicating the correct course at closer distances. At greater distances (e.g., over 10 nautical miles), these lights may appear as a single point due to perspective. Additionally, the presence of nearby lighthouses could introduce a secondary bright light, typically located higher above the horizon, which was also taken into account during classification.  
All these factors were carefully considered during the manual labeling process, which was initially performed on a representative subset of 177 images to support model training and validation.  
Figure 6: Examples of incorrect leading situations at close distance. (**a**) and (**b**) both show the navigation lights misaligned horizontally, indicating deviation from the proper course.  
Figure 7: Example of a visually ambiguous case where background lighting interferes with the correct identification of the leading lights, posing a challenge for both human and AI classification.