Official Pytorch repository for ECCV 2020 paper Deep Vectorization of Technical Drawings
To make the repository user-friendly, we decided to stick with - module-like structure. The main modules are cleaning, vectorization, refinement, and merging(each module has an according to folder). Each folder has Readme with more details. Here is the brief content of each folder.
Linux system
Python 3
See requirments.txt and additional packages
cairo==1.14.12
pycairo==1.19.1
chamferdist==1.0.0
To compare with us without running code, you can download our results on the full pipeline on the test set for pfp and for abc.
Scripts to download dataset are in folder dataset/.
To show how some of the usability of the functions, there are several notebooks in the notebooks folder. 1) Rendering notebook 2) Dataset loading, model loading, model training, loss function loading 3) Notebook that illustrates how to work with pretrained model and how to do refinement on lines(without merging) 4) Notebook that illustrates how to work with pretrained model and how to do refinement on curves(without merging)
Download pretrained models for curve and for line .
P.s. currently cleaning model not included there.
Build the docker image:
docker build -t Dockerfile owner/name:version .
example:
docker build -t vahe1994/deep_vectorization:latest .
When running container mount folder with reporitory into code/, folder with datasets in data/ folder with logs in logs/
docker run --rm -it --shm-size 128G -p 4045:4045 --mount type=bind,source=/home/code,target=/code --mount type=bind,source=/home/data,target=/data --mount type=bind,source=/home/logs,target=/logs --name=container_name owner/name:version /bin/bash
Anaconda with packages are installed in follder opt/ . Environement with packages that needed are installed in environment vect-env. . To activate it run in container
. /opt/.venv/vect-env/bin/activate/
Look at vectorization /srcipts/train_vectorizatrion
@InProceedings{egiazarian2020deep,
title="Deep Vectorization of Technical Drawings",
author="Egiazarian, Vage and Voynov, Oleg and Artemov, Alexey and Volkhonskiy, Denis and Safin, Aleksandr and Taktasheva, Maria and Zorin, Denis and Burnaev, Evgeny",
booktitle="Computer Vision -- ECCV 2020",
year="2020",
publisher="Springer International Publishing",
address="Cham",
pages="582--598",
isbn="978-3-030-58601-0"
}