Edouard Oyallon

Eugene Belilovsky

Sergey Zagoruyko

Michal Valko

Compressing the Input for CNNs with the First-Order Scattering Transform

Keywords: CNN, SIFT, image descriptors, first-order scattering

We study the first-order scattering transform as a candidate for reducing the signal processed by a convolutional neural network (CNN). We study this transformation and show theoretical and empirical evidence that in the case of natural images and sufficiently small translation invariance, this transform preserves most of the signal information needed for classification while substantially reducing the spatial resolution and total signal size. We show that cascading a CNN with this representation performs on par with ImageNet classification models commonly used in downstream tasks such as the ResNet-50. We subsequently apply our trained hybrid ImageNet model as a base model on a detection system, which has typically larger image inputs. On Pascal VOC and COCO detection tasks we deliver substantial improvements in the inference speed and training memory consumption compared to models trained directly on the input image.

Introduction

Convolutional neural networks (CNNs) for supervised vision tasks learn often from raw images [START_REF] Lecun | Convolutional networks and applications in vision[END_REF] that could be arbitrarily large. Effective reduction of the spatial dimension and total signal size for CNN processing is difficult. One way is to learn this dimensionality reduction during the training of a supervised CNN. Indeed, the very first layers of standard CNNs play often this role and reduce the spatial resolution of an image via pooling or stride operators. Yet, they generally maintain the input layer sizes and even increase it by expanding the number of channels. These pooling functions can correspond to a linear pooling such as wavelet pooling [START_REF] Williams | Wavelet pooling for convolutional neural networks[END_REF], a spectral pooling [START_REF] Rippel | Spectral representations for convolutional neural networks[END_REF], an average pooling, or a non-linear pooling such as 2 -pooling [START_REF] Le | Building high-level features using large scale unsupervised learning[END_REF], or max-pooling. For example, the two first layers of an AlexNet [START_REF] Krizhevsky | ImageNet classification with deep convolutional neural networks[END_REF], a VGG [START_REF] Simonyan | Very deep convolutional networks for large-scale image recognition[END_REF] or a ResNet [START_REF] He | Deep residual learning for image recognition[END_REF] reduce the resolution respectively by 2 3 , 2 1 , and 2 2 , while the dimensionality of the layer is increased by a factor 1.2, 5.3, and 1.3 respectively. This spatial size reduction is important for computational reasons because the complexity of convolutions is quadratic in spatial size while being linear in the number of channels. This suggests that reducing the input size to subsequent CNN layers calls for a careful design. In this work, we (a) analyze a generic method that, without learning, reduces input size as well as resolution and (b) show that it retains enough information and structure that permits applying a CNN to obtain competitive performance on classification and detection.

Natural images have a lot of redundancy, that can be exploited by finding a frame to obtain a sparse representation [START_REF] Forsyth | Computer vision: a modern approach[END_REF][START_REF] Mallat | A wavelet tour of signal processing[END_REF]. For example, a wavelet transform of piece-wise smooth signals (e.g., natural images) leads to a multi-scale and sparse representation [START_REF] Mallat | Singularity detection and processing with wavelets[END_REF]. This fact can be used for a compression algorithm [START_REF] Skodras | The jpeg 2000 still image compression standard[END_REF]. Since in this case the most of the information corresponds to just a few wavelet coefficients, a transform coding can be applied to select them and finally quantize the signal, which is consequently a more compact representation. Yet, this leads to variable signal size and thus this method is not amenable for CNNs that require a constant-size input. Another approach is to select a subset of these coefficients, which would be a linear projection. Yet, a linear projection would imply an unavoidable loss of significant discriminative information which is not desirable for vision applications. Thus, we propose to use a non-linear operator to reduce the signal size and we justify such construction.

Prior work has proposed to input predefined features into CNNs or neural networks. For example, [START_REF] Perronnin | Fisher vectors meet neural networks: A hybrid classification architecture[END_REF] proposed to apply a deep neural network on Fisher vectors. This approach relies on the extraction of overlapping descriptors, such as SIFT, at irregular spatial locations and thus does not permit a fixed size output. Moreover, the features used in these models increase the signal size. In [START_REF] Fujieda | Wavelet convolutional neural networks for texture classification[END_REF], wavelets representations are combined at different layer stages, similarly to DenseNet [START_REF] Huang | Densely connected convolutional networks[END_REF]. [START_REF] Levinskis | Convolutional neural network feature reduction using wavelet transform[END_REF] proposes to apply a 2D Haar transform that leads to subsampled representation by a factor of 2 1 but is limited to this resolution. Concurrent to our work, [START_REF] Gueguen | Faster neural networks straight from JPEG[END_REF] proposed to train CNNs on top of raw DCT to improve inference speed by reducing the spatial resolution, yet this transformation is orthogonal and thus preserves the input size. Moreover, [START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF] proposes to input second-order scattering coefficients to a CNN, that are named hybrid scattering networks, which lead to a competitive performance on datasets such as Ima-geNet. The scattering transform is a non-linear operator based on a cascade of wavelet transforms and modulus non-linearity which are spatially averaged. This leads to a reduction in the spatial resolution of the signal. However, although the second-order scattering representation is more discriminative, it produces a larger signal than the original input size.

In this work, we also input predefined features into CNNs, but with the explicit goal of an initial stage producing a compressed representation that is still amenable to processing by a CNN. In particular, we show that the firstorder scattering representation is a natural candidate for several vision tasks. This descriptor leads to high accuracy on large-scale classification and detection while it can be computed much faster than its second-order counterpart because it requires fewer convolutions. As explained in [START_REF] Bruna | Invariant scattering convolution networks[END_REF], this descriptor is similar to SIFT and DAISY descriptors that have been used as feature extractors in many classical image classification and detection systems [START_REF] Sánchez | Image classification with the fisher vector: Theory and practice[END_REF][START_REF] Morel | ASIFT: A new framework for fully affine invariant image comparison[END_REF]. In this paper, we show that in the case of hybrid networks [START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF][START_REF] Perronnin | Fisher vectors meet neural networks: A hybrid classification architecture[END_REF], using the first-order scattering only can have favorable properties with respect to the second-order ones and possibly higher-order ones.

The core of our paper it the analysis and justification of the combination of first-order scattering and CNNs. We support it both with theoretical and numerical arguments. In Section 2, we justify that first-order scattering with small-scale invariance reduces the spatial resolution and signal while preserving important attributes. First, we motivate the first-order scattering from a dimensionality reduction view in Section 2.1. Then, in Section 2.2, we illustrate the negligible loss of information via a good reconstruction of synthetic signals and natural images using only a first-order scattering. Next, in Section 3 we present our experiments1 on challenging datasets. We demonstrate competitive performance with ImageNet models commonly used in transfer learning in Section 3.1. In Section 3.2 we show on COCO and Pascal VOC detection tasks that these base networks can lead to improvements in terms of inference speed and memory consumption versus accuracy.

First-order scattering

In this section, we motivate the construction of a first-order scattering transform from a compression perspective. Indeed, a scattering transform is traditionally built as a representation that preserves high-frequency information, while building stable invariants w.r.t. translations and deformations. While using the same tools, we adopt a rather different take. We show theoretically and numerically that a first-order scattering transform builds limited invariance to translation, reduces the size of an input signal, preserves most of the information needed to discriminate and reconstruct a natural image. Note also that this representation is able to discriminate spatial and frequency variations of natural images. In this section, we deal with Gábor wavelets [START_REF] Olshausen | Emergence of simple-cell receptive field properties by learning a sparse code for natural images[END_REF] since their analysis is simpler, while for the experiments we will use modified Gábor wavelets, namely Morlet wavelets [START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF] for the sake of comparison. We show that the first-order scattering transform does not lose significant signal characteristics of natural images, by providing reconstruction examples obtained via a mean-square error minimization. In particular, we demonstrate this property on Gaussian blobs as a simplified proxy for natural images.

A reduction of the spatial resolution

