Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Remove ImageNetDataset and update ImagePathDataset #494

Closed

Conversation

mannatsingh
Copy link
Contributor

Summary:
The ImageNetDataset was just a subset of ImagePathDataset, got rid of it. Improved the API of ImagePathDataset and made it a registered component which can be built. Improved the associated test cases as well.

Copied from the docstring -

        Only one of image_folder or image_files should be passed to specify the images.

            image_folder: A directory with one of the following structures -
                - A directory containing sub-directories with images for each target,
                    which is the format expected by
                    :class:`torchvision.datasets.ImageFolder` -

                    dog/xxx.png
                    dog/xxy.png
                    cat/123.png
                    cat/nsdf3.png

                    In this case, the targets are inferred from the sub-directories.
                - A directory containing images -

                    123.png
                    xyz.png

                    In this case, the targets are not returned (useful for inference).
            image_files: A list of image files -

                [
                    "123.png",
                    "dog/xyz.png",
                    "/home/cat/aaa.png"
                ]

                In this case, the targets are not returned (useful for inference).

Differential Revision: D21220201

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Apr 24, 2020
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D21220201

)

Summary:
Pull Request resolved: facebookresearch#494

The `ImageNetDataset` was just a subset of `ImagePathDataset`, got rid of it. Improved the API of `ImagePathDataset` and made it a registered component which can be built. Improved the associated test cases as well.

Copied from the docstring -

```
        Only one of image_folder or image_files should be passed to specify the images.

            image_folder: A directory with one of the following structures -
                - A directory containing sub-directories with images for each target,
                    which is the format expected by
                    :class:`torchvision.datasets.ImageFolder` -

                    dog/xxx.png
                    dog/xxy.png
                    cat/123.png
                    cat/nsdf3.png

                    In this case, the targets are inferred from the sub-directories.
                - A directory containing images -

                    123.png
                    xyz.png

                    In this case, the targets are not returned (useful for inference).
            image_files: A list of image files -

                [
                    "123.png",
                    "dog/xyz.png",
                    "/home/cat/aaa.png"
                ]

                In this case, the targets are not returned (useful for inference).
```

Reviewed By: vreis

Differential Revision: D21220201

fbshipit-source-id: a0b73b2bb7a88333facfe4a24faab2cfae629e73
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D21220201

facebook-github-bot pushed a commit that referenced this pull request Apr 27, 2020
Summary:
Pull Request resolved: #494

The `ImageNetDataset` was just a subset of `ImagePathDataset`, got rid of it. Improved the API of `ImagePathDataset` and made it a registered component which can be built. Improved the associated test cases as well.

Copied from the docstring -

```
        Only one of image_folder or image_files should be passed to specify the images.

            image_folder: A directory with one of the following structures -
                - A directory containing sub-directories with images for each target,
                    which is the format expected by
                    :class:`torchvision.datasets.ImageFolder` -

                    dog/xxx.png
                    dog/xxy.png
                    cat/123.png
                    cat/nsdf3.png

                    In this case, the targets are inferred from the sub-directories.
                - A directory containing images -

                    123.png
                    xyz.png

                    In this case, the targets are not returned (useful for inference).
            image_files: A list of image files -

                [
                    "123.png",
                    "dog/xyz.png",
                    "/home/cat/aaa.png"
                ]

                In this case, the targets are not returned (useful for inference).
```

Reviewed By: vreis

Differential Revision: D21220201

fbshipit-source-id: e3249576e778738fc14a70bd098ad1a24342bd79
@mannatsingh mannatsingh deleted the export-D21220201 branch June 29, 2020 21:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants