A Brief Analysis of the Iterative Next Boundary Detection Network for Tree Rings Delineation in images of Pinus Taeda
The INBD model proposed in the paper "Iterative Next Boundary Detection for Instance Segmentation of Tree Rings in Microscopy Images of Shrub Cross Sections" was trained on the Pinus taeda species. The model was trained using the UruDendro dataset, which contains annotations in the UruDendro format. The INBD model was evaluated using the UruDendro metric.
Demo for the model is available at Demo. A brief article describing the model is available at MLBrief.
![]() |
![]() |
|---|---|
![]() |
![]() |
Go to ./INBD
Go to ./urudendro
- Download the dataset from the following link:
python uruDendro/dataset.py --download --dataset_path DATASET_DIRWhere:
DATASET_DIRis the path where the dataset will be downloaded.DATASET_DIRmust be an absolute path.
- Transform the UruDendro annotations to the INBD format:
python uruDendro/src/dataset_urudendro.py --dataset_dir DATASET_DIR --output_folder DATASET_SIZE_DIR --size SIZEWhere:
DATASET_DIRis the path to the dataset folder.DATASET_SIZE_DIRis the path to the output folder.SIZEis the size of the images in pixels
It is possible to resize the INBD dataset using the following command:
python uruDendro/src/dataset_inbd.py --resize --dataset_dir DATASET_DIR --output_folder DATASET_SIZE_DIR --size SIZEWhere:
DATASET_DIRis the path to the dataset folder.DATASET_SIZE_DIRis the path to the output folder.SIZEis the size of the images in pixels
- Train the model using the following command (INBD Readme):
python INBD/main.py train segmentation DATASET_SIZE_DIR/train_inputimages.txt DATASET_SIZE_DIR/train_annotations.txtpython INBD/main.py train INBD DATASET_SIZE_DIR/train_inputimages.txt DATASET_SIZE_DIR/train_annotations.txt --segmentationmodel=checkpoints/segmentationmodel/model.pt.zip- Inference using the following command (test annotations are used to get the pith center boundary):
python src/inbd_inference_with_center_boundary.py --input_images_path
DATASET_SIZE_DIR/test_images.txt
--input_annotations_path
DATASET_SIZE_DIR/test_annotations.txt
--root_dataset
DATASET_SIZE_DIR
--output_dir
INBD_RESULTS
--inbd_model_path
INBD_MODEL_PATHWhere:
- DATASET_SIZE_DIR is the path to the dataset folder.
- INBD_RESULTS is the path to the output folder.
- INBD_MODEL_PATH is the path to the INBD model.
- Evaluate the model using the following command (INBD metric):
python INBD/main.py evaluate INBD_RESULTS DATASET_SIZE_DIR/test_annotations.txtWhere:
INBD_RESULTSis the path to the INBD results folder.DATASET_SIZE_DIRis the path to the dataset folder.
- Evaluate the model using the following command (UruDendro metric). First INBD results are transformed to UruDendro format:
python src/from_inbd_to_urudendro.py --root_dataset DATASET_SIZE_DIR
--root_inbd_results
/data/maestria/resultados/mlbrief_PinusTaedaV1_1500/inference/inbd_results/inbd_
--output_dir
/data/maestria/resultados/mlbrief_PinusTaedaV1_1500/inference/inbd_results/inbd_Then, the UruDendro metric is computed:
python src/compute_urudendro_metric.py ----annotations_file_path ANNOTATIONS_FILE_PATH --root_original_dataset DATASET_DIR
--output_dir OUTPUT_DIR --inbd_inference_results_dir INBD_RESULTS --inbd_center_mask_dir INBD_RESULTS/centerWhere:
ANNOTATIONS_FILE_PATHis the path to the UruDendro annotations file.DATASET_DIRis the path to the original dataset folder.INBD_RESULTSis the path to the INBD results folder. INBD_RESULTS/center is where the center mask images are located using during the inference.



