## 6 CNN-Based Synchronization and Color Pattern Classification
In the training process of the model, if the validation loss was within the tolerance range for 50 consecutive epochs, the early stopping function was used, as it was judged to have converged. The reason why the early stopping epochs of the two CNN models are different is that the number of data used and the number of classes to be classified are different. In the case of the packet synchronization model with a relatively small number of data and the number of classes, the early stopping epoch was 78, and in the case of the data decoding model, it was 117. For our CNN models, we used weight values on these epochs and evaluated the communication performance. To investigate the communication performance of DeepCCB-OCC, the achievable data rate (ADR) was measured, and the ADR of the conventional CCB-OCC [20] was compared with it. As can be seen from Figure 12, the ADR performance of the conventional scheme [20] decreased significantly as the distance between the display and the camera \begin{table}
\begin{tabular}{c c c} \hline \hline
**Layer(kernel)** & **Output Shape** & **Activation** & **No. of Params** \\ \hline Input & (None, 100, 900, 3) & 0 \\ Conv2D (32, (3, 3)) & (None, 98, 898, 32) & ReLU & 896 \\ Maxpooling2D (2, 2) & (None, 49, 449, 32) & 0 \\ Conv2D (64, (3, 3)) & (None, 47, 447, 64) & ReLU & 18,496 \\ Maxpooling2D (2, 2) & (None, 23, 223, 64) & 0 \\ Conv2D (64, (3, 3)) & (None, 21, 221, 64) & ReLU & 36,928 \\ Flatten () & (None, 297,024) & 0 \\ Dense (64) & (None, 64) & ReLU & 19,009,600 \\ Dropout & (None, 64) & 0 \\ Output & (None, 8) & 520 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The CNN model’s structure. Figure 11: Learning curves of CNN models for (**a**) synchronization and (**b**) data decoding. \begin{table}
\begin{tabular}{c c} \hline \hline
**Hyper-Parameter** & **Value** \\ \hline Optimizer & Adam \\ Learning rate & 0.001 \\ Beta\_1 & 0.9 \\ Beta\_2 & 0.999 \\ Epsilon & 0.000007 \\ The probability of dropout & 0.4 \\ Minibatch size & 32 \\ Early stopping patience & 50 \\ Maximum epochs & 1000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The experimental setup. increased. However, the ADR of the DeepCCB-OCC system showed that the performance was maintained to some extent as the distance increased. The proposed DeepCCB-OCC system showed an ADR of 80.4 bps when the distance between the display and the camera was 90 cm, but maintained an ADR of 78 bps when the distance was 110 cm. This is because the YOLO model shows strong detection performance for the color barcode area regardless of the size of the object, so it showed better performance than the existing histogram analysis-based performance. As the distance increased, the size of the color barcode pattern became smaller. The CNN-based pilot and data symbol detection by DeepCCB-OCC can perform accurate classification without being greatly affected by the size of the pattern, thereby improving the data rate performance. In Figure 13, the ADR performance of the proposed method and the existing method is compared by fixing the display-to-camera distance at 90 cm and changing the yaw angle from \(-20\) to \(+20\) degrees. We confirmed that the yaw angle between the display and the camera did not significantly affect the ADR performance of the DeepCCB-OCC system, whereas the ADR performance of the conventional system [20] decreased significantly as the angle increased. The proposed DeepCCB-OCC showed an ADR of 80.4 bps when the yaw angle between the display and the camera is 0 degrees, but maintains an ADR of 79.2 bps when the angle was 20 degrees, outperforming the existing technique. Since the existing system uses a heuristic analysis method for the histogram, if the color barcode area becomes distorted, rather than rectangular, detection of the color barcode area is not accurate, and it is difficult to accurately obtain the maximum value for each RGB channel of the histogram.