[Neural Network Teaching] Self-built autonomous driving without library using JavaScript

Time:2022-8-18

Neural Network (Neural Network) is also known as Artificial Neural Network (Artificial Neural Network, ANN). He imitates the way of biological neuron signal transmission in the human brain, reflects the behavior of the human brain through computer programs, and solves problems in the fields of artificial intelligence, machine learning and deep learning.

Types of Neural Networks

Neural networks can be divided into different types according to different purposes. Common types of neural networks include: perceptron, feedforward neural network or Multilayer Perceptron (MLP), Convolutional Neural Network (CNN) ), Recurrent Neural Network (RNN).

In autonomous driving, convolutional neural networks are generally used to process images of autonomous vehicles by responding to surrounding units within a partial coverage area through artificial neurons. This convolutional neural network consists of one or more convolutional layers and a top fully connected layer (corresponding to a classic neural network), as well as association weights and pooling layers. This structure enables convolutional neural networks to exploit the two-dimensional structure of the input data. Compared to other deep learning structures, convolutional neural networks can give better results in image and speech recognition.

[Neural Network Teaching] Self-built autonomous driving without library using JavaScript

The key component of a convolutional neural network is the convolutional layer itself. It has a convolution kernel, often called a filter matrix. The filter matrix is ​​convolved with a local region of the input image, which is defined as:

[Neural Network Teaching] Self-built autonomous driving without library using JavaScript

where the operator * represents the convolution operation, w is the filter matrix, b is the bias, x is the input, and y is the output.

The principle of autonomous driving

Autonomous driving actually receives different data content such as lines, road conditions, and environmental changes through a series of cameras, LiDAR, RADAR, GPS or inertial sensors, and then makes judgments and decisions based on the environment of the car through deep learning algorithms.

This tutorial will explain the four chapters of automobile driving mechanics, road definition, artificial sensors, collision detection, simulated traffic, parallel speech and genetic algorithm, and use JavaScript programming to implement the four aspects of perception, positioning, prediction and decision-making in automatic driving without library. main part.

[Neural Network Teaching] Self-built autonomous driving without library using JavaScript

[B station video tutorial portal]https://www.bilibili.com/vide…

[Neural Network Teaching] Self-built autonomous driving without library using JavaScript

【View full code】https://2ef3db1679-share.ligh…
This tutorial has been authorized by the original author to share, and users can directly open the code in the browser to try the code.How do I open and edit projects others have shared with Lightly?

this articleJavaScriptThis is the end of the self-built autonomous driving tutorial without library. Welcome to check the B station video in the article and the complete code in Lightly for a more in-depth and systematic study. You are also welcome to check it out.TeamCodesome of the previous articles. If you have any questions about the content of the article, you are more welcome to leave a message in the comment area to discuss.

What do you think of Python (PyScript) as a browser front-end development language?
Python Tutorial: From Python Crawler to Data Analysis
Learn Python crawlers and crawl web pages through Python