DOI QR코드

DOI QR Code

Visual Classification of Wood Knots Using k-Nearest Neighbor and Convolutional Neural Network

k-Nearest Neighbor와 Convolutional Neural Network에 의한 제재목 표면 옹이 종류의 화상 분류

  • Kim, Hyunbin (Department of Forest Sciences, Seoul National University) ;
  • Kim, Mingyu (Department of Forest Sciences, Seoul National University) ;
  • Park, Yonggun (Department of Forest Sciences, Seoul National University) ;
  • Yang, Sang-Yun (Department of Forest Sciences, Seoul National University) ;
  • Chung, Hyunwoo (Department of Forest Sciences, Seoul National University) ;
  • Kwon, Ohkyung (National Instrumentation Center for Environmental Management, Seoul National University) ;
  • Yeo, Hwanmyeong (Department of Forest Sciences, Seoul National University)
  • Received : 2019.01.08
  • Accepted : 2019.03.07
  • Published : 2019.03.25

Abstract

Various wood defects occur during tree growing or wood processing. Thus, to use wood practically, it is necessary to objectively assess their quality based on the usage requirement by accurately classifying their defects. However, manual visual grading and species classification may result in differences due to subjective decisions; therefore, computer-vision-based image analysis is required for the objective evaluation of wood quality and the speeding up of wood production. In this study, the SIFT+k-NN and CNN models were used to implement a model that automatically classifies knots and analyze its accuracy. Toward this end, a total of 1,172 knot images in various shapes from five domestic conifers were used for learning and validation. For the SIFT+k-NN model, SIFT technology was used to extract properties from the knot images and k-NN was used for the classification, resulting in the classification with an accuracy of up to 60.53% when k-index was 17. The CNN model comprised 8 convolution layers and 3 hidden layers, and its maximum accuracy was 88.09% after 1205 epoch, which was higher than that of the SIFT+k-NN model. Moreover, if there is a large difference in the number of images by knot types, the SIFT+k-NN tended to show a learning biased toward the knot type with a higher number of images, whereas the CNN model did not show a drastic bias regardless of the difference in the number of images. Therefore, the CNN model showed better performance in knot classification. It is determined that the wood knot classification by the CNN model will show a sufficient accuracy in its practical applicability.

목재의 결점은 생장과정에서 또는 가공 중에 다양한 형태로 발생한다. 따라서 목재를 이용하기 위해서는 목재의 결점을 정확하게 분류하여 용도에 맞는 목재 품질을 객관적으로 평가할 필요가 있다. 하지만 사람에 의한 등급구분과 수종구분은 주관적 판단에 의해 차이가 발생할 수 있기 때문에 목재 품질의 객관적 평가 및 목재 생산의 고속화를 위해서는 컴퓨터 비전을 활용한 화상분석 자동화가 필요하다. 본 연구에서는 SIFT+k-NN 모델과 CNN 모델을 통해 옹이의 종류를 자동으로 구분하는 모델을 구현하고 그 정확성을 분석해보고자 하였다. 이를 위하여 다섯 가지 국산 침엽수종으로부터 다양한 형태의 옹이 이미지 1,172개를 획득하여 학습 및 검증에 사용하였다. SIFT+k-NN 모델의 경우, SIFT 기술을 이용하여 옹이 이미지에서 특성을 추출한 뒤, k-NN을 이용하여 분류를 진행하였으며, 최대 60.53%의 정확도로 분류가 가능하였다. 이 때 k-index는 17이었다. CNN 모델의 경우, 8층의 convolution layer와 3층의 hidden layer로 구성되어있는 모델을 사용하였으며, 정확도의 최대값은 1205 epoch에서 88.09%로 나타나 SIFT+k-NN 모델보다 높은 결과를 보였다. 또한 옹이의 종류별 이미지 개수 차이가 큰 경우, SIFT+k-NN 모델은 비율이 높은 옹이 종류로 편향되어 학습되는 결과를 보였지만, CNN 모델은 이미지 개수의 차이에도 편향이 심하지 않아 옹이 분류에 있어 더 좋은 성능을 보였다. 본 연구 결과를 통해 CNN 모델을 이용한 목재 옹이의 분류는 실용가능성에 있어 충분한 정확도를 보이는 것으로 판단된다.

Keywords

HMJGBP_2019_v47n2_229_f0001.png 이미지

Fig. 1. Structure of SIFT+k-NN model. The image extracted by SIFT(a), Summed descriptors(b) and k-NN(c).

HMJGBP_2019_v47n2_229_f0002.png 이미지

Fig. 2. Structure of CNN model (*: (No. of pixels, No. of pixels, RGB value), **: (No. of pixels, No. of pixels, No. of dimension), ***: (No. of nodes)).

HMJGBP_2019_v47n2_229_f0003.png 이미지

Fig. 3. Accuracy of SIFT+k-NN according to k index.

HMJGBP_2019_v47n2_229_f0004.png 이미지

Fig. 4. Predicted descriptors clusters per class (a) and distribution of feature points classified as cluster 5 (b).

HMJGBP_2019_v47n2_229_f0005.png 이미지

Fig. 5. Loss and Accuracy of CNN model according to Epoch.

HMJGBP_2019_v47n2_229_f0006.png 이미지

Fig. 6. Knot image failed to classify.

Table 1. Confusion matrix of SIFT+k-NN model at k index = 17.

HMJGBP_2019_v47n2_229_t0001.png 이미지

Table 2. Confusion matrix of CNN model after 1205 epochs

HMJGBP_2019_v47n2_229_t0002.png 이미지

References

  1. Eom, Y., Park, B. 2018. Wood Species Identification of Documentary Woodblocks of Songok Clan of the Milseong Park, Gyeongju, Korea. Journal of the Korean Wood Science and Technology 46(3): 270-277. https://doi.org/10.5658/WOOD.2018.46.3.270
  2. Hu, S., Li, K., Bao, X. 2015. Wood species recognition based on SIFT keypoint histogram, Image and Signal Processing (CISP), 2015 8th International Congress on IEEE, pp. 702-706.
  3. Kim, S.C., Choi, J. 2016. Study on Wood Species Identification for Daeungjeon Hall of Jeonghyesa Temple, Suncheon. Journal of the Korean Wood Science and Technology 44(6): 897-902. https://doi.org/10.5658/WOOD.2016.44.6.897
  4. Kwon, O., Lee, H.G., Lee, M.R., Jang, S., Yang, S.Y., Park, S.Y., Choi, I., Yeo, H. 2017. Automatic Wood Species Identification of Korean Softwood Based on Convolutional Neural Networks. Journal of the Korean Wood Science and Technology 45(6): 797-808. https://doi.org/10.5658/WOOD.2017.45.6.797
  5. KS F 2151. 2014, Visual grading for softwood structural lumber. Korean Agency for Technology and Standard.
  6. Lampinen, J., Smolander, S., Korhonen, M. 1998. Wood surface inspection system based on generic visual features. Industrial Applications of Neural Networks, pp. 35-42.
  7. LeCun, Y., Bengio, Y., Hinton, G. 2015. Deep learning. Nature 521, p. 436. https://doi.org/10.1038/nature14539
  8. Lee, K., Seo, J., Han, G. 2018. Dating Wooden Artifacts Excavated at Imdang-dong Site, Gyeongsan, Korea and Interpreting the Paleoenvironment according to the Wood Identification. Journal of the Korean Wood Science and Technology 46(3): 241-252. https://doi.org/10.5658/WOOD.2018.46.3.241
  9. Mohan, S., Venkatachalapathy, K. 2012. Wood knot classification using bagging. International Journal of Computer Applications 51(18).
  10. Norlander, R., Grahn, J., Maki, A. 2015. Wooden knot detection using convnet transfer learning. In Scandinavian Conference on Image Analysis, pp. 263-274.
  11. Park, J.H., Oh, J.E., Hwang, I.S., Jang, H.U., Choi, J.W., Kim, S.C. 2018. Study on Species Identification for Pungnammun Gate (Treasure 308) in Jeonju, Korea. Journal of the Korean Wood Science and Technology 46(3): 278-284. https://doi.org/10.5658/WOOD.2018.46.3.278
  12. Park, S.Y., Kim, J.C., Kim, J.H., Yang, S.Y., Kwon, O., Yeo, H., Cho, K., Choi, I.G. 2017. Possibility of Wood Classification in Korean Softwood Species Using Near-infrared Spectroscopy Based on Their Chemical Compositions. Journal of the Korean Wood Science and Technology 45(2): 202-212. https://doi.org/10.5658/WOOD.2017.45.2.202
  13. Putri, D.I.H., Machbub, C. 2018. Object detection and tracking using SIFT-KNN classifier and Yaw-Pitch servo motor control on humanoid robot. In Signals and Systems (ICSigSys), 2018 International Conference on IEEE, pp. 47-52.
  14. Thomas, E. 2017. An artificial neural network for real-time hardwood lumber grading. Computers and Electronics in Agriculture 132: 71-75. https://doi.org/10.1016/j.compag.2016.11.018
  15. Tong, H.L., Ng, H., Yap, T.V.T., Ahmad, W.S.H.M.W., Fauzi, M.F.A. 2017. Evaluation of feature extraction and selection techniques for the classification of wood defect images. Journal of Engineering and Applied Science 12(3): 602-608.