-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b859b35
commit 01c8dc1
Showing
18 changed files
with
447 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 35 additions & 33 deletions
68
traffic_signs_detection/traffic_signs_classification/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,82 @@ | ||
# Traffic-Sign Classification | ||
|
||
## ME499 - Independent Project, Winter 2021 | ||
|
||
Yael Ben Shalom, Northwestern University.<br> | ||
This module is a part of a [Objects Recognition and Classification](https://github.com/YaelBenShalom/Objects-Recognition-and-Classification) project. | ||
|
||
## Table of Contents | ||
|
||
Table of Contents | ||
----------------- | ||
* [Module Overview](#module-overview) | ||
* [User Guide](#user-guide) | ||
* [Program Installation](#program-installation) | ||
* [Quickstart Guide](#quickstart-guide) | ||
* [Dataset](#dataset) | ||
|
||
- [Module Overview](#module-overview) | ||
- [User Guide](#user-guide) | ||
- [Program Installation](#program-installation) | ||
- [Quickstart Guide](#quickstart-guide) | ||
- [Dataset](#dataset) | ||
|
||
## Module Overview | ||
|
||
In this module I built and trained a neural network to classify different traffic signs using PyTorch.<br> | ||
I based my program on the German Traffic Sign Recognition Benchmark ([GTSRB](https://benchmark.ini.rub.de/gtsrb_news.html)) dataset. | ||
|
||
|
||
## User Guide | ||
|
||
### Program Installation | ||
|
||
1. Clone the repository, using the following commands: | ||
``` | ||
git clone https://github.com/YaelBenShalom/Objects-Recognition-and-Classification/tree/master/traffic_signs_detection/traffic_signs_classification | ||
``` | ||
|
||
2. Download the dataset and extract it into `./data` directory. The dataset can be found on the [INI Benchmark website](https://benchmark.ini.rub.de/?section=gtsrb&subsection=news), or downloaded directly through [here](https://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/traffic-signs-data.zip). | ||
``` | ||
git clone https://github.com/YaelBenShalom/Objects-Recognition-and-Classification/tree/master/traffic_signs_detection/traffic_signs_classification | ||
``` | ||
|
||
2. Download the dataset and extract it into `./data` directory. The dataset can be found on the [INI Benchmark website](https://benchmark.ini.rub.de/?section=gtsrb&subsection=news), or downloaded directly through [here](https://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/traffic-signs-data.zip). | ||
|
||
### Quickstart Guide | ||
|
||
Run the classification program: | ||
|
||
1. To train and test the program on the dataset, run the following command from the root directory: | ||
``` | ||
python code/classification.py | ||
``` | ||
|
||
``` | ||
python code/classification.py | ||
``` | ||
|
||
2. To train the program on the dataset and test it on a specific image, copy the image to the root directory and run the following command from the root directory: | ||
``` | ||
python code/classification.py --image <image-name> | ||
``` | ||
Where `<image-name>` is the name of the image (including image type).<br> | ||
The trained model will be saved in the root directory as `/model`. | ||
|
||
3. To to use an existing model and test it on a specific image, copy the image to the root directory and run the following command from the root directory: | ||
``` | ||
python code/classification.py --image <image-name> --model <model-name> | ||
``` | ||
Where `<model-name>` is the name of the trained model. | ||
``` | ||
python code/classification.py --image <image-name> | ||
``` | ||
|
||
Where `<image-name>` is the name of the image (including image type).<br> | ||
The trained model will be saved in the root directory as `/model`. | ||
|
||
3. To to use an existing model and test it on a specific image, copy the image to the root directory and run the following command from the root directory: | ||
``` | ||
python code/classification.py --image <image-name> --model <model-name> | ||
``` | ||
Where `<model-name>` is the name of the trained model. | ||
|
||
<br>The program output when running it on the example image: | ||
|
||
The loss plot:<br> | ||
.png) | ||
.png>) | ||
|
||
The accuracy plot:<br> | ||
.png) | ||
.png>) | ||
|
||
The output image (with the correct prediction):<br> | ||
 | ||
 | ||
|
||
## Dataset | ||
|
||
The German Traffic Sign Recognition Benchmark ([GTSRB](https://benchmark.ini.rub.de/gtsrb_news.html)) is a large multi-category classification benchmark. It was used in a competition at the International Joint Conference on Neural Networks (IJCNN) 2011. | ||
|
||
The benchmark has the following properties: | ||
|
||
1. Single-image, multi-class classification problem. | ||
2. 43 classes. | ||
3. More than 50,000 images in total (~35,000 training images, ~4000 validation images, and ~13,000 testing images). | ||
4. Large, lifelike database. | ||
|
||
The dataset can be found on the [INI Benchmark website](https://benchmark.ini.rub.de/?section=gtsrb&subsection=news), or downloaded directly through [here](https://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/traffic-signs-data.zip). | ||
|
||
 | ||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.