Back to projects

tree disk analyzer

Pipeline for analyzing tree disk images

Python
TypeScript
C++
AI
React Native
Docker

Initial Situation

Existing solutions for tree ring analysis often require specialized equipment or are only suitable for professional users. An automated, user-friendly, and hardware-independent method has not yet been available, which this work aims to address.

Motivation and Research Questions

Tree ring analysis is central in fields such as climate research and archaeology. Modern image processing and machine learning offer new possibilities to automate age determination. The study investigates questions regarding a modular pipeline, algorithm suitability, validation, and integration into mobile applications.

Objectives

The goal is to develop a system that segments tree trunk cross-sections, determines the trunk’s center, and analyzes tree rings for age estimation – all within a user-friendly mobile and web application.

Structure of the Work

The work is divided into theoretical fundamentals, system concept, development of AI models, implementation of analysis modules, evaluation, and finally, a conclusion.

Mockup of a potential user interface for tree ring analysis.
Figure 1: Mockup of a potential user interface for tree ring analysis.

The system is based on a modular architecture with separate components for segmentation, center detection, ring analysis, API, and mobile application.

System architecture showing the main components and their interactions.
Figure 2: System architecture showing the main components and their interactions.

A YOLO-v11 is used to segment the tree trunk cross-section from an input image. The training dataset comprises over 1127 images and 25,256 cross-section annotations.

The modules for segmentation, center detection, and ring analysis are developed as standalone Python packages. CI/CD pipelines are also set up for automatic deployment (e.g., to PyPI).

Sequence diagram: from image capture to analysis.
Figure 3: Sequence diagram: from image capture to analysis.

The tree disk analyzer system exposes the following RESTful API endpoints to interact with the application:

Segmentation
POST
/segmentation/image

Segment a tree trunk image

Pith
POST
/pith/detect

Detect the center of a tree trunk

Rings
POST
/rings/detect

Detect tree rings in a segmented image

Additional
GET
/health

Retrieve health status of the system

The frontend of the tree disk analyzer system is developed using Expo.

Database model and structure for tree ring analysis.
Figure 4: Database model and structure for tree ring analysis.

The performance of the models is evaluated using classic regression metrics (MAE, RMSE, MPE) as well as a tolerance-based accuracy measure.

Performance Metrics for Different Smoothing Parameters
Metricσ=1σ=2σ=3σ=4
Exact Match (%)1.5612.514.0626.56
Tolerance ±1 Year (%)9.3823.4453.1345.31
MAE (years)7.023.632.222.73
RMSE (years)8.564.873.654.61
MPE (%)38.2219.4811.7914.07

The results indicate that a moderate smoothing parameter (σ=3) achieves the best prediction accuracy – for example, a MAE of only 2.22 years.

Deployment of the microservices in a containerized environment.
Figure 5: Deployment of the microservices in a containerized environment.

The developed tree ring analysis enables automated age determination with high accuracy. Despite some challenges in edge detection, the system delivers practically relevant results and paves the way for further improvements, such as integrating additional deep-learning approaches.