Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CenterCrop image preprocessor #201

Closed
4 tasks
zaleslaw opened this issue Aug 26, 2021 · 2 comments · Fixed by #258
Closed
4 tasks

Add CenterCrop image preprocessor #201

zaleslaw opened this issue Aug 26, 2021 · 2 comments · Fixed by #258
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@zaleslaw
Copy link
Collaborator

zaleslaw commented Aug 26, 2021

The CenterCrop image preprocessor is missed in KotlinDL.
It should crop the given image at the center. If the image size is smaller than the output size along any edge, the image is padded with 0 and then center cropped.

The main question is: should we keep both Cropping and CenterCrop ops, or should it be merged in one operation?

The desired PR addressing this issue should include:

  • Implementation (you can take inspiration from the implementation of Cropping as reference)
  • Documentation
  • JUnit tests in dataset module
  • An example with usage of this image preprocessor

P.S. If you want to take this ticket, please leave the comment below
P.P.S Read the Contributing Guidelines.

The reference implementation could be taken from torchvision.transforms

@zaleslaw zaleslaw added the enhancement New feature or request label Aug 26, 2021
@zaleslaw zaleslaw added this to the 0.4 milestone Aug 26, 2021
@zaleslaw
Copy link
Collaborator Author

@juliabeliaeva could you have a look at this ticket?

@juliabeliaeva
Copy link
Contributor

@zaleslaw yes, assign this issue to me, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants