This is a set of programs to find a cracks in surfaces using OpenCV. It also provides tools to prepare a dataset for further processing using deep learning techniques.
This is the breakdown of a project.
crack-detection-opencv
│ README.md
│ .gitignore
│ requirements.txt
│ utils.py
│ split_images.py
│ resize_images.py
│ crack_detection.py
│
└───input
│ │ ...
│ │
└───output
│ │ ...
│ │
└───line_segmentation_examples
│ ...
Lets walk through setting up your development environment and deploying this application on your local machine
- Install Python, pip, and virtualenv
sudo apt-get install python3
sudo apt install python3-pip
sudo apt install python3-virtualenv
- Clone this repo and CD into the projects directory
git clone https://github.com/hpcbg/crack-detection-opencv.git
cd crack-detection-opencv
- Create and activate a virtualenv
virtualenv venv
source venv/bin/activate
- Install packages
pip install -r requirements.txt
- Run it
python3 resize_images.py -s 50 -i /input_folder -o /output_folder
python3 split_images.py -s 100 -i /input_folder -o /output_folder
python3 crack_detection.py