herobd / handwriting_line_generation

Code for BMVC2020 paper "Text and Style Conditioned GAN for Generation of Offline Handwriting Lines"
Other
66 stars 29 forks source link

generate.py on pretrained snapshot: mmd_hw_dataset import error #12

Open Mesil opened 3 years ago

Mesil commented 3 years ago

Hey I'm trying to get sort of a minimum working example of your project running so I can better understand what's going on by running generate.py on the pre-trained snapshots which you provided.

python generate.py -c ~/Downloads/IAM_weights/IAMslant_noMask_charSpecSingleAppend_GANMedMT_autoAEMoPrcp2tightNewCTCUseGen_balB_hCF0.75_sMG/checkpoint-iteration175000.pth -d ~/Downloads -s ~/Downloads/IAM_weights/IAMslant_noMask_charSpecSingleAppend_GANMedMT_autoAEMoPrcp2tightNewCTCUseGen_balB_hCF0.75_sMG/test_styles_175000.pkl

The script errors out as follows:

File "/home/redpanda/Downloads/handwriting_line_generation-w1.0/generate.py", line 10, in <module> from trainer import * File "/home/redpanda/Downloads/handwriting_line_generation-w1.0/trainer/__init__.py", line 10, in <module> from .hw_with_style_trainer import HWWithStyleTrainer File "/home/redpanda/Downloads/handwriting_line_generation-w1.0/trainer/hw_with_style_trainer.py", line 10, in <module> from data_loader import getDataLoader File "/home/redpanda/Downloads/handwriting_line_generation-w1.0/data_loader/__init__.py", line 1, in <module> from .data_loaders import * File "/home/redpanda/Downloads/handwriting_line_generation-w1.0/data_loader/data_loaders.py", line 21, in <module> from datasets import mmd_hw_dataset ImportError: cannot import name 'mmd_hw_dataset' from 'datasets' (unknown location) Is mmd_hw_dataset missing, or has the name of the file to import changed? I'm a bit stumped as to what's going on here. Thanks!

herobd commented 3 years ago

Try pulling down the latest. That was a dataset I removed for the release. The data_loader.py shouldn't be importing it.