Introduction
Classify 5 kind of flowers which are daisy, tulip, rose, sunflower, and dandelion with convolutional neural network. I got the datasets from https://www.kaggle.com/alxmamaev/flowers-recognition. I use Keras VGG16, Xception, Resnet50, and InceptionV3 as pre-trained model and deploying it in browser.
How to deploy
- First, you must have Tensorflow, Keras, and Flask.
- Download weight and json file here.
- Make weight and json folder in the root folder and put the weights and json files there.
- Open a terminal in this folder.
- run
python app.y
. - Open your browser and go to
http://0.0.0.0:5000/
. - Click
choose file
to input the image that you want to classify andpredict
button to display the result of model prediction.
Train your own model!
- First, download the datasets.
- Split training set and test set to this kind folder structure :
/datasets /training_set /daisy /sunflower /tulip /rose /dandelion /test_set /daisy /sunflower /tulip /rose /dandelion
- Open
{model name}_model.py
, you can choose the base model as you like, and edit theCNN
part. - run edited python file in terminal. After the training process, it should appear weight and json file named according to the base model.
- Move them into the weight and json folder .
Contact me
if you have any question, email me for fast response.
email : fahrudinhasby12@gmail.com
facebook : https://www.facebook.com/hasby.fahrudin