Pushing the Boundaries of Boundary Detection using Deep Learning

Iasonas Kokkinos

Introduction

Over the past three years Deep Convolutional Neural Networks (DCNNs) LeCun et al. (1998) have delivered compelling results in high-level vision tasks, such as image classification (Krizhevsky et al., 2013; Sermanet et al., 2014; Simonyan & Zisserman, 2014; Szegedy et al., 2014; Papandreou et al., 2015b) or object detection (Girshick et al., 2014). Recent works have also shown that DCNNs can equally well apply to pixel-level labelling tasks, including semantic segmentation (Long et al., 2014; Chen et al., 2015) or normal estimation (Eigen et al., 2014). A convenient component of such works is that the inherently convolutional nature of DCNNs allows for simple and efficient ‘fully convolutional’ implementations (Sermanet et al., 2014; Eigen et al., 2014; Oquab et al., 2015; Long et al., 2014; Chen et al., 2015).

Our focus on this work is the low-level task of boundary detection, which is one of the cornerstone problems of computer vision. Segmentation can be considered to be an ill-posed problem, and multiple solutions can be considered plausible, depending on the task at hand - for instance when playing chess we think of a checker board in terms of 64 regions, but when carrying it we treat it as a single object. This is reflected in the inconsistency of human segmentations, illustrated in Fig. 1.

As detailed in Arbelaez et al. (2011) we can ‘benchmark’ humans against each other, by comparing every annotator to the ‘committee’ formed by the rest: if a user provides details that no committee member has provided these count as false positives, while if a user misses details provided by a committee member, these count as misses. Aggregating this information over different annotators yields the recall and precision of humans, which are in turn summarized in terms of their f-measure, namely their geometric mean. When evaluated on the test set of Berkeley Segmentation Dataset (BSD) humans have an F-measure of 0.8030.803, which is indicative of the difficulty of the task.

This difficulty may be substantially diminished if we consider segmentation as an intermediate to a specific task, such as object detection; it has been shown for instance in Zhu et al. (2015) that when asking users to provide a label to every region the F-measure of human annotators rapidly increases from 0.8 to 0.9. Still, when considering the segmentation problem in its largest generality, namely as a mid-level task serving detection, tracking, counting, or even grasping and touching, the ambiguity of the labelling most naturally increases.

Despite the inherent difficulty of the problem, progress in boundary detection has been consistently narrowing the gap between human and machine performance, as measured Our system yields a higher F-measure than humans: when using a common threshold for the whole dataset (Optimal Dataset Scale -ODS) our system’s F-measure equals F=0.813F=0.813, while when an oracle sets the threshold per image (Optimal Image Scale -OIS) we obtain F=0.8308F=0.8308.

As in all works following the introduction of human-annotated datasets Konishi et al. (2003); Martin et al. (2004), e.g. Dollar et al. (2006); Arbelaez et al. (2011); Ren (2008); Kokkinos (2010a); Ren & Bo (2012); Dollár & Zitnick (2015), we use machine learning to optimize the performance of our boundary detector. Recent works Bertasius et al. (2015); Kivinen et al. (2014); Hwang & Liu (2015) have shown hat DCNNs yield substantial improvements over flat classifiers; the Holistic Edge Detection approach of Xie & Tu (2015) recently achieved dramatic improvements over the previous state-of-the-art, from an F-measure of 0.750.75 to 0.780.78, while keeping computation efficient, requiring 0.4 seconds on the GPU; additional dataset augmentation yielded an F-measure of 0.790.79.

In this work we make contributions in three fronts: firstly we improve the deep learning algorithms used for boundary detection, secondly we incorporate classical ideas from grouping into the problem and thirdly we exploit our detector to improve the higher-level tasks of semantic segmentation and region proposal generation. We detail these three advances in the following three sections.

HED and DSN training

We start from a brief presentation of the ‘Holistic Edge Detection’ (HED) work of Xie & Tu (2015) as it serves as a starting point for our work. HED uses ‘Deep Supervised Network’ (DSN) Lee et al. (2015) training to fine-tune the VGG network for the task of boundary detection, illustrated in Fig. 2. The principle behind DSN can be loosely understood as classifier stacking adapted to deep learning and turns out to be practically very successful: if a multi-layer architecture is optimized for a given task, one can anticipate better results by informing each layer about the final objective, rather than relying on the final layer to back-propagate the information to its predecessors. This was shown to systematically improve convergence and test performance, both in generic detection tasks Lee et al. (2015) and in particular in the context of boundary detection Xie & Tu (2015).

We consider a multi-layer network, represented in terms of the union of its individual layer parameters, W\mathbf{W}, to which we append a set of per-layer ‘side’ parameters w(1),w(M)\mathbf{w}^{(1)},\ldots\mathbf{w}^{(M)}. These side parameters aim at steering the intermediate layers of the network to extract features that are useful for the classification task even when used on their own.

The objective function of DSN/HED is phrased as:

where lm{l}^{m} are the side-layer losses on the side output of the mm-th layer and αm\alpha_{m} indicates the importance of the different side layer losses - e.g. setting αm=0,m<M\alpha_{m}=0,m<M, which amounts to standard training with a single loss at the top. In HED lm{l}^{m} is a class-balanced cross-entropy loss:

where Eq. 2 Y+,YY_{+},Y_{-} are the positive and negative training sample indices respectively, and β\beta is a design parameter set to mitigate the substantially larger number of negative samples in images. The probabilities in Eq. 2 are obtained in terms of a sigmoidal function operating on the inner product sjm=w(m),fjs_{j}^{m}=\langle\mathbf{w}^{(m)},\mathbf{f}_{j}\rangle between the side layer parameters w(m)\mathbf{w}^{(m)} and the features fj\mathbf{f}_{j} of the DCNN at position jj, P(yj=1X;W,w(m))=σ(sjm)P(y_{j}=1|X;\mathbf{W},\mathbf{w}^{(m)})=\sigma(s_{j}^{m}). In Eq. 3 we rewrite Eq. 2 in a more general form where we sum over the whole image domain and use the ground truth label y^j{\hat{y}_{j}} to indicate which weight and which of the two loss terms is used per pixel jj.

An additional processing step of HED is a late fusion stage where the side outputs are combined into a final classification score. This is very meaningful for the task of boundary detection, as it exploits the multi-scale information extracted by the different processing layers of the DCNN. In particular, denoting by Sm{S}^{m} the field of values predicted by the mm-th side-layer, these are linearly combined into a final score, Sfs=m=1MhmSmS^{fs}=\sum_{m=1}^{M}h_{m}S^{m}; a fusion loss is used to learn the weights h\mathbf{h} by calibrating the relative importance of the different side-layers when forming the final prediction:

The overall objective function of HED is written as follows:

and is optimized using common Stochastic Gradient Descent training with momentum.

Improved deep boundary detection training

Having outlined the HED framework, we now turn to our contributions, consisting in (i) Multiple Instance Learning for boundary detection (ii) Graduated Deep Supervision (iii) Multi-Scale training, as well as introducing external data.

The improvements due to these contributions are summarized in Table. 1, where we report our ODS- and OIS-based F-measures on the BSD test set, alongside with the average precision (AP). We compare to our own HED-type baseline that yields a performance marginally below that of the original HED system of Xie & Tu (2015); the latest system of Xie & Tu (2015) has an improved F-measure of F=0.79F=0.79, due to additional dataset augmentation, which we have not performed yet. We anticipate that this could further boost our already substantially better performance of F=0.813F=0.813. Further comparisons can be found in Table. 2.

The first of our contributions aims at dealing with the inconsistency of human annotations in the BSD, illustrated in Fig. 4. As can be seen, even if the two annotators agree about the semantics (a tiger in water), they may not place the boundaries at a common location. This makes it challenging to define ‘positive’ and ‘negative’ training samples in the vincinity of boundaries.

This problem has already been acknowledged in the literature; for instance Sironi et al. (2015) turn boundary detection into a regression problem, by explicitly manipulating the ground truth to become smoother - which however may come at the cost of localization accuracy. In Xie & Tu (2015) a heuristic that was used was to only consider a pixel as positive if it is annotated consistently by more than three annotators. It is however unclear why other pixels should be labelled as negatives.

Our approach builds on Kokkinos (2010a), where Multiple Instance Learning (MIL) Dietterich et al. (1997) is used to accommodate orientation inconsistencies during the learning of an orientation-sensitive boundary detector. That work was aimed at learning orientation-sensitive classifiers in the presence of orientation ambiguity in the annotations - we take a similar approach in order to deal with positional ambiguity in the annotations while learning a position-sensitive detector.

Standard, ‘single instance’ learning assumes training samples come in feature-label pairs -or, as in HED above, every pixel is either a boundary or not. Instead, MIL takes as a training sample a set of features (‘bag’) and its label. A bag should be labelled positive if at least one of its features is classified as positive, and negative otherwise.

In particular, since human annotations come with some positional uncertainty, the standard evaluation protocol of Martin et al. (2004) allows for some slack in the predicted position of a pixel (a fixed fraction of the image diagonal). One therefore does not need to label every positive pixel as a positive, but rather give a large score to a pixel in its vicinity - and to be more precise, a set of pixels in the line perpendicular to its orientation. This set of pixels forms the bag associated to every positive pixel annotation. A pixel is declared negative if it is not contained in any positive bag.

More specifically, we associate every ground-truth boundary position jj with a set of NjN_{j} positions and an associated feature bag, Xj={Xj,1,,Xj,Nj}\mathcal{X}_{j}=\{X_{j,1},\ldots,X_{j,N_{j}}\}. These positions are estimated by identifying the image positions that (i) lie closer to ii than any other ground-truth pixel and (ii) have a distance below a threshold dd.

For each feature Xj,kX_{j,k} of the jj-th bag our classifier provides a probability pj,kp_{j,k} of it being positive, exactly as described inEq. 2 but now the decision is taken by maximizing over instance probabilities:

The ‘MIL’ column of Table. 1 reports improvements over the baseline obtained by setting the distance, dd to 1; setting d=2d=2 yields similar improvements.

2 Graduated DSN Training

The two terms in the objective function of HED, Eq. 5:

play a complementary role: the first, side-layer, terms force the intermediate layers to be discriminative and also extract some preliminary classification information; the second, fusion-layer, term calibrates the importance of the intermediate classifications delivered by the side-layers.

As discussed in Lee et al. (2015), DSN can be understood as simplifying the associated learning problem in terms of optimization. But once the network parameters are in the right regime, we can discard any simplifications that were required to get us there. This is a strategy used in the classical Graduated Non-Convexity technique Blake & Zisserman (1987), and here we show that it also helps improve DSN when applied to boundary detection.

For this we modify the training objective by associating the ‘side’ term with a temporally decreasing weight while keeping the second term’s weight fixed:

where tt is the current training epoch and TT is the total number of epochs. Our training criterion starts from DSN, where every intermediate layer is trained for classification, and eventually leads to a skip-layer architecture, where the early layers are handled exclusively by the final fusion criterion. By the end the fusion-layer can use the side-layers at will, without the compromises needed to keep the side losses low. The improvements are reported in the G-DSN column of Table. 1.

3 Multi-Resolution Architecture

The authors of HED use ‘Deep Supervised Network’ (DSN) Lee et al. (2015) training to fine-tune the VGG network for the task of boundary detection, illustrated in Fig. 2. However, image boundaries reside in multiple image resolutions Witkin (1983) and it has repeatedly been shown that fusing information from multiple resolutions improves boundary detection, e.g. in Dollár & Zitnick (2015); Arbelaez et al. (2011). Even though the authors of HED use information from multiple scales by fusing the outputs of many layers, multi-resolution detection can still help.

We first observed that simply averaging the results of the network applied to differently scaled versions of the image improved performance substantially, but then turned to a more accurate way of doing the multi-resolution detection. As illustrated in Fig. 2, we consider a DSN-type multi-resolution architecture with tied weights, meaning that layers that operate at different resolutions share weights with each other. Parameter sharing across layers both accelerates convergence and also avoids over-fitting. We initialize the weights from a single-resolution architecture and fine-tune with a smaller set of iterations. In order to capture fine-level boundaries the top-resolution image is an upsampled version of the original - e.g. for a 381×421381\times 421 image from the BSD dataset we use a 577×865577\times 865 upsampled version, from which we compute a three-level pyramid by downsampling by a factor of 2 and 4. The multi-resolution results are fused through an additional fusion layer that combines the fused results of the individual resolutions. The improvements are reported in the S=3S=3 column of Table. 1.

4 Training with external data

Even though HED uses the pre-trained VGG network as initialization, dataset augmentation was reported to give substantial improvements. The authors in Xie & Tu (2015) originally used 32 geometric transformations (16 rotations and flipping) of the 300 images used in the BSD trainval set, resulting in a total of roughly 10000 training images - in a recent version the authors consider two additional transformations are considered, resulting in roughly 30000 training images and pushing performance from F=0.78F=0.78 to F=0.79F=0.79.

We have not used these additional scalings in our experiments due to time constraints, but have considered the use of boundaries from the VOC Context dataset Mottaghi et al. (2014), where all objects and ‘stuff’ present in the scene are manually segmented. Our sole modification to those boundaries has been to label the interiors of houses as ‘don’t care’ regions that are ignored by the loss, since all of the windows, doors, or balconies that are missed by the annotators seemed to us as being legitimate boundaries. We only apply flipping to these images, resulting in roughly 20000 images, which are appended to the 10000 images we had originally used. As can be seen from the ‘VOC’ column of Table. 1, this yields a substantial improvement.

Using grouping in a deep architecture

The combination of the techniques outlined above already help boundary detection outperform humans on the task of boundary detection - but still do not use any grouping information when delivering the probability of having boundaries. The boundary detector only implicitly exploits grouping cues such as closedness or continuity that can often yield improvements in the high-precision regime Zhu et al. (2007); Kokkinos (2010b).

To capture such information we use the Normalized Cuts (NCuts) technique of Shi & Malik (1997); Arbelaez et al. (2011). We treat the image as a weighted graph, where nodes corresponding to pixels and weights correspond to low-level affinity between pixels measured in terms of the Intervening Contour cue Shi & Malik (1997), where the contours are now estimated by our boundary detector. The NCut technique considers a relaxation of the discrete normalized cut optimization problem, which results in a generalized eigenvector problem Shi & Malik (1997):

where DD is the graph degree matrix and WW is the affinity. The solutions to this generalized eigenvector problem can be understood Belkin & Niyogi (2001) as euclidean embeddings of the inter-node distances - so nodes that have similar embeddings are likely to belong together and vice versa.

One of the main impediments to the application of this technique has been computation time, requiring roughly 60 seconds on the CPU for a 321×481321\times 481 image for 10 eigenvectors. Even though accelerations exist, e.g. Cour et al. (2005), we found it simpler to harness the computational power of GPUs and integrate the Damascene system of Catanzaro et al. (2009) with the Caffe deep learning framework. The implementation of Catanzaro et al. (2009) provides a GPU implementation of the Lanczos solver for the generalized eigenvector problem of Eq. 10 that is two orders of magnitude faster than the CPU-based algorithm. When integrated with our boundary detector Damascene yields 8 eigenvectors for a 577×865577\times 865 image in less that 0.2 seconds. It is also straightforward to use a downsampled version of the boundary map to yield further accelerations.

These embeddings can be used for boundary detection in terms of their directional derivatives, in order to provide some ‘global’ evidence for the presence of a boundary, known as the ‘spectral probability of boundary’ cue Arbelaez et al. (2011). In particular, as in Arbelaez et al. (2011), we obtain a new boundary map in terms of a linear combination between the posterior probabilities delivered by our multi-resolution network and the spectral boundary magnitude. This further improves the performance of our detector, yielding an F-measure of 0.813, which is substantially better than our earlier performance of 0.807, and humans, who operate at 0.803. We anticipate that adding a few processing layers can further improve performance.