Definition A scattering first-order transform [START_REF] Mallat | Group invariant scattering[END_REF] is defined from a mother wavelet ψ and a low-pass filter φ. An input signal x is filtered by a collection of dilated band-pass wavelets obtained from ψ, followed by a modulus and finally averaged by a dilation of φ. The wavelets we chose decompose the signal in a basis in which transient structure of a signal is represented more compactly. We describe the construction of each filter and justify the necessity of each operator.

First, let us fix an integer J that specifies the window length of the low-pass filter. For the sake of simplicity, we consider Gábor filters [START_REF] Olshausen | Emergence of simple-cell receptive field properties by learning a sparse code for natural images[END_REF]. These filters provide a good localization tradeoff between frequency and space planes, due to Heisenberg uncertainty principle [START_REF] Mallat | A wavelet tour of signal processing[END_REF]. Thus, having κ(ω) e -2σ 2 0 ω 2 for a fixed bandwidth σ 0 and a slant s that discriminates angles, we set for ω = (ω 1 , ω 2 ),

ψ(ω) κ ω 1 , ω 2 s -ω 0 and φ(ω) κ(ω).
The frequency plane (and in particular the image frequency circle of radius π) needs to be covered by the support of the filters to avoid an information loss. This issue is solved by the action of the Euclidean group on ψ via rotation r -θ and dilation by j ≤ J,

ψ j,θ (u) = 1 2 2j ψ r -θ u 2 j and φ J (u) = 1 2 2J φ u 2 J •
In this case, each wavelet ψ j,θ has a bandwidth of 1/(2 j σ 0 ) and its central frequency is 2 j r -θ ω 0 . If a filter has a compact support in the frequency domain, then due to Nyquist principle, we can reduce the spatial sampling of the resulting convolution. We do this approximation in the case of Gábor filters. As we shall see, this localization in frequency is also fundamental because it permits to obtain a smooth envelope. The parameters j ≤ J and θ ∈ Θ are discretized and σ 0 is adjusted such that a wavelet transform preserves all the energy of x, characterized by

∃ε 0 ≥ 0, ∀ω, ω < π : 1 -ε 0 ≤ j≤J,θ∈Θ ψ j,θ (ω) 2 + φ J (ω) 2 ≤ 1 + ε 0 .
As a result, the transform is bi-Lipschitz and the magnitude of ε 0 determines the conditioning of the wavelet transform. An ideal setting is ε 0 = 0, for which the transform is an isometry which gives a one-to-one mapping of the signal while preserving its 2 -norm. Applying a convolution with these wavelets followed by a modulus removes the phase of a signal and thus should lead to a loss of information. In fact, [START_REF] Mallat | Phase retrieval for the cauchy wavelet transform[END_REF] proves that it is possible to reconstruct a signal from the modulus of its wavelet transform up to a global translation with Cauchy wavelets. Furthermore, there exists an algorithm of reconstruction [START_REF] Waldspurger | Phase recovery, maxcut and complex semidefinite programming[END_REF], with stability guarantees and extension to other class of wavelets. Consequently, the modulus of a wavelet transform does not lead to a significant loss if applied appropriately. Additionally, [START_REF] Mallat | Group invariant scattering[END_REF] demonstrates that this representation is stable to deformations, which permits building invariants to deformations, convenient in many vision applications. We now explain how the dimensionality reduction occurs.

The scattering first-order transform S [START_REF] Mallat | Group invariant scattering[END_REF] parametrized by J is2 defined as

Sx(u) = |x ψ j,θ | φ J (2 J u), x φ J (2 J u) θ∈Θ,j≤J .
The low-pass filter φ J builds a transformation that is locally invariant to translation up to 2 J . Therefore, it reduces the spatial sampling of the signal by a factor of 2 J . This also means that when discretized image of length N represented by N 2 coefficients, is filtered by the low-pass filter φ J , the signal is represented by N 2 /2 2J coefficients. Consequently, the number of coefficients used to represent Sx is

(1 + |Θ|J) N 2 2 2J
• In our case, we use |Θ| = 8, because it permits obtaining a good covering of the frequency plane, and thus, the input signal x is compressed via Sx if J ≥ 3. The low-pass filtering implies a necessary loss of information because it discards some high-frequency structure and only retains low frequencies which are more invariant to translation. It is fundamental to evaluate the quality of this compressed representation in order to validate that enough information is available for supervised classifier such as CNNs, which is what we do next.

Preserving signal information via modulus We evaluate the loss of information due to the low-pass filtering, which captures signal attributes located in the low-frequency domain. Notice that there would be no loss of information if the Fourier transform of the wavelet-modulus representation was located in a compact domain included in the bandwidth of φ J . Unfortunately, this property is not guaranteed in practice.

Nonetheless, Gábor wavelets are approximately analytic which implies that when convolved with a signal x, the resulting envelope is smoother [START_REF] Krajsek | A unified theory for steerable and quadrature filters[END_REF][START_REF] Mallat | A wavelet tour of signal processing[END_REF][START_REF] Soulard | Ondelettes analytiques et monogènes pour la représentation des images couleur[END_REF][START_REF] Mallat | Group invariant scattering[END_REF][START_REF] Delprat | Asymptotic wavelet and gabor analysis: Extraction of instantaneous frequencies[END_REF]. A smooth envelope of the signal implies that a significant part of its energy can be captured and preserved by a low-pass filter [START_REF] Mallat | Group invariant scattering[END_REF]. Furthermore, under limited assumptions of point-wise regularity on x, if the signal does not vanish, it is possible to quantify this smoothness, as done in [START_REF] Delprat | Asymptotic wavelet and gabor analysis: Extraction of instantaneous frequencies[END_REF]. Informally, for a translation x a (u)

x(u -a) by a of x, it means that if a 1, then we imply that |x a ψ|(u) ≈ |x ψ|(u).

Here, we simply give some explicit constant w.r.t. the stability to translation, that we relate to the envelope of ψ. Indeed, the Gábor filter ψ concentrates its energy around a central frequency ω 0 ,

∃η 0 > 0, ∃ω 0 , ε ≥ 0, ∀ω, ω -ω 0 2 > η 0 =⇒ | ψ(ω)| ≤ ε.
First-order scattering incorporates more information if the modulus operator has smoothed the signal. To this end, we characterize the stability w.r.t. translations in the case of Gábor wavelets. In particular, we provide the following Lipschitz bound w.r.t. translations.

Proposition 1. For any signal x ∈ 2 , x a ψ -e -iω T 0 a x ψ ≤ x ( η 0 a + ε ( a )),
where ε is a term of the order of ε.

Proof. Observe that

x a ψ -e -iω T 0 a x ψ 2 = e -iω T a -e -iω T 0 a ψ(ω) x(ω) 2 dω via Parseval identity ≤ 4ε 2 x 2 + ω-ω0 <η0 (e -iω T a -e -iω T 0 a ) ψ(ω) 2 x(ω) 2 dω.
(note that x → e ix is 1-Lipschitz, thus we apply the Cauchy-Schwartz inequality)

≤ x 2 4ε 2 + a 2 η 2 0 .
Taking the square root finishes the proof.

We note that this inequality is near-optimal, for Gábor wavelets, if

x(u) = δ 0 is a Dirac in 0, then |e iω T 0 a ψ(a) -ψ(0)| ∼ x a η 0 .
Observe that dilating the mother wavelet ψ to ψ j is equivalent to dilating the bandwidth η 0 to 2 -j η 0 . Following the reasoning, low-frequency Gábor wavelets are more likely to be invariant to a translation.

Proposition 1 characterizes the Lipschitz stability w.r.t. translations and indicates that the more localized a Gábor wavelet is, the more translation-stable is the resulting signal. This way, we justify Gábor wavelets as a great candidate for a wavelet transform with a smooth modulus with limited assumptions on x.

Note that using only small-bandwidth Gábor wavelets instead of dilated ones should be avoided because it would lead to significantly more filters. Furthermore, [START_REF] Mallat | Group invariant scattering[END_REF] shows that those filters will be more unstable to deformations, such as dilation, which is not desirable for vision applications.

