{'fraction_non_alphanumeric': 0.027717711814428937, 'fraction_numerical': 0.00858397221676168, 'mean_word_length': 5.008661417322835, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SimuShips -- A High Resolution Simulation Dataset for Ship Detection with Precise Annotations

Obstacle detection is a fundamental capability of an autonomous maritime surface vessel (AMSV). State-of-the-art obstacle detection algorithms are based on convolutional neural networks (CNNs). While CNNs provide higher detection accuracy and fast detection speed, they require enormous amounts of data for their training. In particular, the availability of domain-specific datasets is a challenge for obstacle detection. The difficulty in conducting onsite experiments limits the collection of maritime datasets. Owing to the logistic cost of conducting on-site operations, simulation tools provide a safe and cost-efficient alternative for data collection. In this work, we introduce SimuShips, a publicly available simulation-based dataset for maritime environments. Our dataset consists of 9471 high-resolution (1920x1080) images which include a wide range of obstacle types, atmospheric and illumination conditions along with occlusion, scale and visible proportion variations. We provide annotations in the form of bounding boxes. In addition, we conduct experiments with YOLOv5 to test the viability of simulation data. Our experiments indicate that the combination of real and simulated images improves the recall for all classes by 2.9%.


I. INTRODUCTION
Maritime transportation is a key part of the international supply chain along with an important means of transportation. According to forecasts, the global shipping traffic is expected to grow by 4% each year [1]. This increasing demand for water-based navigation has created an opportunity for autonomous maritime surface vessels (AMSVs). The interest in AMSVs is shared by both-academia and industry. In particular, several projects focus on collision avoidance and path planning for autonomous navigation of AMSVs [2]- [4]. The key motivator for unmanned operations is to reduce human error which is major causal factor in accidents at the sea. According to the European Maritime Safety Agency, a total of 2632 accidents causing 36 deaths and 618 injuries were reported in 2020 alone [5]. Out of these accidents, around 43% were caused by navigational events such as collisions, grounding, and contact. Human-related factors and operational issues were found to be the major causes behind these accidents. Therefore, the development of AMSVs can help in automating operations leading to a reduction in such navigational events.
The first step toward autonomous operations is to create situational awareness about the environment. Previously, this task was extensively dependent on human monitoring making it mundane and unproductive. On the contrary, the same task can be performed by equipping the vessel with sensors such as cameras, LiDAR, GNSS and IMU. Recent works on autonomous vessels deploy machine learning and deep learning to process data from onboard sensors [6]. Particularly, the data collected from cameras has attracted attention in the field of navigation. This data is mainly used for the detection of obstacles for collision avoidance. Therefore, object detection is a core part of maritime intelligent ship safety technology [7], [8].
Given the complex nature of marine environments, traditional computer vision methods such as background subtraction and image segmentation fail to capture the objects under the influence of sunlight, waves, and weather conditions. On the contrary, deep learning-based algorithms are more robust and accurate in detecting objects. These algorithms have a high potential to navigate ships safely by identifying and tracking obstacles at sea. In particular, convolutional neural networks (CNNs) have attracted a lot of attention in recent years for the object detection task. State-of-the-art object detection algorithms such as YOLO [9], RCNN [10], Faster-RCNN [11] and SSD [12] are based on CNNs.
CNNs provide higher detection accuracy and fast detection speed. The structure of CNNs consists of multiple filters spread across layers which are trained to capture different features of an input image. However, these networks consist of millions of parameters. Therefore, they require enormous amounts of data for their training. Due to the scarcity of annotated data, the availability of domain-specific datasets is an essential problem in object detection. Even with the availability of several datasets, the amount of data in the maritime domain is still scarce. Moreover, most of the publicly available maritime datasets [13]- [15] focus on data recorded from the shore creating a shortage of onboard image and video data. The main reason behind this scarcity of data is the difficulty in conducting onsite experiments. Therefore, existing datasets are extremely limited in terms of variety of illumination and weather conditions, number of annotated objects per image and depiction of real scenarios in maritime imagery. Owing to the logistic cost of conducting on-site operations, algorithms are developed in simulation environments such as ROS and Gazebo. Although simulation tools provide a safe and costefficient alternative to experimentation, they have not been exploited to collect data or train object detection algorithms. The major limitation is the lack of incorporation of real-life visuals in the simulation environment.
Therefore, we make the following contributions with this work: • We provide the first publicly available simulation-based dataset for maritime environments consisting of 9471 high-resolution (1920x1080) images resembling the real world with precise annotations • We achieve an improvement of 2.9% in the recall with YOLOv5 [16] through the addition of simulated data proving its benefits In addition, we provide annotations for object detection along with annotation scripts. Our open-source implementation provides a Jupyter notebook to visualize the dataset and plot bounding boxes for further exploration.
The rest of this paper is organized as follows. Section II presents the methodology for data collection and annotation. Section III discusses the experiments with real and simulated data along with the results. Lastly, Section IV concludes this work.

II. METHODOLOGY A. Data Collection through AILiveSim
The dataset was acquired using a simulation tool, AILiveSim [17]. AILiveSim is a 3D simulation platform for the targeted scalable development and integration of autonomous systems through digital twins. The tool provides a realistic 3D model of the route of the watercraft extended from the city of Turku to Ruisalo in South-West Finland. It features identical physical characteristics and configurations of sensors and ships for data collection. Furthermore, it is possible to add stationary or dynamic ships that can be found sailing the Aura river and Baltic Sea. For data collection, four cameras were placed at a 90 • angle to each other to capture images from different perspectives. The images were captured at 30 frames per second and stored in FullHD (1920x1080). In addition to the RGB images, the corresponding segmentation masks were extracted as well. While the route remained largely the same, different scenarios and situations were created by placing different sets of objects at different locations. Each situation contained multiple types of ships and obstacles varying in size, colour and motion. The simulation time was approximately 90 minutes.

B. Data Diversity
While collecting the images, the complex and intricate nature of maritime environments was taken into consideration. In particular, we focused on including a wide range of obstacle types, atmospheric and illumination conditions along with occlusion, scale and proportion variations which can be seen in Fig. 1 and Fig. 2.
Obstacles types: Our dataset includes a variety of maritime vessels diverging in size and configuration. The vessel types include motorboats, tugboats, warships, yachts, sailboats (with different sail variants), fishing boats, passenger ships(ferries) and cargo ships. We include static obstacles as well (rock and buoy) with size and colour variations.
Atmospheric conditions: Commonly occurring weather conditions were considered including clear, cloudy and foggy.
Illumination conditions: Since light variations can significantly impact the captured images, we considered illumination conditions at different times of the day including afternoon, evening and night.
Visible proportions: Our dataset includes images with different visible proportions of the objects. Even when the object is slightly visible in the image, a label is assigned to train a more robust model.
Occlusion: Since the given dataset aims to accurately depict physical context, we include scenarios where maritime vessels occlude each other and/or other objects in the background.
Scale variation: Maritime environments include ships across a range of distances which affects their size in the captured images. A suitable dataset for object detection captures large as well as small objects in the image. Therefore, we focus on capturing vessels at multiple distances.

C. Data Annotation
After collecting the RGB images and their corresponding segmentation masks from the simulation tool, the annotations were extracted using an open-source Python library, OpenCV. The object annotation pipeline is shown in Fig. 3. The colors in the segmentation masks were mapped to categories. For each unique color in the segmentation mask, a mask was created which contains the occurrences of that color only. The image was converted to a binary image by applying a threshold. The contours (edges where color changes sharply) were extracted from the binary image which were finally used to find the bounding boxes. The output is in the form of a tuple (o, x, y, w, h) where (x, y) is the top left corner of the bounding box, w and h are the width and height of the bounding box respectively and o is the object category. We convert this into the format used by the YOLOv5 model. Similar to the (o, x, y, w, h) format, each bounding box is represented by five values. These are the center of the box, its width and height and the object category. One major difference is that these values are normalized by the dimensions of the image (1920x1080). We provide a text file for each image which contains the annotations separated by a new line.
We divided the annotations into two categories.
• Dynamic Obstacles: This category includes all maritime vessels. • Static Obstacles: This category includes rocks and buoys. The intuition behind the choice of these categories was that maritime vessels may have dynamic properties. Therefore, to avoid the vessels, their dynamics must be considered which can be captured via other sensors. On the other hand, buoys   Table I

III. EXPERIMENTS AND RESULTS
We comprehensively evaluated the efficacy of augmenting real and simulated data. We use a publicly available dataset, ABOships [18] which has been collected in Turku, Finland. We use YOLOv5 ('You only look once') which is a family of end-to-end object detection algorithms. These lightweight models process images at a very high speed without compromising the accuracy of inference. Yolov5 uses R-CNN (Region Proposal + CNNs) to compose a solution from the grid, each part of which detects objects within its own area [16]. Prior experimental results indicate that YOLOv5, latest version of YOLO, has the highest speed (up to 140 fps) and smaller size than the previous models [19], [20]. It exceeds Faster R-CNN [11] with regards to precision and recall rates making it suitable for AMSVs. Before discussing the results, we define the metrics used to compare performance.

A. Evaluation Metrics
Various quantitative indicators can be used to evaluate the performance of object detection models. A popular measure is Intersection Over Union (IoU). IoU is a measure based on Jaccard Index which evaluates the extent of overlap between two bounding boxes -the ground truth (actual) and the prediction. IoU is given by the overlapping area between the predicted bounding box B p and the ground truth bounding box B gt divided by the area of union between them [21] as shown in (1): A threshold value thres for IoU determines whether the box belongs to the background IoU < thres or is counted as a prediction IoU ≥ thres. With this metric, recall and precision can be defined. Recall reflects an algorithm's capability to capture objects from the image i.e. out of all the predictions present in the dataset, how many were successfully predicted by the model. Recall is a crucial metric for AMSVs since missing obstacles can result in accidents. Precision reflects an algorithm's capability to identify relevant objects. It is calculated as the proportion of correctly identified bounding boxes over the total number of detected boxes. F1 score is the harmonic mean of precision and recall which serves as a single numerical metric to compare the performance of models. Average precision (AP) is another metric derived from precision and recall. It is the area under the precision-recall curve. The mean average precision (mAP) is calculated by finding AP for each class and then taking an average over the number of classes. Depending upon the IoU threshold, we

B. Quantitative Results
In this work, we used the open-source implementation by Ultralytics. First, we randomly split the two datasets into training and test sets in a 80/20 ratio. Then, we merged and shuffled the training datasets to get a combined dataset. We trained YOLOv5 on ABOships (Model A). We trained the same architecture on the combined dataset (Model B). We evaluated these models on SimuShips and ABOShips (see Table II). Model B outperformed Model A on both test sets. In particular, for the real images, Model B achieved a higher recall as well as mAP score.
Since precision and recall are sensitive to the confidence threshold, we used F1 curves across a range of confidence thresholds (1000 points) to compare the performance of the two models. As indicated by Fig. 4, around default values of the confidence thresholds, Model B had a higher F1 score as compared to Model A. Model B achieved a higher area under the curve as well.

IV. CONCLUSION
In this paper, we present SimuShips, a high-resolution, simulation-based dataset for maritime environments consisting of images resembling the real world. Our dataset incorporates diversity of objects, weather, illumination, visible proportion and scale. Moreover, we conduct experiments with our dataset and a publicly available dataset, ABOships, containing only real world images, to evaluate the performance of YOLOv5. We observed that the combination of real and simulated images improves the recall for all classes by 2.9%. These experiments highlight a novel direction for researchers to collect data from digital tools and combine it with the real world data to solve machine learning and deep learning problems. We consider it as an open research avenue to augment image data with domain-specific simulation data for other computer vision tasks such as semantic segmentation, classification and Simultaneous Localization and Mapping (SLAM) and analyze the effectiveness of such amalgamation.