LeNet Training & Inference for MNIST dataset on DarkNet.
- DarkNet built
pip install opencv-pythonpip install numpy
python download_and_convert_mnist.py
- Copy the contents of
cfgfolder in this repo todarknet/cfg - Move
mnist_imagesfolder todarknet/data/folder - Then,
cd darknet/data/mnist_images
find `pwd`/train -name \*.png > train.list
find `pwd`/test -name \*.png > test.list
cd ../..
./darknet classifier train cfg/mnist.data cfg/mnist_lenet.cfg
./darknet classifier valid cfg/mnist.data cfg/mnist_lenet.cfg backup/mnist_lenet.backup
./darknet classifier predict cfg/mnist.data cfg/mnist_lenet.cfg backup/mnist_lenet.weights data/mnist_images/test/<image_name>.png
https://pjreddie.com/darknet/train-cifar/
https://github.com/ashitani/darknet_mnist