JPEG Inspired Deep Learning
About
Although it is traditionally believed that lossy image compression, such as JPEG compression, has a negative impact on the performance of deep neural networks (DNNs), it is shown by recent works that well-crafted JPEG compression can actually improve the performance of deep learning (DL). Inspired by this, we propose JPEG-DL, a novel DL framework that prepends any underlying DNN architecture with a trainable JPEG compression layer. To make the quantization operation in JPEG compression trainable, a new differentiable soft quantizer is employed at the JPEG layer, and then the quantization operation and underlying DNN are jointly trained. Extensive experiments show that in comparison with the standard DL, JPEG-DL delivers significant accuracy improvements across various datasets and model architectures while enhancing robustness against adversarial attacks. Particularly, on some fine-grained image classification datasets, JPEG-DL can increase prediction accuracy by as much as 20.9%. Our code is available on https://github.com/AhmedHussKhalifa/JPEG-Inspired-DL.git.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Zero-shot Classification | Caltech101 | Top-1 Clean Acc83.9 | 24 | |
| Visual Question Answering | TextVQA | Accuracy (Clean)0.346 | 18 | |
| Image Captioning | COCO (test) | Clean Metric Value113.3 | 18 | |
| Image Captioning | Flickr30k (test) | Clean Score0.748 | 18 | |
| Visual Question Answering | VQA v2 | Accuracy (Clean)68.8 | 18 | |
| Zero-shot Classification | ImageNet-R | Top-1 Accuracy (Clean)87.8 | 9 |