Skip to content

VincentLu91/airplanes_or_cars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airplanes or Automobiles

Docker/Flask version of application deployed on Heroku: https://github.com/VincentLu91/airplanes-or-cars-docker-flask

About the Project

The simple binary image classification application distinguishes between two popular types of transport: airplanes or autombiles.

It uses a VGG16 pre-trained model from the Keras library and replaces the fully connected layers of the trained VGG model with the new classifier part to interpret the output with a stochastic gradient descent optimizer. As well, the classification app runs a test harness to estimate the performance of the custom-trained model.

The application is written in streamlit for the front-end. Accompanying libraries include Pillow for loading/processing images, and keras for defining and configuring the deep learning image classification model.

Limitation: it can only resize images of certain sizes to 224 * 224 * 3

I have written up a blog post on the IG Content Generator in great detail here: https://vincentlu91.github.io/2020/07/06/Image-Classification-Planes-or-Automobiles.html

How to access the data app

Deployed App

You can use the following link here: https://airplanes-or-cars.herokuapp.com

(October 8 2022): Starting November, Heroku's free dynos will no longer be available therefore the application can no longer run on Heroku. YouTube demo can be seen below with the application demonstration:

https://youtu.be/jPelhNFDP9g

You can also set up a Docker container to run the application

You can pull the docker image from the Docker Hub repository: https://hub.docker.com/r/vincelu299/airplanes_or_cars

Then:

docker run -p 8501:8501 airplanes_or_cars_stapp:v1

You may see the suggested Network and External URLs. Ignore those - go to the browser and enter: http://localhost:8501/

You should be able to view the containerized application.

Alternatively, you can access the application in development environment

Libraries and their versions are included in requirements.txt. To install the virtual environment, run the following:

python3 -m venv env # or python -m venv env
source env/bin/activate
pip3 install -r requirements.txt # or pip install -r requirements.txt

At this point the environment should be set up with required libraries to run the application. To run the app, enter:

streamlit run app.py

Then in the browser, enter localhost:8501/.

How to use the data app

Upload an image or drag and drop it to the file picker:

martymcfly

Example images:

airplane

car

graphicstock-an-african-american-fat-man-holding-tray-with-fast-food-young-smiling-man-having-a-lunch-in-a-fast-food-restaurant-happy-plump-man-with-fast-food-vector-flat-design-illustration-square-layout_SXqB-sL8W_thumb

Click "Process". The image uploaded will be displayed, along with the result that it is either a plane, automobile, or neither.

Screen Shot 2022-10-07 at 2 40 20 PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published