Efficient Deep Learning for Image Classification: Lighter Preprocessing and Fewer Parameters

Samuel Felipe dos Santos, Nicu Sebe, Jurandy Almeida2024

Abstract

Convolutional neural networks have achieved state-of-the-art performance in several computer vision tasks recently, learning high-level representations directly from RGB images. However, using deeper architectures has led to high computational costs, hindering deployment on devices with limited resources. Additionally, models are usually specialized in a single domain/task while an increasing amount of real-world applications need to deal with multiple domains simultaneously. The computational cost of storing and running multiple instances of those costly models can limit their utilization even more. This Ph.D. thesis aims to reduce the computational burden of deep learning, focusing on two main aspects: reducing data preprocessing cost and sharing parameters across multiple domains/tasks. These contributions have led to the creation of efficient models with high classification performance and reduced costs, allowing them to be deployed in a wider array of devices.

Introduction

Deep learning models, particularly Convolutional Neural Networks (CNNs), are notoriously resource-intensive. They face two major bottlenecks when moving from high-end servers to edge devices like mobile phones or embedded sensors:

  1. The Preprocessing Tax: Most images are stored as JPEGs. Standard CNNs require these to be decoded into raw RGB pixels, a process that is memory-intensive and computationally expensive.
  2. The Multi-Domain Burden: In the real world, a device might need to classify different types of images (e.g., medical scans, satellite imagery, and street views). Typically, this requires storing a separate, massive model for each "domain," which quickly exhausts limited storage.
Comparison between the standard deep learning pipeline (a) and the proposed efficient pipeline (b) using lightweight preprocessing and a single pruned model for multiple domains.

The research presented here attacks both the data pipeline and the model architecture, moving from the standard pipeline shown in Figure 2(a) to the streamlined approach in Figure 2(b).

Methodology

1. Learning in the Frequency Domain

Instead of decoding JPEGs to RGB, the authors adapt the ResNet-50 architecture to accept Discrete Cosine Transform (DCT) coefficients directly.

  • Channel Reduction: DCT representations have many channels. The authors proposed Frequency Band Selection (FBS) to manually pick relevant frequencies and data-driven methods—such as Linear Projection or Local Attention—to learn how to compress these channels automatically.
  • Stage Skipping: Because DCT coefficients already contain high-level frequency information, the authors found they could skip the first two stages of the ResNet-50 model entirely. This significantly reduces GFLOPs (computational cost) while maintaining high accuracy.
Architectural details of the proposed DCT-based models: (f) LC-RFA with data-driven channel reduction and (g) Upsampling-RFA with a reduced number of layers.

2. Budget-Aware Multi-Domain Learning (MDL)

To handle multiple tasks with one model, the authors built upon "Budget-Aware Adapters" (BA²):

  • Parameter Sharing Loss: Three new loss functions ($L_{PS}^{Int}$, $L_{PS}^{Union}$, and $L_{PS}^{Jaccard}$) were introduced to force different domains to "agree" on which weights to use.
  • Pruning: By encouraging domains to share weights, the authors could prune weights that weren't being used by any domain. This results in a single model that is smaller than the original backbone but capable of performing multiple tasks.

Datasets and Evaluation

The research utilized ImageNet as the primary benchmark for DCT-based efficiency experiments. For Multi-Domain Learning, the Visual Decathlon benchmark was used, consisting of 10 diverse datasets including Aircraft, CIFAR-100, Describable Textures (DTD), and Street View House Numbers (SVHN).

To evaluate the trade-off between performance and cost, the authors proposed the Efficiency-Effectiveness Score ($S_E$), a unified metric that balances accuracy against computational cost (GFLOPs) and storage (Parameters).

Key Results

  • DCT Speedup: The best DCT-based model achieved an $S_E$ score of 1.27 (where the RGB baseline is 1.00). It reduced GFLOPs from 3.86 to 2.86 and increased inference speed from 588 to 771 Frames Per Second (FPS), with only a modest drop in accuracy (73.46% to 70.49%).
  • MDL Compression: On the Visual Decathlon benchmark, the approach achieved an $S_E$ score of 177.72, compared to just 2.11 for standard finetuning.
  • Extreme Efficiency: The most compressed multi-domain model used only 0.212 GFLOPs and 0.41x the parameters of the baseline, yet it maintained competitive performance across all 10 domains.

Conclusion

This work demonstrates that deep learning can be made significantly more efficient by rethinking the standard pipeline. By learning directly in the frequency domain and employing budget-aware pruning for multi-domain tasks, it is possible to deploy high-performance models on resource-constrained devices. While there is a slight accuracy trade-off, the massive gains in speed and storage efficiency make these techniques highly viable for real-world edge computing applications.

Summary updated

BibTeX
@misc{santos2024efficient,
  author = {Samuel Felipe dos Santos and Nicu Sebe and Jurandy Almeida},
  title = {{Efficient Deep Learning for Image Classification: Lighter Preprocessing and Fewer Parameters}},
  year = {2024},
  doi = {10.5753/sibgrapi.est.2024.31645},
}
Figure