Skip to content

maxi-marufo/Fashion-MNIST-TrainDataForYOLO

 
 

Repository files navigation

Fashion-MNIST-Train Data For YOLO

This software generates Fashion-MNIST-Train Data For YOLO. (forked from https://github.com/uchidama/MNIST-TrainDataForYOLO, which generates MNIST-Train Data)

Installation

Install Keras

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

Install Darknet YOLO

git clone https://github.com/pjreddie/darknet
cd darknet
make

How to use

Generate Fashion-MNIST Train Data

  1. generat Fashion-MNIST images and labels.
python fashion_mnist_to_jpg_and_label.py
  1. generate train.txt and test.txt
python generate_train_txt_and_test_txt.py

Training YOLO on Fashion-MNIST

  1. 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
  1. 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
  1. Download Pretrained Convolutional Weights
cd <darknet_dir>
wget https://pjreddie.com/media/files/darknet19_448.conv.23
  1. Make directory to save trained model.
mkdir backup
  1. Train The Model
./darknet detector train cfg/voc-fashion-mnist.data cfg/tiny-yolo-fashion-mnist.cfg darknet19_448.conv.23

Predict Fashion-MNIST test data

./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

License

MIT

Link

YOLO: Real-Time Object Detection

About

Make Fashion-MNIST train data for YOLO.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%