This is a simple parser which takes a pdf file as input and outputs a pdf file with the walls drawn on it. It also has an issue right now with searching 'gray filled' walls due to strange behaviour of pdf2svg converter(but I hope to fix it soon).
Prerequisites:
- Docker installed on your machine.
- Python 3.7 or higher.
- Clone the project / repo:
git clone https://github.com/rosklyar/drawer-ai
- cd into the project folder:
cd drawer-ai
- Install the requirements:
pip install -r requirements.txt
- Run the tool:
python draw_walls.py --input A252.pdf
This tool recognizes only horizontal and vertical walls. It does not recognize diagonal walls(solution can be improved). It recognizes walls with configurable width. See config.py for more details.
Should be also considered utilizing of U-Net architecture for the task of wall detection(collect dataset with masks). It requires converting the pdf file to a pixel image and vice versa(is it costly?, can it be done without losing quality?).