OCR-D / ocrd_anybaseocr

DFKI Layout Detection for OCR-D
Apache License 2.0
48 stars 12 forks source link

stop creating directories in the input fileGrp #60

Closed bertsky closed 2 years ago

bertsky commented 4 years ago

Probably a left-over of some failed attempt at temporary file I/O…

https://github.com/OCR-D/ocrd_anybaseocr/blob/287adced2d7963ac074762ec02b435b4a6510cae/ocrd_anybaseocr/cli/ocrd_anybaseocr_dewarp.py#L39

https://github.com/OCR-D/ocrd_anybaseocr/blob/287adced2d7963ac074762ec02b435b4a6510cae/ocrd_anybaseocr/cli/ocrd_anybaseocr_dewarp.py#L158

…these should be removed.

bertsky commented 4 years ago

Can also cause failures:

FileExistsError: [Errno 17] File exists: 'OCR-D-IMG-DEN-BINPAGE-sauvola-DENOISE-ocropy/test_A/'
kba commented 4 years ago
 os.mkdir(self.input_file_grp+"/test_A/") 

This is necessary because pix2pixHD expects this directory, named exactly like that, in that place. The data flow in pix2pixHD's plumbing is so convoluted that it's hard to say without trial&error how to fix this. I have no CUDA hardware, so I cannot test the dewarping unfortunately.

bertsky commented 4 years ago

This is necessary because pix2pixHD expects this directory, named exactly like that, in that place. The data flow in pix2pixHD's plumbing is so convoluted that it's hard to say without trial&error how to fix this.

Understood. Than we should document that, and fix the problem of repeated mkdir (which is now more realistic due to --overwrite).

I have no CUDA hardware, so I cannot test the dewarping unfortunately.

Too bad!

kba commented 2 years ago

fixed by #89