Despite the stability to translation, there is no guarantee that the first-order scattering preserves the complete energy of the signal. The next section characterizes this energy loss via an image model based on Gaussian blobs and a reconstruction algorithm for natural images.

Information loss

We now characterize the information loss for natural images in two ways. First, we perform an empirical reconstruction of an image from its first-order scattering coefficients, as done for the second order in [START_REF] Bruna | Audio texture synthesis with scattering moments[END_REF][START_REF] Bruna | Scattering representations for recognition[END_REF] and observe that for natural images, we can indeed obtain an effective reconstruction of the first-order scattering. This is a strong indication that the relevant signal information is preserved. Second, we consider a generic signal model and show that for relatively low-scale factors J, the reconstruction is practically achieved. Reconstruction Following [START_REF] Bruna | Audio texture synthesis with scattering moments[END_REF][START_REF] Bruna | Scattering representations for recognition[END_REF], we propose to reconstruct an input image x from its first-order scattering Sx coefficient of scales J, via a 2 -norm minimization

x J = inf y Sx -Sy . (1)
We use a gradient descent as all the operators are weakly differentiable and we analyze the reconstructed signal. Figure 1 compares the reconstruction of a natural image with the first-order scattering for the scales J = 3 and J = 4. In our experiments, we optimize for this reconstruction with ADAM with an initial learning rate of 10 during 10 3 iterations, reducing by 10 the learning rate every 2 × 10 2 iterations. We measure the reconstruction error of x J from an original image x in terms of relative error, defined as

err J (x) = S x J -Sx Sx •
In other words, we evaluate how close the scattering representation of an image is to its reconstruction. We stop the optimization procedure as soon as we get err J (x) ∼ 2 × 10 -3 . In the case J = 3, observe that the important and high-frequency structure of the signals, as well as their spatial localization, are preserved. On the contrary, when J = 4, the fine-scale structure is neither well reconstructed nor correctly located, which tends to indicate that J ≥ 4 might not be a good-scale candidate for S. We now characterize this loss more precisely on a model based on blobs.

Gaussian blob model Explicit computation of scattering coefficients for general signals is difficult because a modulus is a non-linear operator that usually leads to non-analytic expressions. Therefore, we consider a simplified class of signals [START_REF] Lindeberg | Feature detection with automatic scale selection[END_REF] for which computations are exact and analytical. For a symmetric matrix Σ, we consider the unnormalized signal

x Σ (ω) e -ω T Σω .

Figure 2 shows several signals belonging to this class. Such signals correspond to blobs or lines as on Figure 2, which are frequent in natural images [START_REF] Lowe | Distinctive image features from scale-invariant keypoints[END_REF]. We apply our reconstruction algorithm and we explain why the reconstructions is challenging.

In particular, we prove the following proposition that is derived from convolutions between Gaussians and permits to compute their first-order scattering coefficients. Intuitively, this proposition says that for a particular class of signals, we can get their exact reconstruction from their first-order scattering coefficients. Note that for large values of J, the reconstruction is numerically infeasible. Proposition 2. For any symmetric Σ, j, and θ,

|x Σ ψ j,θ |(u) ∝ x Σ |ψ j,θ | (u).
Proof. Without loss of generality, we prove the result for ψ(ω) e -Γω-b 2 , where Γ is invertible and b ∈ R 2 . Then, |ψ|(ω) ∝ e -Γω 2 . Let ∆(u) x Σ ψ(u). Then by definition,

∆(ω) ∝ e -ω T (Σ+Γ T Γ)ω+2ω T Γb . As Γ T Γ 0, we can set b Σ + Γ T Γ -1
Γb. Then, the result comes from an inverse Fourier transform applied to

∆(ω) ∝ e -(ω-b) T (Σ+Γ T Γ)(ω-b) .
Therefore, the first-order scattering coefficients are given by

Sx Σ ∝ {x Σ (|ψ j,θ | φ J ), x Σ φ J } θ∈Θ,j≤J .
A naïve inversion of the first-order scattering coefficients would be an inversion of the convolution with |ψ j,θ | φ J which is unfortunately poorly conditioned for large values of J since this filter is a low-pass one. However, solving the optimization (1) leads to a different solution due to the presence of the modulus during the gradient computation. For J ≤ 3, it is possible to recover the original signal as shown in Figure 2. Nevertheless, there is a lack of spatial localization for J ≥ 4 due to the averaging φ J , that we observe during our reconstruction experiment. This confirms our choice of J = 3 for the remainder of the paper.

Numerical experiments

We perform numerical experiments using first-order scattering output as the input to a CNN. Our experiments aim to both validate that the first-order scattering can preserve the key signal information and highlight the practical importance of it. In particular, we find that we obtain performance close to some of the state-of-the-art systems while improving inference speed and memory consumption during training by light years..

ImageNet classification experiments

We first describe our image classification experiments on the challenging Im-ageNet dataset. Each of our experiments is performed using standard hyperparameters without a specific adaptation to our hybrid architecture. Extensive architecture search for the first-order scattering input is not performed and we believe that these results can be improved with resources matching the architectures and hyperparameters developed for natural images. ImageNet ILSVRC2012 is a challenging dataset for classification. It consists of 1k classes, 1.2M large colored images for training and 400k images for testing. We demonstrate that our representation does not lose significant information for classification by obtaining a competitive performance on ImageNet. We follow a standard procedure training procedures [START_REF] Zagoruyko | Wide residual networks[END_REF][START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF][START_REF] He | Deep residual learning for image recognition[END_REF]. Specifically, we applied standard data augmentation and crop input images to a size of 224 2 . The first order scattering then further reduces this to a size of 28 × 28. We trained our CNNs by stochastic gradient descent (SGD) with the momentum of 0.9, weight decay of 10 -4 and batch size of 256 images, trained for 90 epochs. We reduce the learning rate by 0.1 every 30 epochs. At test time, we rescale the images to 256 2 and crop an image of size 224 2 .

To construct our scattering hybrid networks, we stay close to an original CNN reference model. In particular, we build our models out of the ResNets [START_REF] He | Deep residual learning for image recognition[END_REF] and WideResNets [START_REF] Zagoruyko | Wide residual networks[END_REF] models. A typical ResNet consists of an initial layer followed by K = 4 so-called layer groups that in turn consist of [n 1 , . . . , n K ] residual blocks, where n i specifies the number of blocks in each layer group. Furthermore, the width in each blocks is a constant and equal to [w 1 , . . . , w K ]. Similarly to [START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF], an initial convolutional layer is applied to increase the number of channels from 3 × (1 + 8J) = 75 to w 1 . A stride of 2 is applied at the initial layer of the blocks k ≥ 2, to reduce the spatial resolution. Each of the residual blocks contains two convolutional operators, except when a stride of 2 is applied in order to replace the identity mapping, in which case there are three convolutional operators, as done in [START_REF] He | Deep residual learning for image recognition[END_REF]. In the following, we refer to ScatResNet-L as the architecture with L convolutional operators. As discussed we used J = 3, as done in [START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF].

In our first experiment, we aim to directly compare to the results of [START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF] which use the second-order scattering. Thus we use the same structure that applies K = 2 layer groups on the scattering input instead of the typical 4. This architecture was called the ScatResNet-10 [START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF], and has [START_REF] Williams | Wavelet pooling for convolutional neural networks[END_REF][START_REF] Williams | Wavelet pooling for convolutional neural networks[END_REF] layers of width [256,512]. The number of parameters is about 12M in both cases. Notice that the number of parameters varies only since the initial number of input channels change. Table 1 reports similar accuracy for order 1 and order 2 scattering, which indicates that if enough data is available and there is a small invariance to translation J, then for natural image classification, the order 2 does not provide significantly more information that can be exploited by a CNN. Now we demonstrate that the scattering first-order transform continues to scale further when applying more sophisticated networks. Note that this would not have been possible with a second-order scattering in a reasonable time. In our case, we avoid computing many convolutions. Scaling to these modern networks permits us to apply the scattering in the subsequent section to common computer vision tasks that require a base network from ImageNet, and where the smaller input size leads to gains in speed and memory.

