https://github.com/ihsan31415/crackmap
Concrete crack detection heatmapping system
https://github.com/ihsan31415/crackmap
clahe cnn cnn-classification cnn-model-tunning heatmap heatmap-visualization python python3 pytorch streamlit
Last synced: 4 months ago
JSON representation
Concrete crack detection heatmapping system
- Host: GitHub
- URL: https://github.com/ihsan31415/crackmap
- Owner: ihsan31415
- License: mit
- Created: 2025-06-09T10:06:38.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-06-12T07:45:30.000Z (4 months ago)
- Last Synced: 2025-06-12T08:39:27.945Z (4 months ago)
- Topics: clahe, cnn, cnn-classification, cnn-model-tunning, heatmap, heatmap-visualization, python, python3, pytorch, streamlit
- Language: Python
- Homepage:
- Size: 38.8 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CrackMap





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.
---
## ๐ง Features
- โ 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---
## ๐ Installation
### 1. Clone the Repository
```bash
git clone https://github.com/ihsan31415/crackmap.git
cd crackmap
````### 2. Create and Activate Virtual Environment
**For Linux/macOS:**
```bash
python3 -m venv venv
source venv/bin/activate
```**For Windows:**
```cmd
python -m venv venv
venv\Scripts\activate
```### 3. Install Dependencies
```bash
pip install -r requirements.txt
```---
## ๐ฅ๏ธ Usage
### Streamlit Web App
```bash
streamlit run app.py
```
Optional 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.

---
## ๐ง Model Details
* Backbone: ResNet18
* Framework: PyTorch
* Input size: 224x224To train your own model, refer to `notebook.ipynb`.
---
## ๐ Folder Structure
```
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```
---
## ๐งช Supported Image Formats
* `.jpg`, `.jpeg`
* `.png`---
## ๐ท Sample Results
| Input Image | results |
|-------------|----------------|
|  |  |---
## ๐ License
This project is licensed under the [MIT License](LICENSE).
---
## ๐ค Contributing
Contributions, issues, and feature requests are welcome!
Feel free to fork and submit a pull request.### ๐ Ways you can contribute:
- โญ 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 usefulIf you're interested in collaborating or just want to say hi, feel free to connect!
๐ง Email: [ihsanmuhammadkhoirul@gmail.com](mailto:ihsanmuhammadkhoirul@gmail.com)
๐ LinkedIn: [khoirul ihsan](https://www.linkedin.com/in/khoirul-ihsan-387115288/)---
## ๐ Credits
Built by [ihsan31415](https://github.com/ihsan31415), pls contrib if u want <3.
Inspired by real-world needs in infrastructure and material health monitoring.