US12033379B2ActiveUtilityA1

Image recognition method and apparatus

38
Assignee: CANAAN BRIGHT SIGHT CO LTDPriority: Aug 31, 2018Filed: Jul 10, 2019Granted: Jul 9, 2024
Est. expiryAug 31, 2038(~12.1 yrs left)· nominal 20-yr term from priority
G06N 3/0464G06V 10/82G06V 10/764G06N 3/08G06N 3/045G06N 3/048G06N 3/105G06F 18/2413G06V 20/00G06N 3/063
38
PatentIndex Score
0
Cited by
6
References
18
Claims

Abstract

An image recognition method and apparatus. The method comprises: obtaining original image data, convolutional neural network configuration parameters, and convolutional neural network operation parameters from a data transfer bus, the original image data comprising M pieces of pixel data, and M being a positive integer ( 101 ); and performing convolutional neural network operation on the original image data by a convolutional neural network operation module according to the convolutional neural network configuration parameters and the convolutional neural network operation parameters ( 102 ), wherein the convolutional neural network operation module comprises a convolution operation unit, a batch processing operation unit, and an activation operation unit connected in sequence. The method improves the real timeliness of image recognition.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. An image recognition processing method, comprising:
 obtaining, from a data transmission bus, original image data, convolutional neural network configuration parameters and convolutional neural network operation parameters, wherein the original image data comprises data for M pixels, M being a positive integer; 
 performing, by a convolutional neural network operation module, a convolutional neural network operation on the original image data according to the convolutional neural network configuration parameters and the convolutional neural network operation parameters, wherein the convolutional neural network operation module comprises a convolution operation unit, a batch processing operation unit and an activation operation unit connected sequentially, 
 wherein the obtaining of the original image data comprises passively obtaining, from the data transmission bus via a first interface, the original image data sent by a central processing unit, and writing the original image data into a first storage unit; 
 the obtaining of the convolutional neural network configuration parameters comprises passively obtaining, from the data transmission bus via the first interface, a parameter configuration instruction sent by the central processing unit and sending the parameter configuration instruction to a parameter distribution module, wherein the parameter configuration instruction comprises the convolutional neural network configuration parameters; and 
 the obtaining of the convolutional neural network operation parameters comprises actively reading, from the data transmission bus via a second interface, a convolution operation parameter, a batch processing operation parameter and an activation operation parameter stored in an external storage, and writing the convolution operation parameters and the batch processing operation parameters into a second storage unit and sending the activation operation parameters to the parameter distribution module. 
 
     
     
       2. The image recognition processing method of  claim 1 , wherein the obtaining, from a data transmission bus, original image data, convolutional neural network configuration parameters and convolutional neural network operation parameters comprises:
 obtaining, from an advanced extensible interface (AXI) bus, the original image data, the convolutional neural network configuration parameters and the convolutional neural network operation parameters. 
 
     
     
       3. The image recognition processing method of  claim 1 , further comprising:
 obtaining, by an operation control module, control-purpose configuration parameters among the convolutional neural network configuration parameters from the parameter distribution module; 
 controlling, by the operation control module according to the control-purpose configuration parameters, the passive obtaining of the original image data via the first interface, the passive obtaining of the parameter configuration instruction via the first interface and the active reading of the convolution operation parameter, the batch processing operation parameter and the activation operation parameter via the second interface in a time-division manner; and 
 sending, by the operation control module, the control-purpose configuration parameters among the convolutional neural network configuration parameters to the convolutional neural network operation module. 
 
     
     
       4. The image recognition processing method of  claim 3 , wherein the convolutional neural network operation module further comprises an operation control unit, and the image recognition processing method further comprises:
 receiving, by the operation control unit, the control-purpose configuration parameters among the convolutional neural network configuration parameters, wherein the control-purpose configuration parameters comprise an original image size for input or output, and the number of input or output channels of each layer of convolutional neural network; and 
 controlling, by the operation control unit according to the control-purpose configuration parameters, reading of the original image data from the first storage unit, reading of the convolution operation parameter and the batch processing operation parameter from the second storage unit, and sending of the original image data, the convolution operation parameter and the batch processing operation parameter to the convolution operation unit. 
 
     
     
       5. The image recognition processing method of  claim 4 , further comprising:
 obtaining, from the parameter distribution module by the operation control module, the activation operation parameter, and operation-purpose configuration parameters among the convolutional neural network configuration parameters, wherein the operation-purpose configuration parameters comprises a convolution operation configuration parameter, a convolution kernel size and a pooling mode; sending, by the operation control module, the activation operation parameter, and the operation-purpose configuration parameters among the convolutional neural network configuration parameters to the operation control unit of the convolutional neural network operation module; and sending, by the operation control unit, the activation operation parameter to the activation operation unit, sending the convolution operation configuration parameter and the convolution kernel size to the convolution operation unit, and sending the pooling mode to a pooling unit; or 
 sending, by the parameter distribution module, the activation operation parameter directly to the activation operation unit, sending the convolution operation configuration parameter and the convolution kernel size to the convolution operation unit, and sending the pooling mode to a pooling unit. 
 
     
     
       6. The image recognition processing method of  claim 4 , further comprising:
 performing image padding processing on the original image data read from the first storage and sending the processed original image data to the convolution operation unit; and performing cumulative summation processing on the convolution operation parameter read from the second storage unit and sending the processed convolution operation parameter to the convolution operation unit. 
 
     
     
       7. The image recognition processing method of  claim 4 , wherein the second storage unit comprises a first storage, a second storage and a third storage, and the writing of the convolution operation parameter and the batch processing operation parameter into the second storage unit and the reading of the convolution operation parameter and the batch processing operation parameter from the second storage unit comprises:
 writing the convolution operation parameter into the first storage or the second storage and reading the convolution operation parameter from the first storage or the second storage, wherein the convolution operation parameter is read from the second storage when writing the convolution operation parameter into the first storage, or the convolution operation parameter is read from the first storage when writing the convolution operation parameter into the second storage; and 
 writing the batch processing operation parameter into the third storage, and reading the batch processing operation parameter from the third storage. 
 
     
     
       8. The image recognition processing method of  claim 1 , wherein the convolutional neural network operation module comprises N operation components provided in parallel, where each of the N operation components comprises the convolution operation unit, the batch processing operation unit and the activation operation unit connected sequentially, and the N operation components perform a convolution operation, a batch processing operation and an activation operation on data for N pixels in the original image data respectively and simultaneously, N being a positive integer less than or equal to M. 
     
     
       9. An image recognition processing apparatus, comprising:
 a parameter obtaining module including a data transmission bus configured to transmit original image data, convolutional neural network configuration parameters and convolutional neural network operation parameters, the parameter obtaining module configured to obtain, from a data transmission bus, the original image data, the convolutional neural network configuration parameters and the convolutional neural network operation parameters, wherein the original image data comprises data for M pixels, M being a positive integer; 
 a convolutional neural network operation module connected to the parameter obtaining module and configured to perform convolutional neural network operation on the original image data according to the convolutional neural network configuration parameters and the convolutional neural network operation parameters, wherein the convolutional neural network operation module comprises a convolution operation unit, a batch processing operation unit and an activation operation unit connected sequentially, 
 wherein the image recognition processing apparatus further comprises a parameter distribution module, wherein the parameter obtaining module further comprises a first interface, a second interface, a first storage unit and a second storage unit, wherein: 
 the first interface comprises a first end connected to the data transmission bus, and a second end connected to the parameter distribution module and the first storage unit, and is configured to passively obtain from the data transmission bus the original image data sent by a central processing unit and write the original image data into the first storage unit, and passively obtain from the data transmission bus a parameter configuration instruction sent by a central processing unit and send the parameter configuration instruction to the parameter distribution module, wherein the parameter configuration instruction comprises the convolutional neural network configuration parameters, and 
 the second interface comprises a first end connected to the data transmission bus, and a second end connected to the parameter distribution module and the second storage unit, and is configured to actively read from the data transmission bus a convolution operation parameter, a batch processing operation parameter and an activation operation parameter stored in an external storage, writ the convolution operation parameter and the batch processing operation parameter into the second storage unit, and send the activation operation parameter to the parameter distribution module. 
 
     
     
       10. The image recognition processing apparatus of  claim 9 , further comprising an operation control module connected to the parameter distribution module and the convolutional neural network operation module,
 wherein the operation control module is configured to: obtain control-purpose configuration parameters among the convolutional neural network configuration parameters from the parameter distribution module; control according to the control-purpose configuration parameters the passive obtaining of the original image data via the first interface, the passive obtaining of the parameter configuration instruction via the first interface and the active reading of the convolution operation parameter, the batch processing operation parameter and the activation operation parameter from the second interface; and send the control-purpose configuration parameters among the convolutional neural network configuration parameters to the convolutional neural network operation module. 
 
     
     
       11. The image recognition processing apparatus of  claim 10 , wherein the convolutional neural network operation module further comprises an operation control unit comprising a parameter input terminal connected to the operation control module, and a control terminal connected to the convolution operation unit, the batch processing operation unit and the activation operation unit;
 wherein the operation control unit is configured to: receive control-purpose configuration parameters among the convolutional neural network configuration parameters, the control-purpose configuration parameters comprising an original image size for input or output, and the number of input or output channels of each layer of convolutional neural network; and control, according to the control-purpose configuration parameters, reading of the original image data from the first storage unit, reading of the convolution operation parameter and the batch processing operation parameter from the second storage unit and sending of the original image data, the convolution operation parameter and the batch processing operation parameter to the convolution operation unit. 
 
     
     
       12. The image recognition processing apparatus of  claim 11 , wherein the convolutional neural network operation module further comprises a pooling unit and a write back unit, wherein:
 each of the pooling unit and the write back unit is connected to the control terminal of the operation control unit; the operation control module is further configured to obtain from the parameter distribution module the activation operation parameter, and operation-purpose configuration parameters among the convolutional neural network configuration parameters, the operation-purpose configuration parameters comprising a convolution operation configuration parameter, a convolution kernel size and a pooling mode, and send the activation operation parameter and the operation-purpose configuration parameters to the operation control unit of the convolutional neural network operation module; and the operation control unit is further configured to send the activation operation parameter to the activation operation unit, send the convolution operation configuration parameter and the convolution kernel size to the convolution operation unit, and send the pooling mode to the pooling unit; or 
 the parameter distribution module is directly connected to the activation operation unit, the convolution operation unit and the pooling unit, and is configured to directly send the activation operation parameter to the activation operation unit, send the convolution operation configuration parameter and the convolution kernel size to the convolution operation unit, and send the pooling mode to the pooling unit. 
 
     
     
       13. The image recognition processing apparatus of  claim 11 , wherein the convolutional neural network operation module further comprises:
 an image preprocessing unit provided between the first storage unit and the convolution operation unit and configured to perform image padding processing on the original image data and send the processed original image data to the convolution operation unit; and 
 a parameter preprocessing unit provided between the second storage unit and the convolution operation unit and configured to perform cumulative summation processing on the convolution operation parameter and send the processed convolution operation parameter to the convolution operation unit. 
 
     
     
       14. The image recognition processing apparatus of  claim 13 , wherein the parameter obtaining module further comprises a data read-write unit connected to the first interface, the first storage unit, the second interface, the second storage unit, the image preprocessing unit, the parameter preprocessing unit, and the write back unit, wherein
 the data read-write unit is configured to obtain the original image data from the first interface and write the original image data into the first storage unit, and read the original image data from the first storage unit and send the original image data to the image preprocessing unit; 
 the data read-write unit is further configured to obtain the convolution operation parameter and the batch processing operation parameter from the second interface and write the convolution operation parameter and the batch processing operation parameter into the second storage unit, and read the convolution operation parameter and the batch processing operation parameter from the second storage unit and send the convolution operation parameter and the batch processing operation parameter to the parameter preprocessing unit; and 
 the data read-write unit is further configured to write into the first storage unit an image data subjected to a pooling operation and sent by the write back unit. 
 
     
     
       15. The image recognition processing apparatus of  claim 14 , wherein the second storage unit comprises a first storage, a second storage and a third storage, and the data read-write unit is configured to:
 write the convolution operation parameter into the first storage or the second storage, and read the convolution operation parameter from the first storage or the second storage, wherein the convolution operation parameter is read from the second storage when writing the convolution operation parameter into the first storage, or the convolution operation parameter is read from the first storage when writing the convolution operation parameter into the second storage; and 
 write the batch processing operation parameter into the third storage, and read the batch processing operation parameter from the third storage. 
 
     
     
       16. The image recognition processing apparatus of  claim 9 , further comprising a data temporary storage unit connected to the convolution operation unit of each operation component and configured to store a result of convolution operation performed for each input channel by the convolution operation unit. 
     
     
       17. The image recognition processing apparatus of  claim 9 , wherein the data transmission bus is an advanced extensible interface (AXI) bus. 
     
     
       18. The image recognition processing apparatus of  claim 9 , wherein the convolutional neural network operation module comprises N operation components provided in parallel, where each of the N operation components comprises the convolution operation unit, the batch processing operation unit and the activation operation unit connected sequentially, and the N operation components perform a convolution operation, a batch processing operation and an activation operation on data for N pixels in the original image data respectively and simultaneously, N being a positive integer less than or equal to M.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.