# MNIST-Train Data For YOLO
This software generats MNIST-Train Data For YOLO.
This software using Keras.
If you want to run without to think keras and backend deeplearning frameworks, enter this command.
pip install tensorflow
pip install keras
git clone https://github.com/pjreddie/darknet
cd darknet
make
python mnist_to_jpg_and_label.py
python generate_train_txt_and_test_txt.py
Copy files to darknet
cp cfg/tiny-yolo-mnist.cfg <darknet_dir>/cfg
cp cfg/voc-mnist.data <darknet_dir>/cfg
cp data/voc-mnist.names <darknet_dir>/data
Modify train and test data path. Edit
train = <path-to-mnist-train>/train.txt
valid = <path-to-mnist-test>/test.txt
Download Pretrained Convolutional Weights
cd <darknet_dir>
wget https://pjreddie.com/media/files/darknet19_448.conv.23
Make directory to save trained model.
mkdir backup
Train The Model
./darknet detector train cfg/voc-mnist.data cfg/tiny-yolo-mnist.cfg darknet19_448.conv.23
./darknet detector test <data file> <cfg file> <weights> <predict image>
ex. command.
./darknet detector test cfg/voc-mnist.data cfg/tiny-yolo-mnist.cfg weights/tiny-yolo-mnist_500000.weights ~/MNIST-TrainDataForYOLO/JPEGImages/60015.jpg
weights/tiny-yolo-mnist_500000.weights