mmpretrain/configs/vig
szwlh-c c98dc4555c
[Feature] Support VIG Backbone. (#1304)
* 添加vig源文件

* 某些模块修改到mmcls风格

* 修改到mmcls风格

* 修改

* 添加VIG模型及源文件

* update model file

* update model file and config

* change class name and some variable name

* change class name and some variable name

* update

* update

* change nn.BatchNorm to mmcv.cnn.build_norm_layer

* update

* change nn.Seq to mmcls

* change backbone to stage_blocks

* add vig_head

* update

* update config file

* update

* add readme and metafile

* update model-index.yml

* update model file

* rename config file and add docstring

* variable rename

* update readme and metafile

* update readme

* update

* Update VIG backbone implementation and docs.

* Fix configs.

Co-authored-by: mzr1996 <mzr1996@163.com>
2023-01-17 16:55:56 +08:00
..
README.md [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00
metafile.yml [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00
pvig-base_8xb128_in1k.py [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00
pvig-medium_8xb128_in1k.py [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00
pvig-small_8xb128_in1k.py [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00
pvig-tiny_8xb128_in1k.py [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00
vig-base_8xb128_in1k.py [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00
vig-small_8xb128_in1k.py [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00
vig-tiny_8xb128_in1k.py [Feature] Support VIG Backbone. (#1304) 2023-01-17 16:55:56 +08:00

README.md

VIG

Vision GNN: An Image is Worth Graph of Nodes

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 Download
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}
}