Skip to content

EnviroGIS/tiles_tf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiles_tf

TensorFlow neural network for processing Raster Tiles.

CURRENTLY WORKS WITH 2 CATEGORIES

Installation

  1. Clone the repository
  2. Go to tiles_tf\tf_env\Scripts>activate.bat for activating Virtual Environment with all needed dependencies.

Usage

  1. QGIS. The code provided proposes you to create a vector grid any size you like. You may also use you own vector layer. This code HAS TO BE EXTREMELY UPGRADED. After creating the grid (or upload your own vector layer) you have to categorize vectors giving objects appropriate attributes. Then, the raster will be clipped with this vector.

  2. There are 3 datasets created: tr for training data, val for validation data and raw for testing the neural network (actually there is that sort of data that has to be processed).

There are also metafiles created (required in TensorFlow Documentation).

  1. Run python3 learn.py for training the neural network. You will be asked for the name of your neural network. There are 50 iterations by default. It could be changed in code in line 93. It is recommended to have at least 3o iteractions. Has to be verified. Change batch_size in line 91 to the number your images number could be divided (recommended near 3% of the total number).

TAKES TIME TO PROCEED. You will see the accuracy of the neural network during the process. Once the neural network is ready you can use it with any similar dataset, so it is preferable to spend time and efforts to make the model as good, nice and shiny as it is possible.

  1. Run python3 check.py for checking data from dataset stored in tiles\raw folder to be categorized. Images would be copied to folders 0 and 1 and appropriate metafile is created.

  2. The metafile created could be joined with the grid layer created using the key field.

Things to do

  1. Custom categories number

  2. Read theory to make it more efficient.

  3. Visualize the neural network

Some information to inspire:

RESULTS

Idea: define tiles with artificial objects (buildings primarily).

Input: cellsize - 100m, Bing Imagery, 710 training images, 362 validation images, batch_size = 30, n_epoch = 50.

Samples: Trained category = 1

Trained category = 0

After training and checking

Checked category = 1 (All the images categorized as 1 were categorized correctly (not the same with category 0. There are some tiles with buildings). General accuracy up to 95% (After 5 iteraction it was 85%))

About

Neural Network for processing Satellite Images

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors