Automatic white balance (AWB) is an important module for cameras and classification of the color-distorted image is critical to realize intelligent AWB. Though accurate classifiers usually can be achieved via deep neural network models, they cannot fit into embedded hardware due to their complexity. To increase the classification accuracy and decrease latency, a lightweight convolutional neural network (CNN) with a histogram layer for AWB (AWBHNet) is constructed, which consists of one histogram layer, one regular convolutional layer, three depth separable convolutional layers, four pooling layers, two fully connected layers and two dropout layers. One-tenth of ImageNet is utilized as the normal image dataset. To generate various distorted colors, histogram shifting and matching are proposed to randomly adjust the histogram position or shape. Furthermore, the extent of shifting or matching is randomly generated to ensure the diversity of color distortion. Subsequently, the proposed AWBHNet and other CNNs are successively trained. Experiments show that the accuracy of the classifier trained by AWBHNet is 0.9150, which is at least 1.33% higher than each regular or lightweight network. Finally, intelligent AWB is realized on smartphones, the inference latency of AWBHNet is 47.6% lower than the best existing network.
Read full abstract