{'fraction_non_alphanumeric': 0.030408323123581514, 'fraction_numerical': 0.010765430115085661, 'mean_word_length': 4.688985374771481, 'pattern_counts': {'":': 0, '<': 2, '<?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}}
Incorporating Near-Infrared Information into Semantic Image Segmentation

Recent progress in computational photography has shown that we can acquire near-infrared (NIR) information in addition to the normal visible (RGB) band, with only slight modifications to standard digital cameras. Due to the proximity of the NIR band to visible radiation, NIR images share many properties with visible images. However, as a result of the material dependent reflection in the NIR part of the spectrum, such images reveal different characteristics of the scene. We investigate how to effectively exploit these differences to improve performance on the semantic image segmentation task. Based on a state-of-the-art segmentation framework and a novel manually segmented image database (both indoor and outdoor scenes) that contain 4-channel images (RGB+NIR), we study how to best incorporate the specific characteristics of the NIR response. We show that adding NIR leads to improved performance for classes that correspond to a specific type of material in both outdoor and indoor scenes. We also discuss the results with respect to the physical properties of the NIR response.


Introduction
In computer vision, semantic image segmentation is the task that assigns a semantic label to every pixel in an image. For example, an outdoor image could be segmented into different regions (i.e., groups of pixels) that correspond to the labels grass, sky, tree, and water (see Figure 1 for an example). Semantic segmentation thus necessitates the joint recognition and localization of several classes of interest, that can be both object classes or background classes. 1 Fig. 1 The semantic segmentation task consists in labeling every pixel of an image as belonging to one of the classes of interest (e.g., : grass, sky, tree, water) or to the background.
Here, we demonstrate that semantic segmentation can be improved with additional near-infrared information.
This task has received a lot of attention over the last decade, and many methods have been proposed to semantically segment RGB images [43,47,31,28,11,21]. Most proposed models combine two components: (i) a local recognition process that identifies the classes and (ii) a regularization process that groups the pixels into semantic regions, often using contour information. Promising results have been obtained over a broad range of categories and for a large variety of scenes, but the problem is far from being solved. Segmentation algorithms tend to fail in the presence of a cluttered background or distractor objects, as well as when the objects to be segmented are composed of several colors or patterns. Figure 2-a shows instances of the cup class that are difficult to segment. Because of surface color variations, even for classes with a consistent color, such as vegetation, relying solely on RGB-based features can be insufficient as the color can drastically vary under different lighting conditions. All these difficulties challenge both components of the segmentation models. The recognition part that learns an appearance model of categories based solely on RGB values has issues with objects where both the color and the texture significantly vary within the object classes, which is the case for most man-made objects. Concerning the regularization part, object contours can be easily confused with strong edges originating from texture patterns on the object, background clutters or any distracting regions.
One way to overcome these issues is to incorporate additional information within the segmentation process. It was shown for example in [9] that adding depth information when available (e.g., obtained with stereo cameras or using range sensor data) can significantly improve segmentation results. Other methods have considered multi-spectral data to enhance segmentation [2]. However, these methods require costly and specific acquisition equipment.
In this paper, we consider additional information that can be obtained from a standard digital camera: the near-infrared part of the spectrum that is captured by consumer camera sensors. We study this near-infrared channel in addition to RGB images in the context of semantic image segmentation. This paper extends the work presented in [38] by studying a wider range of scene types, and a deeper analysis of the results. We use the same state-of-the-art segmentation framework as [38]. To evaluate the proposed approach, first we contribute with a dataset that extends the ones of [5,38] with pixel-level annotation of 770 registered RGB and NIR image pairs 1 for 23 semantic classes. In order to discuss the advantages that NIR brings to each class of material, the dataset is split into indoor and outdoor scenes and the performance is reported on each subset separately. The outdoor dataset contains 10 different classes, and the indoor dataset contains 13 classes.
Our second contribution is an in-depth study of the results obtained by our proposed model. We extended a state-of-the-art segmentation framework with different strategies for incorporating the NIR channel that improve over conventional RGB-only segmentation results. This framework is based on a conditional random field (CRF), where we exploit different ways to combine the visible and NIR information in the recognition part and in the regularization part of the model. Based on the segmentation results, the paper fully discusses the accuracy obtained for each class of material, together with success and failure cases, and puts them in perspective with the material characteristics of the NIR radiation. In particular, we show that the overall improvement is due to a large improvement for certain classes whose response in the NIR domain is particularly discriminant.
The rest of this article is organized as follows. Section 2 reviews the relevant literature on NIR imaging while Section 3 discusses different approaches to semantic segmentation. Section 4 describes our semantic image segmentation system. The experimental setup and evaluation procedure are explained in Section 5 and ex-1 This annotated dataset is available at http://ivrg.epfl.ch/research/infrared/dataset perimental results are exposed and discussed in Section 6 and 7. Section 8 concludes the paper.
2 Near-infrared (NIR) 2.1 NIR properties and their relevance to segmentation NIR spectra are influenced by the chemical and physical structure of different material classes, which makes NIR suitable for material classification [6]. Figure 3 shows that for a given material, regardless of the object color in the visible part (400-700 nm), the reflection in the NIR band (700-1100 nm) remains the same.
[37] shows that each class of material has an intrinsic behavior in the near-infrared (NIR) part of the spectrum. The material dependency of NIR reflection has been proven to be useful in low-level segmentation [39] and produces segments that correspond to changes of material [39]. Our previous works show that NIR could enhance scene classification [36] and semantic segmentation as well [38].
The properties of infrared images [30] have been used by the remote sensing [51,48] and military [20] communities for many years to detect and classify natural and/or man-made objects. However, in this paper we approach semantic image segmentation from a different point of view. Unlike most remote sensing applications that use true hyper-spectral capture with several bands in the NIR part and the IR part of the spectrum, our framework only uses one single channel that integrates all NIR radiation. The single NIR channel can be captured by the standard sensor of any digital camera. Moreover, in remote sensing and military applications, the focus is mostly on aerial photography, forgery, and human detection, while this work tackles semantic segmentation in everyday photography.
As already mentioned earlier, state-of-the-art semantic segmentation techniques still encounter some difficulties in both recognizing different classes and detecting the actual boundary of semantic objects. Such shortcomings are mostly due to four reasons : appear- Fig. 3 Spectral reflectance of 20 different fabrics. The reflection of these samples is different in the visible part of the spectrum, which for a given camera and lighting condition leads to different color values. However, as these samples belong to the same material, their spectral reflectance in the NIR range is not significantly different.
ance variation, cluttered backgrounds, illumination differences, and hazy atmosphere in outdoor scenes. Learning a color-based appearance model of classes based only on RGB values is very challenging due to the appearance variation of a single object, or the varying lighting conditions. As another situation, the segmentation of cloud and mountain classes often fail in a hazy atmosphere (see Figure 2-b for illustration). Texture has shown to be a powerful cue for semantic segmentation [11,33]. However, texture can be confused with color patterns and other immediate surface impurities, as surface reflectance in the visible part of the spectrum that is not intrinsic to the corresponding object material (see Figure 2-c for illustration).
Light in the near-infrared range has physical properties intrinsically different than in the visible range. The intensity values in NIR images are more consistent across a single material and consequently across a given class region. For instance, vegetation is consistently very bright, and sky and water are very absorbent in the NIR band. Furthermore, a large number of colorants and dyes are transparent to NIR. Thus, material-intrinsic texture properties are easier to capture in this part of the spectrum.
Because of all these reasons, NIR is a great complement to the visible information and improves the labeling of the semantic classes that correspond to specific materials or textures. For instance, the class cup is often made of very specific classes of material (porcelain, ceramic or plastic) and regardless of the pattern and color of the object, NIR has a unique response for each of these materials (see Figure 2-a for illustration).
Another interesting aspect is the fact that atmospheric haze is transparent to NIR, hence the borders of objects in hazy weather conditions is better defined in NIR images.

NIR imaging
NIR imaging is used in different areas of science.
NIR spectroscopy (NIRS) is employed for material identification and forgery detection. NIRS is a nondestructive technique used to study the interactions between incident light and material surfaces; it is based on the assumption that surface reflection in the NIR band proves to be critical for detection of different classes of material [6,24]. The need for little or no preparation of samples has made it one of the most used techniques for material identification in industry [6].
In remote sensing, multi-spectral images are captured in order to detect, characterize and monitor different regions, such as vegetation and soil. In such applications, region reflection in both the visible and IR parts of the spectrum is required [51,48]. It has been shown that both offer valuable information providing bio-signatures for different classes of vegetation and soil properties [1].
In both remote sensing and NIR spectroscopy, hyperspectral data is needed to accurately identify material classes. However, these capturing devices are highly technical and expensive, hence they are of limited usefulness outside laboratory conditions.
The most common sensors in consumer digital cameras, i.e., CMOS, is made of silicon and thus is intrinsically sensitive to wavelengths from roughly 350 nm to 1100 nm. The material employed to create the color filter array (CFA) is also transparent to the NIR. Figure 4 shows the transmittance of the CFA filters of a NikonD90 with the hot mirror (NIR-blocking filter that is normally put by manufacturer) removed. Hence, if the NIR-blocking filter is omitted from the camera, the sensor has the capability to capture both NIR and visible bands; no modification of the sensor is required as shown in [14].
Currently, two main methods are used to jointly capture the NIR and visible images. The first approach uses two cameras with a beam splitter [50]. In the second approach, a camera with NIR and visible filters is used to sequentially capture two images that are then registered [14]. As a third method, Kermani et. al. designed a new color filter array that could be used for demosaicing the "full-spectrum" raw data into a visible and NIR pair [35]. Although all the images we used in our experiments have been acquired with the second approach, any of these acquisition methods can be used with the proposed approach.
Several recent works have used such 4-dimensional images -RGB and NIR channels -for standard computer graphics and computer vision tasks. In image enhancement, we can mention haze removal [41], skin enhancement [44], dark-flash photography [22], videoconferencing [15], and real-time 3-dimensional depth imaging [40]. In computer vision, the intrinsic properties of material classes in NIR images make this information a relevant choice in image scene classification [5,36] or material-based segmentation [39].

Semantic Segmentation
Semantic image segmentation is the computer vision task that consists in partitioning an image into different semantic regions, where each region corresponds to a class. It can be seen as a pixel-level categorization task.
The appearance of the classes of interest are learnt during a training step from images annotated at the pixel-level. Learnt models are based on appearance descriptors that are often based on Gaussian derivative filter outputs or texture descriptors such as SIFT [29], or based on colors statistics [46,8]. Appearance descriptors are extracted at the pixel-level [43,42] or statistics are extracted at the patch level, on a (multi-scale) grid of patches [11,47,28], or at detected interest point locations [49]. The location of the pixels is sometimes used as a cue as well [43,42]. In general, low-level features are used to build higher-level representations, such as texton forests [42], bags-of-visual-words (BoVW) [28,47], or Fisher vectors [11,16] that are fed into a classifier to predict class labels at pixel level [42], patch level [28,11] or region level [49].
The local appearance models are often combined with a local label consistency component that adds constraints on neighboring pixels [43,28] or within an image region (super-pixel) [11,16]. Sometimes, global con-sistency also takes into account the whole image [43,28] and/or the context of the object class [25]. State-of-theart semantic segmentation methods typically integrate these components into a unified probabilistic framework such as a conditional random field (CRF) [47,18,26,17,28,16], or these components are learnt independently and used at different stages of a sequential pipeline [49,11].
In this paper, we consider the former and use a CRF model that combines local appearance predictions with local consistency of labels. Label consistency is enforced by a set of pairwise constraints between neighboring pixels. We used a standard contrast-sensitive Potts model. Note that more complex CRF models were proposed that incorporate object co-occurrences [25] or object detectors [27], use fully connected CRF models [21], hierarchical associative CRFs [26] or higher order potentials [18,17]. The aim of our paper is to evaluate the potential advantage of the NIR information in a standard semantic image segmentation model, so we used a very standard CRF model and we do not consider these more complex models. We believe that the conclusions of this paper would extend to these models and that this constitutes potential extensions of the presented framework. Comparing these methods is beyond the score of this paper.

Our CRF framework
We represent the label of a pixel i with a random variable X i taking a value from the set of labels L = {l 1 , . . . , l n }, n being the number of classes. Let X be the set of random variables representing the labeling of an image and X = x an actual (i.e., possible) labeling. The posterior distribution P (X = x | D), given the observation D over all possible labeling of a CRF, is a Gibbs distribution and can be written as: where ψ c (x c ) are potential functions over the variables x c = {x i , i ∈ c} and Z is a normalization factor. In this equation, a clique c defines a set of random variables X c ⊆ X that depend on each other, and C is the set of all cliques. Please note that the observation D represents the actual pixel values in the image. Accordingly, the Gibbs energy is defined as Using these notations, the goal of semantic segmentation is to find the most probable labeling x * , which is defined as the maximum a posteriori (MAP) labeling: where N is the number of pixels. In our CRF model, the energy function E is composed of two terms, a unary potential E un and a pairwise potential E pair 2 . The unary term is responsible for the recognition part of the model and the pairwise term encourages neighboring pixels to share the same label. We assign a weight λ to E pair that models the tradeoff between recognition and spatial regularization. More formally, where ν corresponds to the set of all image pixels and ε the set of all edges connecting the pixels i, j ∈ ν. Usually, 4-neighborhood or 8-neighborhood systems are considered. We used the former. Usually, these models consider unary and pairwise potentials that are built using information extracted from RGB images. In the following, we show how to extend both the unary and the pairwise potential by integrating the NIR channel in the above energy term.

The unary term
The unary part of the CRF (E un ) is defined as the negative log likelihood of a label being assigned to pixel i. It can be computed from the local appearance model for each class.
Although the CRF uses pixels, the recognition could be made at several levels. We could describe pixels directly, or work with patches extracted following a regular grid. To build our local appearance model we follow [11] and use patch-level Fisher Vector (FV) representations. FVs [32] encode higher order statistics than the visual word counts in the Bag-of-Visual-Words (BoVW) representation [10]. We chose to use FV as they outperform the BoVW (as shown in [11]), and as they are highly competitive for object classification even with linear classifiers [7]. However, any similar representation could also have been used for the study.
In a nutshell, our approach is the following: We extract overlapping image patches on a multi-scale grid and describe them with low-level descriptors. The dimension of these features is reduced using principal component analysis (PCA) before building a Gaussian mixture model (GMM) based visual codebook that allows to transform the low-level representation of each patch into a FV (see [32,11] for more details). For each class, we train a patch-level linear classifier using strongly labeled training images (i.e., segmented images), and the classification score of each patch in a test image is transformed into a probability. The class posterior probabilities at the pixel level are obtained as a weighted average of the patch posteriors, where the weights are given by the distance of the pixel to the center of the patch as in [11].
Several types of features can be used to describe patches. The most popular descriptors for RGB (=visible) images are color and texture features. Here, we consider the popular SIFT [29] feature to describe the local texture and local color statistics [8] to describe the color. The latter, referred to as COL, encodes the mean and standard deviation of the intensity values in each image channel for each cell of a 4x4 grid covering the patch (same cells as in the case of SIF T ). In our visible-baseline approach, these color statistics are computed on the R,G and B channels, hence we will denote their concatenation by COL rgb .
SIFT encodes local texture with a set of histograms of oriented gradients computed on a 4x4 grid covering the patch. In general, it is computed on the patch extracted from the luma channel of the visible RGB image that can be approximated by L = 0, 299R + 0, 587G + 0, 114B. It will therefore be denoted by SIF T l .
SIFT is sometimes extended by computing histograms of oriented gradients in each color channel and by concatenating the obtained histograms. This descriptor is called multi-spectral SIFT and denoted by SIF T rgb .
When an additional NIR channel is considered, we can also extract the corresponding color and SIFT descriptors. We will denote the additional ones by COL n and SIF T n , respectively. We can concatenate them with features extracted from the standard RGB image leading to e.g., COL rgbn or SIF T rgbn .
Due to the high correlation of RGB and NIR channels, [5] shows that incorporating NIR information in a de-correlated space improves the performance of image classification. We make use of the same idea, decorrelating the 4-dimensional RGB-NIR color vector by performing Principal Component Analysis (PCA). In this alternative PCA space, we consider COL p1234 and SIF T p1234 (see [5,36] for more details).
In Section 6, we compare and discuss the performance of using each of these descriptors in the unary term of our energy function.

Pairwise term
The pairwise term E pair of our CRF takes the form of a contrast sensitive Potts model: , as in the work of [34]. This potential penalizes disagreeing labels in neighboring pixels, and the penalty is lower where the image intensity changes. In this way, borders between predicted regions are encouraged to follow image edges.
In general, the pixel values q i in the Potts model correspond to the RGB values of pixels. When this is the case we denote the pairwise term by V IS, as it corresponds to the visible baseline that uses only the RGB image. However, when NIR information is available, we can use the NIR channel in the pairwise potential. In this case, q i corresponds to the intensity of the pixel in the NIR channel, and the potential will be denoted by N IR. Finally, when the Potts model uses the intensity values from the 4 channels (q i is 4 dimensional), the pairwise potential is denoted by V IS + N IR.

Model inference
Given the CRF model defined in Eq (3), we want to find the most probable labeling (x*), i.e., the labeling that maximizes the posterior distribution or that minimizes our energy function. This is a NP-hard problem for many practical multi-label computer vision problems and approximation algorithms have to be used. For our model, inference is carried out by the multi-label graphoptimization library of [4,3,19], using α-expansion. αexpansion reduces the multi-label optimization problem to a sequence of binary optimization problems. Given a labeling x, each pixel i makes a binary decision to keep its current label or switch to label α (α ∈ L).

Proposed datasets
In order to evaluate and better understand the gain of incorporating NIR information in different parts of our CRF model, we labeled a scene segmentation dataset of 770 images with pixel level annotation considering 23 semantic classes. Although this dataset is smaller than the most recent visible only segmentation datasets, it constitutes the very first test-bed for RGB+NIR semantic segmentation, and already allows to conduct a deep study, as shown in our experiments. It is composed of two types of scenes: indoor and outdoor scenes. We conducted separate experiments on both. Examples of 4-channel images for these two datasets and their annotations can be seen in Figure 5 and Figure 6.
The outdoor dataset was built from the 477 RGB and NIR image pairs released by [5]. From these images, we discarded 107 images due to mis-registration and ambiguity of classes. The rest of the images were manually labeled at the pixel level, thus yielding pixel segmentation masks. The labels were selected from 10 predefined classes 3 : building (179), cloud (161), grass (159), road (108), rock (80), sky (174), snow (41), soil (78), tree (274), and water (79). We followed the MSRC dataset's annotation style [43], i.e., each pixel is labeled as belonging to one of the above classes or to a void class. The latter corresponds to pixels whose class is not defined as part of our classes of interest, or that are too ambiguous to be labeled. Similarly to [43], in this outdoor dataset, we discarded the pixels of the void class from the evaluation.
The indoor dataset consists of 400 images that we specifically gathered in various office environments using sequential capture and registration, as done in [5]. The registration between RGB and NIR images was conducted with the algorithm proposed in [45]. For these images we selected 13 object categories: screen (206), These objects were manually segmented and annotated at the pixel level, as in the PASCAL VOC Challenge [13], where all pixels not belonging to the predefined classes are considered as background. Contrary to the void class, the segmentation performance of the predicted background is evaluated.
The background class, however, is rather diverse. Therefore, instead of modeling it explicitly, we first predict only the other classes and then we employ a minimum level of confidence threshold on the predicted classification scores. If the maximum posterior probability is smaller than a single universal threshold (in our case T = 0.5), the pixel is labeled as background, otherwise it is labeled with the class label for which the maximum was found. In other words, in our CRF model, P (X = Background | D) = T .

Experimental details
We extract 32 × 32 patches on a regular grid (every 10 pixels), at 5 different scales (the first 5 terms of the geometric series with ratio √ 2) in a given channel. Hence the coarsest scale corresponds to re-sizing the patch by a factor of 4 ( √ 2 4 ) and the finest corresponds to the original patch ( Low-level descriptors are computed for each patch. We consider two different descriptors: SIFT descriptors [29] and local color statistics [8], denoted by SIF T and COL respectively. To compute these features in any of the considered channels (initial channels R, G, B, N , luma L or alternative color spaces P 1 , P 2 , P 3 , P 4 ), we proceed as follows. A single SIF T is 128-dimensional while COL is 32-dimensional, because we consider the mean and the variance of the color intensity using a 4x4 grid on the patch. Then we concatenate the relevant features, hence COL rgb will be 96 dimensional, COL rgbn will be 128 dimensional, and SIF T rgbn will be 512 dimensional. For a fair comparison, PCA projection is used to reduce all features to 96 dimensions. In the projected space a GMM-based visual codebook of 128 Gaussians is built and used to transform each low-level feature into a Fisher Vector (FV) representation [32]. By using the same PCA projection and the same codebook size, the FV representation of all descriptors share the same dimension.
Sparse Logistic Regression (SLR) [23] is used for the classification of the patches and the output is a probability obtained from 1 1+exp(−s k ) , where s k , k ∈ L are the classification scores of the FVs. The class probabilities of each pixel P (X i = k | D) are then computed as a weighted average of the patch posteriors as described in Section 4.1.

Evaluation procedure
In all our experiments, we randomly split the dataset into 5 sets of images (5 folds) and define 5 sets of experiments accordingly. For each experiment, one fold is used as validation set, one is used as the testing set and the remaining images are used for training the model. Results (i.e., predicted segmentation maps) for the 5 testfolds are grouped all together and evaluated at once, thus producing a single score for the entire dataset.
To compare the segmentation results of different methods and parameters, we use both region-based and contour-based measures as they were shown to be complementary [12]. We detail all the measures that we use below.
Region-based accuracies are generally based on the confusion matrix C that is computed on an aggregation of predictions (accumulating the predictions) for the whole dataset. Sometimes they can be computed at the image-level which allows to compute statistical significance tests [12]. Such confusion matrix is obtained by: where S I gt is the ground-truth segmentation map of the image I, S I pr the predicted segmentation map and |.| is the number of elements in the set. Hence C kl (the element on the row k and column l of matrix C) represents the number of pixels with ground truth class label k ∈ L, which are predicted with the label l ∈ L.
Denoting by G k = l C kl , the total number of ground-truth pixels labeled with k, and by P l = k C kl the total number of predicted pixels labeled with l, we can define the following evaluation measures: • Overall Pixel Accuracy (OA) measures the ratio of correctly labeled pixels: OA = ln k=l1 C kk ln k=l1 G k • Per Class Accuracy (CA) measures the ratio of correctly labeled pixels for each class and then averages over all classes: • The Jaccard Index (JI) measures the intersection over the union of the labeled segments. This measure is computed by dividing the diagonal value C kk (true positives) by the sum of all false positives and all false negatives for a given class k ∈ L: Note that OA and CA correspond to the measures used in general to compare segmentation results on the MSRC dataset [43], whereas JI is the measure used in the PASCAL VOC Segmentation Challenge [13].
The trimap accuracy (TrimapAcc) evaluates segmentation accuracy around boundaries [18]. The idea of this measure is to build a narrow band around each contour and to compute pixel accuracies OA, thus evaluating only the pixels within the given band. As a single band gives only partial evaluation, the size of this band r is varied and the overall accuracy values (denoted here by T (r)) is plotted as a curve.
Tests of statistical significance. To examine if our results are statistically different, we also compute a paired t-test on the results per image. In comparing the classification rate of two strategies A and B, the null hypothesis H 0 is that the results obtained by A and B are independent random samples from a normal distributions with an equal mean. The paired t-test computes the probability, p-value, of the hypothesis H 0 . A typical value for rejecting the hypothesis that the scores for different representations come from the same population is p − value < 0.05. In such cases, we can say that the two methods generating the respective mean results are significantly different.

Experimental results
In Section 4, we have described different ways to integrate NIR information into our segmentation framework. In this section, we investigate and compare these different options through a set of experiments. First, we consider only the recognition part (i.e., only the unary term) of our model and compare different descriptors and combinations of visible and NIR based features. The study for the regularization part (adding the pairwise energy term) is conducted only for the best performing recognition models.

Recognition component
To compare the recognition ability of the different descriptors, we produce a semantic segmentation by assigning pixels to their most likely label with given the observation D. This is equivalent to the full model Eq (3) when λ = 0.
For each pixel, the label corresponding to the highest score is retained, yielding a predicted segmentation map. In the case of the indoor dataset, this score is further compared to the threshold T (in our case we used 0.5) and if the highest score is below this threshold, the pixel is assigned to the background class.
The accuracy of the predicted segmentations is then evaluated with the different region-based accuracy measures described in Section 5.3. Note that for these experiments there is no regularization term enforcing the region boundaries to follow image contours, so we do not use contour based evaluation measures.
In Table 1 (upper part), we show the segmentation results obtained with region-based accuracy measures for different local descriptors. From these tables we can observe that the accuracy of the recognition using COL features is significantly higher when NIR descriptors are also considered with those of the RGB image (COL rgbn , COL p1234 ), compared to the visible only scenario (COL rgb ). Similarly, combining visible and NIR features, SIF T rgbn and SIF T p1234 outperform SIF T rgb . SIF T n performs similarly to SIF T l , leading to slightly better performance in outdoor environments, and slightly worse for indoor ones. The reason might be that, in the NIR image, material-intrinsic texture properties are captured, which might be insufficient to describe the appearance of our objects in the indoor dataset. For most classes in the outdoor dataset, however, this appearance seems to be better captured in NIR than in the L channel.
In both cases, the best single descriptor results are obtained with multi-spectral SIFT, when both the visible and NIR images are considered. Note that these features incorporate both texture (explicitly) but also color (implicitly, considering the SIFT in multiple channels). Another way to combine color and texture is by early or late fusion of COL and SIF T . As [36] clearly showed that the late fusion of these features outperforms early fusion for image categorization; here we do not consider the latter. The results of late fusion between different COL and SIF T features are shown in the lower part of Table 1. Note that COL rgb + SIF T l corresponds to our visible baseline for the recognition part 4 . Comparing the results of late fusion of COL and SIF T to the multi-spectral SIFT, we can observe the following: In the case of the outdoor dataset, the late fusion of COL and SIF T clearly outperforms the multispectral SIFT, whereas this is not true in the case of the indoor dataset where the two strategies yield similar results. The main reason could be that color (RGB) in the case of outdoor scenes is much more important than in indoor scenes where most objects have different colors that are not specific to a given class. This observation is confirmed by the low performance of COL rgb compared to the SIF T l in the case of indoor dataset; whereas for the outdoor dataset COL rgb significantly outperforms SIF T l , thus showing how important the color is for predicting the appearance of these scene classes (e.g., sky, grass, snow, etc.).
Although the best strategy seems to be scene type dependent, COL rgbn + SIF T n yields close to best results in both cases.

Full CRF model
For these experiments, we consider the most promising recognition models, both for visible only and for the visible+NIR images, and we apply the full CRF model with regularization based on the RGB image (V IS), on the NIR information (N IR) and on both (V IS + N IR). We used a fixed weight parameter λ = 5 for the regularization part (see Eq (3)) in all our experiments.
Results are shown in Table 2. First, we can see that for all the descriptors, the quality of semantic segmentation consistently increases when we consider both visible and NIR channels (V IS + N IR) in the pairwise potential, compared to using only visible or only NIR. Second, as expected, the regularization term (from any of the three strategies) improves the segmentation results obtained for any recognition model compared to the segmentation without regularization (λ = 0, presented in Table 1). Finally, the ranking between the models with different descriptors is similar with or without regularization, given a regularization model (e.g., V IS or V IS + N IR). This is again not surprising, as we use the same regularization term that is independent of the feature used in the recognition part. Again COL rgbn + SIF T n and COL p1234 + SIF T n lead to the best performances in the case of the outdoor dataset, and SIF T rgbn performs best in the case of the indoor dataset, COL rgbn + SIF T n being second best. Compared to the visible-only baselines COL rgb + SIF T l or SIF T rgb with visible image-based regularization (V IS), they are significantly better and statistically different at the 95% confidence level according to the paired t-test applied to the score distributions.
For these experiments, we are mainly interested in the gain we obtain when comparing the V IS or N IRbased regularization with the V IS + N IR-based regularization. Considering region-based evaluation measures, we can see only slight improvements even if the paired t-test often shows significant differences between the corresponding score distributions. Therefore, to better evaluate the gain obtained by combining the N IR

Method
Outdoor Indoor Descriptor Pairwise  Table 2 Results for the full CRF model for the outdoor and the indoor datasets using regularization based on the RGB image (V IS), on the NIR information (NIR) and on both (V IS + N IR).
and V IS channels in the regularization, we also evaluate some of these results with contour based measures. We apply the trimap accuracy evaluation of [18] (overall pixel accuracy in the neighborhood of object boundaries) and we show the results as a function of the boundary size in Figures 7 and 8. From these results, we can first notice the importance of the regularization. In both cases, any of the potentials that we use as regularizer leads to a significant improvement (statistically different at the 95% confidence level according to the paired t-test) on the results obtained by recognition alone (N O, for no pairwise). Comparing different edge potentials, we can see that, in outdoor scenes, the visible image leads to better segmentation than NIR image alone 5 . Fixing the band r at 5 pixels and running the t-test, we found that all T (5) results are statistically different at a 95% confidence level.
In order to show also some qualitative comparisons, Figure 16 shows a few segmentation results obtained with the visible baseline and the best visible + NIR setting. A visual inspection of these results allows to observe the positive qualitative influence of incorporating NIR information in the segmentation model.

Class-based analyses and discussion
This section takes a deep dive into some of the results presented in the previous section in order to visualize, analyze and compare class-by-class results. We focus our analysis on the segmentation results obtained with the best visible baseline (COL rgb + SIF T l for the outdoor dataset and SIF T rgb for the indoor dataset, with visible-only pairwise) and the best RGB+NIR integrated strategy (COL p1234 + SIF T n for the outdoor dataset and SIF T rgbn for the indoor dataset, with VIS + NIR pairwise).
We first show confusion matrices between the classes in Table 3 and Table 4. We also show qualitative results in Figure 9, Figure 10, Figure 11, Figure 12, Figure 13, Figure 14, Figure 15 and Figure 16, that we all discuss in detail below.
In general, in both datasets, we observe that borders are more precisely detected when NIR information is incorporated in the pairwise potential. This can be explained by the material dependency of NIR responses that might reduce the influence of wrong edges due to clutter, or might result in more contrasted edges between classes. This information, used in the regularization part of our model, helps better aligning borders between regions with the material change, as we can see in the examples of the Figure 9. We now analyze in depth the different classes, and discuss the datasets individually. Fig. 7 The TrimapAcc plots with different pairwise potentials using COL p1234 + SIF Tn (top-for the outdoor dataset) respectively SIF T rgbn (bottom-for the indoor dataset) as unary potential.

Outdoor scenes
First we discuss the results obtained for the outdoor dataset. This dataset contains mostly what is usually referred as "stuff", e.g., background classes that are difficult to count. Based on Table 3 results, we can make the following observations. Natural materials. First we discuss the relations between tree, grass and soil. Looking at the yellow boxes in Table 3, we observe the following. Tree and grass are more confused in NIR because they consist of the same material and have roughly the same texture. Grass and soil are less confused in NIR. The reason could be that the pigment in vegetation (Chlorophyll) is very reflective in the NIR part of the spectrum, whereas soil has a lower reflectance in this part that makes it appear very differently in the NIR representation of the scene. Soil and tree get more confused when NIR information is incorporated into our model. This can be explained by the fact that the wooden part of the tree has almost the same pixel values as soil, thus incorporating the COL descriptor in the NIR part of the spectrum could be a source of confusion.
Rock and grass get more confused in the absence of NIR information (see the red boxes in Table 3). Chlorophyll in grass is very reflective and discriminative in NIR images and rock is relatively more absorbent. Due to such material dependency of NIR images, incorporating this information into our model decreases the confusion of these two classes.
Water. Water has a mirror reflection in RGB images, so the reflection of close-by trees in water makes the COL rgb for the water class very close to COL rgb for tree. In NIR images, however, water is very absorbent and appears very dark, hence it is confused less with other classes of material. See Figure 10 for an illustration. In other words, even if in the RGB image, due to the reflection, the color or even the texture of the related region in the water lead to confusion with the reflected class (tree, sky, far away mountains), water has Table 3 Outdoor dataset. Left, confusion matrix of COL p1234 + SIF Tn and visible+NIR pairwise. Right, confusion matrix for the best visible scenario ( COL rgb + SIF T l with visible-only pairwise). Values on the diagonal of the confusion matrices correspond to the individual class accuracies.

RGB
NIR RGB-only results RGB+NIR results Fig. 9 Examples from both outdoor and indoor datasets. Note that the material dependency of NIR images results helps both in recognition and a more accurate detection of object boundaries.
a unique appearance in the NIR leading to significantly improved recognition, compared to visible baseline (see the magenta boxes in Table 3 and the class accuracy of the water class on the diagonal).
Haze. Finally, the benefit of using the NIR channel in the presence of haze can be observed particularly in the case of sky, tree and rock classes, the latter often representing mountains. As stated by Rayleigh's law, the intensity of light scattered from very small particles (< λ/10) is inversely proportional to the fourth power of the wavelength λ (i.e., ∝ 1/λ 4 ) [14]. Particles in the air (haze) satisfy this condition and are therefore scattering more in the short-wavelength range of the spectrum. Thus, when images are captured in the NIR part of the spectrum, atmospheric haze is less visible and the sky becomes darker (see Figure 11). The "haze transparency" characteristic of NIR images results in RGB NIR COL rgb + SIF T l COL pc1234 + SIF Tn Fig. 10 In the visible only scenario, the class water is often confused with tree. The main reason is that the reflection of close-by trees or the presence of vegetation in the water make the color of the water very similar to the one from trees.

RGB NIR
COL rgb + SIF T l COL pc1234 + SIF Tn Fig. 11 Examples from the outdoor dataset. Note the better classification and recognition of clouds and sky when NIR information is incorporated.
sharper images for distant objects. In particular, vegetation at a distance in the visible image is smoothed and bluish, which can affect the performance of texture and color features in the classification task. The sharp and haze-free appearance of vegetation in NIR images helps with classification and leads to better segmentation (see also the diagonal in Table 3).

Indoor scenes
The indoor dataset mostly contains categories that are related to object classes, also referred as "things". From the results of Table 4 we can make the following observations.  Color distractors. The class screen is confused with colorful classes such as clothing item, handbag, and flowerpot, in the absence of NIR information (see the orange boxes in Table 4). Visible images of class screen contain many colorful patches (presence of colorful pictures on the screen), however, the appearance of this class is consistently the same in NIR images. As we can see in Figure 12 the content displayed on the screen is not visible anymore in the NIR image and hence incorporating this information yields to better recognition accuracy.
Fabric. Clothing item is confused with handbag in the visible-only scenario (see the red boxes in Table 4), mainly because such classes appear to look very similar (both in color values and texture measures). As these two classes are mostly made of different material (clothing item is mostly made of natural fabrics such as cotton or wool, or synthetic fabrics such as polyester or nylon, whereas handbag is made of suede or artificial suede, which are types of leather with a napped finish), they look significantly different in NIR images. See Figure 13 for an illustration.
Man-made objects In the proposed scenario, cellphone is generally confused with the background class. In the visible only scenario, this class is more confused with keyboard as well as background. The low performance of our framework for this class is mostly due to the fact that the number of samples in this class is very low, so the classifier did not have enough training samples to learn from. A fewer number of training samples is also a factor for poor and unreliable performance for the cup, can, and bottle classes. Surprisingly, the Office-phone class is significantly confused with the class handbag in the visible only scenario. However, when we add information from the NIR channel, this confusion significantly drops as shown in the red boxes in Table 4 due to the material differences of these classes, that is reliably captured by the NIR channel.
Vegetation. Incorporating NIR information in the segmentation task significantly improves the result of conventional visible-only scenario in the case of flowerpot because the very distinctive appearance of vegetation in NIR images helps the classifier to correctly recognize the class and detect the boundaries more accurately (see Figure 14 for illustration). The often higher contrast between this class and the background makes

RGB NIR
COL rgb + SIF T l COL pc1234 + SIF Tn Fig. 15 The material dependency characteristics of NIR images helps to distinguish more accurately between the classes of material with the same intrinsic color. Higher contrast in the NIR images in the sky makes SIF Tn a more discriminative feature in distinguishing between sky and water.
it easy for the CRF model to more accurately detect the boundaries of this class.

Summary
Summarizing, we can say that classes such as sky, grass, water and cloud in the outdoor dataset are better recognized by their intrinsic color. Capturing texture in a one-channel image and fusing it with the color information improves the results, mostly by distinguishing between grass and tree, or sky and water, where color is less discriminative. Figure 15 shows that incorporating material-dependent NIR images in the decorrelated PCA space for the COL descriptor and fusing it with SIF T features on the NIR image help to recognize such confusing classes.
By contrast, in the indoor scenes, most of the classes are man-made, and often are of different colors such as cloths or handbags. Hence, the color is less distinctive for recognizing the classes. This can explain why COL features perform poorly compared to SIFT and similarly why multi-spectral SIFT outperforms the late fusion of COL and SIF T features. Figure 12 shows examples where incorporating COL gives poor results in the recognition of colorful classes. There, texture is more intrinsic to the class, therefore multi-spectral-SIFT (SIF T rgbn ) outperforms the late fusion of COL and SIF T .

Conclusion
In this paper our aim was to explore the idea that NIR information, captured from an ordinary digital camera, could be useful in semantic segmentation.
Therefore, we proposed to formulate the segmentation problem by using a CRF model, and we studied ways to incorporate the NIR cue in the recognition part and in the regularization part of our model. Considering the characteristics of NIR images, we have defined color and SIFT features on different combinations of the RGB and NIR channels.
To evaluate this framework, we have introduced a novel database of outdoor and indoor scene images, annotated at the pixel level, with 10 categories in the outdoor and 13 categories in the indoor scenes.
Through an extensive set of experiments, we have shown that integrating NIR as additional information, along with conventional RGB images indeed improves the segmentation results. We systematically studied the reasons for this improvement by taking into consideration the material characteristics and properties of the categories in the NIR wavelength range. In particular, the overall improvement is due to a large improvement for certain classes whose response in the NIR domain is particularly discriminant, such as water, sky or screen.