Lightweight hybrid CNN-Vision transformer for real-time automated shipping container damage detection
Manual container inspections often lead to inconsistencies and inefficiencies, which can disrupt supply chains and increase operational costs. The time-consuming nature of manual checks makes automation an appealing alternative. This paper presents a lightweight hybrid model combining Convolutional Neural Networks (CNN) and Vision Transformers (ViT), specifically designed for automated container damage classification. The CNN extracts fine-grained local features, while the ViT models global structural patterns, overcoming the limitations of purely convolutional architectures. We evaluate four model variants on a dataset of 2,116 images, collected from container depots near Jakarta Port. Our proposed CNN-ViT hybrid model generalized well with this dataset and achieves 96.57% ± 0.83 accuracy, 0.089 ± 0.015 binary cross-entropy loss, and 64.21 ± 1.47 ms inference latency, peaking at 97.2% accuracy and 62 ms latency in the best trial with only 1 million parameters. Compared to MobileNetV2, our approach improves classification accuracy by about 1% while reducing inference time by approximately 9 ms, demonstrating its efficiency for real-time automated container inspection in resource-constrained environments.
Authors
- Adi Kurniawan (ORCID: https://orcid.org/0000-0003-1397-2805)
- Mohamed Mohandes (ORCID: https://orcid.org/0000-0002-7897-1275)
- Shafiqur Rehman (ORCID: https://orcid.org/0000-0002-2209-9617)
- Hilal H. Nuha (ORCID: https://orcid.org/0009-0007-3638-0788)
- Naveed Iqbal (ORCID: https://orcid.org/0000-0003-4514-8554)
Publication Details
- Journal
- FME Transaction
- Published
- 2025-01-01
- DOI
- https://doi.org/10.5937/fme2504537k
- Primary Topic
- Advanced Neural Network Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00