Permalink
Browse files

update readme

  • Loading branch information...
Hantian Zhang
Hantian Zhang committed Jul 25, 2017
1 parent 2067fef commit 3bccf743b14b9f5cc891205ed3957c90e03f8a4f
Showing with 25 additions and 17 deletions.
  1. +22 −17 README.md
  2. +3 −0 download.sh
View
@@ -1,9 +1,9 @@
#GalaxyGAN_python
# GalaxyGAN_python
This project is the implementation of the Paper "Generative Adversarial Networks recover features in astrophysical images of galaxies beyond the deconvolution limit" on python.
##Setup
## Amazon EC2 Setup
###EC2 Public AMI
### EC2 Public AMI
We provide an EC2 AMI with the following pre-installed packages:
* CUDA
@@ -17,44 +17,49 @@ AMI Id: ami-96a97f80
. (Can be launched using p2.xlarge instance in GPU compute catagory)
[Launch](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Images:sort=visibility) an instance.
###Connect to Amazon EC2 Machine
### Connect to Amazon EC2 Machine
Please follow the instruction of Amazon EC2.
##Get our code
## Get Our Code
- Clone this repo:
```bash
git clone https://github.com/SpaceML/GalaxyGAN_python.git
cd GalaxyGAN_python/
```
##Run our code
After you launch a instance,first
## Get Our FITS Files
The data to download is about 5GB, after unzipping it will become about 16GB.
bash download.sh
```bash
cd GalaxyGAN_python/
```
## Run Our Code
###Preprocess the .FITs
### Preprocess the .FITs
If the mode equals zero, this is the training data. If the mode equals one, the data is used for testing.
```bash
python roou.py -input XXX -fwhm 1.4 -sigma 1.2 -figure XXX -gpu 1 -model models -mode 0
python roou.py -input fitsdata/fits_train -fwhm 1.4 -sigma 1.2 -mode 0
python roou.py -input fitsdata/fits_test -fwhm 1.4 -sigma 1.2 -mode 1
```
XXX is your local address. On our AMI, you can skip this step due to all these have default values.
###Train the model
### Train the model
If you need, you can modify the constants in the Config.py.
```bash
python train.py gpu=XXX
python train.py gpu=1
```
You can appoint which gpu to run the code by adding "gpu = XXX".
You can appoint which gpu to run the code by changing "gpu=1".
This will begin to train the model. If you want to load the model which already exists, you can modify the model_path in the config.py.
This will start the training process. If you want to load the model which already exists, you can modify the model_path in the config.py.
###Test
### Test
Before you try to test your model, you should modify the model path in the config.py.
```bash
python test.py
```
View
@@ -0,0 +1,3 @@
#!/bin/bash
wget https://share.phys.ethz.ch/~blackhole/spaceml/GalaxyGAN/fitsdata.tar.gz
tar -xvzf fitsdata.tar.gz

0 comments on commit 3bccf74

Please sign in to comment.