Volcanic stratigraphy reconstruction is traditionally based on qualitative facies analysis complemented by geochemical analyses. Here we present a novel technique based on machine learning identification of crystal size distribution to quantitatively fingerprint lavas, shallow intrusions and coarse lava breccias. This technique, based on a simple photograph of a rock (or core) sample, is complementary to existing methods and allows another strategy to identify and compare volcanic rocks for stratigraphic correlation. Phenocryst size distributions display overall homogeneity within one volcanic body but may vary considerably between igneous bodies. Restricted to shallow intrusions and volcanic lavas, this concept allows for stratigraphic fingerprinting of volcanic rocks in poorly exposed, up to moderately altered, and/or complexly tectonized formations. We built an automated image analysis workflow using machine-learning for crystal segmentation, followed by statistical analysis of physical descriptors to compare and match the size distribution of feldspar phenocrysts. The workflow comprises three instance segmentation models for pre-processing the images, automated scale measurement and grain segmentation using Mask R-CNN. This avoids the laborious and time-consuming task of manual picking by image analysis, and allows for a rapid, unbiased and quantitative approach to determine crystal size distribution (CSD). Our volcanic architecture reconstruction of multiple dacite bodies in the mineralized Cambrian Mt Read Volcanics in Tasmania, Australia, is independently validated by bulk-rock chemical analyses of key samples. This volcanic stratigraphy method can be applied to a large variety of igneous rocks and is complementary to geochemical analyses and qualitative crystal content assessment.