92 lines
2.0 KiB
Markdown
92 lines
2.0 KiB
Markdown
# Vehicle Classification — UTD Deep Learning Assessment
|
|
|
|
A Convolutional Neural Network (CNN) trained to classify 8 vehicle types:
|
|
**Bicycle, Bus, Car, Motorcycle, NonVehicles, Taxi, Truck, Van**
|
|
|
|
---
|
|
|
|
## Requirements
|
|
- Python 3.11 (see `.python-version`)
|
|
- pip
|
|
|
|
---
|
|
|
|
## Setup
|
|
|
|
### 1. Clone the repository
|
|
```bash
|
|
git clone https://git.keshavanand.net/KeshavAnandCode/vehicle-classification.git
|
|
cd utd-vehicle-classification
|
|
```
|
|
|
|
### 2. Create and activate a virtual environment
|
|
```bash
|
|
python3.11 -m venv .venv
|
|
```
|
|
**Mac/Linux:**
|
|
```bash
|
|
source .venv/bin/activate
|
|
```
|
|
**Windows:**
|
|
```bash
|
|
.venv\Scripts\activate
|
|
```
|
|
|
|
### 3. Install dependencies
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
### 4. Download the dataset
|
|
- Download `vehicle_classification.zip`
|
|
- Place and extract it so the structure looks exactly like this:
|
|
```
|
|
data/
|
|
└── raw/
|
|
└── vehicle_classification/
|
|
├── Bicycle/
|
|
├── Bus/
|
|
├── Car/
|
|
├── Motorcycle/
|
|
├── NonVehicles/
|
|
├── Taxi/
|
|
├── Truck/
|
|
└── Van/
|
|
```
|
|
|
|
### 5. Run the notebook
|
|
```bash
|
|
jupyter notebook notebooks/submission.ipynb
|
|
```
|
|
Once open: **Kernel → Restart & Run All**
|
|
|
|
---
|
|
|
|
## Project Structure
|
|
```
|
|
utd-vehicle-classification/
|
|
├── notebooks/
|
|
│ ├── submission.ipynb ← main submission, run this
|
|
│ └── experiments/ ← exploratory notebooks (ignore)
|
|
├── data/
|
|
│ └── raw/
|
|
│ └── vehicle_classification/ ← dataset goes here
|
|
├── models/ ← saved model weights (auto-created on run)
|
|
├── results/ ← training curves (auto-created on run)
|
|
├── requirements.txt
|
|
└── README.md
|
|
```
|
|
|
|
---
|
|
|
|
## Expected Output
|
|
```
|
|
Final Train Accuracy : ~88%
|
|
Final Test Accuracy : ~82%
|
|
```
|
|
|
|
---
|
|
|
|
## Notes
|
|
- Device is detected automatically — runs on NVIDIA GPU, Apple Silicon (MPS), or CPU with no code changes required
|
|
- `models/` and `results/` directories are created automatically when the notebook runs |