Extended MNIST

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Guys, I looking at the file that contains the emnist labels but it looks like garbage?

 

Any suggestions?

This topic has a solution.
Last Edited: Thu. Feb 18, 2021 - 05:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ive never heard of this, is this what your talking about: http://yann.lecun.com/exdb/mnist/

if so then:

THE IDX FILE FORMAT

the IDX file format is a simple format for vectors and multidimensional matrices of various numerical types.

The basic format is

magic number
size in dimension 0
size in dimension 1
size in dimension 2
.....
size in dimension N
data

The magic number is an integer (MSB first). The first 2 bytes are always 0.

The third byte codes the type of the data:
0x08: unsigned byte
0x09: signed byte
0x0B: short (2 bytes)
0x0C: int (4 bytes)
0x0D: float (4 bytes)
0x0E: double (8 bytes)

The 4-th byte codes the number of dimensions of the vector/matrix: 1 for vectors, 2 for matrices....

The sizes in each dimension are 4-byte integers (MSB first, high endian, like in most non-Intel processors).

The data is stored like in a C array, i.e. the index in the last dimension changes the fastest.
 

so the first question is are you reading the data as big endian? 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

Last Edited: Wed. Feb 17, 2021 - 08:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll have to come back to this later.  but the file should display simple information saying if the character is 0... 9... A.. Z.. a.. b..

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay, I've found an example of the labels being used however I can't see how the labels are assigned.  Have a look at the link below, look at the first by-class example digits with there coresponding labels.  For example, for "f" we have the label, 41

 

by-class

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

0.. 9..
A = 10, B = 11, C = 12, D = 13, E = 14, F = 15, G = 16, H = 17, I = 18, J = 19, K = 20, L = 21, M = 22, N = 23, O = 24, P = 25, Q = 26,
R = 27, S = 28, T = 29, U = 30, V = 31, W = 32, X = 33, Y = 34, Z = 35

 

a = 36, b = 37, c = 38, d = 39, e = 40, f = 41, g = 42, h = 43, i = 44, j = 45, k = 46, l = 47, m = 48, n = 49, o = 50, p = 51, q = 52,
r = 52, s = 53, t = 54, u = 55, v = 56, w = 57, x = 58, y = 59, z = 60

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

You need one of these...

 

 

cheeky

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That was easy to implement.  I only had to tell the mnist artificial neural network that the output layer is 62 cells and load the mnist files...

 

Oh, in case your wondering I wrote the whole system.  no libraries.