In this research,the lightweight deep learning YOLOv10 object detection algorithm is harnessed to develop an efficient algorithm for detecting Chinese herbal medicines on mobile devices,furnishing an intelligent and high-performance technical solution for the detection of Chinese herbal medicines in scenarios such as cultivation production,quality assessment,educational popularization and automated dispensing.A dataset for target detection of 31 commonly used Chinese herbal medicines is constructed,comprising a total of 6900 images.To enhance the multi-scale detection capability and detection efficiency of the model,the Ghost Convolution(Ghost Convolution,Ghost Conv)lightweight convolution and the weighted bidirectional feature pyramid module(Bidirectional Feature Pyramid Network,BiFPN)are incorporated,and an improved lightweight model for Chinese herbal medicine detection,namely YOLOv10n-GB,is proposed.The algorithm is then employed to conduct training,testing,analysis and mobile terminal deployment tests on the image samples within the dataset.The improved model exhibits2.27 M(Million)parameters,6.4 G(Giga)computational complexity,and an m AP50 value of0.947.In comparison with YOLOv10n,the parameter count is reduced by 1.2%,the computational load is decreased by 4.5%,and the mean average precision 50(mAP50)is augmented by 1.8%.The average frame rate of the model detection on the mobile terminal reaches 8.1Frames Per Second(FPS).When contrasted with other lightweight algorithms such as YOLOv5n and YOLOv8n,YOLOv10n-GB demonstrates the lowest floating-point computational cost and higher detection accuracy.The YOLOv10n-GB algorithm has accomplished the task of efficient detection of Chinese herbal medicines on mobile terminals,paving the way for novel ideas in establishing a portable and real-time detection scheme for Chinese herbal medicines.
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |