rusty1s / embedded_gcnn

Embedded Graph Convolutional Neural Networks (EGCNN) in TensorFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Embedded Graph Convolutional Neural Networks

Build Status Code Coverage Requirements Status Code Climate Code Climate Issues

Neural Network Approach

This is a TensorFlow implementation of my mastersthesis on Graph-based Image Classification (german).

Embedded graph convolutional neural networks (EGCNN) aim to make significant improvements to learning on graphs where nodes are positioned on a twodimensional euclidean plane and thus possess an orientation (like up, down, right and left). As proof, we implemented an image classification on embedded graphs by first segmenting the image into superpixels with the use of SLIC or Quickshift, converting this representation into a graph and inputting these to the neural network.

SlIC and Quickshift Segmentation

Graphs are trained on three different datasets and are automatically downloaded by running the corresponding train scripts:

  • MNIST (run python mnist_graph.py and python mnist_spatial.py)
  • Cifar-10 (run python cifar_graph.py and python cifar_conv2d.py)
  • PascalVOC (run python pascal_graph.py and python pascal_conv2d.py)

This repository also includes layer implementations of alternative approaches such as SGCNN and GCN for graphs and the Fire module of SqueezeNet for images to validate the results.

Results

Dataset SLIC Quickshift
MNIST 97.405 98.025
Cifar-10 74.218 75.230
Pascal VOC 54.473 54.516

Requirements

To install the required python packages, run:

pip install -r requirements.txt

Running tests

Install the test requirements

pip install -r requirements_test.txt

and run the test suite:

nosetests --nologcapture

Cite

Please cite my master thesis if you use this code in your own work:

@mastersthesis{Fey2017,
  title={{Convolutional Neural Networks auf Graphrepr{\"a}sentationen von Bildern}},
  author={Matthias Fey},
  school={Technische Universit{\"a}t Dortmund},
  year={2017},
}

About

Embedded Graph Convolutional Neural Networks (EGCNN) in TensorFlow

License:MIT License


Languages

Language:Jupyter Notebook 92.5%Language:Python 7.5%