Evaluating the effect of anomalous images on computer vision-based wood identification models

Ruben De Blaere, Kévin Lievens, Victor Deklerck, Tom De Mil, Wannes Hubau, Hans Beeckman, Jan Verwaeren and Jan Van den Bulcke

Wood Science and Technology - 2025

Abstract

Automating wood identification through computer vision offers improved objectivity, time-efficiency, and accuracy over traditional methods. Conventional wood anatomical assessments rely on intact mature tissue, avoiding damage (cracks, fungi deterioration, insect damage) and other anomalies (pith, bark, traumatic canals). The impact of using images from anomalous surfaces on automated identification remains underexplored in current research. This study evaluates the performance of convolutional neural networks (CNNs) for classifying the presence of anomalies on images, and studies the impact of anomalies on genus identification by in- or excluding images of anomalous surfaces in the training data and assessing recall on the test data. The Xception network architecture was used to train the two types of classification models, on macroscopic cross-sectional images of 26 Congolese wood genera. The first model was trained for binary classification on the presence or absence of anomalies on > 250.000 images of similar to 1000 Congolese tree species, demonstrating accuracy, precision, recall and f1-score of similar to 93% on 25.000 test images. This shows that CNNs can learn patterns to detect the presence of anomalies. The second model was trained and evaluated on a subset of those Congolese tree species, consisting of 26 timber genera with abundant different types of anomalies (cracks, fungi deterioration, insect damage, pith, bark, traumatic canals). Three different wood identification models were trained and evaluated on the images featuring a model trained only on all images (regardless of anomalies), a second model trained only on perfect (anomaly-free) images, and a third model trained only on images with anomalies. The three models were evaluated on different specimens and demonstrated macro-averaged recall scores of 88.4, 90.5%, and 79.1% for the respective models, showing that a model trained on images from intact end-grain wood/anomaly-free images performed best. Class (genus) specific recall scores demonstrated for the three models that model performance varies between genera. The class (genus) specific recall scores of Millettia, Tessmannia, Celtis, Afzelia, Beilschmiedia, and Vitex are highest for the model trained on all images (with and without anomalies). Conversely, the recall scores of Cynometra and Microcos were lower for this model. GradCAM analysis was performed to visualize which regions on images were more activated for classification (wood identification), and revealed that the model focuses more on anomaly-free regions for wood identification, underscoring the importance of clear wood anatomy in training CNNs for wood identification.