# Transformer with difference convolutional network for lightweight universal boundary detection

**Authors:** Mingchun Li, Yang Liu, Dali Chen, Liangsheng Chen, Shixin Liu

PMC · DOI: 10.1371/journal.pone.0302275 · PLOS ONE · 2024-04-16

## TL;DR

This paper introduces a lightweight model called TDCN that combines convolution and transformers to detect boundaries across different datasets efficiently.

## Contribution

The novel contribution is the development of TDCN, a lightweight boundary detection model using a difference convolutional network and boundary-aware self-attention.

## Key findings

- The TDCN model achieves competitive performance on multiple datasets with fewer parameters.
- A single TDCN model can perform universal boundary detection across different datasets without retraining.

## Abstract

Although deep-learning methods can achieve human-level performance in boundary detection, their improvements mostly rely on larger models and specific datasets, leading to significant computational power consumption. As a fundamental low-level vision task, a single model with fewer parameters to achieve cross-dataset boundary detection merits further investigation. In this study, a lightweight universal boundary detection method was developed based on convolution and a transformer. The network is called a “transformer with difference convolutional network” (TDCN), which implies the introduction of a difference convolutional network rather than a pure transformer. The TDCN structure consists of three parts: convolution, transformer, and head function. First, a convolution network fused with edge operators is used to extract multiscale difference features. These pixel difference features are then fed to the hierarchical transformer as tokens. Considering the intrinsic characteristics of the boundary detection task, a new boundary-aware self-attention structure was designed in the transformer to provide inductive bias. By incorporating the proposed attention loss function, it introduces the direction of the boundary as strongly supervised information to improve the detection ability of the model. Finally, several head functions with multiscale feature inputs were trained using a bidirectional additive strategy. In the experiments, the proposed method achieved competitive performance on multiple public datasets with fewer model parameters. A single model was obtained to realize universal prediction even for different datasets without retraining, demonstrating the effectiveness of the method. The code is available at https://github.com/neulmc/TDCN.

## Full-text entities

- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC11020957/full.md

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/PMC11020957/full.md

## References

69 references — full list in the complete paper: https://tomesphere.com/paper/PMC11020957/full.md

---
Source: https://tomesphere.com/paper/PMC11020957