Giter Site home page Giter Site logo

satelliteimaging's People

Contributors

bouweandela avatar bpmweel avatar elboyran avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fdbesanto2

satelliteimaging's Issues

Fix bug tile labelling

When the tile is not square (have 2 mixed classes?) it's labeled as 'Mixed' while it's one clear class.

Train classifiers for the 3classes epxperiments

  • Dataset1 (px417m250)

  • Train 22 classifiers

  • Record performance in Excell sheet

  • Import to MATLAB as table and save in MAT file

  • Generate performance graphs & save them as fig and pdf

  • Dataset2 (px333m200)

  • Train 22 classifiers

  • Record performance in Excell sheet

  • Import to MATLAB as table and save in MAT file

  • Generate performance graphs & save them as fig and pdf

  • Dataset3 (px250m150)

  • Train 22 classifiers

  • Record performance in Excell sheet

  • Import to MATLAB as table and save in MAT file

  • Generate performance graphs & save them as fig and pdf

  • Dataset4 (px167m100)

  • Train 22 classifiers

  • Record performance in Excell sheet

  • Import to MATLAB as table and save in MAT file

  • Generate performance graphs & save them as fig and pdf

  • Ignoring Dataset5 (px83m50)

  • Dataset6 (px100m80)

  • Train few classifiers

  • Record performance in Excell sheet

  • Import to MATLAB as table and save in MAT file

  • Generate performance graphs & save them as fig and pdf

Training and validation of an image classifier pipeline

Follow example Image Category Classifier but also use own scripts.
Use some default choices like SURF like 80% of the strongest features. multi-class SVM, but also own parameters:

  • vocabulary sizes of 10, 20 and 50

  • SURF locations 'Detector' and 'Grid' (default settings GridStep is [8 8] and the BlockWidth is [32 64 96 128 (> 100??)] )

Apply on data-set 6, 100px = 80m.

  • make script skeleton

  • Balance categories

  • Looping over some parameters

  • Implement cross-validation

  • Make better output

  • Publish

  • Determine the best classifier from the tested vocabulary sizes and SURF location points

  • Run with best classifier options and save the model, publish.

  • Share with partners

Utility for visualizing a multipolygon.

  • make a visualization utility

Perhaps the best place for such a utility is

/satsets/util/shapefile.py

See the cell under

Function to display a multipolygon from a shape file on a figure axis with with given color and extent

currently cell 22 (of course the relevant import from the first cell, currently 19) from this source notebook

  • modify demo notebook toy example JI between multipolygons

  • modify demo notebook JI between2 shapefiles

Abstract EARSel

  • Write draft of extended abstract

  • Generate new figures for the abstract

Improve labelling

  • Add missing slums

  • Merge missing slums to given slums -> all_slums

  • Improve rough built-up mask

  • Make slums and built-up disjoint => proper built-up mask

  • generate non-built-up mask as all remaining pixels

Compute BoW for the 3classes classification experiment

  • Create datastores from the 4 image datasets (drop the 30m for now)
  • Split into training/testing 70/30
  • Compute BoVW for the training data
  • Convert the BoVW into table for the training data
  • Compute BoVW for the test data
  • Convert the BoVW into table for the testing data

Jaccard index between same type of ground truth and segmented results

The segmentation result could be either pixel or grid Binary Mask (BM) or a (multipolygonal) Shape (S).
The ground truth can be either a shape file or sometimes - pixel mask. In this issue consider comparison of the same type: BM <-> BM and S <-> S.

Use skikit-learn Python implementation of the Jaccard similarity score.

  • Install scikit-learn

  • Test simple example example documentation.

  • Source notebook for comparison of label masks.

  • Function for comparison of label masks.

  • Demo notebook using the function

  • Source notebook- toy example Jaccard index mulipolygons

  • Demo notebook- toy example Jaccard index multipolygons

  • Source notebook for comparison of shape files. Fix corrupt shape file.

  • Function for shape files.

  • Demo notebook using the function for shape files

Classify each pixel of the image

  • Decide on how to do it- via datastore or not. Check of the method predict can work on single image tile or on datastore.

  • Create function and script for predicting the label of each pixel based on tile (100x100px = 80x80m) around it using a learned classifier.

  • Segment the whole image using codes: 1- Slum, 2- NonBuiltUp and 3 BuiltUp

Compare segmentation to ground truth

  • Convert the 3 single masks to a single multi-class mask where 1 is BuiltUp, 2 is NonBuiltUp and 3is Slum. Visualize the ground truth indexed image (pure and overlaid on the original image).

  • Visualize overlaid ground truth and segmentation on top of original image

  • Fill missing pixels segmentation. Visualize the resulting segmentation image (pure and overlaid on the original image).

  • De-noise (via majority filter?) the segmentation. Visualize the resulting segmentation image (pure and overlaid on the original image).

  • Make a script to compare ground truth to partial segmentation

  • Compare interpolated segmentation to ground truth

Add tiling step size

Currently the tiles are not overlapping, we should be able to overlap them controlled by the tiling step size.

Utility for loading shapefiles into multipolygons.

  • Make a loading utility

Perhaps the best place for such a utility is

/satsets/util/shapefile.py

It's a one-liner, but is nice to be as a utility. See the cell under

Load the contents of the shapefiles as multipolygons.

currently cell 24 (of course the relevant import from the first cell, currently 19) from this source notebook

The function should return also the multipolygon's bounds (extent). See the same notebook.

  • modify demo notebook JI between2 shapefiles

Classify test datasets with best trained classifiers

Dataset 1 (417px=250m)

  • Retrain and save model 1.21 Ensemble/ Subspace KNN
  • Classify test data
  • Generate and save confusion matrix
  • Generate and save performance measures

Dataset 2 (333px=200m)

  • Retrain and save model 1.12 KNN/ Fine KNN
  • Classify test data
  • Generate and save confusion matrix
  • Generate and save performance measures

Dataset 3 (250px=150m)

  • Retrain and save model 1.21 1.12 KNN/ Fine KNN
  • Classify test data
  • Generate and save confusion matrix
  • Generate and save performance measures

Dataset 4 (167px=100m)

  • Retrain and save model 1.12 KNN/ Fine KNN
  • Classify test data
  • Generate and save confusion matrix
  • Generate and save performance measures

Dataset 6 (100px=80m)

  • Retrain and save model Weighted KNN
  • Classify test data
  • Generate and save confusion matrix
  • Generate and save performance measures

For all datasets:

  • Produce comparison performance plots and save as fig and PDF
  • Share results by email and BeeHub

Functions and scripts to generate performance plots

Create functions to generate performance plots as required by issue #24 .

  • Function for accuracy plot generation for all models
  • Script (unit-test) for accuracy plot generation for all models for all data-sets
  • Function for generating Precision and Recall plots for all models for one class
  • Script (unit-test) for generating Precision and Recall plots for all models for one class for all data-sets
  • Function for generating Precision and Recall plots for one model for all classes
  • Script (unit-test) for generating Precision and Recall plots for one model for all classes for all data-sets

Generate images for 3-class classification

Label an image as belonging to a certain class if at least 75% of the image pixels are labelled of that class.

  • Modify function for tiling to optionally have 3 classes only (no mix).
  • Modify script for considering only 75%-pure images for training.
  • Modify code to also report number of images per class.
  • Generate 5 datasets with 3 classes: Slums, BuiltUp and NonBuildUp.

Generate 5 test datasets

Generate sub-images (aka tiles or patches) and make them 5 datasets with 3 classes
Slum, BuiltUp, and NonBuiltUp each corresponding to the following tile grid sizes (use 1/4th of the size as step_size):

  • 250 m = 417 px

  • 200 m. = 333 px.

  • 150 m. = 250 px.

  • 100 m. = 167 px.

  • 50 m. = 83 px.

Predicting the label of several random tiles for each class

Use the best linear SVM classifier trained and tested on Dataset6. i.e. px100m80, so tile size is 100x100 pixles (80x80) meters. Use the vocabulary size and mode (Detection/Grid) which produced the best validation results.

  • Function to generate tile image(s) from random location(s) of a class mask, such that at least 80% the pixels from the tile belong to the desired class. See nonSlumTiling.m

  • Script to and generate 10 random tiles per class

  • Publish

  • Script to test the tile class label prediction using the best pre-trained imageCategoryClassifier on the 10 random tiles from each class

  • Run the prediction script

  • Publish

Create Visual vocabularies

Create BoVW using SURF (default feature extractor) for the 6 training datastores:

  • 250 m = 417 px

  • 200 m. = 333 px.

  • 150 m. = 250 px.

  • 100 m. = 167 px.

  • 80 m. = 100 px.

  • 50 m. = 83 px.

Line Support Region Feature

Instead of the papers approach we could use canny-edge detection + probabilistic hough lines and calculate the features from that:

  1. Line length Entropy
  2. Mean
  3. Entropy of line contrast (???)

Rename classes

Urban should be called built-up
and Rural = Non built up

Compute evaluation performance for the test sets

  • Function to compute evaluation numbers given vectors of actual and predicted classes or a pre-computed confusion matrix

  • Function to evaluate the performance of a pre-trained classifier on a test feature set

  • (Unit-test) script to compute those for the test datasets

Create a dataset with random sampling

The new datastore should be of images/tiles of resolution 80m = 100px.
All slum pixels should be used to test of a tile contains at least 80% slum pixels. If yes => use for training, if no, check if it has at least 80% pixels of that class. If yes => use for training, if not- discard from training.
See how many slum tiles are obtained above. Randomly sample the same (remaining) number of pixels/80% tiles of the remaining 2 classes- BuiltUp and NonBuiltUp.

  • Create functions and scripts to do the 'slum conditional' tiling.

  • Generate training image tiles of the 3 classes.

  • Clean up by hand some of the bad training images.

  • Record the new dataset in the Excel sheet.

GLCM - Pantex

Feature is implemented in the GLCM source book.

It needs to be put in the python package.

Take care of tuple of windows.

Image tiling

Make a function with unit test for tiling an image into different size tiles and assigning class labels to them.

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.