MoLi-Net: A Lightweight Brightness-Aware Model for Chinese Herbal Materials Recognition with an Auxiliary Module for Impurity Detection
Abstract
1. Introduction
- This research proposes MobileAttn, a lightweight attention module that dynamically recalibrates convolutional features. By encoding global features into learnable tokens and fusing them to generate a spatial attention map, this mechanism adaptively enhances key regions and suppresses background noise, improving feature discriminability and generalization at a marginal computational cost.
- An illumination-adaptive attention module denoted as LightAttn is proposed, which integrates brightness-aware weights with dual-path attention covering both channel and spatial dimensions to achieve global regulation, thereby dynamically mitigating the adverse effects induced by varying illumination conditions.
- This paper replaces some convolutional layers (Conv) of YOLOv11 with depth-wise separable convolutional layers (DSConv) to realize a lightweight convolutional network, P-YOLOv11, which effectively reduces the model complexity. Taking this as the baseline model, the MoLi-Net network is constructed by fusing the MobileAttn and LightAttn modules.
- A new algorithm auxiliary module is proposed to assist in detecting impurities on the conveyor belt by improving IoU and implementing staged NMS.
- The proposed improved model MoLi-Net is evaluated using the Chinese herbal materials dataset, and its detection mAP@0.5 reaches 96.6%. Compared with YOLOv11, the designed model achieves a better balance between accuracy and computational efficiency.
2. Related Work
2.1. Object Detection Applications
2.2. Advances in Impurity Detection Technology
3. Method
3.1. The MoLi-Net Network Architecture
3.1.1. MobileAttn Module
3.1.2. LightAttn Module
3.1.3. Network Architecture Optimization
3.2. Auxiliary Module for Impurity Detection
4. Experiments and Results
4.1. Dataset
4.2. Comparative Experiments
4.2.1. Accuracy Comparison
4.2.2. Efficiency Comparison
4.3. Ablation Study
4.3.1. Sensitivity Analysis of Parameters
4.3.2. Module-Wise Ablation Analysis
4.4. Performance Evaluation of Impurity Detection
5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Varghese, R.; Sambath, M. Yolov8: A novel object detection algorithm with enhanced performance and robustness. In Proceedings of the 2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS), Chennai, India, 18–19 April 2024; pp. 1–6. [Google Scholar]
- Yao, L. Deep learning-based object detection algorithms. In Proceedings of the International Workshop on Advanced Applications of Deep Learning in Image Processing (IWADI 2024), Kuala Lumpur, Malaysia, 27–29 December 2024; p. 02024. [Google Scholar]
- Rasheed, A.F.; Zarkoosh, M. YOLOv11 optimization for efficient resource utilization. J. Supercomput. 2025, 81, 1085. [Google Scholar] [CrossRef]
- Tang, Y.C.; Qiu, J.J.; Zhang, Y.Q.; Wu, D.X.; Cao, Y.H.; Zhao, K.X.; Zhu, L.X. Optimization strategies of fruit detection to overcome the challenge of unstructured background in field orchard environment: A review. Precis. Agric. 2023, 24, 1183–1219. [Google Scholar] [CrossRef]
- Lu, Y.F.; Gao, J.W.; Yu, Q.; Li, Y.; Lv, Y.S.; Qiao, H. A Cross-Scale and Illumination Invariance-Based Model for Robust Object Detection in Traffic Surveillance Scenarios. IEEE Trans. Intell. Transp. Syst. 2023, 24, 6989–6999. [Google Scholar] [CrossRef]
- Liu, X.; Sui, Q.; Chen, Z. Real time weed identification with enhanced mobilevit model for mobile devices. Sci. Rep. 2025, 15, 27323. [Google Scholar] [CrossRef] [PubMed]
- Cai, H.; Li, J.; Hu, M.; Gan, C.; Han, S. EfficientViT: Lightweight Multi-Scale Attention for High-Resolution Dense Prediction. In Proceedings of the 2023 IEEE/CVF International Conference on Computer Vision (ICCV), Paris, France, 1–6 October 2023; pp. 17256–17267. [Google Scholar]
- Hong, J.X.; He, X.Q.; Deng, Z.L.; Yang, C.H. IoU-aware feature fusion R-CNN for dense object detection. Mach. Vis. Appl. 2024, 35, 3. [Google Scholar] [CrossRef]
- Song, F.H.; Bao, K.C.; Deng, M.L.; Xia, X.Y.; Sun, L.; Zhou, J.; Liu, L.; Jiang, L.B. Steel surface defect detection based on PSO-Gabor and an improved faster RCNN. Nondestruct. Test. Eval. 2025, 41, 2607–2630. [Google Scholar] [CrossRef]
- Liu, G.Y.; Yang, D.R.; Ye, J.; Lu, H.J.; Chen, L.; Wang, Z.; Zhao, Y. A real-time welding defect detection framework based on RT-DETR deep neural network. Adv. Eng. Inform. 2025, 65, 103318. [Google Scholar] [CrossRef]
- Zhang, X.Y.; Zhai, J.Y. Real-time detection of domestic waste based on deep learning. In Proceedings of 2024 Chinese Intelligent Systems Conference (CISC 2024); Springer: Singapore, 2024; pp. 462–470. [Google Scholar]
- Tu, B.; Ren, Q.; Li, J.; Cao, Z.L.; Cheng, Y.Y.; Plaza, A. NCGLF2: Network combining global and local features for fusion of multisource remote sensing data. Inf. Fusion 2024, 104, 102192. [Google Scholar] [CrossRef]
- Zhang, W.; Guo, D.; Shang, Y.; Zhang, W.; Hu, Z. GLAF-DETR: Detection Transformer With Global–Local Adaptive Fusion Attention for Infrared Maritime Object Detection. IEEE Internet Things J. 2025, 12, 44927–44940. [Google Scholar] [CrossRef]
- Liu, X.Y.; Zhou, S.B.; Ma, J.B.; Sun, Y.M.; Zhang, J.L.; Zuo, H.R. DFAS-YOLO: Dual Feature-Aware Sampling for Small-Object Detection in Remote Sensing Images. Remote Sens. 2025, 17, 3476. [Google Scholar] [CrossRef]
- Dong, G.; Zhao, C.; Pan, X.; Basu, A. Learning Temporal Distribution and Spatial Correlation Toward Universal Moving Object Segmentation. IEEE Trans. Image Process. 2024, 33, 2447–2461. [Google Scholar] [CrossRef] [PubMed]
- Jiang, Y.F.; Gong, X.Y.; Liu, D.; Cheng, Y.; Fang, C.; Sheng, X.H.; Yang, J.C.; Zhou, P.; Wang, Z.Y. EnlightenGAN: Deep light enhancement without paired supervision. IEEE Trans. Image Process. 2021, 30, 2340–2349. [Google Scholar] [CrossRef] [PubMed]
- Ma, Q.T.; Wang, Y.; Zeng, T.Y. Retinex-Based Variational Framework for Low-Light Image Enhancement and Denoising. IEEE Trans. Multimed. 2023, 25, 5580–5588. [Google Scholar] [CrossRef]
- Guo, C.L.; Li, C.Y.; Guo, J.C.; Loy, C.C.; Hou, J.H.; Kwong, S.; Cong, R.M. Zero-Reference Deep Curve Estimation for Low-Light Image Enhancement. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 1777–1786. [Google Scholar]
- Xu, Y.L.; Liu, Z.H.; Li, J.; Huang, D.Y.; Chen, Y.B.; Zhou, Y. Real-time detection and localization of weeds in dictamnus dasycarpus fields for laser-based weeding control. Agronomy 2024, 14, 2363. [Google Scholar] [CrossRef]
- Liang, Z.W.; Xu, X.Y.; Yang, D.Y.; Liu, Y.B. The development of a lightweight DE-YOLO model for detecting impurities and broken rice grains. Agriculture 2025, 15, 848. [Google Scholar] [CrossRef]
- Li, Z.Q.; Jia, D.Y.; He, Z.H.; Wu, N.K. MSG-YOLO: A multi-scale dynamically enhanced network for the real-time detection of small impurities in large-volume parenterals. Electronics 2025, 14, 1149. [Google Scholar] [CrossRef]
- Yang, Z.; Han, D.Q.; Yang, Y.; Dezert, J. A dual-threshold based evidential openmax approach for open set recognition. In Proceedings of the 2024 27th International Conference on Information Fusion (FUSION), Venice, Italy, 8–11 July 2024. [Google Scholar]
- Liu, S.L.; Zeng, Z.Y.; Ren, T.H.; Li, F.; Zhang, H.; Yang, J.; Jiang, Q.; Li, C.Y.; Yang, J.W.; Su, H.; et al. Grounding DINO: Marrying DINO with grounded pre-training for open-set object detection. In Proceedings of the 18th European Conference on Computer Vision (ECCV), Milan, Italy, 29 September–4 October 2024. [Google Scholar]
- Cheng, T.H.; Sone, L.; Ge, Y.X.; Liu, W.Y.; Wang, X.G.; Shan, Y. YOLO-World: Real-time open-vocabulary object detection. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024; pp. 16901–16911. [Google Scholar]
- Chitty-Venkata, K.T.; Emani, M.; Vishwanath, V.; Somani, A.K. Neural architecture search for transformers: A survey. IEEE Access 2022, 10, 108374–108412. [Google Scholar] [CrossRef]
- Yeganeh, Y.; Farshad, A.; Weinberger, P.; Ahmadi, S.A.; Adeli, E.; Navab, N. Transformers pay attention to convolutions leveraging emerging properties of ViTs by dual attention-image network. In Proceedings of the 2023 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), Paris, France, 2–6 October 2023; pp. 2296–2307. [Google Scholar]
- Lin, R.Y.; Zhou, Z.R.; You, S.Y.; Rao, R.G.; Kuo, C.C.J. Geometrical interpretation and design of multilayer perceptrons. IEEE Trans. Neural Netw. Learn. Syst. 2024, 35, 2545–2559. [Google Scholar] [CrossRef] [PubMed]
- Ilan, B.; Ranganath, A.; Alvarez, J.; Khatri, S.; Marcia, R. Interpretability of ReLU for inversion. In Proceedings of the 2022 21st IEEE International Conference on Machine Learning and Applications (ICMLA), Nassau, Bahamas, 12–14 December 2022; pp. 1190–1195. [Google Scholar]
- Woo, S.H.; Park, J.; Lee, J.Y.; Kweon, I.S. CBAM: Convolutional block attention module. In Proceedings of the 15th European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- Li, Z.W.; Liu, F.; Yang, W.J.; Peng, S.H.; Zhou, J. A survey of convolutional neural networks: Analysis, applications, and prospects. IEEE Trans. Neural Netw. Learn. Syst. 2022, 33, 6999–7019. [Google Scholar] [CrossRef] [PubMed]
- Tian, Y.J.; Su, D.; Lauria, S.; Liu, X.H. Recent advances on loss functions in deep learning for computer vision. Neurocomputing 2022, 497, 129–158. [Google Scholar] [CrossRef]
- Wang, J.; Feng, S.C.; Cheng, Y. Survey of research on lightweight neural network structures for deep learning. Comput. Eng. 2021, 47, 1–13. [Google Scholar] [CrossRef]












