Data and Software for Automated Mineral Identification and Rock-Type Classification of Lunar Mare Basalts using SEM Images
收藏资源简介:
This repository contains code for semantic segmentation of minerals in SEM images and subsequent rock-type classification for lunar mare basalt samples collected during Apollo missions. Overview This project implements a two-stage pipeline: 1. Semantic Segmentation: U-Net based models to segment minerals from SEM Back Scattering Electron (BSE) images 2. Rock Classification: Multiple machine learning classifiers to classify rock types based on modal mineral abundances Key Features - Three U-Net variants that handle pixel scale variability: - UNet_1: Baseline model without scale conditioning - UNet_2: Dual UNet with routing based on pixel scale threshold (1.8 μm) - UNet_3: Continuous scale conditioning at bottleneck layer - Multiple classification approaches: - Rule-based baseline classifier - Gaussian Naive Bayes - Support Vector Machine (RBF) - Logistic Regression - Random Forest - Multilayer Perceptron - XGBoost Dataset The project uses two main datasets: 1. Segmentation Dataset (`data-sem-label.zip`) Contains SEM images and segmentation masks: - Input images: 256×256 grayscale SEM images - Output masks: 256×256 segmentation masks with 10 mineral classes - Pixel scale files: Text files containing pixel size information (0.02-20 μm) - Structure: Organized in folders with `input-images/`, `output-images/`, and `input-features/` subdirectories - Mineral classes: - `c₀`: Void - `c₁`: Metallic Fe (Kamacite, Martensite) - `c₂`: FeS (Troilite) - `c₃`: Metal oxides (Ilmenite, Ulvospinel, Chromite) - `c₄`: Pyroxene group - `c₅`: Plagioclase - `c₆`: Silicate minerals (Quartz, Cristobalite, Glass) - `c₇`: Olivine - `c₈`: Late-stage melt compositions (Mesostasis, Groundmass) - `c₉`: Other (Phosphate, Zircon, etc.) 2. Classification Dataset (`data-lsc-modal.xlsx`) Excel file containing modal mineral abundance data for rock classification: Mineral abundance columns: - `Ol`: Olivine abundance - `Py`: Pyroxene abundance - `Pl`: Plagioclase abundance - `Ms`: Mesostasis abundance - `Si`: Silica minerals abundance - `Op`: Opaque minerals abundance (Fe-Ni, FeS, metal oxides) Rock type labels: - Ilmenite basalt (class 0) - Olivine basalt (class 1) - Pigeonite basalt (class 2) - Used for training and evaluating rock classification models based on modal mineral abundances extracted from segmentation results Training Details Segmentation Models - U-Net with encoder-decoder structure and skip connections - Input: 256×256 grayscale images + pixel scale (scalar) - Output: 256×256 segmentation masks (10 classes) - Loss: Cross-entropy loss - Metric: Pixel accuracy, intersection over union - Data augmentation: 90-degree rotations, brightness adjustment Classification Models - Features: Modal mineral abundances extracted from segmentation masks: - `Ol`: Olivine abundance - `Py`: Pyroxene abundance - `Pl`: Plagioclase abundance - `Ms`: Mesostasis abundance - `Si`: Silicate minerals abundance - `Op`: Opaque minerals abundance (Fe-Ni, FeS, metal oxides) - Classes: 3 rock types (Ilmenite basalt, Olivine basalt, Pigeonite basalt) - Workflow: 1. Segmentation model extracts mineral pixel counts from SEM images 2. Pixel counts are converted to modal abundances (percentages) 3. Classification models predict rock type from modal abundances
本仓库包含针对阿波罗(Apollo)任务采集的月海玄武岩样品的扫描电子显微镜(Scanning Electron Microscope, SEM)图像中的矿物语义分割代码,以及后续的岩石类型分类代码。 ## 项目概述 本项目实现了两阶段处理流程: 1. 语义分割:基于U-Net的模型,从扫描电子显微镜背散射电子(Back Scattering Electron, BSE)图像中分割矿物相 2. 岩石分类:基于模态矿物丰度的多款机器学习分类器,用于岩石类型分类 ## 核心特性 - 三种适配像素尺度变异的U-Net变体: - UNet_1:无尺度调节的基线模型 - UNet_2:基于像素尺度阈值(1.8 μm)的双路U-Net - UNet_3:瓶颈层引入连续尺度调节的模型 - 多种分类方法: - 基于规则的基线分类器 - 高斯朴素贝叶斯(Gaussian Naive Bayes) - 径向基核支持向量机(Support Vector Machine, RBF) - 逻辑回归(Logistic Regression) - 随机森林(Random Forest) - 多层感知机(Multilayer Perceptron) - 极限梯度提升树(XGBoost) ## 数据集 本项目使用两个主要数据集: 1. 分割数据集(`data-sem-label.zip`) 包含SEM图像与分割掩码: - 输入图像:256×256灰度SEM图像 - 输出掩码:256×256的10类矿物分割掩码 - 像素尺度文件:包含像素尺寸信息(0.02~20 μm)的文本文件 - 目录结构:按`input-images/`、`output-images/`与`input-features/`子目录组织 - 矿物类别: - `c₀`:孔隙(Void) - `c₁`:金属铁(铁纹石(Kamacite)、马氏体(Martensite)) - `c₂`:陨硫铁(Troilite,化学成分为FeS) - `c₃`:金属氧化物(钛铁矿(Ilmenite)、钛铁尖晶石(Ulvospinel)、铬铁矿(Chromite)) - `c₄`:辉石族矿物 - `c₅`:斜长石 - `c₆`:硅酸盐矿物(石英(Quartz)、方英石(Cristobalite)、玻璃质(Glass)) - `c₇`:橄榄石 - `c₈`:晚期熔融相(充填物(Mesostasis)、基质(Groundmass)) - `c₉`:其他矿物(磷酸盐矿物(Phosphate)、锆石(Zircon)等) 2. 分类数据集(`data-lsc-modal.xlsx`) 用于岩石分类的模态矿物丰度数据Excel文件: 矿物丰度列: - `Ol`:橄榄石丰度 - `Py`:辉石丰度 - `Pl`:斜长石丰度 - `Ms`:充填物丰度 - `Si`:硅酸盐矿物丰度 - `Op`:不透明矿物丰度(Fe-Ni合金、陨硫铁、金属氧化物) 岩石类型标签: - 钛铁玄武岩(类别0) - 橄榄石玄武岩(类别1) - 易变辉石玄武岩(类别2) 该数据集用于基于分割结果提取的模态矿物丰度,训练与评估岩石分类模型。 ## 训练细节 ### 分割模型 - 采用编码器-解码器结构且带有跳跃连接的U-Net - 输入:256×256灰度图像 + 像素尺度标量参数 - 输出:256×256的10类分割掩码 - 损失函数:交叉熵损失 - 评估指标:像素准确率、交并比(Intersection over Union, IoU) - 数据增强方式:90°旋转、亮度调整 ### 分类模型 - 特征:从分割掩码中提取的模态矿物丰度,即`Ol`(橄榄石丰度)、`Py`(辉石丰度)、`Pl`(斜长石丰度)、`Ms`(充填物丰度)、`Si`(硅酸盐矿物丰度)、`Op`(不透明矿物丰度) - 类别:3种岩石类型(钛铁玄武岩、橄榄石玄武岩、易变辉石玄武岩) - 工作流程: 1. 分割模型从SEM图像中提取矿物像素计数 2. 将像素计数转换为模态丰度(百分比形式) 3. 分类模型基于模态丰度预测岩石类型



