Skip to content

ysjakking/GR-DNN

Repository files navigation

GR-DNN

A demo code for paper 'A Graph Regularized Deep Neural Network (GR-DNN) for Unsupervised Image Representation Learning', which appears in CVPR2017. This project qualitatively shows the learned subspace embedding by projecting them into a 2D subspace.

The code is written in Theano.
The modules are implemented based on the DeepLearning 0.1 documentation (http://deeplearning.net/tutorial/SdA.html).
To use it you will also need: cPickle, scikit-learn, matplotlib and PIL.
Before running the code make sure that you have set floatX to float32 in Theano settings.

To train the model, simply run:

  • python GR-DNN_2D_demo.py

When we first run the code, the Anchor Graph AG_mnist.pkl.gz_30_1000.mat will be created.

This step will create files test_codes_data_model1.mat and test_codes_GRDNN_model1.mat, which contain the 2D code learned by regular stacked DAE and GR-DNN respectively.

Then, to generate the image visualization of the learned 2D subspace and the reconstructed samples, run:

  • python plot_2D.py

The resulting images will be saved in the folder 'result/'.

Reference

If you found this code or our paper useful, please consider citing the following paper:

@inproceedings{GRDNN17,
author = {Shijie Yang, Liang Li, Shuhui Wang, Weigang Zhang, Qingming Huang},
title = {A Graph Regularized Deep Neural Network for Unsupervised Image Representation Learning},
booktitle = {CVPR},
year = {2017}
}

About

A demo code for GR-DNN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages