# DeNISE: Deep Networks for Improved Segmentation Edges

Sander Jyhne, Jørgen Åsbu Jacobsen, Morten Goodwin, Per-Arne Andersen

► To cite this version:

Sander Jyhne, Jørgen Åsbu Jacobsen, Morten Goodwin, Per-Arne Andersen. DeNISE: Deep Networks for Improved Segmentation Edges. 19th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2023, León, Spain. pp.81-89, 10.1007/978-3-031-34111-3_8 hal-05449804

HAL Id: hal-05449804

https://inria.hal.science/hal-05449804v1

Submitted on 9 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
<figure><img src="image_3.png" /></figure>

# DeNISE: Deep Networks for Improved Segmentation Edges

Sander Jyhne(✉), Jørgen Åsbu Jacobsen, Morten Goodwin, and Per-Arne Andersen

Department of ICT, University of Agder, Grimstad, Norway
sander.jyhne@uia.no

**Abstract.** This paper presents Deep Networks for Improved Segmentation Edges (DeNISE), a novel data enhancement technique using edge detection and segmentation models to improve the boundary quality of segmentation masks. DeNISE utilizes the inherent differences in two sequential deep neural architectures to improve the accuracy of the predicted segmentation edge. DeNISE applies to all types of neural networks and is not trained end-to-end, allowing rapid experiments to discover which models complement each other. We test and apply DeNISE for building segmentation in aerial images. Aerial images are known for difficult conditions as they have a low resolution with optical noise, such as reflections, shadows, and visual obstructions. Overall the paper demonstrates the potential for DeNISE. Using the technique, we improve the baseline results with a building IoU of 78.9%.

**Keywords:** Remote Sensing · Deep Learning · Image Segmentation

## 1 Introduction

Building segmentation is a prominent area of research in computer vision. A common problem for building segmentation is the quality and edge sharpness of the segmentation masks. Therefore, using predicted segmentation masks is limited to applications that do not rely on precise delineations of buildings. The precision of the current methods allows the detection of new or demolished buildings, thereby being valuable for change detection and disaster impact assessment applications. However, improved precision is necessary for applications with strict data quality requirements, such as map creation.

Public authorities, like the Norwegian Mapping Authority (NMA) [15], use building data for map creation, policy-making, and city management [5]. NMA maintains a national building object database with essential information about each building. Furthermore, they update the database by manually measuring and annotating buildings in aerial imagery. Hence, using deep learning to annotate buildings reduces the cost and effort required to maintain an up-to-date database. With precise building masks, it is possible to incorporate building
annotations into the building objects with significantly less human intervention
than currently possible. Additionally, precise mask boundaries provide the basis
for determining the building footprint, detecting ridgelines, and even creating
3D models of buildings.

Producing accurate segmentation masks is challenging because the training
data derives from real-world data with varying quality. Optical factors, such as
shadows, reflections, and perspectives, are present in aerial imagery and nega-
tively influence the model’s predictions. In addition, visibility is a challenge, as
trees, powerlines, and other structures can block the view [13]. Despite many
advancements in semantic segmentation, none of the models produce a segmen-
tation boundary that satisfies map production standards.

However, many applications can successfully leverage building segmentation,
including urban planning, disaster damage estimation, and change detection.
The main reason is that the aforementioned applications do not require the
same precision as map production. As a result, there is a research gap in the
accuracy of the segmentation masks. Additionally, the models must generalize
to various building types, shapes, and surrounding nature, ranging from urban
cities to remote settlements.

To improve the precision of the predicted edges, we propose DeNISE, a tech-
nique highlighting buildings using an edge detection or segmentation network
known as Edge-DeNISE and Seg-DeNISE, respectively. DeNISE combines the
output prediction probabilities with the original images, directly modifying them
or adding the predictions as a fourth image channel. A second network receives
the modified images as input for training and prediction.

The rest of the paper is structured as follows. Section 2 discusses related work to the proposed technique. Section 3 introduces the DeNISE method. Section 4 presents the results and ablation studies. Finally, Sect. 5 concludes the work and proposes paths for future work in enhanced segmentation boundaries.

2 Related Work

## 2.1 Semantic Segmentation

