bhushanp commited on
Commit
80ce281
β€’
1 Parent(s): a0c52ce

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -4
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
  title: Car Classifier
3
- emoji: πŸš€
4
- colorFrom: red
5
- colorTo: green
6
  sdk: gradio
7
  sdk_version: 4.0.2
8
  app_file: app.py
@@ -10,4 +10,43 @@ pinned: false
10
  license: apache-2.0
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: Car Classifier
3
+ emoji: πŸš—πŸ’¨
4
+ colorFrom: pink
5
+ colorTo: purple
6
  sdk: gradio
7
  sdk_version: 4.0.2
8
  app_file: app.py
 
10
  license: apache-2.0
11
  ---
12
 
13
+ Stanford Cars Classification
14
+ Overview
15
+
16
+ This project focuses on classifying images of cars from the Stanford Cars dataset using a deep learning model implemented with the fastai library. The model is based on the ResNet34 architecture and is trained to recognize various car models. The dataset is divided into training and validation sets, and the training process involves fine-tuning the model to achieve high accuracy.
17
+ Dataset
18
+
19
+ The dataset used for this project is the Stanford Cars dataset, which contains images of 196 classes of cars. The dataset is divided into a training set and a test set, with corresponding labels provided.
20
+ Data Exploration
21
+
22
+ To get an overview of the dataset, a random selection of car images is displayed using matplotlib. The images are loaded from the training set, and each image is labeled with its corresponding car model.
23
+ Data Preprocessing
24
+
25
+ The dataset is prepared for training using the fastai library's DataBlock API. Images are resized to 256x256 pixels, and data augmentation is applied to improve model generalization. The dataset is split into training and validation sets using a random splitter.
26
+ Model Architecture
27
+
28
+ The image classification model is based on the ResNet34 architecture, a pre-trained model that is fine-tuned on the Stanford Cars dataset. The model is trained using transfer learning to leverage the knowledge gained from a broader image dataset.
29
+ Training
30
+
31
+ The model is trained in multiple stages. Initially, only the final layers of the pre-trained model are trained. Subsequently, the entire model is unfrozen, and further training is performed. The learning rate is adjusted using learning rate finders to achieve optimal training results.
32
+ Model Evaluation
33
+
34
+ The model is evaluated on a validation set to measure its performance using metrics such as error rate. The training process involves finding an appropriate learning rate and fine-tuning the model to achieve high accuracy.
35
+ Inference
36
+
37
+ The trained model is capable of making predictions on new car images. The model is exported and saved as model.pkl for later use.
38
+ Usage
39
+
40
+ Run the provided Jupyter Notebook code to train the image classification model.
41
+ Export the trained model as model.pkl.
42
+ Use the model for image classification by providing image file paths as input to the predict method.
43
+
44
+ Dependencies
45
+
46
+ fastai
47
+ torchvision
48
+ scipy
49
+ matplotlib
50
+
51
+ Feel free to explore, modify, and contribute to this project! If you have any questions or suggestions, please don't hesitate to reach out.
52
+