CN110009096A - Target detection network model optimization method based on embedded device - Google Patents
Target detection network model optimization method based on embedded device Download PDFInfo
- Publication number
- CN110009096A CN110009096A CN201910168788.XA CN201910168788A CN110009096A CN 110009096 A CN110009096 A CN 110009096A CN 201910168788 A CN201910168788 A CN 201910168788A CN 110009096 A CN110009096 A CN 110009096A
- Authority
- CN
- China
- Prior art keywords
- model
- network model
- target detection
- convolution
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Image Analysis (AREA)
Abstract
Present invention implementation discloses a kind of target detection network model optimization method based on embedded device, and wherein method includes the following steps: based on the target constant in variable element alternative networks model;The parameter value that the variable element is arranged in power is calculated according to the equipment of currently embedded formula equipment;Model optimization processing is carried out to the network model according to the parameter value of the variable element, determines the aspect of model of the network model.Using the present invention, by the way that part-structure configuration parameter in network model is turned to the hyper parameter factor, detection algorithm is improved in conjunction with low calculation power embedded device feature, flexible configuration can be carried out towards different calculation power embedded devices, realize real-time target detection.
Description
Technical field
The present invention relates to computer vision model optimization technical fields, and in particular to a kind of target based on embedded device
Detect network model optimization method.
Background technique
Target detection is one of basic algorithm of computer vision, can greatly be mentioned by constructing convolutional neural networks model
The precision of high target detection, the network model usually with more parameters, labyrinth can obtain better performance index, but
Also more storages, computing cost are brought, model is caused to be difficult to be especially low calculation power embedded device platform in embedded device
Upper smooth operation.
Summary of the invention
The embodiment of the present invention provides a kind of target detection network model optimization method based on embedded device, by by net
Part-structure configuration parameter turns to the hyper parameter factor in network model, in conjunction with low calculation power embedded device feature to detection algorithm into
It has gone improvement, flexible configuration can have been carried out towards different calculation power embedded devices, realize real-time target detection.
The embodiment of the present invention provides a kind of target detection network model optimization method based on embedded device, comprising:
Based on the target constant in variable element alternative networks model;
The parameter value that the variable element is arranged in power is calculated according to the equipment of currently embedded formula equipment;
Model optimization processing is carried out to the network model according to the parameter value of the variable element, determines the network mould
The aspect of model of type.
It is further:
The target constant is the port number in the network model;
The variable element is channel parameters.
Further, above-mentioned model optimization method further include:
The quantity that power adjusts depth block in the network model is calculated according to the equipment;
According to the aspect of model of network model described in the quantity optimization of depth block described after adjustment.
Further, the process of the model optimization processing includes first the second convolution of convolution sum, above-mentioned model optimization side
Method further include:
First convolution is carried out according to the parameter value of default convolution step-length and the channel parameters;
Second convolution is carried out according to the parameter value of the channel parameters.
Further, above-mentioned model optimization method further include:
It is quickly down-sampled to the shallow characteristic layer progress of the network model, take out the first semantic letter of target detection data
Breath and the first spatial information;
The layering superposition processing that Scale invariant is carried out to the deep characteristic layer of the network model, obtains the target detection number
According to the second semantic information and second space information.
Further, above-mentioned model optimization method further include:
Target anchor point of the target detection data on the aspect of model is determined using anchor point generating algorithm;
The testing result of the target detection data is determined according to the target anchor point.
It is further:
The anchor point generating algorithm is fixed aspect ratio algorithm and/or cluster generating algorithm.
Further, target of the target detection data on the aspect of model is being determined using joint anchor point generating algorithm
Before anchor point, above-mentioned model optimization method further include:
It is according to the Morphological Features of the target detection data that the fixed aspect ratio algorithm and/or cluster generating algorithm is true
It is set to anchor point generating algorithm.
Further, above-mentioned model optimization method further include:
Quantification treatment is carried out to the model parameter in the network model, to reduce weight parameter in the network model
Size.
Further, above-mentioned model optimization method further include:
The aspect of model is detected using detection algorithm for the target detection data, output test result.
In the embodiment of the present invention, by the way that the part-structure configuration parameter in network model is turned to the hyper parameter factor, according to
The characteristics of target detection data, carries out Structured Design optimization and compression to network model, and combines low calculation power embedded device special
Point improves detection algorithm, has carried out flexible configuration towards different calculation power embedded devices, realizes real-time target detection.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of target detection network model optimization method based on embedded device disclosed by the embodiments of the present invention
Flow diagram;
Fig. 2 is a kind of convolution process schematic diagram disclosed by the embodiments of the present invention;
Fig. 3 is another convolution process schematic diagram disclosed by the embodiments of the present invention;
Fig. 4 is anchor point display effect schematic diagram disclosed by the embodiments of the present invention;
Fig. 5 is a kind of parameter quantization schematic diagram disclosed by the embodiments of the present invention;
Fig. 6 is another target detection network model optimization method based on embedded device disclosed by the embodiments of the present invention
Flow diagram.
Specific embodiment
Below in conjunction with the attached drawing in embodiment of the present invention, the technical solution in embodiment of the present invention is carried out clear
Chu is fully described by.Obviously, described embodiment is a part of embodiment of the invention, rather than whole embodiment party
Formula.Based on the embodiment in the present invention, those of ordinary skill in the art are obtained without making creative work
The every other embodiment obtained, all should belong to the scope of protection of the invention.
Referring to Fig. 1, Fig. 1 is a kind of target detection network model based on embedded device disclosed by the embodiments of the present invention
The flow diagram of optimization method.As shown in Figure 1, model optimization method as described in this embodiment, comprising steps of
S101, based on the target constant in variable element alternative networks model.
It is understood that above-mentioned network model can be convolutional neural networks (Convolution Neural
Network, CNN) model, the model constants, which can be, selected during model optimization has model optimization influence power
Constant, for example, it may be the port number in CNN model.Port number can be replaced with constant with variable element k.
S102 calculates the parameter value of power setting variable element according to the equipment of currently embedded formula equipment.
It is understood that the calculation power of embedded device is not generally high, can be set according to the different embedded devices for calculating power
Determine the different parameters value of variable element, for example, when equipment calculate power it is lower when can by the parameter value of variable element be arranged it is smaller,
The parameter value of variable element can be arranged when equipment calculation power is higher slightly larger.
S103 carries out model optimization processing to the network model according to parameter value, determines the aspect of model of network model.
It is understood that above-mentioned network model is a CNN model, which is joined by continuous convolution implementation model
Several training determine the aspect of model.In model convolution is crossed into, can according to the parameter value of variable element to network model into
The processing of row model optimization.The above-mentioned aspect of model can characterize the data-handling capacity of network model.
In the specific implementation, the process of model optimization processing may include two convolution process: first the second convolution of convolution sum,
For example, the first convolution Dept shown in dark-background in Fig. 2, the second convolution process of convolution Conv two.Implement in the present invention
In example, the convolution process of the first convolution can be carried out according to the parameter value k of default convolution step-length s and channel parameters, wherein default
Convolution step-length can be s=2, and the parameter value k of channel parameters calculates power according to the equipment of currently embedded formula equipment and determines, specifically may be used
To calculate the corresponding k value of power with reference to distinct device.Further, the second convolution can be carried out according to the parameter value k value of channel parameters
Convolution process.For example, s=1 in the convolution process of the first convolution Dept, convolution process 3x3x1, there is k, respectively to k
Channel carries out convolution;The convolution process of second convolution Conv is 1x1x1, there is 2k, is needed to input convolution 2k times, it is possible to understand that
, each convolution obtains an output channel, can finally export the port number of 2k.It should be noted that above-mentioned two volume
Product process is the convolution operation carried out for characteristic layer shallow in network model, corresponding convolution process shown in Fig. 2, due to shallow feature
The rate respectively of target detection data is higher in layer, and smaller selected convolution kernel is 2 times of port numbers, wherein target detection data
It can be the picture to be detected inputted.
Further, two convolution process, such as Fig. 3 dark-background can also be corresponded to for the deep characteristic layer of network model
Shown in process: the first convolution Dept, the second convolution Conv.It is understood that can be adopted using fast prompt drop in shallow characteristic layer
Sample takes out the first semantic information and the first spatial information of target detection data, during above-mentioned down-sampled, target inspection
The resolution ratio of measured data constantly reduces, and biggish convolution kernel can be used (for example, convolution shown in Fig. 3 is crossed into deep characteristic layer
In, convolution kernel is 8 times of port numbers) carry out above-mentioned convolution operation.It should be noted that repeatedly down-sampled allow characteristic layer to be taken out
The first semantic information compared with horn of plenty, but will cause the loss of the first spatial information.
Further, the layering superposition processing that Scale invariant can be carried out to the deep characteristic layer of network model, obtains target
The second semantic information and second space information of detection data.Exist it is understood that above-mentioned second space information is relatively abundant
Certain probability can make up for it the loss of above-mentioned first spatial information.
In an alternative embodiment, the quantity that power adjusts depth block in above-mentioned network model can also be calculated according to above equipment,
It should be noted that above-mentioned depth block can be the data block that each convolutional layer in CNN model participates in convolution, such as in Fig. 2
Depth block Depth Block includes two convolution process Dept and Conv.It further, can be according to the number of depth block after adjustment
The aspect of model of amount optimization network model, for example, the convolution number of plies for needing to carry out reduces after depth number of blocks is reduced, it can be with
Have and reaches explicit model compression effectiveness.
In an alternative embodiment, it can determine target detection data on the above-mentioned aspect of model using anchor point generating algorithm
Target anchor point further can determine the testing result of target detection data according to target anchor point.On it is understood that
Stating anchor point generating algorithm can be the joint of fixed aspect ratio algorithm and cluster generating algorithm.Optionally, it can be examined according to target
The Morphological Features of measured data by above-mentioned fixed aspect ratio algorithm, cluster generating algorithm in one or two be determined as anchor together
Point-generating algorithm.For example, Fig. 4 is the target anchor point determined using above-mentioned anchor point generating algorithm, the anchor that 3 dotted lines indicate in Fig. 4
Point can be the anchor point determined using above-mentioned fixed aspect ratio algorithm, and the anchor point that three solid lines indicate can be using above-mentioned cluster
The anchor point that generating algorithm determines.
In an alternative embodiment, quantification treatment can be carried out to the model parameter in above-mentioned network model, to reduce network
The size of weight parameter in model.Such as process shown in fig. 5,32 floating numbers can be mapped as to one 8 integers.
In an alternative embodiment, the aspect of model can be detected using detection algorithm for target detection data, root
According to the accuracy and real-time output test result of the target detection data detected.After the above process can be verifying optimization
Network model whether reached preferable acceleration and compression effectiveness, i.e., whether improve the timeliness of target detection.
In the embodiment of the present invention, by the way that the part-structure configuration parameter in network model is turned to the hyper parameter factor, according to
The characteristics of target detection data, carries out Structured Design optimization and compression to network model, and combines low calculation power embedded device special
Point improves detection algorithm, has carried out flexible configuration towards different calculation power embedded devices, realizes real-time target detection.
Fig. 6 is a kind of target detection network model optimization method based on embedded device provided in an embodiment of the present invention
Flow diagram.As shown in fig. 6, model optimization method as described in this embodiment, comprising steps of
S201, the size of adjustment input picture.
S202, grouping convolution are quickly down-sampled.
S203, Scale invariant grouping superposition.
S204, stage algorithm of target detection optimization.
S205 executes detection algorithm.
S206 exports result.
It should be noted that step S201-S206 can correspond to the step in above method embodiment, specifically may refer to
Description in above-described embodiment, details are not described herein again.
In the specific implementation of the embodiment of the present invention, think in convolutional neural networks shallow-layer need stop with
Extract more shallow-layer features, to form semantic information abundant in deep layer, but due to shallow-layer often resolution ratio compared with
Greatly, bottleneck is readily formed on low calculation power embedded device.The shallow-layer feature of usually shallow characteristic layer can indicate are as follows:
Wherein, IwFor target detection data, that is, original image resolution width, IhFor target detection data, that is, original image high resolution
Degree, 2nFor down-sampled multiple.It should be noted that 8 times of resolution decreasing can be defined, it is suitable for shallow characteristic layer, Ke Yiding
The resolution decreasing of 8 times to 16 times of justice is suitable for deep characteristic layer.
In the embodiment of the present invention, by the way that part-structure configuration parameter in network model is turned to the hyper parameter factor, according to mesh
The characteristics of marking detection data carries out Structured Design optimization and compression to network model, and combines low calculation power embedded device feature
Detection algorithm is improved, has carried out flexible configuration towards different calculation power embedded devices, realizes real-time target detection.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.
Claims (10)
1. a kind of target detection network model optimization method based on embedded device characterized by comprising
Based on the target constant in variable element alternative networks model;
The parameter value that the variable element is arranged in power is calculated according to the equipment of currently embedded formula equipment;
Model optimization processing is carried out to the network model according to the parameter value of the variable element, determines the network model
The aspect of model.
2. according to the method described in claim 1, it is characterized by:
The target constant is the port number in the network model;
The variable element is channel parameters.
3. the method according to claim 1, wherein the method also includes:
The quantity that power adjusts depth block in the network model is calculated according to the equipment;
According to the aspect of model of network model described in the quantity optimization of depth block described after adjustment.
4. according to the method described in claim 2, it is characterized in that, the process of model optimization processing includes the first convolution sum
Second convolution, the method also includes:
First convolution is carried out according to the parameter value of default convolution step-length and the channel parameters;
Second convolution is carried out according to the parameter value of the channel parameters.
5. the method according to claim 1, wherein the method also includes:
The shallow characteristic layer of the network model is carried out it is quickly down-sampled, take out target detection data the first semantic information and
First spatial information;
The layering superposition processing that Scale invariant is carried out to the deep characteristic layer of the network model, obtains the target detection data
Second semantic information and second space information.
6. according to the method described in claim 5, it is characterized in that, the method also includes:
Target anchor point of the target detection data on the aspect of model is determined using anchor point generating algorithm;
The testing result of the target detection data is determined according to the target anchor point.
7. according to the method described in claim 6, it is characterized by:
The anchor point generating algorithm is fixed aspect ratio algorithm and/or cluster generating algorithm.
8. the method according to the description of claim 7 is characterized in that determining target detection number using joint anchor point generating algorithm
Before the target anchor point on the aspect of model, the method also includes:
The fixed aspect ratio algorithm and/or cluster generating algorithm are determined as according to the Morphological Features of the target detection data
Anchor point generating algorithm.
9. the method according to claim 1, wherein the method also includes:
Quantification treatment is carried out to the model parameter in the network model, to reduce the big of weight parameter in the network model
It is small.
10. according to the method described in claim 6, it is characterized in that, the method also includes:
The aspect of model is detected using detection algorithm for the target detection data, output test result.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910168788.XA CN110009096A (en) | 2019-03-06 | 2019-03-06 | Target detection network model optimization method based on embedded device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910168788.XA CN110009096A (en) | 2019-03-06 | 2019-03-06 | Target detection network model optimization method based on embedded device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN110009096A true CN110009096A (en) | 2019-07-12 |
Family
ID=67166511
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910168788.XA Pending CN110009096A (en) | 2019-03-06 | 2019-03-06 | Target detection network model optimization method based on embedded device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110009096A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111695483A (en) * | 2020-06-05 | 2020-09-22 | 腾讯科技(深圳)有限公司 | Vehicle violation detection method, device and equipment and computer storage medium |
| CN117929998A (en) * | 2023-12-15 | 2024-04-26 | 南京理工大学 | Electrical fault diagnosis method under PMSM different working conditions and different noise environments |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107688855A (en) * | 2016-08-12 | 2018-02-13 | 北京深鉴科技有限公司 | It is directed to the layered quantization method and apparatus of Complex Neural Network |
| CN107748913A (en) * | 2017-11-09 | 2018-03-02 | 睿魔智能科技(东莞)有限公司 | A general miniaturization method for deep neural networks |
| CN108243216A (en) * | 2016-12-26 | 2018-07-03 | 华为技术有限公司 | Method, end side equipment, cloud side apparatus and the end cloud cooperative system of data processing |
| CN108304920A (en) * | 2018-02-02 | 2018-07-20 | 湖北工业大学 | A method of multiple dimensioned learning network is optimized based on MobileNets |
-
2019
- 2019-03-06 CN CN201910168788.XA patent/CN110009096A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107688855A (en) * | 2016-08-12 | 2018-02-13 | 北京深鉴科技有限公司 | It is directed to the layered quantization method and apparatus of Complex Neural Network |
| CN108243216A (en) * | 2016-12-26 | 2018-07-03 | 华为技术有限公司 | Method, end side equipment, cloud side apparatus and the end cloud cooperative system of data processing |
| CN107748913A (en) * | 2017-11-09 | 2018-03-02 | 睿魔智能科技(东莞)有限公司 | A general miniaturization method for deep neural networks |
| CN108304920A (en) * | 2018-02-02 | 2018-07-20 | 湖北工业大学 | A method of multiple dimensioned learning network is optimized based on MobileNets |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111695483A (en) * | 2020-06-05 | 2020-09-22 | 腾讯科技(深圳)有限公司 | Vehicle violation detection method, device and equipment and computer storage medium |
| CN117929998A (en) * | 2023-12-15 | 2024-04-26 | 南京理工大学 | Electrical fault diagnosis method under PMSM different working conditions and different noise environments |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112529146B (en) | Methods and devices for neural network model training | |
| CN110533631B (en) | SAR Image Change Detection Method Based on Pyramid Pooling Siamese Network | |
| CN110287932B (en) | Road blocking information extraction method based on deep learning image semantic segmentation | |
| US20200293892A1 (en) | Model test methods and apparatuses | |
| CN110826684B (en) | Compression method, apparatus, electronic device and medium for convolutional neural network | |
| JP2023523029A (en) | Image recognition model generation method, apparatus, computer equipment and storage medium | |
| CN109886397A (en) | A kind of neural network structure beta pruning compression optimization method for convolutional layer | |
| CN111209921A (en) | License plate detection model based on improved YOLOv3 network and construction method | |
| CN112990336B (en) | Deep three-dimensional point cloud classification network construction method based on competitive attention fusion | |
| CN110084155B (en) | Method, device and equipment for counting dense people and storage medium | |
| CN112330684B (en) | Object segmentation method and device, computer equipment and storage medium | |
| CN107316066A (en) | Image classification method and system based on multi-path convolutional neural networks | |
| CN114677673A (en) | A Potato Disease Recognition Method Based on Improved YOLO V5 Network Model | |
| CN106600595A (en) | Human body characteristic dimension automatic measuring method based on artificial intelligence algorithm | |
| CN110020724A (en) | A kind of neural network column Sparse methods based on weight conspicuousness | |
| CN112598129A (en) | Adjustable hardware-aware pruning and mapping framework based on ReRAM neural network accelerator | |
| TWI717655B (en) | Feature determination apparatus and method adapted to multiple object sizes | |
| CN113724245A (en) | Method and system for detecting welding spot defects of PCB plug-in and storage medium thereof | |
| CN117930012A (en) | Battery consistency assessment method and device, computer equipment and storage medium | |
| CN110009096A (en) | Target detection network model optimization method based on embedded device | |
| CN114638809A (en) | Multi-scale micro-defect detection method based on PA-MLFPN workpiece surface | |
| CN118333108B (en) | A 4-bit quantization method for convolutional neural network input activation values | |
| CN114492798A (en) | Convolutional Neural Network Pruning Method Based on Kernel Similarity and Non-Maximum Suppression Algorithm | |
| CN116664917B (en) | Image classification method based on Cot-cirConvNeXt network | |
| CN112598663A (en) | Grain pest detection method and device based on visual saliency |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190712 |