{'fraction_non_alphanumeric': 0.019711902956785442, 'fraction_numerical': 0.00530705079605762, 'mean_word_length': 4.972850678733032, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Approach to Run Pre-Trained Deep Learning Models on Grayscale Images

Transfer learning helps the performance of a learning algorithm significantly when training deep learning models on challenging datasets. However, the pre-trained networks have certain constraints in terms of their architecture. For example, due to the wide availability of color images, state-of-the-art pre-trained networks expect an input image with three color channels. Grayscale images have small sizes as compared to color images and thus can enable real time computer vision applications in scenarios where there are constraints on device memory and bandwidth. Therefore, in this work we propose an approach to run pre-trained models on grayscale images for image classification tasks. We have used the VGG16 pre-trained model to classify Kaggle Dogs vs. Cats dataset. We have compared our results with VGG16 applied on color images. Our results have shown that when the weights for the first hidden layer are initialized as the mean of the pre-trained network weights then the classification accuracy with only 0.04% error can be achieved. Our analysis has shown that comparable benefits can be reaped when using grayscale images for deep learning based classification tasks with only one-third of the bandwidth and storage requirements.