Document Type : Original Article


1 Department of Electrical Engineering, Payame Noor University (PNU), Tehran, Iran

2 Department of Electrical and Computer Engineering, University of Birjand, Birjand, Iran


In traffic monitoring for video analysis systems, vehicle shadows have a negative effect on their performance. Shadow detection and removal are essential steps in accurate vehicle detection. In this paper, a new method is proposed for shadow detection using a novel convolution neural network architecture. In the proposed method, the edges of the image are first extracted. Edge extraction reduces calculation, and accelerates the execution of the method. The background of the frame is then removed and the main features are extracted using the ResUNet-a architecture. This architecture consists of two parts: the encoder and the decoder, which detect the shadow at the decoder output and then remove it. Deep learning is used to detect shadows, which increases the accuracy of the analysis. The ResUNet-a architecture can learn complex, hierarchical, and appropriate features from the image for accurate feature detection and discarding the irrelevant shadow, thereby outperforming conventional filters.The results show that the proposed method provides better performance on NJDOT traffic video, highway-1, and highway-3 datasets than popular shadow removal methods. Also, the method improves the evaluation criteria such as F-measure and runtime. The F-measure is 94 and 93% for highway-1 and highway-3, respectively.


Main Subjects

  1. Kim, D., Arsalan, M., and Park, K., 2018. Convolutional Neural Network-Based Shadow Detection in Images Using Visible Light Camera Sensor. Sensors, 18(4), pp.960–976. Doi: 10.3390/s18040960
  2. Sanin, A., Sanderson, C., and Lovell, B.C., 2012. Shadow detection: A survey and comparative evaluation of recent methods. Pattern Recognition, 45(4), pp.1684–1695. Doi: 10.1016/j.patcog.2011.10.001
  3. Shi, H., and Liu, C., 2020. A new cast shadow detection method for traffic surveillance video analysis using color and statistical modeling. Image and Vision Computing, 94, pp.103863. Doi: 10.1016/j.imavis.2019.103863
  4. Lee, G., Lee, M., Lee, W.-K., Park, J., and Kim, T.-H., 2017. Shadow Detection Based on Regions of Light Sources for Object Extraction in Nighttime Video. Sensors, 17(3), pp.659–668. Doi: 10.3390/s17030659
  5. Siddiqui, F., Teng, S., Awrangjeb, M., and Lu, G., 2016. A Robust Gradient Based Method for Building Extraction from LiDAR and Photogrammetric Imagery. Sensors, 16(7), pp.1110–1127. Doi: 10.3390/s16071110
  6. Ma, R., Zhang, Z., Dong, Y., and Pan, Y., 2020. Deep Learning Based Vehicle Detection and Classification Methodology Using Strain Sensors under Bridge Deck. Sensors, 20(18), pp.5051–5062. Doi: 10.3390/s20185051
  7. Hassanpour, H., Mortezaie, Z., and Beghdadi, A., 2022. Sensing Image Regions for Enhancing Accuracy in People Re-identification. Iranian Journal of Energy and Environment, 13(3), pp.295–304. Doi: 10.5829/IJEE.2022.13.03.09
  8. Pasban, S., Mohamadzadeh, S., Zeraatkar‐Moghaddam, J., and Shafiei, A.K., 2020. Infant brain segmentation based on a combination of VGG‐16 and U‐Net deep neural networks. IET Image Processing, 14(17), pp.4756–4765. Doi: 10.1049/iet-ipr.2020.0469
  9. Zohrevand, A., Imani, Z., and Ezoji, M., 2021. Deep Convolutional Neural Network for Finger-Knuckle-Print Recognition. International Journal of Engineering - Transactions A: Basics, 34(7), pp.1684–1693. Doi: 10.5829/ije.2021.34.07a.12
  10. Diakogiannis, F.I., Waldner, F., Caccetta, P., and Wu, C., 2020. ResUNet-a: A deep learning framework for semantic segmentation of remotely sensed data. ISPRS Journal of Photogrammetry and Remote Sensing, 162, pp.94–114. Doi: 10.1016/j.isprsjprs.2020.01.013
  11. Wen, L., Li, X., and Gao, L., 2020. A transfer convolutional neural network for fault diagnosis based on ResNet-50. Neural Computing and Applications, 32(10), pp.6111–6124. Doi: 10.1007/s00521-019-04097-w
  12. Sezavar, A., Farsi, H., and Mohamadzadeh, S., 2019. Content-based image retrieval by combining convolutional neural networks and sparse representation. Multimedia Tools and Applications, 78(15), pp.20895–20912. Doi: 10.1007/s11042-019-7321-1
  13. Dorrani, Z., Farsi, H., and Mohamadzadeh, S., 2020. Image Edge Detection with Fuzzy Ant Colony Optimization Algorithm. International Journal of Engineering, Transaction C: Aspects, 33(12), pp.2464–2470. Doi: 10.5829/ije.2020.33.12c.05
  14. Chen, C., Liu, B., Wan, S., Qiao, P., and Pei, Q., 2021. An Edge Traffic Flow Detection Scheme Based on Deep Learning in an Intelligent Transportation System. IEEE Transactions on Intelligent Transportation Systems, 22(3), pp.1840–1852. Doi: 10.1109/TITS.2020.3025687
  15. Guo, R., Dai, Q., and Hoiem, D., 2011. Single-image shadow detection and removal using paired regions. In: CVPR 2011. IEEE, pp 2033–2040
  16. Guo, R., Dai, Q., and Hoiem, D., 2013. Paired Regions for Shadow Detection and Removal. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(12), pp.2956–2967. Doi: 10.1109/TPAMI.2012.214
  17. Russell, M., Zou, J.J., and Fang, G., 2016. An evaluation of moving shadow detection techniques. Computational Visual Media, 2(3), pp.195–217. Doi: 10.1007/s41095-016-0058-0
  18. Gomes, V., Barcellos, P., and Scharcanski, J., 2017. Stochastic shadow detection using a hypergraph partitioning approach. Pattern Recognition, 63, pp.30–44. Doi: 10.1016/j.patcog.2016.09.008
  19. Zhang, Y., Chen, G., Vukomanovic, J., Singh, K.K., Liu, Y., Holden, S., and Meentemeyer, R.K., 2020. Recurrent Shadow Attention Model (RSAM) for shadow removal in high-resolution urban land-cover mapping. Remote Sensing of Environment, 247, pp.111945. Doi: 10.1016/j.rse.2020.111945
  20. Ma, C., Zhang, H., and Keong Li, B., 2021. Shadow Separation of Pavement Images Based on Morphological Component Analysis. Journal of Control Science and Engineering, 2021, pp.1–10. Doi: 10.1155/2021/8828635
  21. Bankhele, A., 2021. Shadow Detection and Removal Technique using CNN. International Journal for Research in Applied Science and Engineering Technology, 9(8), pp.1748–1755. Doi: 10.22214/ijraset.2021.37667
  22. Jiang, X., Hu, Z., Li, Y., and Feng, X., 2021. Deep Multi-task Learning for Shadow Detection and Removal. In: 2021 13th International Conference on Bioinformatics and Biomedical Technology. ACM, New York, NY, USA, pp 28–32
  23. Ataee, A., Kazemitabar, J., and Najafi, M., 2020. A Framework for Dry Waste Detection Based on a Deep Convolutional Neural Network. Iranian Journal of Energy and Environment, 11(4), pp.248–252. Doi: 10.5829/IJEE.2020.11.04.01
  24. Moallem, M., Hassanpour, H., and Pouyan, A.A., 2019. Anomaly Detection in Smart Homes Using Deep Learning. Iranian Journal of Energy and Environment, 10(2), pp.126–132. Doi: 10.5829/IJEE.2019.10.02.10
  25. Imani, M., 2020. Deep Learning Based Electricity Demand Forecasting in Different Domains. Iranian Journal of Energy and Environment, 11(1), pp.33–39. Doi: 10.5829/IJEE.2020.11.01.06
  26. Impedovo, D., Balducci, F., Dentamaro, V., and Pirlo, G., 2019. Vehicular Traffic Congestion Classification by Visual Features and Deep Learning Approaches: A Comparison. Sensors, 19(23), pp.5213–5225. Doi: 10.3390/s19235213
  27. Hsieh, J.-W., Hu, W.-F., Chang, C.-J., and Chen, Y.-S., 2003. Shadow elimination for effective moving object detection by Gaussian shadow modeling. Image and Vision Computing, 21(6), pp.505–516. Doi: 10.1016/S0262-8856(03)00030-1
  28. Barcellos, P., Bouvié, C., Escouto, F.L., and Scharcanski, J., 2015. A novel video based system for detecting and counting vehicles at user-defined virtual loops. Expert Systems with Applications, 42(4), pp.1845–1856. Doi: 10.1016/j.eswa.2014.09.045
  29. Huang, J.-B., and Chen, C.-S., 2009. Moving cast shadow detection using physics-based features. In: 2009 IEEE Conference on Computer Vision and Pattern Recognition. IEEE, pp 2310–2317