Accurate grain size and roundness analysis is crucial for geological applications such as paleoenvironmental reconstructions or reservoir characterization, but traditional manual methods are time-consuming and prone to error. In this study, we introduce the CAGEY (CArbonate Grain Estimation with YOLO) framework to automate carbonate grain size and shape (roundness) estimates from core images with YOLOv5s. In addition, CAGEY integrates the value of the predicted grain size and shape distributions in downstream classification of Dunham textures using Random Forest. We built a dataset of 114 high-resolution carbonate core images, yielding 46,974 labelled grains split into 82 training images (37,367 bounding box labels for grains), 8 validation images (2,164 bounding box labels for grains), and 24 test images (7,443 bounding box labels for grains). Our trained YOLOv5s model demonstrated strong performance in predicting grain sizes across various Dunham textures in our test set, yielding an R 2 of 0.95 on grain area ratios predictions with successful approximated grain size distributions. Performance was lower for finer-grained rocks, showing higher Wasserstein distances and mean squared errors. The grain roundness estimates derived from the prediction boxes also closely follow the labelled distribution. On lithology classification with Random Forest, CAGEY achieves an overall accuracy of 76% with an expected cost lower (better) than humans on the same task. Future improvements to the CAGEY framework could including the use of segmentation masks for better grain morphological accuracy, and improved annotation consistency to reduce training bias. But our research demonstrate that useable, low-cost grain-level characterization has strong potential for downstream carbonate lithology characterization and classification, offering an alternative to direct lithologic classification on images with deep learning.
Liu et al. (Sun,) studied this question.