CN112598020A - Target identification method and system - Google Patents

Target identification method and system Download PDF

Info

Publication number
CN112598020A
CN112598020A CN202011335234.3A CN202011335234A CN112598020A CN 112598020 A CN112598020 A CN 112598020A CN 202011335234 A CN202011335234 A CN 202011335234A CN 112598020 A CN112598020 A CN 112598020A
Authority
CN
China
Prior art keywords
neural network
network model
convolutional neural
convolutional
different channels
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
Application number
CN202011335234.3A
Other languages
Chinese (zh)
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.)
Shenlan Artificial Intelligence Shenzhen Co Ltd
Original Assignee
Shenlan Artificial Intelligence Shenzhen 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 Shenlan Artificial Intelligence Shenzhen Co Ltd filed Critical Shenlan Artificial Intelligence Shenzhen Co Ltd
Priority to CN202011335234.3A priority Critical patent/CN112598020A/en
Publication of CN112598020A publication Critical patent/CN112598020A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

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

Abstract

The application provides a target identification method and a target identification system, wherein an image to be identified is obtained; inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model; the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model. Because different channels under any convolutional layer in the applied convolutional neural network model are screened, the value ranges of floating point numbers of different channels in the convolutional layer obtained after screening are approximate, the network precision of the quantized convolutional neural network model can be improved, the accuracy of the recognition result output by the convolutional neural network model is further improved, and the usability of the convolutional neural network model is improved.

Description

Target identification method and system
Technical Field
The present application relates to the field of machine learning technologies, and in particular, to a target identification method and system.
Background
At present, a Convolutional Neural Network (CNN) model is widely applied to the fields of image detection, target recognition, and the like. In the field of target identification, in order to increase the processing speed of a convolutional neural network model on an image to be identified, a floating point convolutional neural network model is generally required to be converted into a fixed point convolutional neural network model, and the conversion process is a quantization process of the convolutional neural network model.
In the prior art, when quantizing a convolutional neural network model, there are generally two implementation manners as follows: one is to carry out channel-by-channel quantization on each convolutional layer, and the quantization mode enables the network precision of the convolutional neural network model after quantization processing to be higher, but the process is complex and is not friendly to a processor; the other method is to carry out integral quantization on each convolution layer, namely carrying out quantization one by one, wherein the quantization mode has a simple process and is friendly to a processor, but the floating point number value ranges of different channels are different, so that the network precision of the convolution neural network model after quantization processing is lower.
Disclosure of Invention
The application provides a target identification method and a target identification system, which are used for improving the identification speed, the identification precision and the identification accuracy of a target.
The application provides a target identification method, which comprises the following steps:
acquiring an image to be identified;
inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model;
the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model.
According to the present application, a target identification method is provided, where the method includes screening different channels in any convolutional layer based on L1 norms of floating point type parameters of different channels in any convolutional layer in a convolutional neural network model after training is completed, and before the method includes:
acquiring floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished;
and calculating the L1 norm of the floating point type parameters of different channels under any convolution layer.
According to the target identification method provided by the application, the screening of different channels under any convolutional layer based on the L1 norm of the floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished specifically includes:
deleting the corresponding channels one by one according to the L1 norm from small to large for different channels under any convolutional layer;
and stopping deleting if the network precision loss of the convolutional neural network model after training is greater than or equal to a preset threshold before and after the deletion of the corresponding channel is judged and known.
According to the present application, a target identification method is provided, where the method for performing quantization processing on the filtered convolutional neural network model further includes:
and retraining the screened convolutional neural network model based on the image test sample carrying the object label.
The present application further provides a target recognition system, comprising: the device comprises an image acquisition module and an identification module. Wherein the content of the first and second substances,
the image acquisition module is used for acquiring an image to be identified;
the recognition module is used for inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model;
the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model.
According to the present application, there is provided a target recognition system, further comprising a calculation module configured to:
acquiring floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished;
and calculating the L1 norm of the floating point type parameters of different channels under any convolution layer.
According to the present application, there is provided a target recognition system, further comprising a screening module configured to:
deleting the corresponding channels one by one according to the L1 norm from small to large for different channels under any convolutional layer;
and stopping deleting if the network precision loss of the convolutional neural network model after training is greater than or equal to a preset threshold before and after the deletion of the corresponding channel is judged and known.
According to the present application, there is provided a target recognition system, further comprising a training module configured to:
and retraining the screened convolutional neural network model based on the image test sample carrying the object label.
The present application further provides an electronic device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned object recognition methods when executing the computer program.
The present application also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the object recognition method as any one of the above.
The target identification method and the target identification system provided by the application are characterized in that firstly, an image to be identified is obtained; inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model; the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model. Because different channels under any convolutional layer in the applied convolutional neural network model are screened, the value ranges of floating point numbers of different channels in the convolutional layer obtained after screening are approximate, the network precision of the convolutional neural network model after quantization processing can be improved, the accuracy of the output result of the convolutional neural network model is further improved, and the usability of the convolutional neural network model is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a target identification method provided herein;
FIG. 2 is a schematic diagram of the structure of a convolutional neural network model provided herein;
FIG. 3 is a schematic diagram illustrating a processing method of convolutional layers in a convolutional neural network model provided in the present application;
FIG. 4 is a flow diagram of a quantization process provided herein;
fig. 5 is a schematic flowchart of a procedure of calculating the norm of L1 in the object recognition method provided in the present application;
FIG. 6 is a schematic flow chart of a screening process in the object identification method provided in the present application;
FIG. 7 is a schematic flow chart illustrating a screening and retraining process in the object recognition method provided in the present application;
FIG. 8 is a schematic diagram of the structure of the object recognition system provided in the present application;
FIG. 9 is a schematic diagram of the structure of the object recognition system provided in the present application;
FIG. 10 is a schematic diagram of the structure of the object recognition system provided in the present application;
FIG. 11 is a schematic diagram of the structure of the object recognition system provided in the present application;
fig. 12 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, in order to increase the processing speed of the convolutional neural network model, a floating point convolutional neural network model is generally required to be converted into a fixed point convolutional neural network model, and the conversion process is a quantization process of the convolutional neural network model. The floating-point convolutional neural network model refers to the fact that all structural parameters of the convolutional neural network model are floating-point data, and the fixed-point convolutional neural network model refers to the fact that all structural parameters of the convolutional neural network model are fixed-point data. The quantization process can greatly improve the processing speed of the convolutional neural network model.
When the convolutional neural network model is quantized in the prior art, the following two implementation manners are generally adopted: one implementation is to perform channel-by-channel quantization on each convolutional layer of the floating-point convolutional neural network model, where the floating-point convolutional neural network model generally includes multiple convolutional layers, and each convolutional layer may be expressed in a tensor form: m × n × n, where m is the number of channels and n × n is the size of the convolution kernel. Because the floating point number value ranges under different channels are different, namely the value ranges of n × n floating point number parameters under different channels are different, channel-by-channel quantization can be performed respectively for the different floating point number value ranges, so that the convolutional neural network model obtained by quantization has higher network precision, but the process is complex and is not friendly to a processor. The other implementation mode is to perform integral quantization on each convolutional layer, namely, perform quantization one by one, and although this quantization mode is simple in process and friendly to a processor, because the value ranges of floating point numbers of different channels are different, if the quantization mode is performed integrally, the network precision of the convolutional neural network model obtained by quantization cannot be guaranteed, so that the network precision is low, and the accuracy of the output result of the convolutional neural network model is further reduced, or even the convolutional neural network model is unusable. Therefore, the embodiment of the application provides a target identification method.
Fig. 1 is a schematic flowchart of a target identification method provided in an embodiment of the present application, where the method includes:
s1, acquiring an image to be recognized;
s2, inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model;
the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model.
Specifically, an execution subject of the target identification method provided in the embodiment of the present application is a server, and the target identification method may include a local server and a cloud server, where the local server may specifically be a computer, and this is not specifically limited in the embodiment of the present application.
Step S1 is executed first, and an image to be recognized is obtained, where the image to be recognized may include a target object, and the target object may include a fingerprint, a gesture, a person, a text, and the like, which is not limited in this embodiment of the present invention.
Then, step S2 is executed to input the image to be recognized into the convolutional neural network model, so as to obtain the recognition result output by the convolutional neural network model, where the recognition result may specifically be a determination result for recognizing whether the image to be recognized contains the target object, or may specifically be a specific type, a specific position, and the like of the target object when the target object is determined to be present.
In the embodiment of the application, the target object in the image to be recognized is recognized through the convolutional neural network model, and a recognition result is obtained. The convolutional neural network model can be obtained by training, channel screening and quantification processing in sequence. Specifically, a basic model is first constructed by a Convolutional Neural Network (CNN), which is a kind of feed-forward Neural network (fed Neural network) containing convolution calculation and having a deep structure, and is one of the representative algorithms of deep learning (deep learning). Convolutional Neural Networks have a feature learning (representation learning) capability, and can perform Shift-Invariant classification (Shift-Invariant classification) on input information according to a hierarchical structure thereof, and are also called Shift-Invariant Artificial Neural Networks (SIANN). The base model is then trained through image training samples. And then screening different channels under the convolutional layers according to the L1 norm of the floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished. And then, carrying out quantitative processing on the screened convolutional neural network model to obtain the convolutional neural network model for identifying the image to be identified.
As shown in fig. 2, the convolutional neural network model includes a plurality of convolutional layers and a plurality of fully-connected layers, and the image to be recognized is processed by the convolutional layers and the fully-connected layers in sequence to obtain a recognition result.
As shown in fig. 3, each convolutional layer in the convolutional neural network model includes a set of convolutional kernels, where the set of convolutional kernels includes at least one convolutional kernel, and the set of convolutional kernels together form a weight tensor of the convolutional layer: m × n × n, where m is the number of channels and represents the number of convolution kernels in the set of convolution kernels, i.e., the number of convolution kernels in the convolution layer, and n × n is the size of each convolution kernel. For example, the convolution kernel may be set to 3 × 3; the convolution layer is processed by using the convolution kernel contained in the convolution layer to perform convolution operation on the input feature map of the convolution layer, namely, calculating the multiplication and summation of each convolution kernel and the corresponding element of the convolution area of each position of the input feature map, and further obtaining the output feature map of the convolution layer.
When different channels under any convolutional layer are screened, the screening process is the process of removing the channels which do not meet the limiting conditions under the convolutional layer so as to reduce the processing amount of the convolutional layer. The limiting condition may be determined by a norm of L1, that is, whether a channel meets the limiting condition may be determined by determining whether a norm of L1 corresponding to the channel meets the limiting condition. The L1 norm corresponding to each channel is the sum of the absolute values of all floating-point parameters in the channel, and can be used to characterize the channel. In the screened convolutional neural network model, the channels contained in any convolutional layer are the channels which do not meet the limiting condition.
When the screened convolutional neural network model is subjected to quantization processing, an 8-bit linear quantization algorithm can be specifically adopted for realizing the quantization processing, and the process of the quantization processing refers to the process of converting floating point type structural parameters in the convolutional neural network model into fixed point type structural parameters, namely converting the floating point type convolutional neural network model into the fixed point type convolutional neural network model. Because the floating point type structural parameters can be represented by 32-bit characters, the fixed point type structural parameters can be represented by 8-bit characters, and the floating point type convolutional neural network model is converted into the fixed point type convolutional neural network model, the processing speed of the converted fixed point type convolutional neural network model in application can be greatly improved, and meanwhile, required computing resources are greatly reduced. The implementation method of the quantization processing procedure is shown in fig. 4, and may include the following steps:
s30, fitting a network weight matrix: obtaining each layer of weight matrix of the convolutional neural network model obtained after the convolutional layer is re-determined, and respectively carrying out low-ratio specific point quantization on each layer of weight matrix to obtain a specific point weight matrix and a weight quantization scale factor of each layer of the convolutional neural network model;
s31, fitting a first activation matrix of the convolutional neural network model: acquiring a group of check data, constructing an optimized objective function from input activation to output activation based on the fixed point weight matrix and the weight quantization scale factor of each layer of the convolutional neural network model, and iteratively optimizing the fixed point weight matrix and the weight quantization scale factor to obtain a weight fixed point quantization convolutional neural network;
s32, fitting a second activation matrix of the convolutional neural network model network: and based on the group of check data and the weight fixed point quantization convolutional neural network, solving an activated quantization scale factor to obtain a convolutional neural network model after quantization processing.
Besides, the Quantization process can be implemented by using an 8-bit linear Quantization algorithm mentioned in the literature, "Quantization and Training of Neural Networks for efficient integer-Arithmetric-Only reference", or can be implemented by using other existing 8-bit linear Quantization algorithms, which is not specifically limited in the embodiment of the present application.
The target identification method provided by the embodiment of the application comprises the steps of firstly obtaining an image to be identified; inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model; the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model. Because different channels under any convolutional layer in the applied convolutional neural network model are screened, the value ranges of floating point numbers of different channels in the convolutional layer obtained after screening are approximate, the network precision of the convolutional neural network model after quantization processing can be improved, the accuracy of the recognition result output by the convolutional neural network model is further improved, and the usability of the convolutional neural network model is improved.
As shown in fig. 5, on the basis of the above embodiment, the target identification method provided in this embodiment of the present application, based on the L1 norm of the floating point type parameter of different channels under any convolutional layer in the convolutional neural network model after training is completed, to screen the different channels under any convolutional layer, before further including:
s201, acquiring floating point type parameters of different channels under any convolution layer in the convolutional neural network model after training is finished;
s202, calculating the L1 norm of the floating point type parameters of different channels under any convolution layer.
Specifically, in the convolutional neural network model in the embodiment of the present application, for each convolutional layer, the floating point type parameter of one channel refers to the structural parameter of the convolutional neural network model corresponding to the channel, and the number of the floating point type parameters of one channel is n × n in total. Each channel may correspond to the L1 norm with one floating-point type parameter, i.e., the sum of the absolute values of n × n floating-point type parameters for each channel.
In the embodiment of the application, the L1 norm of the floating point type parameters of different channels of any convolution layer is calculated before screening, so that the screening standard can be provided for subsequent screening actions, the screening condition is clear, and the screening speed is increased.
As shown in fig. 6, based on the above embodiment, the target identification method provided in this embodiment of the present application, based on the L1 norm of the floating point type parameter of different channels in any convolutional layer in the convolutional neural network model after training is performed, to screen the different channels in any convolutional layer, specifically includes:
s211, deleting corresponding channels one by one according to the L1 norm from small to large for different channels under any convolutional layer;
and S212, stopping deleting if the network precision loss of the convolutional neural network model after training is greater than or equal to a preset threshold before and after the corresponding channel is judged and known to be deleted.
Specifically, in the embodiment of the present application, when different channels under any convolutional layer are screened according to the L1 norm, specifically, the L1 norms of the floating point type parameters of each channel under any convolutional layer are arranged in the order from small to large, then the corresponding channel is deleted from the smallest L1 norm, and then the network precision loss of the convolutional neural network model before and after channel deletion is calculated, that is, the difference between the model precision of the convolutional neural network model before channel deletion and the model precision of the convolutional neural network model after channel deletion is calculated. The convolutional neural network model after channel deletion refers to a convolutional neural network model obtained based on the newly determined convolutional layer after the channel is deleted.
And judging the magnitude relation between the difference and a preset threshold, if the difference is larger than or equal to the preset threshold, indicating that the network precision of the convolutional neural network model after the channel is deleted cannot be accepted, and stopping the deleting operation and the subsequent deleting operation. Otherwise, if the difference is smaller than the preset threshold, the network precision of the convolutional neural network model after the channel is deleted is acceptable, and other channels can be continuously deleted until the difference is larger than or equal to the preset threshold.
In the embodiment of the present application, a specific screening method is provided, and the screening process can be understood as a process of pruning the convolutional layer. And deleting the corresponding channel from the minimum L1 norm until the network precision loss is greater than or equal to a preset threshold value. The difference of the floating point number value ranges among different channels can be reduced as much as possible under the condition of ensuring the network precision, and the network precision of the convolutional neural network model after quantization processing is further improved.
On the basis of the foregoing embodiment, in the target identification method provided in this embodiment of the application, the preset threshold is specifically less than or equal to 5%. Namely, the acceptable maximum network precision loss of the convolutional neural network model is less than or equal to 5 percent, and the network precision of the pruned convolutional neural network model can be ensured.
As shown in fig. 7, on the basis of the foregoing embodiment, the target identification method provided in this embodiment of the present application further includes, before performing quantization processing on the filtered convolutional neural network model:
and S213, retraining the screened convolutional neural network model based on the image test sample carrying the object label.
Specifically, since the network accuracy of the convolutional neural network model is reduced due to the fact that different channels under any convolutional layer are screened, the screened neural network model needs to be retrained through an image test sample carrying an object label, and a retraining process can be understood as a fine-tuning (fine-tuning) process to ensure the network accuracy of the screened convolutional neural network model. It should be noted that, in the process of retraining, the filtered convolutional neural network model needs to be trained by using a learning rate smaller than a specified value.
In the embodiment of the application, the screened convolutional neural network model is retrained according to the image test sample, so that the network precision loss caused by channel deletion can be recovered, and the network precision of the screened convolutional neural network model is ensured.
As shown in fig. 8, on the basis of the above embodiment, an embodiment of the present application provides a target recognition system, including: an image acquisition module 81 and a recognition module 82. Wherein the content of the first and second substances,
the image acquisition module 81 is used for acquiring an image to be identified;
the recognition module 82 is configured to input the image to be recognized to a convolutional neural network model to obtain a recognition result output by the neural network model;
the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model.
Specifically, the target identification system provided in the embodiment of the present application is configured to execute the target identification method, and a specific implementation manner of the target identification system is consistent with a method implementation manner and can achieve the same beneficial effects, which is not described herein again.
As shown in fig. 9, on the basis of the foregoing embodiment, the target identification system provided in the embodiment of the present application further includes a calculating module 83, configured to:
acquiring floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished;
and calculating the L1 norm of the floating point type parameters of different channels under any convolution layer.
On the basis of the foregoing embodiment, in the target identification system provided in this embodiment of the application, the preset threshold is specifically less than or equal to 5%.
As shown in fig. 10, on the basis of the foregoing embodiment, the object recognition system provided in the embodiment of the present application further includes a screening module 84, configured to:
deleting the corresponding channels one by one according to the L1 norm from small to large for different channels under any convolutional layer;
and stopping deleting if the network precision loss of the convolutional neural network model after training is greater than or equal to a preset threshold before and after the deletion of the corresponding channel is judged and known.
As shown in fig. 11, on the basis of the foregoing embodiment, the target identification system provided in the embodiment of the present application further includes a training module 85, configured to:
training a basic model based on an image training sample carrying an object label;
the illustrated training module 85 is also configured to:
and retraining the screened convolutional neural network model based on the image test sample carrying the object label.
Fig. 12 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 12: a processor (processor)1210, a communication Interface (Communications Interface)1220, a memory (memory)1230, and a communication bus 1240, wherein the processor 1210, the communication Interface 1220, and the memory 1230 communicate with each other via the communication bus 1240. Processor 1210 may invoke logic instructions in memory 1230 to perform a target recognition method comprising: acquiring an image to be identified; inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model; the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model.
In addition, the logic instructions in the memory 1230 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The processor 1210 in the electronic device according to the embodiment of the present application may call a logic instruction in the memory 1230 to implement the target identification method, and the specific implementation manner of the method is consistent with the method implementation manner and may achieve the same beneficial effects, which is not described herein again.
In another aspect, the present application also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the object recognition method provided by the above methods, the method comprising: acquiring floating point type parameters of different channels of any convolutional layer in a convolutional neural network model, and calculating L1 norms of the floating point type parameters of different channels of any convolutional layer; pruning different channels under any convolutional layer based on the L1 norm, and re-determining the convolutional layer based on the channel obtained after pruning; and carrying out quantization processing on the convolutional neural network model obtained after the convolutional layer is re-determined.
When the computer program product provided in the embodiment of the present application is executed, the above-mentioned object identification method is implemented, and the specific implementation manner is consistent with the method implementation manner, and the same beneficial effects can be achieved, which is not described herein again.
In yet another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, is implemented to perform the object recognition methods provided above, the method comprising: acquiring floating point type parameters of different channels of any convolutional layer in a convolutional neural network model, and calculating L1 norms of the floating point type parameters of different channels of any convolutional layer; pruning different channels under any convolutional layer based on the L1 norm, and re-determining the convolutional layer based on the channel obtained after pruning; and carrying out quantization processing on the convolutional neural network model obtained after the convolutional layer is re-determined.
When the computer program stored on the non-transitory computer-readable storage medium provided in the embodiment of the present application is executed, the method for identifying an object is implemented, and the specific implementation manner is consistent with the method implementation manner and can achieve the same beneficial effects, which is not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method of object recognition, comprising:
acquiring an image to be identified;
inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model;
the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model.
2. The method of claim 1, wherein the screening of different channels on any convolutional layer based on the L1 norm of the floating point type parameter of different channels on any convolutional layer in the convolutional neural network model after training is completed further comprises:
acquiring floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished;
and calculating the L1 norm of the floating point type parameters of different channels under any convolution layer.
3. The target identification method according to claim 1, wherein the screening of different channels on any convolutional layer based on the L1 norm of the floating point type parameter of different channels on any convolutional layer in the convolutional neural network model after training specifically comprises:
deleting the corresponding channels one by one according to the L1 norm from small to large for different channels under any convolutional layer;
and stopping deleting if the network precision loss of the convolutional neural network model after training is greater than or equal to a preset threshold before and after the deletion of the corresponding channel is judged and known.
4. The object recognition method according to any one of claims 1 to 3, wherein the quantizing process of the filtered convolutional neural network model further comprises:
and retraining the screened convolutional neural network model based on the image test sample carrying the object label.
5. An object recognition system, comprising:
the image acquisition module is used for acquiring an image to be identified;
the recognition module is used for inputting the image to be recognized into a convolutional neural network model to obtain a recognition result output by the neural network model;
the convolutional neural network model is trained on the basis of an image training sample carrying an object label, different channels under any convolutional layer are screened on the basis of L1 norms of floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished, and the screened convolutional neural network model is subjected to quantization processing to obtain the convolutional neural network model.
6. The object recognition system of claim 5, further comprising a calculation module to:
acquiring floating point type parameters of different channels under any convolutional layer in the convolutional neural network model after training is finished;
and calculating the L1 norm of the floating point type parameters of different channels under any convolution layer.
7. The object recognition system of claim 5, further comprising a filtering module to:
deleting the corresponding channels one by one according to the L1 norm from small to large for different channels under any convolutional layer;
and stopping deleting if the network precision loss of the convolutional neural network model after training is greater than or equal to a preset threshold before and after the deletion of the corresponding channel is judged and known.
8. The object recognition system of any one of claims 5-7, further comprising a training module to:
and retraining the screened convolutional neural network model based on the image test sample carrying the object label.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the object recognition method according to any of claims 1 to 4 are implemented when the processor executes the program.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the object recognition method according to any one of claims 1 to 4.
CN202011335234.3A 2020-11-24 2020-11-24 Target identification method and system Pending CN112598020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011335234.3A CN112598020A (en) 2020-11-24 2020-11-24 Target identification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011335234.3A CN112598020A (en) 2020-11-24 2020-11-24 Target identification method and system

