├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .pre-commit-config.yaml ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── ReadMe_images ├── character_distribution.png ├── generating_words_mse_vs_sce.png ├── losses_comparison.png ├── network.png ├── projected_images.png ├── swapping_labels.png ├── word_encoder.png └── words_with_the_same_style.png ├── allow_memory_growth.py ├── aster_ocr_utils ├── __init__.py ├── aster_inferer.py ├── aster_tester.py └── weigths_tf1_to_tf2.py ├── aster_weights └── .keep ├── config ├── __init__.py ├── char_tokens.py └── config.py ├── dataset_utils ├── __init__.py ├── filter_out_bad_images.py ├── text_box_dataset_maker.py ├── text_box_dataset_metrics.py ├── text_corpus_dataset_maker.py ├── training_data_loader.py └── validation_data_loader.py ├── experiments └── .keep ├── infer.py ├── models ├── __init__.py ├── custom_stylegan2 │ ├── __init__.py │ ├── discriminator.py │ ├── generator.py │ ├── latent_encoder.py │ ├── layers │ │ ├── __init__.py │ │ ├── bias_act.py │ │ ├── commons.py │ │ ├── conv.py │ │ ├── dense.py │ │ ├── from_rgb.py │ │ ├── mapping_block.py │ │ ├── mini_batch_std.py │ │ ├── modulated_conv2d.py │ │ ├── noise.py │ │ ├── synthesis_block.py │ │ ├── to_rgb.py │ │ └── upfirdn │ │ │ ├── __init__.py │ │ │ ├── custom_ops.py │ │ │ ├── upfirdn_2d.cu │ │ │ └── upfirdn_2d_v2.py │ └── utils.py ├── losses │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-38.pyc │ │ ├── gan_losses.cpython-38.pyc │ │ └── ocr_losses.cpython-38.pyc │ ├── gan_losses.py │ └── ocr_losses.py ├── model_loader.py └── word_encoder.py ├── poetry.lock ├── projector ├── __init__.py ├── lpips_tensorflow.py ├── perceptual_weights │ ├── lin │ │ └── .keep │ └── vgg │ │ └── .keep └── projector.py ├── pyproject.toml ├── tests ├── __init__.py └── test_unit.py ├── train.py ├── training_step.py ├── utils ├── __init__.py ├── loss_tracker.py ├── tensorboard_writer.py └── utils.py └── validation_step.py /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/.gitignore -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/.pre-commit-config.yaml -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/README.md -------------------------------------------------------------------------------- /ReadMe_images/character_distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/ReadMe_images/character_distribution.png -------------------------------------------------------------------------------- /ReadMe_images/generating_words_mse_vs_sce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/ReadMe_images/generating_words_mse_vs_sce.png -------------------------------------------------------------------------------- /ReadMe_images/losses_comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/ReadMe_images/losses_comparison.png -------------------------------------------------------------------------------- /ReadMe_images/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/ReadMe_images/network.png -------------------------------------------------------------------------------- /ReadMe_images/projected_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/ReadMe_images/projected_images.png -------------------------------------------------------------------------------- /ReadMe_images/swapping_labels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/ReadMe_images/swapping_labels.png -------------------------------------------------------------------------------- /ReadMe_images/word_encoder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/ReadMe_images/word_encoder.png -------------------------------------------------------------------------------- /ReadMe_images/words_with_the_same_style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/ReadMe_images/words_with_the_same_style.png -------------------------------------------------------------------------------- /allow_memory_growth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/allow_memory_growth.py -------------------------------------------------------------------------------- /aster_ocr_utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /aster_ocr_utils/aster_inferer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/aster_ocr_utils/aster_inferer.py -------------------------------------------------------------------------------- /aster_ocr_utils/aster_tester.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/aster_ocr_utils/aster_tester.py -------------------------------------------------------------------------------- /aster_ocr_utils/weigths_tf1_to_tf2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/aster_ocr_utils/weigths_tf1_to_tf2.py -------------------------------------------------------------------------------- /aster_weights/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/config/__init__.py -------------------------------------------------------------------------------- /config/char_tokens.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/config/char_tokens.py -------------------------------------------------------------------------------- /config/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/config/config.py -------------------------------------------------------------------------------- /dataset_utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dataset_utils/filter_out_bad_images.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/dataset_utils/filter_out_bad_images.py -------------------------------------------------------------------------------- /dataset_utils/text_box_dataset_maker.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/dataset_utils/text_box_dataset_maker.py -------------------------------------------------------------------------------- /dataset_utils/text_box_dataset_metrics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/dataset_utils/text_box_dataset_metrics.py -------------------------------------------------------------------------------- /dataset_utils/text_corpus_dataset_maker.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/dataset_utils/text_corpus_dataset_maker.py -------------------------------------------------------------------------------- /dataset_utils/training_data_loader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/dataset_utils/training_data_loader.py -------------------------------------------------------------------------------- /dataset_utils/validation_data_loader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/dataset_utils/validation_data_loader.py -------------------------------------------------------------------------------- /experiments/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /infer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/infer.py -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/custom_stylegan2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/custom_stylegan2/discriminator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/discriminator.py -------------------------------------------------------------------------------- /models/custom_stylegan2/generator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/generator.py -------------------------------------------------------------------------------- /models/custom_stylegan2/latent_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/latent_encoder.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/bias_act.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/bias_act.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/commons.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/commons.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/conv.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/conv.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/dense.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/dense.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/from_rgb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/from_rgb.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/mapping_block.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/mapping_block.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/mini_batch_std.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/mini_batch_std.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/modulated_conv2d.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/modulated_conv2d.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/noise.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/noise.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/synthesis_block.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/synthesis_block.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/to_rgb.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/to_rgb.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/upfirdn/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/upfirdn/__init__.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/upfirdn/custom_ops.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/upfirdn/custom_ops.py -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/upfirdn/upfirdn_2d.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/upfirdn/upfirdn_2d.cu -------------------------------------------------------------------------------- /models/custom_stylegan2/layers/upfirdn/upfirdn_2d_v2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/layers/upfirdn/upfirdn_2d_v2.py -------------------------------------------------------------------------------- /models/custom_stylegan2/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/custom_stylegan2/utils.py -------------------------------------------------------------------------------- /models/losses/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/losses/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/losses/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /models/losses/__pycache__/gan_losses.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/losses/__pycache__/gan_losses.cpython-38.pyc -------------------------------------------------------------------------------- /models/losses/__pycache__/ocr_losses.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/losses/__pycache__/ocr_losses.cpython-38.pyc -------------------------------------------------------------------------------- /models/losses/gan_losses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/losses/gan_losses.py -------------------------------------------------------------------------------- /models/losses/ocr_losses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/losses/ocr_losses.py -------------------------------------------------------------------------------- /models/model_loader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/model_loader.py -------------------------------------------------------------------------------- /models/word_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/models/word_encoder.py -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/poetry.lock -------------------------------------------------------------------------------- /projector/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projector/lpips_tensorflow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/projector/lpips_tensorflow.py -------------------------------------------------------------------------------- /projector/perceptual_weights/lin/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projector/perceptual_weights/vgg/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projector/projector.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/projector/projector.py -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/pyproject.toml -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test_unit.py: -------------------------------------------------------------------------------- 1 | def test_unit(): 2 | pass 3 | -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/train.py -------------------------------------------------------------------------------- /training_step.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/training_step.py -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/utils/__init__.py -------------------------------------------------------------------------------- /utils/loss_tracker.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/utils/loss_tracker.py -------------------------------------------------------------------------------- /utils/tensorboard_writer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/utils/tensorboard_writer.py -------------------------------------------------------------------------------- /utils/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/utils/utils.py -------------------------------------------------------------------------------- /validation_step.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoAchache/TextBoxGAN/HEAD/validation_step.py --------------------------------------------------------------------------------