2D materials and their heterostructures are prominent for fabricating next-generation optical and photonic devices. The optical, electrical, and mechanical properties of 2D materials largely depend on atomic layer numbers. Although machine learning techniques are implemented to identify large-area thickness distribution using microscopic images, the existing work mainly focuses on rough identification of thicknesses with in-house datasets which limits fair and comprehensive comparisons of new machine learning approaches. Here, first a microscopic dataset is collected and released for three fundamental image processing tasks including multilabel classification, segmentation, and detection. Then three deep-learning architectures DenseNet, U-Net, and Mask-region convolutional neural network (RCNN) are benchmarked on three tasks and their robustness is evaluated on the augmented 2D microscopic images with different optical contrast variations. Deep learning models are trained and evaluated to identify mono-, bi-, tri-, multilayer and bulk flakes using microscopic images of MoS 2 fabricated on the SiO 2 /Si substrate by chemical vapor deposition. The relation between model performances and statistics of datasets is studied based on the international commission on illumination (CIE) 1931 color space and red, green, blue (RGB) histograms of optical contrast differences. Finally, the robust pretrained models are integrated into a graphic user interface for the on-site use of full field-of-view images captured by bright-field microscopes.