Project by Abhilash Sarnad, Bhargav Shetgaonkar, and Leo Corelli for Duke AIPI 540 Module 1
The objective of this project is to train a machine learning model to recognize the model
of cars using images.
The project data and codes are arranged in the following manner:
├── README.md <- description of project and how to set up and run it
├── requirements.txt <- requirements file to document dependencies
├── Makefile [OPTIONAL] <- setup and run project from command line
├── main.ipynb] <- contains main notebook modeled using InceptionV3
├── notebooks <- contains LogisticRegression and ResNet152 notebooks
├── .gitignore <- git ignore file
Data:
the data
folder is not a part of this git project as it was heavy. The same can be downloaded from below link:
- Download data here
- Training data: run
unzip train_real.zip
on command line - Validation/testing data: run
unzip test_real.zip
on command line
- Training data: run
- Download trained models here
http://mmlab.ie.cuhk.edu.hk/datasets/comp_cars/
We tried two approaches here:
Approach 1(Non deep learning model - Logistic regression): The baseline model is created using Logistic regression. The Logistic regression model is created using one linear layer in pytorch and the predictions are generated using Softmax. The accuracy with this approach is very less as shown below
Approach 2(With Resnet-152): For Deep learning approach we used pretrained Convolutional neural networks. The model is trained with Resnet-152 with no LR scheduler, Resnet-152 with OneCycle LR scheduler and Resnet-152 with Adam. The accuracy for all three models is as shown below
Approach 3(With Inception V3): The model is trained with Incpetion V3. The training accuracy with InceptionV3 is 93.57% and test accuracy is 84.59%
Our model is able to predict the model of the cars with a accuracy of 84.59%.