Code Monkey home page Code Monkey logo

ocrd-pixelclassifier-segmentation's People

Contributors

crater2150 avatar kba avatar stweil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ocrd-pixelclassifier-segmentation's Issues

Could not load dynamic library 'libnvinfer.so.6'

In a fresh venv on a CPU-only machine, running make test-cli will install ocr4all-pixel-classifier[tf_cpu] as it is supposed to but the actual test fails with

2020-02-27 11:34:41.047310: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-02-27 11:34:41.047404: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-02-27 11:34:41.047419: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
2020-02-27 11:34:42.154339: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2020-02-27 11:34:42.154378: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2020-02-27 11:34:42.154406: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (b-ocr-d): /proc/driver/nvidia/version does not exist
2020-02-27 11:34:42.154585: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-02-27 11:34:42.160566: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2596990000 Hz
2020-02-27 11:34:42.160761: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4dc6220 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-02-27 11:34:42.160778: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
bash: line 1:  4962 Segmentation fault      ocrd-pc-segmentation -l DEBUG -m mets.xml -I OCR-D-IMG-BIN -O OCR-D-SEG-BLOCK
Makefile:62: recipe for target 'test-cli' failed
make: *** [test-cli] Error 139

Why does it even try to use CUDA?

requires Python >=3.7

On Python 3.6, you currently get this:

File "ocrd_pc_segmentation/cli.py", line 4, in <module>
    from ocrd_pc_segmentation.ocrd_segmentation import PixelClassifierSegmentation
  File "ocrd_pc_segmentation/ocrd_segmentation.py", line 6, in <module>
    from ocr4all.colors import ColorMap
  File "ocr4all/colors.py", line 1
    from __future__ import annotations

So one of the dependents obviously lacks a python_requires='>=3.7', confusing pip et al. With all the layers of repos and packages, which seem to be renamed every now and then, I have not been able to trace where exactly this happens, presumably ocr4all-pylab (which is on your Gitlab where I cannot open issues).

But please add that statement to setup.py at least here.

use OCR-D CLI

From the naming I assume you want to conform to OCR-D/spec with ocrd-pc-seg-process. Please do so.

BTW, the easiest way to get there is using OCR-D/core's CLI decorators, as done by most modules, not argparse.

Also, for the implementation of it, it is not compliant to simply write to some PAGE-XML and be done with it. You have to open the specific PAGE files of the input file group in the METS, and create new files under the output file group, which you have to register with METS.

Again, all this is really easy to do with OCR-D/core's Processor class.

TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

Does it require cuda? No... then it must be an other problem.

workflow (without cis-ocropy-clip):

. /usr/local/ocrd_all/venv/bin/activate
export TMPDIR=/dwork/tmp
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ocrd-create-mets.xml
( /usr/bin/time ocrd process \
"olena-binarize -I OCR-D-IMG -O OCR-D-N1 -P impl wolf" \
"anybaseocr-crop -I OCR-D-N1 -O OCR-D-N2" \
"olena-binarize -I OCR-D-N2 -O OCR-D-N3 -P impl wolf" \
"cis-ocropy-denoise -I OCR-D-N3 -O OCR-D-N4 -P level-of-operation page" \
"cis-ocropy-deskew -I OCR-D-N4 -O OCR-D-N5 -P level-of-operation page" \
"pc-segmentation -I OCR-D-N5 -O OCR-D-N6" \
"cis-ocropy-deskew -I OCR-D-N6 -O OCR-D-N7 -P level-of-operation region" \
"tesserocr-segment-line -I OCR-D-N7 -O OCR-D-N8" \
"cis-ocropy-resegment -I OCR-D-N8 -O OCR-D-N9" \
"cis-ocropy-dewarp -I OCR-D-N9 -O OCR-D-N10" \
"calamari-recognize -I OCR-D-N10 -O OCR-D-OCR -P checkpoint /usr/local/ocrd_models/calamari/calamari_models-0.3/fraktur_19th_century/*.ckpt.json"

) >cmd.log 2>&1

log | fold -s -w 72

15:31:21.117 INFO ocrd.task_sequence.run_tasks - Start processing task 
'pc-segmentation -I OCR-D-N5 -O OCR-D-N6 -p '{"overwrite_regions": 
true, "xheight": 8, "model": "__DEFAULT__", "gpu_allow_growth": false, 
"resize_height": 300}''
Traceback (most recent call last):
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/bin/ocrd", 
line 8, in <module>
    sys.exit(cli())
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/lib/python3.7/s
ite-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/lib/python3.7/s
ite-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/lib/python3.7/s
ite-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/lib/python3.7/s
ite-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/lib/python3.7/s
ite-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/lib/python3.7/s
ite-packages/ocrd/cli/process.py", line 26, in process_cli
    run_tasks(mets, log_level, page_id, tasks, overwrite)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/lib/python3.7/s
ite-packages/ocrd/task_sequence.py", line 149, in run_tasks
    raise Exception("%s exited with non-zero return value %s. 
STDOUT:\n%s\nSTDERR:\n%s" % (task.executable, returncode, out, err))
Exception: ocrd-pc-segmentation exited with non-zero return value 1. 
STDOUT:

STDERR:
15:31:22.825 INFO processor.PixelClassifierSegmentation - INPUT FILE 0 
/ P_00001
2020-10-09 15:31:27.681889: W 
tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not 
load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: 
cannot open shared object file: No such file or directory; 
LD_LIBRARY_PATH: /usr/local/lib:
2020-10-09 15:31:27.681931: I 
tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart 
dlerror if you do not have a GPU set up on your machine.
2020-10-09 15:31:34.975002: W 
tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not 
load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open 
shared object file: No such file or directory; LD_LIBRARY_PATH: 
/usr/local/lib:
2020-10-09 15:31:34.975046: W 
tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to 
cuInit: UNKNOWN ERROR (303)
2020-10-09 15:31:34.975081: I 
tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver 
does not appear to be running on this host (pers109): 
/proc/driver/nvidia/version does not exist
2020-10-09 15:31:34.975475: I 
tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow 
binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to 
use the following CPU instructions in performance-critical operations:  
AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the 
appropriate compiler flags.
2020-10-09 15:31:35.159446: I 
tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 
2700000000 Hz
2020-10-09 15:31:35.167069: I 
tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55f5930 
initialized for platform Host (this does not guarantee that XLA will be 
used). Devices:
2020-10-09 15:31:35.167131: I 
tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device 
(0): Host, Default Version
2020-10-09 15:31:37.416557: W 
tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 
1368064000 exceeds 10% of free system memory.
2020-10-09 15:31:40.551333: W 
tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 
2052096000 exceeds 10% of free system memory.
2020-10-09 15:31:43.272163: W 
tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 
2137600000 exceeds 10% of free system memory.
2020-10-09 15:31:44.544863: W 
tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 
4275200000 exceeds 10% of free system memory.
2020-10-09 15:31:46.975789: W 
tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 
1197056000 exceeds 10% of free system memory.
Traceback (most recent call last):
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/bin/ocrd-pc-segmentation", line 8, in <module>
    sys.exit(ocrd_pc_segmentation())
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/click/core.py", line 829, in 
__call__
    return self.main(*args, **kwargs)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/click/core.py", line 782, in 
main
    rv = self.invoke(ctx)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/click/core.py", line 1066, in 
invoke
    return ctx.invoke(self.callback, **ctx.params)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/click/core.py", line 610, in 
invoke
    return callback(*args, **kwargs)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/ocrd_pc_segmentation/cli.py", 
line 10, in ocrd_pc_segmentation
    return ocrd_cli_wrap_processor(PixelClassifierSegmentation, *args, 
**kwargs)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/ocrd/decorators/__init__.py", 
line 81, in ocrd_cli_wrap_processor
    run_processor(processorClass, ocrd_tool, mets, workspace=workspace, 
**kwargs)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/ocrd/processor/helpers.py", 
line 68, in run_processor
    processor.process()
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/ocrd_pc_segmentation/ocrd_segme
ntation.py", line 115, in process
    gpu_allow_growth, resize_height)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/ocrd_pc_segmentation/ocrd_segme
