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
When training svtr,use dataset :Each image sample should have one text annotation only,get :Each image sample should have one text annotation only
#2037
Open
2 tasks done
Dark1Forest opened this issue
Apr 12, 2024
· 0 comments
Traceback (most recent call last):
File "/mnt/project/mmocr/tools/train.py", line 114, in
main()
File "/mnt/project/mmocr/tools/train.py", line 110, in main
runner.train()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/runner.py", line 1777, in train
model = self.train_loop.run() # type: ignore
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 96, in run
self.run_epoch()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 111, in run_epoch
for idx, data_batch in enumerate(self.dataloader):
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 628, in next
data = self._next_data()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1333, in _next_data
return self._process_data(data)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1359, in _process_data
data.reraise()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/_utils.py", line 543, in reraise
raise exception
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/dataset/dataset_wrapper.py", line 171, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/dataset/base_dataset.py", line 410, in getitem
data = self.prepare_data(idx)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/dataset/base_dataset.py", line 793, in prepare_data
return self.pipeline(data_info)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/dataset/base_dataset.py", line 60, in call
data = t(data)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmcv/transforms/base.py", line 12, in call
return self.transform(results)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmocr/datasets/transforms/formatting.py", line 202, in transform
assert len(
AssertionError: Each image sample should have one text annotation only
Additional information
WildReceiptDataset
The text was updated successfully, but these errors were encountered:
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
main branch https://github.com/open-mmlab/mmocr
Environment
Package Version
addict 2.4.0
asynctest 0.13.0
attrs 23.2.0
boto3 1.34.79
botocore 1.34.79
certifi 2024.2.2
charset-normalizer 3.3.2
clearml 1.15.0
click 8.1.7
codecov 2.1.13
colorama 0.4.6
contourpy 1.2.1
coverage 7.4.4
cycler 0.12.1
exceptiongroup 1.2.0
flake8 7.0.0
fonttools 4.51.0
furl 2.1.3
idna 3.6
imageio 2.34.0
imgaug 0.4.0
importlib_metadata 7.1.0
iniconfig 2.0.0
interrogate 1.5.0
isort 5.13.2
jmespath 1.0.1
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
kiwisolver 1.4.5
kwarray 0.6.18
lanms_neo 1.0.2
lazy_loader 0.4
lmdb 1.4.1
markdown-it-py 3.0.0
matplotlib 3.8.4
mccabe 0.7.0
mdurl 0.1.2
mmcv 2.0.1
mmdet 3.1.0
mmengine 0.10.3
mmocr 1.0.1
networkx 3.3
numpy 1.26.4
opencv-python 4.9.0.80
orderedmultidict 1.0.1
packaging 24.0
parameterized 0.9.0
pathlib2 2.3.7.post1
pillow 10.3.0
pip 23.3.1
platformdirs 4.2.0
pluggy 1.4.0
psutil 5.9.8
py 1.11.0
pyclipper 1.3.0.post5
pycocotools 2.0.7
pycodestyle 2.11.1
pyflakes 3.2.0
Pygments 2.17.2
PyJWT 2.8.0
pyparsing 3.1.2
pytest 8.1.1
pytest-cov 5.0.0
pytest-runner 6.0.1
python-dateutil 2.9.0.post0
PyYAML 6.0.1
rapidfuzz 3.8.0
referencing 0.34.0
requests 2.31.0
rich 13.7.1
rpds-py 0.18.0
s3transfer 0.10.1
scikit-image 0.22.0
scipy 1.13.0
setuptools 68.2.2
shapely 2.0.3
six 1.16.0
tabulate 0.9.0
termcolor 2.4.0
terminaltables 3.1.10
tifffile 2024.2.12
toml 0.10.2
tomli 2.0.1
torch 1.13.1+cu117
torchaudio 0.13.1+cu117
torchvision 0.14.1+cu117
tqdm 4.66.2
typing_extensions 4.11.0
ubelt 1.3.5
urllib3 2.2.1
wheel 0.41.2
xdoctest 1.1.3
yapf 0.40.2
zipp 3.18.1
Reproduces the problem - code sample
Reproduces the problem - command or script
Reproduces the problem - error message
Traceback (most recent call last):
File "/mnt/project/mmocr/tools/train.py", line 114, in
main()
File "/mnt/project/mmocr/tools/train.py", line 110, in main
runner.train()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/runner.py", line 1777, in train
model = self.train_loop.run() # type: ignore
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 96, in run
self.run_epoch()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 111, in run_epoch
for idx, data_batch in enumerate(self.dataloader):
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 628, in next
data = self._next_data()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1333, in _next_data
return self._process_data(data)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1359, in _process_data
data.reraise()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/_utils.py", line 543, in reraise
raise exception
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/dataset/dataset_wrapper.py", line 171, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/dataset/base_dataset.py", line 410, in getitem
data = self.prepare_data(idx)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/dataset/base_dataset.py", line 793, in prepare_data
return self.pipeline(data_info)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/dataset/base_dataset.py", line 60, in call
data = t(data)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmcv/transforms/base.py", line 12, in call
return self.transform(results)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmocr/datasets/transforms/formatting.py", line 202, in transform
assert len(
AssertionError: Each image sample should have one text annotation only
Additional information
WildReceiptDataset
The text was updated successfully, but these errors were encountered: