Detection and recognition of traffic signs on public roads.
The recognition model was trained using fastai and the GTSRB dataset, with the best result of 99.99% accuracy for Resnet-50.
To get the bounding boxes coordinates, the code uses a pre-trained model which you can find in this repository.
The detected signs are then classified using the recognition model.
If you want to run it locally, it's recommended to have at least 16GB of RAM and a GPU with 6GB of VRAM. If your computer does not meet the requirements, you can adapt the code for a Google Colab notebook.
- fastai 2.1.7
- Python 3.7.x (or later)
- OpenCV 4.4.0
- Pytorch 1.7.0
- matplotlib 3.3.3
- numpy 1.19.3
- tesnorflow 2.2.0
- Object Detection API with TensorFlow 2
- CUDA 10.0.0 or 10.0.1 (Depends on your Tensorflow version, if it asks for dynamic library x_10.dll, it's 10.0.0, if it asks for x_101.dll, it's 10.0.1)
- cudNN 7
- Recognition dataset can be found here, or with labeled folders in this repository.
- Detection dataset can be found here *Not needed, dowload the pre-trained model below. Can be used for more test images.
- Recognition models, one was trained with resnet34 and the other with resnet50
- Detection model (direct download), repository with pre-trained models for detection
- Download the detection model and extract the frozen graph to models/detection
- Download the recognition model from this repository or run python src/recognition.py to train a new model
- Run python src/detection.py to detect and classify traffic signs from the test images.