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 Grayscale image preprocessor #202

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

Add Grayscale image preprocessor #202

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

Comments

@zaleslaw
Copy link
Collaborator

The Grayscale image preprocessor is missed in KotlinDL.
Convert image to grayscale.

The main question is: should we keep the ImageShape with 3 channels or with 1 channel? Or support the difference via parameter like in PyTorch

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 this to the 0.4 milestone Aug 26, 2021
@zaleslaw zaleslaw added the enhancement New feature or request label 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.

@juliabeliaeva
Copy link
Contributor

should we keep the ImageShape with 3 channels or with 1 channel?

Since currently BufferredImage is used for image preprocessing, in my PR I use BufferedImage.TYPE_BYTE_GRAY and return images with one channel. If we migrate to something else, we could think about supporting 3 channels for grayscale images.

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