# Syn2 Real Detection in the Sky: Generation and Adaptation of Synthetic Aerial Ship Images
## 3 Methods  
### Engine-Based Generation  
When it comes to physics engine generation, Unity provides a simpler and more user-friendly interface and workflow. This can help reduce the learning curve and development costs associated with using the physics engine. Unity is a cross-platform game development engine that supports the creation of both 2D and 3D content. It offers a powerful visual editor, allowing developers to freely build scene terrains, models, and add objects as needed. Developers can use the C# programming language to control components and scripts, and there are abundant components and application programming interfaces (APIs) that can be integrated with Visual Studio for seamless communication. Unity also boasts powerful graphic rendering capabilities, enabling the real-time rendering of scenes. Moreover, Unity's camera component allows for the continuous capture of scene photos and enables output in layers based on their contents, greatly facilitating image processing tasks. Virtual synthesis techniques involve constructing scenarios and objects using a 3D virtual engine based on real-world applications, resulting in a large number of images. However, to create a synthetic dataset that is both realistic and generalizable, several factors need to be considered, such as variations in the spatial resolution of each sensor, sensor viewing angles, collection of the time of day, object shadows, and illumination based on the position of the sun relative to the sensors. The platform takes in real-world metadata and images to programmatically generate 3D environments of real-world locations, incorporating various parameters such as weather conditions, collection time, sunlight intensity, viewing angles, modeling, and object distribution density. All these parameters can be adjusted using the Unity engine, allowing for the creation of diverse and heterogeneous datasets. We utilized these tools to generate a virtual synthetic dataset using the Unity engine. A total of 77 ship models, varying in size and type, from expedition yacht to aircraft carrier, were employed. To ensure diversity, we created seven virtual scenes, each encompassing three weather conditions, four time periods, and corresponding light intensities. Additionally, we captured photographs from different heights, resulting in a rich and varied dataset for synthetic image synthesis. For accurate annotation, we labeled the horizontal bounding box for each ship object in the standard annotation format used for object detection. Furthermore, we included the rotation box and other relevant information to establish a foundation for future research objectives. To control the ships and cameras, we utilized the API with two methods at specific spatial intervals: fixed shooting and scanning shooting. The virtual camera in Unity can be controlled using the camera component. For our simulation of an aerial image, we set the camera mode to 'top-down'. The horizontal field of view was fixed at 60 degrees, and the image resolution was set to 2000 \(\times\) 1600. To generate the ship objects, we randomly selected a number of ships from the ship model library and randomized their coordinates and rotation angles. To prevent object overlap, we added a collision body component to all objects. This component allows us to set collision triggers and fill the land portion with transparent collision bodies, ensuring that the ships appear on the water surface. To generate weather conditions, we randomly generated direct sunlight within a specific spatial area, including the position of the sun, the angle of direct sunlight, and the light intensity. Additionally, other weather parameters were determined using random numbers. The synthetic dataset we generated is named \"SASI-UNITY\". Sample images from the dataset are displayed in Figure 1. It consists of a total of 10,000 images, which were divided into training, validation, and test sets in a 6:2:2 ratio.