Adaptive Modular Retrieval-Augmented Framework for Cross-Domain Image Classification
Authors: Debojyoti Ghosh, Soumya K Ghosh, Adrijit Goswami
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
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
✓
✓
✓
✓
Table 1: Comparison of architectures and strategies in recent waste classification studies
Figure 1: Integrated workflow showing retrieval-before-storage FAISS process, feature fusion, adaptive modular blocks, and final classification.
Figure 2: Flowchart of the feature fusion pipeline integrating ResNet, ViT, and FAISS features into a unified representation.
Figure 3: Training pipeline with adaptive expansion and memory integration.
Category
Number of Images
Battery
945
Biological
985
Cardboard
891
Clothes
5,325
Metal
769
Paper
1,050
Table 2: Total number of images per class in the curated dataset.
Operation
Parameters
RandomResizedCrop
224
RandomHorizontalFlip
—
ColorJitter
(0.3, 0.3, 0.3, 0.2)
RandomRotation
15∘
RandomAffine
10∘ , translate = (0.05, 0.05)
RandomPerspective
distortion = 0.3
Table 6
Operation
Parameters
Resize
256
CenterCrop
224
Normalize
μ=[0.485,0.456,0.406] , σ=[0.229,0.224,0.225]
Table 7
Hyperparameter
Value
Optimizer
Adam
Learning Rate
0.001
Batch Size
32
Number of Epochs
20
k (FAISS neighbors)
5
Loss Function
Cross-Entropy
Table 3: Training Configuration and Hyperparameters
Metric
Initial ( B0=12 )
Final ( B=21 )
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
224×224
Table 4: Model Complexity Metrics at Initialization and at the Final (Grown) Configuration
Figure 4: Training and Validation Accuracy over 20 Epochs
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
Table 5: Classification Report on Test Set. Class indices follow the alphabetical ordering: 0=battery, 1=biological, 2=cardboard, 3=clothes, 4=metal, 5=paper, 6=plastic, 7=shoes, 8=trash, 9=white-glass.
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
Table 6: Confusion matrix of AMR-Net on the test dataset.
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
Table 7: Performance comparison of baseline and proposed waste classification models.
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
Table 8: Comparison of Deep Learning Models for Waste Classification
Experiment
Accuracy (%)
Δ (%)
Precision (%)
Recall (%)
F1-score (%)
No ViT
93.51
−3.64
93.09
92.78
92.93
No FAISS
95.38
−1.77
93.87
93.25
93.56
No Modular Blocks
95.89
−1.26
94.07
94.17
94.12
No ViT & No FAISS
94.49
−2.66
93.02
92.65
92.83
AMR-Net (Full)
97.15
0.00
97.00
97.00
97.00
Table 9: Ablation Study Based on Test Accuracy. Each row shows the model configuration and the corresponding accuracy on the test set. Δ denotes the drop relative to the full AMR-Net.
Hyperparameter
Values Tested
Accuracy (%)
Notes
k (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 d′
1024
96.27
Information bottleneck
Table 10: Hyperparameter sensitivity analysis on the waste classification test set. Bold indicates the selected value used in the main experiments.
Model
Mean Accuracy (%)
Std. Dev. (%)
AMR-Net
97.03
0.11
ResNet152
92.63
0.28
Swin Transformer
94.17
0.20
Table 11: Mean and standard deviation of model accuracy over six runs.
Figure 5: Industrial deployment pipeline of the proposed defect detection model.
Predicted Defective
Predicted Non-defective
Actual Defective
509
0
Actual Non-defective
2
493
Table 12: Confusion Matrix on KolektorSDD2 Test Set
Department of Computer Science, University of York, UK · SEIEE, Shanghai Jiao Tong University, China · Computer Vision Laboratory, Linkoping University, Sweden +2