Based on khanhha/crack_segmentation
Updated to fit newer version of python and cuda
Remove and replace the deprecated code
Some improvements on usabilities
Ubuntu (Recommand 22.04 LTS)
Cuda (Recommand 11.6)
Anaconda
conda create --name crack python=3.10
conda activate crack
conda install matplotlib scipy numpy tqdm pillow
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
conda install -c conda-forge opencv
Use the pre-trained model in order to run the crack detection algorithm without training
Download model_unet_vgg_16_best.pt and put it in ./Models
conda activate crack
python run.py
Default input and output directories:
./Data/Inputs ./Data/Outputs
To modify input and output directories, add arguments:
python run.py input_dir output_dir
Default model directory and type:
./Models/model_unet_vgg_16_best.pt
vgg16
To modify model path and model type:
python run.py input_dir output_dir model_dir model_type