https://github.com/baldassarrefe/performer-gat-shapenet

Performer vs. Graph Attention Network on ShapeNet with GradCAM explanations.

https://github.com/baldassarrefe/performer-gat-shapenet

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

gradcam graph-attention transformer
Last synced: 9 months ago · JSON representation

Repository

Performer vs. Graph Attention Network on ShapeNet with GradCAM explanations.

Basic Info
  • Host: GitHub
  • Owner: baldassarreFe
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 53.8 MB
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
gradcam graph-attention transformer
Created over 5 years ago · Last pushed over 5 years ago
Metadata Files
Readme

README.md

Performer vs. Graph Attention Networks on ShapeNet

Mini-Project on Graph Networks and Architectures for the Deep Learning Advanced course at KTH, Stockholm (DD2412).

A performer-based architecture and a graph attention network are compared for point cloud classification on the ShapeNet dataset. GradCAM is used to investigate model differences by explaining the most important points for a prediction.

For more information, read the full project report. The report contains a short introduction to performers, graph attention networks and GradCAM, as well as experimental details and results.

Setup

Main dependencies: - numpy, pandas, matplotlib, seaborn - pytorch, torch_geometric - pytorch lightning - fast transformers - weights and biases - jupyter

Dependencies are managed using Conda and Mamba bash bash scripts/environment.sh pip install -e .

ShapeNet data is downloaded to ./data on the first run.

Code Structure

miniproject ├── __init__.py ├── __main__.py Main entrypoint for conf/train/test tasks ├── configuration.py Configuration parsing and management ├── datamodules.py ShapeNet dataset ├── metrics.py Additional lighning metrics ├── models │ ├── __init__.py │ ├── common.py Lightning model wrapper │ ├── performer.py Performer model │ └── graph_attention.py Graph Attention model ├── train.py Training code └── test.py Evaluation code

Commands

Configuration

Trainin configuration is managed using yaml files and command-line overrides. To list the available options and verify a parsed configuration one can run: bash python -m miniproject conf conf/quick.yaml logging.tags='[bbb,ccc]' trainer.max_epochs=2 ```yaml trainer: max_epochs: 2

...

logging: run_name: smart-flounder-of-honeydew tags: - bbb - ccc

...

```

Training

A quick training run can be launched with: bash export CUDA_VISIBLE_DEVICES=0,1 python -m miniproject train conf/quick.yaml other.gpus=2

Hyperparameter sweeps can be launched using the scripts in ./scripts, for example: bash bash scripts/sweep-architecture.sh

Evaluation

Given a model checkpoint, evaluation metrics on the test set can be computed with: bash export CUDA_VISIBLE_DEVICES=0,1 python -m miniproject test path/to/checkpoint

We provide the following checkpoints: - Performer model: runs/miniproject/myrtle-gorilla-of-culture/checkpoints/last.ckpt - Graph Attention model: runs/miniproject/vivacious-honest-lion/checkpoints/last.ckpt

Notebooks

The following notebooks were developed alongside the code. Each notebooks is accompanied by output figures/videos in the corresponding folder. notebooks ├── Data/ShapenetDataset.ipynb Dataset statistics ├── Hyperparameters/Hyperparameters.ipynb Architecture hyperparameter sweep ├── Testing/Results.ipynb Test results and GradCAM explanations └── PytorchHooks.ipynb How to make pytorch hooks work

Owner

  • Name: Federico Baldassarre
  • Login: baldassarreFe
  • Kind: user
  • Location: Stockholm
  • Company: KTH

Passionate about AI, data science, and SW Engineering, BSc in Computer Engineering @unibo Bologna, MSc in Machine Learning + PhD candidate at @KTH Stockholm

GitHub Events

Total
Last Year

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 4
  • Total Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Federico Baldassarre b****e@g****m 4

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

environment.yml pypi
  • ase ==3.20.1
  • configparser ==5.0.1
  • coolname ==1.1.0
  • docker-pycreds ==0.4.0
  • gitdb ==4.0.5
  • gitpython ==3.1.11
  • googledrivedownloader ==0.4
  • h5py ==3.1.0
  • isodate ==0.6.0
  • joblib ==1.0.0
  • llvmlite ==0.35.0
  • networkx ==2.5
  • numba ==0.52.0
  • omegaconf ==2.0.5
  • promise ==2.3
  • psutil ==5.8.0
  • python-louvain ==0.14
  • pytorch-fast-transformers ==0.3.0
  • rdflib ==5.0.0
  • scikit-learn ==0.23.2
  • sentry-sdk ==0.19.5
  • shortuuid ==1.0.1
  • smmap ==3.0.4
  • subprocess32 ==3.5.4
  • threadpoolctl ==2.1.0
  • torch-cluster ==1.5.8
  • torch-geometric ==1.6.3
  • torch-scatter ==2.0.5
  • torch-sparse ==0.6.8
  • torch-spline-conv ==1.2.0
  • wandb ==0.10.12
  • watchdog ==1.0.2