Giter VIP home page Giter VIP logo

skynet's Introduction

Skynet

Welcome to Skynet, an automated address canvassing model using satellite imagery. First, download training data, initialization weights, and trained weights

We strongly reccomend running this on linux

1. Preprocessing and Config file

First, ensure your data has been partitioned into training and validation sets. Then place the images and the corresponding the labels into two separete directories for each set. This should produce four directories:

    /train_images/ #Directory for training image files
    /train_annotations/ #Directory for training annotation labels
    /val_images/ #Directory for validation image files
    /val_annotations/ #Directory for validation annotation labels

These directories should be defined in the config.json file under their respective fields.

Any appropriate changes to any other fields should be made at this time. This includes editing the names of the class labels, generating anchor boxes with the command python gen_anchors.py -c config.json, and specifying the weights file to be used.

If the model is being trained for the first time, then ensure the backend.h5 file is in the YOLOv3 directory as those weights will be used to kick off the training. (This does not need to be specified in the config file)

2. Train the Model

YOLOv3 implemented by experiencor, free to use under the MIT liscense

To train the model, run the command:

python train.py -c config.json

Training the model will produce a weights file that contains the model weights for your particular data set. This weights file name is designated by the saved_weights_name field in the config file and can be used as a checkpoint for restarting training. Training concludes after 5 consecutive epochs did not have an improve in loss.

3. Address Canvassing

To perform address canvassing on a set of before and after images, run the appropriate canvassing command. For square images, that would be:

python canvassing_square.py

Make sure the before and after images are in the root Skynet directory and are named old.tif and new.tif respectivly. In the current version, these images will be broken down into tiles to better resemble our training set; this way the model will be able to make accurate predictions. The model will then identify residences in the images and highlight the differences, indicating where new addresses have appeared, and stitch the tiles back together. These differences can be seen in the diff.png output image.

Training/Validation Set Creation

Label-maker from development seed, free to use under the MIT liscense

In order to create our training set, we took advantage of the Label Maker package in python. To create your own training/validation set using label maker, start by editing the config.json file specific to label maker. Specific coordinates if desired can be entered in, as well as specific class labels. A free access token from open map box must be obtained via their website and placed in the config.json file before any data can be download. Once the config.json file has been configured accordingly, run run.py to obtain the labeled training images. Once these images have been obtained, we recommend running the validate-labels.ipynb to manually filter out the more poorly labeled images. Finally, run split.sh to split the data into training and validation sets.

TODO

  • Finish GUI
  • Canvassing on rectangular images
  • Distiction between if addresses were added or removed

skynet's People

Contributors

btyuhas avatar chrisj-vt avatar ecclesca avatar yungroobie avatar

Watchers

 avatar  avatar  avatar

Forkers

yungroobie

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.