Skip to content

Image classification using Graph Neural Networks (GNNs) with MNIST dataset

License

Notifications You must be signed in to change notification settings

Anton-Cherepkov/gnn-mnist-classification

Repository files navigation

gnn-mnist-classification

Image classification using Graph Neural Networks (GNNs) with MNIST dataset

Description

This repository is the implementation of paper A Graph Neural Network for superpixel image classification by Jianwu Long , Zeran yan and Hongfa chen.

The authors of the paper propose to solve the Image Classification Task using Graph Neural Networks (GNNs).

Creating a graph from an image

In order to use GNNs, each image must be converted into some graph. In this work SLIC algorithm is used for this. This algorithm segments a set of superpixels given an image. Each superpixels is considered as a graph node. Adjacent superpixels are connected with edges.

Dataset

MNIST is used in this repository. Each digit image was converted into 75 superpixels using SLIC algorithm.

Here are some samples for better understanding: Superpixels Superpixels

Results

One may find the experiment logs here: https://wandb.ai/acherepkov/mnist-gnn-classification/runs/dphbxqga.

I also published a tutorial for Google Colab: https://colab.research.google.com/drive/1d29NDjNMQ6I17rxTr8Wo6S-5nH3MGyXX?usp=sharing.

MNIST accuracy
Authors' results 97.11
My results 74.59

Notes:

  • The authors of the paper did not release any code and did not provide hyperparameters details like optimizer, learning rate, schedulers, linear layers sizes;
  • I am not sure whether my readout operation is correct;

The gap between my and authors' metrics may be due to these two facts.

About

Image classification using Graph Neural Networks (GNNs) with MNIST dataset

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published