Publications (1)

Publication Number Publication Date
CN112598020A true CN112598020A (en) 2021-04-02

Family

ID=75184073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011335234.3A Pending CN112598020A (en) 2020-11-24 2020-11-24 Target identification method and system

Country Status (1)

Country Link
CN (1) CN112598020A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114863242A (en) * 2022-04-26 2022-08-05 北京拙河科技有限公司 Deep learning network optimization method and system for image recognition

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108898168A (en) * 2018-06-19 2018-11-27 清华大学 The compression method and system of convolutional neural networks model for target detection
CN109522949A (en) * 2018-11-07 2019-03-26 北京交通大学 Model of Target Recognition method for building up and device
CN110033083A (en) * 2019-03-29 2019-07-19 腾讯科技(深圳)有限公司 Convolutional neural networks model compression method and apparatus, storage medium and electronic device
CN110659725A (en) * 2019-09-20 2020-01-07 字节跳动有限公司 Neural network model compression and acceleration method, data processing method and device
CN110826684A (en) * 2018-08-08 2020-02-21 北京交通大学 Convolutional neural network compression method, convolutional neural network compression device, electronic device, and medium
CN111091184A (en) * 2019-12-19 2020-05-01 浪潮(北京)电子信息产业有限公司 Deep neural network quantification method and device, electronic equipment and medium
CN111160481A (en) * 2019-12-31 2020-05-15 苏州安智汽车零部件有限公司 Advanced learning-based adas target detection method and system
CN111242287A (en) * 2020-01-15 2020-06-05 东南大学 Neural network compression method based on channel L1 norm pruning
CN111652366A (en) * 2020-05-09 2020-09-11 哈尔滨工业大学 Combined neural network model compression method based on channel pruning and quantitative training
CN111783961A (en) * 2020-07-10 2020-10-16 中国科学院自动化研究所 Activation fixed point fitting-based convolutional neural network post-training quantization method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108898168A (en) * 2018-06-19 2018-11-27 清华大学 The compression method and system of convolutional neural networks model for target detection
CN110826684A (en) * 2018-08-08 2020-02-21 北京交通大学 Convolutional neural network compression method, convolutional neural network compression device, electronic device, and medium
CN109522949A (en) * 2018-11-07 2019-03-26 北京交通大学 Model of Target Recognition method for building up and device
CN110033083A (en) * 2019-03-29 2019-07-19 腾讯科技(深圳)有限公司 Convolutional neural networks model compression method and apparatus, storage medium and electronic device
CN110659725A (en) * 2019-09-20 2020-01-07 字节跳动有限公司 Neural network model compression and acceleration method, data processing method and device
CN111091184A (en) * 2019-12-19 2020-05-01 浪潮(北京)电子信息产业有限公司 Deep neural network quantification method and device, electronic equipment and medium
CN111160481A (en) * 2019-12-31 2020-05-15 苏州安智汽车零部件有限公司 Advanced learning-based adas target detection method and system
CN111242287A (en) * 2020-01-15 2020-06-05 东南大学 Neural network compression method based on channel L1 norm pruning
CN111652366A (en) * 2020-05-09 2020-09-11 哈尔滨工业大学 Combined neural network model compression method based on channel pruning and quantitative training
CN111783961A (en) * 2020-07-10 2020-10-16 中国科学院自动化研究所 Activation fixed point fitting-based convolutional neural network post-training quantization method and system

Non-Patent Citations (18)

* Cited by examiner, † Cited by third party
Title
HAO LI等: "PRUNING FILTERS FOR EFFICIENT CONVNETS", 《ARXIV:1608.08710V3 [CS.CV]》, 10 March 2017 (2017-03-10), pages 1 - 13, XP093160610, DOI: 10.48550/arXiv.1608.08710 *
HAO LI等: "PRUNING FILTERS FOR EFFICIENT CONVNETS", 《ARXIV:1608.08710V3 [CS.CV]》, pages 1 - 13 *
KYUYEON HWANG等: "Fixed-Point Feedforward Deep Neural Network Design Using Weights +1, 0, and -1", 《2014 IEEE WORKSHOP ON SIGNAL PROCESSING》, 18 December 2014 (2014-12-18), pages 1 - 6 *
MATTHIEU COURBARIAUX等: "Binarized Neural Networks: Training Neural Networks with Weights and Activations Constrained to +1 or − 1", 《ARXIV:1602.02830V3 [CS.LG]》, 17 March 2016 (2016-03-17), pages 1 - 11, XP055405835 *
MOHAMMAD RASTEGARI等: "XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks", 《EUROPEAN CONFERENCE ON COMPUTER VISION》, 17 September 2016 (2016-09-17), pages 1 - 17 *
SONG HAN等: "DEEP COMPRESSION: COMPRESSING DEEP NEURAL NETWORKS WITH PRUNING, TRAINED QUANTIZATION AND HUFFMAN CODING", 《ARXIV:1510.00149V5 [CS.CV]》, 15 February 2016 (2016-02-15), pages 1 - 14 *
SONG HAN等: "Learning both Weights and Connections for Efficient Neural Networks", 《ARXIV:1506.02626V3 [CS.NE]》, 30 October 2015 (2015-10-30), pages 1 - 9 *
WENLIN CHEN等: "Compressing Neural Networks with the Hashing Trick", 《PROCEEDINGS OF THE 32 ND INTERNATIONAL CONFERENCE ON MACHINE LEARNING》, 31 December 2015 (2015-12-31), pages 1 - 10 *
YILUN ZHOU 等: "Low-precision CNN Model Quantization based on Optimal Scaling Factor Estimation", 《2019 IEEE INTERNATIONAL SYMPOSIUM ON BROADBAND MULTIMEDIA SYSTEM AND BROADCASTING》, 30 January 2020 (2020-01-30), pages 1 - 5 *
ZHUANG LIU 等: "Learning Efficient Convolutional Networks through Network Slimming", 《ARXIV:1708.06519V1 [CS.CV]》, 22 August 2017 (2017-08-22), pages 1 - 10 *
吴文斌: "基于深度学习的手部关键点检测及其移动端应用", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 January 2020 (2020-01-15), pages 138 - 1686 *
孙锰阳: "基于卷积神经网络压缩算法的关键词识别系统设计", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 June 2020 (2020-06-15), pages 136 - 191 *
孟凯等: "基于整系数表达的卷积神经网络权值压缩方法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 June 2020 (2020-06-15), pages 140 - 94 *
洪嘉阳: "基于卷积神经网络的雾天图像复原算法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 May 2020 (2020-05-15), pages 138 - 169 *
王冠等: "面向边缘计算的轻量级植物病害识别模型", 《浙江农林大学学报》, 28 May 2020 (2020-05-28), pages 1 - 8 *
王琪: "基于深度神经网络压缩的嵌入式目标检测研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 January 2020 (2020-01-15), pages 138 - 1890 *
陈春雪: "卷积神经网络模型轻量化研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 January 2020 (2020-01-15), pages 138 - 2036 *
陈达武: "深度神经网络模型压缩算法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 January 2020 (2020-01-15), pages 140 - 324 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114863242A (en) * 2022-04-26 2022-08-05 北京拙河科技有限公司 Deep learning network optimization method and system for image recognition

