Quantization Method and Device for Convolutional Neural Networks for Object Detection Based on Image Recognition
By constructing a sub-network model to dynamically calculate the quantized gradient value and quantize the weight parameters layer by layer, the problem of accuracy reduction caused by post-training quantization is solved, and the convolutional neural network is efficiently deployed on the vehicle computing unit.
Patent Information
- Application Number
- CN202510582303.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-05-07
AI Technical Summary
In existing technologies, post-training quantization (PTQ) methods result in a significant decrease in model accuracy after quantization, making it difficult to effectively deploy large-scale deep learning models on resource-constrained mobile devices.
By constructing a sub-network model, the quantization gradient values of each layer of the convolutional neural network are dynamically calculated. The quantization threshold is set, and the weight parameters are quantized layer by layer into INT4, INT8, INT16 or FP16, while retaining some FP32 format. The quantization process is optimized to maintain accuracy.
While reducing model size and computational requirements, high model accuracy is maintained, making the quantized convolutional neural network more suitable for deployment on in-vehicle computing units.
Smart Images

Figure CN120430353B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and apparatus for quantizing neural networks, and more particularly to a method and apparatus for quantizing convolutional neural networks. Background Technology
[0002] In the field of deep learning, neural networks are widely used due to their outstanding performance in tasks such as image classification, object detection, and natural language processing. Taking autonomous driving scenarios as an example, onboard computing units need to process image data captured by high-definition cameras in real time under limited computing power and memory resources to complete tasks such as lane line detection and traffic sign recognition.
[0003] However, as the accuracy of model predictions improves, the size and depth of neural networks increase accordingly, leading to a significant increase in their memory consumption. Furthermore, models need to quickly access large amounts of weight data during prediction, which places higher demands on memory bandwidth. On mobile devices, such as in-vehicle computing units, hardware resources like memory are very limited, restricting the application of large-scale deep learning models. To enable these highly accurate models to run on resource-constrained mobile devices, existing technologies employ two strategies: model optimization and model compression.
[0004] Model optimization involves designing more efficient network architectures to achieve acceptable accuracy with a smaller model size. For example, architectures like MobileNet and SqueezeNet, through innovative structural designs, achieve accuracy comparable to larger networks while maintaining a smaller size. Nevertheless, larger networks often yield better results among similar models.
[0005] Model compression reduces network size through various techniques, with quantization being one of the most widely used methods. Quantization converts floating-point weights and activation values in the model into fixed-point numbers, thereby reducing model size and computational resource requirements. The advantage of this method is that it not only reduces the model's memory and bandwidth requirements but also improves the model's running speed on mobile devices, enabling real-time processing. Furthermore, quantized models, due to their lower computational resource requirements, are more suitable for deployment on mobile devices.
[0006] Currently, there are two main quantization schemes: Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT). Both schemes essentially replace floating-point numbers in the model with finite fixed-point numbers, similar to rounding to the nearest integer in mathematics.
[0007] Post-training quantization (PTQ) is performed after model training is complete. This method directly converts the trained floating-point model into a low-precision fixed-point representation. However, since PTQ introduces quantization only after training, it can lead to a significant decrease in the accuracy of the quantized model, especially in high-precision networks trained using FP32 (32-bit floating-point), where quantization may introduce large errors, thus affecting the model's performance.
[0008] Quantization-aware training (QAT) introduces quantization operations during model training. This method simulates quantization during training, allowing the model to gradually adapt to the effects of quantization. The advantage of QAT is its ability to learn how to minimize quantization error during training, thus maintaining high accuracy after quantization. However, QAT implementation is relatively complex, requiring adjustments to the training process to accommodate quantization operations. Furthermore, QAT's framework support and flexibility may be limited, making it difficult to deploy effectively in certain situations. Summary of the Invention
[0009] Objective of this invention: To address the aforementioned limitations of existing technologies, this invention proposes a quantization method for convolutional neural networks used for object detection based on image recognition. This method solves the problem of a significant decrease in model accuracy after quantization caused by post-training quantization (PTQ), which introduces quantization only after training is complete. Another objective of this invention is to provide an apparatus for implementing the quantization method for convolutional neural networks used for object detection based on image recognition.
[0010] Technical solution: A quantization method for object detection convolutional neural networks based on image recognition, comprising:
[0011] Step 1: Obtain the object detection convolutional neural network model based on image recognition to be quantized, and construct a set of sub-network models for auxiliary training;
[0012] Step 2: Collect image data for training the object detection convolutional neural network model, and preprocess the image data to obtain the training dataset;
[0013] Step 3: Use the dataset to pre-train the object detection convolutional neural network model. During the process, the outputs of each convolutional layer and pooling layer in the object detection convolutional neural network model are processed by the sub-network model, and the three weight parameters of each layer are output respectively, namely the weight parameter of the coefficient of variation, the weight parameter of the spatial autocorrelation coefficient, and the weight parameter of the sparsity measure.
[0014] Step 4: Calculate the quantization gradient value of each layer according to the three weight parameters corresponding to each layer of the object detection convolutional neural network model;
[0015] Step 5: Set a quantization threshold. Based on the relationship between the quantization gradient value of each layer and the quantization threshold, quantize each convolutional layer and pooling layer of the target detection convolutional neural network model.
[0016] Step 6: Replace the original weights of the convolutional neural network model in Step 1 with the quantized weights, and then retrain the model using the dataset.
[0017] Furthermore, the sub-network model constructed in step 1 includes one convolutional layer, one pooling layer, one flattening layer, and one fully connected layer. The input of the convolutional layer is the output of the nth convolutional neural network connected to the sub-network model. The convolutional kernel size is 3*3, the stride is 1, the activation function is ReLU, and the width and height of the output size are the same as the input size, while the depth is the same as the number of convolutional kernels. The input of the pooling layer is the output of the convolutional layer. The pooling type of the pooling layer is max pooling, the pooling window size is 2*2, the stride is 2, and the output size is half the width and height of the input size, while the depth remains unchanged. The flattening layer is used to flatten the output of the pooling layer into a one-dimensional vector before inputting it into the fully connected layer. The fully connected layer has 3 neurons, the activation function is ReLU, and the output size is 3*1.
[0018] Furthermore, in step 4, the quantization gradient value corresponding to the nth layer in the target detection convolutional neural network. Q n The calculation formula is:
[0019] ;in: α n The weight parameters are the coefficients of variation of the output feature map of the nth layer of the convolutional neural network for target detection. s n / m n Let be the coefficient of variation of the output feature map of the nth layer of the convolutional neural network for target detection. s n The average value of all elements in the output feature map of the nth layer of the convolutional neural network for object detection. m n The standard deviation of all elements in the output feature map of the nth layer of the convolutional neural network for object detection;
[0020] β n The weight parameters for the spatial autocorrelation coefficient of the output feature map of the nth layer of the convolutional neural network for target detection are: The spatial autocorrelation coefficient of the output feature map of the nth layer of the convolutional neural network for target detection is given. H n , Wn , Z n respectively represent the height, width, and depth of the output feature map of the n-th layer of the target detection convolutional neural network. N ( i n ) represents the i-th element of the output feature map of the n-th layer of the target detection convolutional neural network. i n The set of neighborhood elements, is the element i n value, is the element i n neighborhood elements j n value;
[0021] c n is the weight parameter for the sparsity measure of the output feature map of the n-th layer of the target detection convolutional neural network, (1 - Z n / T n ) is the sparsity measure of the output feature map of the n-th layer of the target detection convolutional neural network, Z n is the number of all zero-valued elements in the output feature map of the n-th layer of the target detection convolutional neural network, T n is the number of all elements in the output feature map of the n-th layer of the target detection convolutional neural network.
[0022] Furthermore, in step 5, set the quantization thresholds T1 = 0.1, T2 = 0.2, T3 = 0.4, T4 = 0.6, and map the quantization gradient value Q n of each layer to the range [0, 1]. If the mapped quantization gradient value Q n satisfies Q n < T1, then quantize the weights of this layer from 32-bit floating-point numbers to 4-bit integers; if it satisfies T1 ≤ Q n < T2, then quantize the weights of this layer from 32-bit floating-point numbers to 8-bit integers; if it satisfies T2 ≤ Q n < T3, then quantize the weights of this layer from 32-bit floating-point numbers to 16-bit integers; if it satisfies T3 ≤ Q n < T4, then quantize the weights of this layer from 32-bit floating-point numbers to 16-bit floating-point numbers; if it satisfies Q n ≥ T4, then do not perform quantization operations and keep the original FP32 format.
[0023] Furthermore, in step 6, during the model retraining process, the accuracy on the validation set is monitored. If the accuracy drops by more than 1%, the quantization thresholds T1, T2, T3, and T4 are multiplied by 105% respectively, and the model retraining process is repeated.
[0024] Furthermore, step 6 includes several rounds of training. After each round of training, the original weights of the main network are replaced with quantized weights. After each round of training, the parameters of the sub-network model are also updated.
[0025] Furthermore, in step 2, the preprocessing includes cropping and scaling the images to uniformly adjust each image to the size required for inputting the target detection convolutional neural network; then, the images undergo color space conversion, converting the YUV format image data to RGB format, and simultaneously normalizing the images.
[0026] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the quantization method of the image recognition-based object detection convolutional neural network.
[0027] Beneficial Effects: For convolutional neural networks used in image recognition-based object detection, this method improves upon existing post-training quantization (PTQ) methods. During training, a secondary network categorizes the weight parameters in the main network structure according to their importance, obtaining quantized gradient values. After training, based on the quantized gradient values, a portion of the FP32 format weight parameters in the main network are converted to low-precision data, such as INT4, INT8, INT16, and FP16 formats, while the remaining weight parameters retain their FP32 format. This achieves a reduction in model size and computational cost while maintaining a certain level of accuracy. Compared to existing post-training quantization techniques, the heterogeneous quantization method of this invention allows for more precise control of the post-training quantization process, effectively reducing model size and computational requirements while maximizing model accuracy. The optimized image recognition-based object detection convolutional neural network model is more suitable for deployment on in-vehicle computing units. Attached Figure Description
[0028] Figure 1 This is a flowchart of the method of the present invention;
[0029] Figure 2 This is a framework diagram for quantizing a convolutional neural network for object detection based on image recognition, as shown in the embodiment.
[0030] Figure 3 This is a structural diagram illustrating the quantization of a convolutional neural network for object detection based on image recognition in this embodiment. Detailed Implementation
[0031] The invention will now be further explained with reference to the accompanying drawings.
[0032] like Figure 1 , Figure 2 As shown, this embodiment presents a quantization method for image recognition-based object detection convolutional neural networks applicable to autonomous driving. In this method, the image recognition-based object detection convolutional neural network to be quantized is referred to as the main network. This main network has 3 convolutional layers, 3 pooling layers, and 1 fully connected layer. The specific architecture is as follows:
[0033] (1) Input layer, input size: 448*448*1, used to input RAW format images.
[0034] (2) The first convolutional layer has the following characteristics: input size: 448*448*1, number of convolutional kernels: 32, kernel size: 3*3, stride: 1, padding: Same, activation function: ReLU, output size: 448*448*32.
[0035] (3) First pooling layer, input size: 448*448*32, pooling type: max pooling, pooling window size: 2*2, step size: 2, output size: 224*224*32.
[0036] (4) The second convolutional layer has the following characteristics: input size: 224*224*32, number of convolutional kernels: 64, kernel size: 3*3, stride: 1, padding: Same, activation function: ReLU, and output size: 224*224*64.
[0037] (5) Second pooling layer, input size: 224*224*64, pooling type: max pooling, pooling window size: 2*2, step size: 2, output size: 112*112*64.
[0038] (6) The third convolutional layer has the following characteristics: input size: 112*112*64, number of convolutional kernels: 128, kernel size: 3*3, stride: 1, padding: Same, activation function: ReLU, and output size: 112*112*128.
[0039] (7) The third pooling layer, input size: 112*112*128, pooling type: max pooling, pooling window size: 2*2, step size: 2, output size: 56*56*128.
[0040] (8) Flattening layer: Input size: 56*56*128, output size: 56*56*128 = 39424, used to flatten multidimensional feature maps into one-dimensional vectors.
[0041] (9) Fully connected layer, input size: 39424, number of neurons: 1000, that is, in this embodiment, it is assumed that the classification task has 1000 categories, activation function: Softma*, output size: 1000*1.
[0042] (10) Output layer, output size: 1000*1, that is, each category outputs a probability value.
[0043] In addition to the main network, a set of sub-networks is added to assist training. Their function is to process the outputs of each convolutional and pooling layer of the main network separately, analyzing which layers play a key role in feature extraction. The parameters output by each sub-network are used to calculate the quantized gradient values of the corresponding layer.
[0044] In this embodiment, each sub-network has one convolutional layer, one pooling layer, and one fully connected layer, with the specific architecture as follows:
[0045] (1) Input Layer: The input size is the same as the output size of the corresponding layer in the main network. In this embodiment, the input sizes of the input layers in each sub-network are as follows: 448*448*32, 224*224*32, 224*224*32, 112*112*64, 112*112*128, and 56*56*128, respectively, corresponding to the 3 convolutional layers and 3 pooling layers in the main network.
[0046] (2) Convolutional Layer: Each input feature map is processed through a convolutional layer. Number of convolutional kernels: 16 (can be adjusted as needed), kernel size: 3*3, stride: 1, padding: Same, activation function: ReLU, output size: width and height are the same as the input size, depth is the same as the number of convolutional kernels. In this embodiment, these correspond to the 3 convolutional layers and 3 pooling layers of the main network in sequence. The output sizes of the convolutional layers of each sub-network are as follows: 448*448*16, 224*224*16, 224*224*16, 112*112*16, 112*112*16, 56*56*16.
[0047] (3) Pooling Layer, pooling type: max pooling, pooling window size: 2*2, stride: 2, output size: after each pooling, the width and height are halved, while the depth remains unchanged. In this embodiment, the output sizes of the pooling layers of each sub-network correspond to the three convolutional layers and three pooling layers of the main network in sequence. The output sizes of the pooling layers of each sub-network are as follows: 224*224*64, 112*112*64, 112*112*64, 56*56*16, 112*112*16, 28*28*16.
[0048] (4) Flatten Layer: Flattens the output of the pooling layer into a one-dimensional vector.
[0049] (5) Fully Connected Layer, Number of neurons: 3, Activation function: ReLU, Output size: 3*1.
[0050] (6) Output Layer, output size: 3*1, that is, each sub-network finally outputs 3 parameters: the weight parameter α of the coefficient of variation, the weight parameter β of the spatial autocorrelation coefficient, and the weight parameter γ of the sparsity measure.
[0051] Image data was collected from onboard cameras in test vehicles, covering various road conditions including urban roads, highways, and rural roads, as well as weather conditions such as sunny, rainy, snowy, and foggy days. The collected images were preprocessed to obtain the training dataset. Preprocessing included cropping and scaling each image to a uniform size (448*448) required for input to the convolutional neural network; color space conversion, converting YUV format image data to RGB format; and image normalization to eliminate the influence of differences in illumination intensity on the model input.
[0052] The sub-network and the main network are jointly trained end-to-end. The main network processes the input data and generates feature maps for each layer, while the sub-network simultaneously receives the feature maps of the corresponding layers as input. After convolution, pooling, flattening, and fully connected operations, it outputs three weight parameters: α, β, and γ. Figure 2 , Figure 3 As shown, while the main network is being pre-trained, the sub-network also learns how to analyze the output features of each layer of the main network.
[0053] The role of the sub-network is to dynamically generate three weight parameters, α, β, and γ, by analyzing the output feature maps of each layer of the main network. These parameters are then used to calculate the quantization gradient value Q of each layer of the main network, in order to balance the contributions of the three different metrics and better quantize each layer of the convolutional neural network.
[0054] Quantization gradient value of the nth layer convolutional neural network Q n The calculation formula is as follows:
[0055]
[0056] in: α nThe weight parameter for the coefficient of variation (COP) of the output feature map of the nth layer of a convolutional neural network for target detection is used to adjust the influence of the COP on the quantization gradient values. A high COP indicates that the output values of this convolutional neural network layer have a large range of variation and high dispersion. Quantizing such layers can lead to significant information loss because the quantization operation maps continuous values to discrete values, and for features with a large range of variation, this mapping is more likely to introduce errors. Therefore, preserving the high precision of these layers (such as FP32) can reduce quantization errors and maintain model performance.
[0057] s n / m n Let be the coefficient of variation of the output feature map of the nth layer of the convolutional neural network for target detection, where s n The average value of all elements in the output feature map of the nth layer of a convolutional neural network for object detection. m n Let be the standard deviation of all elements in the output feature map of the nth layer of the nth object detection convolutional neural network.
[0058] β n This is a weight parameter for the spatial autocorrelation coefficient of the output feature map of the nth layer of a convolutional neural network for object detection. It is used to adjust the influence of the spatial autocorrelation coefficient on the quantization gradient value. The lower the spatial autocorrelation coefficient, the greater the difference between adjacent pixel values in the feature map, which means that the network has captured the edges or complex textures of the image at this layer.
[0059] The spatial autocorrelation coefficient of the output feature map of the nth layer of the convolutional neural network for target detection is given by: H n , W n , Z n These represent the height, width, and depth of the output feature map of the nth layer of the object detection convolutional neural network, respectively. N ( i n () represents the i-th element of the output feature map of the n-th layer of the object detection convolutional neural network. i n The set of neighboring elements It is an element i n The value, It is an element i n Neighboring elements j n The value of .
[0060] c n is the weight parameter for the sparsity metric of the output feature map of the n-th layer of the object detection convolutional neural network, and is used to adjust the influence degree of the sparsity metric in the quantization gradient value. The higher the sparsity metric, the more zero values are contained in the feature map, indicating that the main network has identified a few key features.
[0061] (1 - Z n / T n ) is the sparsity metric of the output feature map of the n-th layer of the object detection convolutional neural network, where Z n is the number of all zero-value elements in the output feature map of the n-th layer of the object detection convolutional neural network, T n is the number of all elements in the output feature map of the n-th layer of the object detection convolutional neural network.
[0062] Map the quantization gradient value of each layer Q n to the range of [0, 1], and set the quantization thresholds T1 = 0.1, T2 = 0.2, T3 = 0.4, T4 = 0.6. For the n-th layer convolutional neural network, if the mapped quantization gradient value Q n satisfies Q n < T1, then quantize the weight of this layer from 32-bit floating point number (FP32) to 4-bit integer (INT4); if it satisfies T1 ≤ Q n < T2, then quantize the weight of this layer from 32-bit floating point number (FP32) to 8-bit integer (INT8); if it satisfies T2 ≤ Q n < T3, then quantize the weight of this layer from 32-bit floating point number (FP32) to 16-bit integer (INT16); if it satisfies T3 ≤ Q n < T4, then quantize the weight of this layer from 32-bit floating point number (FP32) to 16-bit floating point number (FP16); if it satisfies Q n ≥ T4, then do not perform quantization operation and keep the original FP32 format.
[0063] After each round of training, replace the original weights of the main network with the quantized weights, and then re-train the model. In this embodiment, a total of 100 rounds of training are performed to fine-tune the network and adapt to the quantized parameters. At the same time, after each round of training, the parameters of the auxiliary network are also updated simultaneously to realize the training of the auxiliary network.
[0064] In some embodiments, during retraining, the accuracy on the validation set is monitored. If the accuracy drops by more than 1%, the quantization thresholds T1, T2, T3, and T4 are multiplied by 105% simultaneously, and the retraining process is repeated.
[0065] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A quantization method of an object detection convolutional neural network based on image recognition, characterized in that, The application relates to an image recognition-based target detection convolutional neural network quantization method. Step 1: obtaining an image recognition-based target detection convolutional neural network model to be quantized and constructing a set of auxiliary training sub-network models; Step 2: collecting image data for training the image recognition-based target detection convolutional neural network model, and obtaining a data set for training after pre-processing the image data; Step 3: pre-training the target detection convolutional neural network model by using the data set, and processing the outputs of each convolutional layer and pooling layer in the target detection convolutional neural network model by using the sub-network model during the process, and outputting three weight parameters of each layer, namely the weight parameters of the coefficient of variation, the weight parameters of the spatial autocorrelation coefficient and the weight parameters of the sparsity measure; Step 4: calculating the quantization gradient values of each layer according to the three weight parameters corresponding to each layer of the target detection convolutional neural network model; Step 5: setting a quantization threshold, and quantizing each convolutional layer and pooling layer of the target detection convolutional neural network model according to the relationship between the quantization gradient values of each layer and the quantization threshold; Step 6: replacing the original weights of the target detection convolutional neural network model in step 1 with the quantized weights, and retraining the model by using the data set; In step 4, the quantization gradient value Q corresponding to the nth layer in the object detection convolutional neural network is... n The calculation formula is: ; wherein: a n is a weight parameter of the coefficient of variation of the output feature map of the nth layer of the target detection convolutional neural network, σ n / μ n is the coefficient of variation of the output feature map of the nth layer of the target detection convolutional neural network, σ n is the mean of all elements in the output feature map of the nth layer of the target detection convolutional neural network, μ n is the standard deviation of all elements in the output feature map of the nth layer of the target detection convolutional neural network; β n The weight parameters for the spatial autocorrelation coefficient of the output feature map of the nth layer of the convolutional neural network for target detection are: H is the spatial autocorrelation coefficient of the output feature map of the nth layer of the target detection convolutional neural network. n W n Z n Represent the height, width, and depth of the output feature map of the nth layer of the object detection convolutional neural network, respectively, N(i n ) represents the i-th element i of the output feature map of the n-th layer of the object detection convolutional neural network. n The set of neighboring elements It is element i n The value, It is element i n The neighboring element j n The value; gamma n is the weight parameter of the sparsity measure of the output feature map of the nth layer of the target detection convolutional neural network, (1-Z n / T n is the sparsity measure of the output feature map of the nth layer of the target detection convolutional neural network, Z n is the number of all zero-value elements in the output feature map of the nth layer of the target detection convolutional neural network, T n is the number of all elements in the output feature map of the nth layer of the target detection convolutional neural network.
2. The method of claim 1, wherein the method further comprises: The sub-network model constructed in step 1 comprises one convolutional layer, one pooling layer, one flattening layer and one fully connected layer; the input of the convolutional layer is the output of the nth convolutional neural network connected to the sub-network model, the convolution kernel size is 3*3, the step is 1, the activation function is ReLU, the width and height of the output size are the same as those of the input size, and the depth is consistent with the number of convolution kernels; the input of the pooling layer is the output of the convolutional layer, the pooling type of the pooling layer is maximum pooling, the pooling window size is 2*2, the step is 2, the output size is half of the width and height of the input size, and the depth is unchanged; the flattening layer is used to flatten the output of the pooling layer into a one-dimensional vector and then input the fully connected layer; the number of neurons of the fully connected layer is 3, the activation function is ReLU, and the output size is 3*1.
3. The method of claim 1, wherein, In step 5, set quantization threshold T1 = 0.1, T2 = 0.2, T3 = 0.4, T4 = 0.6, and quantize the quantization gradient value Q of each layer to [0, 1] range n , if the mapped quantization gradient value Q n satisfies Q n <T1, quantize the weights of the layer from 32-bit floating point to 4-bit integer; if T1 ≤Q n <T2, quantize the weights of the layer from 32-bit floating point to 8-bit integer; if T2≤Q n <T3, quantize the weights of the layer from 32-bit floating point to 16-bit integer; if T3≤Q n <T4, quantize the weights of the layer from 32-bit floating point to 16-bit floating point; if Q n ≥T4, do not perform quantization operation, and keep the original FP32 format.
4. The quantization method of an image recognition based target detection convolutional neural network according to claim 3, characterized in that, In step 6, during the model retraining process, the accuracy on the validation set is monitored, and if the accuracy decreases by more than 1%, the quantization thresholds T1, T2, T3 and T4 are multiplied by 105% respectively, and the model retraining process is repeated.
5. The quantization method of an image recognition based target detection convolutional neural network according to claim 3 or 4, characterized in that, In step 6, the training includes several rounds, and after each round of training, the original weights of the main network are replaced with the quantized weights; after each round of training, the parameters of the sub-network model are also updated.
6. The quantization method of an image recognition based target detection convolutional neural network according to any one of claims 1-4, characterized in that, In step 2, the pre-processing includes image cropping and scaling, which is used to uniformly adjust each image to the size required for inputting the target detection convolutional neural network; then the image is converted from YUV format to RGB format, and the image is normalized.
7. 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 processor implements the image recognition-based target detection convolutional neural network quantization method of any one of claims 1-6 when executing the program.
Citation Information
Patent Citations
Convolutional neural network trimming method and device, and storage medium
CN110232436A
Convolutional neural network quantification method and device, computer and storage medium
CN110363281A