The complementary metal oxide semiconductor (CMOS) technique is widely used in modern manufacturing processes for the high compatibility. A novel metaheuristic with deep learning based compression with image classification model (MDL-CCIM) technique is developing to compress and classify the images captured by CMOS image sensors. The proposed MDL-CCIM technique follows two major processes, namely, butterfly compression and classification. Primarily, the BOA with LBG model is applied for image compression. Secondly, the DenseNet with softmax layer is employed for image classification. Finally, the hyper parameter tuning of the DenseNet model is optimally chosen by the Adam optimizer. A wide range of simulations was carried out to highlight the enhancement of the MDL-CCIM technique. The extensive comparative analysis reported the improved outcomes of the MDL-CCIM technique over the recent approaches. Hybrid DL models can be used for image classification purposes.