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 Normalize image preprocessor #204

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

Add Normalize image preprocessor #204

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

Comments

@zaleslaw
Copy link
Collaborator

zaleslaw commented Aug 26, 2021

The Normalize image preprocessor is missed in KotlinDL.
Normalize a tensor image with mean and standard deviation. This transform does not support PIL Image. Given mean: (mean1,...,mean[n]) and std: (std1,..,std[n]) for n channels, this transform will normalize each channel of the input torch.*Tensor i.e., output[channel] = (input[channel] - mean[channel]) / std[channel]

The main question is: should it be image preprocessing or tensor preprocessing thing and also could it be implemented with multik library (Kotlin analogue of NumPy).

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.
P.P.P.S. First usage of Multik will be merged in the ONNX PR during next week

The reference implementation could be taken from torchvision.transforms

@zaleslaw
Copy link
Collaborator Author

@juliabeliaeva could you have a look at this issue?

@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
@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