The models we construct are the ScatResNet-50, based on the ResNet50 architecture, and the WideScatResNet-50-2 based on the wide ResNet that expands the channel width and leads to competitive performance [START_REF] Zagoruyko | Wide residual networks[END_REF]. Since the scattering input starts at a much lower resolution, we bypass the first group of the typical ResNet, which normally consists of K = 4 layer groups and reduce the number of groups to K = 3. A typical ResNet50 has 16 residual blocks distributed among the 4 layer groups. We maintain the same number of total residual blocks and thereby layers as in the ResNet50, redistributing them among the three groups using [START_REF] Krizhevsky | ImageNet classification with deep convolutional neural networks[END_REF][START_REF] Forsyth | Computer vision: a modern approach[END_REF][START_REF] Rippel | Spectral representations for convolutional neural networks[END_REF] blocks. As in their non-scattering analogue we apply bottleneck blocks [START_REF] He | Deep residual learning for image recognition[END_REF]. The width of the blocks for ScatResNet-50 and WideScatResNet-50-2 are [128, 256, 512] and [256, 512, 1024], which matches the widths of groups 2 through 4 of their non-scattering counterparts. Table 1 indicates that the performance obtained by those architectures can be competitive with their respective reference architectures for classification. We compare to the reference models trained using the same procedures as ours. 3 We additionally compare to published results of these models and several related ones. We evaluate the memory and speed of the ScatResNet-50 model and compare it to the reference models ResNet-50 and the next biggest ResNet model ResNet-101 in the first two rows of Table 2. Our comparisons are done on a single GPU. As in [START_REF] Gueguen | Faster neural networks straight from JPEG[END_REF][START_REF] Torfason | Towards image understanding from deep compression without decoding[END_REF], we evaluate the inference time of the CNN from the encoding. For memory, we consider memory usage during training as we believe the scattering models are useful for training with fewer resources. We find that our scattering model has favorable properties in memory and speed usage compared to its non-scattering analogues. In fact, as the next step, we demonstrate large improvements in accuracy, speed, and memory on detection tasks using the ScatResNet-50 network, which indicates that ScatResNet-50 features are also generic for detection.

Detection experiments

Finally, we apply our hybrid architectures to detection. We base our experiments and hyperparameters on those indicated by the Faster-RCNN implementation of [START_REF] Yang | A faster pytorch implementation of faster R-CNN[END_REF] without any specific adaptation to the dataset. We consider both the VOC07 and COCO and adopt the ScatResNet-50 network as the basis of our model. We shared the output of the second layer across a region proposal network and a detection network, which are kept fixed. The receptive field of each output neuron corresponds to 16 2 , which is similar to [START_REF] Girshick | Fast R-CNN[END_REF][START_REF] He | Deep residual learning for image recognition[END_REF][START_REF] Ren | Faster R-CNN: towards real-time object detection with region proposal networks[END_REF]. The next layers will be fine-tuned for the detection tasks and fed to classification and box-regression layers, as in [START_REF] Girshick | Fast R-CNN[END_REF], and a region proposal network as done in [START_REF] Ren | Faster R-CNN: towards real-time object detection with region proposal networks[END_REF]. Similarly to [START_REF] He | Deep residual learning for image recognition[END_REF][START_REF] Ren | Faster R-CNN: towards real-time object detection with region proposal networks[END_REF], we fixed all the batch normalization [START_REF] Ioffe | Batch normalization: Accelerating deep network training by reducing internal covariate shift[END_REF] layers, including the running means and biases.

Pascal VOC07 Pascal VOC2007 [START_REF] Everingham | The pascal visual object classes (VOC) challenge[END_REF] consists of 10k images split equally for training ("train+val") and testing, with about 25k annotations. We chose the same hyperparameters as used in [START_REF] Yang | A faster pytorch implementation of faster R-CNN[END_REF]. We used an initial learning rate of 10 -3 that we dropped by 10 in epoch 5 and we report the accuracy of the epoch 6 in Table 3 on the test set. During training, the images are flipped and rescaled with a ratio between 0.5 and 2, such that the smaller size is 600px as [START_REF] He | Deep residual learning for image recognition[END_REF][START_REF] Ren | Faster R-CNN: towards real-time object detection with region proposal networks[END_REF].

The training procedures used for detection often vary substantially. This includes batch size, weight decay for different parameters, and the number of training epochs among others. Due to this inconsistency, we train our own baseline models. We use the trained base networks for ResNet-50 and ResNet-101 provided as part of the torchvision package in pytorch [START_REF] Paszke | Automatic differentiation in pytorch[END_REF] and train the detection models in exactly the same way as described above for ScatResNet50, ResNet-50, and ResNet-101. Table 3 reports a comparison of our ScatResNet model and the ResNet50 and ResNet101 model on this task. The results clearly show that our architecture and base network leads to a substantially better performance in terms of the mAP. On this particular dataset, perhaps due to its smaller size, we find the hybrid model can outperform even models with substantially stronger base networks [START_REF] Oyallon | Scaling the scattering transform: Deep hybrid networks[END_REF] i.e the performance of ScatResNet-50 is above that of the ResNet101 based model. In the second two rows of Table 2, we show the memory and speed of the different models. The inference speed of the base network feature extractor is shown and for memory, we show the maximum batch size that one can train with. The tradeoff in mAP vs. speed and mAP vs. memory consumption here clearly favors the scattering based models. We now consider a larger scale version of this task on the COCO dataset. COCO We likewise deploy the ScatResNet-50 on the COCO dataset [START_REF] Lin | Microsoft COCO: Common objects in context[END_REF]. This detection dataset is more difficult than than PASCAL VOC07. It has 120k images, out of which we use 115k for training and 5k for validation (minival), with 80 different categories. We again follow the implementation of [START_REF] Yang | A faster pytorch implementation of faster R-CNN[END_REF] and their training and evaluation protocol. Specifically, we train the Faster-RCNN networks for 6 epochs with an initial learning rate of 8 × 10 -3 , multiplying by a factor 0.1 at epoch 4. We use a minimal size of 800px, and similar scale augmentation w.r.t. Pascal VOC07. We use a batch size of 8 on 4 GPUs and train again all 3 models ScatResNet-50, ResNet-50, and ResNet-101. At test time, we restrict the maximum size to be 1200px as in [START_REF] Yang | A faster pytorch implementation of faster R-CNN[END_REF] to permit an evaluation on a single GPU. Table 4 reports the mAP of our model compared to its non-hybrid counterparts. This score is computed via the standard averaged over IoU thresholds [0.5, 0.95].

Our architecture accuracy falls between the one of a ResNet-50 and a ResNet-101. Observing Table 2 the tradeoff in mAP vs. speed and mAP vs. memory consumption here still favors the scattering based models. The results indicate that scattering based models can be favorable even in sophisticated near -state-ofthe-art models. We encourage future work on combining scattering based models with the most-state-of-the-art architectures and pipelines.

Conclusion

We consider the problem of compressing an input image while retaining the information and structure necessary to allow a typical CNN to be applied. To the best of our knowledge, this problem has not been directly tackled with an effective solution. We motivate the use of the first-order scattering as a candidate for performing the signal reduction. We first refine several theoretical results regarding the stability with respect to translation of the first-order scattering. This motivates the use of Gábor wavelets that capture many signal attributes.

We then show both on an analytical model and experimentally that reconstruction is possible. We perform experiments on challenging image classification and detection datasets ImageNet and COCO, showing that CNNs approaching the state-of-the-art performance can be built on top of the first-order scattering. This work opens the way to a research on transformations that build compressed input representations. Finally, we incite research on families of wavelets that could increase the resolution reduction and on determining whether our result generalizes to other classes of signals.

  (a) middle: PSNR ≈ 26dB, right: PSNR ≈ 20dB (b) middle: PSNR ≈ 23dB, right: PSNR ≈ 19dB

