How sevak-grigoryan/gnn-image-classification works
This repository is an image-classification benchmark comparing nine GNN architectures on confidential Car/Human/Noise images. Its main workflow configures a dataset, converts images to pixel-grid graphs, trains and evaluates models, and saves checkpoints and reports; the README also documents saliency and layer-visualization workflows. The graph preserves the architecture variants and shared utilities. Some model-specific training and visualization implementations were not excerpted, so their connections are shown only where documented.
Main entry points: train.py Generic trainer · directions.py Shared configuration · saliency.py Saliency analysis · data_processing.py Image-to-graph data
Components 19
Data preparation
- Shared configuration
utils/directions.py - Image-to-graph data
utils/data_processing.py
Model architectures
- ChebNet
models/ChebNet/model.py - ChebNetII
models/ChebNet_II/model.py - ChebNetII layer
models/ChebNet_II/Cheb_Layer.py - GAT
models/GAT/model_GAT.py - GCN
models/GCN/model.py - GIN
models/GIN/model_GIN.py - GINE
models/GINE/model.py - GINE-TW
models/GINE_TW/model.py - GraphSAGE
models/GraphSAGE/model.py - Hybrid CNN
models/Hybrid_CNN_GNN/model_CNN.py - Hybrid GNN
models/Hybrid_CNN_GNN/model_GNN.py
Training and evaluation
- Generic trainer
utils/train.py - Parameter summary
utils/count_parameters.py - Checkpoints and reports
Model inspection
- Saliency analysis
models/GCN/saliency.py - GINE-TW layer importance
models/GINE_TW/layer_importance_vis.py
Other components
- Benchmark user
Connections 12
- Benchmark user → Shared configuration: sets configuration
README.md - Shared configuration → Image-to-graph data: configures dataset
utils/data_processing.py - Benchmark user → Generic trainer: runs training
README.md - Generic trainer → Image-to-graph data: loads graphs
utils/train.py - Generic trainer → GCN: trains model
- Generic trainer → Checkpoints and reports: saves results
- ChebNetII → ChebNetII layer: uses layer
models/ChebNet_II/model.py - Benchmark user → Saliency analysis: inspects prediction
README.md - Saliency analysis → GCN: loads model
models/GCN/saliency.py - Benchmark user → GINE-TW layer importance: inspects layers
README.md - GIN → Parameter summary: counts parameters
models/GIN/model_GIN.py - Hybrid GNN → Parameter summary: counts parameters
models/Hybrid_CNN_GNN/model_GNN.py