Next Article in Journal
Fatigue Crack Propagation under Christmas Tree Load Pattern
Next Article in Special Issue
Analysis of Recent Deep Learning Techniques for Arabic Handwritten-Text OCR and Post-OCR Correction
Previous Article in Journal
A Perspective on Ethernet in Automotive Communications—Current Status and Future Trends
Previous Article in Special Issue
MCA-YOLOV5-Light: A Faster, Stronger and Lighter Algorithm for Helmet-Wearing Detection
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Crack Severity Classification from Timber Cross-Sectional Images Using Convolutional Neural Network

1
National Institute of Technology, Niihama College, 7-1 Yagumo-cho, Niihama 792-8580, Japan
2
Ehime Prefectural Forestry Research Center, 2-280-38 Sugou, Kumakougen-cho 792-1205, Japan
3
Department of Intelligent Interaction Technologies, Graduate School of Systems and Information Engineering, University of Tsukuba, 1-1-1 Tennoudai, Tsukuba 305-8573, Japan
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(3), 1280; https://doi.org/10.3390/app13031280
Submission received: 4 January 2023 / Revised: 16 January 2023 / Accepted: 17 January 2023 / Published: 18 January 2023

Abstract

:

Featured Application

Application of convolutional neural network (CNN) for automatic evaluation of internal crack severity in building square timbers. In our previous article, we constructed a simple CNN and employed cross-sectional pictures covered with silver paint to make the cracks easier to recognize. However, in this article, we confirmed that the severity of the internal cracks could be evaluated with high accuracy by a ResNet50-CNN (Residual Neural Network 50 CNN), even in the case of unpainted images. Given that quality managers must evaluate numerous timbers, this automation process reduces the workload.

Abstract

Cedar and cypress used for wooden construction have high moisture content after harvesting. To be used as building materials, they must undergo high-temperature drying. However, this process causes internal cracks that are invisible on the outer surface. These defects are serious because they reduce the strength of the timber, i.e., the buckling strength and joint durability. Therefore, the severity of internal cracks should be evaluated. A square timber was cut at an arbitrary position and assessed based on the length, thickness, and shape of the cracks in the cross-section; however, this process is time-consuming and labor-intensive. Therefore, we used a convolutional neural network (CNN) to automatically evaluate the severity of cracks from cross-sectional timber images. Previously, we used silver-painted images of cross-sections so that the cracks are easier to observe; however, this task was burdensome. Hence, in this study, we attempted to classify crack severity using ResNet (Residual Neural Network) from unpainted images. First, ResNet50 was employed and trained with supervised data to classify the crack severity level. The classification accuracy was then evaluated using test images (not used for training) and reached 86.67%. In conclusion, we confirmed that the proposed CNN could evaluate cross-sectional cracks on behalf of humans.

1. Introduction

Cedar and cypress used for wooden construction have high moisture content after harvesting. To be used as building materials, they must undergo high-temperature drying [1]. This process is indispensable to prevent deformation and mildew. However, if the timbers are not dried using the appropriate procedure, internal cracks are formed, as shown in Figure 1a [2].
Internal cracks are severe because they reduce the durability of timber [3,4]. Based on this knowledge, physical stress propagation during drying was analyzed to improve the high-temperature drying technique with less cracking [5,6]. In the actual field, severe internal cracks can occur because of excessive high-temperature drying.
As shown in Figure 2a, the quality manager extracted a sample block of timber. In Figure 2b, the quality manager had to decide whether to use the material for the building based on the severity of the cracks by measuring the crack length, width, and number using calipers. However, this task is labor-intensive.
Therefore, this study aims to realize an intelligent system that automatically evaluates the severity of internal cracks based on cross-sectional images using a convolutional neural network (CNN) [7], as shown in Figure 2c.
We developed a simple CNN dealing with silver-painted cross-sectional images to make the cracks more clearly visible, as shown in Figure 3a [8]. The simple CNN that we proposed in our previous article could evaluate crack severity with approximately 85.67% accuracy [9]. However, the silver-painting task is cumbersome. Thus, in the present study, the proposed CNN deals with unpainted images, as shown in Figure 3b.
In previous studies related to the internal cracks in the timber, we found attempts to infer the internal cracks using acoustic signals [10,11,12]. However, our objective differs compared to these studies because they attempt to infer the condition of invisible internal cracks. In contrast, our attempt is to evaluate the visible cross-section depending on the crack severity.
Other studies applied CNNs to automatically detect cracks on wooden building surfaces [13] in order to find critical damage in wooden buildings. We also found studies to find cracks, knots, and mold in timbers [14,15] using CNN. Meanwhile, our study differs because we aimed to automatically evaluate crack severity levels rather than to detect cracks. In other words, most of the relevant studies focused on the automatic detection of cracks and not on the evaluation of the level of severity in the detected cracks. The present paper differs from other similar studies in that it focuses on evaluating the rank of the timber’s quality. We have not found any study that attempts to employ a CNN to evaluate the quality of square timber considering cracks.
Quality control staff in vendors, and researchers improving high-temperature drying techniques, have to rank many square timbers visually, and the burden of this task is considerable. The practical application of this study is to replace humans with artificial intelligence that automatically evaluates the quality of timbers.
Our previous study [8,9] constructed a simple CNN to evaluate silver-painted cross-sectional grayscale images. In the painted image, only the cracks are visible, excluding annual rings or knots. However, the painting process is labor-intensive. Therefore, the present paper targets color images without silver paint, and we employed a CNN taking color images as the input.
Convolutional neural networks are more suitable for capturing image features than a classical fully connected neural network because the CNN focuses on the relations of neighboring pixels of an image. On the other hand, the classical fully connected neural networks are inefficient in learning because they consider relationships between all pixels with the same importance.
The remainder of this paper is organized as follows. Section 2 describes the method for preparing and classifying timber cross-sectional images and presents the proposed CNN structure. Section 3 explains the validation method and results for the proposed CNN. Section 4 discusses the given result and future perspectives. Section 5 describes the conclusion of the present paper.

