This repo aims to construct a radio galaxy (RG) morphology generator by training a residual convolutional autoencoder (RCAE), and simulate new RG samples by feeding randomly generated features into the decoder subnet. The Gaussian mixture models are estimated for generating the new feature vectors.
In summary, we provide classes for the RCAE network construction as well as some utilities for image preprocessing, network saving and restoration, and etc. Detailed instruction and usage please refer to the code files. Here we list the single python based scripts,
- Bottleneck_en.py and Bottleneck_de.py: Classes for bottlenecks in the encoder and decoder;
- Block.py: A class for blocks in the residual convolutional network, which is a box hosting multiple bottlenecks;
- utils.py: Auxiliary utilities.
Notebooks are provide as demos for the user to construct their own residual convolutional networks, which are
- notebook-rcae13-mnist: A 13-layer (6 + 6 + 1: encoder+decoder+code_layer) RCAE for mnist;
- notebook-rcae13-mnist-restore: Restore the trained network
- notebook-rcae13-mnist-gmm.ipynb: Generate new handwritting digits.
Some python packages should be installed before applying the nets, which are listed as follows,
Also, CUDA is required if you want to run the codes by GPU, a Chinese guide for CUDA installation on Ubuntu 16.04 is provided.
Before constructing a RCAE net, the pakcage should be installed. Here is the installation,
$ cd rcag-gmm
$ pip3 install --user .
Detailed usage of our rcae-gmm package is demonstrated in demo-mnist by jupyter notebooks. Below are examples of handwriting digits generated by the RCAE13 above.
- Zhixian MA <
zx at mazhixian.me
>
Unless otherwise declared:
- Codes developed are distributed under the MIT license;
- Documentations and products generated are distributed under the Creative Commons Attribution 3.0 license;
- Third-party codes and products used are distributed under their own licenses.