Research Article

Investigating Foreground Background Separation in Vision Transformers for Image Classification

Bowen Jiang*
Northwestern University

* Corresponding author: [email protected]

Abstract

Image categorization is a key part of computer vision. It may be used for a wide range of things, from self-driving cars to medical imaging. Most traditional methods look at an image as a whole, which makes it hard for them to pick up on the different contributions of front items and background context. Contour information, which is very important for finding important structures, is often not used enough. Vision Transformers (ViTs) and other recent developments have greatly improved classification performance, but they still depend on a single representation of the image. In this study, we investigate the potential advantages of deliberately segregating picture components for categorization purposes. We suggest a dual-stream ViT framework that works with foreground and background areas separately before putting their representations together. The experimental results indicate that the suggested dual-stream model does not surpass the performance of ordinary single-stream ViTs, but rather demonstrates equivalent efficacy across several benchmarks. More examination shows that the fundamental problem is that it is hard to separate the foreground from the backdrop. In complicated or messy scenarios, improper region extraction adds noise that makes the dual-stream approach less useful. These results show that component-aware designs have a lot of potential, but their success depends a lot on how well foreground–background segmentation works, which is still a big problem for the future.

Keywords: Image classification; Transformer; ImageNet; Deep learning
Published: January 12, 2026
DOI: 10.54254/2755-2721/2026.TJ31147
Volume: ACE Vol.222
pp. 9-21
Download PDF

References

  1. D. Marr, Vision: A computational investigation into the human representation and processing of visual information. Mit Press, 1982.
  2. A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks, ” Communications of the ACM, vol. 60, pp. 84–90, 05 2012.
  3. J. Shotton, J. Winn, C. Rother, and A. Criminisi, “Textonboost for image understanding: Multi-class object recognition and segmentation by jointly modeling texture, layout, and context, ” International Journal of Computer Vision, vol. 81, pp. 2–23, 12 2007.
  4. K. He, G. Gkioxari, P. Doll´ar, and R. Girshick, “Mask r-cnn, ” in 2017 IEEE International Conference on Computer Vision (ICCV), 2017, pp.2980–2988.
  5. J. Canny, “A computational approach to edge detection, ” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. PAMI-8, no. 6, pp. 679–698, 1986.
  6. R. Adams and L. Bischof, “Seeded region growing, ” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 16, no. 6, pp. 641–647, 1994.
  7. D. Lowe, “Object recognition from local scale-invariant features, ” in Proceedings of the Seventh IEEE International Conference on Computer Vision, vol. 2, 1999, pp. 1150–1157 vol.2.
  8. N. Dalal and B. Triggs, “Histograms of oriented gradients for human detection, ” in 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), vol. 1, 2005, pp. 886–893 vol. 1.
  9. K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition, ” 2015. [Online]. Available: https: //arxiv.org/abs/1409.1556
  10. C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, “Going deeper with convolutions, ” in 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015, pp. 1–9.
  11. K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition, ” in 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 770–778.
  12. G. Huang, Z. Liu, L. van der Maaten, and K. Q. Weinberger, “Densely connected convolutional networks, ” 2018. [Online]. Available: https: //arxiv.org/abs/1608.06993
  13. J. Yosinski, J. Clune, Y. Bengio, and H. Lipson, “How transferable are features in deep neural networks?” 2014. [Online]. Available: https: //arxiv.org/abs/1411.1792
  14. A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, “An image is worth 16x16 words: Transformers for image recognition at scale, ” 2021. [Online]. Available: https: //arxiv.org/abs/2010.11929
  15. O. J. H´enaff, A. Srinivas, J. D. Fauw, A. Razavi, C. Doersch, S. M. A. Eslami, and A. van den Oord, “Data-efficient image recognition with contrastive predictive coding, ” 2020. [Online]. Available: https: //arxiv.org/abs/1905.09272
  16. T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, “A simple framework for contrastive learning of visual representations, ” 2020. [Online]. Available: https: //arxiv.org/abs/2002.05709
  17. I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio, “Generative adversarial networks, ” 2014. [Online]. Available: https: //arxiv.org/abs/1406.2661
  18. D. P. Kingma and M. Welling, “Auto-encoding variational bayes, ” 2022. [Online]. Available: https: //arxiv.org/abs/1312.6114
  19. S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift, ” 2015. [Online]. Available: https: //arxiv.org/abs/1502.03167
  20. N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: a simple way to prevent neural networks from overfitting, ” Journal of Machine Learning Research, vol. 15, pp. 1929–1958, 01 2014.
  21. A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam, “Mobilenets: Efficient convolutional neural networks for mobile vision applications, ” 2017. [Online]. Available: https: //arxiv.org/abs/1704.04861
  22. M. Tan and Q. V. Le, “Efficientnet: Rethinking model scaling for convolutional neural networks, ” 2020. [Online]. Available: https: //arxiv.org/abs/1905.11946
  23. Y. Wang, R. Huang, S. Song, Z. Huang, and G. Huang, “Not all images are worth 16x16 words: Dynamic transformers for efficient image recognition, ” 2021. [Online]. Available: https: //arxiv.org/abs/2105.15075
  24. C. Ryali, Y.-T. Hu, D. Bolya, C. Wei, H. Fan, P.-Y. Huang, V. Aggarwal, A. Chowdhury, O. Poursaeed, J. Hoffman, J. Malik, Y. Li, and C. Feichtenhofer, “Hiera: A hierarchical vision transformer without the bells-and-whistles, ” 2023. [Online]. Available: https: //arxiv.org/abs/2306.00989
  25. R. Ranftl, A. Bochkovskiy, and V. Koltun, “Vision transformers for dense prediction, ” 2021. [Online]. Available: https: //arxiv.org/abs/2103.13413
  26. M. Oquab, T. Darcet, T. Moutakanni, H. Vo, M. Szafraniec, V. Khalidov, P. Fernandez, D. Haziza, F. Massa, A. El-Nouby, M. Assran, N. Ballas, W. Galuba, R. Howes, P.-Y. Huang, S.-W. Li, I. Misra, M. Rabbat, V. Sharma, G. Synnaeve, H. Xu, H. Jegou, J. Mairal, P. Labatut, A. Joulin, and P. Bojanowski, “Dinov2: Learning robust visual features without supervision, ” 2024. [Online]. Available: https: //arxiv.org/abs/2304.07193
  27. L. Yang, B. Kang, Z. Huang, X. Xu, J. Feng, and H. Zhao, “Depth anything: Unleashing the power of large-scale unlabeled data, ” 2024. [Online]. Available: https: //arxiv.org/abs/2401.10891
  28. X. Wang, L. Xie, C. Dong, and Y. Shan, “Real-esrgan: Training real-world blind super-resolution with pure synthetic data, ” in 2021 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), 2021, pp. 1905–1914.
  29. N. Otsu, “A threshold selection method from gray-level histograms, ” IEEE Transactions on Systems, Man, and Cybernetics, vol. 9, no. 1, pp. 62–66, 1979.
  30. T.-Y. Lin, M. Maire, S. Belongie, L. Bourdev, R. Girshick, J. Hays, P. Perona, D. Ramanan, C. L. Zitnick, and P. Doll´ar, “Microsoft coco: Common objects in context, ” 2015. [Online]. Available: https: //arxiv.org/abs/1405.0312
  31. Z. Liu, H. Hu, Y. Lin, Z. Yao, Z. Xie, Y. Wei, J. Ning, Y. Cao, Z. Zhang, L. Dong, F. Wei, and B. Guo, “Swin transformer v2: Scaling up capacity and resolution, ” 2022. [Online]. Available: https: //arxiv.org/abs/2111.09883
  32. L. Zhu, X. Wang, Z. Ke, W. Zhang, and R. Lau, “Biformer: Vision transformer with bi-level routing attention, ” 2023. [Online]. Available: https: //arxiv.org/abs/2303.0881