Similar Documents

Publication Publication Date Title
US10552737B2 (en) Artificial neural network class-based pruning
CN108021806B (en) Malicious installation package identification method and device
CN110175641B (en) Image recognition method, device, equipment and storage medium
CN116361801B (en) Malicious software detection method and system based on semantic information of application program interface
CN109242106B (en) Sample processing method, device, equipment and storage medium
CN111915580A (en) Tobacco leaf grading method, system, terminal equipment and storage medium
CN111091278A (en) Edge detection model construction method and device for mechanical equipment anomaly detection
CN112418320B (en) Enterprise association relation identification method, device and storage medium
CN111931809A (en) Data processing method and device, storage medium and electronic equipment
CN115063875A (en) Model training method, image processing method, device and electronic equipment
CN114781650B (en) Data processing method, device, equipment and storage medium
CN112598020A (en) Target identification method and system
CN110781849A (en) Image processing method, device, equipment and storage medium
CN111625858B (en) Intelligent multi-mode data desensitization method and device in vertical field
KR20210111677A (en) Method for clipping neural networks, method for calculating convolution of neural networks and apparatus for performing the methods
CN113011532A (en) Classification model training method and device, computing equipment and storage medium
CN111783936A (en) Convolutional neural network construction method, device, equipment and medium
CN116363444A (en) Fuzzy classification model training method, fuzzy image recognition method and device
CN111325706A (en) Grain boundary extraction and grain boundary extraction model generation method and device
CN114882388A (en) Method, device, equipment and medium for training and predicting multitask model
CN113887709A (en) Neural network adaptive quantization method, apparatus, device, medium, and product
CN114139678A (en) Convolutional neural network quantization method and device, electronic equipment and storage medium
CN112085584A (en) Enterprise credit default probability calculation method and system
CN113762403B (en) Image processing model quantization method, device, electronic equipment and storage medium
CN114372456A (en) Text processing method, device and storage medium

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