All models

adabins

Monocular depth network that predicts depth bins adapted to each image with a small transformer.

Depth estimation · 115 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (27 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
85.8K
Operations
115
Framework
PyTorch
Recurrent
No
Published
2021
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m11721
Graph hash
2bced428aecebf6146bd58667f944f1888d8b3c132e7da26153b21e0e8c99d61
Skeleton hash
ec8cb16a9144d36a247d33574c0d423625273d0e784dfd4c7d31fea1a7ee555e
Architecture hash
43002fd34d43a54e8bd1ec93184e816f8fecca0c8acd84d590e11bab8a93272e
Diagram SHA-256
3d9abcdb537dc9d328da668737faba91e17dd533396b4c92cca42d7a49655c28
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

menagerie.classics.ri_vision_a_adabins:build_adabins: build({})

What it is

AdaBins estimates a dense depth map from a single RGB image. It divides the depth range into bins whose centers are estimated separately for each image, so the bins concentrate where that scene's depths fall. The paper's network has two parts: an encoder-decoder built on an EfficientNet B5 encoder with a standard upsampling decoder, and the AdaBins block that estimates the bin widths.

Inside that block a small transformer encoder, which the authors call mini-ViT, reads patch embeddings of the decoded features and outputs a vector of bin widths for the image along with a set of attention maps. A softmax then gives each pixel a score per bin, and the final depth is the linear combination of the bin centers weighted by those scores. Because the output blends the centers and is not the center of the single most likely bin, the depth maps are smooth and avoid discretization artifacts.

The attention comes after the decoder and not at the bottleneck, because the authors found better results when attention is applied to the spatially higher resolution tensors. The paper reports improvements across all metrics for supervised single image depth estimation on NYU and KITTI. The paper's network predicts depth at half the input resolution and bilinearly upsamples the result to full size.

Key idea. AdaBins adds a transformer-based block that divides the depth range into bins with per-image adaptive centers and predicts depth as a linear combination of those centers.

  • AdaBins
  • adaptive bins
  • monocular depth estimation
  • single image depth estimation
  • depth map
  • mini-ViT
  • mViT
  • depth bins

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.