Skip to content

[Feature Request] Make dataset support __add__ #1759

@acgtyrant

Description

@acgtyrant

I want to concat the PASCAL VOC 2007 train dataset and PASCAL VOC 2007 val dataset, but COCO only offer two individual JSON for them. I have to create two dataset instances for them and concate them.

However, itertools.chain does not work while it does not have __len__ method. So I have to use a wrapper class to concate them.

If dataset class support __add__, then it is so convenient that we can use trainval_dataset = train_dataset + val_dataset immediately.

If you agree, I will make the pull request later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions