Skip to main content
Log in

Countries flags detection based on local context network and color features

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

Countries flags are characterized by a combination of special colors. Building an automatic country flag detector is a hard task because of many challenges like deformation and difference in point of view. Motivated by the unique feature of the country flag colors and the power of Deep Learning models, we propose to use color-based features and a Convolutional Neural Network (CNN) with a special local context neural network to perform the countries flags detection task. The proposed approach aims to enhance the performance of the ordinary Convolutional Neural Network by adding a local context neural network to enhance the localization task and adding a color-based descriptor to enhance the identification task. The color-based descriptor was used to focus on the color features because of its importance for the studied task. The Convolutional Neural Network was proposed to extract more relevant features for both localization and identification tasks. The local context network was used to localize the flag in the image. In order to train and evaluate the proposed approach, we propose to build a custom dataset for the world countries’ flags. The proposed dataset counts 100 images for each country flag with a total of 20,000 images. The evaluation of the proposed approach proves its efficiency by achieving a mean Average Precision of 89.5% and a real-time processing speed. The achieved results have proved the efficiency of the proposed method. The proposed enhancement was very effective that allows the achievement of high accuracy.

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

Similar content being viewed by others

References

  1. Avishikta L, Parekh R (2016) Computer-aided identification of flags using color. Int J Comput Appl 975:8887

    Google Scholar 

  2. Ayachi R, Afif M, Said Y, Atri M (2019) Traffic signs detection for real-world application of an advanced driving assisting system using deep learning. Neural Process Lett:1–15

  3. Ayachi R, Said Y, Atri M To perform road signs recognition for autonomous vehicles using cascaded deep learning pipeline. Artificial Intelligence Advances

  4. Eduardo H, Cha SH, Tappert C (2004) Interactive flag identification using a fuzzy-neural technique. CSIS, Pace University, Proceedings of Student/Faculty Research Day

    Google Scholar 

  5. Goodfellow I, Yoshua B, Courville A (2016) Deep learning. MIT Press

  6. Huu DH, Jung K (2017) Applying tensorflow with convolutional neural networks to train data and recognize national flags. In Advanced Multimedia and Ubiquitous Engineering:367–373. Springer, Singapore

  7. Jia D, Dong W, Socher R, Li LJ, Li K, Fei-Fei L (2009) Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition:248–255. IEEE

  8. S. Karen and A. Zisserman (2014) Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556

  9. Kottman M (2011) The color-BRIEF feature descriptor. In Spring Conference on Computer Graphics SCCG:28–30

  10. H. Kun, Z. Qu and Q. Gong, Color flag recognition based on HOG and color features in complex scene. In Ninth International Conference on Digital Image Processing, Vol. 10420, International Society for Optics and Photonics, 2017.

  11. LeCun Y, Yoshua B, Geoffrey H (2015) Deep learning. Nature 521(7553):436–444

    Article  Google Scholar 

  12. Liu W, Anguelov D, Erhan D, Szegedy C, Reed S, Cheng-Yang F, Berg AC (2016) Ssd: Single shot multibox detector. In European conference on computer vision:21–37. Springer, Cham

  13. Ming G, Hao K, Qu Z (2018) Flag detection with convolutional network. In Proceedings of the 2018 2nd International Conference on Computer Science and Artificial Intelligence:258–262. ACM

  14. Mouna A, Ayachi R, Said Y, Pissaloux E, Atri M (2018) Indoor image recognition and classification via deep convolutional neural network. In International conference on the Sciences of Electronics, Technologies of Information and Telecommunications:364–371. Springer, Cham

  15. Mouna A, Ayachi R, Said Y, Pissaloux E, Atri M (2020) An evaluation of RetinaNet on indoor object detection for blind and visually impaired persons assistance navigation. Neural Processing Letters, p 1-15

  16. Mouna A, Ayachi R, Said Y, Pissaloux E, Atri M A novel dataset for intelligent indoor object detection systems. Artificial Intelligence Advances.

  17. D. Ranjith, P. Easom, A. Bouridane, L. Zhang, R. Jiang, F. Mehboob, and A. Rauf. Deep learning-based pedestrian detection at distance in smart cities. In Proceedings of SAI Intelligent Systems Conference, pp. 588–593. Springer, Cham, 2019.

  18. Redmon J, Divvala S, Girshick R, Farhadi A (2016) You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition:779–788

  19. Shaoqing R, He K, Girshick R, Sun J (2015) Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems:91–99

  20. C. Wensheng, W. Yang, M. Wang, G. Wang and J. Chen. "Context Aggregation Network for Semantic Labeling in Aerial Images", Remote Sensing, Vol 11, No. 10, pp: 1158, 2019.

Download references

Acknowledgments

The authors wish to acknowledge the approval and the support of this research study by the grant N° ENG-2019-1-10-F-1111 from the Deanship of the Scientific Research in Northern Border University, Arar, KSA.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yahia Said.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Said, Y., Barr, M. Countries flags detection based on local context network and color features. Multimed Tools Appl 80, 14753–14765 (2021). https://doi.org/10.1007/s11042-021-10509-8

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-021-10509-8

Keywords

Navigation