Skip to content

AbdassalamAhmad/Predicting-Clothing-Types

Repository files navigation

Open in Streamlit

Predicting-Clothing-Types

Predicting 10 different clothing types using Xception pre-trained model from Keras library. It is reimplemented version from lesson 8-deep learning held by DataTalksClub.

Model Demo

Model Demo

About the Dataset

Data Source

I use the dataset from here: https://github.com/alexeygrigorev/clothing-dataset-small

Dataset Information

This is a small dataset contains 10 different clothing types (dress, hat, longsleeve, outwear, pants, shirt, shoes, shorts, skirt, t-shirt).

Short Description of the Files

  1. training-final-dlmodel.ipynb -
  • used transfer learning to get Xception model pretrained on Imagnet.
  • freeze its CNN layers and train the dense layers.
  • used callbacks to save the best model over multiple epochs.
  • did some data augmentation to prevent overfitting and generalize our model.
  • Evalutaing the model, Aciheved 90% accuracy.
  1. streamlit_DLapp.py It deploy the trained model to streamlit cloud

  2. xception_v5_1_10_0.889.h5 - Best model from training saved in this binary format to load it easily.

  3. Pipfile and Pipfile.lock - Python package dependencies, in the pipfile you can find all necessary librares and packages to be able to run the scripts with no problem.

How to run this model

  1. open this link
  2. Upload an image from test dataset or any image from your device that has one clothing type.
  3. click on Predict Class button.

Note: watch this video to see the model in action

How to reproduce this model

  1. clone this repo to get all the code.
  2. clone the dataset using this command
!git clone git@github.com:alexeygrigorev/clothing-dataset-small.git
  1. install pipenv -which is a packaging tool that will help installing all dependencies- , use this command on your terminal.
pip install pipenv
  1. install all dependencies using pipenv by typing this command in your terminal inside your cloned repo folder
pipenv install
  1. Deploying the app locally or on the web 5.1. Locally: open the terminal and use this command
streamlit run streamlit_DLapp.py

5.2. on the web: check the documentation from official website.

Note

If you like my project, I appreciate you starring this repo. Please feel free to fork the content and contact me if you have any questions.

my linkedIn account

About

Predicting 10 different clothing types using Xception pre-trained model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published