## 2 Materials and Methods
### Dataset  
The 250 veneers of size \(1525\times 1525\) mm were scanned in \(300\times 300\) mm batches for training and testing. Each veneer was scanned at a resolution of \(4000\times 3000\) pixels in monochrome single-channel images using the equipment described in Section 2.1. The overall number of usable images was 4729. Out of this number, we obtained 353 veneer images (\(300\times 300\) mm) with defects of wood, which contained 982 branch, 288 core, 398 split, and 253 stain defects. In total, 285 images had at least one defect and six images had no defects. The remainder (defect-free images) were categorized as background. For training, we used 291 images, and for testing, we used 62 images representing the most defective single sheets of veneer. The examples of the resulting veneers are depicted in Figure 3. To improve neural network training, the original dataset was augmented. Each image from the dataset contained from eight to 12 defective regions of interest (ROI); therefore, the actual number of examples used for training and testing is 10 times larger. In total, there were \(353\times 10=3530\) of defective ROIs available.  
Dataset images have been reduced to \(800\times 600\) pixel resolution to speed up the training of a neural network. This size was selected heuristically to achieve the best quality and speed. Reducing the size of an image reduces the visibility of small objects such as splits or scratches.  
In this work, four major wood veneer defects were identified: branches are places where tree branches are visible; scratches/splits are places where cracks, splits, or scratches are visible; a core is  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Sort**} & \multirow{2}{*}{\begin{tabular}{c} **Branch Size,** \\ **px2** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **No. of** \\ **Branches** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Allowed Area** \\ **Area of** \\ **Cores, px2** \\ \end{tabular} } & \multirow{2}{*}{\
\begin{tabular}{c} **Allowed Area** \\ **of Scratches,** \\ **px2** \\ \end{tabular} } & \multirow{2}{*}{
\begin{tabular}{c} **Allowed Area** \\ **of Scratches,** \\ **px2** \\ \end{tabular} } \\ \hline A/B & 6300 & 6 & 0 & 2100 & 3 & 0 \\ E & 4200 & 6 & 0 & 12,000 & 3 & 0 \\ C & 16,000 & unlimited & 10\% of area & 12,000 & 8 & 5\% of area \\ D & 90,000 & unlimited & unlimited & 12,000 & 8 & 20\% of area \\ G & unlimited & unlimited & unlimited & unlimited & unlimited & unlimited \\ \hline \hline \end{tabular}
\end{table}
Table 1: Explanation of defect types.  
Figure 2: Example of wood veneer under study.  
where the core or bark of a tree is visible; and stains are water or pigmentation-induced wood spots. Examples of these defects are shown in Figure 4.  
The defects were selected and labeled using the VoTT program to determine the size, position, and class to which it is assigned. The VoTT program marked image is shown in Figure 5.  
Figure 4: Examples of wood veneer defects: (**a**) split; (**b**) core; (**c**) branch; (**d**) stain.  
Figure 3: Samples of veneers: (**a**) nondefective; (**b**) with visible core; (**c**) with visible branches.