CrackMap is a deep learning-powered image analysis tool designed for detecting cracks in materials using computer vision. It provides a complete pipeline from image preprocessing (tiling, enhancement, transformation) to crack inference using a pretrained model (e.g., ResNet18). A Streamlit interface is available for an easy-to-use demo.
- ✅ Crack detection using a PyTorch deep learning model (e.g., ResNet18)
- 🧩 Image preprocessing:
- Tiling large images
- CLAHE (adaptive histogram equalization)
- Gaussian Blur
- Skeletonization
- Normalization & tensor transformation
- 📊 Visualization:
- Heatmap overlays
- Cracked region masks
- 🖼️ Streamlit-based web interface for real-time interaction
git clone https://github.com/ihsan31415/crackmap.git
cd crackmapFor Linux/macOS:
python3 -m venv venv
source venv/bin/activateFor Windows:
python -m venv venv
venv\Scripts\activatepip install -r requirements.txtstreamlit run app.pyOptional arguments:
Tile Division Factor (d): Size of each tile (usually 4, ex. = 4x4)Minimum Crack Length (px): minimum lenght of the crack line (too smaal, too sensitive)
Upload an image through the UI, visualize Heatmap.
- Backbone: ResNet18
- Framework: PyTorch
- Input size: 224x224
To train your own model, refer to notebook.ipynb.
crackmap/
├── app.py # streamlit page
├── main.py # main app
├── models/ # Saved PyTorch models
| └── concrete_crack_model_new.pth
└── pages/
| └── About.py
├── requirements.txt
├── assets/
├── notebook.ipynb
└── README.md
.jpg,.jpeg.png
| Input Image | results |
|---|---|
![]() |
![]() |
This project is licensed under the MIT License.
Contributions, issues, and feature requests are welcome! Feel free to fork and submit a pull request.
- ⭐ Star this repo to show your support
- 🐛 Open an issue if you find a bug or have a suggestion
- 📥 Submit a pull request if you've made improvements
- 📣 Share it with others who might find it useful
If you're interested in collaborating or just want to say hi, feel free to connect!
📧 Email: ihsanmuhammadkhoirul@gmail.com
🔗 LinkedIn: khoirul ihsan
Built by ihsan31415, pls contrib if u want <3. Inspired by real-world needs in infrastructure and material health monitoring.


