Skip to content

bekhzod-olimov/Object-Classification-and-Classifier-Analysis

Repository files navigation

Object-Classification-and-Classifier-Analysis

Classify objects using DL-based image classification model rexnet_150 (paper), test the model performance on unseen images during training, and perform model analysis using GradCAM.

Create virtual environment

conda create -n <ENV_NAME> python = 3.9
conda activate <ENV_NAME>
pip install -r requirements.txt

Sample data

Capture

Run training with PyTorch

python train.py --batch_size = 64 --lr = 3e-4 --model_name = "model_name_from_timm_library"

Run training with PyTorch Lightning (Parallel Training)

python pl_train.py --batch_size = 64 --lr = 3e-4 --model_name = "model_name_from_timm_library"

Results

Capture1

GradCAM

Capture Capture1 Capture2 Capture3 Capture4 Capture5

Run classfication demo

After completing train process choose a model checkpoint with the best accuracy and do inference using random images from the Internet by running the following script. There are several sample images in sample_ims folder of this repo.

Streamlit
streamlit run demo.py --checkpoint_path "path/to/checkpoint"
Gradio
python gradio_demo.py --checkpoint_path "path/to/checkpoint"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published