Skip to content

bekhzod-olimov/AutomobilePartsDetectionClassification

Repository files navigation

AutomobilePartsDetectionClassification

This repository contains a deep learning (DL)-based artificial intelligence (AI) image classification model training to classify different used automobile parts (specifically, Genesis, KIA, and Hyundai). The AI model used for the classification task is RexNet (paper and code). The model can be trained using two different frameworks (PyTorch and PyTorch Lightning).

Manual on how to use the repo:

  1. Clone the repo to your local machine using terminal via the following script:
git clone https://github.com/vitasoftAI/Recycle-Park.git
  1. Create conda environment from yml file using the following script:

Create a virtual environment using txt file:

  • Create a virtual environment:
conda create -n ENV_NAME python=3.10
  • Activate the environment using the following command:
conda activate ENV_NAME
  • Install libraries from the text file:
pip install -r requirements.txt
  1. Data Visualization

a) Genesis

image

b) KIA

image

c) Hyundai

image

  1. Train the AI model using the following PyTorch Lightning training script:

Train process arguments can be changed based on the following information:

image

a) Genesis

python train.py --data "genesis30_50" --batch_size = 64 devices = 4 --epochs 50

Training process progress:

image

Learning Curves:

image

image

b) KIA

python train.py --data "new_kia" --batch_size = 64 devices = 4 --epochs 50

Training process progress:

image

Learning Curves:

image image

c) Hyundai

python train.py --data "new_hyundai" --batch_size = 64 devices = 4 --epochs 50

Training process progress:

image

Learning Curves:

image image

  1. Conduct inference using the trained model:
python inference.py --data_name DATA_NAME device = "cuda:0" --lang = "eng"
  1. Demo using pretrained AI models:

a) demo using streamlit:

streamlit run streamlit_demo.py 

First, type of a automobile company must be choosen: image

*** Genesis ***

streamlit_genesis

*** Kia ***

streamlit_kia

*** Hyundai ***

streamlit_hyundai

b) demo using gradio:

python gradio_demo.py

*** Genesis ***

gradio_genesis

*** Kia ***

gradio_kia

*** Hyundai ***

gradio_hyundai
  1. Flask application:

a) Run the application in the terminal:

python app.py

b) Go to the flask.py file, copy the code to jupyter notebook and run the cell.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages