/synthesis-in-style

Code for our Paper "Synthesis in Style: Semantic Segmentation of Historical Documents using Synthetic Data"

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Synthesis in Style

sis_example_high This repository contains the code for the paper Synthesis in Style: Semantic Segmentation of Historical Documents using Synthetic Data. The trained models and benchmark dataset used for evaluation can be found here.

Installation

Make sure that Python (version >= 3.8) is installed.

In stylegan_code_finder directory execute:

pip3 install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html

For building the required cuda extensions ninja is required. (Installation under Ubuntu: sudo apt-get install ninja-build)

Docker Image

You can also find a docker image with all necessary dependencies on Docker Hub.

Usage

For information how to use the code in this repository please refer to the wiki.

License and Credits

The code used for the EMANet implementation is taken from here.

The code for TransUNet was taken from this repository.

StyleGAN2 implementation and custom CUDA kernel codes are taken from official the official NVIDIA repository, which is published under Nvidia Source Code License-NC.

Citation

If you find the code useful, please cite our paper:

@INPROCEEDINGS{9956471,
  author={Bartz, Christian and Raetz, Hendrik and Otholt, Jona and Meinel, Christoph and Yang, Haojin},
  booktitle={2022 26th International Conference on Pattern Recognition (ICPR)}, 
  title={Synthesis in Style: Semantic Segmentation of Historical Documents using Synthetic Data}, 
  year={2022},
  volume={},
  number={},
  pages={3878-3884},
  doi={10.1109/ICPR56361.2022.9956471}
}