Semantic segmentation is finding and assigning the correct class to each pixel
in an image, resulting in annotations of each class. Deep learning-based image
segmentation research advances rapidly, with several new and novel architec-
tures each year. One such architecture is the encoder-decoder architecture, which
is proven successful for image segmentation tasks. U-Net [12] is a well-known
segmentation model using the encoder-decoder architecture with skip connec-
tions to retain the resolution through encoding and decoding. However, the skip
connections are not able to retain all details. The HRNet [16] is an architec-
ture mitigating this issue, a slightly different approach where three parallel and
interconnected convolution streams maintain the high-resolution representations.
However, the retained resolution comes at the cost of being more computationally
expensive. Another popular approach for segmentation is dilated convolutions,
which are used in other state-of-the-art segmentation models. Dilated convolutions are convolutions with holes between the convolution points, which allows for a larger convolution filter with reduced computational cost. DeeplabV3+ [1] acquires state-of-the-art results on several tasks using this technique.

In recent years, the Transformer architecture has become popular for computer vision tasks. The authors of [3] propose the vision transformer leveraging attention mechanisms instead of convolutions. However, the attention mechanism of the transformer models is computationally expensive, limiting the resolution of the input image. The authors of [10] introduce a shifted windows (SwinT) approach, reducing computation. The shifted windows lower the scale of self-attention by limiting it to non-overlapping local windows while still allowing cross-window attention, enabling global pixel context. Furthermore, in [9], the authors propose a new transformer model building on SwinT to perform detection and segmentation in the same model, achieving state-of-the-art results.

## 2.2 Edge Detection

Edge detection is the task of precisely delineating objects in an image. Deep-learning-based techniques are currently dominating the field, with several different methods available. One of the most famous is HED [17], which uses a trimmed VGG16 backbone to generate multi-level features. Each layer produces a side output that is evaluated and backpropagated during training. A recent technique is the Bi-Directional Cascade Network (BDCN) [6]. The authors argue that using the same supervision for all network layers is not optimal due to the different scales in each layer. They solve it by focusing shallow layers on details, while deep layers focus on object-level boundaries. However, BDCN struggles to detect crisp edge maps free of localization ambiguity due to the mixing phenomenon of CNNs. In 2021, [7] introduces two novel modules; a tracing loss for feature unmixing and a fusion block for side mixing and aggregation of side edges. The modules can be paired with other edge detection models, such as BDCN, increasing the performance.

## 2.3 Aerial Image Segmentation

A common approach for aerial image segmentation is applying state-of-the-art segmentation models and training them to segment buildings, roads, or other objects. Among them, [11,18], and [19] have all used a U-Net architecture with relatively good results. Other approaches modify existing architectures to extract specific object features. [4] propose a technique to improve the segmentation masks of roads by utilizing edge detection. The model segments the images and passes them to an edge detection network with the encoded image. As a result, the edge detection module relies on the performance of the segmentation network. Additionally, the model is complex, and changing the edge detection part is not easy. Similarly, [8] also approaches the problem using two stages in the model. However, they utilize two segmentation networks in a two-scheme method using a novel boundary loss and a USIM module. The predictions of
the first network are combined with the original image in the USIM module and passed through the second network. The method improves upon using one segmentation network. The complexity of the model makes it difficult to swap the existing models and causes the training to be resource-intensive. Lastly, they display the improvements of their method using older models that are not state-of-the-art.

## 3 Deep Networks for Improved Segmentation Edges (DeNISE)

The primary objective of DeNISE is to improve the boundary quality of segmentation masks for buildings compared to standalone segmentation models. Figure 1 depicts a high-level overview of DeNISE.

Both DeNISE approaches use the same structure, combining the strengths of two different neural networks to improve the precision of predicted edges. Because the architecture decouples both models, the user can easily swap the first and second neural networks with other models. The ability to quickly try different models allows rapid testing to find complementary models.

We propose two DeNISE approaches: (1) Seg-DeNISE, which uses two segmentation networks, and (2) Edge-DeNISE, using an edge detection network in conjunction with a segmentation network. In both approaches, the first model performs inference on the original training data, then combines the predictions with the data and uses the combination for training and inference in the second model.

<figure><img src="image_4.png" /><figcaption>**Fig. 1.** A visual representation of DeNISE illustrating the process of combining the predictions of a neural network with the original image data in three steps. (1) A segmentation or edge detection model trains on the unenhanced dataset. (2) DeNISE generates training data by enhancing the original data with the predictions from the first network. (3) The second network uses the enhanced dataset for training and inference. The branches in the figure represent a choice between available methods at the current step.</figcaption></figure>
## 3.1 Seg-DeNISE

