Coder Social home page Coder Social logo

biwottech / mltools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digitalglobe/mltools

0.0 1.0 0.0 27.86 MB

A collection of Machine Learning Tools for object detection and classification on DG imagery.

License: MIT License

Python 100.00%

mltools's Introduction

mltools

PyPI version

Tools for fast prototyping of object detection and classification solutions on DG imagery. Relies heavily on popular machine learning (ML) toolkits such as scikit-learn and deep learning toolkits such as keras. The intent is to use mltools to experiment with algorithms; when these are mature, they can be baked into GBDX tasks and deployed at scale on GBDX.

mltools also includes a collection of auxiliary tools necessary for pre- and post- ML processing. These are:

  • data_extractors: get pixels and metadata from DigitalGlobe imagery; uses geoio;
  • features: functions to derive features from pixels;
  • geojson_tools: functions to manipulate geojson files.

Example code can be found in /examples. The examples can be used as a guideline to create object detection/classification solutions which involve one or more of the following steps:

  1. train the algorithm;
  2. test the algorithm on the test data and compute accuracy metrics;
  3. deploy the algorithm on the target data for detection or classification.

Also check out GBDX stories for examples on how mltools are used within GBDX tasks.

Installation/Usage

For Ubuntu, install conda with the following commands (choose default options at prompt):

wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
bash Miniconda2-latest-Linux-x86_64.sh

For OS X, install conda with the following commands (choose default options at prompt):

wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh
bash Miniconda2-latest-MacOSX-x86_64.sh

Then run:

bash

so that modifications in your .bashrc take effect.

Create a conda environment:

conda create -n env jupyter scipy gdal ephem

Activate the environment:

source activate env

Upgrade pip (if required):

pip install pip --upgrade

Install mltools:

pip install mltools

Optional: you can install the current version of the master branch with:

pip install git+https://github.com/digitalglobe/mltools

Keep in mind that the master branch is constantly under development.

If installation fails for some of the dependencies, (try to) install them with conda:

conda install <dependency_name>

and then retry:

pip install mltools

You can copy the scripts found in /examples in your project directory or create your own. Keep in mind that the imagery has to be in your project folder and it should have the same name as the image_name property in the geojson.

To exit your conda virtual environment:

source deactivate

gbdxtools

The examples require imagery which can be ordered and downloaded from GBDX using gbdxtools. You can install gbdxtools within the conda environment with:

conda install cryptography
pip install gbdxtools

If you have any trouble with the installation of gbdxtools, refer to the readme of the gbdxtools repo.

Development

Activate the conda environment:

source activate env

Clone the repo:

git clone https://github.com/digitalglobe/mltools
cd mltools

Install the requirements:

pip install -r requirements.txt

Please follow this python style guide. 80-90 columns is fine.

To exit your conda virtual environment:

source deactivate

Create a new version

To create a new version:

bumpversion ( major | minor | patch )
git push --tags

Then upload to pypi.

Comments

Here is a slide my initial ideas on mltools. The vision is to use the solutions created with mltools as part of a Crowd+Machine system along the lines of this document.

mltools's People

Watchers

 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.