PICK-pytorch
PICK-pytorch copied to clipboard
ZeroDivisionError while running test.py
Hi everyone,
I am facing ZeroDivisionError while running test.py. Here is the error:
2021-03-01 06:43:06.797786: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
Loading checkpoint: /content/drive/MyDrive/Pick.Pytorch.Sroie/saved/models/PICK_Default/test_0227_063059/model_best.pth
with saved mEF 0.8032 ...
boxes_and_transcripts_folder /content/drive/MyDrive/test_boxes_and_transcripts
100it [02:42, 1.62s/it]
Traceback (most recent call last):
File "/content/drive/MyDrive/Pick.Pytorch.Sroie/test.py", line 104, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/content/drive/MyDrive/Pick.Pytorch.Sroie/data_utils/pick_dataset.py", line 115, in getitem image_index=index, training=self.training) File "/content/drive/MyDrive/Pick.Pytorch.Sroie/data_utils/documents.py", line 169, in init raise RuntimeError('Error occurs in image {}: {}'.format(boxes_and_transcripts_file.stem, e.args)) RuntimeError: Error occurs in image X51006008092: ('float division by zero',)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in