CN109344921A - A kind of image-recognizing method based on deep neural network model, device and equipment - Google Patents

A kind of image-recognizing method based on deep neural network model, device and equipment Download PDF

Info

Publication number
CN109344921A
CN109344921A CN201910004752.8A CN201910004752A CN109344921A CN 109344921 A CN109344921 A CN 109344921A CN 201910004752 A CN201910004752 A CN 201910004752A CN 109344921 A CN109344921 A CN 109344921A
Authority
CN
China
Prior art keywords
network model
neural network
deep neural
channel
loss function
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.)
Granted
Application number
CN201910004752.8A
Other languages
Chinese (zh)
Other versions
CN109344921B (en
Inventor
谭明奎
吴希贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Pole Intelligent Technology Co Ltd
Original Assignee
Hunan Pole Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hunan Pole Intelligent Technology Co Ltd filed Critical Hunan Pole Intelligent Technology Co Ltd
Priority to CN201910004752.8A priority Critical patent/CN109344921B/en
Publication of CN109344921A publication Critical patent/CN109344921A/en
Application granted granted Critical
Publication of CN109344921B publication Critical patent/CN109344921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of image-recognizing methods based on deep neural network model, this method comprises: obtaining target image to be identified;Target image is input to, deep neural network model is carried out in the object module obtained after the beta pruning of channel using the characterization ability in channel;Classification processing is carried out to target image using the subsidiary classification device in object module, obtains recognition result.Since the object module of recognition target image is the model after the characterization ability based on channel carries out beta pruning, thus, calculation amount when identifying to target image can be greatly lowered.The invention also discloses a kind of pattern recognition device based on deep neural network model, equipment and readable storage medium storing program for executing, have corresponding technical effect.

Description

A kind of image-recognizing method based on deep neural network model, device and equipment
Technical field
The present invention relates to intelligent identification technology fields, know more particularly to a kind of image based on deep neural network model Other method, apparatus, equipment and readable storage medium storing program for executing.
Background technique
Currently, deep neural network model is most important in the identification of the image classifications such as image classification, recognition of face.However, Deep neural network has the characteristics that parameter is more, computationally intensive, causes a large amount of memory requirements and computation burden, so that deep Degree neural network model is difficult to apply in storage and the limited such as mobile phone hardware device of computing resource.
In conclusion the problems such as how efficiently solving the calculation amount for reducing image recognition, is current those skilled in the art Member's technical problem urgently to be solved.
Summary of the invention
The object of the present invention is to provide a kind of image-recognizing method based on deep neural network model, device, equipment and Readable storage medium storing program for executing, to realize calculation amount when reducing the image recognition based on deep neural network model.
In order to solve the above technical problems, the invention provides the following technical scheme:
A kind of image-recognizing method based on deep neural network model, comprising:
Obtain target image to be identified;
The target image is input to after carrying out channel beta pruning to deep neural network model using the characterization ability in channel and is obtained In the object module obtained;
Classification processing is carried out to the target image using the subsidiary classification device in the object module, obtains recognition result;
Wherein, the process of the object module is obtained, comprising:
Insertion batch normalization layer, line rectification layer, average pond layer building auxiliary point in the deep neural network model Class device;
The insertion auxiliary loss function in the deep neural network model, and damaged with the reconstruct of the deep neural network model It loses function and constitutes target loss function;
Using the characterization ability of the target loss function the joint passage, the subsidiary classification device is trained, obtains target Model.
Preferably, the insertion auxiliary loss function in the deep neural network model, comprising:
Cross entropy loss function is inserted into the deep neural network model.
Preferably, the characterization ability using the target loss function the joint passage, to the subsidiary classification device into Row training, obtains object module, comprising:
Using the characterization ability of the target loss function and the joint passage, select in the deep neural network model wait cut The redundant channel of branch;
In the deep neural network model, the redundant channel is cut off, obtains object module.
Preferably, the characterization ability using the target loss function and the joint passage, in the depth nerve net Redundant channel of the selection to beta pruning in network model, comprising:
Obtain the channel selecting vector for characterizing the importance in each channel in the deep neural network model;
The channel selecting vector sum model parameter is optimized using the target loss function;
The channel that the vector element of channel selecting vector after optimization is 0 is determined as redundant channel.
Preferably, it is described using the target loss function to the channel selecting vector sum model parameter of the important channel It optimizes, comprising:
Training sample is randomly choosed, and utilizes stochastic gradient descent algorithm and greedy algorithm, enables target loss functionConvergence;Wherein,To reconstruct loss function,For specified auxiliary loss letter Number,For model parameter, β is channel selecting vector;λ is the weight of the specified auxiliary loss function.
A kind of pattern recognition device based on deep neural network model, comprising: target image obtains module, target image Input module, Classification and Identification module and object module obtain module,
Wherein, the target image obtains module, for obtaining target image to be identified;
The target image input module, for the target image to be input to the characterization ability using channel to depth nerve Network model carries out in the object module obtained after the beta pruning of channel;
The Classification and Identification module, for being classified using the subsidiary classification device in the object module to the target image Processing obtains recognition result;
The object module obtains module, comprising:
Subsidiary classification device construction unit, for insertion batch the normalization layer, line rectification in the deep neural network model Layer, average pond layer building subsidiary classification device;
Assist loss function be inserted into unit, in the deep neural network model insertion auxiliary loss function, and with institute The reconstruct loss function for stating deep neural network model constitutes target loss function;
Training unit carries out the subsidiary classification device for the characterization ability using the target loss function the joint passage Training obtains object module.
A kind of image recognition apparatus based on deep neural network model, comprising:
Memory, for storing computer program;
Processor realizes the above-mentioned image-recognizing method based on deep neural network model when for executing the computer program The step of.
A kind of readable storage medium storing program for executing is stored with computer program, the computer program quilt on the readable storage medium storing program for executing The step of processor realizes the above-mentioned image-recognizing method based on deep neural network model when executing.
Using method provided by the embodiment of the present invention, target image to be identified is obtained;Target image is input to benefit Deep neural network model is carried out in the object module obtained after the beta pruning of channel with the characterization ability in channel;Utilize object module In subsidiary classification device to target image carry out classification processing, obtain recognition result.
Target image to be identified is obtained, target image is then input to the characterization ability using channel to depth nerve Network model carries out in the object module obtained after the beta pruning of channel.I.e. the object module is the characterization ability using channel to depth It is obtained after neural network model beta pruning.That is, the object module has eliminated the channel of characterization ability difference.Then, sharp Classification processing is carried out to target image with the subsidiary classification device in object module, the recognition result of target image can be obtained.By It is that the characterization ability based on channel carries out resulting model after beta pruning to deep neural network model in, object module, thus, it is right Calculation amount when target image is identified can be greatly lowered.Simultaneously as the channel that beta pruning is rejected is that characterization ability is poor Channel, thus Classification and Identification is carried out to target image using the deep neural network model after beta pruning, it can't reduce final The accuracy rate of recognition result.Further, channel beta pruning having been carried out due to the object module, calculation amount can be greatly lowered, because And the image-recognizing method provided by the embodiment of the present invention based on deep neural network model can be applied to such as smart phone Etc. in the effective hardware device of computing resources.
Correspondingly, the embodiment of the invention also provides with the above-mentioned image-recognizing method phase based on deep neural network model The corresponding pattern recognition device based on deep neural network model, equipment and readable storage medium storing program for executing, have above-mentioned technique effect, Details are not described herein.
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 implementing procedure of the image-recognizing method based on deep neural network model in the embodiment of the present invention Figure;
Fig. 2 is a kind of deep neural network model for inserting subsidiary classification device and assisting loss function in the embodiment of the present invention Schematic network structure;
Fig. 3 is beta pruning schematic diagram in channel in the embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of the pattern recognition device based on deep neural network model in the embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of the image recognition apparatus based on deep neural network model in the embodiment of the present invention;
Fig. 6 is a kind of specific structure signal of the image recognition apparatus based on deep neural network model in the embodiment of the present invention Figure.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description The present invention is described in further detail.Obviously, described embodiments are only a part of the embodiments of the present invention, rather than Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Embodiment one:
Referring to FIG. 1, Fig. 1 is a kind of process of the image-recognizing method based on deep neural network model in the embodiment of the present invention Figure, method includes the following steps:
S101, target image to be identified is obtained.
Target image to be identified is acquired in real time using target image acquisition equipment, can also be set in pre-set storage Standby middle reading target image to be identified.Target image can be to be identified to be acquired in real time using image capture devices such as cameras Image.
S102, target image is input to the characterization ability using channel to deep neural network model progress channel beta pruning In the object module obtained afterwards.
Can be in advance to deep neural network model, the characterization ability based on channel carries out channel beta pruning, and then obtains mesh Mark model.Then, after obtaining target image, target image can be input in object module.Due to object module base Characterization ability in channel, has carried out channel beta pruning, thus compared to general neural network model for, which can be It is run on the relatively small number of hardware device of computing resource, such as smart phone, tablet computer etc..
Preferably, in order to improve the accuracy rate of recognition result, target image is being input to predetermined depth neural network mould Before type, the pretreatment such as dimensionality reduction, denoising can also be carried out to target image.For example, if target image to be identified is cromogram Picture, and after executing step S101, an incomplete color image to be identified is obtained, it at this time can be first with common figure As modification technology repairs the incompleteness color image, and the image after reparation is subjected to binaryzation and then by binaryzation Image be input in predetermined depth neural network model.
Object module can be obtained by executing following steps:
Step 1: insertion batch normalization layer, line rectification layer, average pond layer building auxiliary in deep neural network model Classifier;
Step 2: the insertion auxiliary loss function in deep neural network model, and damaged with the reconstruct of deep neural network model It loses function and constitutes target loss function;
Step 3: being trained using the characterization ability of target loss function the joint passage to subsidiary classification device, target mould is obtained Type.
It is illustrated for ease of description, below combining above three step.
Fig. 2 is referred to, Fig. 2 is a kind of depth for inserting subsidiary classification device and assisting loss function in the embodiment of the present invention The schematic network structure of neural network model, wherein Conv is convolutional layer, and BatchNorm is batch normalization layer, and ReLU is Line rectification layer, AvgPooling are average pond layer, and Softmax is that softmax loss classification function is (i.e. described below Assist loss function).When obtaining object module, batch normalization layer, line rectification can be inserted into deep neural network model Layer, average pond layer building subsidiary classification device, and insertion auxiliary loss function.Each layer is inserted in deep neural network model The auxiliary loss function entered must be same functions.
The auxiliary loss function of insertion can collectively form target loss function with reconstruct loss function.Then, target is utilized The characterization ability of loss function the joint passage is trained subsidiary classification device, i.e., by carrying out beta pruning to channel, with beta pruning mould Type.Specifically, the loss function being trained to subsidiary classification device is original in loss function and deep neural network including assisting Loss function.
S103, classification processing is carried out to target image using the subsidiary classification device in object module, obtains recognition result.
Using the subsidiary classification in goal-selling model, it carries out classification processing to target image, finally available target figure The recognition result of picture.Specifically, recognition result can classify to identify to the article in image, such as Classification of Dangerous.
Using method provided by the embodiment of the present invention, target image to be identified is obtained;Target image is input to benefit Deep neural network model is carried out in the object module obtained after the beta pruning of channel with the characterization ability in channel;Utilize object module In subsidiary classification device to target image carry out classification processing, obtain recognition result.
Target image to be identified is obtained, target image is then input to the characterization ability using channel to depth nerve net Network model carries out in the object module obtained after the beta pruning of channel.I.e. the object module is the characterization ability using channel to depth mind It is obtained after network model beta pruning.That is, the object module has eliminated the channel of characterization ability difference.Then, it utilizes Subsidiary classification device in object module carries out classification processing to target image, can obtain the recognition result of target image.Due to, Object module, which is the characterization ability based on channel, carries out resulting model after beta pruning to deep neural network model, thus, to mesh Calculation amount when logo image is identified can be greatly lowered.Simultaneously as the channel that beta pruning is rejected is the logical of characterization ability difference Road, thus Classification and Identification is carried out to target image using the deep neural network model after beta pruning, final knowledge can't be reduced The accuracy rate of other result.Further, channel beta pruning having been carried out due to the object module, calculation amount can be greatly lowered, thus Image-recognizing method provided by the embodiment of the present invention based on deep neural network model can be applied to such as smart phone In the effective hardware device of computing resource.
It should be noted that can be VGG and ResNet model by deep neural network model as described above.? After VGG and ResNet model carries out beta pruning, and surveyed on CIFAR10, the large data collection of the classics such as ILSVRC-12 Examination is carried out discovery when performance compares by calculating top-1 error and top-5 error, is mentioned using the embodiment of the present invention The obtained recognition result of the image-recognizing method based on deep neural network model supplied, still can keep even more than base The performance of quasi-mode type (the neural neural network model of i.e. non-beta pruning).
Embodiment two:
For convenient for those skilled in the art understand that technical solution provided by the embodiment of the present invention, below in deep neural network It is auxiliary to being inserted into deep neural network model for the auxiliary loss function being inserted into model is specially cross entropy loss function Loss function is helped to be described in detail.
It is inserted into deep neural network modelA auxiliary loss function, enableIndicate Insertion position, whereinIndicate the last layer.UseA loss functionToLayer Carry out channel selecting.
It enablesIndicate corresponding theThe input feature vector figure of a input sample corresponds to theA cross entropy loss function It is defined as follows:, whereinIndicate exponential function,Indicate the weight of full articulamentum,Indicate the quantity of classification,For the quantity of the input channel of full articulamentum.
It should be noted that huge calculating cost will be brought due to being inserted into too many auxiliary loss function, it is inserting It, can be in the only insertion loss function behind the layer of part when entering loss function.That isValue not be the bigger the better,'s Value can be adjusted according to the depth of network, such as when depth is big, can use the larger value.Corresponding common depth network model,Value can in [2,5], such as VGG and ResNet18,Value can take 2, and ResNet50 then can be set to 3。
In this way, the insertion auxiliary loss function in deep neural network model can be completed.
Wherein, using the characterization ability of target loss function the joint passage, subsidiary classification device is trained, obtains target mould Type specifically includes:
Step 1: being selected in deep neural network model wait cut using the characterization ability of target loss function and the joint passage The redundant channel of branch;
Step 2: cutting off redundant channel in deep neural network model, object module is obtained.
Above-mentioned two step to be combined be illustrated below convenient for model.
When being well on to subsidiary classification device, that is, to deep neural network model carry out beta pruning when, can use The characterization ability of target loss function and the joint passage selects the channel in deep neural network model, it may be determined that go out to The redundant channel of beta pruning.And after determining redundant channel, redundant channel is cut off, it is more compact so to obtain structure Object module.
Preferably, for ease of calculation, channel selecting vector can be used to indicate to each in deep neural network model The characterization ability in channel.I.e. in the characterization ability using target loss function and the joint passage, in deep neural network model The redundant channel to beta pruning is selected, following steps are executed:
Step 1: obtaining the channel selecting vector of the importance in each channel in characterization deep neural network model;
Step 2: being optimized using target loss function to channel selecting vector sum model parameter;
Step 3: the channel that the vector element of channel selecting vector after optimization is 0 is determined as redundant channel.
It is illustrated for ease of description, below combining above three step.
Firstly, the channel selecting vector of the importance in each channel in characterization deep neural network model can be obtained.Specifically , the importance in channel is judged by gradient of the channel selecting vector at zero, gradient is bigger, and importance is bigger.In this way, just One can be converted by the problem of channel selecting to haveThe optimization problem of constraint;Wherein, L0 constrains non-zero element in direction amount Number can make parameter become sparse, be easy to operation.It then, can be using target loss function to channel selecting vector sum model Parameter optimizes;And after optimization, the channel that the vector element of channel selecting vector after optimization is 0 is determined as redundancy Channel.Wherein, vector element refers to the element in vector, and if first element is 1 in vector [1,0], second element is 0.
It should be noted that when being optimized using target loss function to channel selecting vector sum model parameter, every In one step, all auxiliary loss functions will not be used simultaneously, but only consider two loss function-current procedures Assist loss function and former loss function, that is to say, that be with the depth when carrying out beta pruning optimization to depth convolutional neural networks Layer in neural network model is unit, hierarchy optimization.Using target loss function to the channel selecting vector sum of important channel Model parameter optimizes, specially random selection training sample, and utilizes stochastic gradient descent algorithm and greedy algorithm, enables mesh Mark loss functionConvergence;Wherein,To reconstruct loss function,It is specified Loss function is assisted,For model parameter, β is channel selecting vector;λ is the weight of specified auxiliary loss function.That is, can benefit Each channel selecting vector is selected with greedy algorithm, obtains destination channel important in input feature vector figure;In depth mind Beta pruning in network model, is carried out in a manner of only retaining destination channel, obtains beta pruning model.Wherein, loop iteration terminates item Part can restrain for final loss function, specifically, the number of i.e. repetitive cycling iteration reaches the numerical value being first arranged.Repeatedly Generation number can be depending on available accuracy demand, i.e., when accuracy requirement is higher, can multiple loop iteration;Accuracy requirement is lower When, iterative cycles number can be corresponding lower.
Target loss function convergence is calculated using training sample, i.e., using auxiliary loss function and former loss function to mould The process that type is finely adjusted.During fine tuning, all parameters of model will be updated.The trim process can be compensated by cutting Loss in accuracy caused by branch, further suppresses accumulated error.Channel is selected specifically, can be divided into, and channel is selected It selects vector β and model parameter optimized for two big stages.
Wherein, carrying out the choice phase to channel, specifically including: it is each logical to measure to introduce a channel selecting vector β The importance in road selects channel using greedy algorithm, i.e. the gradient by β at zero judges the importance in channel, Gradient is bigger, and importance is bigger.Finally obtain channel important in input feature vector figure.In addition, due to the channel redundancy of different layers Depth is different, therefore, can realize adaptive beta pruning to the influence that model loses by selected channel.Selected in channel During selecting, if model loss is no longer decreased obviously, stop channel selecting in advance, to achieve the purpose that adaptive beta pruning.
Stage is being optimized to channel selecting vector β and model parameter, is being specifically included: random selection batch training sample, Channel selecting vector β and model are joined by stochastic gradient descent algorithm (SGD, Stochastic Gradient Descent) Number W is optimized.Also it can be used small lot gradient descent algorithm (MBGD, Mini-batch Gradient Descent) to logical The selection vector sum model parameter in road optimizes.Pass through, can computational minimization cut The reconstructed error of branch front and back model.Wherein,,It isA input sample andThe spy in a channel Sign figure, and indicate this black norm (Frobenius Norm) of expense Luo Beini therefore, final loss function is defined as:
, wherein λ indicates the weight of corresponding loss function.
After training, the channel of selection is retained according to channel selecting vector β.Specifically, can be right for 0 by vector element The channel for the characterization ability difference answered removes, and obtains the overall compact model of structure.Referring to FIG. 3, Fig. 3 is in the embodiment of the present invention Channel beta pruning schematic diagram, wherein the A in Fig. 3 is corresponding to deep neural network model (i.e. benchmark model) as shown in Figure 2 It is originally inputted characteristic pattern, B and C are the characteristic patterns obtained after the beta pruning of channel, and c and n refer both to number of channels, and w is weight, Kh、KwRespectively Refer to the height and width of convolution kernel.
Ability is characterized using channel in model, directly using the redundant channel in channel beta pruning removal network layer, to subtract The width of few network, realizes the beta pruning of network model.Compared to the method for low-rank approximation and partially connected, channel beta pruning directly changes The width for becoming network, may be directly applied in deep learning frame.Compared to existing channel pruning algorithms to all-network layer all Same beta pruning rate is set, whether the redundancy condition and institute's reserve channel for not considering each network layer are really to model Final classification ability contribute.Channel beta pruning described in the embodiment of the present invention is cut based on the characterization ability in channel Branch, can really remove the redundant channel useless to final classification result.
The above-mentioned image-recognizing method based on deep neural network model has been applied to classical facial recognition data collection On LFW, model beta pruning is carried out to SphereNet using the channel pruning method that the present embodiment is proposed.Recognition result is as follows:
Table 1 is the comparison on CIFAR-10 (wherein "-" indicates that result is not announced).Wherein DCP, DCP-Adapt are the present invention Channel pruning algorithms provided by embodiment, a kind of filter rank beta pruning for deep neural network compression of ThiNet(are calculated Method), Channel pruning(one kind for pre-training model carry out channel cutting (channel pruning) algorithm), The beta pruning of Sliming(model), WM, WM+, Random pruning(machine learning algorithm) be that common other channel beta prunings are calculated Method, this is no longer going to repeat them.
VGGNet, ResNet-56: for deep neural network model mentioned hereinbefore;#Param ↓: the parameter of reduction Amount, #FLOP ↓: the floating-point quantity of reduction;Err.gap (%): the error with benchmark model, positive number indicate that error increases, negative table Show that error declines.
Table 1
Table 2 is the comparison on ILSVRC-12.The top-1 and top-5error(% of pre-training model) it is respectively 23.99 and 7.07 (wherein, "-" indicates that result is not announced).
Table 2
Table 3 is prediction result accuracy rate, and ten foldings of number of parameters, comparison of the floating point arithmetic amount on LFW, different models intersect Verify accuracy rate.FaceNet, DeepFace, VGG, SphereNet-4 are common depth model algorithm.LFW acc. (%) Indicate the accuracy rate on LFW data set.
Table 3
In conjunction with upper table 1, table 2 and table 3, it can be seen that by calculating obtained result accuracy rate, it was confirmed that institute of the embodiment of the present invention The technical solution of offer has practicability (feasibility).
Embodiment three:
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of images based on deep neural network model Identification device, the pattern recognition device described below based on deep neural network model is with above-described based on depth nerve The image-recognizing method of network model can correspond to each other reference.
Shown in Figure 4, which comprises the following modules: target image obtains module 101, target image input module 102, Classification and Identification module 103 and object module obtain module 104;
Wherein, target image obtains module 101, for obtaining target image to be identified;
Target image input module 102, for target image to be input to the characterization ability using channel to deep neural network Model carries out in the object module obtained after the beta pruning of channel;
Classification and Identification module 103 is obtained for carrying out classification processing to target image using the subsidiary classification device in object module Recognition result;
Object module obtains module 104, comprising:
Subsidiary classification device construction unit, for being inserted into batch normalization layer in deep neural network model, line rectification layer, putting down Equal pond layer building subsidiary classification device;
Auxiliary loss function is inserted into unit, for being inserted into auxiliary loss function in deep neural network model, and it is refreshing with depth Reconstruct loss function through network model constitutes target loss function;
Training unit is trained subsidiary classification device for the characterization ability using target loss function the joint passage, obtains Object module.
Using device provided by the embodiment of the present invention, target image to be identified is obtained;Target image is input to benefit Deep neural network model is carried out in the object module obtained after the beta pruning of channel with the characterization ability in channel;Utilize object module In subsidiary classification device to target image carry out classification processing, obtain recognition result.
Target image to be identified is obtained, target image is then input to the characterization ability using channel to depth nerve Network model carries out in the object module obtained after the beta pruning of channel.I.e. the object module is the characterization ability using channel to depth It is obtained after neural network model beta pruning.That is, the object module has eliminated the channel of characterization ability difference.Then, sharp Classification processing is carried out to target image with the subsidiary classification device in object module, the recognition result of target image can be obtained.By It is that the characterization ability based on channel carries out resulting model after beta pruning to deep neural network model in, object module, thus, it is right Calculation amount when target image is identified can be greatly lowered.Simultaneously as the channel that beta pruning is rejected is that characterization ability is poor Channel, thus Classification and Identification is carried out to target image using the deep neural network model after beta pruning, it can't reduce final The accuracy rate of recognition result.Further, channel beta pruning having been carried out due to the object module, calculation amount can be greatly lowered, because And the pattern recognition device provided by the embodiment of the present invention based on deep neural network model can be applied to such as smart phone Etc. in the effective hardware device of computing resources.
In a kind of specific embodiment of the invention, auxiliary loss function is inserted into unit, is specifically used in depth nerve Cross entropy loss function is inserted into network model.
In a kind of specific embodiment of the invention, training unit, comprising:
Redundant channel selects subelement, for the characterization ability using target loss function and the joint passage, in depth nerve net Redundant channel of the selection to beta pruning in network model;
Beta pruning subelement obtains object module in deep neural network model, cutting off redundant channel.
In a kind of specific embodiment of the invention, redundant channel selects subelement, is specifically used for obtaining characterization depth The channel selecting vector of the importance in each channel in neural network model;Using target loss function to channel selecting vector sum Model parameter optimizes;The channel that the vector element of channel selecting vector after optimization is 0 is determined as redundant channel.
In a kind of specific embodiment of the invention, redundant channel selects subelement, is specifically used for random selection training Sample, and stochastic gradient descent algorithm and greedy algorithm are utilized, enable target loss function Convergence;Wherein,To reconstruct loss function,Loss function is assisted to be specified,For model parameter, β be channel selecting to Amount;λ is the weight of specified auxiliary loss function.
Example IV:
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of images based on deep neural network model Identify equipment, it is described below a kind of to be based on based on the image recognition apparatus of deep neural network model and above-described one kind The image-recognizing method of deep neural network model can correspond to each other reference.
Shown in Figure 5, being somebody's turn to do the image recognition apparatus based on deep neural network model includes:
Memory D1, for storing computer program;
Processor D2 realizes the figure based on deep neural network model of above method embodiment when for executing computer program As the step of recognition methods.
Specifically, referring to FIG. 6, for the image recognition apparatus provided in this embodiment based on deep neural network model Concrete structure schematic diagram, ratio can be generated because configuration or performance are different by being somebody's turn to do the image recognition apparatus based on deep neural network model Biggish difference may include one or more processors (central processing units, CPU) 322( Such as, one or more processors) and memory 332, one or more storage application programs 342 or data 344 Storage medium 330(such as one or more mass memory units).Wherein, memory 332 and storage medium 330 can be Of short duration storage or persistent storage.The program for being stored in storage medium 330 may include that one or more modules (do not mark by diagram Out), each module may include to the series of instructions operation in data processing equipment.Further, central processing unit 322 It can be set to communicate with storage medium 330, execute storage on the image recognition apparatus 301 based on deep neural network model Series of instructions operation in medium 330.
Image recognition apparatus 301 based on deep neural network model can also include one or more power supplys 326, One or more wired or wireless network interfaces 350, one or more input/output interfaces 358, and/or, one Or more than one operating system 341.For example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Step in image-recognizing method as described above based on deep neural network model can be by being based on depth The structure of the image recognition apparatus of neural network model is realized.
Embodiment five:
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of readable storage medium storing program for executing, described below one Kind of readable storage medium storing program for executing can correspond to each other ginseng with a kind of above-described image-recognizing method based on deep neural network model According to.
A kind of readable storage medium storing program for executing is stored with computer program on readable storage medium storing program for executing, and computer program is held by processor The step of image-recognizing method based on deep neural network model of above method embodiment is realized when row.
The readable storage medium storing program for executing be specifically as follows USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), the various program storage generations such as random access memory (Random Access Memory, RAM), magnetic or disk The readable storage medium storing program for executing of code.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.

