Car Models Classifier using TensorFlow.
In this repo, I used TensorFlow to build A ResNet50 Neural Network and train it from scratch using the Stanford Car Dataset, a dataset containing 196 car model.
- categories.json: a json file conaining the car models names.
- test.py: the code used to test the model once it is trained.
- train.py: the code used to train the model.
- utils.py: a python file containing utils functions.
- resnet50.py: the code used to build the ResNet50 model.
- requirements.txt: a text file containing the needed packages to run the project.
- main.py: the file needed to run training, testing and preprocessing.
1. Prepare the environment:
NB: Use python 3+ only.
Before anything, please install the requirements by running: pip3 install -r requirements.txt
.
2. Prepare the data:
Download the Stanford Car Dataset.
Extract the zip file. It should be organized as follows:
data/
should contain a folder named car_data/
, that contains two folders named train/
and test/
.
Convert the training data to npy file and prepare the labels file by running python3 main.py
and following the instructions.
3. Train and test the ResNet model: (from scratch)
To run both training and testing, you need to run python3 main.py
then follow the instructions.