# Searching for the Ideal Recipe for Preparing Synthetic Data in the Multi-Object Detection Problem
## 4 Discussion  
The presented work explores diverse methods of generating synthetic data, including crowd simulation, utilizing a plane with a variable background, and incorporating objects onto photo backgrounds. Each approach has its own set of advantages and drawbacks, with typical crowd simulation offering a limited amount of repeatable data, potentially leading to more random outcomes. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline
**Method** & **Prec. \(\uparrow\)** & **Rec. \(\uparrow\)** & **mAP0.5 \(\uparrow\)** & **mAP:0.95 \(\uparrow\)** & **F1 sc. \(\uparrow\)** & **Box \(\downarrow\)** & **Object. \(\downarrow\)** & **Class. \(\downarrow\)** \\ \hline Sim & 0.927 & 0.907 & 0.936 & 0.721 & 0.9169 & 0.029 & 0.0087 & 0.0032 \\ Obj & 0.925 & 0.890 & 0.935 & 0.716 & 0.9072 & 0.0277 & 0.0100 & 0.0026 \\ Square & 0.918 & 0.878 & 0.925 & 0.696 & 0.8976 & 0.032 & 0.0083 & 0.0042 \\
**Mix** & **0.985** & **0.986** & **0.995** & **0.894** & **0.9856** & **0.0228** & **0.0077** & **0.0018** \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Results of different approaches in the generation of synthetic data compared with all parameters. The mixed scenario of all kinds of data generation gives the most promising results confirming the diversity of data. Figure 5: Results of different approaches in the training process with the application of various relations of real and synthetic data concerning the mAP parameters. The upper plot shows the ratio of real data to the sum of real and synthetic data. In contrast, the bottom shows the relation of additional synthetic data applied to full real data. The research involved the inclusion of object classes represented in the COCO database, as well as those requiring manual search and marking. Initially, the YOLOv7 network was trained from scratch using real data. Subsequently, a pretrained model was employed to enhance results. Finally, synthetic data, a blend of real and simulation data (hybrid data) in varying proportions, were introduced, and the network training method was repeated similarly to real data. The research also investigated the impact of options for generating simulation data and the quantity of synthetic data relative to real data on classification quality. The results of the research show that the use of real data in the training process is insufficient. Particularly for classes with limited or no available source data, the use of synthetic data emerges as a highly effective alternative. This study employed the well-established method of training the YOLOv7 network, with an extensive analysis of various data generation approaches. Table 3 illustrates that employing hybrid data for the transfer learning approach yields the best results across all indicated parameters. Notably, this approach significantly enhances the precision of object detection, as evident in the mAP parameter 0.5:0.95. Furthermore, this research reveals that the influence of the amount of synthetic data relative to real data is minimal (refer to Figure 5). However, it is worth noting that synthetic data can be a good replacement and complement to real data when balancing data from multiple classes is required. The research results present the same amount of real and synthetic data in a hybrid set. However, in scenarios with limited real data, supplementing the set with a larger volume of synthetic data proves beneficial. However, in scenarios with limited real data, supplementing the set with a larger volume of synthetic data proves beneficial. That is crucial for ensuring a proper balance of data in case not all classes are represented by a sufficient number of real data. Synthetic data, with their capacity to generate diverse yet realistic images, stand out as a key feature. The primary criterion for data generation was maximizing diversity, and the use of the Unreal Engine game engine helped maintain photorealism. Assessing the impact of photo realism on subsequent work proved challenging due to the absence of clear parameters for evaluating such realism.