Skip to content

keitaroyamada/BoulderCalculator

Repository files navigation

0. About this repository

This repository provides Python code for training and inference of AI models for the detection of coastal boulders, as well as MATLAB code for compiling and processing the detection results generated by those Python workflows.

1. Code usage

Python code

The deep-learning training and inference code is provided as Jupyter Notebook files. Code specific to Detectron2 is stored in the detectron2 directory.

  1. Open the target notebook file.
  2. Extract and load the model weight file.
  3. Load the target images.

Boulder Calculator (Matlab)

This MATLAB app provides the position, size, and volume of boulders based on contours detected by Detectron2.

  1. Detect boulder contours using Detectron2 and save the results as a JSON file in COCO format with the accompanying sub-app (Python code).
  2. Load the JSON file, the orthoimage used for detection, and the corresponding DSM.
  3. Calculate the lengths of the a- and b-axes, area, orientation, location, and volume.

A simple usage example is provided in simple_example.m.

2. Reference

The approach used in this code is described and evaluated in the following referenced paper (open access).
https://www.nature.com/articles/s41598-025-29044-9

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published