All models

NIC NLAIC

A learned image codec with non-local attention modules and a 3D masked convolution context model.

Diffusion and generative · 685 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 (18 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
52.6M
Operations
685
Framework
PyTorch
Recurrent
No
Published
IEEE Transactions on Image Processing 2021 (as 'End-to-End Learnt Image Compression via Non-Local Attention Optimization and Improved Context Modeling')
Authors
Tong Chen, Haojie Liu, Zhan Ma and others
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
m18665
Graph hash
af2b28882c45a56271719acc7ea9f85fd9eeda2422d396113df5f1987fe93798
Skeleton hash
4914ccdb2f89a95138e90d19b7f075a85c65e230c26c52c4372c806c8096bdc7
Architecture hash
fab57aeb94191772e7775cff24f60567919e20f52643de8a89075f5ae311fc70
Diagram SHA-256
14af73ccfb845334a7ceabc7382d5bae146e3402c1f1cae87d56c46dbcdcbbfd
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

NLAIC is a lossy image compression model built on a variational autoencoder with non-local attention modules. Its repository is named NIC. The paper's case against earlier learned codecs is that stacked convolutions work locally with a limited receptive field and that latent features are mostly treated with equal importance.

The codec has a main encoder and decoder for the image, plus a hyperprior encoder and decoder that provide side information about the probability distribution of the quantized latent features. Non-local attention modules are the basic units of both pairs. Each module has a main branch of three residual blocks and a mask branch that applies a non-local network, three more residual blocks, a 1 by 1 convolution and a sigmoid to produce an attention mask. The mask multiplies the main branch's feature maps element-wise, so no extra bits are needed to code it. For entropy coding, a 5 by 5 by 5 masked 3D convolution exploits spatial and cross-channel correlation jointly, and its output is concatenated with the hyperpriors to estimate the conditional statistics of the latent features.

The paper adds quality scaling factors so that one model can adapt its bit rate. On the Kodak dataset it reports BD-Rate reductions of 64.39% against JPEG (4:2:0) and 11.97% against BPG (YCbCr 4:4:4) HM.

Key idea. NLAIC embeds non-local attention modules in the main and hyperprior coders of a variational autoencoder and models latent entropy with a masked 3D convolution joined with hyperpriors.

  • NLAIC
  • NIC
  • neural image compression
  • learned image compression
  • non-local attention
  • Non-local Attention Optimized Deep Image Compression
  • hyperprior
  • 3D masked convolution
  • context modeling
  • variable-rate image compression

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

Cite the paper

@misc{chen2019neuralimagecompressionnonlocal,
      title={Neural Image Compression via Non-Local Attention Optimization and Improved Context Modeling}, 
      author={Tong Chen and Haojie Liu and Zhan Ma and Qiu Shen and Xun Cao and Yao Wang},
      year={2019},
      eprint={1910.06244},
      archivePrefix={arXiv},
      primaryClass={eess.IV},
      doi={https://doi.org/10.1109/TIP.2021.3058615},
      url={https://arxiv.org/abs/1910.06244}, 
}