Skip to content

Commit

Permalink
Cleaning up. Updating License and Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
herobd committed Nov 5, 2020
1 parent 854751e commit 6293b9f
Show file tree
Hide file tree
Showing 25 changed files with 191 additions and 2,160 deletions.
174 changes: 173 additions & 1 deletion LICENSE

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Handwriting... with style!

This is the code for the paper "Text and Style Conditioned GAN for the Generation of Offline-Handwriting Lines" published at BMVC 2020. https://arxiv.org/abs/2009.00678

This was originally Brian Davis's summer 2019 internship project at Adobe.
This was originally Brian Davis's summer 2019 internship project at Adobe (https://github.com/adobe-research/hw_with_style). It was then extended afterwards (while at BYU) and finally published.

The trained models (snapshots) will be available as a file in the release.

Code structure based on victoresque pytorch template.

Expand All @@ -29,7 +31,8 @@ Encoder: `python train.py -c configs/cf_IAM_auto_2tight_newCTC.json`

Then the generator can be trained: `python train.py -c configs/cf_IAMslant_noMask_charSpecSingleAppend_GANMedMT_autoAEMoPrcp2tightNewCTCUseGen_balB_hCF0.75_sMG.json`

RIMES will use

The RIMES dataset will use:

HWR: `python train.py -c configs/cf_RIMESLines_hwr_cnnOnly_batchnorm_aug.json`

Expand Down Expand Up @@ -79,7 +82,10 @@ Some modes need the datasets styles in a pickle. Use `get_styles.py` to extract
│ ├── author_hw_dataset.py - This sorts instances by author and has a 'a_batch_size', which is how many by each author should be in the batch (batch_size is number of authors)
│ ├── author_word_dataset.py - Same as above only at word level instead of line level
│ ├── (the "mixed_author" datasets have different splits which mix authors over the splits)
│ ├── font_dataset.py - dataset to render fonts as images. Required TextFlow (and is commented out in data_loaders.py)
│ ├── author_rimes_dataset.py - Same as author_hw_dataset.py, but for RIMES words
│ ├── author_rimeslines_dataset.py - Same as author_hw_dataset.py, but for RIMES lines
│ ├── synth_hw_dataset.py - For training a HWR model using the generated images
│ ├── create_synth_text_dataset.py - Generate images for synth_hw_dataset.py (although it can generate them on the fly)
│ └── test*.py - This are scripts to run through a dataset and simply display what's being returned. For debugging purposes.
├── logger/ - for training process logging
Expand Down Expand Up @@ -123,7 +129,7 @@ Some modes need the datasets styles in a pickle. Use `get_styles.py` to extract
├── saved/ - default checkpoints folder
├── configs/ - configuration files to reproducibility
├── configs/ - configuration files for reproducibility
├── old_configs/ - all the other config files I've used during development/other projects
├── trainer/ - trainers
Expand Down
1 change: 1 addition & 0 deletions base/base_data_loader.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#from https://github.com/victoresque/pytorch-template
from copy import copy
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions base/base_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#from https://github.com/victoresque/pytorch-template
import logging
import torch.nn as nn
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions base/base_trainer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#from https://github.com/victoresque/pytorch-template, with heavy modifications
import os
import math
import json, copy
Expand Down
78 changes: 0 additions & 78 deletions cf_fontNAF32_ocr_softmax_1huge.json

This file was deleted.

34 changes: 0 additions & 34 deletions clean_MMD.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"metrics": [],
"trainer": {
"class": "HWWithStyleTrainer",
"iterations": 200000,
"iterations": 175000,
"save_dir": "saved/",
"val_step": 10000,
"save_step": 25000,
Expand Down
2 changes: 1 addition & 1 deletion configs/cf_RIMESLines_hwr_cnnOnly_batchnorm_aug.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"metrics": [],
"trainer": {
"class": "HWWithStyleTrainer",
"iterations": 500000,
"iterations": 425000,
"save_dir": "../saved/",
"val_step": 12500,
"save_step": 25000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"metrics": [],
"trainer": {
"class": "HWWithStyleTrainer",
"iterations": 200000,
"iterations": 175000,
"save_dir": "saved/",
"val_step": -1,
"save_step": 25000,
Expand Down
Loading

0 comments on commit 6293b9f

Please sign in to comment.