Skip to content

Latest commit

 

History

History
60 lines (54 loc) · 3.33 KB

README.md

File metadata and controls

60 lines (54 loc) · 3.33 KB

Traffic Sign Classification License: GPL v3

University of Verona

A simple Pattern Recognition project without using CNN methods. The traffic signs we work on are the following. signs classes

How it works

Most of the dataset is based on German Traffic Sign Dataset, BelgiumTS Dataset, Spanish Traffic Sign Dataset. We also used data augmentation, file in code folder named data_augmentation, to exapand to 600 per class the images. The feature we used are from Keras application.

Setup & Run

Download the repository then extract it.
You can simply run the bash script that will perform the first three time consuming steps.

bash autorun.sh

or follow the commands below for a step by step approach.
Using the cd command go to the repository path.
First of all install the requirements:

pip install -r requirements.txt

You can now use python3 to run the scripts contained in the code folder.

At first you need to extract the images contained in the dataset folder and convert it to .npy file. To do this simply run

python3 code/export_dataset.py

The next step is to convert those images into features. We use Keras features provided by the Xception application.
Run this script to save a .npy file containing those features

python3 code/keras_features.py

Now we can train our SVM classifier with the previosly extracted features by running

python3 code/svm_classifier.py

It will save five .sav file containing the classifier for the superclass and four for the subclasses (one for each superclass).
We tested it on a video (inside the video folder, it's test_video.mp4). Run this command to try it:

python3 code/test_on_video.py

NOTE: to try other videos you need to run create_bbox.py and with the key 'n' add only the first frame of the signal, the others will be tracked automatically.
Finally it will save the output video inside the video folder as output_video.mp4.

Another test is test_on_images.py that will cicle into the test folder and find the signals using a sliding window. Results will be stored in the folder sliding_windows_results.

License

Before use it we invite you to read the LICENSE.

This file is distributed under the terms of the GNU General Public License v3.0
Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.


Visit http://www.gnu.org/licenses/ for further information.

References

Tecniche e teorie del riconoscimento - Visual Computing
A.Y. 2018/2019
University of Verona (Italy)

Repository Author:
Edoardo Pieropan
Gianluca Pavan