Background
The Bauman Moscow State Technical University student racing team is one of the first in Russia to design unmanned race cars for international Formula Student competitions. The autonomous driving system of an unmanned car must recognize objects on the racetrack. For that, neural networks come into play.
The team trained four YOLOv5-architecture networks in Compute Cloud and selected the one providing fast and high-quality detection. Without any third-party support and over a very short time, they got accurate and effective tools for addressing object detection tasks on the road.
What driverless racing is about
Formula Student is an international student engineering competition that has its participants develop and build a race car over a year. Every year, about 1,000 teams from all over the world join the competition. In Germany alone, where the competition is based, almost every single university engaged in the automobile industry has its own team. Based on the outcome, a gifted student can get into the industry thanks to Formula Student.
It was not until 2016 that the Formula Student Driverless (FSD) race became a separate race category. Unlike Roborace, the world’s first unmanned car race, Formula Student does not have the cars compete directly on the road but rather, the vehicles get scores for speed, maneuverability, and efficiency.
The contest is divided into static and dynamic events. The static tests evaluate the car’s design, cost, and business plan. Following that, a mandatory tech inspection takes place. Among the dynamic tests, by far the most spectacular is Track Drive. During this event, the cars race the track one by one, going 10 five-kilometer laps at maximum speed, unmanned and without remote control. The contestant who gets the maximum total score across all events wins.
What an unmanned race car needs
The Bauman Racing Team was founded in 2012. Since then, the members regularly develop cars for Formula Student. To date, the team has built seven race cars (BRT1 through BRT7) that have competed in Formula Student Combustion (FSC). All cars have entered international competitions based in Germany, Austria, the Czech Republic, Italy, Spain, and Russia. The team has been victorious in two Russian races and won a prize at an Andorra-based event.
With their focus now on FSD, the students are developing an unmanned race car with an electric motor unit and control gear ensuring its autonomous movement on the racetrack. Bauman Racing Team is one of Russia’s first team to work on a car like that.
Convolutional neural networks
Unmanned racing involves an algorithm that allows for real-time detection of objects on the road (for example, traffic cones), ensuring the vehicle is going in the right direction. For that purpose, the Bauman Racing Team used convolutional neural networks, which address such tasks best.
The principle behind these networks is repeatedly running the so-called weight matrix across the entire image being processed. The neural network generates a whole array of matrices, each of them encoding individual elements of the image, such as lines and arcs positioned at various angles. The result of a matrix having gone through the layer is a feature map, i.e., a new, slightly less detailed image. All these feature maps constitute a new layer. The latter again undergoes the same process involving weight matrix runs. With each iteration, more and more maps emerge, their degree of detail falls, and the features get increasingly pronounced. By repeating this process, the neural network filters out insignificant features and highlights the important bits of the image.
YOLO architecture
Since computing resources on board a race car are limited, it was critical to select an architecture best suited for quick and high-quality detection. The team eventually opted for the YOLO architecture. It allows for detecting objects within one run, making it faster by an order of magnitude compared to other detection algorithms. The students tested the most diverse network class, YOLOv5, which comprises architectures that significantly differ from each other in terms of the detection parameters they use.
Virtual machines in a cloud
To quickly train a neural network, one needs large amounts of data coupled with fail-safe hardware, which requires a rapid increase in the computing resources. However, it is not cost-efficient to buy and maintain one’s own equipment. Beyond that, maintaining the infrastructure entails constant time investments. In that light, cloud technology proved to be the best option.
To test their neural networks, the team opted for Compute Cloud, part of the Yandex Cloud platform.
How they trained the neural networks
The team needed to train four YOLOv5-architecture networks (s
, m
, l
, and x
) and export the output as charts, work reports, and neural network weights. To this end, they created a few virtual machines in Compute Cloud that had high-performance NVIDIA Tesla V100 GPUs and Docker containers with various neural network architectures. This configuration allowed for fast and seamless computation, decreased the testing time, and accelerated development.
Each neural network was trained on a source dataset of 20,000 images. All told, it took over 66 hours: YOLOv5s was trained over 5.23 hours; YOLOv5m, over 9.3 hours; YOLOv5l, over 15 hours; and YOLOv5x, over 36 hours.
Training results and architecture selection
Based on the training outcome, the team managed to narrow down the list of suitable architectures to YOLOv5s and YOLOv5m, the ones with the fewest number of properties. Detection quality on the test set showed little variance across all four networks. This is how the team managed to select their object detection toolkit.
What’s next
The Bauman Racing Team is at the final stage of designing their car and fine-tuning their algorithms through simulations. Further on, the students intend to enlarge the dataset for training the neural network in Yandex Cloud and use the platform in other domains, e.g., for semantic segmentation tasks. Currently the team is only beginning to build its race car and plans to finish it by Q3, when another Formula Student season will be in full swing, including events in the Czech Republic, Hungary, and Germany.
Opinion
When we started working with object detection, we settled on Yandex Cloud as the platform of choice, since it was the most user-friendly one for us, beginners. First and foremost, this was due to hardware transparency: when building a virtual machine in Compute Cloud, we knew for a fact what CPU, GPU, and memory it would use. Other things that helped us included the detailed documentation and a wide array of services. Since we are getting new datasets suitable for our purposes and will be further using them to train neural networks, we intend to continue using Yandex Cloud. For instance, we are trying out Yandex DataSphere right away.