Relative Content

Tag Archive for kerastf.kerasimage-classificationmobilenetdensenet

How to preprocess image for INT8 post training quantization?

I am working on a binary classification problem using DenseNet121 on Keras. The original model yields an accuracy of ~93% and when float16 quantized (PTQ), accuracy acceptably drops to ~90%. I was experimenting with INT8 quantization when I realized the preprocess module of DenseNet scales input images between 0 and 1 and each channel is normalized with respect to the ImageNet dataset (as in here). Preprocessing my input images is essential but INT8 input results in all the pixel values becoming 0.