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.
Graphs are trained on three different datasets and are automatically downloaded by running the corresponding train scripts:
- MNIST (run
python mnist_graph.py
andpython mnist_spatial.py
) - Cifar-10 (run
python cifar_graph.py
andpython cifar_conv2d.py
) - PascalVOC (run
python pascal_graph.py
andpython 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.
Dataset | SLIC | Quickshift |
---|---|---|
MNIST | 97.405 | 98.025 |
Cifar-10 | 74.218 | 75.230 |
Pascal VOC | 54.473 | 54.516 |
To install the required python packages, run:
pip install -r requirements.txt
Install the test requirements
pip install -r requirements_test.txt
and run the test suite:
nosetests --nologcapture
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},
}