Fig. 1 :

 1 Fig. 1: Reconstructed images from first-order scattering coefficients, J = 3, 4 and their PSNR. Color channels can be slightly translated leading to artifacts. (left) original image x (middle) reconstruction x 3 from Sx, J = 3 (right) reconstruction x 4 from Sx, J = 4. This demonstrates that even complex images can be reconstructed for J = 3, while dividing the spatial resolution by 2 3 .

Fig. 2 :

 2 Fig. 2: Reconstruction of different signals of type x Σ . (left) original image (middle) reconstruction via for J = 3 (right) reconstruction for J = 4

Table 1 :

 1 Accuracy on ImageNet. Note that scattering based models have input sizes of 28×28×75 while the normal ImageNet models are trained on 224×224×3.

	Architecture Top 1 Top 5 #params
	Order 1,2 + ScatResNet-10 [17] 68.7	88.6	12.8M
	Order 1 + ScatResNet-10 67.7	87.7	11.4M
	Order 1 + ScatResNet-50 74.5	92.0	27.8M
	Order 1 + WideScatResNet-50-2 76.2	92.8	107.2M
	ResNet-50 (pytorch) 76.1	92.9	25.6M
	ResNet-101(pytorch) 77.4	93.6	45.4M
	VGG-16 [6] 68.5	88.7	138M
	ResNet-50 [7] 75.3	92.2	25.6M
	ResNet-101 76.4	92.9	45.4M
	WideResNet50-2 [32] 77.9	94.0	68.9M
	ResNet-152 77.0	93.3	60.2M

Table 2 :

 2 Speed and memory consumption for ImageNet classification sizes (224x224) and detection scale 800px. We compare the inference speed of the learned CNN between the different models and for the detection models the inference speed of feature extraction. To evaluate memory we determine the maximum batch size possible for training on a single GPU. We use a single 11GB Ti 1080 GPU for all comparisons.

		Classification Models Detection Models
		Speed	Max im.	Speed	Max im.
	Architecture (64 images) ImageNet (4 images)	Coco
	Order 1 + ScatResNet-50	0.072	175	0.073	9
	ResNet-50	0.095	120	0.104	7
	ResNet-101	0.158	70	0.182	2

Table 3 :

 3 Mean average precision on Pascal VOC7 dataset. First-order scattering permits outperforms the related models.

	Architecture mAP
	Faster-RCNN Order 1 + ScatResNet-50 (ours) 73.3
	Faster-RCNN ResNet-50 (ours) 70.5
	Faster-RCNN ResNet-101 (ours) 72.5
	Faster-RCNN VGG-16 [34] 70.2

Table 4 :

 4 Mean average precision on COCO 2015 minival. Our method obtains competitive performance with respect to popular methods.

	Architecture mAP
	Faster-RCNN Order 1 + ScatResNet-50 32.2
	Faster-RCNN ResNet-50 (ours) 31.0
	Faster-RCNN ResNet-101 (ours) 34.5
	Faster-RCNN VGG-16 [34] 29.2
	Detectron [40] 41.8

code available at https://github.com/edouardoyallon/pyscatlight

in the following, we omit the dependence w.r.t. the scale J

http://pytorch.org/docs/0.3.0/torchvision/models.html

Acknowledgements E. Oyallon was supported by a GPU donation from NVIDIA and partially supported by a grant from the DPEI of Inria (AAR 2017POD057) for the collaboration with CWI. S. Zagoruyko was supported by the DGA RAPID project DRAAF. The research presented was also supported by European CHIST-ERA project DELTA, French Ministry of Higher Education and Research, Nord-Pas-de-Calais Regional Council, Inria and Otto-von-Guericke-Universität Magdeburg associated-team north-European project Allocate, and French National Research Agency projects ExTra-Learn (n.ANR-14-CE24-0010-01) and BoB (n.ANR-16-CE23-0003).


Laurent Brunel
email: brunel@formulaction.com

Alice Brun

Patrik Snabre

Luca Cipelletti

Adaptive Speckle Imaging Interferometry: a new technique for the analysis of microstructure dynamics, drying processes and coating formation

Keywords:

come     Adaptive Speckle Imaging Interferometry: a new technique for the analysis of microstructure dynamics, drying processes and coating formation

Introduction

Besides direct observation using a microscope, the first known optical technique to analyze the dynamical behavior of micrometric particle suspensions is Dynamic Light Scattering (DLS) [START_REF] Clark | A Study of Brownian Motion Using Light Scattering[END_REF][START_REF] Berne | Dynamic Light Scattering[END_REF], sometime also referred to as Photon Correlation Spectroscopy (PCS). The optical set-up consists in a point-like detector, usually a phototube or an avalanche photodiode, which collects the light scattered by the particles at a fixed angle with respect to the propagation direction of the incident light, usually a coherent laser beam. As the particles move (e.g. because of Brownian motion), the relative phase of the scattered photons change, resulting in temporal fluctuations of the detected intensity. These fluctuations are characterized by measuring their time auto-correlation function g 2 (τ)=<I(t)I(t+τ)> time /<I 2 > time , with I(t) the time-dependent scattered intensity and τ the time delay. For Brownian particles under single scattering conditions, g 2 decays exponentially with a decay time that depends on the particles' diffusing coefficient [START_REF] Berne | Dynamic Light Scattering[END_REF], thus providing a popular particle sizing method. In 1987, Maret and Wolf [START_REF] Wolf | Multiple Light Scattering from Disordered Media. The Effect of Brownian Motion of Scatterers[END_REF] proposed an analytic formula for g 2 for Brownian scatterers in the opposite limit of strong multiple scattering, where photons undergo a large number of scattering events along their path through the sample. In 1988, Pine et al. [START_REF] Pine | Diffusing Wave Spectroscopy[END_REF] introduced the expression "Diffusing Wave Spectroscopy" (DWS) to designate DLS under strong multiple scattering conditions; since then, DWS has become a powerful and widespread technique for characterizing colloidal suspensions [START_REF] Weitz | Diffusing Wave Spectroscopy[END_REF].

In traditional DLS and DWS techniques, achieving a good signal/noise ratio requires g 2 to be averaged over at least 1000 times its characteristic decay time. For samples with a slow dynamics (e.g. concentrated or aggregating suspensions) this may require a too long measurement time. Moreover, for non-stationary dynamics (e.g. in aggregation or drying processes) extensive time averaging may lead to incorrect results, if the dynamics evolves significantly during the measurement time. Recently, these limitations have been circumvented by sampling a large number of speckles. To fix the ideas, let us consider the case of a DWS experiment with a single point-like detector. As recalled above, about 1000 statistically independent samples are needed to build a good correlation function. These samples are usually collected sequentially in time, assuming that time averaging is equivalent to averaging in the ensemble of photon paths. This condition is normally met, since the scatterers move substantially and explore a significant fraction of all possible configurations during the measurement time. Thus time and ensemble averages are equivalent, a condition referred to as ergodicity. In other words, if the sample micro-structure evolves rapidly enough, a sufficiently large fraction of all possible light paths may be sampled in a reasonable time and time averaging yields the desired ensemble average.