ntation.py", line 152, in _process_page
    masks = predictor.predict_masks(data)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/ocr4all_pixel_classifier/lib/pr
edictor.py", line 74, in predict_masks
    return generate_output_masks(data, pred, self.settings.color_map)
  File 
"/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/
headless-tf2/lib/python3.7/site-packages/ocr4all_pixel_classifier/lib/ou
tput.py", line 46, in generate_output_masks
    foreground = np.stack([(1 - data.binary)] * 3, axis=-1)
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

Command exited with non-zero status 1

TypeError: make_requirement_preparer() got an unexpected keyword argument 'wheel_download_dir'

2020-12-18 tried to compile ocrd_all after git pull:

. /beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/bin/activate && make -C ocrd_pc_segmentation deps
make[2]: Entering directory `/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/ocrd_pc_segmentation'
pip install pip-tools
Requirement already satisfied: pip-tools in /beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages (5.3.1)
Requirement already satisfied: six in /beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages (from pip-tools) (1.15.0)
Requirement already satisfied: click>=7 in /beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages (from pip-tools) (7.1.2)
Requirement already satisfied: pip>=20.0 in /beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages (from pip-tools) (20.3.3)
pip-compile --upgrade
Traceback (most recent call last):
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/bin/pip-compile", line 8, in <module>
    sys.exit(cli())
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/piptools/scripts/compile.py", line 458, in cli
    results = resolver.resolve(max_rounds=max_rounds)
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/piptools/resolver.py", line 173, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/piptools/resolver.py", line 278, in _resolve_one_round
    their_constraints.extend(self._iter_dependencies(best_match))
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/piptools/resolver.py", line 388, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/piptools/repositories/pypi.py", line 232, in get_dependencies
    download_dir, ireq, wheel_cache
  File "/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/lib/python3.7/site-packages/piptools/repositories/pypi.py", line 163, in resolve_reqs
    wheel_download_dir=self._wheel_download_dir,
TypeError: make_requirement_preparer() got an unexpected keyword argument 'wheel_download_dir'
make[2]: *** [requirements.txt] Error 1
make[2]: Leaving directory `/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/ocrd_pc_segmentation'
make[1]: *** [/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/local/sub-venv/headless-tf2/bin/ocrd-pc-segmentation] Error 2
make[1]: Leaving directory `/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all'
make: *** [/beegfs/home/hd/hd_hd/hd_wu120/ocrd_all/venv/bin/ocrd-pc-segmentation] Error 2

Running tests delivers no segmentation

Please help! Running

$ make test-cli

downloads the assets repo and creates an OCR-D workspace with a directory OCR-D-SEG-BLOCK. The PAGE XML files in this directory however do not contain any regions. The CLI output is as follows:

...
(Installation of dependencies)
...
Successfully installed ocrd-pc-segmentation-0.1.3
rm -rfv test-workspace
cp -rv test/assets/kant_aufklaerung_1784-binarized test-workspace
'test/assets/kant_aufklaerung_1784-binarized' -> 'test-workspace'
'test/assets/kant_aufklaerung_1784-binarized/bag-info.txt' -> 'test-workspace/bag-info.txt'
'test/assets/kant_aufklaerung_1784-binarized/bagit.txt' -> 'test-workspace/bagit.txt'
'test/assets/kant_aufklaerung_1784-binarized/data' -> 'test-workspace/data'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-GT-WORD' -> 'test-workspace/data/OCR-D-GT-WORD'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-GT-WORD/INPUT_0017.xml' -> 'test-workspace/data/OCR-D-GT-WORD/INPUT_0017.xml'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-GT-WORD/INPUT_0020.xml' -> 'test-workspace/data/OCR-D-GT-WORD/INPUT_0020.xml'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-IMG-1BIT' -> 'test-workspace/data/OCR-D-IMG-1BIT'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-IMG-1BIT/OCR-D-IMG-1BIT_0017.png' -> 'test-workspace/data/OCR-D-IMG-1BIT/OCR-D-IMG-1BIT_0017.png'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-IMG-BIN' -> 'test-workspace/data/OCR-D-IMG-BIN'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-IMG-BIN/BIN_0017.png' -> 'test-workspace/data/OCR-D-IMG-BIN/BIN_0017.png'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-IMG-BIN/BIN_0020.png' -> 'test-workspace/data/OCR-D-IMG-BIN/BIN_0020.png'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-IMG-NRM' -> 'test-workspace/data/OCR-D-IMG-NRM'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-IMG-NRM/OCR-D-IMG-NRM_0017.png' -> 'test-workspace/data/OCR-D-IMG-NRM/OCR-D-IMG-NRM_0017.png'
'test/assets/kant_aufklaerung_1784-binarized/data/OCR-D-IMG-NRM/OCR-D-IMG-NRM_0020.png' -> 'test-workspace/data/OCR-D-IMG-NRM/OCR-D-IMG-NRM_0020.png'
'test/assets/kant_aufklaerung_1784-binarized/data/mets.xml' -> 'test-workspace/data/mets.xml'
'test/assets/kant_aufklaerung_1784-binarized/manifest-sha512.txt' -> 'test-workspace/manifest-sha512.txt'
'test/assets/kant_aufklaerung_1784-binarized/tagmanifest-sha512.txt' -> 'test-workspace/tagmanifest-sha512.txt'
cd test-workspace/data && \
	ocrd-pc-segmentation -l DEBUG -m mets.xml -I OCR-D-IMG-BIN -O OCR-D-SEG-BLOCK
12:43:35.380 INFO root - Overriding log level globally to DEBUG
12:43:35.381 DEBUG ocrd.resolver - Deriving dst_dir . from mets.xml
12:43:35.381 DEBUG ocrd.resolver - workspace_from_url
mets_basename='mets.xml'
mets_url='mets.xml'
src_baseurl=''
dst_dir='/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data'
12:43:35.381 DEBUG ocrd.resolver.download_to_directory - directory=|/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data| url=|mets.xml| basename=|mets.xml| if_exists=|raise| subdir=|None|
12:43:35.381 DEBUG ocrd.resolver.download_to_directory - Stop early, src_path and dst_path are the same: '/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data/mets.xml' (url: 'mets.xml')
12:43:35.383 DEBUG ocrd.processor - Running processor <class 'ocrd_pc_segmentation.ocrd_segmentation.PixelClassifierSegmentation'>
12:43:35.384 DEBUG ocrd.processor - Processor instance <ocrd_pc_segmentation.ocrd_segmentation.PixelClassifierSegmentation object at 0x7fedbcc60e10> (ocrd-pc-segmentation v0.1.0 doing layout/segmentation/region)
12:43:35.384 INFO processor.PixelClassifierSegmentation - INPUT FILE 0 / P_0017
12:43:35.384 DEBUG ocrd.workspace - download_file <OcrdFile mimetype=image/png, ID=BIN_0017, url=OCR-D-IMG-BIN/BIN_0017.png, local_filename=OCR-D-IMG-BIN/BIN_0017.png]/>  [_recursion_count=0]
12:43:35.384 DEBUG ocrd.resolver.download_to_directory - directory=|/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data| url=|OCR-D-IMG-BIN/BIN_0017.png| basename=|BIN_0017.png| if_exists=|skip| subdir=|OCR-D-IMG-BIN|
12:43:35.385 DEBUG ocrd.resolver.download_to_directory - Stop early, src_path and dst_path are the same: '/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data/OCR-D-IMG-BIN/BIN_0017.png' (url: 'OCR-D-IMG-BIN/BIN_0017.png')
12:43:35.399 DEBUG PIL.PngImagePlugin - STREAM b'IHDR' 16 13
12:43:35.399 DEBUG PIL.PngImagePlugin - STREAM b'IDAT' 41 65536
12:43:35.401 DEBUG ocrd.workspace - download_file <OcrdFile mimetype=image/png, ID=BIN_0017, url=OCR-D-IMG-BIN/BIN_0017.png, local_filename=OCR-D-IMG-BIN/BIN_0017.png]/>  [_recursion_count=0]
12:43:35.401 DEBUG ocrd.resolver.download_to_directory - directory=|/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data| url=|OCR-D-IMG-BIN/BIN_0017.png| basename=|BIN_0017.png| if_exists=|skip| subdir=|OCR-D-IMG-BIN|
12:43:35.401 DEBUG ocrd.resolver.download_to_directory - Stop early, src_path and dst_path are the same: '/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data/OCR-D-IMG-BIN/BIN_0017.png' (url: 'OCR-D-IMG-BIN/BIN_0017.png')
12:43:35.401 DEBUG PIL.PngImagePlugin - STREAM b'IHDR' 16 13
12:43:35.401 DEBUG PIL.PngImagePlugin - STREAM b'IDAT' 41 65536
12:43:35.402 DEBUG ocrd.workspace - page 'P_0017' has orientation=0 skew=0.00
12:43:35.551 DEBUG matplotlib - $HOME=/home/kmw
12:43:35.551 DEBUG matplotlib - CONFIGDIR=/home/kmw/.config/matplotlib
12:43:35.552 DEBUG matplotlib - matplotlib data path: /home/kmw/Documents/Work/OCR-D/env/lib/python3.6/site-packages/matplotlib/mpl-data
12:43:35.554 DEBUG matplotlib - loaded rc file /home/kmw/Documents/Work/OCR-D/env/lib/python3.6/site-packages/matplotlib/mpl-data/matplotlibrc
12:43:35.556 DEBUG matplotlib - matplotlib version 3.0.3
12:43:35.556 DEBUG matplotlib - interactive is False
12:43:35.556 DEBUG matplotlib - platform is linux
12:43:35.557 DEBUG matplotlib - loaded modules: ['builtins', 'sys', '_frozen_importlib', '_imp', '_warnings', '_thread', '_weakref', '_frozen_importlib_external', '_io', 'marshal', 'posix', 'zipimport', 'encodings', 'codecs', '_codecs', 'encodings.aliases', 'encodings.utf_8', '_signal', '__main__', 'encodings.latin_1', 'io', 'abc', '_weakrefset', 'site', 'os', 'errno', 'stat', '_stat', 'posixpath', 'genericpath', 'os.path', '_collections_abc', '_bootlocale', '_locale', 'types', 'functools', '_functools', 'collections', 'operator', '_operator', 'keyword', 'heapq', '_heapq', 'itertools', 'reprlib', '_collections', 'weakref', 'collections.abc', 'importlib', 'importlib._bootstrap', 'importlib._bootstrap_external', 'warnings', 'importlib.util', 'importlib.abc', 'importlib.machinery', 'contextlib', 'qurator', 'google', 'mpl_toolkits', 'sitecustomize', 're', 'enum', 'sre_compile', '_sre', 'sre_parse', 'sre_constants', 'copyreg', 'ocrd_pc_segmentation', 'ocrd_pc_segmentation.cli', 'click', 'click.core', 'inspect', 'ast', '_ast', 'dis', 'opcode', '_opcode', 'linecache', 'tokenize', 'token', 'click.types', 'datetime', 'time', 'math', '_datetime', 'click._compat', 'click.exceptions', 'click.utils', 'click.globals', 'threading', 'traceback', 'click.termui', 'struct', '_struct', 'click.formatting', 'click.parser', 'click._unicodefun', 'click.decorators', 'ocrd', 'ocrd.processor', 'ocrd.processor.base', 'json', 'json.decoder', 'json.scanner', '_json', 'json.encoder', 'subprocess', 'signal', '_posixsubprocess', 'select', 'selectors', 'ocrd_utils', 'zipfile', 'shutil', 'fnmatch', 'zlib', 'bz2', '_compression', '_bz2', 'lzma', '_lzma', 'pwd', 'grp', 'binascii', 'numpy', '__future__', 'numpy._globals', 'numpy.__config__', 'numpy.version', 'numpy._distributor_init', 'numpy.core', 'numpy.core.info', 'numpy.core.multiarray', 'numpy.core.overrides', 'textwrap', 'numpy.core._multiarray_umath', 'numpy.compat', 'numpy.compat._inspect', 'numpy.compat.py3k', 'pathlib', 'ntpath', 'urllib', 'urllib.parse', 'pickle', '_compat_pickle', '_pickle', 'numpy.core.umath', 'numpy.core.numerictypes', 'numbers', 'numpy.core._string_helpers', 'numpy.core._type_aliases', 'numpy.core._dtype', 'numpy.core.numeric', 'numpy.core._exceptions', 'numpy.core._asarray', 'numpy.core._ufunc_config', 'numpy.core.fromnumeric', 'numpy.core._methods', 'numpy.core.arrayprint', 'numpy.core.defchararray', 'numpy.core.records', 'numpy.core.memmap', 'numpy.core.function_base', 'numpy.core.machar', 'numpy.core.getlimits', 'numpy.core.shape_base', 'numpy.core.einsumfunc', 'numpy.core._add_newdocs', 'numpy.core._multiarray_tests', 'numpy.core._dtype_ctypes', '_ctypes', 'ctypes', 'ctypes._endian', 'numpy.core._internal', 'platform', 'numpy._pytesttester', 'numpy.lib', 'numpy.lib.info', 'numpy.lib.type_check', 'numpy.lib.ufunclike', 'numpy.lib.index_tricks', 'numpy.matrixlib', 'numpy.matrixlib.defmatrix', 'numpy.linalg', 'numpy.linalg.info', 'numpy.linalg.linalg', 'numpy.lib.twodim_base', 'numpy.linalg.lapack_lite', 'numpy.linalg._umath_linalg', 'numpy.lib.function_base', 'numpy.lib.histograms', 'numpy.lib.stride_tricks', 'numpy.lib.mixins', 'numpy.lib.nanfunctions', 'numpy.lib.shape_base', 'numpy.lib.scimath', 'numpy.lib.polynomial', 'numpy.lib.utils', 'numpy.lib.arraysetops', 'numpy.lib.npyio', 'numpy.lib.format', 'numpy.lib._datasource', 'numpy.lib._iotools', 'numpy.lib.financial', 'decimal', '_decimal', 'numpy.lib.arrayterator', 'numpy.lib.arraypad', 'numpy.lib._version', 'numpy.fft', 'numpy.fft.info', 'numpy.fft.pocketfft', 'numpy.fft.pocketfft_internal', 'numpy.fft.helper', 'numpy.polynomial', 'numpy.polynomial.polynomial', 'numpy.polynomial.polyutils', 'numpy.polynomial._polybase', 'numpy.polynomial.chebyshev', 'numpy.polynomial.legendre', 'numpy.polynomial.hermite', 'numpy.polynomial.hermite_e', 'numpy.polynomial.laguerre', 'numpy.random', 'numpy.random._pickle', 'numpy.random.mtrand', 'cython_runtime', 'numpy.random.common', 'numpy.random.bounded_integers', 'numpy.random.mt19937', 'numpy.random.bit_generator', '_cython_0_29_13', 'secrets', 'base64', 'hmac', 'hashlib', '_hashlib', '_blake2', '_sha3', 'random', 'bisect', '_bisect', '_random', 'numpy.random.entropy', 'numpy.random.philox', 'numpy.random.pcg64', 'numpy.random.sfc64', 'numpy.random.generator', 'numpy.ctypeslib', 'numpy.ma', 'numpy.ma.core', 'numpy.ma.extras', 'numpy.testing', 'unittest', 'unittest.result', 'unittest.util', 'unittest.case', 'difflib', 'logging', 'string', '_string', 'atexit', 'pprint', 'unittest.suite', 'unittest.loader', 'unittest.main', 'argparse', 'copy', 'gettext', 'locale', 'unittest.runner', 'unittest.signals', 'numpy.testing._private', 'numpy.testing._private.utils', 'gc', 'tempfile', 'numpy.testing._private.decorators', 'numpy.testing._private.nosetester', 'PIL', 'PIL._version', 'PIL.Image', 'PIL.ImageMode', 'PIL.TiffTags', 'PIL._binary', 'PIL._util', 'PIL._imaging', 'PIL.ImageStat', 'PIL.ImageDraw', 'PIL.ImageColor', 'PIL.ImageChops', 'ocrd_utils.logging', 'ocrd_utils.constants', 'pkg_resources', 'pkgutil', 'plistlib', 'xml', 'xml.parsers', 'xml.parsers.expat', 'pyexpat.errors', 'pyexpat.model', 'pyexpat', 'xml.parsers.expat.model', 'xml.parsers.expat.errors', 'email', 'email.parser', 'email.feedparser', 'email.errors', 'email._policybase', 'email.header', 'email.quoprimime', 'email.base64mime', 'email.charset', 'email.encoders', 'quopri', 'email.utils', 'socket', '_socket', 'email._parseaddr', 'calendar', 'pkg_resources.extern', 'pkg_resources._vendor', 'pkg_resources.extern.six', 'pkg_resources._vendor.six', 'pkg_resources.extern.six.moves', 'pkg_resources._vendor.six.moves', 'pkg_resources.py31compat', 'pkg_resources.extern.appdirs', 'pkg_resources._vendor.packaging.__about__', 'pkg_resources.extern.packaging', 'pkg_resources.extern.packaging.version', 'pkg_resources.extern.packaging._structures', 'pkg_resources.extern.packaging.specifiers', 'pkg_resources.extern.packaging._compat', 'pkg_resources.extern.packaging.requirements', 'pkg_resources.extern.pyparsing', 'pkg_resources.extern.six.moves.urllib', 'pkg_resources.extern.packaging.markers', 'sysconfig', 'ocrd_validators', 'ocrd_validators.report', 'ocrd_validators.parameter_validator', 'ocrd_validators.json_validator', 'jsonschema', 'jsonschema.exceptions', 'attr', 'attr.converters', 'attr._make', 'attr._config', 'attr._compat', 'attr.exceptions', 'attr.filters', 'attr.validators', 'attr._funcs', 'jsonschema._utils', 'jsonschema.compat', 'urllib.request', 'http', 'http.client', 'email.message', 'uu', 'email._encoded_words', 'email.iterators', 'ssl', 'ipaddress', '_ssl', 'urllib.error', 'urllib.response', 'jsonschema._format', 'idna', 'idna.package_data', 'idna.core', 'idna.idnadata', 'unicodedata', 'idna.intranges', 'jsonschema._types', 'pyrsistent', 'pyrsistent._pmap', 'pyrsistent._compat', 'six', 'pyrsistent._pvector', 'pyrsistent._transformations', 'pvectorc', 'pyrsistent._pset', 'pyrsistent._pbag', 'pyrsistent._plist', 'pyrsistent._pdeque', 'pyrsistent._checked_types', 'pyrsistent._field_common', 'pyrsistent._precord', 'pyrsistent._pclass', 'pyrsistent._immutable', 'pyrsistent._helpers', 'pyrsistent._toolz', 'six.moves', 'jsonschema.validators', 'jsonschema._legacy_validators', 'jsonschema._validators', 'ocrd_validators.workspace_validator', 'ocrd_modelfactory', 'ocrd_models', 'ocrd_models.ocrd_agent', 'ocrd_models.constants', 'ocrd_models.ocrd_xml_base', 'lxml', 'lxml.etree', '_cython_0_29_6', 'lxml._elementpath', 'gzip', 'ocrd_models.utils', 'ocrd_models.ocrd_exif', 'ocrd_models.ocrd_file', 'ocrd_models.ocrd_mets', 'ocrd_models.ocrd_page', 'ocrd_models.ocrd_page_generateds', 'ocrd_validators.constants', 'yaml', 'yaml.error', 'yaml.tokens', 'yaml.events', 'yaml.nodes', 'yaml.loader', 'yaml.reader', 'yaml.scanner', 'yaml.parser', 'yaml.composer', 'yaml.constructor', 'yaml.resolver', 'yaml.dumper', 'yaml.emitter', 'yaml.serializer', 'yaml.representer', 'ocrd_validators.page_validator', 'ocrd_validators.ocrd_tool_validator', 'ocrd_validators.ocrd_zip_validator', 'bagit', 'multiprocessing', 'multiprocessing.context', 'multiprocessing.process', 'multiprocessing.reduction', 'array', '__mp_main__', 'bagit_profile', 'mimetypes', 'ocrd.resolver', 'requests', 'urllib3', 'urllib3.connectionpool', 'urllib3.exceptions', 'urllib3.packages', 'urllib3.packages.ssl_match_hostname', 'urllib3.packages.six', 'urllib3.packages.six.moves', 'urllib3.packages.six.moves.http_client', 'queue', 'urllib3.connection', 'urllib3.util', 'urllib3.util.connection', 'urllib3.util.wait', 'urllib3.contrib', 'urllib3.contrib._appengine_environ', 'urllib3.util.request', 'urllib3.util.response', 'urllib3.util.ssl_', 'urllib3.util.timeout', 'urllib3.util.retry', 'urllib3.util.url', 'urllib3._collections', 'urllib3.request', 'urllib3.filepost', 'urllib3.fields', 'urllib3.packages.six.moves.urllib', 'urllib3.packages.six.moves.urllib.parse', 'urllib3.response', 'urllib3.util.queue', 'urllib3.poolmanager', 'chardet', 'chardet.compat', 'chardet.universaldetector', 'chardet.charsetgroupprober', 'chardet.enums', 'chardet.charsetprober', 'chardet.escprober', 'chardet.codingstatemachine', 'chardet.escsm', 'chardet.latin1prober', 'chardet.mbcsgroupprober', 'chardet.utf8prober', 'chardet.mbcssm', 'chardet.sjisprober', 'chardet.mbcharsetprober', 'chardet.chardistribution', 'chardet.euctwfreq', 'chardet.euckrfreq', 'chardet.gb2312freq', 'chardet.big5freq', 'chardet.jisfreq', 'chardet.jpcntx', 'chardet.eucjpprober', 'chardet.gb2312prober', 'chardet.euckrprober', 'chardet.cp949prober', 'chardet.big5prober', 'chardet.euctwprober', 'chardet.sbcsgroupprober', 'chardet.sbcharsetprober', 'chardet.langcyrillicmodel', 'chardet.langgreekmodel', 'chardet.langbulgarianmodel', 'chardet.langthaimodel', 'chardet.langhebrewmodel', 'chardet.hebrewprober', 'chardet.langturkishmodel', 'chardet.version', 'requests.exceptions', 'requests.__version__', 'requests.utils', 'requests.certs', 'certifi', 'certifi.core', 'requests._internal_utils', 'requests.compat', 'http.cookiejar', 'http.cookies', 'requests.cookies', 'requests.structures', 'requests.packages', 'requests.packages.urllib3', 'requests.packages.urllib3.connectionpool', 'requests.packages.urllib3.exceptions', 'requests.packages.urllib3.packages', 'requests.packages.urllib3.packages.ssl_match_hostname', 'requests.packages.urllib3.packages.six', 'requests.packages.urllib3.packages.six.moves', 'requests.packages.urllib3.packages.six.moves.http_client', 'requests.packages.urllib3.connection', 'requests.packages.urllib3.util', 'requests.packages.urllib3.util.connection', 'requests.packages.urllib3.util.wait', 'requests.packages.urllib3.contrib', 'requests.packages.urllib3.contrib._appengine_environ', 'requests.packages.urllib3.util.request', 'requests.packages.urllib3.util.response', 'requests.packages.urllib3.util.ssl_', 'requests.packages.urllib3.util.timeout', 'requests.packages.urllib3.util.retry', 'requests.packages.urllib3.util.url', 'requests.packages.urllib3._collections', 'requests.packages.urllib3.request', 'requests.packages.urllib3.filepost', 'requests.packages.urllib3.fields', 'requests.packages.urllib3.packages.six.moves.urllib', 'requests.packages.urllib3.packages.six.moves.urllib.parse', 'requests.packages.urllib3.response', 'requests.packages.urllib3.util.queue', 'requests.packages.urllib3.poolmanager', 'requests.packages.idna', 'requests.packages.idna.package_data', 'requests.packages.idna.core', 'requests.packages.idna.idnadata', 'requests.packages.idna.intranges', 'requests.packages.chardet', 'requests.packages.chardet.compat', 'requests.packages.chardet.universaldetector', 'requests.packages.chardet.charsetgroupprober', 'requests.packages.chardet.enums', 'requests.packages.chardet.charsetprober', 'requests.packages.chardet.escprober', 'requests.packages.chardet.codingstatemachine', 'requests.packages.chardet.escsm', 'requests.packages.chardet.latin1prober', 'requests.packages.chardet.mbcsgroupprober', 'requests.packages.chardet.utf8prober', 'requests.packages.chardet.mbcssm', 'requests.packages.chardet.sjisprober', 'requests.packages.chardet.mbcharsetprober', 'requests.packages.chardet.chardistribution', 'requests.packages.chardet.euctwfreq', 'requests.packages.chardet.euckrfreq', 'requests.packages.chardet.gb2312freq', 'requests.packages.chardet.big5freq', 'requests.packages.chardet.jisfreq', 'requests.packages.chardet.jpcntx', 'requests.packages.chardet.eucjpprober', 'requests.packages.chardet.gb2312prober', 'requests.packages.chardet.euckrprober', 'requests.packages.chardet.cp949prober', 'requests.packages.chardet.big5prober', 'requests.packages.chardet.euctwprober', 'requests.packages.chardet.sbcsgroupprober', 'requests.packages.chardet.sbcharsetprober', 'requests.packages.chardet.langcyrillicmodel', 'requests.packages.chardet.langgreekmodel', 'requests.packages.chardet.langbulgarianmodel', 'requests.packages.chardet.langthaimodel', 'requests.packages.chardet.langhebrewmodel', 'requests.packages.chardet.hebrewprober', 'requests.packages.chardet.langturkishmodel', 'requests.packages.chardet.version', 'requests.models', 'encodings.idna', 'stringprep', 'requests.hooks', 'requests.auth', 'requests.status_codes', 'requests.api', 'requests.sessions', 'requests.adapters', 'ocrd.constants', 'ocrd.workspace', 'cv2', 'cv2.Error', 'cv2.cuda', 'cv2.detail', 'cv2.dnn', 'cv2.fisheye', 'cv2.flann', 'cv2.instr', 'cv2.ipp', 'cv2.ml', 'cv2.ocl', 'cv2.ogl', 'cv2.samples', 'cv2.utils', 'cv2.videoio_registry', 'cv2.cv2', 'cv2.data', 'atomicwrites', 'fcntl', 'deprecated', 'deprecated.classic', 'wrapt', 'wrapt.wrappers', 'wrapt._wrappers', 'wrapt.decorators', 'wrapt.importer', 'deprecated.sphinx', 'ocrd.workspace_backup', 'glob', 'ocrd.decorators', 'ocrd_pc_segmentation.ocrd_segmentation', 'ocr4all_pixel_classifier', 'ocr4all_pixel_classifier.lib', 'ocr4all_pixel_classifier.lib.pc_segmentation', 'xml.etree', 'xml.etree.ElementTree', 'xml.etree.ElementPath', '_elementtree', 'typing', 'typing.io', 'typing.re', 'dataclasses', 'PIL.BmpImagePlugin', 'PIL.ImageFile', 'PIL.ImagePalette', 'PIL.GimpGradientFile', 'PIL.GimpPaletteFile', 'PIL.PaletteFile', 'PIL.GifImagePlugin', 'PIL.ImageSequence', 'PIL.JpegImagePlugin', 'PIL.TiffImagePlugin', 'distutils', 'imp', '_virtualenv_distutils', 'distutils.dist', 'distutils.errors', 'distutils.fancy_getopt', 'getopt', 'distutils.util', 'distutils.dep_util', 'distutils.spawn', 'distutils.debug', 'distutils.log', 'distutils.sysconfig', 'distutils.version', 'fractions', 'PIL.JpegPresets', 'PIL.PpmImagePlugin', 'PIL.PngImagePlugin', 'ocr4all_pixel_classifier.scripts', 'ocr4all_pixel_classifier.scripts.find_segments', 'ocr4all_pixel_classifier.lib.dataset', 'tqdm', 'tqdm._tqdm', 'tqdm._utils', 'tqdm._monitor', 'tqdm._tqdm_gui', 'tqdm._tqdm_pandas', 'tqdm._main', 'tqdm._version', 'skimage', 'skimage._shared', 'skimage._shared.version_requirements', 'skimage._shared.geometry', 'skimage.util', 'skimage.util.dtype', 'skimage.util.shape', 'skimage.util.noise', 'skimage.util.apply_parallel', 'skimage.util.arraycrop', 'skimage.util._regular_grid', 'skimage.util.unique', 'skimage.util._invert', 'skimage.util._montage', 'skimage.exposure', 'skimage.exposure.exposure', 'skimage.color', 'skimage.color.colorconv', 'scipy', 'scipy._distributor_init', 'scipy.__config__', 'scipy.version', 'scipy._lib', 'scipy._lib._testutils', 'scipy._lib._version', 'scipy._lib.six', 'scipy._lib._ccallback', 'scipy._lib._ccallback_c', 'scipy.linalg', 'scipy.linalg.linalg_version', 'scipy.linalg.misc', 'scipy.linalg.blas', 'scipy.linalg._fblas', 'scipy.linalg.lapack', 'scipy.linalg._flapack', 'scipy._lib._util', 'scipy.linalg.basic', 'scipy.linalg.flinalg', 'scipy.linalg._flinalg', 'scipy.linalg.decomp', 'scipy.linalg.decomp_svd', 'scipy.linalg._solve_toeplitz', '_cython_0_29', 'scipy.linalg.decomp_lu', 'scipy.linalg._decomp_ldl', 'scipy.linalg.decomp_cholesky', 'scipy.linalg.decomp_qr', 'scipy.linalg._decomp_qz', 'scipy.linalg.decomp_schur', 'scipy.linalg._decomp_polar', 'scipy.linalg.matfuncs', 'scipy.linalg.special_matrices', 'scipy.linalg._expm_frechet', 'scipy.linalg._matfuncs_sqrtm', 'scipy.linalg._solvers', 'scipy.linalg._procrustes', 'scipy.linalg._decomp_update', 'scipy.linalg.cython_blas', 'scipy.linalg.cython_lapack', 'scipy.linalg._sketches', 'numpy.dual', 'scipy.sparse', 'scipy.sparse.base', 'scipy._lib._numpy_compat', 'scipy.sparse.sputils', 'scipy.sparse.csr', 'scipy.sparse._sparsetools', 'scipy.sparse.compressed', 'scipy.sparse.data', 'scipy.sparse.dia', 'scipy.sparse.csc', 'scipy.sparse.lil', 'scipy.sparse._csparsetools', 'scipy.sparse.dok', 'scipy.sparse.coo', 'scipy.sparse.bsr', 'scipy.sparse.construct', 'scipy.sparse.extract', 'scipy.sparse._matrix_io', 'scipy.sparse.csgraph', 'scipy.sparse.csgraph._laplacian', 'scipy.sparse.csgraph._shortest_path', 'scipy.sparse.csgraph._validation', 'scipy.sparse.csgraph._tools', 'scipy.sparse.csgraph._traversal', 'scipy.sparse.csgraph._min_spanning_tree', 'scipy.sparse.csgraph._reordering', 'skimage.color.colorlabel', 'skimage._shared.utils', 'skimage._shared._warnings', 'skimage.color.rgb_colors', 'skimage.color.delta_e', 'skimage.exposure._adapthist', 'skimage.color.adapt_rgb', 'skimage.data', 'skimage.io', 'skimage.io.manage_plugins', 'configparser', 'skimage.io.collection', 'skimage.external', 'skimage.external.tifffile', 'skimage.external.tifffile.tifffile', 'xml.etree.cElementTree', 'skimage.external.tifffile._tifffile', 'skimage.io.sift', 'skimage.io._io', 'skimage.io.util', 'skimage.io._image_stack', 'skimage.io._plugins', 'skimage.io._plugins.imageio_plugin', 'imageio', 'imageio.core', 'imageio.core.util', 'imageio.core.findlib', 'imageio.core.fetching', 'imageio.core.request', 'imageio.core.format', 'imageio.core.functions', 'imageio.plugins', 'imageio.plugins.tifffile', 'imageio.plugins.pillow', 'imageio.plugins.pillow_info', 'imageio.plugins.pillowmulti', 'imageio.plugins.grab', 'imageio.plugins.freeimage', 'imageio.plugins._freeimage', 'imageio.plugins.freeimagemulti', 'imageio.plugins.ffmpeg', 'imageio.plugins.avbin', 'imageio.plugins.bsdf', 'imageio.plugins.dicom', 'imageio.plugins.npz', 'imageio.plugins.swf', 'imageio.plugins.feisem', 'imageio.plugins.fits', 'imageio.plugins.simpleitk', 'imageio.plugins.gdal', 'imageio.plugins.lytro', 'imageio.plugins.spe', 'imageio.plugins.example', 'skimage.io._plugins.matplotlib_plugin', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axes_grid1.axes_size', 'matplotlib', 'matplotlib.cbook', 'matplotlib.cbook.deprecation', 'matplotlib.rcsetup', 'matplotlib.fontconfig_pattern', 'pyparsing', 'matplotlib.colors', 'matplotlib._color_data', 'cycler', 'matplotlib._version', 'dateutil', 'dateutil._version']
12:43:35.595 DEBUG matplotlib - CACHEDIR=/home/kmw/.cache/matplotlib
12:43:35.597 DEBUG matplotlib.font_manager - Using fontManager instance from /home/kmw/.cache/matplotlib/fontlist-v300.json
2020-01-06 12:43:37.006899: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-01-06 12:43:37.028551: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2808000000 Hz
2020-01-06 12:43:37.029365: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x467a340 executing computations on platform Host. Devices:
2020-01-06 12:43:37.029415: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Host, Default Version
2020-01-06 12:43:40.181934: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 777216000 exceeds 10% of system memory.
WARNING: Logging before flag parsing goes to stderr.
I0106 12:43:41.974250 140659659847488 workspace.py:169] outputfile file_grp=OCR-D-SEG-BLOCK local_filename=OCR-D-SEG-BLOCK/OCR-D-SEG-BLOCK_0001.xml content=True
I0106 12:43:41.975078 140659659847488 ocrd_segmentation.py:64] INPUT FILE 1 / P_0020
I0106 12:43:41.975210 140659659847488 workspace.py:104] download_file <OcrdFile mimetype=image/png, ID=BIN_0020, url=OCR-D-IMG-BIN/BIN_0020.png, local_filename=OCR-D-IMG-BIN/BIN_0020.png]/>  [_recursion_count=0]
I0106 12:43:41.975327 140659659847488 resolver.py:44] directory=|/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data| url=|OCR-D-IMG-BIN/BIN_0020.png| basename=|BIN_0020.png| if_exists=|skip| subdir=|OCR-D-IMG-BIN|
I0106 12:43:41.975597 140659659847488 resolver.py:79] Stop early, src_path and dst_path are the same: '/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data/OCR-D-IMG-BIN/BIN_0020.png' (url: 'OCR-D-IMG-BIN/BIN_0020.png')
I0106 12:43:41.975831 140659659847488 PngImagePlugin.py:146] STREAM b'IHDR' 16 13
I0106 12:43:41.975937 140659659847488 PngImagePlugin.py:146] STREAM b'gAMA' 41 4
I0106 12:43:41.976009 140659659847488 PngImagePlugin.py:146] STREAM b'bKGD' 57 2
I0106 12:43:41.976082 140659659847488 PngImagePlugin.py:592] b'bKGD' 57 2 (unknown)
I0106 12:43:41.976184 140659659847488 PngImagePlugin.py:146] STREAM b'pHYs' 71 9
I0106 12:43:41.976250 140659659847488 PngImagePlugin.py:146] STREAM b'tIME' 92 7
I0106 12:43:41.976286 140659659847488 PngImagePlugin.py:592] b'tIME' 92 7 (unknown)
I0106 12:43:41.976325 140659659847488 PngImagePlugin.py:146] STREAM b'IDAT' 111 32768
I0106 12:43:41.976591 140659659847488 workspace.py:104] download_file <OcrdFile mimetype=image/png, ID=BIN_0020, url=OCR-D-IMG-BIN/BIN_0020.png, local_filename=OCR-D-IMG-BIN/BIN_0020.png]/>  [_recursion_count=0]
I0106 12:43:41.976669 140659659847488 resolver.py:44] directory=|/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data| url=|OCR-D-IMG-BIN/BIN_0020.png| basename=|BIN_0020.png| if_exists=|skip| subdir=|OCR-D-IMG-BIN|
I0106 12:43:41.976855 140659659847488 resolver.py:79] Stop early, src_path and dst_path are the same: '/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data/OCR-D-IMG-BIN/BIN_0020.png' (url: 'OCR-D-IMG-BIN/BIN_0020.png')
I0106 12:43:41.976987 140659659847488 PngImagePlugin.py:146] STREAM b'IHDR' 16 13
I0106 12:43:41.977063 140659659847488 PngImagePlugin.py:146] STREAM b'gAMA' 41 4
I0106 12:43:41.977128 140659659847488 PngImagePlugin.py:146] STREAM b'bKGD' 57 2
I0106 12:43:41.977201 140659659847488 PngImagePlugin.py:592] b'bKGD' 57 2 (unknown)
I0106 12:43:41.977276 140659659847488 PngImagePlugin.py:146] STREAM b'pHYs' 71 9
I0106 12:43:41.977352 140659659847488 PngImagePlugin.py:146] STREAM b'tIME' 92 7
I0106 12:43:41.977422 140659659847488 PngImagePlugin.py:592] b'tIME' 92 7 (unknown)
I0106 12:43:41.977461 140659659847488 PngImagePlugin.py:146] STREAM b'IDAT' 111 32768
I0106 12:43:41.977538 140659659847488 workspace.py:372] page 'P_0020' has orientation=0 skew=0.00
I0106 12:43:41.980490 140659659847488 PngImagePlugin.py:146] STREAM b'tEXt' 59238 37
I0106 12:43:41.980569 140659659847488 PngImagePlugin.py:146] STREAM b'tEXt' 59287 37
2020-01-06 12:43:45.122543: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 777216000 exceeds 10% of system memory.
/home/kmw/Documents/Work/OCR-D/env/lib/python3.6/site-packages/skimage/util/dtype.py:135: UserWarning: Possible precision loss when converting from int64 to float64
  .format(dtypeobj_in, dtypeobj_out))
I0106 12:43:46.888407 140659659847488 workspace.py:169] outputfile file_grp=OCR-D-SEG-BLOCK local_filename=OCR-D-SEG-BLOCK/OCR-D-SEG-BLOCK_0002.xml content=True
I0106 12:43:46.888986 140659659847488 workspace.py:197] Saving mets '/home/kmw/Documents/Work/OCR-D/ocrd-pixelclassifier-segmentation/test-workspace/data/mets.xml'

makefile: install must depend on deps

install must specify its dependencies. That's what the makefile is there for: encapsulate dependencies.

If you want to differentiate different installation options, use environment variables or GPU detection.

documentation: README completness, debug ocrd-tool.json

Please debug your ocrd_tool.json file.
I found an error:

<report valid="false">
  <error>NO ocrd-tool.json</error>
</report>

You can find the ocrd-tool.json documentation: https://ocr-d.github.io/ocrd_tool

Please check your README file and complet them. Your README is fine but look at your file and compare your's with the ideal README file.

# Name of application


## Introduction
...

## Installation
...

## Usage
...

## Testing
...

Thank you very much.

ValueError: Error when checking input: expected input_1 to have shape (None, None, 1) but got array with shape (3177, 2350, 2)

Error message: ValueError: Error when checking input: expected input_1 to have shape (None, None, 1) but got array with shape (3177, 2350, 2)

Images (850 MB): https://digi.ub.uni-heidelberg.de/diglitData/v/testset-5-zeitschr-ca-1870.zip

Almost complete log:

Exception: ocrd-pc-segmentation exited with non-zero return value 1. STDOUT:
b''
STDERR:
b'15:21:27.753 INFO processor.PixelClassifierSegmentation - INPUT FILE 0 / P_00001\n2020-08-28 15:21:45.422048: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA\n2020-08-28 15:21:45.561837: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2700000000 Hz\n2020-08-28 15:21:45.568756: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x99c25a0 executing computations on platform Host. Devices:\n2020-08-28 15:21:45.568799: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Host, Default Version\nTraceback (most recent call last):\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/bin/ocrd-pc-segmentation", line 8, in <module>\n    sys.exit(ocrd_pc_segmentation())\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/click/core.py", line 829, in __call__\n    return self.main(*args, **kwargs)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/click/core.py", line 782, in main\n    rv = self.invoke(ctx)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/click/core.py", line 1066, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/click/core.py", line 610, in invoke\n    return callback(*args, **kwargs)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd_pc_segmentation/cli.py", line 10, in ocrd_pc_segmentation\n    return ocrd_cli_wrap_processor(PixelClassifierSegmentation, *args, **kwargs)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd/decorators.py", line 102, in ocrd_cli_wrap_processor\n    run_processor(processorClass, ocrd_tool, mets, workspace=workspace, **kwargs)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd/processor/helpers.py", line 69, in run_processor\n    processor.process()\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd_pc_segmentation/ocrd_segmentation.py", line 108, in process\n    gpu_allow_growth, resize_height)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd_pc_segmentation/ocrd_segmentation.py", line 141, in _process_page\n    gpu_allow_growth=gpu_allow_growth,\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocr4all_pixel_classifier/scripts/find_segments.py", line 111, in predict_masks\n    return predictor.predict_masks(data)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocr4all_pixel_classifier/lib/predictor.py", line 66, in predict_masks\n    logit, prob, pred = self.network.predict_single_data(data)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocr4all_pixel_classifier/lib/network.py", line 256, in predict_single_data\n    image_to_batch(data.binary)])[0, :, :, :]\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 1135, in predict_on_batch\n    return training_v2_utils.predict_on_batch(self, x)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py", line 359, in predict_on_batch\n    x, extract_tensors_from_dataset=True)\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 2472, in _standardize_user_data\n    exception_prefix=\'input\')\n  File "/dwork/ocrd-schroot-ubuntu-eoan/usr/local/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_utils.py", line 574, in standardize_input_data\n    str(data_shape))\nValueError: Error when checking input: expected input_1 to have shape (None, None, 1) but got array with shape (3177, 2350, 2)\n'
Command exited with non-zero status 1

Workflow:

. /usr/local/ocrd_all/venv/bin/activate
export TMPDIR=/dwork/tmp
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ocrd-create-mets.xml
( /usr/bin/time ocrd process \
"olena-binarize -I OCR-D-IMG -O OCR-D-N1 -P impl wolf" \
"anybaseocr-crop -I OCR-D-N1 -O OCR-D-N2" \
"olena-binarize -I OCR-D-N2 -O OCR-D-N3 -P impl wolf" \
"cis-ocropy-denoise -I OCR-D-N3 -O OCR-D-N4 -P level-of-operation page" \
"cis-ocropy-deskew -I OCR-D-N4 -O OCR-D-N5 -P level-of-operation page" \
"pc-segmentation -I OCR-D-N5 -O OCR-D-N6" \
"cis-ocropy-deskew -I OCR-D-N6 -O OCR-D-N7 -P level-of-operation region" \
"cis-ocropy-clip -I OCR-D-N7 -O OCR-D-N8 -P level-of-operation region" \
"tesserocr-segment-line -I OCR-D-N8 -O OCR-D-N9" \
"cis-ocropy-clip -I OCR-D-N9 -O OCR-D-N10 -P level-of-operation line" \
"cis-ocropy-resegment -I OCR-D-N10 -O OCR-D-N11" \
"cis-ocropy-dewarp -I OCR-D-N11 -O OCR-D-N12" \
"calamari-recognize -I OCR-D-N12 -O OCR-D-OCR -P checkpoint /usr/local/ocrd_models/calamari/calamari_models-0.3/fraktur_19th_century/*.ckpt.json"

) >cmd.log 2>&1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.