File size: 1,856 Bytes
6cabcd0
 
 
 
a19c08c
 
 
 
 
 
6cabcd0
a19c08c
 
 
 
 
 
6cabcd0
 
b787ced
a19c08c
b787ced
a19c08c
 
 
 
 
 
 
b787ced
 
 
a19c08c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b787ced
a19c08c
 
 
 
 
b787ced
a19c08c
b787ced
a19c08c
 
 
 
b787ced
 
 
 
a19c08c
b787ced
a19c08c
b787ced
a19c08c
 
 
 
 
b787ced
 
 
a19c08c
 
 
 
 
b787ced
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
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.