Skip to main content
Log in

Improved YOLOv7 algorithm incorporating InceptionNeXt and attention mechanism for vehicle detection under adverse lighting conditions

  • Original Paper
  • Published:
Signal, Image and Video Processing Aims and scope Submit manuscript

Abstract

Adverse weather and bad lighting in real-world scenarios cause performance degradation of object detection models. Currently, many solutions proposed to address this problem concentrate only on a certain kind of adverse weather. The coverage of adverse lighting scenes is not comprehensive enough, thus making it difficult for application to other scenes. Aiming to develop an algorithm that is capable of applying to vehicle detection under various adverse lighting conditions (rainy, foggy, snowy, and dark night), this paper proposes an INCGM-YOLO algorithm based on YOLOv7. InceptionNeXt block is utilized in the backbone network to optimize the backbone structure, and replace part of the ELAN structure in the head with C3 module. In addition, the global attention mechanism is added at the end of the backbone, MP and ELAN structures with GAM attention are designed in the head, which enhances the attention to effective features. Finally, the original loss function is replaced with MPDIoU to improve the accuracy of the bounding box regression. A series of experiments on the adverse weather and dark night datasets show that INCGM-YOLO reaches 76.59% and 51.68% for mAP0.5 and mAP0.5:0.95, respectively, which is improved over baseline YOLOv7 by 7.09% and 5.39%. Comparing with other state-of-the-art algorithms for vehicle detection under adverse lighting conditions, our model achieves the best performance on mAP0.5, mAP0.5:0.95 and F1 score. Visualization of detection results proves that the proposed INCGM-YOLO can significantly improve the detection precision and effectively realize vehicle detection under adverse lighting conditions.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Similar content being viewed by others

References

  1. Chen, Q., Xie, Y., Guo, S., et al.: Sensing system of environmental perception technologies for driverless vehicle: a review of state of the art and challenges. Sens. Actuators, A 319, 112566 (2021)

    Article  Google Scholar 

  2. Li, G., Yang, Y., Qu, X., et al.: A deep learning based image enhancement approach for autonomous driving at night. Knowl.-Based Syst. 213, 106617 (2021)

    Article  MATH  Google Scholar 

  3. Albawi, S., Mohammed, TA., Al-Zawi, S.: Understanding of a convolutional neural network. In: 2017 international conference on engineering and technology (ICET), IEEE, pp 1–6 (2017)

  4. Li, J., Xu, R., Ma, J., et al Domain adaptive object detection for autonomous driving under foggy weather. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp 612–622 (2023)

  5. Girshick, R., Donahue, J., Darrell, T., et al Rich feature hierarchies for accurate object detection and semantic segmentation. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp 580–587 (2014)

  6. Girshick, R.: Fast r-cnn. In: Proceedings of the IEEE International Conference on Computer Vision, pp 1440–1448 (2015)

  7. Ren, S., He, K., Girshick, R., et al Faster r-cnn: Towards real-time object detection with region proposal networks. Advances in neural information processing systems 28 (2015)

  8. Liu, W., Anguelov, D., Erhan, D., et al Ssd: Single shot multibox detector. In: Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11–14, 2016, Proceedings, Part I 14, Springer, pp 21–37 (2016)

  9. Redmon, J., Divvala, S., Girshick, R., et al You only look once: Unified, real-time object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp 779–788 (2016)

  10. Lin, T.Y., Goyal, P., Girshick, R., et al Focal loss for dense object detection. In: Proceedings of the IEEE International Conference on Computer Vision, pp 2980–2988 (2017)

  11. Terven, J., Cordova-Esparza, D.: A comprehensive review of yolo: From yolov1 to yolov8 and beyond. arXiv preprint arXiv:2304.00501 (2023)

  12. He, X., Fan, K., Xu, Z.: Uav identification based on improved yolov7 under foggy condition. Signal, Image and Video Processing (2024)

    MATH  Google Scholar 

  13. Sugashini, T., Balakrishnan, G.: Yolo glass: video-based smart object detection using squeeze and attention yolo network. SIViP 18(3), 2105–2115 (2024)

    Article  MATH  Google Scholar 

  14. Xia, Z., Zhou, H., Yu, H., et al Yolo-mtg: a lightweight yolo model for multi-target garbage detection. Signal, Image and Video Processing pp 1–16 (2024)

  15. You, S., Tan, R.T., Kawakami, R., et al.: Adherent raindrop modeling, detection and removal in video. IEEE Trans. Pattern Anal. Mach. Intell. 38(9), 1721–1733 (2015)

    Article  MATH  Google Scholar 

  16. Li, C., Zhou, H., Liu, Y., et al Detection-friendly dehazing: Object detection in real-world hazy scenes. IEEE Transactions on Pattern Analysis and Machine Intelligence (2023)

  17. Singha, A., Bhowmik, M.K.: Novel deeper awrdnet: adverse weather-affected night scene restorator cum detector net for accurate object detection. Neural Comput. Appl. 35(17), 12729–12750 (2023)

    Article  MATH  Google Scholar 

  18. Fu, X., Huang, J., Zeng, D., et al Removing rain from single images via a deep detail network. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp 3855–3863 (2017)

  19. Chen, Y., Li, W., Sakaridis, C., et al Domain adaptive faster r-cnn for object detection in the wild. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp 3339–3348 (2018)

  20. Guan, D., Huang, J., Xiao, A., et al.: Uncertainty-aware unsupervised domain adaptation in object detection. IEEE Trans. Multimed 24, 2502–2514 (2021)

    Article  MATH  Google Scholar 

  21. Li, J., Xu, Z., Fu, L., et al.: Domain adaptation from daytime to nighttime: a situation-sensitive vehicle detection and traffic flow parameter estimation framework. Transp Res Part C: Emerg Technol 124, 102946 (2021)

    Article  MATH  Google Scholar 

  22. Hnewa, M., Radha, H.: Object detection under rainy conditions for autonomous vehicles: a review of state-of-the-art and emerging techniques. IEEE Signal Process. Mag. 38(1), 53–67 (2020)

    Article  MATH  Google Scholar 

  23. Xiao, Y., Jiang, A., Ye, J., et al.: Making of night vision: object detection under low-illumination. IEEE Access 8, 123075–123086 (2020)

    Article  MATH  Google Scholar 

  24. Sarin, M., Chandrakar, S., Patel, R.: Face and human detection in low light for surveillance purposes. In: 2019 International Conference on Computational Intelligence and Knowledge Economy (ICCIKE), IEEE, pp 614–620 (2019)

  25. Huang, S.C., Hoang, QV., Le, TH.: Sfa-net: A selective features absorption network for object detection in rainy weather conditions. IEEE Transactions on Neural Networks and Learning Systems (2022)

  26. Chen, Z., Guo, H., Yang, J., et al.: Fast vehicle detection algorithm in traffic scene based on improved ssd. Measurement 201, 111655 (2022)

    Article  Google Scholar 

  27. Qin, Q., Chang, K., Huang, M., et al Denet: Detection-driven enhancement network for object detection under adverse weather conditions. In: Proceedings of the Asian Conference on Computer Vision, pp 2813–2829 (2022)

  28. Yao, J., Fan, X., Li, B., et al.: Adverse weather target detection algorithm based on adaptive color levels and improved yolov5. Sensors 22(21), 8577 (2022)

    Article  MATH  Google Scholar 

  29. Qiu, Y., Lu, Y., Wang, Y., et al.: Idod-yolov7: image-dehazing yolov7 for object detection in low-light foggy traffic environments. Sensors 23(3), 1347 (2023)

    Article  MATH  Google Scholar 

  30. Wang, C.Y., Bochkovskiy, A., Liao, HYM.: Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp 7464–7475 (2023)

  31. Yu, F., Xian, W., Chen, Y., et al Bdd100k: A diverse driving video database with scalable annotation tooling. arXiv preprint arXiv:1805.04687 2(5):6 (2018)

  32. Li, B., Ren, W., Fu, D., et al.: Benchmarking single-image dehazing and beyond. IEEE Trans. Image Process. 28(1), 492–505 (2018)

    Article  MathSciNet  MATH  Google Scholar 

  33. Li, S., Araujo, IB., Ren, W, et al Single image deraining: A comprehensive benchmark analysis. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp 3838–3847 (2019)

  34. Hussain, M., Al-Aqrabi, H., Munawar, M., et al.: Domain feature mapping with yolov7 for automated edge-based pallet racking inspections. Sensors 22(18), 6927 (2022)

    Article  MATH  Google Scholar 

  35. Zhang, Y., Sun, Y., Wang, Z., Jiang, Y.: YOLOv7-RAR for urban vehicle detection. Sensors. 23(4), 1801 (2023)

  36. Yu, W., Zhou, P., Yan, S., et al Inceptionnext: When inception meets convnext. arXiv preprint arXiv:2303.16900 (2023)

  37. Jocher, G., Chaurasia, A., Stoken, A., et al ultralytics/yolov5: v6. 2-yolov5 classification models, apple m1, reproducibility, clearml and deci. ai integrations. Zenodo (2022)

  38. Liu, Y., Shao, Z., Hoffmann, N.: Global attention mechanism: Retain information to enhance channel-spatial interactions. arXiv preprint arXiv:2112.05561 (2021)

  39. Siliang, M., Yong, X.: Mpdiou: a loss for efficient and accurate bounding box regression. arXiv preprint arXiv:2307.07662 (2023)

  40. Liu, S., Wang, Y., Yu, Q., et al.: Ceam-yolov7: Improved yolov7 based on channel expansion and attention mechanism for driver distraction behavior detection. IEEE Access 10, 129116–129124 (2022)

    Article  Google Scholar 

  41. Yang, L., Zhang, RY., Li, L., et al Simam: A simple, parameter-free attention module for convolutional neural networks. In: International Conference on Machine Learning, PMLR, pp 11863–11874 (2021)

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

  43. Yu, J., Wu, T., Zhang, X., et al.: An efficient lightweight sar ship target detection network with improved regression loss function and enhanced feature information expression. Sensors 22(9), 3447 (2022)

    Article  MATH  Google Scholar 

  44. Ge, Z., Liu, S., Wang, F., et al Yolox: Exceeding yolo series in 2021. arXiv preprint arXiv:2107.08430 (2021)

  45. Jocher, G., Chaurasia, A., Qiu, J.: Ultralytics YOLO. https://github.com/ultralytics/ultralytics (2023)

  46. Ding, Q., Li, P., Yan, X., et al.: Cf-yolo: cross fusion yolo for object detection in adverse weather with a high-quality real snow dataset. IEEE Trans. Intell. Transp. Syst. 24(10), 10749–10759 (2023)

    Article  MATH  Google Scholar 

  47. Zhang K, Yan X, Wang Y, et al (2023) Adaptive dehazing yolo for object detection. In: International Conference on Artificial Neural Networks, Springer, pp 14–27

  48. Liu, W., Ren, G., Yu, R., et al (2022) Image-adaptive yolo for object detection in adverse weather conditions. In: Proceedings of the AAAI Conference on Artificial Intelligence, pp 1792–1800

Download references

Acknowledgements

This work was supported by the National Key Research and Development Program of China (2022YFB2602305), National Natural Science Foundation of China (52372409 and 52175078).

Author information

Authors and Affiliations

Authors

Contributions

Lie Guo: Conceptualization, Resources, Writing-review and editing, Funding acquisition. Xiaoyue Zhou: Methodology, Software, Validation, Investigation, Data curation, Writing-original draft preparation, Visualization. Yibing Zhao: Conceptualization, Writing-review and editing. Wenxuan Wu: Formal analysis, Investigation.

Corresponding author

Correspondence to Xiaoyue Zhou.

Ethics declarations

Conflict of interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

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

Guo, L., Zhou, X., Zhao, Y. et al. Improved YOLOv7 algorithm incorporating InceptionNeXt and attention mechanism for vehicle detection under adverse lighting conditions. SIViP 19, 299 (2025). https://doi.org/10.1007/s11760-025-03868-4

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11760-025-03868-4

Keywords