code for our paper "Document image binarization with cGANs based cascaded generator".
1.The python code is based on the python data science platform Anaconda3.
2.The python code is tested on Windows by PyCharm.
3.Install PyTorch and dependencies from http://pytorch.org
-
few example test images are included in the testimg folder.
-
Run Test_All.py, test the binarization of an input image.
-
Please download the pre-trained model from here , and put it under ./checkpoints/
-
Executable file link :exe
-
Please download the public binarization datasets
-
Run combine_A_and_B_sub.py to get the sub training data.
-
Run train.py to train a new model.
Please cite this article as: J.Zhao, C.Shi and F.Jia et al.,Document image binarization with cascaded generators of conditional generative adversarial networks, Pattern Recognition, https://doi.org/10.1016/j.patcog.2019.106968