Automatic Pith Detection in Tree Cross-Section Images Using Deep Learning
Tzu-I Liao, Mahmoud Fakhry, Jibin Yesudas Varghese
TL;DR
This work tackles automated pith detection in tree cross-sections using five deep learning models. It conducts a comprehensive evaluation on a 582-image dataset with dynamic augmentation and a post-processing enhancement (NMS) for Mask R-CNN, plus a generalization test on an unseen oak dataset. The Swin Transformer achieves the best localization accuracy and segmentation quality, while YOLOv9 provides fast inference with coarser boundaries; DeepLabV3 and U-Net offer balanced trade-offs, and Mask R-CNN benefits greatly from NMS. The findings guide model selection based on dataset characteristics and deployment constraints, and highlight the importance of post-processing and data diversity for robust forestry applications.
Abstract
Pith detection in tree cross-sections is essential for forestry and wood quality analysis but remains a manual, error-prone task. This study evaluates deep learning models -- YOLOv9, U-Net, Swin Transformer, DeepLabV3, and Mask R-CNN -- to automate the process efficiently. A dataset of 582 labeled images was dynamically augmented to improve generalization. Swin Transformer achieved the highest accuracy (0.94), excelling in fine segmentation. YOLOv9 performed well for bounding box detection but struggled with boundary precision. U-Net was effective for structured patterns, while DeepLabV3 captured multi-scale features with slight boundary imprecision. Mask R-CNN initially underperformed due to overlapping detections, but applying Non-Maximum Suppression (NMS) improved its IoU from 0.45 to 0.80. Generalizability was next tested using an oak dataset of 11 images from Oregon State University's Tree Ring Lab. Additionally, for exploratory analysis purposes, an additional dataset of 64 labeled tree cross-sections was used to train the worst-performing model to see if this would improve its performance generalizing to the unseen oak dataset. Key challenges included tensor mismatches and boundary inconsistencies, addressed through hyperparameter tuning and augmentation. Our results highlight deep learning's potential for tree cross-section pith detection, with model choice depending on dataset characteristics and application needs.
