masonry_detection
Masonry detection via neural networks and classic cv algorithms
Installation
To download repo, you should have git-lfs library. Also for containing new libs you can use venv to install libraries.
git clone https://github.com/Ilyabasharov/masonry_detection.git
git lfs fetch && git lfs pull
Install requirements
pip3 install -r requirements.txt
Download a dataset
cd scripts
sh download_data.sh
How to run
Semantic segmentation
To train your model on MasonryWallAnalysis, please use jupyter notebook.
To inference trained model, use script with args:
cd src
python3 segmentation.py \
--input_images_path [video or image folder] \
--path_to_weights [model weights path] \
--annotate [bool tag, true if specified] \
--where_to_save [if annotate, set path to save folder]
Masonry shape evaluation
cd src
python3 masonry.py \
--input_images_path [image folder] \
--input_masks_path [masks folder] \
--annotate [bool tag, true if specified] \
--where_to_save [if annotate, set path to save folder]
Run whole algorithm
cd src
python3 main.py \
--brick_width [Brick width in millimeters] \
--brick_height [Brick height in millimeters] \
--threshold_shape [Threshold masonry shape in millimeters] \
--input_images_path [image folder] \
--annotate [bool tag, true if specified] \
--where_to_save [if annotate, set path to save folder]