convert image files to mnist idx format
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
include second commit May 8, 2015
src add --without-shuffle option to create idx without shuffling #5 Jan 17, 2016
vc second commit May 8, 2015
.gitattributes 🎪 Added .gitattributes & .gitignore files May 7, 2015
.gitignore first commit May 7, 2015 Update Jan 17, 2016
makefile add makefile May 9, 2015

mnisten : image files to idx format converter

mnisten is a library to convert image files to idx format binaries.

  • assign label id automatically by directory-name (lexicographical order)
  • auto resizing
  • random-shuffling
  • generate train/test file


image files:

|   |--a.bmp
|   |--b.bmp
|   +--1.txt
  • a and b.bmp => label 1
  • c and d.bmp => label 0
  • 1.txt and e.bmp => ignored


mnisten -d .\ -o prefix -s 32x24

then create:

  • prefix_train_images.idx3
  • prefix_train_labels.idx1
  • label.txt
    • log directory-name => label-id
option parameters meaning required default
--dir,-d directory-name(string) root directory of images yes -
--output,-o prefix(string) prefix of output idx files no ""
--num-tests,-n num(int) number of test data (if 0, all images are treated as training data) no 0
--size,-s WxH(string) size of each image data no 32x32
--without-shuffle,-w (none) disable data shuffling no false


  • OpenCV
  • boost (boost/filesystem)



or build vc/mnisten.sln