Shortcuts

ConcatDataset

class mmocr.datasets.ConcatDataset(datasets, pipeline=[], verify_meta=True, force_apply=False, lazy_init=False)[source]

A wrapper of concatenated dataset.

Same as torch.utils.data.dataset.ConcatDataset and support lazy_init.

Note

ConcatDataset should not inherit from BaseDataset since get_subset and get_subset_ could produce ambiguous meaning sub-dataset which conflicts with original dataset. If you want to use a sub-dataset of ConcatDataset, you should set indices arguments for wrapped dataset which inherit from BaseDataset.

Parameters
  • datasets (Sequence[BaseDataset] or Sequence[dict]) – A list of datasets which will be concatenated.

  • pipeline (list, optional) – Processing pipeline to be applied to all of the concatenated datasets. Defaults to [].

  • verify_meta (bool) – Whether to verify the consistency of meta information of the concatenated datasets. Defaults to True.

  • force_apply (bool) – Whether to force apply pipeline to all datasets if any of them already has the pipeline configured. Defaults to False.

  • lazy_init (bool, optional) – Whether to load annotation during instantiation. Defaults to False.

Read the Docs v: dev-1.x
Versions
latest
stable
v1.0.1
v1.0.0
0.x
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.