Giter Club home page Giter Club logo

roi-auto's Introduction

ROI-Auto

Python 3 script that generates training and validation samples (geodataframes) from a shapefile database

Introduction

Image classification is one of the most well known and used operations in remote sensing and GIS. To evaluate the result produced by a supervised classification algorithme; the operator needs to analyse the confusion matrix, Kappa coefficient and overall accuracy generated by using training and validation samples.

These samples are often split in two:

  • 2/3 โ†’ Training samples (used to train the model);
  • 1/3 โ†’ Validation samples (used to validate the model).

The samples need to be split in a random way as to not influence the classification's evaluation. This why this script has been developed.

Principle

The ROI-Auto python3 script reads all of the ESRI shapefiles in a directory, and using a pseudo random number generator; it determines the polygones that are going to be used for the training and validation. Then, it puts them in separate foloders (in the same directory) after backing up the original files. At the end of the operation, a report is generated with the IDs of the polygons chosen for training / validation.

Installation

No installation, just run the roi.py (using a python 3 interpreter) inside the MultiPolygons directory.

Data preparation and structure

As of now, the script only supports ESRI shapefiles.

In theory, MultiPoints shapefiles should work, although no test were done to confirm this.

Each MultiPolygon (.shp) must represent one class and one class ONLY. The number of MultiPolygons in the directory must match the number of classes.

Dependencies

The script will not work without the following dependencies:

roi-auto's People

Contributors

moadalami avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.