当前位置:网站首页>Building lightweight target detection based on mobilenet-yolov4

Building lightweight target detection based on mobilenet-yolov4

2022-06-27 03:46:00 @BangBang

Network replacement implementation ideas

1、 Network structure analysis and replacement thinking analysis

 Insert picture description here
about YoloV4 for , The whole network structure can be divided into three parts .
Namely :

  • 1、 Backbone feature extraction network Backbone, Corresponding to... On the image CSPdarknet53
  • 2、 Strengthen the feature extraction network , Corresponding to... On the image SPP and PANet
  • 3、 Prediction network YoloHead, Use the obtained features to predict

among :

  • The first part is the function of the backbone feature extraction network , Extract network information using backbone features , We can obtain three preliminary effective feature layers .
  • The second part is to enhance the function of feature extraction network , Using enhanced feature extraction network , We can perform feature fusion on three preliminary effective feature layers , Extract better features , Get three more effective feature layers .
  • The function of the third part of the prediction network is to obtain the prediction results by using a more effective and effective entire layer .

In these three parts , The first 1 Section and section 2 Parts can be modified more easily . The first 3 Some modifiable parts are of little significance , After all, it's just 3x3 Convolution sum 1x1 The combination of convolutions .

mobilenet A series of networks can be used for classification , Its main part is used for feature extraction , We can use mobilenet Series network replaces yolov4 In the middle of CSPdarknet53 Feature extraction , Make the three preliminary effective feature layers the same shape Feature layer to enhance feature extraction , Can will mobilenet Series replacement into yolov4 In the middle .

3、 Integrate the feature extraction results into yolov4 In the Internet

 Insert picture description here
about yolov4 Speaking of , We need to use the three effective features obtained from the backbone feature extraction network to strengthen the construction of the feature pyramid .

Use the... Defined in the previous step MobilenetV1、MobilenetV2、MobilenetV3 Three functions, we can get each Mobilenet Three effective feature layers corresponding to the network .

We can use these three effective feature layers to replace the original yolov4 Backbone network CSPdarknet53 Effective feature layer .

In order to further reduce the number of parameters , We can use deep separable convolution instead of yoloV4 The common convolution used in .

4、 Modify the enhanced feature extraction network PAnet, Reduce the amount of network parameters

about PAnet The parameters of are mainly concentrated in 3x3 In convolution of , If you can 3x3 Convolution is modified , The parameter quantity can be greatly reduced . utilize Deep separable structure is fast Replace 3x3 Convolution

5. Modify convolution kernel magnification factor alpha

Convolution kernel magnification factor alpha, Control the number of convolution kernels , Modifying this parameter can reduce the number of convolution kernels , Thus reducing the amount of network parameters

See blog :Tensorflow2 utilize mobilenet series (v1,v2,v3) build yolov4 Target detection platform
github Source code :https://github.com/bubbliiiing/mobilenet-yolov4-tf2

B Stop video :Tensorflow2 Build your own Mobilenet-YoloV4 Target detection platform

原网站

版权声明
本文为[@BangBang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270338335893.html