Skip to content

yuan0038/GraphConvNet

Repository files navigation

GraphConvNet

English | 中文

Create conda environment

conda env create -f ./env_gcnet.yml  
conda activate gcnet

Pretrained models

  • GraphConvNet
Model Params (M) FLOPs (B) Top-1 BaiduDisk URL
GraphConvNet-Ti 7.7 1.3 77.1 BaiduDisk URL
GraphConvNet-S 24.5 4.9 82.0 BaiduDisk URL
  • Pyramid GraphConvNet
Model Params (M) FLOPs (B) Top-1 BaiduDisk URL
Pyramid GraphConvNet-Ti 11.4 1.8 80.5 BaiduDisk URL
Pyramid GraphConvNet-S 29.2 4.9 82.4 BaiduDisk URL

Train & Evaluation

Change parameters in run.sh and then run

source run.sh

Visualization

The visualization code only available to GraphConvNet and ViG

  1. Create a folder named 'ckpt' in './viz_nodes' and download the checkpoints of GraphConvNet-Ti or GraphConvNet-S and put them in './viz_nodes/ckpt'
  2. Open viz_demo.ipnb, and set arguments (arch, etc.)
  3. Run cells

⚠️⚠️⚠️ If you want to visualize ViG, please download the checkpoints I provide here, since I reorganized ViG code and transformed the official checkpoints' state_dict to suit my code.

Demo:

The first row: gradcam heatmaps of GraphConvNet-Ti in 4th, 8th, 12th layers.
The second row: the patch(node) that has the max gradcam value(most discriminative) and its corresponding neighbors in different layers.
The third row: add edges, the pentagram is the most discriminative node.(you can draw edges using tools such as PowerPoint, OmniGraffle..)


CAM Images:

4th Layer 8th Layer 12th Layer
Layer 4 CAM Layer 8 CAM Layer 12 CAM

Center & Neighbors:

4th Layer 8th Layer 12th Layer
Layer 4 Center Neighbors Layer 8 Center Neighbors Layer 12 Center Neighbors

Graph Visualization:

4th Layer 8th Layer 12th Layer
Graph Layer 4 Graph Layer 8 Graph Layer 12

Acknowledgement

This repo partially uses code from vig

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published