{'fraction_non_alphanumeric': 0.03915582691797186, 'fraction_numerical': 0.008627555083620918, 'mean_word_length': 4.508040935672515, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fast Fourier Color Constancy and Grayness Index for ISPA Illumination Estimation Challenge

We briefly introduce two submissions to the Illumination Estimation Challenge, in the Int'l Workshop on Color Vision, affiliated to the 11th Int'l Symposium on Image and Signal Processing and Analysis. The Fourier-transform-based submission is ranked 3rd, and the statistical Gray-pixel-based one ranked 6th.


I. INTRODUCTION
Color constancy refers to the property of camera capturing the intrinsic color of objects regardless of the casting scene illumination. Researchers of color constancy are generally doing two things: First, measuring the illumination estimation as accurate as possible; Second, color correction to realize auto white balance. This work is all about the Step 1 as it is the most demanding part.
Many advanced deep learning methods (e.g. [4], [6], [7], [12]) have been proposed, and they achieved nearly-saturating results over two main-stream color constancy datasets -Gehler-Shi dataset [11] and NUS 8-camera dataset [5]. Along with the illumination estimation challenge, a new benchmark, Cube+ Dataset [1] is advertised and applied with more hardness. It is meaningful for us to test some existing methods and see a reboot in experimental results.
Different to Gehler-Shi and NUS 8-camera dataset, the Cube+ contains more images (up to 1707) with diverse ground truth annotations. Please refer to [1] for more official description of this dataset. One noticeable point of the Cube+ is that, only a single camera (Canon EOS 550D) is used for collecting the training and testing data. This can be seemed as an advantage and a disadvantage, simultaneously. On one hand, we now have chance to test any methods independent of varying photometric properties of several sensors. On the other hand, we are blind to the varying camera sensibility. This makes Cube+ "easier" for CNN-based methods.
Given that CNN is a functional tool since its invention and many other teams will use it for the challenge (we guess), we test some different approaches. The first submission (ranked 3rd in the leaderboard) is based on Barron's Fast Fourier Color Constancy (FFCC, [3]) since its source is publicly available and it is practical in products (e.g. Google Photo App). For how FFCC works and its insights, please refer to [3].
The other submission is ranked 6th which is out of top three, but we still want to introduce it. It is based on Grayness Index (GI) [8], which is an advanced version of gray pixel methods [9], [13]. A comparison of gray pixel methods is given by [10]. It is learning-free, thus it does not rely on training on the given 1707 images and the corresponding groundtruth. We choose it as it is simple (few lines of Matlab, no learning) and we are curious to see its limitness in a more challenging dataset like Cube+. Please check [8] if you want to find how gray (achromatic) pixels can be identified.

II. METHODOLOGY
In this section we describe the principles of the two approaches. Assuming Lambertian model, narrow sensor response and uniform global illumination , the RGB value of a pixel can be expressed as: which shows the color value of the channel c at the location p in image I is the product of the surface albedo W c (p) and the illumination color L c (p). In Barron's [2], the RGB value of a pixel I(p) is transformed into the log-chroma measures: By framing the task of color constancy in Equation 2, the global illumination L can be treated as an additive constraint in log-chroma space. Now that we have a 2D spatial localization task, where some window-wise classifiers can be trained using image-groundtruth pairs and then gives maximum activation when it detects illumination on the UV histogram. Barron proposed convolutional filter on UV histogram in [2], and further extended it in FFCC [3] by performing element-wise multiplication in the Fourier space, which allows "warpped" input images and faster inference speed.
Grayness Index [8] addresses color constancy from a different angle. Apply log and laplacian-of-gaussian filter δ on Equation. 1, we get: Assuming the illumination is constant over small local neighborhood (the same color and direction), Equation 3 simplifies to:  which is the core of gray pixel. δ log I r (p) = δ log I g (p) = δ log I b (p) indicates a perfect gray pixel at at the location p. Based on Equation 4, Grayness Index detects nearly gray pixels accurately, which reflects illumination. Please refer to the original papers [3], [8] for more theoretical details and the implementation.

III. HOW WE DO DIFFERENTLY
FFCC-based method FFCC contains multiple variants (model A to Q, depending on how many channels are used, thumb or full-size input, photo exif or deep feature). As the challenge page provides exif information, we adopt model P of FFCC, which is the best branch proved by results on Gehler-Shi Dataset. For deep feature required by Model P, we extract the neural activation from the layer "fc7" of 16-layer VGG network, which is pretrained on Place365 [14]. Now that we have exif and deep feature for each image of Cube+ dataset, we tuned the hyper parameters of FFCC and trained our model, same as [3].
On the last submission day we realized we made a mistake. The released testing data do not contain any exif, which we believe our trained model will definitely fail on this testing data. Under limited time, we computed the mean exif matrix of all training images and used it for each testing image. The trained model P can work, but not to a satisfying degree. We submitted the results given by this model P. GI-based method We did not change anything -we downloaded the code from the github page 1 and used it on testing images.  Table I gives a simple leaderboard. Our FFCC-based Model Q suffers from the lack of exif for testing data, ranked after the FFCC Model J, which does not rely on exif. This validates that using a biased exif leads to a worse case. The 3-fold crossvalidation of FFCC Model P on Cube+ training data shows again the importance of exif information.

IV. RESULTS
For GI-based method, it obtains a competitive median angular error, with no learning. It inherits the simplicity of the classical gray world method, but also the same drawback -when the scene is dominated by a specific color or the image is a local patch, its result is seriously biased. This is shown by its mean error, as several "outlier" images can bring very high angular errors, increasing the mean error rapidly. This is consistent with the observations in [8]. Figure 1 illustrates several hard images in the testing set for GI. On Cube+ training set which contains much less "outlier" images, GI obtains more accurate and robust results (Table I, bottom).
We also show the result of two methods tested on Gehler-Shi Dataset (Table II) and NUS 8-camera Dataset (Table III). Comparing the three tables, we find that the Cube+ dataset is the most challenging one. It is partially due to a large portion of local-patch images (Figure 1) in the Cube+ dataset.

V. CONCLUSION
In this paper we test two non-deep-learning methods on the new challenging Cube+ dataset. The FFCC method needs training and can exploit the exif information (if provided), while the Grayness Index is a simple statistical methods but sensitive to extremely hard images. Both methods find their position in the leaderboard, reasonably. Our future plan is to make Grayness Index include more dichromatic cues to deal with very local images, while still keeping it simple.