Skip to content

RandomCrop transform msssing one offset position #68

@donlzx

Description

@donlzx

RandomCrop returns uneven cropping for small images (e.g. MNIST and CIFAR-10/100), thus yielding sub-optimal performance in training.

For example, cropping 32x32 images from 36x36 images should have bound offsets [0, 1, 2, 3, 4]. However, currently only [0, 1, 2, 3] is used.

Here are 20 images generated using RandomCrop with DataAugmentation v0.2.8. The original images (32x32 in size) are padded by 2 pixels on each edge, randomly cropped to 32x32, and then up-sampled to 128x128 for display.

The left and top edges of the images are randomly padded by either 0/1/2 pixels, while the right edges are only paded by 0/1 pixels.

randcrop_before

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions