Skip to content

Commit

Permalink
act version
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Stritt committed May 18, 2018
1 parent 2d534b5 commit 0743b3d
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/main/python/deeplearn/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
based on https://github.com/zhengyang-wang/Deeplab-v2--ResNet-101--Tensorflow
#Summary

# Summary
- files in / data (images jpeg, masks png)
- preprocess_data.py start: conversion to 512x512 and rotations
- dataset / generate_dataset.py -> create filelists
Expand All @@ -12,19 +13,19 @@ based on https://github.com/zhengyang-wang/Deeplab-v2--ResNet-101--Tensorflow
With the help of this implementation objects can be segmented.

## 1. Requirements
`` `
```
Python 3.5
Tensorflow 1.4.0
Jupyter notebook
NVIDIA graphics card (optional for GPU based training)
`` `
```

## 2. Preparations
Run the * setup.sh * script to create all necessary folders
and download the Resnet Checkfile.
`` `
```
bash setup.sh
`` `
```

## 3. Training
Store all data for the training in the directory * data *. Pictures are in the
Expand All @@ -38,21 +39,21 @@ Update: use preprocess_data.py -> adjust file separator on split
### 3.1 Creating a dataset
For the training now a dataset must be created. For this the script call
* generate_dataset_txt.py * in the * dataset * folder. Text files are created with file lists for testing, training and validation.
`` `
```
python generate_dataset_txt.py
`` `
```

### 3.2 Start training
Then the training can be started. Simply call the script
* main.py *.

`` `
```
python main.py
`` `
```

If you like, the hyperparameters can be adjusted in the * main.py * script. Important is the number of steps * num_steps * and * save_interval *. Watch for a falling loss when running the workout.

`` `
```
num_steps: how many iterations to train
save_interval: how many steps to save the model and save a checkpoint
Expand All @@ -64,29 +65,29 @@ weight_decay: l2 regularization parameter
learning_rate: initial learning rate
power: parameter for poly learning rate
`` `
```

### 3.3 Tensor board for visualization
During the training you can visualize every checkpoint. In the
Main directory execute the following command.
`` `
```
tensorboard --logdir = log
`` `
```

## 4. Testing / Validation
To test and validate please first adjust the parameters in the * Main.py *.
The checkpoint number and the number of validations (number of
Lines in the file * valid.txt * in the directory * data_preprocessed *)

`` `
```
valid_step: checkpoint number for testing / validation
valid_num_steps: = number of testing / validation samples
`` `
```
Then call the script * main.py * with the parameter test as follows.
`` `
```
python main.py --option = test
`` `
```
You then get the "pixel accuracy" and the "mean IoU". In the future also the
F1 score.

Expand Down

0 comments on commit 0743b3d

Please sign in to comment.