# split sandstone cross-section **Repository Path**: rainyf/split-sandstone-cross-section ## Basic Information - **Project Name**: split sandstone cross-section - **Description**: 本项目实现了分割砂岩截面 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-15 - **Last Updated**: 2025-12-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Sandstone Segmentation ## 项目概述 本项目利用像素级特征工程与随机森林分类器,对砂岩截面图进行语义分割。训练阶段使用 `Sandstone_imgs/Sandstone_1.tif` 与其对应分区 `Sandstone_imgs/Sandstone_1_segment.tif`;推理阶段使用训练好的模型对 `Sandstone_imgs/Sandstone_2.tif` 进行分割,并与真值分区比较准确率。 ## 运行步骤 1. 安装依赖(建议先创建虚拟环境): ```powershell python -m pip install -r .\requirements.txt ``` 2. 训练模型,生成 `clf.pkl`: ```powershell python .\create_clf.py ``` 3. 使用训练好的模型预测第二张砂岩截面,并将结果保存到 `results/final_segmentation.png`: ```powershell python .\segment.py ``` ## 结果展示 ![final segmentation](results/final_segmentation.png) 图中依次为:原始图像、灰度化的真值分区图、预测的灰度分区图(标题包含准确率)。 ## 个人信息 - 学号:202352320128 - 年级:2023级 - 专业:智能科学与技术 - 班级:一班