当前位置:网站首页>Deep learning network model

Deep learning network model

2022-06-25 17:59:00 Keep_ Trying_ Go

1. Deep learning network model

(1)DNN(Deep Neural Network, Deep neural network )

(2)RNN(Recurrent Neural Network, Cyclic neural network )

(3)CNN(Convolution Neural Network, Convolutional neural networks )

 Insert picture description here

 Insert picture description here
Mainly used in : speech recognition , Machine translation , Generate image description ;

 Insert picture description here
Mainly you apply to : Image classification , retrieval ; object detection ; Target segmentation ; Face recognition ;


2. Now the mainstream deep learning framework

(1)Google Open source framework of TensorFlow: Use C++ Open source mathematical computing software developed in , Use the form of data flow graph to calculate . And now TensorFlow Also integrates Keras frame , It is more efficient to build the framework ;

(2)Caffe frame : Developed by Jia Yangqing ,Convolutional Architecturefor Fast Feature Embedding, It is a clear and efficient open source deep learning framework .

(3)Theano:Theano The core of is a compiler for mathematical expressions , It knows how to get your structure , And make it a use numpy、 Efficient code for efficient local libraries , Such as BLAS And local code (C++) stay CPU or GPU Run as fast as you can .

(4)MXNet:MXNet The main author of is Li Mu , Now it has become the official framework of Amazon , It has very good distributed support , And the performance is particularly good , Low memory usage , At the same time, the language interface developed by it is not only Python and C++, also R,Matlab,Scala,JavaScript, wait .

(5)Torch:Torch It is a scientific computing framework supported by a large number of machine learning algorithms ,Facebook Open source a lot of Torch Deep learning modules and extensions for .Torch It is characterized by special flexibility , But another special feature is the use of programming language Lua, In depth learning, most of them take Python In the context of programming languages .

(6)Pytorch:PyTorch The predecessor of Torch, Its bottom layer and Torch Frame like , But use Python A lot of things have been rewritten , Not only more flexible , Support dynamic graph , And it provides Python Interface . It is from Torch7 Team development , It's an example. Python Priority deep learning framework , Not only can you achieve powerful GPU Speed up , It also supports dynamic neural networks .

3. Format of file name saved by training model

neural network 、 Deep learning and machine learning model file suffixes :

ONNX (.onnx, .pb, .pbtxt)
Keras (.h5, .keras)
CoreML (.mlmodel)
Caffe2 (predict_net.pb, predict_net.pbtxt)
MXNet (.model, -symbol.json)
TensorFlow Lite (.tflite)

Deep learning framework file suffix :

Caffe (.caffemodel, .prototxt)
PyTorch (.pth)
Torch (.t7)
CNTK (.model, .cntk)
PaddlePaddle(__model__)
Darknet (.cfg)

https://blog.csdn.net/qq_53016081/article/details/119766560


4.Opencv Supported framework

Tensorflow,Pytorch/torch,Caffe,DarkNet

(1)DNN How to use

(1) Read the model ;
(2) Read pictures or videos ;
(3) Convert the picture into a tensor ;
(4) Analyze , The final result ;

(2) Type of imported model

Dnn1=readNetFromTensorflow(model,config);
Dnn2=readNetFromCaffe(config,model);
Dnn3=readNetDarknet,(config,model)YOLO;
Dnn4=readNet(model,[config,[framework]])

 Convert the picture into a tensor 
blobFromImage(image,scalefactor=1.0,size=Size(),mean=Scale(),swapRB=False,crop=False,ddepth=CV_32F)

Image: Input picture ;
Scalefactor: Zoom image size ; When we subtract the average from the picture , You can also scale the remaining pixel values , Its default value is 1, If you want to subtract the average pixel value , All reduced by half , Then you can put scalefactor Set to 1/2.
Size: Specify the size of the picture ;
Mean: The average value that needs to be subtracted from the whole picture , If we need to be right RGB Subtract different values from the three channels of the picture , Then you can use 3 Group average , If only one group is used , By default, the same value will be subtracted from the three channels . Minus the average (mean): In order to eliminate pictures with different illumination in the same scene , The impact on our final classification or neural network , We often think of pictures R、G、B Average the pixels of the channel , Then subtract our average from each pixel value , In this way, we can get the relative value between pixels , You can eliminate the influence of light .
swapRB:R and B Exchange or not , The default value is false;
Crop: Whether to crop the image , The default value is false;
Ddepth: Bit depth of image ;

Send the image to the network for execution and get the result
Net.setInput(blob);
Net.forward();

原网站

版权声明
本文为[Keep_ Trying_ Go]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206251748205933.html