|
|
--- |
|
|
license: mit |
|
|
pipeline_tag: object-detection |
|
|
tags: |
|
|
- tensorflow |
|
|
- keras |
|
|
- opencv |
|
|
- wall-crack-detection |
|
|
- real-time |
|
|
- mobile |
|
|
datasets: [] |
|
|
--- |
|
|
|
|
|
# Wall Crack Detection Model |
|
|
|
|
|
This project uses a **deep learning model** to detect cracks in walls using **real-time video feed** from a mobile phone camera. |
|
|
It is built with **TensorFlow**, **Keras**, and **OpenCV**. |
|
|
|
|
|
--- |
|
|
|
|
|
## Model Overview |
|
|
|
|
|
- **Model Type:** Object Detection (Binary β Crack / No Crack) |
|
|
- **Framework:** TensorFlow / Keras |
|
|
- **File:** `crack_detector.h5` |
|
|
- **Input:** Image frame (from video feed or camera) |
|
|
- **Output:** Crack detection result (with bounding boxes or classification) |
|
|
|
|
|
--- |
|
|
|
|
|
## Project Structure |
|
|
|
|
|
```bash |
|
|
project/ |
|
|
β-- crack_detector.h5 # Trained model file |
|
|
β-- main.py # Real-time detection script |
|
|
β-- concrete_data/ # Dataset folder (if training from scratch) |
|
|
β βββ train/ |
|
|
β β βββ Positive/ |
|
|
β β βββ Negative/ |
|
|
β βββ val/ |
|
|
β βββ Positive/ |
|
|
β βββ Negative/ |
|
|
β-- detection_log.csv # Optional log for predictions |
|
|
β-- README.md |
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
## Requirements |
|
|
|
|
|
- Python 3.10+ |
|
|
- TensorFlow 2.x |
|
|
- OpenCV |
|
|
- NumPy |
|
|
|
|
|
### Install Dependencies |
|
|
```bash |
|
|
pip install tensorflow opencv-python numpy |
|
|
``` |
|
|
For Best Results, create a virtual Environment: |
|
|
``` |
|
|
Using Conda: |
|
|
conda --version |
|
|
conda create --name wallcrack-env python=3.10 |
|
|
conda activate wallcrack-env |
|
|
pip install tensorflow opencv-python numpy |
|
|
``` |
|
|
|
|
|
|
|
|
### Usage |
|
|
|
|
|
Set up DroidCam IP or any camera stream URL in main.py |
|
|
|
|
|
Run the detection script: |
|
|
``` |
|
|
python main.py |
|
|
``` |
|
|
The model will process live video feed and detect cracks in walls in real time. |
|
|
|
|
|
|
|
|
|
|
|
### Notes |
|
|
|
|
|
If you want to retrain, use images in the concrete_data folder. |
|
|
|
|
|
The detection_log.csv file can store timestamped predictions for later analysis. |
|
|
|
|
|
|