Alexandre Brown
05/03/2022, 7:00 PMtransformTensor
op that could be done after the rescale for instance ?
I can contribute but want to know if you already did it for 0.4 first.Julia Beliaeva
05/03/2022, 9:34 PMnormalize
preprocessor. See https://github.com/Kotlin/kotlindl/issues/204 and the example usage in https://github.com/Kotlin/kotlindl/blob/master/examples/src/main/kotlin/examples/dataset/NormalizeExample.ktAlexandre Brown
05/03/2022, 9:41 PMJulia Beliaeva
05/03/2022, 9:48 PMAlexandre Brown
05/03/2022, 9:50 PMImageConverter.toBufferedImage(File(imagePath).inputStream()).type
Julia Beliaeva
05/03/2022, 9:52 PMJulia Beliaeva
05/03/2022, 9:54 PMis the image type from buffered image type the right place to check if the image is BGR?Yes. Btw, KotlinDL now also has a
convert
image preprocessor to convert image format (currently, between rgb, bgr and grayscale).Alexandre Brown
05/03/2022, 9:58 PMconvert
preprocessor, Thanks a lot @Julia Beliaeva !!Julia Beliaeva
05/03/2022, 11:00 PMImageIO
always have BGR order. It's controlled by this constant com.sun.imageio.plugins.jpeg.JPEG#bOffsRGB
which is set to { 2, 1, 0 }
.Alexandre Brown
05/10/2022, 9:58 PMnormalize
and convert
ops to our existing kotlinDL preprocessing and it worked amazingly well.
Thanks again for your reply.
@Julia Beliaeva @zaleslaw Keep up the good work on KotlinDL we're in love with the lib so far.