CN-121999294-A - Chinese herbal medicine intelligent identification method, device, equipment and medium based on open source E203 processor
Abstract
The application relates to a Chinese herbal medicine intelligent identification method, a device, equipment and a medium based on an open source E203 processor, wherein the method comprises the steps that the open source E203 processor sends a fifth weight and a fifth bias of a second expansion convolution layer to a data control module, the data control module lays out the compression convolution feature map, the fifth weight and the fifth bias, and then sends the data control module to a first convolution module to call the second expansion convolution layer to carry out dimension reduction convolution operation so as to output a multi-scale global feature map, the multi-scale global feature map and the multi-scale local feature map are spliced and processed so as to determine a classification convolution feature map, the classification convolution feature map is converted into a one-dimensional vector through an average pooling layer, and Chinese herbal medicines in a Chinese herbal medicine image to be detected are classified and identified according to the one-dimensional vector and sample labels of target Chinese herbal medicines are output. The application does not need to design special hardware for each algorithm layer independently, thereby greatly reducing the occupation of chip area and hardware resource redundancy.
Inventors
- ZHENG XIN
- YU XINLEI
- Huang Shuoji
- ZHONG GUOLIANG
- JIANG XIN
- GAO HUAIEN
- CAI SHUTING
- XIONG XIAOMING
Assignees
- 广东工业大学
Dates
- Publication Date
- 20260508
- Application Date
- 20260129
Claims (10)
- 1. An intelligent Chinese herbal medicine identification method based on an open source E203 processor is characterized by comprising the following steps: The driving open source E203 processor sends the first weight and the first bias of the compressed convolution layer in the Chinese herbal medicine identification model to the second convolution module for temporary storage, and simultaneously sends the Chinese herbal medicine image to be detected and the second weight and the second bias of the initial convolution layer to the data control module for storage; The data control module is used for arranging the Chinese herbal medicine image to be detected, the second weight and the second bias and then sending the Chinese herbal medicine image to a first convolution module, calling an initial convolution layer with the convolution kernel size of 3 multiplied by 3 in the first convolution module to carry out down-sampling processing on a first feature image outputted by dimension reduction convolution operation, then inputting the first feature image into a first maximum pooling layer in sequence, calling a compression convolution layer with the convolution kernel size of 1 multiplied by 1 in the second convolution module to execute corresponding compression convolution operation, then determining a compression convolution feature image, and returning the compression convolution feature image to the data control module to store; The open source E203 processor sends a third weight and a third bias of a classified convolution layer to the second convolution module for temporary storage, and simultaneously sends a fourth weight and a fourth bias of a first extended convolution layer to the data control module, wherein the compressed convolution feature map, the fourth weight and the fourth bias are arranged in the data control module and then sent to the third convolution module to call the first extended convolution layer to carry out dimension reduction convolution operation so as to output a multi-scale local feature map; The open source E203 processor sends a fifth weight and a fifth bias of a second extended convolution layer to the data control module, the data control module lays out the compressed convolution feature map, the fifth weight and the fifth bias, and then sends the data control module to a first convolution module to call the second extended convolution layer to perform dimension reduction convolution operation so as to output a multi-scale global feature map; And splicing and processing the multi-scale global feature map and the multi-scale local feature map to determine a classification convolution feature map, converting the classification convolution feature map into one-dimensional vectors through an average pooling layer, classifying and identifying the Chinese herbal medicines in the Chinese herbal medicine image to be detected according to the one-dimensional vectors, and outputting sample labels of target Chinese herbal medicines.
- 2. The intelligent Chinese herbal medicine recognition method based on the open source E203 processor according to claim 1, wherein the basic network architecture of the Chinese herbal medicine recognition model is a lightweight SqueezeNet convolutional neural network, wherein the lightweight SqueezeNet convolutional neural network comprises an initial convolutional layer, a feature processing layer, a maximum pooling layer, a classification convolutional layer and an average pooling layer, wherein the feature processing layer comprises a compression convolutional layer, a first expansion convolutional layer and a second expansion convolutional layer, the maximum pooling layer comprises a first maximum pooling layer and a second maximum pooling layer, the convolution kernel size of the compression convolutional layer is 1×1, the convolution kernel size of the initial convolutional layer is 3×3, the convolution kernel size of the classification convolutional layer is 1×1, the convolution kernel size of the first expansion convolutional layer is 1×1, and the convolution kernel size of the second expansion convolutional layer is 3×3; the data control module comprises a 3-block 8KB single-port static random access memory, a 16-block 2KB single-port static random access memory and a 4-block 256B single-port static random access memory.
- 3. The intelligent recognition method of Chinese herbal medicine based on an open source E203 processor according to claim 2, wherein the step of driving the open source E203 processor to send the first weight and the first bias of the compressed convolution layer in the Chinese herbal medicine recognition model to the second convolution module for temporary storage, and simultaneously send the Chinese herbal medicine image to be detected and the second weight and the second bias of the initial convolution layer to the data control module for storage respectively comprises the following steps: Acquiring a Chinese herbal medicine image to be detected containing one or more Chinese herbal medicines, inputting the Chinese herbal medicine image to be detected into a Chinese herbal medicine recognition model trained to be converged, and driving an open source E203 processor to send a first weight and a first bias of a compressed convolution layer with a convolution kernel size of 1 multiplied by 1 in the Chinese herbal medicine recognition model to a second convolution module of an artificial intelligent calculation module; And simultaneously, respectively transmitting the to-be-detected Chinese herbal medicine image, the second weight and the second bias of the initial convolution layer with the convolution kernel size of 3 multiplied by 3 in the Chinese herbal medicine identification model to a static random access memory corresponding to the data control module for storage.
- 4. The intelligent recognition method of Chinese herbal medicine based on open source E203 processor according to claim 2, wherein the steps of arranging the to-be-detected Chinese herbal medicine image, the second weight and the second bias in the data control module, sending the to-be-detected Chinese herbal medicine image, the second weight and the second bias to a first convolution module, calling an initial convolution layer with a convolution kernel size of 3×3 in the first convolution module to perform a dimension-reduction convolution operation, sending a first feature image output by the dimension-reduction convolution operation to a first maximum pooling layer in sequence to perform a downsampling process, inputting the first feature image into the second convolution module, calling a compression convolution layer with a convolution kernel size of 1×1 to perform a corresponding compression convolution operation, determining a compression convolution feature image, and returning the compression convolution feature image to the data control module to perform storage include: In the data control module, performing format adaptation, sequence arrangement and storage scheduling on a second weight and a second bias of an initial convolution layer with the convolution kernel size of 3 multiplied by 3 in the Chinese herbal medicine image to be detected and the Chinese herbal medicine identification model, and then sending the second weight and the second bias to the first convolution module; In the first convolution module, an initial convolution layer with the convolution kernel size of 3 multiplied by 3 in the Chinese herbal medicine identification model is called to carry out dimension reduction convolution operation so as to output a first feature map; Sequentially transmitting the first feature map to a first maximum pooling layer for downsampling treatment to obtain a first downsampled feature map, and inputting the first downsampled feature map to a second convolution module; And in the second convolution module, calling a compression convolution layer with the convolution kernel size of 1 multiplied by 1 in the Chinese herbal medicine identification model, executing corresponding compression convolution operation to determine a compression convolution characteristic diagram, and transmitting the compression convolution characteristic diagram back to a static random access memory corresponding to the data control module for storage.
- 5. The intelligent recognition method of Chinese herbal medicine based on an open source E203 processor according to claim 2, wherein the open source E203 processor sends a third weight and a third bias of a classified convolution layer to the second convolution module for temporary storage, and simultaneously sends a fourth weight and a fourth bias of a first extended convolution layer to the data control module, wherein after the compressed convolution feature map, the fourth weight and the fourth bias are organized in the data control module, the data control module sends the data control module to the third convolution module to call the first extended convolution layer to perform a dimension-reduction convolution operation, so as to output a multi-scale local feature map, and the method comprises the steps of: after the second convolution module completes the compression convolution operation of the compression convolution layer in the Chinese herbal medicine identification model and the corresponding completion signal is pulled high, the open source E203 processor sends a third weight and a third bias of the classification convolution layer with the convolution kernel size of 1 multiplied by 1 in the Chinese herbal medicine identification model to the second convolution module for temporary storage, and simultaneously sends a fourth weight and a fourth bias of the first expansion convolution layer with the convolution kernel size of 1 multiplied by 1 in the Chinese herbal medicine identification model to the data control module; The data control module performs format adaptation, sequence arrangement and storage scheduling on the compressed convolution characteristic diagram, the fourth weight and the fourth bias which are stored by the data control module and output by the second convolution module, and sends the data control module to a third convolution module after forming a standardized data stream which is adaptive to the operation requirement of the third convolution module; and in the third convolution module, a first expansion convolution layer with the convolution kernel size of 1 multiplied by 1 in the Chinese herbal medicine identification model is called to carry out dimension reduction convolution operation so as to output a multi-scale local feature map.
- 6. The intelligent recognition method of Chinese herbal medicine based on an open source E203 processor according to claim 2, wherein the open source E203 processor sends a fifth weight and a fifth bias of a second extended convolution layer to the data control module, after the compressed convolution feature map, the fifth weight and the fifth bias are arranged in the data control module, the data control module sends the data control module to a first convolution module to call the second extended convolution layer to perform a dimension-reduction convolution operation, so as to output a multi-scale global feature map, and the method comprises the steps of: after the third convolution module completes the convolution operation of the first expansion convolution layer in the Chinese herbal medicine identification model and the corresponding completion signal is pulled up, the open source E203 processor sends a fifth weight and a fifth bias of a second expansion convolution layer with the convolution kernel size of 3 multiplied by 3 in the Chinese herbal medicine identification model to a data control module; The data control module performs format adaptation, sequence arrangement and storage scheduling on the compressed convolution characteristic diagram, the fifth weight and the fifth bias which are stored by the data control module and output by the third convolution module, and sends the data control module to the first convolution module after forming a standardized data stream which is adaptive to the operation requirement of the first convolution module; and in the first convolution module, a second expansion convolution layer with the convolution kernel size of 3 multiplied by 3 in the Chinese herbal medicine identification model is called to carry out dimension reduction convolution operation so as to output a multi-scale global feature map.
- 7. The intelligent recognition method of Chinese herbal medicine based on an open source E203 processor according to any one of claims 1 to 6, wherein the steps of splicing and processing the multi-scale global feature map and the multi-scale local feature map to determine a classified convolution feature map, converting the classified convolution feature map into a one-dimensional vector by an average pooling layer, classifying and recognizing Chinese herbal medicine in a Chinese herbal medicine image to be detected according to the one-dimensional vector, and outputting a sample label of a target Chinese herbal medicine comprise the steps of: Splicing the multi-scale global feature map and the multi-scale local feature map to determine a second feature map, sending the second feature map to a maximum pooling module to call a second maximum pooling layer to perform downsampling treatment to obtain a second downsampled feature map, and inputting the second downsampled feature map to the second convolution module to be arranged with a third weight and a third bias; Calling a classification convolution layer with the convolution kernel size of 1X1 to execute corresponding classification convolution operation so as to determine a classification convolution feature map, and converting the classification convolution feature map into a one-dimensional vector through an average pooling layer; And carrying out class probability analysis on the one-dimensional vector by using a maximum value searching module, extracting probability values corresponding to the classes of the Chinese herbal medicines, determining the class of the Chinese herbal medicine corresponding to the maximum probability, and outputting a sample label corresponding to the target Chinese herbal medicine.
- 8. An intelligent Chinese herbal medicine recognition device based on an open source E203 processor is characterized by comprising: The data transmission module is arranged to drive the open source E203 processor to transmit the first weight and the first bias of the compressed convolution layer in the Chinese herbal medicine identification model to the second convolution module for temporary storage, and simultaneously transmit the Chinese herbal medicine image to be detected and the second weight and the second bias of the initial convolution layer to the data control module for storage; The first feature extraction module is arranged in the data control module, is used for arranging the Chinese herbal medicine image to be detected, the second weight and the second offset, then is used for sending the Chinese herbal medicine image to the first convolution module, calling an initial convolution layer with the convolution kernel size of 3 multiplied by 3 in the first convolution module to carry out the dimension reduction convolution operation, sequentially sending the first feature image to a first maximum pooling layer to carry out downsampling treatment, then sending the first feature image to the second convolution module, calling a compression convolution layer with the convolution kernel size of 1 multiplied by 1 to carry out the corresponding compression convolution operation, then determining a compression convolution feature image, and returning the compression convolution feature image to the data control module to store the first feature image; The second feature extraction module is configured to send a third weight and a third bias of the classified convolution layer to the second convolution module for temporary storage by the open source E203 processor, and send a fourth weight and a fourth bias of the first extended convolution layer to the data control module, wherein the compressed convolution feature map, the fourth weight and the fourth bias are arranged in the data control module and then sent to the third convolution module to call the first extended convolution layer to perform dimension-reduction convolution operation so as to output a multi-scale local feature map; The third feature extraction module is configured to send a fifth weight and a fifth bias of a second extended convolution layer to the data control module by the open source E203 processor, and send the compressed convolution feature map, the fifth weight and the fifth bias to the first convolution module to call the second extended convolution layer to perform a dimension-reducing convolution operation after the compressed convolution feature map, the fifth weight and the fifth bias are arranged in the data control module, so as to output a multi-scale global feature map; The Chinese herbal medicine identification module is arranged for splicing and processing the multi-scale global feature map and the multi-scale local feature map to determine a classified convolution feature map, converting the classified convolution feature map into one-dimensional vectors through an average pooling layer, classifying and identifying Chinese herbal medicines in a Chinese herbal medicine image to be detected according to the one-dimensional vectors, and outputting sample labels of target Chinese herbal medicines.
- 9. An electronic device comprising a central processor and a memory, characterized in that the central processor is arranged to invoke a computer program stored in the memory for performing the steps of the method according to any of claims 1 to 7.
- 10. A computer-readable storage medium, characterized in that it stores in the form of computer-readable instructions a computer program implemented according to the method of any one of claims 1 to 7, which, when invoked by a computer, performs the steps comprised by the corresponding method.
Description
Chinese herbal medicine intelligent identification method, device, equipment and medium based on open source E203 processor Technical Field The application relates to the field of AI hardware acceleration and embedded systems, in particular to a Chinese herbal medicine intelligent identification method based on an open source E203 processor, a corresponding device, electronic equipment and a computer readable storage medium. Background Along with the rapid development of artificial intelligence technology, an AI intelligent recognition system has become a core interface of man-machine interaction, and is widely deployed in wearable devices, internet of things terminals and other embedded devices, and the devices need to perform real-time intelligent recognition and processing on data such as graphic images, voice, video, action gestures and the like. However, neural network models implementing such intelligent recognition functions are typically complex in structure, computationally intensive, and memory access frequent. Currently, most intelligent terminals still rely on traditional general-purpose computing architectures (such as CPU and GPU) to perform these computing tasks, and there is a significant energy efficiency bottleneck in performing such tasks, that is, the computing efficiency is low, the power consumption is high, and it is difficult to meet the requirements of the terminal device on low power consumption and high energy efficiency. In summary, most intelligent terminals in the prior art still rely on the traditional general computing architecture to execute computing tasks, so that the computing efficiency is low, the power consumption is high, the requirements of the terminal equipment on low power consumption and high energy efficiency are difficult to meet, and the inventor performs corresponding exploration in consideration of solving the problems. Disclosure of Invention The application aims to solve the problems and provide a Chinese herbal medicine intelligent identification method based on an open source E203 processor, a corresponding device, electronic equipment and a computer readable storage medium. In order to meet the purposes of the application, the application adopts the following technical scheme: The application provides a Chinese herbal medicine intelligent identification method based on an open source E203 processor, which is suitable for one of the purposes of the application and comprises the following steps: The driving open source E203 processor sends the first weight and the first bias of the compressed convolution layer in the Chinese herbal medicine identification model to the second convolution module for temporary storage, and simultaneously sends the Chinese herbal medicine image to be detected and the second weight and the second bias of the initial convolution layer to the data control module for storage; The data control module is used for arranging the Chinese herbal medicine image to be detected, the second weight and the second bias and then sending the Chinese herbal medicine image to a first convolution module, calling an initial convolution layer with the convolution kernel size of 3 multiplied by 3 in the first convolution module to carry out down-sampling processing on a first feature image outputted by dimension reduction convolution operation, then inputting the first feature image into a first maximum pooling layer in sequence, calling a compression convolution layer with the convolution kernel size of 1 multiplied by 1 in the second convolution module to execute corresponding compression convolution operation, then determining a compression convolution feature image, and returning the compression convolution feature image to the data control module to store; The open source E203 processor sends a third weight and a third bias of a classified convolution layer to the second convolution module for temporary storage, and simultaneously sends a fourth weight and a fourth bias of a first extended convolution layer to the data control module, wherein the compressed convolution feature map, the fourth weight and the fourth bias are arranged in the data control module and then sent to the third convolution module to call the first extended convolution layer to carry out dimension reduction convolution operation so as to output a multi-scale local feature map; The open source E203 processor sends a fifth weight and a fifth bias of a second extended convolution layer to the data control module, the data control module lays out the compressed convolution feature map, the fifth weight and the fifth bias, and then sends the data control module to a first convolution module to call the second extended convolution layer to perform dimension reduction convolution operation so as to output a multi-scale global feature map; And splicing and processing the multi-scale global feature map and the multi-scale local feature map to determine a classification convolution