Firstly, many thanks to gskielian for getting it to work with Python 2.7 https://github.com/gskielian/JPG-PNG-to-MNIST-NN-Format
pip install pillow1. MNIST requires train and test files to be classified under folder names: 0,1,2...
2. To resize images use the following bash script resize-script.sh (use https://github.com/gskielian/JPG-PNG-to-MNIST-NN-Format/blob/master/resize-script.sh)
3. Run python main.py -h to get help. Results look as follows:
4. Run python main.py -m ./ -r training-images -e test-images Results look as follows when converting PNG to MNIST:
MainFolder
βββ test-images (testfolder)
β βββ 0
β β βββ img00.png
β β βββ img01.png
β βββ 1
β β βββ img10.png
β β βββ img11.png
β βββ 2
β β βββ img20.png
β β βββ img21.png
βββ training-images (trainfolder)
βββ 0
β βββ img00.png
β βββ img01.png
βββ 1
β βββ img10.png
β βββ img11.png
βββ 2
βββ img20.png
βββ img21.png

