This software generates Fashion-MNIST-Train Data For YOLO. (forked from https://github.com/uchidama/MNIST-TrainDataForYOLO, which generates MNIST-Train Data)
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
- generat Fashion-MNIST images and labels.
python fashion_mnist_to_jpg_and_label.py
- generate train.txt and test.txt
python generate_train_txt_and_test_txt.py
- Copy files to darknet
cp cfg/tiny-yolo-fashion-mnist.cfg <darknet_dir>/cfg
cp cfg/voc-fashion-mnist.data <darknet_dir>/cfg
cp data/voc-fashion-mnist.names <darknet_dir>/data
- Modify train and test data path. Edit <darknet_dir>/cfg/voc-fashion-mnist.data
train = <path-to-fashion-mnist-train>/train.txt
valid = <path-to-fashion-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-fashion-mnist.data cfg/tiny-yolo-fashion-mnist.cfg darknet19_448.conv.23
./darknet detector test <data file> <cfg file> <weights> <predict image>
ex. command.
./darknet detector test cfg/voc-fashion-mnist.data cfg/tiny-yolo-fashion-mnist.cfg weights/tiny-yolo-fashion-mnist_500000.weights ~/Fashion-MNIST-TrainDataForYOLO/JPEGImages/60015.jpg