Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for dewarp #40

Closed
VolkerHartmann opened this issue Jan 25, 2020 · 4 comments
Closed

Improve documentation for dewarp #40

VolkerHartmann opened this issue Jan 25, 2020 · 4 comments

Comments

@VolkerHartmann
Copy link

Requirements:
Installation of pix2pixHD
pip3 install torch torchvision
pip install dominate
parameter model_name seems to be ignored
set parameter for pix2pixHD

@VolkerHartmann
Copy link
Author

VolkerHartmann commented Jan 25, 2020

Still got an error:
File "/home/user/ocrd/python/pix2pixHD/models/pix2pixHD_model.py", line 58, in initialize
self.load_network(self.netG, 'G', opt.which_epoch, pretrained_path)
File "/home/user/ocrd/python/pix2pixHD/models/base_model.py", line 58, in load_network
raise('Generator must exist!')

Please provide an example how to configure dewarper correct.
Also a link inside the README.md to the second README.md would be helpful.

@VolkerHartmann
Copy link
Author

typo in ocrd-anybaseocr-block-segmenter -> ocrd-anybaseocr-block-segmentation

@bertsky
Copy link
Contributor

bertsky commented Jun 20, 2020

The packaging of this module (and its documentation) is a nightmare:

Installation of pix2pixHD

Since there's no release on PyPI, this literally means cloning https://github.com/NVIDIA/pix2pixHD
somewhere, and creating a checkpoints subdirectory for it, and then passing the absolute pathname of the clone to the pix2pixHD parameter

pip3 install torch torchvision
pip install dominate

along with a full CUDA setup

parameter model_name seems to be ignored

No, it's not. It needs to point to the absolute pathname of the directory holding the dewarping model manually downloaded from here

All this should have been encapsulated in requirements.txt or at least in some Makefile recipe for installation. Since there's no distribution for it, the dependency on pix2pixHD should be made a submodule. The requirement to give absolute path names (twice!) in the parameter JSON makes it impossible to ship host-independent parameter/workflow configurations. IMO the pix2pixHD path should not be a parameter at all, but resolved at install-time.

@kba
Copy link
Member

kba commented Mar 20, 2022

fixed by #89

@kba kba closed this as completed Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants