Lightweight neural network-based bark traditional Chinese medicinal material identification method and system

Through the recognition method based on lightweight neural network, the ShuffleNet V2-lite network model is used to accurately classify dermal Chinese medicinal materials, which solves the problem of insufficient detailed sub-categorization and high error rate in the existing technology, and achieves rapid and accurate detection and classification of dermal Chinese medicinal materials.

CN119579954AActive Publication Date: 2025-03-07ANHUI AGRICULTURAL UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411569288.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-03-07
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

The prior art has problems in the classification of dermal Chinese medicinal materials, such that the subcategory is not detailed enough, the error rate and the equipment requirements are high, and it is difficult to meet the needs of rapid and accurate detection.

Method used

The recognition method based on lightweight neural network is adopted to collect RGB images of dermal Chinese medicinal materials under different conditions, establish a database, and use positioning attention mechanism and cross-stage local network to build a ShuffleNet V2-lite network model, lightweight and train the model to achieve accurate classification of dermal Chinese medicinal materials.

Benefits of technology

It has achieved accurate distinction between different varieties of dermis, reduced classification errors, improved classification accuracy and reliability, adapted to multiple shooting environments, reduced costs, and is suitable for large-scale production and quality inspection of traditional Chinese medicinal materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579954A_ABST
    Figure CN119579954A_ABST
Patent Text Reader

Abstract

The invention discloses a bark traditional Chinese medicine identification method and system based on a lightweight neural network, and relates to the technical field of medicinal material identification, and the method comprises the steps: collecting RGB images of various bark traditional Chinese medicines under different conditions, and forming a database; classifying and marking the images of various skin type traditional Chinese medicinal materials in the database, and establishing an original skin type traditional Chinese medicinal material data set; constructing a ShuffleNet V2-lite network model on the basis of a positioning attention mechanism and a cross-stage local network; the classification result of the bark type traditional Chinese medicinal materials in the ShuffleNet V2-lite network model is corrected; and the skin type traditional Chinese medicinal materials are detected and classified by using the updated ShuffleNet V2-lite network model. When the method is used for detecting the bark type traditional Chinese medicinal materials, different varieties of bark type traditional Chinese medicinal materials can be accurately distinguished, classification errors caused by similar appearances are reduced, intelligent classification and high-precision identification of the bark type traditional Chinese medicinal materials are achieved, the accuracy and reliability of classification are improved, and meanwhile the method has great significance in improving the quality control level of the traditional Chinese medicinal materials.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medicinal material identification, and in particular to a method and system for identifying leather-based Chinese medicinal materials based on a lightweight neural network. Background Art

[0002] The classification of Chinese medicinal materials of skin is an important part of Chinese medicinal materials testing. Chinese medicinal materials of skin include Magnolia officinalis, Eucommia ulmoides, Phellodendron amurense and many other varieties. The "Guidelines for Quality Standards and Testing of Chinese Medicinal Materials" provides the basic properties and related definitions of Chinese medicinal materials testing, among which the relevant properties of Chinese medicinal materials of skin mainly include color, texture, thickness, etc. These properties are important indicators for the quality assessment of Chinese medicinal materials and are of great significance for the identification and quality control of Chinese medicinal materials. Rapidly and accurately obtaining the property information of Chinese medicinal materials of skin is important for ensuring the quality of Chinese medicinal materials and assisting in the identification of medicinal materials.

[0003] At present, the manual detection method has the disadvantages of strong subjectivity, high cost, time-consuming and labor-intensive detection process, and low repeatability, which cannot meet the requirements of large-scale rapid and accurate detection of leather Chinese medicinal materials. The existing technology generally uses machine vision to classify Chinese medicinal materials. However, the existing technology still has the following shortcomings: First, in the process of classifying leather Chinese medicinal materials, the subclassification of different leather types is not detailed enough, and minor differences are ignored, resulting in errors in the identification process; second, the existing technology has high requirements for camera equipment and is difficult to popularize. There is an urgent need for a fast and accurate method for identifying leather Chinese medicinal materials that is suitable for a variety of complex environments.

[0004] In the field of machine vision, image processing technology has been widely used in the extraction of Chinese medicinal materials phenotypes. One type of image processing technology is based on manual feature extraction. By analyzing and processing the images of Chinese medicinal materials of skin, various characteristic parameters such as color, texture and morphology of Chinese medicinal materials are calculated. This method overcomes the shortcomings of manual detection. However, this method requires continuous testing and selection, and the process is relatively complicated, and the characteristics of each type of Chinese medicinal materials are relatively small. Classical image processing technology is sensitive to the texture characteristics and lighting conditions of objects, and has problems such as lack of robustness and generalization ability, and cannot perform recognition tasks stably and effectively.

[0005] In recent years, with the rapid development of deep learning in the field of image recognition, deep learning technology has also received widespread attention in the field of Chinese herbal medicine classification. Convolutional neural networks can effectively extract multi-scale features of images by performing convolution and pooling operations on digital images. Compared with classical image processing techniques, deep learning methods have significantly improved generalization capabilities. The differences in morphology, color, etc. between each type of skin Chinese herbal medicine are slight, which makes it difficult to identify and classify them. Therefore, it is urgent to design a deep learning method suitable for accurate classification of skin Chinese herbal medicines to improve the accuracy of detection and classification. Summary of the invention

[0006] In view of the above problems existing in the prior art, the present invention is proposed.

[0007] Therefore, the problem to be solved by the present invention is how to provide a method for identifying skin-type Chinese medicinal materials based on a lightweight neural network.

[0008] In order to solve the above technical problems, the present invention provides the following technical solutions: In the first aspect, an embodiment of the present invention provides a method for identifying Chinese medicinal materials of leather type based on a lightweight neural network, which includes collecting RGB images of various Chinese medicinal materials of leather type under different conditions to form a database; classifying and labeling various Chinese medicinal materials of leather type in the database, and establishing an original Chinese medicinal materials of leather data set; constructing a ShuffleNet V2-lite network model based on a localized attention mechanism and a cross-stage local network, lightweighting the model by adopting a model structure simplification strategy, and training the ShuffleNet V2-lite network model; correcting the classification results of Chinese medicinal materials of leather type in the ShuffleNet V2-lite network model; detecting and classifying Chinese medicinal materials of leather type using the updated ShuffleNet V2-lite network model; the ShuffleNet V2-lite network model includes a main network ShuffleNet V2-lite network model and a ShuffleNet V2-lite network model. V2, a cross-stage local network connected to the cross-stage local network, a point-by-point convolution layer and a shuffle-unit layer respectively connected to the cross-stage local network, a splicing layer connected to the shuffle-unit layer and the point-by-point convolution layer, a channel shuffle module connected to the splicing layer, and a coordinate attention mechanism module connected to the channel shuffle module; the shuffle-unit layer is provided with a plurality of layers and connected in sequence, the first shuffle-unit layer is connected to the cross-stage local network, and the end shuffle-unit layer is connected to the splicing layer.

[0009] As a preferred solution of the method for identifying skin-based Chinese medicinal materials based on lightweight neural networks described in the present invention, wherein: the lightweighting of the model by adopting a model structure simplification strategy refers to removing the last 1×1 convolution in each shuffle unit layer.

[0010] As a preferred solution of the method for identifying skin-type Chinese medicinal materials based on lightweight neural networks described in the present invention, after training the ShuffleNet V2-lite network model, the ShuffleNet V2-lite network model is tested to select and update the optimal network model parameters.

[0011] As a preferred solution of the method for identifying skin-type Chinese medicinal materials based on lightweight neural networks described in the present invention, testing the ShuffleNet V2-lite network model refers to testing the ShuffleNet V2-lite network model using RGB images of skin-type Chinese medicinal materials that have undergone rotation, flipping, noise, and exposure operations.

[0012] As a preferred solution of the method for identifying Chinese medicinal materials of leather type based on lightweight neural network described in the present invention, wherein: the correction of the classification results of Chinese medicinal materials of leather type in ShuffleNet V2-lite network model means that when classifying medicinal materials, the IOU between the coordinates of the detection results are calculated one by one. If the IOU is greater than the set threshold, the image result with the higher IOU is selected as the final result, wherein the calculation formula of IOU is:

[0013] In the formula, Represents the intersection area of ​​the predicted box and the true box, Represents the sum of the predicted box area and the true box area.

[0014] As a preferred embodiment of the method for identifying leather-type Chinese medicinal materials based on a lightweight neural network described in the present invention, the RGB images of various leather-type Chinese medicinal materials under different conditions refer to RGB images of various leather-type Chinese medicinal materials under different lighting and backgrounds under multiple viewing angles, and also include images formed by randomly rotating, flipping, noise-adding, and exposing the RGB images of the collected leather-type Chinese medicinal materials.

[0015] As a preferred solution of the method for identifying Chinese medicinal materials of leather based on lightweight neural network described in the present invention, the ShuffleNet V2-lite network model is trained, including the following steps: dividing the original Chinese medicinal materials of leather data set into a training set and a test set in a ratio of 8:2; training the training set using Mixup data enhancement, the batch size of the input data is set to 32, the weight decay parameter is 0.0005, the momentum size is set to 0.9, the initial learning rate of the model training is set to 0.01, and the number of iterations is 100.

[0016] In a second aspect, the present invention provides a system for identifying Chinese medicinal skin materials based on a lightweight neural network, comprising: an acquisition unit for acquiring images of Chinese medicinal skin materials; a processing unit for detecting images of Chinese medicinal skin materials; an output unit for outputting results of Chinese medicinal skin materials of various categories in the detection image; the processing unit comprises a marking module for classifying and labeling the images of Chinese medicinal skin materials acquired by the acquisition unit; a detection module for constructing a ShuffleNet V2-lite network model to realize the detection of images of Chinese medicinal skin materials; a correction module for calculating the IOU of the coordinates of the detection results of Chinese medicinal skin materials one by one. If a single Chinese medicinal skin material has multiple marking boxes of different categories, the result with a larger IOU is selected for output when outputting the final result.

[0017] In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, the steps of a method for identifying cortical Chinese medicinal materials based on a lightweight neural network are implemented.

[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, the steps of a method for identifying cortical Chinese medicinal materials based on a lightweight neural network are implemented.

[0019] The beneficial effects of the present invention are as follows: when testing skin-type Chinese medicinal materials, different varieties of skin-type Chinese medicinal materials can be accurately distinguished, including subtle differences in color, texture and thickness, reducing classification errors caused by similar appearance, realizing intelligent classification and high-precision identification of skin-type Chinese medicinal materials, improving classification accuracy and reliability, and at the same time having important significance for improving the quality control level of Chinese medicinal materials.

[0020] During the detection process, there is no need to deliberately place the Chinese medicinal materials. It can quickly and accurately detect and classify skin Chinese medicinal materials in a variety of shooting environments. It can maintain efficient recognition effects even in the case of changing light or complex backgrounds, reduce shooting costs, improve the accuracy and efficiency of detection and classification, and has strong adaptability. In addition, this method has good robustness and generalization ability for skin Chinese medicinal materials of different batches and sources, and is suitable for large-scale Chinese medicinal material production and quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0022] Figure 1 This is a flowchart of the method for identifying skin-based Chinese medicinal materials based on lightweight neural networks.

[0023] Figure 2 The structure diagram of ShuffleNet V2-lite, an improved network that introduces cross-stage local networks and embedded coordinate attention mechanisms; Figure 3 Schematic diagram of coordinate attention mechanism; Figure 4 This is a simplified schematic diagram of the shuffle unit; Figure 5 Schematic diagram of various categories of skin-type Chinese medicinal materials; Figure 6 This is the distribution map of the number of samples of skin-type Chinese medicinal materials; Figure 7 This is an example image of the input for the ShuffleNet V2-lite network model for the classification and detection of Chinese medicinal materials with skins; Figure 8 This is an example image of the output of the ShuffleNet V2-lite network model for classification and detection of Chinese medicinal materials with peels. DETAILED DESCRIPTION

[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0025] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0026] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0027] Example 1 Reference Figure 1~Figure 4 , which is the first embodiment of the present invention, provides a method for identifying Chinese medicinal materials of skin type based on a lightweight neural network, comprising the following steps: S1. Collect RGB images of various skin-type Chinese medicinal materials under different conditions to form a database, wherein the RGB images of various skin-type Chinese medicinal materials are derived from photos taken under the guidance of professional medical personnel, and also include photos obtained from public Chinese medicinal materials image datasets.

[0028] The RGB images of various skin-type Chinese medicinal materials under different conditions refer to RGB images of various skin-type Chinese medicinal materials under different lighting and different backgrounds under multiple viewing angles, and also include images formed by randomly rotating, flipping, noise-adding, and exposing the collected RGB images of skin-type Chinese medicinal materials.

[0029] S2. Classify and annotate various skin-type Chinese medicinal materials images in the database, and establish an original skin-type Chinese medicinal materials dataset. In this embodiment, the types of skin-type Chinese medicinal materials are divided into eight categories: Radix Lycii, Eucommia, Albizzia Julibrissin, Magnolia officinalis, Phellodendron, Paeonia suffruticosa, Cinnamomum cassia, and Acanthopanax acanthopanax.

[0030] S3. Constructing a ShuffleNet V2-lite network model based on the local attention mechanism and the cross-stage local network, lightweighting the model by adopting a model structure simplification strategy, and training the ShuffleNet V2-lite network model; S4. Correct the classification results of skin-type Chinese medicinal materials in the ShuffleNet V2-lite network model; S5. Use the updated ShuffleNet V2-lite network model to detect and classify skin-type Chinese medicinal materials.

[0031] Wherein, in step S3, the ShuffleNet V2-lite network model includes a cross-stage local network connected to the backbone network ShuffleNet V2, a point-by-point convolution layer and a shuffle-unit layer respectively connected to the cross-stage local network, a splicing layer connected to the shuffle-unit layer and the point-by-point convolution layer, a channel shuffle module connected to the splicing layer, and a coordinate attention mechanism module connected to the channel shuffle module; There are multiple shuffle-unit layers, which are connected in sequence. The first shuffle-unit layer is connected to the cross-stage local network, and the last shuffle-unit layer is connected to the splicing layer.

[0032] The process of the ShuffleNet V2-lite network model is as follows: the backbone network ShuffleNet V2 extracts features from the input images of Chinese medicinal skins, extracts multi-scale features of Chinese medicinal skins of different categories, and the extracted features enter the cross-stage local network CSP. After being processed by CSP, they are divided into two branches. The left branch is processed by a layer of point-by-point convolution (1x1 convolution). This design aims to enhance the nonlinear expression ability of the network while controlling the number of parameters. The right branch retains multiple shuffle-unit layers with a step size of 1 in the original module and continues to be responsible for feature extraction. Finally, after completing their respective processing tasks, the two branches will be spliced ​​in the channel dimension to merge the processing results. For the network model constructed in this embodiment, please refer to Figure 2 At the end of the network, coordinate attention CA is introduced to enhance the model's perception of spatial structure and improve the performance of the model by explicitly incorporating spatial position information into the attention learning process. For the CA attention mechanism structure diagram, please refer to Figure 3 .

[0033] The features passed through the cross-stage local network and coordinate attention mechanism are passed to the output layer of ShuffleNet V2. The output layer judges each feature point in the feature layer, and finally obtains the classification results of Chinese medicinal materials of each scale based on the different features of each Chinese medicinal material image.

[0034] Finally, the model is simplified by removing the last 1×1 convolution in each shuffle unit layer, aiming to reduce the number of model parameters and computational complexity, and achieve higher operating efficiency. Figure 4 .

[0035] Training the ShuffleNet V2-lite network model includes the following steps: The original bark Chinese medicinal material data set is divided into a training set and a test set in a ratio of 8:2; The training set was trained using Mixup data enhancement, the batch size of the input data was set to 32, the weight decay parameter was 0.0005, the momentum size was set to 0.9, the initial learning rate of the model training was set to 0.01, and the number of iterations was 100.

[0036] Preferably, after the ShuffleNet V2-lite network model is trained, the ShuffleNet V2-lite network model is tested to select and update the optimal network model parameters.

[0037] Furthermore, testing the ShuffleNet V2-lite network model refers to testing the ShuffleNet V2-lite network model using RGB images of skin Chinese medicinal materials that have undergone rotation, flipping, noise, and exposure operations.

[0038] In step S4, the correction of the classification results of Chinese medicinal materials of skin in the ShuffleNet V2-lite network model means that when classifying medicinal materials, the IOU between the coordinates of the detection results is calculated one by one. If the IOU is greater than the set threshold, the image result with the higher IOU is selected as the final result, wherein the calculation formula of IOU is:

[0039] In the formula, Represents the intersection area of ​​the predicted box and the true box, Represents the sum of the predicted box area and the true box area.

[0040] This embodiment also provides a system for identifying a method for skin-based Chinese medicinal materials based on a lightweight neural network, which includes: a collection unit, a processing unit and an output unit.

[0041] A collection unit, used for collecting images of skin-type Chinese medicinal materials; A processing unit, used for detecting images of skin-type Chinese medicinal materials; An output unit, used for outputting the results of detecting various types of Chinese medicinal materials of skin in the image; The processing unit includes a marking module and a detection module.

[0042] A labeling module, used for classifying and labeling the skin-type Chinese medicinal material images collected by the collection unit; The detection module is used to build the ShuffleNet V2-lite network model to detect images of skin-type Chinese medicinal materials; The correction module is used to calculate the IOU of the coordinates of the detection results of skin-type Chinese medicinal materials one by one. If a single skin-type Chinese medicinal material has multiple marking boxes of different categories, the result with the larger IOU is selected for output when outputting the final result.

[0043] When using the method described in the present invention to detect skin-type Chinese medicinal materials, different varieties of skin-type Chinese medicinal materials can be accurately distinguished, including subtle differences in color, texture and thickness, reducing classification errors caused by similar appearance, realizing intelligent classification and high-precision identification of skin-type Chinese medicinal materials, improving the accuracy and reliability of classification, and at the same time having important significance for improving the quality control level of Chinese medicinal materials.

[0044] During the detection process, there is no need to deliberately place the Chinese medicinal materials. It can quickly and accurately detect and classify skin Chinese medicinal materials in a variety of shooting environments. It can maintain efficient recognition effects even in the case of changing light or complex backgrounds, reduce shooting costs, improve the accuracy and efficiency of detection and classification, and has strong adaptability. In addition, this method has good robustness and generalization ability for skin Chinese medicinal materials of different batches and sources, and is suitable for large-scale Chinese medicinal material production and quality inspection.

[0045] This embodiment also provides a computer device, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the method for identifying Chinese medicinal materials based on leather based on lightweight neural networks as proposed in the above embodiment.

[0046] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0047] The present embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for identifying Chinese medicinal materials of leather based on a lightweight neural network as proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0048] Example 2 Reference Figure 5~Figure 8 , which is the second embodiment of the present invention, and this embodiment provides a specific example of a method for identifying skin-based Chinese medicinal materials based on a lightweight neural network.

[0049] In this embodiment, the method for photographing the image of the skin-type Chinese medicinal material is to place the medicinal material sample on white paper, observe it with a digital camera under natural light, and photograph the image from the full-view observation surface for encoding to form an image sample. The code includes the medicinal material name, the observation surface number and the sample number, so that the image can be automatically read, processed and analyzed, and the result stored during batch processing.

[0050] The method of collecting images in the public dataset is to crawl professional Chinese medicinal materials database websites and search using search engines. This study collected a large number of Chinese medicinal materials images and processed and screened them carefully to ensure the quality and availability of the data. Finally, about 12,486 high-quality Chinese medicinal materials images with a resolution of 640*640 were obtained.

[0051] The dataset annotation method in this embodiment is to classify the bark Chinese medicinal materials into eight categories according to the differences in the phenotypic categories of bark Chinese medicinal materials: Lycium bark, Eucommia bark, Albizzia julibrissin, Magnolia officinalis, Phellodendron chinense, Paeonia suffruticosa root bark, Cinnamomum cassia bark, and Acanthopanax odoratum bark, and use Labelimg annotation software to manually annotate each image. Figure 5 , see the distribution diagram of the number of samples of Chinese medicinal materials of skin Figure 6 .

[0052] The test results are shown in Table 1.

[0053] Table 1 Test results

[0054] From the test results in Table 1, we can see that by combining the coordinate attention mechanism with the cross-stage local network, ShuffleNet V2-lite effectively improves its feature extraction and classification capabilities, and performs better in processing specific leather Chinese medicinal materials identification tasks, with an accuracy rate and F1 score of 97.41% and 97.46% respectively. In terms of lightweight design, ShuffleNet V2-lite maintains the lightweight and high efficiency of the model while improving performance, making it an ideal choice for processing complex classification tasks in resource-limited environments.

[0055] When correcting the classification results of skin-type Chinese medicinal materials in the ShuffleNet V2-lite network model, the IOU threshold is set to 0.2. If the IOU is greater than 0.2, it is considered that one skin-type Chinese medicinal material has the characteristics of multiple skin-type Chinese medicinal materials, and the one with the highest IOU in the image result needs to be selected as the final result.

[0056] When performing step S5, a single skin Chinese medicinal material image to be detected is input, see Figure 7 , get the image detection results, and at the same time get the image skin Chinese medicinal materials types, appearance characteristics, functions and prediction accuracy parameters, see Figure 8 .

[0057] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for identifying Chinese medicinal materials of skin type based on lightweight neural network, characterized in that: include: Collect RGB images of various skin-type Chinese medicinal materials under different conditions to form a database; Classify and annotate various skin-type Chinese medicinal materials images in the database, and establish an original skin-type Chinese medicinal materials dataset; A ShuffleNet V2-lite network model is constructed based on a local attention mechanism and a cross-stage local network, a model structure simplification strategy is adopted to lightweight the model, and the ShuffleNet V2-lite network model is trained; Corrected the classification results of Chinese medicinal materials with skin in the ShuffleNet V2-lite network model; Use the updated ShuffleNet V2-lite network model to detect and classify skin-related Chinese medicinal materials; The ShuffleNet V2-lite network model includes a cross-stage local network connected to the backbone network ShuffleNet V2, a point-by-point convolution layer and a shuffle-unit layer respectively connected to the cross-stage local network, a splicing layer connected to the shuffle-unit layer and the point-by-point convolution layer, a channel shuffle module connected to the splicing layer, and a coordinate attention mechanism module connected to the channel shuffle module; There are multiple shuffle-unit layers, which are connected in sequence. The first shuffle-unit layer is connected to the cross-stage local network, and the last shuffle-unit layer is connected to the splicing layer.

2. The method for identifying Chinese medicinal materials of skin based on lightweight neural network as claimed in claim 1, characterized in that: The lightweighting of the model by adopting the model structure simplification strategy refers to removing the last 1×1 convolution in each shuffle unit layer.

3. The method for identifying Chinese medicinal materials of skin based on lightweight neural network as claimed in claim 2, characterized in that: After the ShuffleNet V2-lite network model is trained, the ShuffleNet V2-lite network model is tested, and the optimal network model parameters are selected and updated.

4. The method for identifying Chinese medicinal materials of skin based on lightweight neural network as claimed in claim 3, characterized in that: Testing the ShuffleNet V2-lite network model refers to testing the ShuffleNet V2-lite network model using an RGB image of a skin Chinese medicinal material that has been rotated, flipped, noisy, and exposed.

5. The method for identifying Chinese medicinal materials of skin based on lightweight neural network as claimed in claim 4, characterized in that: The correction of the classification results of skin-type Chinese medicinal materials in the ShuffleNet V2-lite network model refers to calculating the IOU between the coordinates of the detection results one by one when classifying medicinal materials. If the IOU is greater than the set threshold, the image result with the higher IOU is selected as the final result, wherein the calculation formula of IOU is: ; Where AOI represents the intersection area of ​​the predicted box and the true box, and AOU represents the sum of the predicted box area and the true box area.

6. The method for identifying Chinese medicinal materials of leather based on lightweight neural network as claimed in claim 5, characterized in that: The RGB images of various skin-type Chinese medicinal materials under different conditions refer to RGB images of various skin-type Chinese medicinal materials under different lighting and different backgrounds under multiple viewing angles, and also include images formed by randomly rotating, flipping, noise-adding, and exposing the collected RGB images of skin-type Chinese medicinal materials.

7. The method for identifying Chinese medicinal materials of skins based on lightweight neural network as claimed in claim 6, characterized in that: Training the ShuffleNet V2-lite network model includes the following steps: The original bark Chinese medicinal material data set is divided into a training set and a test set in a ratio of 8:2; The training set was trained using Mixup data enhancement, the batch size of the input data was set to 32, the weight decay parameter was 0.0005, the momentum size was set to 0.9, the initial learning rate of the model training was set to 0.01, and the number of iterations was 100.

8. A system for identifying Chinese medicinal materials of leather based on a lightweight neural network, based on the method for identifying Chinese medicinal materials of leather based on a lightweight neural network according to any one of claims 1 to 7, characterized in that: include, A collection unit, used for collecting images of skin-type Chinese medicinal materials; A processing unit, used for detecting images of skin-type Chinese medicinal materials; An output unit, used for outputting the results of detecting various types of Chinese medicinal materials of skin in the image; The processing unit comprises: A labeling module, used for classifying and labeling the skin-type Chinese medicinal material images collected by the collection unit; The detection module is used to build the ShuffleNet V2-lite network model to detect images of skin-type Chinese medicinal materials; The correction module is used to calculate the IOU of the coordinates of the detection results of skin-type Chinese medicinal materials one by one. If a single skin-type Chinese medicinal material has multiple marking boxes of different categories, the result with the larger IOU is selected for output when outputting the final result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for identifying leather-based Chinese medicinal materials based on a lightweight neural network as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for identifying skin-based Chinese medicinal materials based on a lightweight neural network as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Conveyor belt carrier roller detection method based on YOLOv3

    CN111754498A

  • Battery defect detection method based on lightweight neural network

    CN113989267A

  • Target detection method and device based on coordinate attention mechanism

    CN117392508A

  • Lightweight residual network-based traditional Chinese medicine decoction piece classification and identification method and system

    CN117437622A

  • An improved hardware primitive for implementations of deep neural networks

    WO2020215124A1