https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0b2c6137-95f9-40f5-96fd-1f46c9ec4ac1/Untitled.png

The MNIST is a dataset of handwritten digits, comprising 60000 training examples and 10 000 test examples. The dataset can be downloaded from : http://yann.lecun.com/exdb/mnist/

MNIST data is provided in binary file for user convenience.

But, in my case, this binary type is more complicated.

So I converted those as jpeg.

Here is MATLAB source code how I converted:

%%
clc;
clear all;

% Change the filenames if you've saved the files under different names
% On some platforms, the files might be saved as 
% train-images.idx3-ubyte / train-labels.idx1-ubyte

images = loadMNISTImages('t10k-images.idx3-ubyte');
labels = loadMNISTLabels('t10k-labels.idx1-ubyte');

%images = loadMNISTImages('train-images.idx3-ubyte');
%labels = loadMNISTLabels('train-labels.idx1-ubyte');

 
% We are using display_network from the autoencoder code
display_network(images(:,1:60000)); % Show the first 100 images
disp(labels(1:1));

% save one digit number to jpg file
%{
[w h]=size(images)
endIndex = h;

dindex=zeros(10,1);
for j=1:endIndex
    aImg = reshape( images(:,j), 28, 28);
    imshow(aImg);
    
    label = labels(j);
    dindex( label+1 ) = dindex( label+1 ) +1;
    dataD = strcat('./data2/mnist_', num2str( label ), '_', num2str( dindex(label+1) ), '.jpg' );
    
    %dindex
    imwrite(aImg, dataD);
    dataD
end

fileID = fopen('test.txt','w');
%make path and label
dindex=zeros(10,1);
for j=1:endIndex
    
    label = labels(j);
    dindex( label+1 ) = dindex( label+1 ) +1;
    dataD = strcat('/data2/mnist_', num2str( label ), '_', num2str( dindex(label+1) ), '.jpg' );
    fprintf(fileID,'%s %d\\n',dataD, label);    
end
fclose(fileID);
%}

👇 Download from here

MNIST jpeg data, 24x24, 70000

Hosted at Hostnotion – custom domains for Notion