Deep-Learning-Based Automatic Mineral Grain Segmentation and Recognition