mamba-ssm 与 mmcv-full 对 CUDA/PyTorch 版本敏感,需按 README 固定 torch 1.13.1+cu116;推理前需从 Google Drive 手动下载 checkpoint 并放到 ./checkpoints/weights/checkpoint_TUT/;数据集目录结构需与 TUT 仓库保持一致,且需自行修改 main.py 与 test.py 中的路径
SCSegamba
Karl1109Apache-2.0更新放缓轻量级结构感知视觉 Mamba 模型,专门做建筑结构裂缝分割,在保持低计算量的同时提升裂缝边缘和细长结构的识别精度。
[CVPR 2025] SCSegamba: Lightweight Structure-Aware Vision Mamba for Crack Segmentation in Structures
conda create -n SCSegamba python=3.10 -y
conda activate SCSegamba
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 -f https://download.pytorch.org/whl/torch_stable.html
pip install -U openmim
mim install mmcv-full
pip install mamba-ssm==1.2.0
pip install timm lmdb mmengine numpyREADME 未说明显存与 GPU 型号要求;环境按 CUDA 11.6 的 PyTorch 1.13.1 配置,需能编译安装 mamba-ssm,通常需 NVIDIA GPU
轻量级结构感知视觉 Mamba 裂缝分割模型,仅 2.8M 参数即可输出像素级裂缝掩码
轻量级结构感知视觉 Mamba 模型,专门做建筑结构裂缝分割,在保持低计算量的同时提升裂缝边缘和细长结构的识别精度。
核心能力
- 用 SAVSS 模块融合 GBC 与 SASS 建模裂缝形态与纹理
- 以结构感知扫描策略增强裂缝像素间语义连续性
- 仅 2.8M 参数即在裂缝基准上超过 SOTA 方法
- 提供 TUT 数据集预训练权重与推理、评测脚本
- 支持在真实裂缝视频上部署验证分割效果
容易踩的坑
暂无 release 数据(可能没有发版,或尚未同步)。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
📬News
-
2025-03-05: We added a description of the the methodology and visualization of the experimental results in ReadMe💭!
-
2025-03-04: The code for SCSegamba is publicly available in this repository📦!
-
2025-03-04: The preprint of SCSegamba has been posted on 📤️arXiv!
-
2025-03-01: In the next few days, we will make some minor revisions and then publish the preprint on arXiv. The code will also be released shortly after the paper is published! Stay tuned🥰!
-
2025-02-27: 🎉🎉🎉 We are thrilled to announce that our SCSegamba has been accepted to CVPR 2025!
🛠️ Method Overview
Pixel-level segmentation of structural cracks across various scenarios remains a considerable challenge. Current methods encounter challenges in effectively modeling crack morphology and texture, facing challenges in balancing segmentation quality with low computational resource usage. To overcome these limitations, we propose a lightweight Structure-Aware Vision Mamba Network (SCSegamba), capable of generating high-quality pixel-level segmentation maps by leveraging both the morphological information and texture cues of crack pixels with minimal computational cost. Specifically, we developed a Structure-Aware Visual State Space module (SAVSS), which incorporates a lightweight Gated Bottleneck Convolution (GBC) and a Structure-Aware Scanning Strategy (SASS). The key insight of GBC lies in its effectiveness in modeling the morphological information of cracks, while the SASS enhances the perception of crack topology and texture by strengthening the continuity of semantic information between crack pixels. Experiments on crack benchmark datasets demonstrate that our method outperforms other state-of-the-art (SOTA) methods, achieving the highest performance with only 2.8M parameters. On the multi-scenario dataset, our method reached 0.8390 in F1 score and 0.8479 in mIoU.
🕹Getting Started
Environment Setup
You can create your own conda environment for SCSegamba based on the following command⚙️:
conda create -n SCSegamba python=3.10 -y
conda activate SCSegamba
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 -f https://download.pytorch.org/whl/torch_stable.html
pip install -U openmim
mim install mmcv-full
pip install mamba-ssm==1.2.0
pip install timm lmdb mmengine numpy
Run
You can modify the parameters in the main.py file and run it with the following command (The structure of the dataset folder is set to be consistent with the TUT):
python main.py
You can also use checkpoints for inference with the following command:
python test.py
Use the following commands to calculate metrics (You can find the SCSegamba test results on the TUT dataset in the ./results/results_test/TUT_results/ path and calculate the metrics using the following command.):
python eval_compute.py
cd eval
python evaluate.py
You can also follow the steps below to validate the results of our experiments on the TUT dataset.
-
Download Checkpoint: Get the checkpoint_TUT file we pre-trained on the TUT dataset.
-
File Placement: Move the downloaded checkpoint file to the designated path:
./checkpoints/weights/checkpoint_TUT/ -
Run: Change the relevant path in test.py and run this command:
python test.py.
The dataset division, checkpoints and inference results of SCSegamba when processing on Crack500, DeepCrack and CrackMap have been made available on Resources_released.
🔭Visualization
Visual comparison of typical cracks with 9 methods across four datasets. Red boxes highlight critical details, and green boxes mark misidentified regions:
We also deployed SCSegamba checkpoint files trained on four publicly available datasets on real videos, and the visualization video demonstrates that our SCSegamba achieves the best segmentation results on unknown video data:
The real video data of the crack has been made available on Crack_Video_released.
🤝 Citation
Please cite our work if it is useful for your research.
@inproceedings{liu2025scsegamba,
title={SCSegamba: Lightweight Structure-Aware Vision Mamba for Crack Segmentation in Structures},
author={Liu, Hui and Jia, Chen and Shi, Fan and Cheng, Xu and Chen, Shengyong},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2025}
}
🗓️ TODO
- [🟢 Complete] arXiv preprint release
- [🟢 Complete] Open source code at this repository
- [🟢 Complete] Add a description of the method in ReadMe
- [🟢 Complete] Add visualization of experiment results in ReadMe
- [🟢 Complete] Release the real videos used for deployments
🏷️License
This project is released under the Apache 2.0 license.
🫡Acknowledgment
This work stands on the shoulders of the following open-source projects:
📟Contact
If you have any other questions, feel free to contact me at [email protected] or [email protected].