The first segmentation network in Seg-DeNISE receives an input image and outputs the class probabilities. Seg-DeNISE can use the probabilities in two ways: they can be concatenated with the original input or merged into the image while retaining the original three channels. The merging consists of four steps to create the enhanced data. (1) Threshold the probabilities from the first neural network. We set all gradients equal to or greater than 0.5 to 1 and the rest to 0. (2) The thresholded predictions are dilated 15 pixels in each direction to ensure the mask covers the entire building. (3) All predictions are clipped values between 0.5 and 1.0. This step is crucial to include the background information when multiplying the prediction gradients with the original image. Additionally, clipping the gradients allow the second segmentation to find buildings that the first model missed. (4) The dilated and clipped predictions are multiplied by the original input image. The result shown in Fig. 2 is an image where all dilated building masks keep the original brightness while the rest is set to 50% brightness.

<figure><img src="image_5.png" /><figcaption>**Fig. 2.** An example of the enhanced data from 3-channel Seg-DeNISE, showing the dilated region surrounding the buildings.</figcaption></figure>

## 3.2 Edge-DeNISE

The edge detection network in Edge-DeNISE receives an input image and predicts the corresponding building edge gradients. We use the predicted gradients in two ways. The gradients can be concatenated with the original input or merged into the image while retaining the three channels. The merging process for Edge-DeNISE is similar to Seg-DeNISE, using two steps. (1) The predicted gradients are thresholded and clipped between 0.5 and 1.0, preserving the background
information. (2) The clipped gradients are multiplied with the original input image, keeping the original brightness on the predicted building edges while setting the rest of the image to 50% brightness.

## 3.3 NMA Dataset

We use a private dataset named NMA dataset for the experiments. The dataset consists of orthophotos and ground truth masks for buildings in Norway. The orthophotos are created using a Digital Terrain Model (DTM), which depicts the height of the terrain in a given area. All points in orthophotos created using a DTM are slightly skewed. As a result, the ground truth masks and buildings depicted in the orthophotos do not perfectly align. The dataset is divided into training, validation, and test splits with 22 892, 2861, and 2862 images, respectively.

# 4 Results

We evaluate Seg-DeNISE and Egde-DeNISE on the NMA dataset. For all experiments, we use three different segmentation models, and an edge detection model, namely Hierarchical Multi-Scale Attention (HMSA) [14], DeeplabV3+ (DL3) [1], U-Net [12], and CATS-BDCN (CATS) [7], respectively. For all experiments, the models train for 20 epochs with a batch size of 8 and a learning rate of 1e-4.

Furthermore, Seg-DeNISE always uses DL3 as the first segmentation network in Seg-DeNISE and evaluates using all models as the second segmentation network. Edge-DeNISE uses CATS as the first network and, similarly to Seg-DeNISE, evaluates using all segmentation models as the second network. None of the experiments utilize pre-trained encoders, mainly due to the lack of pre-trained encoders for 4-channel data, making a fair comparison difficult. For the evaluation of experiments, we use Intersection-over-Union (IoU) and Boundary IoU (BIoU) [2], an IoU measure focusing on the predicted segmentation edges.

## 4.1 Baseline

We run experiments with all segmentation models as a standalone network, creating a baseline for comparison. Table 1 displays the baseline evaluation results, establishing the superiority of the HMSA model, followed by DL3 and U-Net.

## 4.2 Seg-DeNISE