For slow or non-stationary dynamics, various schemes have been proposed to speed-up this sampling process, in addition to introducing methods to correct for insufficient time-averaging [START_REF] Pusey | Dynamic light scattering by non-ergodic media[END_REF]. In the cell-scanning technique [START_REF] Xue | Nonergodicity and Light-Scattering from Polymer Gels[END_REF] and the two cells technique [START_REF] Scheffold | Diffusing wave spectroscopy of non ergodic media[END_REF] (or its rotating-frosty-glass variant [START_REF] Viasnoff | Multispeckle diffusing-wave spectroscopy: A tool to study slow relaxation and time-dependent dynamics[END_REF]) a point-like detector is illuminated sequentially by different speckles, either by scanning the beam through the sample or by "scrambling" the scattered photons by letting them go through an additional scatterer before being detected (the 2 nd cell or the rotating frosty glass). In the so-called "multispeckle" methods [START_REF] Viasnoff | Multispeckle diffusing-wave spectroscopy: A tool to study slow relaxation and time-dependent dynamics[END_REF][START_REF] Wong | Dynamic light scattering with a CCD camera[END_REF][START_REF] Kirsch | Multispeckle autocorrelation spectroscopy and its application to the investigation of ultraslow dynamical processes[END_REF][START_REF] Cipelletti | Ultralow-angle dynamic light scattering with a charge coupled device camera based multispeckle, multitau correlator[END_REF][START_REF] Knaebel | Aging behavior of Laponite clay particle supensions[END_REF], by contrast, different speckles are sampled in parallel by using a large number of independent detectors, usually the pixels of a Charge Coupled Device (CCD) or CMOS camera (it is also possible to use a series of single photo-diodes or optical fibers coupled to photo-diodes). A correlation function is computed for each pixel, and the desired ensemble-averaged g 2 is obtained by averaging over all pixels: g 2 (τ)=<I(t)I(t+τ)> pixels /<I 2 > pixels . By adjusting the detection optics in such a way that the speckle size matches the pixel size (typically of the order of 10 µm), one ensures that each pixel carries a statistically independent contribution to g 2 and that the overall signal/noise ratio is maximized [START_REF] Viasnoff | Multispeckle diffusing-wave spectroscopy: A tool to study slow relaxation and time-dependent dynamics[END_REF]. The acquisition time required to achieve a given precision, compared to that with a single detector, is reduced by a factor equal to the number of pixels. Since the latter is typically as large as several tens of thousands, in practice no time averaging at all is required, thus providing access to the instantaneous dynamics. Together with the capability of measuring slow and non-stationary dynamics, advantages include a simpler set-up and a cost per detector (pixel) very low. The limitations are the reduced speed and sensitivity of CCD and CMOS cameras compared to avalanche photo-diodes or phototubes. The maximum acquisition rate is 30Hz for a classical cheap camera and about a few kHz for more sophisticated and expensive cameras, limiting the smallest accessible delay to a fraction of msec at best, instead of about 10 nsec for traditional point-like detectors.

In this work we present three new developments of the multi-speckle technique. First, we propose a new tool to quantify the evolution of the speckle pattern recorded by a CCD or CMOS camera, which we term the inter-image distance. Second, we show that for most cases of practical importance in film formation and drying processes, the inter-image distance grows with time and saturates according to a simple exponential law. This allows us to introduce an efficient and quick way to quantify the rate of change of the speckle pattern which we term Speckle Rate, (SR). Third, we present an adaptive algorithm that continuously adjusts the camera acquisition rate to trace in real time the speckle dynamics with high reactivity, dynamic range and accuracy. We globally term "Adaptive Speckle Imaging Interferometry" (ASII) these three advances. ASII is thus an extension of multispeckle (MS) DWS adapted to characterize film formation and drying processes by plotting a simple kinetics, the time evolution of the SR, providing a new, noninvasive signature of micro-structure evolution.

As a final introductory remark, we note that the temporal evolution of the speckle pattern generated by a sample with internal dynamics has also been investigated as a natural extension of the early works on the statistics of frozen speckles, often in connection with metrology and holography studies [START_REF] Briers | Speckle fluctuations and biomedical optics: implications and applications[END_REF]. The scientific community involved in these works (oddly somehow separated from the DLS and DWS ones) refers to this phenomenon as to "dynamic speckle". The most popular way to characterize the "dynamic speckle" phenomenon is to measure the contrast < I 2 >/< I > 2 of the speckle pattern, the underlying idea being that fast-moving speckles would lead to a blurred speckle pattern and hence to a reduced contrast. Both point-like [START_REF] Briers | Speckle fluctuations and biomedical optics: implications and applications[END_REF] and CCD detectors [START_REF] Arizaga | Following the drying of spray paints using space and time contrast of dynamic speckle[END_REF] has been used in measurements over a variety of samples, ranging from biological tissues [START_REF] Briers | Speckle fluctuations and biomedical optics: implications and applications[END_REF] to paint films [START_REF] Arizaga | Following the drying of spray paints using space and time contrast of dynamic speckle[END_REF] similar to those explored in our work. Compared to our approach, speckle contrast techniques yield less information, since the dynamics is probed on a single time scale, the integration time over which the detector is exposed to the speckle pattern. By contrast, in our technique the inter-image distance is calculated for time lags τ spanning several decades. As we shall show in the following, this is a crucial requirement for characterizing the dynamics of film, since the speckle rate may vary over 4 orders of magnitude.

More sophisticated approaches, involving the calculation of correlation functions similar to g 2 or to the inter-image distance introduced here have been used to characterize the drying of coatings in Refs. [START_REF] Romero | Statistics of the dynamic speckle produced by a rotating diffuser and its application to the assessement of paint drying[END_REF] and [START_REF] Amalvy | Application of dynamic speckle interferometry to the drying of coatings[END_REF], respectively. In [START_REF] Romero | Statistics of the dynamic speckle produced by a rotating diffuser and its application to the assessement of paint drying[END_REF], a point-like detector was used, thus requiring a temporal average of the correlation function. This limits the effectiveness of this technique when the dynamics are very slow and non-stationary, as discussed above for DLS and DWS. In [START_REF] Amalvy | Application of dynamic speckle interferometry to the drying of coatings[END_REF], a CCD detector was used. The second order moment, IM, of the so-called modified cooccurrence matrix was calculated, a quantity similar to the inter-image distance defined here. However, IM was calculated for a single fixed time delay, whereas in our work the inter-image distance is calculated for several τ's and the minimum lag is continuously optimized by varying the CCD acquisition rate. This allows us to characterize the film dynamics with great accuracy and in real time over more than four orders of magnitude in time, an achievement not possible with the method proposed in [START_REF] Amalvy | Application of dynamic speckle interferometry to the drying of coatings[END_REF].

This short overview of previous works in the field of DLS and DWS and in that, closely related, of dynamic speckle interferometry shows that the ASII method proposed here represents a significant advance with respect to the existing optical techniques for the characterization of film formation and drying. The ASII method is at the core of a new commercially available instrument called HORUS®, which monitors the drying process of any product deposited on any substrate by analyzing the micro-structure dynamics of the film [START_REF] Brunel | Method and device for the analysis of movement in a scattering medium[END_REF]. HORUS® provides the ink and paint industries with a new valuable tool for the non-intrusive monitoring of the drying and film formation process.

The paper is organized as follows: the hardware configuration is described in Section 2. Section 3 explains the ASII method: the inter-image distance, the exponential approximation and the adaptive algorithm are described here. Some examples of the application of HORUS® to the analysis of film formation are given in Section 4, before the concluding remarks of Section 5.

Horus® hardware configuration

A backscattering configuration has been chosen for the HORUS® apparatus, allowing the detector and the laser source to be housed in a single convenient optical head, as shown in Fig. 1. Typically, the backscattered signal is higher than the transmitted one, allowing one to use a detector with a relatively low sensitivity (such as a CCD or a CMOS camera) and limiting the required laser power. This last point is important for safety reasons and for preventing heat-induced convection in the sample. Indeed, in the backscattering geometry even a low-power laser diode allows one to monitor the drying of relatively black products such as black paints or inks. The product to be studied is spread out in a thin layer on any chosen substrate. Mechanical stability is important, since any vibration of the optical head would result in a spurious loss of correlation, wrongly attributed to the micro-structure dynamics of the analyzed product. The substrate is thus fixed on a massive support plate, which is carefully leveled with respect to gravity in order to avoid any flow. The optical head is attached to a rigid vertical mast fixed to the plate. The apparatus is designed so as to filter out any external vibration, limiting the maximum displacement of the head with respect to the plate to less than 1 μm. The head contains a CMOS camera detector (with no lens) and the laser source. A hole acting as a diaphragm blocks the parasitic ambient light coming from outside a cone of half-angle approximately 10 degrees. To remove the remaining parasitic light propagating within this cone, an interference filter of bandwidth 10 nm is placed in front of the hole. The laser source is a standard and safe laser diode with power 0.9 mW and wavelength 650 nm. An adjustable focusing lens is mounted in front of the laser to adjust the spot size on the product, typically to a few mm.