Claims (8)

1. a kind of image-recognizing method based on deep neural network model characterized by comprising
Obtain target image to be identified;
The target image is input to after carrying out channel beta pruning to deep neural network model using the characterization ability in channel and is obtained In the object module obtained;
Classification processing is carried out to the target image using the subsidiary classification device in the object module, obtains recognition result;
Wherein, the process of the object module is obtained, comprising:
Insertion batch normalization layer, line rectification layer, average pond layer building auxiliary point in the deep neural network model Class device;
The insertion auxiliary loss function in the deep neural network model, and damaged with the reconstruct of the deep neural network model It loses function and constitutes target loss function;
Using the characterization ability of the target loss function the joint passage, the subsidiary classification device is trained, obtains target Model.
2. the image-recognizing method according to claim 1 based on deep neural network model, which is characterized in that described Insertion auxiliary loss function in deep neural network model, comprising:
Cross entropy loss function is inserted into the deep neural network model.
3. the image-recognizing method according to claim 2 based on deep neural network model, which is characterized in that the benefit With the characterization ability of the target loss function the joint passage, the subsidiary classification device is trained, obtains object module, packet It includes:
Using the characterization ability of the target loss function and the joint passage, select in the deep neural network model wait cut The redundant channel of branch;
In the deep neural network model, the redundant channel is cut off, obtains object module.
4. the image-recognizing method according to claim 3 based on deep neural network model, which is characterized in that the benefit With the characterization ability of the target loss function and the joint passage, selection is to the superfluous of beta pruning in the deep neural network model Remaining channel, comprising:
Obtain the channel selecting vector for characterizing the importance in each channel in the deep neural network model;
The channel selecting vector sum model parameter is optimized using the target loss function;
The channel that the vector element of channel selecting vector after optimization is 0 is determined as redundant channel.
5. the image-recognizing method according to claim 4 based on deep neural network model, which is characterized in that the benefit It is optimized with channel selecting vector sum model parameter of the target loss function to the important channel, comprising:
Training sample is randomly choosed, and utilizes stochastic gradient descent algorithm and greedy algorithm, enables target loss functionConvergence;Wherein,To reconstruct loss function,For specified auxiliary loss letter Number,For model parameter, β is channel selecting vector;λ is the weight of the specified auxiliary loss function.
6. a kind of pattern recognition device based on deep neural network model characterized by comprising target image obtains mould Block, target image input module, Classification and Identification module and object module obtain module;
Wherein, the target image obtains module, for obtaining target image to be identified;
The target image input module, for the target image to be input to the characterization ability using channel to depth nerve Network model carries out in the object module obtained after the beta pruning of channel;
The Classification and Identification module, for being classified using the subsidiary classification device in the object module to the target image Processing obtains recognition result;
The object module obtains module, comprising:
Subsidiary classification device construction unit, for insertion batch the normalization layer, line rectification in the deep neural network model Layer, average pond layer building subsidiary classification device;
Assist loss function be inserted into unit, in the deep neural network model insertion auxiliary loss function, and with institute The reconstruct loss function for stating deep neural network model constitutes target loss function;
Training unit carries out the subsidiary classification device for the characterization ability using the target loss function the joint passage Training obtains object module.
7. a kind of image recognition apparatus based on deep neural network model characterized by comprising
Memory, for storing computer program;
Processor is realized when for executing the computer program and is based on depth nerve net as described in any one of claim 1 to 5 The step of image-recognizing method of network model.
8. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program, the calculating on the readable storage medium storing program for executing Realize that the image as described in any one of claim 1 to 5 based on deep neural network model is known when machine program is executed by processor The step of other method.
CN201910004752.8A 2019-01-03 2019-01-03 A kind of image-recognizing method based on deep neural network model, device and equipment Active CN109344921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910004752.8A CN109344921B (en) 2019-01-03 2019-01-03 A kind of image-recognizing method based on deep neural network model, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910004752.8A CN109344921B (en) 2019-01-03 2019-01-03 A kind of image-recognizing method based on deep neural network model, device and equipment

Publications (2)

Publication Number Publication Date
CN109344921A true CN109344921A (en) 2019-02-15
CN109344921B CN109344921B (en) 2019-04-23

Family

ID=65297348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910004752.8A Active CN109344921B (en) 2019-01-03 2019-01-03 A kind of image-recognizing method based on deep neural network model, device and equipment

Country Status (1)

Country Link
CN (1) CN109344921B (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977845A (en) * 2019-03-21 2019-07-05 百度在线网络技术(北京)有限公司 A kind of drivable region detection method and car-mounted terminal
CN110006650A (en) * 2019-03-18 2019-07-12 华中科技大学 A kind of method for diagnosing faults based on the sparse denoising autocoder of stack beta pruning
CN110084281A (en) * 2019-03-31 2019-08-02 华为技术有限公司 Image generating method, the compression method of neural network and relevant apparatus, equipment
CN110276450A (en) * 2019-06-25 2019-09-24 交叉信息核心技术研究院(西安)有限公司 Deep neural network structural sparse system and method based on more granularities
CN110472664A (en) * 2019-07-17 2019-11-19 杭州有盾网络科技有限公司 A kind of certificate image identification method, device and equipment based on deep learning
CN110543900A (en) * 2019-08-21 2019-12-06 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN110598848A (en) * 2019-08-16 2019-12-20 中国科学院计算技术研究所 Migration learning acceleration method based on channel pruning
CN110619391A (en) * 2019-09-19 2019-12-27 华南理工大学 Detection model compression method and device and computer readable storage medium
CN110710759A (en) * 2019-09-09 2020-01-21 丁金波 Sole spouts gluey system based on 3D scanning and vision are rectified
CN111008640A (en) * 2019-10-17 2020-04-14 平安科技(深圳)有限公司 Image recognition model training and image recognition method, device, terminal and medium
CN111062477A (en) * 2019-12-17 2020-04-24 腾讯云计算(北京)有限责任公司 Data processing method, device and storage medium
CN111291817A (en) * 2020-02-17 2020-06-16 北京迈格威科技有限公司 Image recognition method and device, electronic equipment and computer readable medium
CN111598322A (en) * 2020-05-09 2020-08-28 东软医疗***股份有限公司 Medical equipment fault prediction method, device, medium and electronic equipment
CN111695375A (en) * 2019-03-13 2020-09-22 上海云从企业发展有限公司 Face recognition model compression algorithm based on model distillation, medium and terminal
CN111898591A (en) * 2020-08-28 2020-11-06 电子科技大学 Modulation signal identification method based on pruning residual error network
CN111931914A (en) * 2020-08-10 2020-11-13 北京计算机技术及应用研究所 Convolutional neural network channel pruning method based on model fine tuning
CN112489769A (en) * 2019-08-22 2021-03-12 浙江远图互联科技股份有限公司 Intelligent traditional Chinese medicine diagnosis and medicine recommendation system for chronic diseases based on deep neural network
CN112633400A (en) * 2020-12-29 2021-04-09 山东省海洋生物研究院 Shellfish classification and identification method and device based on computer vision
CN112686145A (en) * 2020-12-29 2021-04-20 广东各有所爱信息科技有限公司 Facial skin type identification method and intelligent terminal thereof
CN112884142A (en) * 2019-11-29 2021-06-01 北京市商汤科技开发有限公司 Neural network training method, neural network training device, target detection method, target detection device, equipment and storage medium
CN113408561A (en) * 2020-03-17 2021-09-17 北京京东乾石科技有限公司 Model generation method, target detection method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368885A (en) * 2017-07-13 2017-11-21 北京智芯原动科技有限公司 Network model compression method and device based on more granularity beta prunings
CN107516129A (en) * 2017-08-01 2017-12-26 北京大学 The depth Web compression method decomposed based on the adaptive Tucker of dimension
WO2018000309A1 (en) * 2016-06-30 2018-01-04 Intel Corporation Importance-aware model pruning and re-training for efficient convolutional neural networks
US20180096249A1 (en) * 2016-10-04 2018-04-05 Electronics And Telecommunications Research Institute Convolutional neural network system using adaptive pruning and weight sharing and operation method thereof
CN108288270A (en) * 2018-02-05 2018-07-17 南京邮电大学 A kind of object detection method based on channel trimming and full convolution deep learning
US20180204108A1 (en) * 2017-01-18 2018-07-19 Microsoft Technology Licensing, Llc Automated activity-time training
CN108806698A (en) * 2018-03-15 2018-11-13 中山大学 A kind of camouflage audio recognition method based on convolutional neural networks
CN108898168A (en) * 2018-06-19 2018-11-27 清华大学 The compression method and system of convolutional neural networks model for target detection

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018000309A1 (en) * 2016-06-30 2018-01-04 Intel Corporation Importance-aware model pruning and re-training for efficient convolutional neural networks
US20180096249A1 (en) * 2016-10-04 2018-04-05 Electronics And Telecommunications Research Institute Convolutional neural network system using adaptive pruning and weight sharing and operation method thereof
US20180204108A1 (en) * 2017-01-18 2018-07-19 Microsoft Technology Licensing, Llc Automated activity-time training
CN107368885A (en) * 2017-07-13 2017-11-21 北京智芯原动科技有限公司 Network model compression method and device based on more granularity beta prunings
CN107516129A (en) * 2017-08-01 2017-12-26 北京大学 The depth Web compression method decomposed based on the adaptive Tucker of dimension
CN108288270A (en) * 2018-02-05 2018-07-17 南京邮电大学 A kind of object detection method based on channel trimming and full convolution deep learning
CN108806698A (en) * 2018-03-15 2018-11-13 中山大学 A kind of camouflage audio recognition method based on convolutional neural networks
CN108898168A (en) * 2018-06-19 2018-11-27 清华大学 The compression method and system of convolutional neural networks model for target detection

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
SETIONO R ETAL.: "Neural-network feature selector", 《IEEE TRANSACTIONS ON NEURAL NETWORKS》 *
YIHUI HE ETAL.: "Channel Pruning for Accelerating Very Deep Neural Networks", 《2017 IEEE INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV)》 *
ZHUANG LIU ETAL.: "Learning Efficient Convolutional Networks through Network Slimming", 《2017 IEEE INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV)》 *
孔英会 等: "复杂背景下基于MobileNets的花卉识别与模型剪枝", 《科学技术与工程》 *
纪荣嵘 等: "深度神经网络压缩与加速综述", 《计算机研究与发展》 *
靳丽蕾 等: "一种用于卷积神经网络压缩的混合剪枝方法", 《小型微型计算机***》 *

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695375A (en) * 2019-03-13 2020-09-22 上海云从企业发展有限公司 Face recognition model compression algorithm based on model distillation, medium and terminal
CN110006650A (en) * 2019-03-18 2019-07-12 华中科技大学 A kind of method for diagnosing faults based on the sparse denoising autocoder of stack beta pruning
CN109977845A (en) * 2019-03-21 2019-07-05 百度在线网络技术(北京)有限公司 A kind of drivable region detection method and car-mounted terminal
CN110084281B (en) * 2019-03-31 2023-09-12 华为技术有限公司 Image generation method, neural network compression method, related device and equipment
CN110084281A (en) * 2019-03-31 2019-08-02 华为技术有限公司 Image generating method, the compression method of neural network and relevant apparatus, equipment
WO2020200213A1 (en) * 2019-03-31 2020-10-08 华为技术有限公司 Image generating method, neural network compression method, and related apparatus and device
CN110276450A (en) * 2019-06-25 2019-09-24 交叉信息核心技术研究院(西安)有限公司 Deep neural network structural sparse system and method based on more granularities
CN110276450B (en) * 2019-06-25 2021-07-06 交叉信息核心技术研究院(西安)有限公司 Deep neural network structured sparse system and method based on multiple granularities
CN110472664A (en) * 2019-07-17 2019-11-19 杭州有盾网络科技有限公司 A kind of certificate image identification method, device and equipment based on deep learning
CN110598848A (en) * 2019-08-16 2019-12-20 中国科学院计算技术研究所 Migration learning acceleration method based on channel pruning
CN110543900A (en) * 2019-08-21 2019-12-06 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN112489769A (en) * 2019-08-22 2021-03-12 浙江远图互联科技股份有限公司 Intelligent traditional Chinese medicine diagnosis and medicine recommendation system for chronic diseases based on deep neural network
CN112489769B (en) * 2019-08-22 2024-05-17 浙江远图技术股份有限公司 Chronic disease intelligent Chinese medicine diagnosis and medicine recommendation system based on deep neural network
CN110710759A (en) * 2019-09-09 2020-01-21 丁金波 Sole spouts gluey system based on 3D scanning and vision are rectified
CN110619391B (en) * 2019-09-19 2023-04-18 华南理工大学 Detection model compression method and device and computer readable storage medium
CN110619391A (en) * 2019-09-19 2019-12-27 华南理工大学 Detection model compression method and device and computer readable storage medium
CN111008640B (en) * 2019-10-17 2024-03-19 平安科技(深圳)有限公司 Image recognition model training and image recognition method, device, terminal and medium
CN111008640A (en) * 2019-10-17 2020-04-14 平安科技(深圳)有限公司 Image recognition model training and image recognition method, device, terminal and medium
CN112884142A (en) * 2019-11-29 2021-06-01 北京市商汤科技开发有限公司 Neural network training method, neural network training device, target detection method, target detection device, equipment and storage medium
CN112884142B (en) * 2019-11-29 2022-11-22 北京市商汤科技开发有限公司 Neural network training method, target detection method, device, equipment and storage medium
CN111062477A (en) * 2019-12-17 2020-04-24 腾讯云计算(北京)有限责任公司 Data processing method, device and storage medium
CN111062477B (en) * 2019-12-17 2023-12-08 腾讯云计算(北京)有限责任公司 Data processing method, device and storage medium
CN111291817A (en) * 2020-02-17 2020-06-16 北京迈格威科技有限公司 Image recognition method and device, electronic equipment and computer readable medium
CN111291817B (en) * 2020-02-17 2024-01-23 北京迈格威科技有限公司 Image recognition method, image recognition device, electronic equipment and computer readable medium
CN113408561A (en) * 2020-03-17 2021-09-17 北京京东乾石科技有限公司 Model generation method, target detection method, device, equipment and storage medium
WO2021185121A1 (en) * 2020-03-17 2021-09-23 北京京东乾石科技有限公司 Model generation method and apparatus, object detection method and apparatus, device, and storage medium
CN111598322A (en) * 2020-05-09 2020-08-28 东软医疗***股份有限公司 Medical equipment fault prediction method, device, medium and electronic equipment
CN111931914A (en) * 2020-08-10 2020-11-13 北京计算机技术及应用研究所 Convolutional neural network channel pruning method based on model fine tuning
CN111898591B (en) * 2020-08-28 2022-06-24 电子科技大学 Modulation signal identification method based on pruning residual error network
CN111898591A (en) * 2020-08-28 2020-11-06 电子科技大学 Modulation signal identification method based on pruning residual error network
CN112686145A (en) * 2020-12-29 2021-04-20 广东各有所爱信息科技有限公司 Facial skin type identification method and intelligent terminal thereof
CN112633400A (en) * 2020-12-29 2021-04-09 山东省海洋生物研究院 Shellfish classification and identification method and device based on computer vision

