calamari-predict: Exception, when prediction is 0%
stefanCCS opened this issue · 3 comments
stefanCCS commented
Version 2.1.5
It looks like that calamari-predict
raises an exception, when a prediction value of 0% is recognized:
Prediction: 0%| | 0/13 [00:00<?, ?it/s]2022-02-24 13:18:22.349295: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2022-02-24 13:18:22.349663: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2394370000 Hz
WARNING 2022-02-24 13:18:24,319 tfaip.util.multiprocessing.dat: Invalid data. Skipping for the 1. time.
Prediction: 0%| | 0/13 [00:02<?, ?it/s]
CRITICAL 2022-02-24 13:18:24,660 tfaip.util.logging: Uncaught exception
Traceback (most recent call last):
File "/home/calamariadmin/calamari_venv_37/bin/calamari-predict", line 8, in <module>
sys.exit(main())
File "/home/calamariadmin/calamari_venv_37/lib/python3.7/site-packages/calamari_ocr/scripts/predict.py", line 188, in main
run(args.root)
File "/home/calamariadmin/calamari_venv_37/lib/python3.7/site-packages/calamari_ocr/scripts/predict.py", line 175, in run
logger.info("Average sentence confidence: {:.2%}".format(avg_sentence_confidence / n_predictions))
ZeroDivisionError: division by zero
==> Please check ...
andbue commented
Already there since yesterday evening: https://pypi.org/project/calamari-ocr/2.2.1/