# Algorithm of Smart Building Supervision for Detecting and Counting Column Ties Using Deep Learning
## 4 Experiment
### Network for Column Tie Detection
#### 4.1.2 Network Construction  
1. Training Data Set  
The learning data of the object detection network consists of three types of information. It is an image, a classification label, and a bounding box that displays the location of an object in the image. The bounding box consists of a combination of numbers indicating the positions of four points, and the number of combinations of the numbers increases as much as the number of bounding boxes in the image. In MATLAB, this learning data is called Ground Truth, and it provides an interface to create it using an app called Image Labeler. It is necessary to repeat the process of assigning a label name and drawing its position on the image for each image. In this way, the Ground Truth is displayed as a table showing the path of the image file in the first column and the boundary box position in the image in the second column (Figure 3).  
Four methods (Figure 4) were used to construct the training data set. First, a column rebar model was produced to obtain images; second, a rebar image was scrapped from the Internet third, it was directly photographed at a construction site; and finally, after making the rebar model at Autodesk's Revit, it was rendered. By acquiring images like this, we tried to collect a large amount and wide variety of data. The data set was classified into B116, C380, E400, G400, and J580, and was constructed as a set with many images as the alphabetical order increased, as shown in Table 1.  
Considering that the speed and accuracy are relatively high and the size and parameters are small, ResNet50, Inceptionv3, and InceptionResNetv2 networks were selected to use for transfer learning. ResNet50 is the speed and accuracy of the middle of the network. Incetionv3 has half the size and parameters of ResNet101, but has higher performance in terms of speed and accuracy. InceptionResNetv2 has the largest depth and size of the networks, but the accuracy and speed are the best in terms of performance.  
(3) Options and others  
Adam was selected as the optimization function. MATLAB provides'sgdm', 'RMSprop', and 'Adam' as function options to optimize training. Among them, Adam (adaptive moment estimation) is a method that combines the advantages of momentum and RMSprop, and is the most widely used optimization technique. Adam reflects the momentum that gives path efficiency by keeping the gradient's past change to some extent, and the RMSProp's feature reflects the latest information to a greater extent than in the past.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Training Data Set** & **A38** & **B116** & **C380** & **E400** & **G400** & **J580** \\ \hline (a) Rebar-Making-model & 38 & 8 & 175 & 184 & 179 & 176 \\ (b) Internet & - & 29 & 58 & 58 & 58 & 200 \\ (c) On-Site & - & 79 & 139 & 139 & 139 & 177 \\ (d) Revit Model Rendering & - & - & 8 & 19 & 24 & 27 \\ \hline Data Number & 38 & 116 & 380 & 400 & 400 & 580 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Training data Set.  
Figure 4: Training data sources.  
The learning rate has a fixed value and a piecewise learning rate that decreases the learning rate by a predetermined magnification as the learning progresses. When the learning rate was fixed, the value was set to be 1.0 \(\times\) 10\({}^{-5}\), and when decreasing, it started at 0.01 and decreased by 0.1 times for every five epochs. Mini Batch and Max Epoch started at values of 4 and 20, respectively, and the input image was fixed to 500\"500 and the anchor box to 10.