You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to run ocrd-typegroups-classifier gives me this runtime error:
/test/data/1544_1$ ocrd-typegroups-classifier -I OCR-D-BIN -O OCR-D-TYPE -p '{"network": "/home/habocr/newinstallation/ocrd_all/ocrd_typegroups_classifier/ocrd_typegroups_classifier/models/classifier.tgc", "stride": 112}'
11:47:43.190 INFO ocrd_typegroups_classifier - Processing: 0 / P_bsb00028199_00013
Traceback (most recent call last):
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/bin/ocrd-typegroups-classifier", line 8, in <module>
sys.exit(cli())
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/ocrd_typegroups_classifier/cli/ocrd_cli.py", line 15, in cli
return ocrd_cli_wrap_processor(TypegroupsClassifierProcessor, *args, **kwargs)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/ocrd/decorators.py", line 102, in ocrd_cli_wrap_processor
run_processor(processorClass, ocrd_tool, mets, workspace=workspace, **kwargs)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/ocrd/processor/base.py", line 61, in run_processor
processor.process()
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/ocrd_typegroups_classifier/processor.py", line 41, in process
result = classifier.run(pil_image, stride)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/ocrd_typegroups_classifier/typegroups_classifier.py", line 125, in run
return self.classify(pil_image, stride, batch_size, score_as_key)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/ocrd_typegroups_classifier/typegroups_classifier.py", line 168, in classify
out = self.network(tensors)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/ocrd_typegroups_classifier/network/densenet.py", line 118, in forward
features = self.features(x)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 419, in forward
return self._conv_forward(input, self.weight)
File "/home/habocr/newinstallation/ocrd_all/venv/local/sub-venv/headless-torch14/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 416, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[32, 1, 224, 224] to have 3 channels, but got 1 channels instead
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
tried it again with RGB images, works perfectly fine now. thx for the hint! Could you please document in your Readme not to use binarized images as input?
Trying to run
ocrd-typegroups-classifier
gives me this runtime error:What am I doing wrong?
The text was updated successfully, but these errors were encountered: