Road sign recognition
This project was created to take part in competition of robots.
It can be trained to detect road signs and it can detect them.
It contains a bit of machine learning and works as fast as it is possible with hough circle transform of OpenCV.
$ git clone https://github.com/IronProger/TheCar
$ cd TheCar
$ mkdir build
$ cmake -B build
$ cd build
$ make
Maybe you need to setup video input source number by changing /configuration/video/video_input_source_number in config.xml
$ cd ..
$ buid/TheCar
Note: OpenCV and pugixml can be in repositories of your linux distributive.
First simple start it and check how it works. If all are fine, go by following steps:
mode | description |
---|---|
video | show video stream, mark circles which contain minimal value of blue color |
collect | find circles which contain minimal value of blue color and save it ti disk |
quiet_collect | the same mode without GUI |
learning | make models using collected images |
detection | detect road signs, output the result to the window and print to a log file |
quiet_detection | the same mode without GUI |
Is it possible to detect anything other than road signs?
Yes, of course. To have done it please read «How to use».
Why do I see an image with an increased value of blue and a reduced value of red?
Because the program didn’t work well with red. Now the program sends a monochrome image
for recognition, in which white is blue, and black is all other colors.
So red is not important now.
Why does it detect badly road sign STOP?
The program find circles only but road sign STOP is hexagon.
Is there used machine learning?
Partly. There is a partly realisation of convolutional neural network (one convolution
layer with manually set weights, pooling and ReLU). Recognition occurs by comparing the results
of this CNN for different images using standard derivation: the average model of a road sign
and the current shot.
The TheCarCV is open-source software licensed under the MIT license.