The camera has a 320x240 pixel sensor with a maximum frame rate of 30 images/s. The slowest micro-structure movement detectable by HORUS® is ultimately limited by mechanical stability. The minimum measurable speckle rate is around 10 -5 Hz, corresponding to a correlation time τ c of 100000 seconds, slightly more than 1 day. The maximum accessible speckle rate is limited by the camera speed itself. As explained below, the algorithm imposes the capture of a minimum of 4 images in order to calculate the SR: the maximum SR is thus limited to about 10Hz.

The ASII method: inter-image distance, exponential approximation and adaptive algorithm

Inter-image distance

In order to minimize the computation load needed to monitor the drying process, one may wonder whether the evolution of the speckle pattern may be characterized more efficiently than by calculating the intensity correlation function g 2 . A convenient way to address this question is to think at a speckle image as a point in a multidimensional space S im . For any given image, each co-ordinate in the hyper-space S im corresponds to the intensity measured at a given pixel of the CMOS camera. The dimensionality of S im is thus the number of pixels of the camera, n=76800 for our 320x240 camera. The change of the speckle pattern between two images may then be quantified by introducing a vectorial distance function between the corresponding 2 points in the space S im .

electronic images ----> space S im ------> R + (image1,image2) |----> (p 1 ,p 2 ) in S im |-----> distance
The distance is by definition a single non-negative number, which can be used to compare quantitatively pairs of speckle images taken at different times. If the two images are identical, the corresponding points in the hyper-space S im coincide and their distance is zero. As the two images become different, their distance will increase.

Various definitions for the distance function may be chosen; here we discuss briefly two possible choices that are computationally appealing. Let's note I 1 (x,y) the intensity of a pixel of co-ordinates (x,y) of the first image and I 2 (x,y) the corresponding intensity for the second image. We define a quadratic vectorial distance d 2 ={Σ[I 2 (x,y)-I 1 (x,y)] 2 } 1/2 , as well as an alternative distance d 1 =Σ|I 2 (x,y)-I 1 (x,y)|. In both cases, the sum is over all pixels. The inter-image distance has an asymptotic maximum value that we shall call d max , corresponding to two fully uncorrelated speckle images. As we show below, both d 1 and d 2 are less demanding in terms of computational power than the traditional correlation function g 2 . In the HORUS® apparatus we have chosen to implement d 2 , which, as we will discuss below, is directly related to the more common g 2 function. Note that this quadratic inter-image distance represents the extension to multi-speckle processing of the "structure function" introduced by Schätzel for point-like detectors, which was shown to be less prone to detector noise than g 2 [START_REF] Schätzel | Noise in photon correlation and photon structure functions[END_REF].

Comparison of the computational load

For the case of an ideal, noise-free detector with n pixels, computing g 2 requires n multiplications, while d 2 needs n differences and n squares, and d 1 needs n differences and n absolute values. Computing an addition is faster than a multiplication and easier to implement in a specialized electronics. Taking a square can be at least as fast as an addition thanks to a (small) look-up table [20]. Thus, the intensity correlation function g 2 is the most time consuming and the inter-image difference d 1 the less time consuming way to quantify the speckle pattern evolution.

The inter-image distance has also some additional advantages in the case of nonideal detectors. A first typical imperfection is the fact that each pixel has its individual offset, or dark level. This offset must be corrected for when calculating g 2 [START_REF] Cipelletti | Ultralow-angle dynamic light scattering with a charge coupled device camera based multispeckle, multitau correlator[END_REF], requiring two more additions per pixel, while it is automatically removed when using d 2 or d 1 . Table 1 below recapitulates the computational cost of the various schemes discussed above, for the case of a camera having pixels with distinct offsets: Note that it is possible to establish a relation between d 2 and g 2 involving only on the mean intensity, < I >, and the mean squared intensity, < I 2 >. By assuming that the probability distribution of the scattered intensity is the same for each pixel and using the classical relation between the variance and covariance of two random variables, one finds:

d 2 =[2n(< I 2 >-g 2 < I > 2 )] 1/2 (1)
In particular, the maximum inter-image distance corresponding to two completely uncorrelated images (for which g 2 -1= 0) can be calculated using the previous relation, yielding d 2max =[2n(< I 2 >-< I > 2 )] 1/2 . Therefore, d 2max may be calculated directly from the probability distribution function (PDF) of the intensity obtained from one single speckle image, provided that the dark level offset is the same for all pixels. If the speckle size is much larger than the pixel size, the PDF P(I) of the scattered intensity is exponential: P(I)=(1/< I >)exp(-I/< I >) [START_REF] Goodman | Laser speckles and related phenomena[END_REF]. In this case < I 2 >=2< I > 2 and the relationship between g 2 and d 2 simplifies to g 2 -1=1-(d 2 /d 2max ) 2 , with d 2max =(2n) 1/2 < I >.

Estimation of the characteristic rate of change of the speckle field by an exponential approximation.

In order to monitor a drying process, a series of short movies of the speckle pattern backscattered by the sample is acquired. Each movie is processed independently to extract the information related to the speckle dynamics. For each movie, the interimage distance, d 2 (τ), between the first image of the movie and all subsequent images, is calculated. Typical examples for three different drying fluids are shown in Fig. 2. For the sake of simplicity, it is desirable to extract only one single figure representative of the speckle dynamics for each movie. Experimentally, we have noticed that the shape of d 2 (τ) is very often well described by an exponential growth to d 2max , the saturation level:

d 2 (τ)=d 2 0 +(d 2max -d 2 0 )[1-exp(τ/τ c )] (2)
with d 2 0 the d 2 value for the first pair of images. Note that d 2 0 may be significantly larger than zero due to electronic noise and speckle dynamics faster than the minimum lag between images. It is therefore natural to fit the data to Eq. ( 2) and take the characteristic time τ c for the typical decay time we are looking for. Finally, we define the "speckle rate" (SR) as the inverse of the correlation time τ c , SR=1/τ c , in order to provide a single number that decreases as the dynamics slows down.

Two practical issues are worth discussing. First, the asymptotic value of d 2 (d 2max ) is required in Eq. ( 2). As discussed above, d 2max could be calculated from the PDF of the speckle intensity for one single image. However, we find that more robust results are obtained by evaluating d 2max using a pair of fully decorrelated speckle images, which we obtain from the first image and a software-rotated version of it. Second, we aim to extract the SR as rapidly as possible, in order to follow the drying kinetics.

Once d 2max is known, this may be achieved by acquiring a shorter speckle movie, covering only the initial, linear growth of d 2 . τ c is then obtained by intersecting the initial linear growth with the asymptote d 2max . Practically, a linear adjustment of the d 2 data is performed and extrapolated until the horizontal line d 2 = d 2max is crossed. This fitting procedure filters out most of the measurement noise. We have found that acquiring speckle images during τ c /4 yields satisfactory results. Therefore, the SR can be measured in a quarter of the speckle field characteristic time.

Adaptive algorithm

Ideally, each movie has a duration T=τ c /4 and contains as much images as possible. Since the dynamics is usually non-stationary, the value of T must be permanently adapted before acquiring the next movie. We start by an initial guess T 1 = 100 ms, and calculate the first value of the SR, SR 1 , as explained above. SR 1 is used as an input to calculate the duration of the following movie, which is set to T 2 = 1/(4SR 1 ). This procedure is iterated during the whole measurement. Once the duration T i of the i-th has been set, the frame rate for the i-th movie is chosen as large as possible, within the limits of the camera (30 Hz) and with the additional constraint that each movie contains at most 255 images (for computational efficiency).