| Parameter | Setup |
|---|---|
| Epochs | 100 |
| Batch Size | 16 |
| Img Size | 640 |
| Learning Rate | 0.01 |
| Optimizer | AUTO |
| Close Mosaic | Last 10 Epochs |
| Models | mAP@0.5 | mAP@0.5:0.95 | Params | FLOPs | Recall |
|---|---|---|---|---|---|
| Faster RCNN | 91.1% | 61.3% | 30.5 M | 25.6 G | 80.1% |
| YOLOv5 | 94.9% | 73.3% | 2.2 M | 6.1 G | 86.6% |
| YOLOv8 | 96.1% | 73.3% | 2.7 M | 6.8 G | 91.9% |
| YOLOv9 | 96.2% | 74.6% | 1.7 M | 6.5 G | 92.8% |
| MobileNetV4-RT-DETR | 91.8% | 45.6% | 7.3 M | 11.7 G | 88.2% |
| YOLOv11 | 96.2% | 74.3% | 2.6 M | 6.4 G | 92.0% |
| P-YOLOv11 | 95.5% | 74.1% | 2.0 M | 5.0 G | 91.9% |
| SSD | 83.2% | 51.2% | 26.3 M | 31.8 G | 77.9% |
| MoLi-Net | 96.6% | 76.0% | 2.0 M | 5.1 G | 92.1% |
| Models | Class | mAP@0.5 | mAP@0.5:0.95 | Recall | FPS |
|---|---|---|---|---|---|
| YOLOv11n | 1 | 88.4% | 58.3% | 83.2% | 105 |
| 2 | 88.5% | 60.7% | 81.8% | ||
| P-YOLOv11 | 1 | 84.9% | 56.0% | 80.1% | 124 |
| 2 | 86.9% | 57.8% | 81.5% | ||
| MoLi-Net | 1 | 89.5% | 64.1% | 82.2% | 108 |
| 2 | 90.4% | 64.8% | 81.8% |
| Models | mAP@0.5 | mAP@0.5:0.95 | Params | FLOPs | Recall |
|---|---|---|---|---|---|
| StarNet | 94.8% | 58.6% | 1.7 M | 4.8 G | 91.1% |
| MobileNetV3 | 94.1% | 70.5% | 1.7 M | 3.9 G | 89.5% |
| Mobileone | 94.7% | 71.4% | 5.4 M | 3.9 G | 91.1% |
| Shufflenetv2 | 94.3% | 71.5% | 2.2 M | 5.1 G | 90.2% |
| MoLi-Net | 96.6% | 76% | 2.0 M | 5.1 G | 92.1% |
| Model | Class | mAP@0.5 | mAP@0.5:0.95 | Recall | Overall mAP@0.5:0.95 | FPS |
|---|---|---|---|---|---|---|
| P-YOLOv11 | 1 | 84.9% | 56.0% | 80.1% | 74.1% | 124 |
| 2 | 86.9% | 57.8% | 81.5% | |||
| P-YOLOv11 + LightAttn | 1 | 88.0% | 61.4% | 83.9% | 75.8% | 121 |
| 2 | 89.0% | 62.7% | 83.6% | |||
| P-YOLOv11 + MobileAttn | 1 | 87.3% | 61.5% | 82.0% | 75.1% | 114 |
| 2 | 87.9% | 60.9% | 85.2% | |||
| MoLi-Net | 1 | 89.5% | 64.1% | 82.2% | 76% | 108 |
| 2 | 90.4% | 64.8% | 81.8% |
| Metric | TP | FP | FN | F1-Score | FPS |
|---|---|---|---|---|---|
| Value | 856 | 98 | 172 | 86.38% | 51 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Xu, Z.; Jiang, C.; Ding, J.; Ding, W.; Wan, Z. MoLi-Net: A Lightweight Brightness-Aware Model for Chinese Herbal Materials Recognition with an Auxiliary Module for Impurity Detection. Electronics 2026, 15, 2731. https://doi.org/10.3390/electronics15122731
Xu Z, Jiang C, Ding J, Ding W, Wan Z. MoLi-Net: A Lightweight Brightness-Aware Model for Chinese Herbal Materials Recognition with an Auxiliary Module for Impurity Detection. Electronics. 2026; 15(12):2731. https://doi.org/10.3390/electronics15122731
Chicago/Turabian StyleXu, Zilong, Changcheng Jiang, Jianhui Ding, Weiyang Ding, and Zhenping Wan. 2026. "MoLi-Net: A Lightweight Brightness-Aware Model for Chinese Herbal Materials Recognition with an Auxiliary Module for Impurity Detection" Electronics 15, no. 12: 2731. https://doi.org/10.3390/electronics15122731
APA StyleXu, Z., Jiang, C., Ding, J., Ding, W., & Wan, Z. (2026). MoLi-Net: A Lightweight Brightness-Aware Model for Chinese Herbal Materials Recognition with an Auxiliary Module for Impurity Detection. Electronics, 15(12), 2731. https://doi.org/10.3390/electronics15122731