2. Materials and Methods

This section describes procedures to prepare cross-sectional images of timbers. In addition, the CNN configuration to evaluate the crack severity of the cross-sectional image is explained.

2.1. Timber Image Acquisition and Crack Severity Classification

We prepared 32 square cedar timbers with a 3000 mm length, as shown in Figure 4a, and then carried out high-temperature drying. Orange block pieces were cut out, and 32 blocks were obtained for the upper and root sides. As shown in Figure 4b, we scanned the images of the cross-sections surrounded by the green dashed lines using a scanner. Hence, 32 pictures for the upper side blocks and 32 pictures for the root side blocks were obtained, i.e., a total of 64 pictures.
A crosscut saw (KM-3C; Kobayashi Kikai Kogyo Co., Ltd.; Mishima-City, Shizuoka, Japan) was used to cut square timbers, as shown in Figure 5a. A belt sander (HUS-3: Hasegawa Wood Tech Co., Ltd.; Fuchu-City, Hiroshima, Japan) was used to flatten the cross-section. A scanner (Canon CanoScan LiDe 700F) was used to photograph the cross-section, as shown in Figure 5b. The scanning resolution was 200 dpi.
We classified the obtained 64 images depending on the cracking severity into classes A (Good), B (Neutral), and C (Bad), expressing the timber condition. Examples of these images are shown in Figure 6. Figure 6a shows the images categorized as class A (Good) with almost no cracks. Figure 6b shows class B (Neutral) with minor cracking. Figure 6c, which is labeled as class C (Bad), shows a lot of noticeable cracking with risk to strength. Among all 64 images, 20 images were in class A (Good), 20 in class B (Neutral), and 24 in class C (Bad).

2.2. CNN Structure for Crack Severity Evaluation

The input to the proposed CNN was a 244 × 244 × 3 RGB (Red-Green-Blue color model) image, as shown in Figure 7. The outputs are classification probabilities in the range of 0 to 1, expressed in terms of classes A (Good), B (Neutral), and C (Bad), representing the condition of the timber. The class with the highest probability is the classification result.
The proposed CNN is based on ResNet50-CNN (Residual Neural Network 50 CNN) [16]. However, the CNN is not pre-trained with image data, such as ImageNet [17]. Initially, the convolution filters and connection weights were random. Although ResNet50-CNN has very deep layers, it uses a skip structure and 1 × 1 convolution operation to improve learning efficiency. We also found that ResNet-CNN can be applied to the feature extraction of cracks in concrete infrastructure, such as roads or bridges [18].
Table 1, Table 2, Table 3 and Table 4 list the details of the feedforward calculation of the CNN. Figure 8 shows the structural diagram of the CNN corresponding to Table 1, Table 2, Table 3 and Table 4. The CNN consisted of four stacks, as shown in Table 1, Table 2, Table 3 and Table 4 and Figure 8. In stack 1, the channel depth of the feature map increased from 64 to 256. Furthermore, in stack 2, the channel depth increased from 128 to 512. In contrast, for both stacks 1 to 2, the height and width were halved from 56 × 56 to 28 × 28. Similarly, in stacks 3 and 4, the number of channels increased; instead, the height and width of the feature map were downsized.
As shown in Figure 8, the skip structure prevents zero-loss gradients during backpropagation in the training stage, even when the layers are deepened. BatchNorm in Table 1, Table 2, Table 3 and Table 4 refers to the batch normalization operation [19]; this operation allows for accelerated learning and prevents overfitting as a side effect. The BatchNorm operation has been employed in CNN models since the introduction of ResNet [16] and DenseNet [20]. A rectified linear unit (ReLU) function [21] is used in deep neural networks to prevent gradient loss. The ReLU function has been applied in various types of CNNs, such as AlexNet [22] and VGG [23]. The global average pooling operation [24] in Table 4 generates a one-dimensional vector with elements of the channel number. Each element represents the average value of each channel in the feature map. This downsizing of the feature map shortens the computational load and has been used since GoogLeNet [25].

3. Results

The CNN was developed using a MathWorks’ MATLAB (R2022a) and a Deep Learning Toolbox. The CNN was validated with 64 images; i.e., 20 of class A (Good), 20 of B (Neutral), and 24 of C (Bad) images. In machine learning, a sufficient dataset (such as medical images) is not always available. Therefore, various evaluation methods based on limited data have been proposed [26]. In this study, we adopted a repeated random subsampling validation. As shown in Figure 9, three images from each class were randomly extracted to test the CNN after training. Accordingly, the remaining 55 images, excluding nine test images, were used to train the CNN; subsequently, nine test images were input to the trained CNN to confirm the classification accuracy.
The above validation was conducted over 20 trials, as explained in the following section.

3.1. Training of CNN

