Skip to content
Back to skills

Nested Unet Dense Skip Connections

ASecurity

UNet++ dense cross-depth skip connections that propagate deeper decoder features into all shallower decoder levels

  • 61 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 12, 2026
toolspython

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add wenmin-wu/ds-skills --skill nested-unet-dense-skip-connections --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nested Unet Dense Skip Connections?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nested Unet Dense Skip Connections
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wenmin-wu-nested-unet-dense-skip-connections/badge)](https://www.skillsdirectory.com/skills/wenmin-wu-nested-unet-dense-skip-connections)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cv-nested-unet-dense-skip-connections
description: UNet++ dense cross-depth skip connections that propagate deeper decoder features into all shallower decoder levels
---

## Overview

Vanilla U-Net concatenates only one encoder feature into each decoder stage. UNet++ instead upsamples features from each decoder stage multiple times, concatenating them into all shallower decoder levels. This dense pattern gives every decoder output access to multi-scale features at the original resolution, improving segmentation of small and fine-grained structures.

## Quick Start

```python
from keras.layers import Conv2DTranspose, concatenate

# Deepest decoder (level 4)
deconv4 = Conv2DTranspose(filters*16, (3,3), strides=(2,2), padding='same')(convm)
# Upsample deconv4 to shallower levels for cross-depth skips
deconv4_up1 = Conv2DTranspose(filters*16, (3,3), strides=(2,2), padding='same')(deconv4)
deconv4_up2 = Conv2DTranspose(filters*16, (3,3), strides=(2,2), padding='same')(deconv4_up1)
deconv4_up3 = Conv2DTranspose(filters*16, (3,3), strides=(2,2), padding='same')(deconv4_up2)

deconv3 = Conv2DTranspose(filters*8, (3,3), strides=(2,2), padding='same')(uconv4)
deconv3_up1 = Conv2DTranspose(filters*8, (3,3), strides=(2,2), padding='same')(deconv3)
deconv3_up2 = Conv2DTranspose(filters*8, (3,3), strides=(2,2), padding='same')(deconv3_up1)

# Shallower decoders concatenate all upstream upsampled features
uconv3 = concatenate([deconv3, deconv4_up1, conv3])
uconv2 = concatenate([deconv2, deconv3_up1, deconv4_up2, conv2])
uconv1 = concatenate([deconv1, deconv2_up1, deconv3_up2, deconv4_up3, conv1])
```

## Workflow

1. Build encoder and bottleneck as usual
2. For each decoder level, generate the primary upsampled feature
3. Additionally upsample that feature K more times to match shallower resolutions
4. At each shallower decoder level, concatenate: its own upsampled feature + all upsampled-extras from deeper levels + encoder skip
5. Apply conv blocks on the concatenated tensor as in standard U-Net

## Key Decisions

- **vs. plain U-Net**: More parameters and memory, but richer multi-scale context at every resolution.
- **Feature count**: Deeper features get upsampled multiple times — keep channel counts modest to avoid OOM.
- **Deep supervision**: Optionally attach segmentation heads at each decoder level for auxiliary losses.

## References

- [Nested Unet with EfficientNet Encoder](https://www.kaggle.com/code/meaninglesslives/nested-unet-with-efficientnet-encoder)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.