Hi, I was very excited after the latest talk about the new ML library Nx by Jose.
When trying out the example neural network that he showed in the talk on my machine it worked fine however I wanted to test it out with my own images.
But the problem was that the neural network requires images of the format dx3-ubyte
which is the format of the MNIST dataset.
UByte is an 8-bit unsigned integral data type, with values ranging from 0 to 255 which is just the pixel value.
I was able to get an image in greyscale and resized and to the required 28*28 size via ImageMagick by
convert input.png -set colorspace Gray -separate -average -resize 28x28! output.png
However, I am not able to create the required dx3-ubyte
image binary to feed into the neural network. I saw some existing stuff like this one but I wish there was a way to do this in elixir.
I saw elixir implementations to parse png images by binary pattern matching but I have no idea how to get a dx3-ubyte
from the PNG.
I have very little knowledge of ML and image processing so I would love some help on this.