Table 5 lists the conditions for training the CNN. The training was divided into two phases: First Half and Last Half. The training images were augmented, as shown in Figure 10. In the First Half, the image was randomly flipped from left to right (Figure 10a) and then up and down (Figure 10b) and randomly rotated (Figure 10c) in the range of real numbers from 0° to 360°. Random rotation allows training images to be virtually a significant amount of image data [27]. In the Last Half, training is performed on images without rotation to acclimate the CNN to the non-rotated images. In this study, the CNN could detect crack features with many augmented images. Therefore, transfer learning [28], such as fine-tuning a pre-trained CNN, should be the focus of future work.
Figure 11 shows the transition in loss; the cross-entropy function was adopted [29]. In all trials, the loss declined. In particular, in the Last Half (Figure 11b), the loss decrease was smooth because the augmentation was only inverted vertically and horizontally.

3.2. CNN Evaluation

Table 6 lists the test data and classification accuracies for each trial. The mean accuracy was 86.67%. The accuracy is plotted in Figure 12a, and the confusion matrix is shown in Figure 12b. As shown in Figure 12b, misjudgment cases between classes A (Good) and C (Bad) were not found.
Table 7 lists the IDs of the misclassified images and the probability values of the softmax layer. Figure 13 shows the misclassified images corresponding to the image IDs listed in Table 7.
The CNN classified B017, B019, and B020 as C (Bad) because the cracks were deep and thick. Such discrimination is difficult even for humans and is attributed to fuzzy boundaries in the classification process [30]. In addition, the probability values of B (Neutral) and C (Bad) in B017, B020, C008, C012, and C019 were simultaneously close to 0.5, indicating that the misjudgment was made in confusion. The CNN was confused and acted like humans in these cases.
It is noteworthy that for A001, where the CNN determined A (Good) to be B (Neutral), we assumed that the annual rings were misrecognized as cracks. This problem can be addressed in the future by adding training image data.
Considering the loss transition during training shown in Figure 11, training was performed successfully. As shown in Table 6 and Figure 12, the CNN could assess the overall crack severity appropriately, even though some misjudged cases were found. Furthermore, considering the results in Table 7 and Figure 13, we conclude that the CNN acts like a human and, therefore, has the potential to evaluate timber cracks on behalf of a human.
We also evaluated the Recall, Precision, and F-measure [31], commonly used to evaluate the classifier for three or more categories. The Recall, Precision, and F-measure are defined in Equations (1)–(3). Table 8 shows the result.
Recall = TP TP + FN
Precision = TP TP + FP
F - measure = 2   ×   Precision   ×   Recall Precision + Recall
Given the results, we can observe that there is no excessive bias in the data set.

4. Discussion

This paper described the automatic evaluation system of internal cracks in square timbers that occur due to high-temperature drying, which is not externally visible. Currently, the evaluation of internal cracks is performed visually by humans. However, AI could take the place of this process. In this paper, we applied a CNN, widely used in machine learning, for image recognition. In many cases, CNNs are employed for crack detection in wood [13,14,15] and concrete [18] construction materials. Most of the relevant studies in crack recognition using a CNN do not focus on the evaluation of the level of severity of the detected cracks. The present paper differs from other similar studies in that it focuses on evaluating the material quality considering cracks using a CNN. In addition, a CNN could potentially be able to perform crack recognition regardless of light conditions if we increase the training images. Such a task is difficult to carry out using only classical image processing such as edge detection.
Section 2 describes the details of the high-temperature-dried square timber and the proposed CNN. In Section 3, the performance of the CNN’s evaluation ability is validated. The results confirm that the evaluation was similar to that of a human.
To improve the durability of wooden buildings, it is essential to evaluate the quality of their materials, as well as to contribute to sustainability, aesthetics, the environment, and livability. In short, addressing the durability of wooden constructions may encourage architects, urban planners, and policy planners to rethink and reshape streets [32] with sustainable materials. In addition, it could improve the quality, aesthetics, and functional ambiance of urban landscape environments.

5. Conclusions

This paper describes the crack severity level classification of square timber cross-sectional images using a CNN. Thirty-two cedar timbers of 3000 mm in length were dried at a high temperature. Cross-sectional images of two different parts of each timber were obtained. Consequently, 64 cross-sectional images were acquired in total. The images were classified into three classes, i.e., A (Good), B (Neutral), and C (Bad), based on the severity of the cracks. We subsequently investigated the automatic classification of images using the ResNet50-CNN. Because the image data were insufficient, flipping and rotation were applied while training the CNN to virtually augment the image data.
In addition, repeated random subsampling validation was performed to evaluate the CNN using a small amount of data. Three images from each class were randomly selected for testing, and the remaining images were used to train the CNN. The loss decreased as the epochs progressed. The classification accuracy was evaluated using test data that were not used for the training; the aforementioned procedure was performed 20 times. In the 20 trials, the average classification accuracy for the test data was 86.67%. We analyzed the misjudged images and observed confusion similar to human evaluators. Therefore, we confirmed that the CNN has the potential to evaluate cross-sectional cracks on behalf of humans. However, the light condition to capture images was constant in this paper. In the future, it will be necessary to prepare more image data to evaluate the performance of the CNN. In addition, we will need to construct a system in the field that enables the evaluation of cracks under various light conditions.
This study could decrease the burden of quality control on vendors, as well as researchers improving high-temperature drying techniques, who have to rank many square timbers visually. The practical application of this study is to replace humans with artificial intelligence that automatically evaluates the quality of timbers. A skilled human evaluator could comprehensively evaluate timber quality, taking into account not only the cracks number, area, and length, but additionally the shape and location of the cracks in the cross-section. CNNs have the potential to perform the detailed judgment of a skilled evaluator if trained with various image data.

