Adaptive Modular Retrieval-Augmented Framework for Cross-Domain Image Classification
Organizations: Department of Mathematics, Indian Institute of Technology Kharagpur, Kharagpur, 721302, West Bengal, India · Department of Computer Science and Engineering, Indian Institute of Technology Kharagpur, Kharagpur, 721302, West Bengal, India
Abstract
Effective image classification in real-world scenarios requires models capable of capturing both local features and global context, while adapting to the evolving complexity of the input. This paper presents a hybrid deep learning system named AMR-Net (Adaptive Modular Retrieval Network) for adaptable image classification in environmental and industrial contexts. The proposed model integrates ResNet-based local feature extraction and Vision Transformer-based global representation learning with an FAISS-based memory retrieval module for contextual enhancement. Furthermore, AMR-Net has an adaptive modular extension mechanism to dynamically enhance network capacity when validation performance plateaus during training. The proposed framework was evaluated using a ten-class waste classification dataset and the Kolektor Surface Defect Dataset 2 (KolektorSDD2), achieving classification accuracies of 97.15% and 99.80%, respectively. Experimental results demonstrate that AMR-Net consistently outperforms mainstream convolutional and transformer-based approaches while maintaining robust cross-domain generalization. Component-wise ablation studies show that global attention (ViT), retrieval-based contextual learning (FAISS), and adaptive modular growth each provide complementary and partially overlapping contributions to overall performance, with global attention contributing the largest individual gain. The proposed architecture is a scalable and flexible solution for image classification challenges characterized by data unpredictability, class imbalance, and dynamic feature distributions.
Figures & tables
| Model | CNN | Transformer | Adaptive | FAISS |
|---|---|---|---|---|
| [ 26 ] | ✓ | ✗ | ✗ | ✗ |
| [ 4 ] | ✓ | ✗ | ✗ | ✗ |
| [ 24 ] | ✓ | ✓ | ✗ | ✗ |
| [ 35 ] | ✓ | ✗ | ✗ | ✗ |
| [ 10 ] | ✓ | ✗ | ✗ | ✓ |
| AMR-Net | ✓ | ✓ | ✓ | ✓ |
| Category | Number of Images |
|---|---|
| Battery | 945 |
| Biological | 985 |
| Cardboard | 891 |
| Clothes | 5,325 |
| Metal | 769 |
| Paper | 1,050 |
| Operation | Parameters |
|---|---|
| RandomResizedCrop | 224 |
| RandomHorizontalFlip | — |
| ColorJitter | (0.3, 0.3, 0.3, 0.2) |
| RandomRotation | |
| RandomAffine | , translate = (0.05, 0.05) |
| RandomPerspective | distortion = 0.3 |
| Operation | Parameters |
|---|---|
| Resize | 256 |
| CenterCrop | 224 |
| Normalize | , |
| Hyperparameter | Value |
|---|---|
| Optimizer | Adam |
| Learning Rate | 0.001 |
| Batch Size | 32 |
| Number of Epochs | 20 |
| (FAISS neighbors) | 5 |
| Loss Function | Cross-Entropy |
| Metric | Initial ( ) | Final ( ) |
|---|---|---|
| Total Parameters | 551.77 M | 853.57 M |
| Trainable Parameters | 442.03 M | 743.83 M |
| FLOPs | 21.44 GFLOPs | 27.44 GFLOPs |
| Input Resolution | ||
| Class | Precision | Recall | F1-Score |
|---|---|---|---|
| 0 | 0.96 | 0.99 | 0.98 |
| 1 | 1.00 | 0.99 | 1.00 |
| 2 | 0.98 | 0.95 | 0.96 |
| 3 | 0.99 | 0.98 | 0.99 |
| 4 | 0.98 | 0.93 | 0.95 |
| 5 | 0.97 | 0.97 | 0.97 |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 146 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 140 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | 1 | 0 | 137 | 1 | 0 | 3 | 1 | 0 | 1 | 0 |
| 3 | 0 | 0 | 1 | 788 | 0 | 1 | 0 | 12 | 0 | 0 |
| 4 | 2 | 0 | 0 | 0 | 112 | 0 | 5 | 1 | 0 | 1 |
| 5 | 1 | 0 | 1 | 2 | 0 | 166 | 1 | 0 | 0 | 0 |
| Model | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| VGG16 | 84.10% | 0.85 | 0.84 | 0.84 |
| MobileNetV2 | 88.31% | 0.89 | 0.88 | 0.88 |
| DenseNet121 | 89.71% | 0.90 | 0.90 | 0.90 |
| ConvNeXtTiny | 92.37% | 0.93 | 0.92 | 0.92 |
| ResNet152 | 92.93% | 0.93 | 0.93 | 0.93 |
| ViT-B/16 | 93.26% | 0.94 | 0.93 | 0.93 |
| Paper | Year | Model | Accuracy (%) | # Waste Types |
|---|---|---|---|---|
| This Work | 2026 | AMR-Net | 97.15 | 10 |
| [ 10 ] | 2025 | ResNet-152 + FAISS | 96.64 | 10 |
| [ 15 ] | 2024 | Vision Transformer | 95.00 | 12 |
| [ 29 ] | 2024 | Tkinter-based Recycling | 96.32 | 6 |
| [ 34 ] | 2023 | Faster R-CNN | 86.70 | 6 |
| [ 1 ] | 2023 | ViT-based MLH ConvNet | 94.70 | 6 |
| Experiment | Accuracy (%) | (%) | Precision (%) | Recall (%) | F1-score (%) |
|---|---|---|---|---|---|
| No ViT | 93.51 | 93.09 | 92.78 | 92.93 | |
| No FAISS | 95.38 | 93.87 | 93.25 | 93.56 | |
| No Modular Blocks | 95.89 | 94.07 | 94.17 | 94.12 | |
| No ViT & No FAISS | 94.49 | 93.02 | 92.65 | 92.83 | |
| AMR-Net (Full) | 97.15 | 0.00 | 97.00 | 97.00 | 97.00 |
| Hyperparameter | Values Tested | Accuracy (%) | Notes |
|---|---|---|---|
| (FAISS neighbors) | 1 | 95.52 | High variance in retrieved vector |
| 3 | 96.31 | Moderate improvement | |
| 5 | 97.15 | Best performance | |
| 10 | 96.74 | Distant neighbors introduce noise | |
| 20 | 96.21 | Retrieval quality degrades | |
| Fusion dimension | 1024 | 96.27 | Information bottleneck |
| Model | Mean Accuracy (%) | Std. Dev. (%) |
|---|---|---|
| AMR-Net | 97.03 | 0.11 |
| ResNet152 | 92.63 | 0.28 |
| Swin Transformer | 94.17 | 0.20 |
| Predicted Defective | Predicted Non-defective | |
|---|---|---|
| Actual Defective | 509 | 0 |
| Actual Non-defective | 2 | 493 |
Image Classification
Image classification assigns semantic labels to images, enabling recognition of objects, scenes, conditions, and fine-grained categories.
See all 429 papers