Skip to content

RuiyangJu/Efficient_Document_Image_Binarization

Repository files navigation

Efficient document image binarization

Efficient GANs for Document Image Binarization Based on DWT and Normalization

Citation

If you find our paper useful in your research, please consider citing:

  @article{ju2024efficient,
    title={Efficient GANs for Document Image Binarization Based on DWT and Normalization},
    author={Ju, Rui-Yang and Wong, KokSheik and Chiang, Jen-Shiun},
    journal={arXiv preprint arXiv:2407.04231},
    year={2024}
  }

Method

Datasets

Result (DIBCO 2019-009)

Environment

  • NVIDIA GPU + CUDA CuDNN
  • Creat a new Conda environment:
      conda env create -f environment.yaml
    

UNet & EfficientNetV2-S

Train

  cd unet_effnetv2
  python image_to_256.py
  python image_to_512.py
  python train_stage2_unet.py --epochs 10 --lambda_loss 25 --base_model_name tu-efficientnetv2_rw_s --batch_size 64
  python predict_for_stage3_unet.py --base_model_name tu-efficientnetv2_rw_s --lambda_loss 25
  python train_stage3_unet.py --epochs 10 --lambda_loss 25 --base_model_name tu-efficientnetv2_rw_s --batch_size 64
  python train_stage3_unet_resize.py --epochs 150 --lambda_loss 25 --base_model_name tu-efficientnetv2_rw_s --batch_size 16

Test

  python eval_stage3_all_unet.py --lambda_loss 25 --base_model_name tu-efficientnetv2_rw_s --batch_size 64

UNet++ & EfficientNetV2-S

Train

  cd unetplusplus_effnetv2
  python image_to_256.py
  python image_to_512.py
  python train_stage2.py --epochs 10 --lambda_loss 25 --base_model_name tu-efficientnetv2_rw_s --batch_size 64
  python predict_for_stage3.py --base_model_name tu-efficientnetv2_rw_s --lambda_loss 25
  python train_stage3.py --epochs 10 --lambda_loss 25 --base_model_name tu-efficientnetv2_rw_s --batch_size 64
  python train_stage3_resize.py --epochs 150 --lambda_loss 25 --base_model_name tu-efficientnetv2_rw_s --batch_size 16

Test

  python eval_stage3_all.py --lambda_loss 25 --base_model_name tu-efficientnetv2_rw_s --batch_size 64