This algorithm acts as an efficient feed-back loop: if the first guess is not correct, the algorithm converges rapidly towards the correct one. If τ c evolves during the drying process, the algorithm will adapt the acquisition and processing to the new one. Even if τ c drops abruptly (e.g. if the speckle field "freezes" rapidly), the reduced time needed to evaluate the SR (τ c /4) allows a fast convergence to be achieved.

Experimental tests

Examples of inter-image distance curves

Examples of speckle rate kinetics curve

We present in Fig. 3 three examples of drying experiments performed with HORUS®. The first two examples concern the film formation of a paint layer of 40 µm of thickness. The first one is an organic-solvent-based paint applied on a glass substrate (blue curve in Fig. 3). The SR vs time curve exhibits a first plateau at 2000 s, which corresponds to the end of volatile solvent evaporation, or "dry-to-touch" time in the paint industry language. The speckle rate reaches a final plateau at 10 -4 Hz after 22000 s, when the paint is "dry-hard". The orange curve in Fig. 3 shows the drying process of a water-based latex paint applied to a metal substrate. Note the large fluctuations of the speckle rate around 200 s, likely due to the packing process of the colloidal particles contained in the paint during the film formation. This temporally heterogeneous dynamics is strongly reminiscent of that of jammed colloids [START_REF] Cipelletti | Slow dynamics in glassy soft matter[END_REF]. The "dry-to-touch" plateau is reached at 800 s and the "dry-hard" plateau is reached after 5000 s. The third experiment shown in Fig. 3 (red curve) is the drying of a mark left by a commercial pen marker on a glassed paper.

Collectively, the data shown in Fig. 3 illustrate the capability of HORUS® to follow both very slow or rapid drying processes and to capture even quite abrupt changes in the speckle rate evolution, as, e.g., the sharp drop of the SR around t = 10 s for the pen marker ink.

Penetration depth

One question of practical importance is how deep in a drying film HORUS® can detect some motion: in other words, can this apparatus monitor the drying of the material below a superficial layer where a solid skin has been already formed. To address this issue, a simple experiment has been performed. A layer of perfectly dry paint with a known thickness and photon transport mean free path l* [START_REF] Pine | Diffusing Wave Spectroscopy[END_REF] is placed on a transparent glass substrate. Another layer of fresh paint is spread below the glass plate. The purpose of the experiment is to determine the maximum thickness, L, of dry paint beyond which HORUS® does not detect anymore the dynamics in the fresh paint. We find that L depends almost only on the photon transport mean free path l* of the dry paint, especially in the limit L>>l*. In particular, for L/l* > 30 [START_REF]is estimated by comparing measurements of the backscattered flux to results from Monte Carlo simulations of the photon propagation in a random scattering medium[END_REF] the fresh layer is not detected anymore, indicating that its contribution to the inter-image distance becomes smaller than the measurement noise. The penetration depth L is then at least 30 l*, which corresponds to 150 μm to 600 μm for a classical white paint (the l* value for a paint goes from 5 to more than 20 μm).

Influence of concentration, thickness and support

In order to check the impact on the measurement of the film thickness and of the particle content, we have prepared two suspensions of Titanium dioxyde particles in castor oil (viscosity: 1 Pa.s at 21 °C): one with a volume fraction Φ=1 % (l*=300 μm) and one with Φ=0.1 % (l*=3000 μm). Note that since the boiling point of castor oil is around 300 ºC, the product is not drying at all during the experiment: the speckle rate SR is thus stationary. To avoid border effects, a large stripe of width 5 cm is spread on the substrate using a special tool. For the first suspension (Φ=1 %) spread on a metallic substrate, a layer of thickness 1000 μm gives a speckle rate of 7 Hz, 250 μm gives 3.2 Hz and 80 μm gives 1.5 Hz. For the second suspension (Φ=0.1 %) also spread on a metallic substrate, the layer of thickness 1000 μm gives a speckle rate of 0.5 Hz, 250 μm gives 0.4 Hz and 80 μm gives 0.02 Hz. Therefore, decreasing the layer thickness or particle volume fraction reduces the mean number of photon scattering events in the film [START_REF] Weitz | Diffusing Wave Spectroscopy[END_REF] and hence decreases the speckle rate. This example shows that it is mandatory to control carefully the layer thickness when comparing absolute SR's measured for different products.

To check the effect of the substrate color or albedo on the measured SR, we have performed measurements for two different substrates: the black and the white part of a standard paper test chart used in paint industry. The albedo for the wavelength used is almost one for the white part and 0.125 for the black substrate. For the black substrate, the majority of the photons reaching the substrate are absorbed. By contrast, part of the photons reaching the white substrate diffuse in the (static) structure of the substrate and eventually are backscattered through the paint to the detector. The drying process of a layer of thickness 5 μm of a white acrylic paint (l* about 15 μm and L/l*=5) is measured for both substrates. Monte Carlo simulations show that the mean number of backscattered photons is about 3 times higher for the white substrate than for the black one. As a consequence, one expects a speckle rate about 3 times lower for the black substrate than for the white one. Indeed, the SR kinetics measured for the two substrates have the same shape, but the one corresponding to the black substrate is lower by a factor of about 3 with respect to that obtained for the white substrate, as shown in Fig. 4. Therefore, the substrate color or albedo does not affect the shape of the drying curve, an important feature in industrial applications. Fig. 4. Rate of change of the speckle pattern, SR, versus time in a semi logarithmic graph, for the drying of a 75μm layer of an acrylic paint. The blue curve (higher SR) corresponds to a white substrate and the red curve (lower SR) corresponds to a black substrate. There is a ratio of approximately 3 between the absolute magnitudes of the 2 curves, but the shape of SR vs t is insensitive to the substrate color.

Conclusion

We have described and demonstrated an extension of multi-speckle diffusing wave spectroscopy adapted to characterize in a simple way the kinetics of micro-structure dynamics during drying processes. This method allows one to follow the evolution of a drying process in a very reactive way and with a high dynamic range. We call this technique ASII for "Adaptive Speckle Imaging Interferometry", a method based on the efficient quantification of the speckle pattern evolution (via the inter-image distance d 2 ), its characterization through a single number (the speckle rate SR) and an adaptive algorithm that continuously optimizes the acquisition and processing chain with respect to the product dynamics. These new methods are implemented in a novel commercial instrument, called HORUS®, specialized in the non-invasive analysis of the film formation and drying processes analysis.

Fig. 1 .

 1 Fig. 1. The HORUS® setup.

Figure 2

 2 Figure 2 shows three typical examples of normalized inter-image distance curves, together with fits according to Eq. (2) . The first curve to the left (τ c = 1s) was recorded during the drying of a white correction fluid. The intermediate one (τ c = 5s) is from an acrylic white paint, while the slowest drying process (right curve, τ c = 9 s) was measured during the drying of a red marker pen ink on metal. Note that in all cases the data are in excellent agreement with the exponentially saturating growth, Eq. (2).

Fig 2 .

 2 Fig 2. Normalized inter-image distance d 2 /d max versus time for white corrector (blue line), acrylic paint (red line) and marker pen ink (green line). The black lines are fits according to Eq. (2).

Fig. 3 .

 3 Fig. 3. Rate of change of the speckle pattern, SR, versus time in a double logarithmic graph. The fastest-drying curve (left, red) is for a commercial marker pen, the middle one is for a water-based paint (middle, orange) and the longest drying curve if for a organic solvent-based paint (right, blue).

Table 1 .

 1 Computational cost of various correlation tools, including camera offset calibration tool additions or subtractions squares multiplications Needs offset calibration tool additions or subtractions squares multiplications Needs offset calibration

	g 2	2n	0	n	yes
	d 2	n	n	0	no
	d 1	n	0	0	no
	It appears clearly that the distances d 1 or d 2 allow for a signal processing faster
	than that required for the traditional intensity auto-correlation.