Abstract
Indocalamus leaves are widely used in the Chinese food industry. Surface defect detection plays a crucial role in the post-harvest reprocessing of indocalamus leaves. In this study, we constructed a lightweight convolutional neural network model to detect surface defects on indocalamus leaves. We investigated four categories of surface defects, including damage, black spots, insect spots, and holes, to construct a dataset of surface defects on indocalamus leaves, which contained 4124 images for model training and evaluation. We replaced the original path aggregation network (PANet) in YOLOv5 with a cross-layer feature pyramid network (CFPN), which improved the detection performance by fusing feature maps at different levels. We proposed an improved feature fusion module, named the receptive dilated and deformable convolution field block (RDDCFB), which was integrated into the CFPN for learning within larger spatial and semantic contexts. Furthermore, a new CA mechanism was proposed to improve the feature representation capability of the network by appropriately adjusting the structure of the coordinate attention (CA) mechanism. Extensive experiments using the Pascal VOC and CIFAR-100 datasets demonstrated that this new CA block had superior accuracy and integration capabilities. On MSCOCO2017 validation datasets, experiments show that our module is consistently better than various detectors, including Faster R-CNN, YOLOv3, and YOLOv4. Finally, our quantitative results from the dataset of surface defects on indocalamus leaves indicated the effectiveness of the proposed method. The accuracy and recognition efficiency of the improved YOLOv5 model could reach 97.7% and 97 frames per second, respectively.
Similar content being viewed by others
References
Cui, J., Yue, Y., Tang, F., Wang, J.: Hptlc analysis of the flavonoids in eight species of indocalamus leaves. J. Planar Chromatogr.-Mod. TLC 24(5), 394–399 (2011)
Lin, F., Luo, B., Long, B., Long, C.: Plant leaves for wrapping zongzi in china: an ethnobotanical study. J. Ethnobiol. Ethnomed. 15(1), 1–16 (2019)
Zhang, B., Huang, W., Li, J., Zhao, C., Fan, S., Wu, J., Liu, C.: Principles, developments and applications of computer vision for external quality inspection of fruits and vegetables: A review. Food Res. Int. 62, 326–343 (2014)
Zhang, M., Shi, H., Zhang, Y., Yu, Y., Zhou, M.: Deep learning-based damage detection of mining conveyor belt. Measurement 175, 109130 (2021)
Chen, Q., Zhao, J., Cai, J.: Identification of tea varieties using computer vision. Trans. ASABE 51(2), 623–628 (2008)
Zhao, S., Peng, Y., Liu, J., Wu, S.: Tomato leaf disease diagnosis based on improved convolution neural network by attention module. Agriculture 11(7), 651 (2021)
Lin, J., Chen, X., Pan, R., Cao, T., Cai, J., Chen, Y., Peng, X., Cernava, T., Zhang, X.: Grapenet: a lightweight convolutional neural network model for identification of grape leaf diseases. Agriculture 12(6), 887 (2022)
Shah, T.M., Nasika, D.P.B., Otterpohl, R.: Plant and weed identifier robot as an agroecological tool using artificial neural networks for image identification. Agriculture 11(3), 222 (2021)
Wang, C., Xiao, Z.: Potato surface defect detection based on deep transfer learning. Agriculture 11(9), 863 (2021)
Zhou, H., Zhuang, Z., Liu, Y., Liu, Y., Zhang, X.: Defect classification of green plums based on deep learning. Sensors 20(23), 6993 (2020)
Pan, H., Shi, Y., Lei, X., Wang, Z., Xin, F.: Fast identification model for coal and gangue based on the improved tiny yolo v3. J. Real-Time Image Proc. 19(3), 687–701 (2022)
Xu, Y., Chen, Q., Kong, S., Xing, L., Wang, Q., Cong, X., Zhou, Y.: Real-time object detection method of melon leaf diseases under complex background in greenhouse. J. Real-Time Image Process. 1–11 (2022)
Liu, C., Wang, X., Wu, Q., Jiang, J.: Lightweight target detection algorithm based on yolov4. J. Real-Time Image Process. 1–15 (2022)
Tian, Y., Yang, G., Wang, Z., Wang, H., Li, E., Liang, Z.: Apple detection during different growth stages in orchards using the improved yolo-v3 model. Comput. Electron. Agric. 157, 417–426 (2019)
Wang, Q., Cheng, M., Huang, S., Cai, Z., Zhang, J., Yuan, H.: A deep learning approach incorporating yolo v5 and attention mechanisms for field realtime detection of the invasive weed solanum rostratum dunal seedlings. Comput. Electron. Agric. 199, 107194 (2022)
Redmon, J., Farhadi, A.: Yolov3: an incremental improvement. arXiv preprint arXiv:18040x (2018)
Bochkovskiy, A., Wang, C.Y., Liao, H.Y.M.: Yolov4: optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934 (2020)
Jocher, G.: ultralytics/yolov5: v6.0 -yolov5n ‘nano’ models, roboflow integration, tensorflow export, opencv dnn support. https://doi.org/10.5281/zenodo.5563715 (2021)
Li, Z., Lang, C., Liew, J.H., Li, Y., Hou, Q., Feng, J.: Cross-layer feature pyramid network for salient object detection. IEEE Trans. Image Process. 30, 4587–4598 (2021)
Liu, S., Qi, L., Qin, H., Shi, J., Jia, J.: Path aggregation network for instance segmentation. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp 8759–8768 (2018)
Yu, F., Koltun, V.: Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122 (2015)
Dai, J., Qi, H., Xiong, Y., Li, Y., Zhang, G., Hu, H., Wei, Y.: Deformable convolutional networks. In: Proceedings of the IEEE International Conference on Computer Vision, pp 764–773 (2017)
Ren, S., He, K., Girshick, R., Sun, J.: Faster rcnn: towards real-time object detection with region proposal networks. Adv. Neural Inf. Process. Syst. 28 (2015)
Cai, Z., Vasconcelos, N.: Cascade r-cnn: delving into high quality object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6154–6162 (2018)
Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S., Fu, CY., Berg, AC.: Ssd: single shot multibox detector. In: European Conference on Computer Vision. Springer, pp. 21–37 (2016)
Liu, H., Liu, F., Fan, X., Huang, D.: Polarized self-attention: towards high-quality pixel-wise regression. arXiv preprint arXiv:2107.00782 (2021)
Chen, Y., Dai, X., Liu, M., Chen, D., Yuan, L., Liu, Z.: Dynamic convolution: attention over convolution kernels. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11030–11039 (2020)
Hou, Q., Zhou, D., Feng, J.: Coordinate attention for efficient mobile network design. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13713–13722 (2021)
Howard, A., Sandler, M., Chu, G., Chen, L.C., Chen, B.,Tan, M., Wang, W., Zhu, Y., Pang, R., Vasudevan, V., et al.: Searching for mobilenetv3. In: Proceedings of the IEEE/CVF International Conferen on Computer Vision, pp. 1314–1324 (2019)
Liu, Y., Shao, Z., Teng, Y., Hoffmann, N.: Nam: normalization-based attention module. arXiv preprint arXiv:2111.12419 (2021)
Ma, N., Zhang, X., Liu, M., Sun, J.: Activate or not: learning customized activation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8032–8042 (2021)
Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., Zitnick, C.L.: Microsoftcoco: common objects in context. In: European Conference on Computer Vision, Springer, pp. 740–755 (2014)
Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., Chen, L.C.: Mobilenetv2: inverted residuals and linear bottlenecks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4510–4520 (2018)
He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778 (2016)
Wang, C.Y., Yeh, I. H., Liao, H. Y. M.: You only learn one representation: unified network for multiple tasks. arXiv preprint arXiv:2105.04206 (2021)
Liu, S., Huang, D., Wang, Y.: Learning spatial fusion for single-shot object detection. arXiv preprint arXiv:1911.09516 (2019)
Wang, C.Y., Bochkovskiy, A., Liao, H.Y.M.: Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv preprint arXiv:2207.02696 (2022)
Adarsh, P., Rathi, P., Kumar, M.: Yolo v3-tiny: object detection and recognition using one stage improved model. In: 2020 6th International Conference on Advanced Computing and Communication Systems (ICACCS), IEEE, pp. 687–694 (2020)
pogg.: Yolov5-lite. https://github.com/ppogg/YOLOv5-Lite (2021)
Hong, J., Fulton, M., Sattar, J.: A generative approach towards improved robotic detection of marine litter. In: 2020 IEEE International Conference on Robotics and Automation (ICRA), IEEE, pp. 10525–10531 (2020)
Loezer, L., Enembreck, F., Barddal, J.P., de Souza, Britto. Jr. A.: Cost-sensitive learning for imbalanced data streams. In: Proceedings of the 35th Annual ACM Symposium on Applied Computing, pp. 498–504(2020)
Acknowledgements
This work is supported by the National Key Research and Development Program (No. 2022YFD2101101), the Project of Scientific and Technological Innovation Planning of Hunan Province (No. 2020NK2008), the earmarked fund for China Agriculture Research System (CARS-19), Hunan Province Modern Agriculture Technology System for Tea Industry and the High Performance Computing Center of Central South University.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
All authors declare that they have no conflict of interest.
Human rights and animal participants
This paper does not contain any unethical studies on humans or animals.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Tang, Z., Zhou, L., Qi, F. et al. An improved lightweight and real-time YOLOv5 network for detection of surface defects on indocalamus leaves. J Real-Time Image Proc 20, 14 (2023). https://doi.org/10.1007/s11554-023-01281-z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11554-023-01281-z