# VIG¶

## Abstract¶

Network architecture plays a key role in the deep learning-based computer vision system. The widely-used convolutional neural network and transformer treat the image as a grid or sequence structure, which is not flexible to capture irregular and complex objects. In this paper, we propose to represent the image as a graph structure and introduce a new Vision GNN (ViG) architecture to extract graph-level feature for visual tasks. We first split the image to a number of patches which are viewed as nodes, and construct a graph by connecting the nearest neighbors. Based on the graph representation of images, we build our ViG model to transform and exchange information among all the nodes. ViG consists of two basic modules: Grapher module with graph convolution for aggregating and updating graph information, and FFN module with two linear layers for node feature transformation. Both isotropic and pyramid architectures of ViG are built with different model sizes. Extensive experiments on image recognition and object detection tasks demonstrate the superiority of our ViG architecture. We hope this pioneering study of GNN on general visual tasks will provide useful inspiration and experience for future research.

## Results and models¶

### ImageNet-1k¶

Model

Pretrain

Params(M)

Flops(G)

Top-1 (%)

Top-5 (%)

Config

vig-tiny_3rdparty_in1k*

From scratch

7.18

1.31

74.40

92.34

config

model

vig-small_3rdparty_in1k*

From scratch

22.75

4.54

80.61

95.28

config

model

vig-base_3rdparty_in1k*

From scratch

20.68

17.68

82.64

96.04

config

model

pvig-tiny_3rdparty_in1k*

From scratch

9.46

1.71

78.38

94.38

config

model

pvig-small_3rdparty_in1k*

From scratch

29.02

4.57

82.00

95.97

config

model

pvig-medium_3rdparty_in1k*

From scratch

51.68

8.89

83.12

96.35

config

model

pvig-base_3rdparty_in1k*

From scratch

95.21

16.86

83.59

96.52

config

model

Models with * are converted from the official repo. The config files of these models are only for inference. We don’t ensure these config files’ training accuracy and welcome you to contribute your reproduction results.

## Citation¶

@inproceedings{han2022vig,
title={Vision GNN: An Image is Worth Graph of Nodes},
author={Kai Han and Yunhe Wang and Jianyuan Guo and Yehui Tang and Enhua Wu},
booktitle={NeurIPS},
year={2022}
}