Skip to content

tsuday/AutoEncoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoEncoder

Simple implementation of AutoEncoder, which is one of the deep learning algorithms.   This is implemented based on framework Tensorflow.

Overview

This project consists of three programs.

  • AutoEncoder.py
    Main program of this project, and this is the imeplementation of AutoEncoder.
  • Trainer.py
    Sample program to run training. It requires training data images, and will be described below for details.
  • Predictor.py
    Sample program to prediction by using trained data. It requires trained parameter data and input for prediction. This will also be described below.

AutoEncoder.py

Python class which has training and prediction functions of AutoEncoder.
This class is implemented based on framework Tensorflow.

TODO:to be written about more technical details.

Learning data

This implementation requires CSV file listing 2 image file paths in each row as learning data. File of the first column path is input for AutoEncoder, and the second column is file path of training data image. CSV is necessary because batch data read function of Tensorflow needs it. This repository include sample csv, dataList.csv, and image files as samples.

Limitations

Currently, this implementation has some limitations.

  • Treat only 1-dimensional image (e.g. gray scale image). There is a plan to extend it to treat 3-dimensional image (e.g. RGB color image).
  • Data images have to be 512x512 pixels size._

Customize and Settings

TODO:to be written

Output data while learning

While learning, the implementation output the status of learning as below.

Standart output

Running part will write learning progress like below.
Step: 600, Loss: 90405240.000000 @ 2017/05/12 08:50:08

This consists of 3parts:

  • Step value of learning process
  • Loss value, which is sequare sum of pixel value differences between predicted values and teacher values
  • Timestamp when the progress is output

Default implementation of running parts write progress at the first step and every 200 steps after the first step.

Images predicted

TODO:to be written

Tensor Board

AutoEncoder.py outputs files for Tensor Board in board directory.
You can see Tensor Board by Tensorflow's usual way to invoke it.

TODO:to be written for more details.

Session file to resume learning

Trainer.py saves files of session files, which includes trained parameters at the saving step.
These files are saved in saved_session directory.

Trainer.py can load them to resume training from saved step.
Predictor.py loads them to predict image by using trained parameters at saved step.

Trainer.py

Sample implementation of training by using AutoEncoder.py. This implementation use data from dataList.csv.

TODO:to be written about more technical details.

Predictor.py

Sample implementation of prediction by using AutoEncoder.py. This implementation use data from predictList.csv.

TODO:to be written about more technical details.

How to execute

  1. Please run AutoEncoder.py, and class definition is loaded.
  2. Please run Trainer.py. This program load training data and output session data of Tensorflow for every 200 training steps.
  3. Please modify settings in Predictor.py, and run. This program load session data and output predicted image by matplotlib.

To run, libraries as stated below in Requirements is necessary.

Requirements

  • Python3, Tensorflow 1.1.0, and the libraries it requires.
  • Trainer.py and Predictor.py require matplotlib to draw predicted images.

About

Simple Implementation of AutoEncoder, one type of deep learning algorithm. This is implemented based on Tensorflow.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages