A method and system for identifying Chinese medicinal materials of skin type based on a lightweight neural network
By using the ShuffleNet V2-lite model, a lightweight neural network, combined with local attention and cross-stage local networks, the problem of identifying subtle differences in the classification of bark-type Chinese medicinal materials was solved, achieving efficient and accurate detection and identification of Chinese medicinal materials, and suitable for rapid classification in various environments.
Patent Information
- Application Number
- CN202411569288.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Existing technologies for classifying bark-based Chinese medicinal materials suffer from insufficient detail in classification, neglecting subtle differences, leading to large identification errors. Furthermore, they require sophisticated equipment, making them difficult to popularize and unable to meet the demand for rapid and accurate testing.
A lightweight neural network-based approach was adopted. By constructing a ShuffleNet V2-lite network model, combining a local attention mechanism and a cross-stage local network, the model was simplified and trained. The coordinate attention mechanism was used to correct the results, thereby achieving high-precision classification of bark-type Chinese medicinal materials.
It enables intelligent classification and high-precision identification of bark-type Chinese medicinal materials, reduces classification errors, adapts to various shooting environments, lowers costs, and improves detection efficiency and accuracy, making it suitable for large-scale Chinese medicinal material production and quality testing.
Smart Images

Figure CN119579954B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medicinal herb identification technology, and in particular to a method and system for identifying bark-type Chinese medicinal herbs based on a lightweight neural network. Background Technology
[0002] The classification of bark-type medicinal materials is a crucial step in the testing of traditional Chinese medicine (TCM). Bark-type TCM includes several varieties such as Magnolia officinalis, Eucommia ulmoides, and Phellodendron chinense. The "Quality Standards and Testing Guidelines for Traditional Chinese Medicine" provides basic characteristics and related definitions for TCM testing, with key characteristics of bark-type TCM including color, texture, and thickness. These characteristics serve as important indicators for TCM quality assessment and are crucial for identification and quality control. Quickly and accurately obtaining morphological information on bark-type TCM plays a vital role in ensuring TCM quality and aiding in identification.
[0003] Currently, manual inspection methods suffer from drawbacks such as high subjectivity, high cost, time-consuming and labor-intensive processes, and low repeatability, failing to meet the requirements for rapid and accurate large-scale inspection of bark-based medicinal materials. Existing technologies generally use machine vision for medicinal material classification; however, these technologies still have the following shortcomings: firstly, in the classification of bark-based medicinal materials, the sub-classification of different bark types is not detailed enough, ignoring subtle differences and leading to errors in identification; secondly, existing technologies require sophisticated imaging equipment, making them difficult to widely implement. There is an urgent need for a rapid, accurate method for identifying bark-based medicinal materials applicable to various complex environments.
[0004] In the field of machine vision, image processing technology has been widely applied to the phenotypic extraction of traditional Chinese medicinal materials. One type of image processing technology is based on manual feature extraction, which analyzes and processes images of bark-type medicinal materials to calculate various feature parameters such as color, texture, and morphology. This method overcomes the shortcomings of manual detection. However, this method requires continuous testing and optimization, and the process is relatively complex. Furthermore, the feature differences between each type of medicinal material are small. Classical image processing techniques are sensitive to the texture features of objects and lighting conditions, and suffer from problems such as insufficient robustness and generalization ability, making it unable to stably and effectively perform recognition tasks.
[0005] In recent years, with the rapid development of deep learning in image recognition, deep learning technology has also received widespread attention in the field of traditional Chinese medicine classification. Convolutional neural networks can effectively extract multi-scale features from digital images through convolution and pooling operations. Compared with classical image processing techniques, deep learning methods have significantly improved generalization ability. The subtle differences in morphology and color among different types of bark-type traditional Chinese medicine pose challenges to identification and classification. Therefore, there is an urgent need to design a deep learning method suitable for the accurate classification of bark-type traditional Chinese medicine to improve detection and classification accuracy. Summary of the Invention
[0006] In view of the 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] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0009] In a first aspect, embodiments of the present invention provide a method for identifying bark-type Chinese medicinal materials based on a lightweight neural network, comprising: collecting RGB images of various bark-type Chinese medicinal materials under different conditions to form a database; classifying and labeling the images of various bark-type Chinese medicinal materials in the database and establishing an original dataset of bark-type Chinese medicinal materials; constructing a ShuffleNet V2-lite network model based on a local attention mechanism and a cross-stage local network, using a model structure simplification strategy to lightweight the model, and training the ShuffleNet V2-lite network model; correcting the classification results of bark-type Chinese medicinal materials in the ShuffleNet V2-lite network model; and using the updated ShuffleNet V2-lite network model to detect and classify bark-type Chinese medicinal materials; wherein the ShuffleNet V2-lite network model includes a backbone network ShuffleNet... The V2 connection includes a cross-stage local network, a pointwise convolutional layer and a shuffle-unit layer connected to the cross-stage local network, a splicing layer connected to the shuffle-unit layer and the pointwise convolutional layer, a channel shuffling module connected to the splicing layer, and a coordinate attention mechanism module connected to the channel shuffling module; multiple shuffle-unit layers are provided and connected sequentially, with the first shuffle-unit layer connected to the cross-stage local network and the last shuffle-unit layer connected to the splicing layer.
[0010] As a preferred embodiment of the lightweight neural network-based method for identifying skin-type Chinese medicinal materials described in this invention, the method of using a model structure simplification strategy to lightweight the model refers to removing the last 1×1 convolution in each shuffle unit layer.
[0011] As a preferred embodiment of the method for identifying bark-based Chinese medicinal materials based on lightweight neural networks described in this invention, the ShuffleNet V2-lite network model is trained, tested, and the optimal network model parameters are selected and updated.
[0012] As a preferred embodiment of the lightweight neural network-based identification method for dermal Chinese medicinal materials described in this invention, the testing of the ShuffleNet V2-lite network model refers to testing the ShuffleNet V2-lite network model using RGB images of dermal Chinese medicinal materials that have undergone rotation, flipping, noise, and exposure operations.
[0013] As a preferred embodiment of the lightweight neural network-based method for identifying dermal Chinese medicinal materials described in this invention, the correction of the classification results of dermal Chinese medicinal materials in the ShuffleNet V2-lite network model refers to calculating the Interchange of Values (IOU) between the coordinates of each detection result during the classification of medicinal materials. If the IOU is greater than a set threshold, the image result with the highest IOU is selected as the final result. The formula for calculating IOU is:
[0014]
[0015] In the formula, This represents the area of the intersection between the predicted bounding box and the ground truth bounding box. This represents the sum of the predicted bounding box area and the actual bounding box area.
[0016] As a preferred embodiment of the lightweight neural network-based identification method for traditional Chinese medicines based on bark, the RGB images of various bark-based traditional Chinese medicines under different conditions refer to the RGB images of various bark-based traditional Chinese medicines under different lighting and backgrounds from multiple perspectives, and also include images formed by randomly rotating, flipping, noise-reducing, and exposure-reducing the RGB images of collected bark-based traditional Chinese medicines.
[0017] As a preferred embodiment of the lightweight neural network-based method for identifying bark-type Chinese medicinal materials according to the present invention, the training of the ShuffleNet V2-lite network model includes the following steps: dividing the original bark-type Chinese medicinal material dataset into a training set and a test set in an 8:2 ratio; training the training set using Mixup data augmentation, with the batch size of the input data set set to 32, the weight decay parameter set to 0.0005, the momentum set to 0.9, the initial learning rate of the model training set to 0.01, and the number of iteration rounds set to 100.
[0018] Secondly, this invention provides a system for identifying bark-type Chinese medicinal materials based on a lightweight neural network, comprising: an acquisition unit for acquiring images of bark-type Chinese medicinal materials; a processing unit for detecting the images of bark-type Chinese medicinal materials; and an output unit for outputting the results of each category of bark-type Chinese medicinal materials in the detected images. The processing unit includes: a labeling module for classifying and labeling the bark-type Chinese medicinal material images acquired by the acquisition unit; a detection module for constructing a ShuffleNet V2-lite network model to detect the images of bark-type Chinese medicinal materials; and a correction module for calculating the Intersection over Union (IOU) of the coordinates of the detected bark-type Chinese medicinal materials one by one. If a single bark-type Chinese medicinal material has multiple label boxes of different categories, the result with the larger IOU is selected for output when outputting the final result.
[0019] Thirdly, embodiments of the present invention provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the steps of a method for identifying skin-type Chinese medicinal materials based on a lightweight neural network.
[0020] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements the steps of a method for identifying skin-type Chinese medicinal materials based on a lightweight neural network.
[0021] The beneficial effects of this invention are as follows: when testing bark-based Chinese medicinal materials, it can accurately distinguish different varieties of bark-based Chinese medicinal materials, including subtle differences in color, texture and thickness, reducing classification errors caused by similar appearance, realizing intelligent classification and high-precision identification of bark-based Chinese medicinal materials, improving the accuracy and reliability of classification, and at the same time, it is of great significance for improving the quality control level of Chinese medicinal materials.
[0022] During the detection process, there is no need to deliberately arrange the medicinal materials. It can quickly and accurately detect and classify bark-type medicinal materials under various shooting environments, maintaining high recognition efficiency even under changing lighting or complex backgrounds. This reduces shooting costs and improves the accuracy and efficiency of detection and classification, demonstrating strong adaptability. Furthermore, this method exhibits good robustness and generalization ability for bark-type medicinal materials from different batches and sources, making it suitable for large-scale medicinal material production and quality testing. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the process for identifying skin-type Chinese medicinal materials based on a lightweight neural network.
[0025] Figure 2 The improved ShuffleNet V2-lite network architecture diagram, which introduces cross-stage local networks and embedded coordinate attention mechanisms;
[0026] Figure 3 This is a schematic diagram of the coordinate attention mechanism;
[0027] Figure 4 A simplified diagram of a shuffle unit;
[0028] Figure 5 Illustrations of various types of bark-based Chinese medicinal materials;
[0029] Figure 6 This is a distribution chart of the number of samples of bark-type Chinese medicinal materials;
[0030] Figure 7 Example input images for the ShuffleNet V2-lite network model to classify and detect Chinese medicinal materials in bark;
[0031] Figure 8 This is an example image output by the ShuffleNet V2-lite network model for classifying and detecting Chinese medicinal materials in the peel category. Detailed Implementation
[0032] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0033] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0034] 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 phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0035] Example 1
[0036] Reference Figures 1-4 This is the first embodiment of the present invention, which provides a method for identifying bark-based Chinese medicinal materials based on a lightweight neural network, including the following steps:
[0037] S1. Collect RGB images of various skin-type Chinese medicinal materials under different conditions to form a database. The RGB images of various skin-type Chinese medicinal materials come from photos taken under the guidance of professional medical personnel, as well as photos obtained from publicly available Chinese medicinal material image datasets.
[0038] The RGB images of various types of medicinal herbs under different conditions refer to the RGB images of various types of medicinal herbs under different lighting and backgrounds from multiple perspectives. They also include images formed by randomly rotating, flipping, noise-reducing, and exposure-reducing the RGB images of collected medicinal herbs.
[0039] S2. Classify and label the images of various types of bark-based Chinese medicinal materials in the database, and establish an original dataset of bark-based Chinese medicinal materials. In this embodiment, the types of bark-based Chinese medicinal materials are divided into eight categories: Lycium bark, Eucommia bark, Albizia bark, Magnolia bark, Phellodendron bark, Moutan bark, Cinnamon bark, and Acanthopanax bark.
[0040] S3. Construct a ShuffleNet V2-lite network model based on the local attention mechanism and cross-stage local network, use a model structure simplification strategy to lighten the model, and train the ShuffleNet V2-lite network model.
[0041] S4. Correct the classification results of bark-type Chinese medicinal materials in the ShuffleNet V2-lite network model;
[0042] S5. Use the updated ShuffleNet V2-lite network model to detect and classify bark-type Chinese medicinal materials.
[0043] In step S3, the ShuffleNet V2-lite network model includes a cross-stage local network connected to the backbone network ShuffleNet V2, a pointwise convolutional layer and a shuffle-unit layer connected to the cross-stage local network, a splicing layer connected to the shuffle-unit layer and the pointwise convolutional layer, a channel shuffling module connected to the splicing layer, and a coordinate attention mechanism module connected to the channel shuffling module.
[0044] The shuffle-unit layer is configured in multiple ways and connected sequentially. 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.
[0045] The ShuffleNet V2-lite network model operates as follows: The backbone network ShuffleNet V2 extracts features from the input images of bark-type medicinal herbs, extracting multi-scale features for different categories of bark-type medicinal herbs. The extracted features then enter the Cross-Stage Local Network (CSP). After processing by the CSP, the network splits into two branches. The left branch processes the features through a single pointwise convolution (1x1 convolution), a design aimed at enhancing the network's non-linear expressive power while controlling the number of parameters. The right branch retains multiple shuffle-unit layers with a stride of 1 from the original module, continuing to handle feature extraction. Finally, after completing their respective processing tasks, the two branches are concatenated along the channel dimension to merge the results. For the network model constructed in this embodiment, please refer to [link to example]. Figure 2 Coordinate attention (CA) is introduced at the end of the network. By explicitly incorporating spatial location information into the attention learning process, it enhances the model's ability to perceive spatial structure and improves model performance. For a diagram of the CA attention mechanism, please refer to [link to diagram]. Figure 3 .
[0046] Features passed through a cross-stage local network and coordinate attention mechanism are fed into the output layer of ShuffleNet V2. The output layer judges each feature point in the feature layer, and finally obtains the classification result of each scale of Chinese medicinal materials based on the different features of each type of Chinese medicinal material image.
[0047] Finally, the model is simplified by removing the last 1×1 convolution in each shuffle unit layer. This aims to reduce the number of parameters and computational complexity, achieving higher runtime efficiency. Please refer to the simplified model structure. Figure 4 .
[0048] Training the ShuffleNet V2-lite network model includes the following steps:
[0049] The original dataset of bark-type Chinese medicinal materials was divided into a training set and a test set in an 8:2 ratio.
[0050] The training set was trained using Mixup data augmentation. The batch size of the input data was set to 32, the weight decay parameter was set to 0.0005, the momentum magnitude was set to 0.9, the initial learning rate of the model was set to 0.01, and the number of iterations was 100.
[0051] Preferably, after training the ShuffleNet V2-lite network model, the ShuffleNet V2-lite network model is tested, and the optimal network model parameters are selected and updated.
[0052] Furthermore, testing the ShuffleNet V2-lite network model involves testing the ShuffleNet V2-lite network model using RGB images of bark-type Chinese medicinal materials that have undergone rotation, flipping, noise, and exposure operations.
[0053] In step S4, the correction of the classification results of bark-type Chinese medicinal materials in the ShuffleNet V2-lite network model refers to calculating the Interchange of Union (IOU) between the coordinates of each detection result during the classification of medicinal materials. If the IOU is greater than a set threshold, the image result with the highest IOU is selected as the final result. The formula for calculating IOU is:
[0054]
[0055] In the formula, This represents the area of the intersection between the predicted bounding box and the ground truth bounding box. This represents the sum of the predicted bounding box area and the actual bounding box area.
[0056] This embodiment also provides a system for identifying bark-based Chinese medicinal materials based on a lightweight neural network, which includes: a data acquisition unit, a processing unit, and an output unit.
[0057] The acquisition unit is used to acquire images of bark-type Chinese medicinal materials;
[0058] The processing unit is used for image detection of bark-type Chinese medicinal materials;
[0059] The output unit is used to output the results of detecting various types of bark-based Chinese medicinal materials in the image;
[0060] The processing unit includes a marking module and a detection module.
[0061] The labeling module is used to classify and label the images of bark-type Chinese medicinal materials acquired by the acquisition unit;
[0062] The detection module is used to build a ShuffleNet V2-lite network model to detect images of bark-type Chinese medicinal materials.
[0063] The correction module is used to calculate the Intersection over Union (IOU) of the coordinates of the detection results of bark-type Chinese medicinal materials one by one. If a single bark-type Chinese medicinal material has multiple different categories of bounding boxes, the result with the larger IOU will be selected for output when outputting the final result.
[0064] When using the method described in this invention to test bark-based Chinese medicinal materials, different varieties of bark-based Chinese medicinal materials can be accurately distinguished, including subtle differences in color, texture, and thickness. This reduces classification errors caused by similar appearances, realizes intelligent classification and high-precision identification of bark-based Chinese medicinal materials, improves the accuracy and reliability of classification, and is of great significance for improving the quality control level of Chinese medicinal materials.
[0065] During the detection process, there is no need to deliberately arrange the medicinal materials. It can quickly and accurately detect and classify bark-type medicinal materials under various shooting environments, maintaining high recognition efficiency even under changing lighting or complex backgrounds. This reduces shooting costs and improves the accuracy and efficiency of detection and classification, demonstrating strong adaptability. Furthermore, this method exhibits good robustness and generalization ability for bark-type medicinal materials from different batches and sources, making it suitable for large-scale medicinal material production and quality testing.
[0066] 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 the computer-executable instructions to realize the method for identifying skin-type Chinese medicinal materials based on a lightweight neural network as proposed in the above embodiment.
[0067] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0068] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the method for identifying dermal Chinese medicinal materials based on a lightweight neural network as proposed in the above embodiments. 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 Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0069] Example 2
[0070] Reference Figures 5-8 This is the second embodiment of the present invention, which provides a specific example of a method for identifying skin-type Chinese medicinal materials based on a lightweight neural network.
[0071] In this embodiment, the method for capturing images of bark-type medicinal materials involves placing the sample on white paper, observing it under natural light using a digital camera, and capturing images from all viewing angles. These images are then encoded to form an image sample. The encoding includes the name of the medicinal material, the viewing angle number, and the sample number, enabling automatic image reading, processing, analysis, and result storage during batch processing.
[0072] The method for collecting images from publicly available datasets was to crawl professional Chinese medicinal herb database websites and search using search engines. This study collected a large number of Chinese medicinal herb images and performed meticulous processing and screening to ensure the quality and usability of the data. Ultimately, approximately 12,486 high-quality Chinese medicinal herb images with a resolution of 640*640 were obtained.
[0073] The dataset annotation method in this embodiment is as follows: based on the differences in phenotypic categories of bark-type medicinal materials, they are divided into eight categories: Lycium chinense root bark, Eucommia ulmoides bark, Albizia julibrissin bark, Magnolia officinalis bark, Phellodendron chinense bark, Paeonia suffruticosa bark, Cinnamomum cassia bark, and Acanthopanax senticosus bark. Each image is then manually annotated using the Labelimg annotation software. See the table for each category of bark-type medicinal materials. Figure 5 See the distribution chart of the number of samples of bark-type Chinese medicinal materials. Figure 6 .
[0074] The test results are shown in Table 1.
[0075] Table 1 Test Results
[0076]
[0077] As shown in Table 1, 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 the specific task of identifying bark-type Chinese medicinal materials. Its accuracy and F1 score reached 97.41% and 97.46%, respectively. In terms of lightweight design, ShuffleNet V2-lite maintains the lightweight and efficiency of the model while improving performance, making it an ideal choice for handling complex classification tasks in resource-limited environments.
[0078] When correcting the classification results of bark-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 a bark-type Chinese medicinal material has the characteristics of multiple bark-type Chinese medicinal materials, and the image result with the highest IOU should be selected as the final result.
[0079] In step S5, input a single image of the bark-type Chinese medicinal material to be detected, see [link / reference]. Figure 7 The image detection results are obtained, along with parameters such as the type of Chinese medicinal material in the image, its appearance characteristics, function, and prediction accuracy. (See [link to relevant documentation]). Figure 8 .
[0080] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for identifying bark-based Chinese medicinal materials based on a lightweight neural network, characterized in that: include: Collect RGB images of various bark-type Chinese medicinal materials under different conditions to form a database; The images of various types of bark-derived Chinese medicinal materials in the database are classified and labeled, and an original dataset of bark-derived Chinese medicinal materials is established. The ShuffleNet V2-lite network model is constructed based on the local attention mechanism and cross-stage local network. The model is lightweighted by adopting a model structure simplification strategy, and the ShuffleNet V2-lite network model is trained. The classification results of bark-type Chinese medicinal materials in the ShuffleNet V2-lite network model were corrected; The updated ShuffleNet V2-lite network model was used to detect and classify bark-type Chinese medicinal materials; The ShuffleNet V2-lite network model includes a cross-stage local network connected to the backbone network ShuffleNet V2, a pointwise convolutional layer and a shuffle-unit layer connected to the cross-stage local network, a splicing layer connected to the shuffle-unit layer and the pointwise convolutional layer, a channel shuffling module connected to the splicing layer, and a coordinate attention mechanism module connected to the channel shuffling module. The shuffle-unit layer is configured in multiple ways and connected sequentially. 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 bark-type Chinese medicinal materials based on a lightweight neural network as described in claim 1, characterized in that: The strategy of simplifying the model structure to reduce its weight refers to removing the last 1×1 convolution in each shuffle unit layer.
3. The method for identifying bark-type Chinese medicinal materials based on a lightweight neural network as described in claim 2, characterized in that: After training the ShuffleNet V2-lite network model, the ShuffleNet V2-lite network model is tested, and the optimal network model parameters are selected and updated.
4. The method for identifying bark-type Chinese medicinal materials based on a lightweight neural network as described in claim 3, characterized in that: Testing the ShuffleNet V2-lite network model involves using RGB images of bark-type Chinese medicinal materials that have undergone rotation, flipping, noise, and exposure operations to test the ShuffleNet V2-lite network model.
5. The method for identifying bark-type Chinese medicinal materials based on a lightweight neural network as described in claim 4, characterized in that: The correction of the classification results of bark-type Chinese medicinal materials in the ShuffleNet V2-lite network model refers to calculating the Interchange of Union (IOU) between the coordinates of each detection result during the classification process. If the IOU is greater than a set threshold, the image result with the highest IOU is selected as the final result. The formula for calculating IOU is as follows: ; In the formula, AOI represents the area of the intersection between the predicted bounding box and the ground truth bounding box, and AOU represents the sum of the areas of the predicted bounding box and the ground truth bounding box.
6. The method for identifying bark-type Chinese medicinal materials based on a lightweight neural network as described in claim 5, characterized in that: The RGB images of various types of medicinal herbs under different conditions refer to the RGB images of various types of medicinal herbs under different lighting and backgrounds from multiple perspectives. They also include images formed by randomly rotating, flipping, noise-reducing, and exposure-reducing the RGB images of collected medicinal herbs.
7. The method for identifying bark-type Chinese medicinal materials based on a lightweight neural network as described in claim 6, characterized in that: Training the ShuffleNet V2-lite network model includes the following steps: The original dataset of bark-type Chinese medicinal materials was divided into a training set and a test set in an 8:2 ratio. The training set was trained using Mixup data augmentation. The batch size of the input data was set to 32, the weight decay parameter was set to 0.0005, the momentum magnitude was set to 0.9, the initial learning rate of the model was set to 0.01, and the number of iterations was 100.
8. A system for identifying skin-type medicinal materials based on a lightweight neural network, based on the method for identifying skin-type medicinal materials based on a lightweight neural network as described in any one of claims 1 to 7, characterized in that: include, The acquisition unit is used to acquire images of bark-type Chinese medicinal materials; The processing unit is used for image detection of bark-type Chinese medicinal materials; The output unit is used to output the results of detecting various types of bark-based Chinese medicinal materials in the image; The processing unit includes, The labeling module is used to classify and label the images of bark-type Chinese medicinal materials acquired by the acquisition unit; The detection module is used to build a ShuffleNet V2-lite network model to detect images of bark-type Chinese medicinal materials. The correction module is used to calculate the Intersection over Union (IOU) of the coordinates of the detection results of bark-type Chinese medicinal materials one by one. If a single bark-type Chinese medicinal material has multiple different categories of bounding boxes, the result with the larger IOU will be 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, characterized in that: When the processor executes the computer program, it implements the steps of the method for identifying skin-type Chinese medicinal materials based on a lightweight neural network as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for identifying skin-type Chinese medicinal materials based on a lightweight neural network as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Conveyor belt carrier roller detection method based on YOLOv3
CN111754498A
Battery defect detection method based on lightweight neural network
CN113989267A