Context-Aware Image Intelligence Using Hybrid Cnn–Transformer Architectures

Authors

  • G Shyama Chandra Prasad
  • Para Rajesh
  • Durgam Muninder
  • T. Aruna Jyothi
  • F. Sheeja Mary
  • A. Brahmananda Reddy

DOI:

https://doi.org/10.51483/IJAIML.2835

Keywords:

computer vision, context-aware image understanding, CNN, Transformer, attention, hybrid deep learning, CAICD benchmark, image classification.

Abstract

Convolutional neural networks (CNNs) are effective for recovery. Local visual features, While transformer- based architectures offer a mechanism for modeling long- range contextual dependencies. This study proposes a context-aware hybrid CNN–Transformer architecture that integrates convolutional feature extraction, visual-token context modeling, and attention-guided feature fusion for image classification. To enable reproducible evaluation under controlled conditions, the proposed approach is assessed on a purpose-built Context-Aware Image Classification Dataset (CAICD), comprising 3,600 balanced 32×32 grayscale images distributed across six shape classes: Circle, Square, Triangle, Cross, Ring, and Checker. The dataset is divided into 2,400 training, 600 validation, and 600 held-out test images, with 100 test images per class, using a fixed random seed of 42. CPU-based PyTorch experiments evaluate a CNN-only baseline and progressively enhanced hybrid configurations trained for eight epochs using the Adam optimizer and cross-entropy loss. The executed results yield 100% test accuracy and macro-F1 for both the CNN-only baseline and the complete hybrid model, while the intermediate CNN+Transformer and attention-fusion configurations achieve macro-F1 scores of 0.9900 and 0.9960, respectively. The complete hybrid architecture contains 99,110 trainable parameters and records a CPU inference latency of 0.336 ms per image in the reported execution. These findings demonstrate reproducible performance on the CAICD benchmark under the specified experimental conditions; they should not be interpreted as evidence of generalization to clinical, industrial, or other real-world image domains

Downloads

Published

2026-09-24

How to Cite

Prasad, G. S. C., Rajesh, P., Muninder, D., Jyothi, T. A., Mary, F. S., & Reddy, A. B. (2026). Context-Aware Image Intelligence Using Hybrid Cnn–Transformer Architectures. International Journal of Artificial Intelligence and Machine Learning, 6(3), 1575–1583. https://doi.org/10.51483/IJAIML.2835