Аннотация:In this paper, we present a comprehensive open source pipeline for the analysis of mineral compositions in microscopic images of polished sections. Our contributions span from data acquisition to final statistical interpretation. First, we introduce LumenStone S1 and S2, two pixel-level annotated datasets for mineral segmentation into 10 classes, and LumenStone P1, a dataset of overlapping microscopic images intended to construct high-resolution panoramas. We developed a novel panorama stitching method specifically tailored to microscopic images of polished sections, which outperforms conventional stitching software in terms of alignment accuracy and color retention. We evaluate three semantic segmentation architectures (custom ResUNet, PSPNet, HRNet+OCR) with class-balanced sampling, where HRNet+OCR achieves 97.8% pixel accuracy and 92.8% mean IoU on 10-class mineral segmentation. The pipeline enables large-scale automated analysis by training on patch-level annotations and applying inference to high-resolution panoramas without requiring panorama-level manual annotation. The entire pipeline is available through the open source Python package petroscope, providing standardized tools for reproducible mineralogical analysis.