Also Published As

Publication number Publication date
CN109344921B (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN109344921A (en) A kind of image-recognizing method based on deep neural network model, device and equipment
Lym et al. Prunetrain: fast neural network training by dynamic sparse model reconfiguration
Shi et al. Robust spectral learning for unsupervised feature selection
CN104969257B (en) Image processing equipment and image processing method
Wang et al. Variational-based mixed noise removal with CNN deep learning regularization
CN108875752A (en) Image processing method and device, computer readable storage medium
CN110210513A (en) Data classification method, device and terminal device
CN107871103B (en) Face authentication method and device
CN110298446A (en) The deep neural network compression of embedded system and accelerated method and system
CN112116001A (en) Image recognition method, image recognition device and computer-readable storage medium
Wu et al. Centroid transformers: Learning to abstract with attention
WO2013116865A1 (en) Systems, methods, and media for updating a classifier
CN111723915A (en) Pruning method of deep convolutional neural network, computer equipment and application method
CN111091493B (en) Image translation model training method, image translation method and device and electronic equipment
CN114283320B (en) Branch-free structure target detection method based on full convolution
Pichel et al. A new approach for sparse matrix classification based on deep learning techniques
CN109242091A (en) Image-recognizing method, device, equipment and readable storage medium storing program for executing
CN112529068A (en) Multi-view image classification method, system, computer equipment and storage medium
CN115438804A (en) Prediction model training method, device and equipment and image prediction method
CN117635418B (en) Training method for generating countermeasure network, bidirectional image style conversion method and device
CN109993026A (en) The training method and device of relatives' identification network model
CN114494809A (en) Feature extraction model optimization method and device and electronic equipment
CN112101438A (en) Left and right eye classification method, device, server and storage medium
US11875263B2 (en) Method and apparatus for energy-aware deep neural network compression
CN115953651A (en) Model training method, device, equipment and medium based on cross-domain equipment

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
GR01 Patent grant
GR01 Patent grant