Neural network design based on matlab, deep neural network code matlab

Why when talking about deep learning tools, few people discuss matlab's neural network toolkit

First of all, deep learning is not only very popular in academia, but also has a lot of applications in the industry. This requires that the deep learning framework should be easy to deploy on the server, and this is exactly the weakness of Matlab. Imagine that you use Django as a front-end The page accepts the image input by the user, and the backend interacts with Matlab... Of course, I am not saying that this cannot be achieved. I have also used MATLAB to do the background of the website, and there are countless pitfalls....

Google AI Writing Project: Neural Network Pseudo-Original

What is the meaning of neural network in Matlab, I am a novice, who can explain it in a simple and popular way? Thank you! ! !

The so-called neural network algorithm, as its name implies, is an algorithm that simulates biological neural networks. First, it needs to input some known data into the neural network so that it knows what kind of data belongs to which category (training), and then the unknown The data is input, and the neural network judges it through known data to complete the classification (classification) of writing cats .

It can be used for image recognition and classification; data prediction; curve fitting, etc. It is recommended to find a book on machine learning and artificial intelligence.

Why not use matlab for deep learning?

Matlab can do deep learning, but from a practical point of view, the implementation efficiency of Matlab is relatively low, and the training takes a long time. It is not a wise choice to choose matlab when learning a computer language for the first time. It is better to choose C or Basic as the entry language.

Matlab is a fool-like computer language with a powerful function library, which can easily perform image processing, mathematical calculation (including the operation of expressions composed of symbolic variables), simulation and so on.

MATLAB is a computer programming language. Its name comes from Matrix Laboratory. Its original intention is to process computer data in the form of matrix. It integrates numerical calculation and visualization environment together. It is very intuitive and provides a large number of functions. More and more people like it, there are more and more toolboxes, and the range of applications is more and more extensive.

Hello, I would like to ask about the neural network problem in matlab

Not sure what you mean by asking. Let me try to answer. P1 represents the first input, and P2 represents the second input. After training, input the two inputs into the network, and the network will output the target goal.

In fact, there is a function goal = f(p1, p2), when you input this P1, P2, you will get the goal according to the function.

BP neural network OCR recognition in matlab?

The analysis of the error rate alone does not reveal anything. It may be that the sample size is too small, or it may be other reasons. You can take out the wrongly identified samples to see where the mistakes are caused, and then make targeted improvements.

It may also be that the feature engineering is not in place, the feature selection is not good, and the three elements of scale invariance, rotation invariance, and affine invariance are not satisfied. The different positions of the license plate lead to a change in the perspective of the license plate, and then it may not be recognized.

So you can consider finding a better way to describe features, such as HoG (Histogram of Oriented Gradients).

HoG, to put it simply, is that two adjacent pixel values ​​can be subtracted to represent the color change, then there are two pixels around a pixel, and there are two pixels on the top, bottom, left and right, and two subtractions can be performed respectively to get two values , just like two forces in mechanics can be combined, these two values ​​can also be combined to get the direction, and size (that is, the gradient), so that there is a feature of a pixel.

However, there are too many features and the calculation is too heavy, so the statistical method is used to reduce the features. First, the picture is divided into grids, just like drawing Go lines on the image, and then each grid is counted separately, the direction What is the sum of the gradients of the pixels within the 0-20 angle, and so on, to get the histogram, if 20 degrees is a histogram, then 180 degrees can be divided into 9 histograms, that is, 9 features, The number of features in such a grid has nothing to do with the number of pixels, but is fixed.

Then there are other methods about HoG, such as normalizing the feature vector in order to eliminate illumination changes.

In addition, HoG can also be visualized. In each square, the direction and length of the line are used to replace the direction and gradient of the feature. The final effect is that there are several squares, and each square seems to have a line along the origin. Symmetrical stars, this is helpful for analyzing the effect of the algorithm.

HoG is a relatively common feature descriptor, and it is used more in pedestrian detection. In addition to HoG, there are feature descriptors such as SIFT and SURF. These are the contents of computer vision and belong to the category of feature detection.

Computer vision mainly includes some basic methods such as binarization, filter, feature detection, and feature matching, and then specific application algorithms such as image filter, image segmentation, image recognition, and image generation.

Due to the rise of neural networks due to the reduction in computing costs in recent years, the research focus of computer vision has turned to various improvements and performance optimization of deep neural networks. It has been 2005 for HoG.

Regarding license plate recognition (LPR), if the environment is not complicated, it can achieve an accuracy rate close to 100%. If the environment is more complicated, it should be possible to achieve an accuracy rate of more than 95%. In general, the application and commercialization have basically been realized.

The current methods are basically deep learning, end-to-end in one go, without special feature extraction, the traditional pattern recognition method has been GG. Said relatively detailed.

If you only care about the results, you can find some open source projects on license plate recognition on Github, such as openalpr.

How to use neural network in matlab

I am learning to use the matlab deep learning toolkit and want to know how to train

There is a tests folder in the toolkit, where NN.m uses a non-deep learning neural network for training; CNN, DBN, and SAE respectively use convolutional neural network, deep belief network and stack sparse coding to add depth to the neural network. Learned content to extract feature values.

Any program can be run.

matlab neural network

net=newff(pr,[3,2],{'logsig','logsig'}); % create a bp neural network = 10; % show training iterations = 0.05; % learning rate 0,05 = 1e-10 ; % training accuracy net.trainParam.epochs = 50000; % maximum training times net = train(net,p,goal); % training result is either close to 1 or 0, just these two categories, this is the classification result; It's normal to have some variance each time, as long as it's not huge.

Matlab implements neural network 5

 

Guess you like

Origin blog.csdn.net/aifamao3/article/details/127443693