The information on the past climates or environments is preserved in natural archives, such as, for example, marine sediments covering the sea-floor. The study of sediment composition in coarse fraction (>0.063 mm) is widely used, yet time-consuming technique useful for recognizing ancient environments. The coarse fraction analysis is generally performed visually under binocular microscope and requires the high qualification of the observer. In this study, we propose a method to automate and accelerate this kind of work using a combination of classic computer vision and machine learning algorithms. Using an optical digital microscope with precise automatic positioning system, we photographed sieved and dried sediment samples composed of particles over 0.1 mm in size. We then applied a clustering pipeline including classical and neural machine learning techniques. We demonstrate that the proposed method is capable of dividing visual representations of marine sediment grains into homogeneous groups suitable for further accurate classification by an experienced specialist. Our method may significantly reduce the time costs of an expert conducting a study of marine sediments. This will allow further evaluation of sediment composition, main sediment sources and some important characteristics (proxies/indicators) marking a particular environmental setting in the past. The clustering results obtained using our algorithm may be used to train a more accurate classification algorithm.