Author Contributions

S.K.: conceptualization, methodology, software, validation, formal analysis, investigation, writing original draft preparation, writing review and editing, and visualization; N.W.: conceptualization, methodology, validation, formal analysis, investigation, supervision, and project administration; K.S.: conceptualization, methodology, validation, formal analysis, and investigation; T.T.: conceptualization, methodology, validation, formal analysis, and investigation; T.K.: validation, formal analysis, and investigation; R.T.: methodology, software, validation, formal analysis, and investigation; H.N.: conceptualization, methodology, validation, formal analysis, and investigation. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by JSPS KAKENHI (grant number JP20K06116).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Only academic use is available. Please contact us via e-mail.

Acknowledgments

The authors would like to thank Ueno and Maeda of MathWorks for their technical advice.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bergman, R. Drying and Control of Moisture Content and Dimensional Changes. In Wood Handbook, Wood as an Engineering Material; USDA: Washington, DC, USA, 2021; Chapter 13; pp. 1–20. [Google Scholar]
  2. Yamashita, K.; Hirakawa, Y.; Saito, S.; Ikeda, M.; Ohta, M. Internal-Check Variation in Boxed-Heart Square Timber of sugi (Cryptomeria japonica) Cultivars Dried by High-Temperature Kiln Drying. J. Wood Sci. 2012, 58, 375–382. [Google Scholar] [CrossRef]
  3. Tomita, M. Effects of Internal Checks Caused by High-Temperature Drying on Mechanical Properties of Sugi Squared Sawn Timbers: Bending Strength of Beam and Resistance of Bolted Wood-Joints. Wood Ind. 2009, 64, 416–422. [Google Scholar]
  4. Tonosaki, M.; Saito, S.; Miyamoto, K. Evaluation of Internal Checks in High Temperature Dried Sugi Boxed Heart Square Sawn Timber by Dynamic Shear Modulus. Mokuzai Gakkaishi 2010, 56, 79–83. [Google Scholar] [CrossRef] [Green Version]
  5. Teranishi, Y.; Kaimoto, H.; Matsumoto, H. Steam-Heated/Radio-Frequency Hybrid Drying for Sugi Boxed-Heart Tim-bers(1)Effect of High Temperature Setting Time on Internal Checks. Wood Ind. 2016, 72, 52–57. [Google Scholar]
  6. Yin, Q.; Liu, H.-H. Drying Stress and Strain of Wood: A Review. Appl. Sci. 2021, 11, 5023. [Google Scholar] [CrossRef]
  7. LeCun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-Based Learning Applied to Document Recognition. Proc. IEEE 1998, 86, 2278–2324. [Google Scholar] [CrossRef] [Green Version]
  8. Kato, S.; Wada, N.; Shiogai, K.; Tamaki, T. Evaluation of the Crack Severity in Squared Timber Using CNN. In Lecture Notes in Networks and Systems, Proceedings of the 36th International Conference on Advanced Information Networking and Applications, Sydney, Australia, 13–15 April 2022; Springer: Cham, Switzerland, 2022; Volume 3, pp. 441–447. [Google Scholar] [CrossRef]
  9. Kato, S.; Wada, N.; Shiogai, K.; Tamaki, T.; Kagawa, T.; Toyosaki, R.; Nobuhara, H. Automatic Classification of Crack Severity from Cross-Section Image of Timber Using Simple Convolutional Neural Network. Appl. Sci. 2022, 12, 8250. [Google Scholar] [CrossRef]
  10. Nakayama, S. Evaluation of Internal Checks on Boxed-Heart Structural Timber of Sugi and Hinoki Using Stress-Wave Propagation I. Effects of Moisture Content, Timber Temperature, Knots, and the Internal Check Form. J. For. Biomass Util. Soc. 2012, 7, 51–58. [Google Scholar]
  11. Nakayama, S.; Matsumoto, H.; Teranishi, Y.; Kato, H.; Shibata, H.; Shibata, N. Evaluation of Internal Checks on Boxed-Heart Structural Timber of Sugi and Hinoki Using Stress-Wave Propagation II. Evaluating Internal Checks of Full-Sized Timber. J. For. Biomass Util. Soc. 2013, 8, 21–27. [Google Scholar]
  12. Nakayama, S.; Matsumoto, H.; Teranishi, Y.; Kato, H.; Shibata, H.; Shibata, N. Evaluation of Internal Checks on Boxed-Heart Structural Timber of Sugi and Hinoki Using Stress-Wave Propagation (III) Estimation of the Length of Internal Checks in Boxed-Heart Square Timber of sugi. J. For. Biomass Util. Soc. 2013, 8, 61–65. [Google Scholar]
  13. Liu, Y.; Hou, M.; Li, A.; Dong, Y.; Xie, L.; Ji, Y. Automatic Detection of Timber-Cracks in Wooden Architectural Heritage Using Yolov3 Algorithm. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci. 2020, XLIII–B2, 1471–1476. [Google Scholar] [CrossRef]
  14. He, T.; Liu, Y.; Yu, Y.; Zhao, Q.; Hu, Z. Application of Deep Convolutional Neural Network on Feature Extraction and Detection of Wood Defects. Measurement 2020, 152, 107357. [Google Scholar] [CrossRef]
  15. Pan, L.; Rogulin, R.; Kondrashev, S. Artificial Neural Network for Defect Detection in CT Images of Wood. Comput. Electron. Agric. 2021, 187, 106312. [Google Scholar] [CrossRef]
  16. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
  17. Deng, J.; Dong, W.; Socher, R.; Li, L.J.; Li, K.; Li, F.F. ImageNet: A Large-Scale Hierarchical Image Database. In Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Miami, FL, USA, 20–25 June 2009; pp. 248–255. [Google Scholar] [CrossRef]
  18. Hamishebahar, Y.; Guan, H.; So, S.; Jo, J. A Comprehensive Review of Deep Learning-Based Crack Detection Approaches. Appl. Sci. 2022, 12, 1374. [Google Scholar] [CrossRef]
  19. Ioffe, S.; Szegedy, C. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. Int. Conf. Mach. Learn. 2015. Available online: https://arxiv.org/abs/1502.03167 (accessed on 4 January 2023).
  20. Huang, G.; Liu, Z.; van der Maaten, L.; Weinberger, K.Q. Densely Connected Convolutional Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 4700–4708. [Google Scholar]
  21. Nair, V.; Hinton, G. Rectified Linear Units Improve Restricted Boltzmann Machines. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), Haifa, Israel, 21–24 June 2010; pp. 807–814. [Google Scholar]
  22. Alex, K.; Sutskever, I.; Hinton, G.E. ImageNet Classification with Deep Convolutional Neural Networks. Adv. Neural Inf. Process. Syst. 2012, 25, 1097–1105. [Google Scholar]
  23. Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. 2015. Available online: https://arxiv.org/abs/1409.1556 (accessed on 4 January 2023).
  24. Lin, M.; Chen, Q.; Yan, S. Network in Network. 2013. Available online: https://arxiv.org/abs/1312.4400 (accessed on 4 January 2023).
  25. Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going Deeper with Convolutions. arXiv 2014, arXiv:1409.4842. [Google Scholar] [CrossRef]
  26. Priddy, K.L.; Keller, P.E. Dealing with Limited Amounts of Data. In Artificial Neural Networks—An Introduction; SPIE Press: Bellingham, WA, USA, 2005; Chapter 11; pp. 101–105. [Google Scholar]
  27. Shorten, C.; Khoshgoftaar, T.M. A survey on Image Data Augmentation for Deep Learning. J. Big Data 2019, 6, 60. [Google Scholar] [CrossRef]
  28. Shin, H.-C.; Roth, H.R.; Gao, M.; Lu, L.; Xu, Z.; Nogues, I.; Yao, J.; Mollura, D.; Summers, R.M. Deep Convolutional Neural Networks for Computer-Aided Detection: CNN Architectures, Dataset Characteristics and Transfer Learning. IEEE Trans. Med. Imaging 2016, 35, 1285–1298. [Google Scholar] [CrossRef] [Green Version]
  29. Bishop, C.M. Pattern Recognition and Machine Learning; Springer: New York, NY, USA, 2006. [Google Scholar]
  30. Zadeh, L.A. Fuzzy sets. Inf. Control 1965, 8, 338–353. [Google Scholar] [CrossRef] [Green Version]
  31. Rella Riccardi, M.; Mauriello, F.; Sarkar, S.; Galante, F.; Scarano, A.; Montella, A. Parametric and Non-Parametric Analyses for Pedestrian Crash Severity Prediction in Great Britain. Sustainability 2022, 14, 3188. [Google Scholar] [CrossRef]
  32. Montella, A.; Chiaradonna, S.; Mihiel, A.C.d.S.; Lovegrove, G.; Nunziante, P.; Rella Riccardi, M. Sustainable Complete Streets Design Criteria and Case Study in Naples, Italy. Sustainability 2022, 14, 13142. [Google Scholar] [CrossRef]
