IcetranAutonomous Car Driving One Possible Implementation Using Machine Learning Algorithm
IcetranAutonomous Car Driving One Possible Implementation Using Machine Learning Algorithm
net/publication/329683358
CITATIONS READS
0 210
3 authors, including:
All content following this page was uploaded by Igor Ciganovic on 15 December 2018.
Abstract— Different approaches to developing the AI systems complicates the mathematical model, so the solution is some
for self-driving vehicles exist and almost all of them are very kind of a system, that according to human standards, is
complex and with very high hardware requirements. The intelligent i.e. simulates driving as if it were a real driver. That
solution presented in this paper proposes the machine learning is how the idea of using the artificial intelligence was
based system to be as simple as possible with very low hardware developed. As artificial intelligence progresses, so do its sub-
requirements. A simple three layers deep, fully connected neural
network was trained to map input images from a front facing branches and one of the most significant branches is
QVGA camera to steering commands. Based on a input image autonomous vehicles, which is inseparable from the computer
the neural network should choose one of the four available vision. The motivation behind this technology is to design a
commands (forward, left, right or stop). With minimum of the system which can do steering, braking and accelerating all by
training data (250 images) the system learned to follow the road itself. In this task, computer vision can help the system detect
ahead and stay in its lane. The system automatically learns and identify objects, while other algorithms do the decision
necessary road features with only the steering angle as the input
from the human driver. It was never explicitly trained to detect making. [2, 3]
lines on the road. Compared to much more complex solutions
like explicit decomposition of the problem, such as lane detection II. RELATED WORK
and control, and convolutional neural networks like the end to There are plenty of proposed solutions. Some of them are
end learning proposed by the nVidia this system proved to be
mathematical approach, neural networks, reinforcement
surprisingly robust and efficient. We try to prove that this
approach would lead to better performance and lower hardware learning, convolutional neural networks, Q learning. Two
requirements thus making the development of the self-driving most significant solutions are mathematical approach and
vehicles simpler and more cost-effective. Simple artificial neural CNNs. Both methods have their pros and cons. This paper
network, like the one presented in this paper, is enough for presents a simple, fast and effective approach to tackle this
relatively complex process like lane keeping. problem.
Mathematical approach requires explicit decomposition of
Index Terms— Artificial intelligence; AI; neural network; self- the problem. This technique can use monocular or stereo
driving; autonomous vehicle; object detection; computer vision; vision. Most of these techniques were focusing on detection of
haar cascade; robotics; robot lane markers on the highway, which are relatively easy to
detect. Generally, it requires baseline to be horizontal, i.e.
I. INTRODUCTION horizon in the image is parallel to x axis. Lines need to be
Each year just in US around 37,000 people are killed in car thick enough and in a shape of rectangle (or approximate).
accidents. That is a 5.6 % increase from 2015. Human errors After the line boundaries are detected the position of vehicle
caused up to 90% percent of car accidents. [1] Autonomous can be calculated, with pre-calculated calibration data for the
vehicles may help reduce this huge number of fatalities. One camera. [3, 4, 5] With known vehicle position and through
of the first, most popular and most useful technologies is the complex matrix and trigonometry calculations, required
line detection and lane keeping. It started developing in 1980s steering angle can be calculated. Other similar techniques
and to this day it is still being improved. The desire of a man require flat road, known focal length, optical center, pitch
to increase the safety of vehicles on road has led to the angle, yaw angle and height above ground before performing
mathematical transformations. [6]
development of different systems that are implemented into
Another approach is by using convolutional neural
vehicles. Each new system requires an extra mathematical
networks (CNNs). For this approach important thing is to
representation of the data in order to make decisions correctly.
collect valid training data. It is done, by saving commands
Adding new systems into the vehicles exponentially given by human driver and images from onboard cameras.
CNNs have revolutionized pattern recognition. [7] They are
Igor Ciganović is with the School of Computing, Union University, Knez
capable of learning features automatically from training data.
Mihailova 6/VI, 11000 Belgrade, Serbia (e-mail: [email protected]). Due to CNNs high level of complexity it requires high end
Aleksandar Pluškoski is with the School of Computing, Union University, hardware to run. Most of the solutions of this type are using
Knez Mihailova 6/VI, 11000 Belgrade, Serbia (e-mail: multiple graphic processing units (GPUs) or some dedicated
[email protected]).
Miloš D Jovanović, Mihailo Pupin Institute, University of Belgrade,
hardware like NVIDIA DRIVE PX, both of which
Volgina 15, 11000 Belgrade, Serbia, (email: [email protected]). tremendously accelerate learning rate as well as the execution
of a trained network. All these solutions came with common
flaws like: big, lumpish, complex, expensive and not very
power efficient hardware. [8] One novel solution using CNNs
is so called end to end learning developed by nVidia. With
relatively small amount of training data from human driver,
system learned how to drive a car. [7] Similarly to the solution
presented in this paper. One big flaw of this approach is the
use of the nVidia Devbox and Drive px, with combined cost
in tens of thousands of dollars.
The solution proposed in this paper aims to provide a more
efficient implementation of a autonomous driving AI
algorithm. Using this approach, it is possible to build self-
driving vehicle without a explicit high-level mathematical
modeling and analysis of the problem. Also, it does not
require power-hungry, powerful and expensive hardware for
execution. It is able to be trained using very small amount of
training data, thanks to its simplicity. Fig. 2. Connections of the electrical components of the system.
VIII. EXPERIMENT
Experimental trials were carried out on a model road, in
controlled conditions. The roadmap of the model was
changed, also the weather and lighting conditions were varied
during the experiments to simulate the real-world conditions.
The experiments consisted of four phases. The first phase is
designing a roadmap, second gathering the training data on
the road model, then training the ANN and finally the
experimental drive (i.e. testing).
Making of a model road was a time-consuming and very
creative part of the experiment. Because the model needed to Fig 10. User interface for the vehicle control during the data collection
simulate real world conditions as close as possible and also After the data was collected, it was saved into an “. npz”
allow easy and fast changes. Example of the road model can file. The training of the ANN was done by executing the
be seen in Figure 9. The model had to have streets, traffic training script, which takes the collected training data and
lights, crossroads, obstacles on the road (static and dynamic) calculates the coefficients of the neural network (assuming
and traffic signs. The driving conditions, including the that the training data is valid). The neural network parameters
wetness of the road, visibility and lighting (artificial and are then saved in an “.xml” file, which is used to generate the
natural sunlight) were also needed to allow quick and easy same ANN in the testing phase. The training was done on the
alteration. From one training run to another, the model was Intel i3 processor with 8GB of RAM and on average it takes
changed, as well as during the testing. All this was done to get only a couple of minutes. This was possible because of the
more realistic data and results. simple architecture of the used ANN. After the training,
accuracy data is calculated showing more than 85% of
matching.
Testing was done by driving the vehicle autonomously on
the model road. The expected outcome was that the
autonomous vehicle should, by itself, drive on the model road.
The behavior of the vehicle was observed and recorded. that in this setup, an autonomous vehicle can drive at any time
Between the testing runs the model road was altered. This of the day, under natural or street light, comply with all the
included changing the roadmap as well as the conditions on traffic signs and regulations and follow the assigned route,
the road by adding barriers, traffic signs and changing the without any unexpected behavior.
intensity of the light and the type of illumination. The test
conditions were incrementally worsened until an unexpected X. CONCLUSION
behavior was detected. It was demonstrated that the simple ANN is able to learn
not so simple task of driving a car. That includes lane
following, collision detection and avoidance and following
traffic regulations in urban traffic setting. All of this was
achieved using a minimum of data and very modest hardware.
That was enough to train the system to drive in diverse
conditions, from day to night, from urban streets to highways,
regardless of the number of other participants in traffic and
comply with all the traffic regulations.
One caveat of any machine learning system is the
unpredictable behavior. But in this experiment, it was
demonstrated that the development of these types of systems
can be simple, especially for the noncritical systems. For the
Fig. 11. Test drive including the other traffic participants
real-world application, additional testing would be required,
All the phases were repeated for several iterations until
as well as some additional safety protocols. But all of this
satisfactory results were obtained. This included that the
should be achievable with the system that was demonstrated.
autonomous vehicle could drive with the other participants in
the traffic, follow the markings on the road, comply with the
ACKNOWLEDGMENT
road regulations, such as the street signs and the traffic lights
and be resistant to the changing road conditions. The research in the paper is funded by the Serbian Ministry
of Education Science and technological development under the
IX. RESULTS grants TR-35003 and III-44008.
The first results were above expectations and very REFERENCES
encouraging showing that the development was moving in the
[1] U.S. Department of Transportation’s National Highway Traffic Safety
right direction. The first successful build was tested using Administration. (2016). Retrieved from United States Department of
only the partial training data. The drive through only one Transportation: crashstats.nhtsa.dot.gov/Api/Public/Publication/812456
street and going only in a one direction was recorded. This [2] Tan, B., Xu, N., & Kong, a. B. (2018). Autonomous Driving in Reality
was done to save time because the first build was not expected with Reinforcement Learning and Image. arXiv preprint
arXiv:1801.05299. Retrieved from https://arxiv.org/pdf/1801.05299.pdf
to work but it did. The robot successfully drove (kept its lane) [3] Massimo, B., & Broggi, A. (1996). Real-time lane and obstacle
in the direction that was recorded. But in the opposite detection on the GOLD system. Intelligent Vehicles Symposium, 1996.,
direction could not stay in its lane. Initially the results varied Proceedings of the 1996 IEEE, 213-218.
from test to test and showed some problems. Sometimes the [4] Bertozzi, M., Broggi, A., Conte, G., & Fascioli, A. (1997). Obstacle and
lane detection on ARGO. Intelligent Transportation System, 1997.
robot would unexpectedly turn and drive of the road or it ITSC'97., IEEE Conference on. IEEE, 1010-1015.
would follow the lane but not stay in the center. But by [5] Wang, H., & Chen, Q. (2016). Real-time lane detection in various
collecting better data and fine-tuning the hyperparameters of conditions and night cases. Intelligent Transportation Systems
the ANN, all of this was solved. Multiple runs were recorded Conference, ITSC '06. IEEE, 1226-1231.
[6] Aly, M. (2008). Real time detection of lane markers in urban streets.
on every route and only the recordings without any user errors Intelligent Vehicles Symposium, IEEE, 7-12.
were kept for training. Also, the number of the neurons in the [7] Bojarski, M., Del Testa, D., Dworakowski, D., Firner, B., Flepp, B.,
hidden layer was varied until it was determined that 32 was Goyal, P., Jackel, L.D., Monfort, M., Muller, U., Zhang, J. and Zhang,
the optimal number. X. (2016). End to end learning for self-driving cars. arXiv preprint
arXiv:1604.07316.
In order for the result to be considered satisfactory, the [8] Krizhevsky, A., Sutskever, I. and Hinton, G.E. (2012). ImageNet
autonomous vehicle had to meet the following conditions: to Classification with Deep Convolutional. Advances in neural information
recognize and comply with the traffic signalization and processing systems, 1097-1105.
regulations and to maintain the intended path on the road. [9] Hopcroft, J. E., Motwani, R., & Ullman, J. D. (2007). Introduction to
Automata Theory, Languages, and Computation. Pearson Education,
Over time, the both conditions have been increased in 37-47.
difficulty by adding traffic lights, other vehicles, pedestrians [10] Simon Haykin, “What is a neural network?” in NEURAL NETWORKS A
and obstacles, a more complex roadmap and different road Comprehensive Foundation, Delhi, India: Pearson Education, 2005., ch.
surface. 1, sec. 1, pp. 23 – 24.
[11] Jiangwei, C., Lisheng, J., & Lie, G. (2004). Study on method of
The final results confirm the hypothesis that this type of detecting preceding vehicle based on monocular camera. Intelligent
neural network, a simple three-layer fully connected, with Vehicles Symposium, IEEE.
very low hardware requirements, can be applied under [12] [Igor Ciganovic]. (2017, October 26). Self-Driving Car AI [Video File].
realistic conditions to solving traffic navigation. It was shown Retrieved from https://www.youtube.com/watch?v=W2hugeCLAKI