Table 1 presents the results for Seg-DeNISE, revealing subpar evaluation scores where U-Net is the only model that improves upon the baseline. The evaluation results suggest that a relatively large gap in performance between the first and second segmentation models may negatively influence the accuracy of the predictions. Additionally, the evaluation scores indicate that the second segmentation network cannot correct the mistakes of the first network. Lastly, comparing the results for 3 and 4 channels, a slight trend in performance is present, where 3 channels have the best evaluation scores by a small margin.
<table><caption>**Table 1.** Evaluation results on the NMA dataset for all experiments. The results show DeNISE increasing the IoU and BioU measures for the U-Net and DL3 models. However, it does not outperform the HMSA baseline.</caption><thead><tr><th>Model</th><th>Dataset</th><th>Loss</th><th>Method</th><th>IoU</th><th>BIOU</th><th>Source</th></tr></thead><tbody><tr><td>U-Net (Baseline)</td><td>NMA</td><td>RMI</td><td>Standalone</td><td>0.7657</td><td>0.6279</td><td>[12]</td></tr><tr><td>U-Net</td><td>NMA</td><td>RMI</td><td>Seg-DeNISE (3-channels)</td><td>0.7685</td><td>0.6343</td><td>Ours</td></tr><tr><td>U-Net</td><td>NMA</td><td>RMI</td><td>Seg-DeNISE (4-channels)</td><td>0.7730</td><td>0.6416</td><td>Ours</td></tr><tr><td><strong>U-Net</strong></td><td><strong>NMA</strong></td><td><strong>RMI</strong></td><td><strong>Edge-DeNISE (3-channels)</strong></td><td><strong>0.7742</strong></td><td><strong>0.6445</strong></td><td><strong>Ours</strong></td></tr><tr><td>U-Net</td><td>NMA</td><td>RMI</td><td>Edge-DeNISE (4-channels)</td><td>0.7739</td><td>0.6480</td><td>Ours</td></tr><tr><td>DL3 (Baseline)</td><td>NMA</td><td>RMI</td><td>Standalone</td><td>0.7850</td><td>0.6586</td><td>[1]</td></tr><tr><td>DL3</td><td>NMA</td><td>RMI</td><td>Seg-DeNISE (3-channels)</td><td>0.7802</td><td>0.6535</td><td>Ours</td></tr><tr><td>DL3</td><td>NMA</td><td>RMI</td><td>Seg-DeNISE (4-channels)</td><td>0.7778</td><td>0.6492</td><td>Ours</td></tr><tr><td>DL3</td><td>NMA</td><td>RMI</td><td>Edge-DeNISE (3-channels)</td><td>0.7882</td><td>0.6658</td><td>Ours</td></tr><tr><td><strong>DL3</strong></td><td><strong>NMA</strong></td><td><strong>RMI</strong></td><td><strong>Edge-DeNISE (4-channels)</strong></td><td><strong>0.7890</strong></td><td><strong>0.6691</strong></td><td><strong>Ours</strong></td></tr><tr><td><strong>HMSA (Baseline)</strong></td><td><strong>NMA</strong></td><td><strong>RMI</strong></td><td><strong>Standalone</strong></td><td><strong>0.8291</strong></td><td><strong>0.7284</strong></td><td>[14]</td></tr><tr><td>HMSA</td><td>NMA</td><td>RMI</td><td>Seg-DeNISE (3-channels)</td><td>0.8103</td><td>0.7003</td><td>Ours</td></tr><tr><td>HMSA</td><td>NMA</td><td>RMI</td><td>Seg-DeNISE (4-channels)</td><td>0.7997</td><td>0.6860</td><td>Ours</td></tr><tr><td>HMSA</td><td>NMA</td><td>RMI</td><td>Edge-DeNISE (3-channels)</td><td>0.8076</td><td>0.6968</td><td>Ours</td></tr><tr><td>HMSA</td><td>NMA</td><td>RMI</td><td>Edge-DeNISE (4-channels)</td><td>0.8057</td><td>0.6975</td><td>Ours</td></tr></tbody></table>

## 4.3 Edge-DeNISE

Table 1 reveals promising evaluation scores for Edge-DeNISE, as U-Net and DL3 improve upon the baselines. The results indicate that the edge detection network's performance relative to the segmentation network's is crucial for improving the results. Furthermore, the results suggest that the predictions from CATS for HMSA introduce noise instead of enhancing the data, negatively impacting the results. Dissimilar to Seg-DeNISE, the Boundary IoU scores for Edge-DeNISE slightly favor 4 channels compared to 3.

## 5 Conclusion

This paper proposes DeNISE, a data enhancement technique that uses either a segmentation (Seg-DeNISE) or an edge detection (Edge-DeNISE) network to enhance the original data using their predictions. Subsequently, a secondary segmentation network uses the enhanced data for training and inference, improving the precision of predicted segmentation masks. Our results for Seg-DeNISE show inconsistent performance, indicating that the first segmentation network can negatively or positively impact Seg-DeNISE results. However, Edge-DeNISE yields promising results and improves upon the baseline results for two out of three models. The results suggest that further advancement of edge detection literature will greatly benefit Edge-DeNISE.
## 5.1 Future Work

This paper proposes a new approach for improving the edges of the predicted segmentation masks. The results advocate further investigation into using neural networks to enhance the training data for a second neural network. Several new but potential directions for DeNISE need further research.

- Using an object detection model as the first network.

- Explore other combinations of segmentation and edge detection models for DeNISE.

- Improving the edge detection literature to further improve Edge-DeNISE.

- Training two segmentation models end-to-end, where the latent space from the first model is merged with the latent space of the second model.

- Reversing Edge-DeNISE by having the segmentation network first and edge detection last.

## References

1. Chen, L.-C., Zhu, Y., Papandreou, G., Schroff, F., Adam, H.: Encoder-decoder with atrous separable convolution for semantic image segmentation. In: Ferrari, V., Hebert, M., Sminchisescu, C., Weiss, Y. (eds.) ECCV 2018. LNCS, vol. 11211, pp. 833–851. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-01234-2_49

2. Cheng, B., Girshick, R., Dollar, P., Berg, A.C., Kirillov, A.: Boundary IoU: improving Object-Centric Image Segmentation Evaluation (2021). https://bowenc0221.github.io/boundary-iou

3. Dosovitskiy, A., et al.: An image is worth 16 × 16 words: transformers for image recognition at scale. In: Proceedings of the 9th International Conference on Learning Representations (ICLR), pp. 1–21 (10 2021). https://doi.org/10.48550/arxiv.2010.11929, https://arxiv.org/abs/2010.11929v2

4. Ghandorh, H., Boulila, W., Masood, S., Koubaa, A., Ahmed, F., Ahmad, J.: Semantic segmentation and edge detection—approach to road detection in very high resolution satellite images. Remote Sens. 14(3), 613 (2022). https://doi.org/10.3390/RS14030613

5. Grecea, C., Bălă, A., Herban, S.: Cadastral requirements for urban administration, key component for an efficient town planning. J. Environ. Prot. Ecol. 14, 363–371 (2013)

6. He, J., Zhang, S., Yang, M., Shan, Y., Huang, T.: Bi-Directional Cascade Network for Perceptual Edge Detection (2019). https://www.pkuvmc.com/dataset.html

7. Huan, L., Xue, N., Zheng, X., He, W., Gong, J., Xia, G.S.: Unmixing convolutional features for crisp edge detection. IEEE Trans. Pattern Anal. Mach. Intell. (2021). https://doi.org/10.1109/TPAMI.2021.3084197

8. Lee, K., Kim, J.H., Lee, H., Park, J., Choi, J.P., Hwang, J.Y.: Boundary-oriented binary building segmentation model with two scheme learning for aerial images. IEEE Trans. Geosci. Remote Sens. 60, 1–17 (2022). https://doi.org/10.1109/TGRS.2021.3089623

9. Li, F., et al.: Mask DINO: Towards A Unified Transformer-based Framework for Object Detection and Segmentation (6 2022). https://doi.org/10.48550/arxiv.2206.02777, https://arxiv.org/abs/2206.02777v1
10. Liu, Z., et al.: Swin Transformer V2: Scaling Up Capacity and Resolution (2022). https://github.com/microsoft/Swin-

11. Pan, Z., Xu, J., Guo, Y., Hu, Y., Wang, G.: Deep learning segmentation and classification for urban village using a worldview satellite image based on U-Net. Remote Sens. **12**(10), 1574 (2020). https://doi.org/10.3390/RS12101574

12. Ronneberger, O., Fischer, P., Brox, T.: U-Net: convolutional networks for biomedical image segmentation. In: Navab, N., Hornegger, J., Wells, W.M., Frangi, A.F. (eds.) MICCAI 2015. LNCS, vol. 9351, pp. 234–241. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-24574-4_28

13. Schlosser, A.D., Szabó, G., Bertalan, L., Varga, Z., Enyedi, P., Szabó, S.: Building extraction using orthophotos and dense point cloud derived from visual band aerial imagery based on machine learning and segmentation. Remote Sens. **12**(15), 2397 (2020). https://doi.org/10.3390/RS12152397

14. Tao, A., Sapra, K., Catanzaro, B.: Hierarchical Multi-Scale Attention for Semantic Segmentation. CoRR abs/2005.10821 (2020), https://arxiv.org/abs/2005.10821

15. The Norwegian Mapping Authority: The Norwegian Mapping Authority (9 2022)

16. Wang, J., et al.: Deep high-resolution representation learning for visual recognition. IEEE Trans. Pattern Anal. Mach. Intell. **43**(10), 3349–3364 (2021). https://doi.org/10.1109/TPAMI.2020.2983686

17. Xie, S., Tu, Z.: Holistically-Nested Edge Detection (2015)

18. Zhang, Z., Liu, Q., Wang, Y.: Road extraction by deep residual U-Net. IEEE Geosci. Remote Sens. Lett. **15**(5), 749–753 (2018). https://doi.org/10.1109/LGRS.2018.2802944

19. Zhao, X., et al.: Use of unmanned aerial vehicle imagery and deep learning UNet to extract rice lodging. Sensors **19**(18), 3859 (2019). https://doi.org/10.3390/S19183859