Skip to content
Web Application implementing flower classification on the dataset from http://www.robots.ox.ac.uk/~vgg/data/flowers/102/
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__pycache__
app
README.md
cat_to_name.json
flower.py
requirements.txt
res_net_best.ipynb

README.md

Flower Identification Web Application using Flask

List of contents

Introduction


(Back to top)

This Web application implements the GUI for flower classification on the dataset from http://www.robots.ox.ac.uk/~vgg/data/flowers/102/ coded in Pytorch. It involves classification of flowers into 102 categories occuring mostly in United Kingdom. It is done as a part of Pytorch Deep Learning scholarship challenge lab project.

Following is an image collage showing the images present in the datasets.

img

Working


(Back to top)

The step-by-step procedure of the Project:

  • Collection of dataset from the link mentioned at the top;
  • Data preprocessing: Augmentation being applied to train set;
  • Training the classifier part of the model Densenet121 pretrained on Imagenet;
  • The model built scores 98.3% on the validation set;
  • Saving the checkpoint containing the models parameteres;
  • Building a Flask Application using the inference from pretrained model;

NOTE : The whole Machine Learning pipeline is implemented in the jupyter notebook provided in the repository.

Installation


(Back to top)

These instructions assume you have git installed for working with Github from command window.

  1. Clone the repository, and navigate to the downloaded folder. Follow below commands.
git clone https://github.com/pswaldia/Flower_identification
cd Flower_identification

  1. Creating python virtual environment using virtualenv package using following lines of code.

NOTE: For this step make sure you have virtualenv package installed.

virtualenv venv
source venv/bin/activate

  1. Install few required pip packages, which are specified in the requirements.txt file .
pip3 install -r requirements.txt

Running


(Back to top)

Run the following code:

flask run

Now copy the URL of the local host that will appear on your terminal and run it in browser.

Home Page:

img

Prediction Page

img6

You can’t perform that action at this time.