How do I import an "idx3-ubyte" file?

edited September 2018 in How To...

I am wondering how to import the files found on this website into Processing: http://yann.lecun.com/exdb/mnist/

They're supposed to contain thousands of 28x28 byte arrangements, each with its own "grayscale" value. In essence, they're images. But the files don't have a .dat extension, an extension I've learned to use thanks to the following tutorial: https://processing.org/reference/saveBytes_.html

I don't know what an .idx3-ubyte extension is and how to import it into an arbitrary Processing array correctly, and the Java guides I found online didn't help either, as the usual Processing code that I'm familiar with looks nothing like those chunks of code.

I also don't know how the bytes are structured inside the file, although I would assume the first 784 (28*28) bytes would correspond to the first supposed image, going left to right, downwards, and the next 784 would correspond to the second image, and so on.

Even figuring out how to convert this into a .dat file would help, as I am able to import those into and out of Processing easily.

Tagged:

Answers

Sign In or Register to comment.