USACE SPK
Rock gradation analysis app to assist field engineers in geology-related work.
Core trick
Segments individual grains in rock photos with a grain-detection model to estimate size and shape distributions.
Description
Rock gradation analysis app to assist field engineers in geology-related work. Project incomplete (ran out of time), no need to spend time on it.
README excerpt
# segmenteverygrain <img src="docs/source/_static/images/gravel_example_mask.png" width="600"> [](https://github.com/zsylvester/segmenteverygrain/actions/workflows/ci.yaml) [](https://opensource.org/licenses/Apache-2.0) [](https://doi.org/10.21105/joss.07953) ## Description 'segmenteverygrain' is a Python package that aims to detect grains (or grain-like objects) in images. The goal is to develop an ML model that does a reasonably good job at detecting most of the grains in a photo, so that it will be useful for determining grain size and grain shape, a common task in geomorphology and sedimentary geology. 'segmenteverygrain' relies on the [Segment Anything Model (SAM)](https://github.com/facebookresearch/segment-anything), developed by Meta, for getting high-quality outlines of the grains. However, SAM requires prompts for every object detected and, when used in 'everything' mode, it tends to be slow and results in many overlapping masks and non-grain (background) objects. To deal with these issues, 'segmenteverygrain' relies on a Unet-style, patch-based convolutional neural network to create a first-pass segmentation which is then used to generate prompts for the SAM-based segmentation. Some of the grains will be missed with this approach, but