Figure 1. Images of cross-sections of cedar square timbers. (a) Example of internal cracks; (b) No cracks without risk to physical strength.
Figure 1. Images of cross-sections of cedar square timbers. (a) Example of internal cracks; (b) No cracks without risk to physical strength.
Applsci 13 01280 g001
Figure 2. Process of substituting a human with a convolutional neural network (CNN) to evaluate timber crack severity. (a) Sample block extraction; (b) Human evaluation is burdensome; (c) CNN evaluation of crack severity.
Figure 2. Process of substituting a human with a convolutional neural network (CNN) to evaluate timber crack severity. (a) Sample block extraction; (b) Human evaluation is burdensome; (c) CNN evaluation of crack severity.
Applsci 13 01280 g002
Figure 3. Cross-sectional pictures. (a) Silver-painted picture employed in our previous study [8,9]; (b) Corresponding unpainted pictures.
Figure 3. Cross-sectional pictures. (a) Silver-painted picture employed in our previous study [8,9]; (b) Corresponding unpainted pictures.
Applsci 13 01280 g003
Figure 4. Timber details and scanning method for cross-sectional images. (a) Size of 32 square cedar timbers. Orange block pieces were cut out; (b) We scanned the images of the cross-sections surrounded by the green dashed lines.
Figure 4. Timber details and scanning method for cross-sectional images. (a) Size of 32 square cedar timbers. Orange block pieces were cut out; (b) We scanned the images of the cross-sections surrounded by the green dashed lines.
Applsci 13 01280 g004
Figure 5. Scenes for timber processing and image acquisition. (a) Cutting scene of square timber; (b) Image of the cross-section is scanned using a scanner.
Figure 5. Scenes for timber processing and image acquisition. (a) Cutting scene of square timber; (b) Image of the cross-section is scanned using a scanner.
Applsci 13 01280 g005
Figure 6. Image examples with classes depending on crack severity. (a) “Good” images classified in class A; (b) “Neutral” images with practically no significant cracks were classified into class B; (c) “Bad” images have noticeable cracking with risk to strength classified into class C.
Figure 6. Image examples with classes depending on crack severity. (a) “Good” images classified in class A; (b) “Neutral” images with practically no significant cracks were classified into class B; (c) “Bad” images have noticeable cracking with risk to strength classified into class C.
Applsci 13 01280 g006
Figure 7. CNN structure for crack severity evaluation.
Figure 7. CNN structure for crack severity evaluation.
Applsci 13 01280 g007
Figure 8. Proposed CNN structure.
Figure 8. Proposed CNN structure.
Applsci 13 01280 g008
Figure 9. Overview of repeated random subsampling validation.
Figure 9. Overview of repeated random subsampling validation.
Applsci 13 01280 g009
Figure 10. Augmentation of training images. (a) Left–Right Reflection; (b) Top–Down Reflection; (c) Random rotation.
Figure 10. Augmentation of training images. (a) Left–Right Reflection; (b) Top–Down Reflection; (c) Random rotation.
Applsci 13 01280 g010
Figure 11. Loss transition for all trials. Y-axis is loss, and x-axis represents epoch. (a) Loss transition in First Half; (b) Last Half.
Figure 11. Loss transition for all trials. Y-axis is loss, and x-axis represents epoch. (a) Loss transition in First Half; (b) Last Half.
Applsci 13 01280 g011
Figure 12. Test results of CNN. (a) Accuracies in each trial are represented with dot; (b) Confusion matrix in all trials.
Figure 12. Test results of CNN. (a) Accuracies in each trial are represented with dot; (b) Confusion matrix in all trials.
Applsci 13 01280 g012
Figure 13. Misclassified images.
Figure 13. Misclassified images.
Applsci 13 01280 g013
Table 1. CNN feedforward calculation from input to stack 1.
Table 1. CNN feedforward calculation from input to stack 1.
LayerOperationFilters’ Set NumFilter SizeStride, Zero-Padding
[Top, Bottom, Left, Right]
Feature Map
Output
Input----224 × 224 × 3
Conv 1Conv, BatchNorm, ReLU647 × 7 × 32 × 2, [2,3,2,3]112 × 112 × 64
Max poolMax pooling-3 × 32 × 2, [0,1,0,1]56 × 56 × 64
Stack 1_1Conv 1_1_1Conv, BatchNorm, ReLU641 × 1 × 641 × 1, [0,0,0,0]56 × 56 × 64
Conv 1_1_2Conv, BatchNorm, ReLU643 × 3 × 641 × 1, [1,1,1,1]56 × 56 × 64
Conv 1_1_3Conv, BatchNorm2561 × 1 × 641 × 1, [0,0,0,0]56 × 56 × 256
Stack 1_1_brConv 1_1_4Conv, BatchNorm2561 × 1 × 641 × 1, [0,0,0,0]
Stack 1_1_addAdd, ReLU---
Stack 1_2Conv 1_2_1Conv, BatchNorm, ReLU641 × 1 × 2561 × 1, [0,0,0,0]56 × 56 × 64
Conv 1_2_2Conv, BatchNorm, ReLU643 × 3 × 641 × 1, [1,1,1,1]56 × 56 × 64
Conv 1_2_3Conv, BatchNorm2561 × 1 × 641 × 1, [0,0,0,0]56 × 56 × 256
Stack 1_2_br-----
Stack 1_2_addAdd, ReLU---
Stack 1_3Conv 1_3_1Conv, BatchNorm, ReLU641 × 1 × 2561 × 1, [0,0,0,0]56 × 56 × 64
Conv 1_3_2Conv, BatchNorm, ReLU643 × 3 × 641 × 1, [1,1,1,1]56 × 56 × 64
Conv 1_3_3Conv, BatchNorm2561 × 1 × 641 × 1, [0,0,0,0]56 × 56 × 256
Stack 1_3_br-----
Stack 1_3_addAdd, ReLU---
Table 2. CNN feedforward calculation in stack 2.
Table 2. CNN feedforward calculation in stack 2.
LayerOperationFilters’ Set NumFilter SizeStride, Zero-Padding
[Top, Bottom, Left, Right]
Feature Map
Output
Stack 2_1Conv 2_1_1Conv, BatchNorm, ReLU1281 × 1 × 2562 × 2, [0,0,0,0]28 × 28 × 128
Conv 2_1_2Conv, BatchNorm, ReLU1283 × 3 × 1281 × 1, [1,1,1,1]28 × 28 × 128
Conv 2_1_3Conv, BatchNorm5121 × 1 × 1281 × 1, [0,0,0,0]28 × 28 × 512
Stack 2_1_brConv 2_1_4Conv, BatchNorm5121 × 1 × 2562 × 2, [0,0,0,0]
Stack 2_1_addAdd, ReLU---
Stack 2_2Conv 2_2_1Conv, BatchNorm, ReLU1281 × 1 × 5121 × 1, [0,0,0,0]28 × 28 × 128
Conv 2_2_2Conv, BatchNorm, ReLU1283 × 3 × 1281 × 1, [1,1,1,1]28 × 28 × 128
Conv 2_2_3Conv, BatchNorm5121 × 1 × 1281 × 1, [0,0,0,0]28 × 28 × 512
Stack 2_2_br-----
Stack 2_2_addAdd, ReLU---
Stack 2_3Conv 2_3_1Conv, BatchNorm, ReLU1281 × 1 × 5121 × 1, [0,0,0,0]28 × 28 × 128
Conv 2_3_2Conv, BatchNorm, ReLU1283 × 3 × 1281 × 1, [1,1,1,1]28 × 28 × 128
Conv 2_3_3Conv, BatchNorm5121 × 1 × 1281 × 1, [0,0,0,0]28 × 28 × 512
Stack 2_3_br-----
Stack 2_3_addAdd, ReLU---
Stack 2_4Conv 2_4_1Conv, BatchNorm, ReLU1281 × 1 × 5121 × 1, [0,0,0,0]28 × 28 × 128
Conv 2_4_2Conv, BatchNorm, ReLU1283 × 3 × 1281 × 1, [1,1,1,1]28 × 28 × 128
Conv 2_4_3Conv, BatchNorm5121 × 1 × 1281 × 1, [0,0,0,0]28 × 28 × 512
Stack 2_4_br-----
Stack 2_4_addAdd, ReLU---
Table 3. CNN feedforward calculation in stack 3.
Table 3. CNN feedforward calculation in stack 3.
LayerOperationFilters’ Set NumFilter SizeStride, Zero-Padding
[Top, Bottom, Left, Right]
Feature Map Output
Stack 3_1Conv 3_1_1Conv, BatchNorm, ReLU2561 × 1 × 5122 × 2, [0,0,0,0]14 × 14 × 256
Conv 3_1_2Conv, BatchNorm, ReLU2563 × 3 × 2561 × 1, [1,1,1,1]14 × 14 × 256
Conv 3_1_3Conv, BatchNorm10241 × 1 × 2561 × 1, [0,0,0,0]14 × 14 × 1024
Stack 3_1_brConv 3_1_4Conv, BatchNorm10241 × 1 × 5122 × 2, [0,0,0,0]
Stack 3_1_addAdd, ReLU---
Stack 3_2Conv 3_2_1Conv, BatchNorm, ReLU2561 × 1 × 10241 × 1, [0,0,0,0]14 × 14 × 256
Conv 3_2_2Conv, BatchNorm, ReLU2563 × 3 × 2561 × 1, [1,1,1,1]14 × 14 × 256
Conv 3_2_3Conv, BatchNorm10241 × 1 × 2561 × 1, [0,0,0,0]14 × 14 × 1024
Stack 3_2_br-----
Stack 3_2_addAdd, ReLU---
Stack 3_3Conv 3_3_1Conv, BatchNorm, ReLU2561 × 1 × 10241 × 1, [0,0,0,0]14 × 14 × 256
Conv 3_3_2Conv, BatchNorm, ReLU2563 × 3 × 2561 × 1, [1,1,1,1]14 × 14 × 256
Conv 3_3_3Conv, BatchNorm10241 × 1 × 2561 × 1, [0,0,0,0]14 × 14 × 1024
Stack 3_3_br-----
Stack 3_3_addAdd, ReLU---
Stack 3_4Conv 3_4_1Conv, BatchNorm, ReLU2561 × 1 × 10241 × 1, [0,0,0,0]14 × 14 × 256
Conv 3_4_2Conv, BatchNorm, ReLU2563 × 3 × 2561 × 1, [1,1,1,1]14 × 14 × 256
Conv 3_4_3Conv, BatchNorm10241 × 1 × 2561 × 1, [0,0,0,0]14 × 14 × 1024
Stack 3_4_br-----
Stack 3_4_addAdd, ReLU---
Stack 3_5Conv 3_5_1Conv, BatchNorm, ReLU2561 × 1 × 10241 × 1, [0,0,0,0]14 × 14 × 256
Conv 3_5_2Conv, BatchNorm, ReLU2563 × 3 × 2561 × 1, [1,1,1,1]14 × 14 × 256
Conv 3_5_3Conv, BatchNorm10241 × 1 × 2561 × 1, [0,0,0,0]14 × 14 × 1024
Stack 3_5_br-----
Stack 3_5_addAdd, ReLU---
Stack 3_6Conv 3_6_1Conv, BatchNorm, ReLU2561 × 1 × 10241 × 1, [0,0,0,0]14 × 14 × 256
Conv 3_6_2Conv, BatchNorm, ReLU2563 × 3 × 2561 × 1, [1,1,1,1]14 × 14 × 256
Conv 3_6_3Conv, BatchNorm10241 × 1 × 2561 × 1, [0,0,0,0]14 × 14 × 1024
Stack 3_6_br-----
Stack 3_6_addAdd, ReLU---
Table 4. CNN feedforward calculation from stack 4 to output.
Table 4. CNN feedforward calculation from stack 4 to output.
LayerOperationFilters’ Set NumFilter SizeStride, Zero-Padding
[Top, Bottom, Left, Right]
Feature Map Output
Stack 4_1Conv 4_1_1Conv, BatchNorm, ReLU5121 × 1 × 10242 × 2, [0,0,0,0]7 × 7 × 512
Conv 4_1_2Conv, BatchNorm, ReLU5123 × 3 × 5121 × 1, [1,1,1,1]7 × 7 × 512
Conv 4_1_3Conv, BatchNorm20481 × 1 × 5121 × 1, [0,0,0,0]7 × 7 × 2048
Stack 4_1_brConv 4_1_4Conv, BatchNorm20481 × 1 × 10242 × 2, [0,0,0,0]
Stack 4_1_addAdd, ReLU---
Stack 4_2Conv 4_2_1Conv, BatchNorm, ReLU5121 × 1 × 20481 × 1, [0,0,0,0]7 × 7 × 512
Conv 4_2_2Conv, BatchNorm, ReLU5123 × 3 × 5121 × 1, [1,1,1,1]7 × 7 × 512
Conv 4_2_3Conv, BatchNorm20481 × 1 × 5121 × 1, [0,0,0,0]7 × 7 × 2048
Stack 4_2_br-----
Stack 4_2_addAdd, ReLU---
Stack 4_3Conv 4_3_1Conv, BatchNorm, ReLU5121 × 1 × 20481 × 1, [0,0,0,0]7 × 7 × 512
Conv 4_3_2Conv, BatchNorm, ReLU5123 × 3 × 5121 × 1, [1,1,1,1]7 × 7 × 512
Conv 4_3_3Conv, BatchNorm20481 × 1 × 5121 × 1, [0,0,0,0]7 × 7 × 2048
Stack 4_3_br-----
Stack 4_3_addAdd, ReLU---
Global average PoolGlobal average pooling,
Affine
-7 × 7-2048
Classification outputAffine, Soft-Max---3
Table 5. CNN training conditions.
Table 5. CNN training conditions.
First HalfLast Half
SolverSGDM (Stochastic Gradient Descent with Momentum)
Learning Rate 10 3
Total Epochs/Iterations20030
Mini batch Size256128
AugmentationRandom Left–Right Reflection (50%), Random Top–Down Reflection (50%)
Random rotation ranged in [0,360] degreeNo rotation
CPUIntel core i9 12900K
Main Memory128 GB
OSWindows 11 Pro 64bit
Development LanguageMathWorks, MATLAB (R2022a)
GPUNvidia RTX A6000 (VRAM 48 GB, 10752 CUDA cores)
Table 6. Test results of CNN.
Table 6. Test results of CNN.
TrialA (Good) IDs for TestB (Neutral) IDs for TestC (Bad) IDs for TestAccuracy
13101611315711211.0000
25810818191416200.8889
3561171718218210.8889
42585614316180.8889
51161718192015100.8889
635192818712191.0000
79141737111112180.6667
851014121118211.0000
92510181920710220.7778
1058112614713211.0000
1110161991214213221.0000
12312151217191116220.7778
1379181676780.7778
14192021117913150.7778
1516143161712240.5556
1629132171936150.8889
17481848101223240.8889
1851518315201319210.6667
19131417158115211.0000
207101941315415221.0000
Average: 0.8667
Table 7. Misclassified image IDs, estimated classes, and probabilities of softmax layer.
Table 7. Misclassified image IDs, estimated classes, and probabilities of softmax layer.
Probability
Image IDTrialMisjudged ClassABC
A00114B0.4670.5320.001
A00115B0.2110.7870.002
A01813B0.0170.9800.003
A01817B0.0530.9420.004
A01818B0.2050.7930.002
B0037A0.9110.0890.000
B00315A0.8990.1010.000
B00318A0.8160.1840.000
B01114A0.5890.4110.001
B01615C0.0000.0560.944
B01712C0.0000.4650.535
B01715C0.0000.4400.560
B0192C0.0000.0760.924
B0195C0.0000.2960.704
B0199C0.0000.0700.930
B01912C0.0000.2460.754
B01916C0.0000.2330.767
B0209C0.0000.4780.522
C00813B0.0000.5120.488
C0127B0.0000.5590.441
C0183B0.0020.8880.110
C0184B0.0090.9680.023
C0187B0.0010.9730.026
C01918B0.0000.5080.492
Table 8. Results of Recall, Precision, F-measure.
Table 8. Results of Recall, Precision, F-measure.
ClassRecallPrecisionF-Measure
A (Good) ( 55 55 + 5 ) = 0.917 ( 55 55 + 4 ) = 0.932 0.924
B (Neutral) ( 47 4 + 47 + 9 ) = 0.783 ( 47 5 + 47 + 6 ) = 0.810 0.797
C (Bad) ( 54 6 + 54 ) = 0.900 ( 54 9 + 54 ) = 0.857 0.878
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kato, S.; Wada, N.; Shiogai, K.; Tamaki, T.; Kagawa, T.; Toyosaki, R.; Nobuhara, H. Crack Severity Classification from Timber Cross-Sectional Images Using Convolutional Neural Network. Appl. Sci. 2023, 13, 1280. https://doi.org/10.3390/app13031280

AMA Style

Kato S, Wada N, Shiogai K, Tamaki T, Kagawa T, Toyosaki R, Nobuhara H. Crack Severity Classification from Timber Cross-Sectional Images Using Convolutional Neural Network. Applied Sciences. 2023; 13(3):1280. https://doi.org/10.3390/app13031280

Chicago/Turabian Style

Kato, Shigeru, Naoki Wada, Kazuki Shiogai, Takashi Tamaki, Tomomichi Kagawa, Renon Toyosaki, and Hajime Nobuhara. 2023. "Crack Severity Classification from Timber Cross-Sectional Images Using Convolutional Neural Network" Applied Sciences 13, no. 3: 1280. https://doi.org/10.3390/app13031280

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop