Coal petrography extraction is crucial for the accurate analysis of coal reaction characteristics in coal gasification, coal coking, and metal smelting. Nevertheless, automatic extraction remains a challenging task because of the gray scale overlap between exinite and background regions in coal photomicrographs. Inspired by the excellent performance of neural networks in the image segmentation field, in this study, a reliable coal petrography extraction method, achieving precise segmentation of coal petrography with the background region, was proposed a novel semantic segmentation model based on Unet, referred to as M2AR-Unet. To improve the efficiency of network learning, The proposed M2AR-Unet framework take Unet as the baseline and further optimize the network structure in four aspects, including an improved residual block composed of four units, a mixed attention module containing multiple attention mechanisms, an edge feature enhancement strategy, a multi-scale feature extraction module composed of feature pyramid and aspp module. Compared to the current state-of-the-art segmentation network models, the proposed M2AR-Unet has an advantage in the coal petrography extraction integrity and edge extraction.