Abstract
We address the problem of contour detection via per-pixel classifications of edge point. To facilitate the process, the proposed approach leverages with DenseNet, an efficient implementation of multiscale convolutional neural networks (CNNs), to extract an informative feature vector for each pixel and uses an SVM classifier to accomplish contour detection. The main challenge lies in adapting a pre-trained per-image CNN model for yielding per-pixel image features. We propose to base on the DenseNet architecture to achieve pixelwise fine-tuning and then consider a cost-sensitive strategy to further improve the learning with a small dataset of edge and non-edge image patches. In the experiment of contour detection, we look into the effectiveness of combining per-pixel features from different CNN layers and obtain comparable performances to the state-of-the-art on BSDS500.
Introduction
Contour detection—identifying the boundaries of objects and surfaces—is a foundational task in computer vision. While deep learning has revolutionized image-level classification, adapting these models for pixel-level tasks presents two major hurdles: architecture mismatch and extreme data imbalance. Standard CNNs are designed to produce a single feature vector for an entire image, whereas contour detection requires a high-quality feature vector for every pixel. Furthermore, edge pixels are rare compared to background pixels, making training difficult on smaller, specialized datasets.
Methodology
The proposed CSCNN (Cost-Sensitive CNN) framework addresses these challenges through a multi-stage pipeline designed for dense, multiscale feature extraction and robust classification.
Dense Feature Extraction and Multiscale Integration
To overcome architecture mismatch, the authors utilize an efficient implementation called "DenseNet" to extract feature maps from all five convolutional layers of a pre-trained AlexNet. Because different layers capture varying levels of abstraction—ranging from low-level textures in Conv1 to high-level object parts in Conv5—integrating these features is crucial. All feature maps are upsampled to the original image resolution and concatenated, resulting in a 1376-dimensional feature vector for every pixel.
Cost-Sensitive Fine-Tuning
Standard fine-tuning often fails for pixel-level tasks due to class imbalance. CSCNN utilizes a cost-sensitive strategy to prioritize rare edge pixels. This is achieved either through a biased negative log-likelihood loss function that penalizes mistakes on edge pixels more heavily, or via biased sampling, where edge patches are oversampled during training. The network is fine-tuned specifically on the center pixel of image patches to ensure spatial accuracy.
Classification
The final edge/non-edge decision is made by a linear Support Vector Machine (SVM) trained on the concatenated multiscale features, rather than relying on the CNN's original fully connected layers.
Experimental Results
The model was evaluated on the BSDS500 benchmark, using ImageNet for initial pre-training.
Quantitative Performance
CSCNN achieved state-of-the-art results at the time of publication, with an Optimal Dataset Scale (ODS) of 0.76, an Optimal Image Scale (OIS) of 0.78, and an Average Precision (AP) of 0.80. These metrics outperformed or matched established methods such as Structured Edges and $N^4$-fields.
Key Insights
- Layer Synergy: Mid-level features (Conv2-Conv4) are highly informative, but the combination of all five layers provides the most robust representation, capturing both local texture and global structure.
- Fine-Tuning Nuance: Traditional per-image fine-tuning can degrade performance; focusing the loss calculation strictly on the center pixel of image patches is essential.
- Model Fusion: Ensembling "positive-biased" and "negative-biased" models significantly improves noise filtering and edge recall.
Conclusion
CSCNN demonstrates that pre-trained CNNs can be effectively repurposed for dense pixel-level tasks through multiscale feature fusion and cost-sensitive learning. While the 1376-D feature vector presents a computational challenge, the approach sets a strong precedent for using deep features in contour detection. Future work may explore dimensionality reduction and end-to-end trainable architectures to further optimize efficiency.
Summary updated