We summarize the impact of the different steps described above in Fig. 6 - starting from a baseline (that performs slightly worse than the HED system of Xie & Tu (2015) we have introduced a series of changes that resulted in a system that performs boundary detection with an F-measure that exceeds that of humans. When compared to the current state-of-the-art method of Xie & Tu (2015) our method clearly dominates in terms of all typical performance measures, as shown in Table 2.

Indicative qualitative results are included in the supplemental material.

Synergy with semantic segmentation

Having pushed the performance of boundary detection to a good level, we now turn to seeing how it can be explored in the context of the higher level task of semantic segmentation. In an earlier version of this Arxiv report we had considered the combination with object proposals using the system of Krähenbühl & Koltun (2015) and reported large improvements. This was due to an erroneous calculation of the baseline. After fixing the error there are still some improvements, but they are not large enough to be considered substantial.

Since our model is fully-convolutional we can easily combine it with the recent line of works around FCNN-based semantic segmentationLong et al. (2014); Chen et al. (2015); Papandreou et al. (2015a); Zheng et al. (2015). These have delivered excellent results, and in particular the use of the Dense Conditional Random Field (DenseCRF) of Krähenbühl & Koltun (2011) by Chen et al. (2015); Papandreou et al. (2015a); Zheng et al. (2015), has enhanced the discriminative power of FCNNs with local evidence gathered by the image intensity.

Following Chen et al. (2015) we define the CRF distribution as:

where x\bm{x} is the pixel-label assignment and E(x)E(\bm{x}) is the energy function. In Eq. 11 ϕi(xi)=logP(xi)\phi_{i}(x_{i})=-\log P(x_{i}) with P(xi)P(x_{i}) being the CNN-based probability of assigning label jj to pixel ii, and θij(xi,xj)\theta_{ij}(x_{i},x_{j}) is a bilateral filter-like image-based pairwise potential between ii and jj:

The first kernel in Eq. 12 depends on both pixel positions (denoted as pp) and pixel color intensities (denoted as II), while the second kernel only depends on pixel positions - the hyper-parameters σα\sigma_{\alpha}, σβ\sigma_{\beta} and σγ\sigma_{\gamma} control the Gaussian kernels. Mean-field Inference for this form of pairwise terms can be efficiently implemented with high-dimensional filtering Adams et al. (2010).

Our modifications are very simple: firstly, we adapt the multi-resolution architecture outlined in the previous section to semantic segmentation. Using multi-resolution processing with tied-weights and performing late score fusion yielded substantially better results than using a single-resolution network: as shown in Table. 3 when combining the multi-scale network’s output with DenseCRF inference, performance increases from 72.7 (single-scale counterpart of Chen et al. (2015)) or 73.9 (skip-layer multi-scale counterpart of Chen et al. (2015)) to 74.8 (our multi-scale) in mean accuracy.

Secondly, we integrate the boundary information extracted by our detector into the DenseCRF by using the eigenvectors computed by normalized Cuts to augment the RGB color features of Eq. 12, thereby conveying boundary-based proximity into DenseCRF inference. In particular we augment the dimensionality of IiI_{i} in Eq. 12 from 3 to 6, by concatenating the 3 eigenvectors delivered by NCuts with the RGB values. We observe that introducing the Normalized Cut eigenvectors into DenseCRF inference yields a clear improvement over an already high-performing system (from 74.8 to 75.4), while a small additional improvement was obtained we performing graph-cut inference with pairwise terms that depend on the boundary strength (from 75.4 to 75.7). Further improvements can be anticipated though an end-to-end training using the recursive CNN framework of Zheng et al. (2015) as in the currently leading works - we will explore this in future work.

Indicative qualitative results are included in the supplemental material.

Conclusion

We have proposed a method to substantially improve deep learning-based boundary detection performance. Our system is fully integrated in the Caffe framework and operates in less than one second per frame. Its F-measure, as measured on the standard BSD dataset is higher than that of humans.

We anticipate that further improvements can be gained through a joint treatment of other low-level cues, such as symmetry Tsogkas & Kokkinos (2012) or surface orientation, and depth Eigen & Fergus (2014). We also intend to further explore the merit of our detector in the context of high-level tasks, such as object detection and recognition.

Acknowledgements

This work was supported by FP7-RECONFIG and equipment donated by NVIDIA. I thank the authors of Xie & Tu (2015) for inspiration, Alp Guler for illustrations and tables, Kostas Papazafeiropoulos for help with porting Damascene to Caffe, George Papandreou for guidance on Caffe and Pierre-André Savalle for teaching me to handle prototxt files like a professional seduser.

Supplemental Material

We provide below qualitative results on images from the Pascal VOC test set.

References