Skip to content

Crop or Pad transform. #562

Closed
Closed
@ryanpeach

Description

@ryanpeach

So, tensorflow has a transform function called resize_image_with_crop_or_pad. I recently needed this function for my own work. Moreover, it'd be nice to have all of the following:

  • RandomPad - Makes an image a certain size by padding but performs random offset on the padding.
  • CenterCropOrPad - Replicates Tensorflows function
  • RandomCropOrPad - A conditional mix of RandomCrop and RandomPad, guaranteeing size but w random offset.

If I put in a pull request would you be open to these methods?

What are the standards for writing transforms?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions