Next Article in Journal
High Temperature-Induced Spindle Destabilization Results in Aborted Pollen Production in Populus
Previous Article in Journal
Synonymous Codon Usage Bias in the Chloroplast Genomes of 13 Oil-Tea Camellia Samples from South China
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Fast Instance Segmentation Technique for Log End Faces Based on Metric Learning

School of Technology, Beijing Forestry University, Beijing 100083, China
*
Author to whom correspondence should be addressed.
Forests 2023, 14(4), 795; https://doi.org/10.3390/f14040795
Submission received: 8 March 2023 / Revised: 2 April 2023 / Accepted: 11 April 2023 / Published: 13 April 2023
(This article belongs to the Section Wood Science and Forest Products)

Abstract

The diameter of the logs on a vehicle is a critical part of the logistics and transportation of logs. However, the manual size-checking method is inefficient and affects the efficiency of log transportation. The example segmentation methods can generate masks for each log end face, which helps automate the check gauge of logs and improve efficiency. The example segmentation model uses rectangle detection to identify each end face and then traverses the rectangular boxes for mask extraction. The traversal of rectangular boxes increases the time consumption of the model and lacks separate handling of the overlapping areas between rectangular boxes, which causes a decline in mask extraction accuracy. To address the above problems, we propose a fast instance segmentation method for further improving the efficiency and accuracy of log-checking diameter. The method uses a convolutional neural network to extract the mask image, rectangular frame prediction image, and embed the vector image from the input image. The mask image is used to extract the log end face region, and the rectangular frame prediction image generates an enveloping rectangular frame for each log, which in turn divides the log end face region into instances. For the overlapping regions of rectangular boxes, a metric learning paradigm is used to increase the embedding vector distance between pixels located in different logs and decrease the embedding vector distance between pixels of the same log, and finally the mask pixels of the overlapping regions of rectangular boxes are instantiated according to the pixel embedding vectors. This method avoids repeated calls to the contour extraction algorithm for each rectangular box and enables fine delineation of pixels in the overlapping rectangular box region. To verify the efficiency of the proposed algorithm, the log working pile is photographed in different scenes using a smartphone to obtain the end face recognition database and divide the training set, validation set, and test set according to 8:1:1. Secondly, the proposed model is used to obtain log end face masks, and the log end face ruler diameter is determined by an edge-fitting algorithm combined with a ruler. Finally, the practicality of the algorithm is evaluated by calculating the check-rule diameter error, running speed, and the error of wood volume calculation under different national standards. The proposed method has 91.2% and 50.2 FPS of mask extraction accuracy and running speed, respectively, which are faster and more accurate than the mainstream instance segmentation model. The relative error of the proposed method is −4.62% for the check-rule diameter and −4.25%, −5.02%, −6.32%, and −5.73% for the wood volume measurement under the Chinese, Russian, American, and Japanese raw wood volume calculation standards, respectively. Among them, the error of the calculated timber volume according to our standard is the smallest, which indicates that the model in this paper is more suitable for application in domestic log production operations.
Keywords: log ruler; monocular vision; instance segmentation; metric learning log ruler; monocular vision; instance segmentation; metric learning

Share and Cite

MDPI and ACS Style

Li, H.; Liu, J.; Wang, D. A Fast Instance Segmentation Technique for Log End Faces Based on Metric Learning. Forests 2023, 14, 795. https://doi.org/10.3390/f14040795

AMA Style

Li H, Liu J, Wang D. A Fast Instance Segmentation Technique for Log End Faces Based on Metric Learning. Forests. 2023; 14(4):795. https://doi.org/10.3390/f14040795

Chicago/Turabian Style

Li, Hui, Jinhao Liu, and Dian Wang. 2023. "A Fast Instance Segmentation Technique for Log End Faces Based on Metric Learning" Forests 14, no. 4: 795. https://doi.org/10.3390/f14040795

APA Style

Li, H., Liu, J., & Wang, D. (2023). A Fast Instance Segmentation Technique for Log End Faces Based on Metric Learning. Forests, 14(4), 795. https://doi.org/10.3390/f14040795

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