Mnisten
convert image files to mnist idx format
Install / Use
/learn @nyanp/MnistenREADME
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
#example
image files:
.\
|--foo
| |--a.bmp
| |--b.bmp
| +--1.txt
+--bar
|--c.bmp
|--d.bmp
+--buzz
+--e.bmp
- a and b.bmp => label 1
- c and d.bmp => label 0
- 1.txt and e.bmp => ignored
#usage
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|
#prerequisites
- OpenCV
- boost (boost/filesystem)
#build
make
or build vc/mnisten.sln
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
