This is a flower classifier for the kaggle competition. The best accuracy is currently 85%.
boto, boto3, botocore, numpy, pillow, tensorflow (1.4.0)
sh requirements.sh
python download.py
- Download flower images from the link: https://www.kaggle.com/alxmamaev/flowers-recognition
- Download vgg16_weights.npz from https://www.cs.toronto.edu/~frossard/post/vgg16/
- Move it under the depository folder
- Resize and split the image data into training and testing set. Create the corresponding TFRecord to reduce RAM requirement
python build_TFRecord.py --mode [train, test] \
--partition_size [1000]
python main.py --train True \
--test False \
--epoch number_epoch_to_be_trained \
--learning_rate learning_rate_in_training \
--checkpoint_dir directory_to_save_model
python main.py --train False \
--test True \
--epoch number_epoch_to_be_trained \
--learning_rate learning_rate_in_training \
--checkpoint_dir model_directory
python main.py --input_images_dir input_images'_directory \
--checkpoint_dir model_directory
--input_images_dir flag can receive a directory as well as the path to a single image.
Have fun with flowers!