Skip to main content
Log in

An improved lightweight and real-time YOLOv5 network for detection of surface defects on indocalamus leaves

  • Original Research Paper
  • Published:
Journal of Real-Time Image Processing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

References

  1. 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)

    Article  Google Scholar 

  2. 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)

    Article  Google Scholar 

  3. 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)

    Article  Google Scholar 

  4. Zhang, M., Shi, H., Zhang, Y., Yu, Y., Zhou, M.: Deep learning-based damage detection of mining conveyor belt. Measurement 175, 109130 (2021)

    Article  Google Scholar 

  5. Chen, Q., Zhao, J., Cai, J.: Identification of tea varieties using computer vision. Trans. ASABE 51(2), 623–628 (2008)

    Article  Google Scholar 

  6. 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)

    Article  Google Scholar 

  7. 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)

    Article  Google Scholar 

  8. 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)

    Article  Google Scholar 

  9. Wang, C., Xiao, Z.: Potato surface defect detection based on deep transfer learning. Agriculture 11(9), 863 (2021)

    Article  Google Scholar 

  10. Zhou, H., Zhuang, Z., Liu, Y., Liu, Y., Zhang, X.: Defect classification of green plums based on deep learning. Sensors 20(23), 6993 (2020)

    Article  Google Scholar 

  11. 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)

    Article  Google Scholar 

  12. 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)

  13. Liu, C., Wang, X., Wu, Q., Jiang, J.: Lightweight target detection algorithm based on yolov4. J. Real-Time Image Process. 1–15 (2022)

  14. 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)

    Article  Google Scholar 

  15. 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)

    Article  Google Scholar 

  16. Redmon, J., Farhadi, A.: Yolov3: an incremental improvement. arXiv preprint arXiv:18040x (2018)

  17. Bochkovskiy, A., Wang, C.Y., Liao, H.Y.M.: Yolov4: optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934 (2020)

  18. Jocher, G.: ultralytics/yolov5: v6.0 -yolov5n ‘nano’ models, roboflow integration, tensorflow export, opencv dnn support. https://doi.org/10.5281/zenodo.5563715 (2021)

  19. 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)

    Article  Google Scholar 

  20. 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)

  21. Yu, F., Koltun, V.: Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122 (2015)

  22. 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)

  23. 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)

  24. 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)

  25. 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)

  26. Liu, H., Liu, F., Fan, X., Huang, D.: Polarized self-attention: towards high-quality pixel-wise regression. arXiv preprint arXiv:2107.00782 (2021)

  27. 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)

  28. 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)

  29. 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)

  30. Liu, Y., Shao, Z., Teng, Y., Hoffmann, N.: Nam: normalization-based attention module. arXiv preprint arXiv:2111.12419 (2021)

  31. 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)

  32. 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)

  33. 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)

  34. 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)

  35. 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)

  36. Liu, S., Huang, D., Wang, Y.: Learning spatial fusion for single-shot object detection. arXiv preprint arXiv:1911.09516 (2019)

  37. 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)

  38. 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)

  39. pogg.: Yolov5-lite. https://github.com/ppogg/YOLOv5-Lite (2021)

  40. 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)

  41. 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)

Download references

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

Authors

Corresponding author

Correspondence to Lin Zhou.

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11554-023-01281-z

Keywords

Navigation