Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This repository contains scripts that enable the automatic detection of aircraft in Planet imagery using machine learning techniques. Included are files which define a machine learning model, train it using the Planesnet dataset, and apply it across an entire image scene to highlight aircraft detections.


PlanesNet is a labeled training dataset consiting of image chips extracted from Planet satellite imagery. It contains thousands of 20x20 pixel RGB image chips labeled with either a "plane" or "no-plane" classification. Machine learning models can be trained against this data to classify any given input chip into either one of these classes.

With an accurately trained model, this classification process can be extended to a full Planet image scene by using a sliding window technique. A 20x20 pixel window is moved across each pixel position in the image, extracted, and classified by the model. Neighboring window poistions that are classified as "plane" are then clustered into a single detection. These detections are highlighted with a bounding box in a copy of the original Planet scene.

See an example of the results below.

Additional Results


Python 3.5+ is required for compatability with all required modules

# Clone this repository
git clone

# Go into the repository
cd planesnet-detector

# Install required modules
pip install -r requirements.txt


A convolutional neural network (CNN) is defined within the module using the TFLearn library. This model supports the 20x20x3 input dimensions of the PlanesNet image data.


The defined CNN can be trained with the JSON version of the PlanesNet dataset and saved to a Tensorflow .tfl file for later use. Train the model by running and passing the path to planesnet.json and the path to the output .tfl file as arguments.

# Train the model
mkdir models
python "planesnet.json" "models/model.tfl"

The latest version of planesnet.json is available through the PlanesNet Kaggle page, which has further information describing the dataset layout.


A trained model can be applied across entire images using the sliding window detector function, which takes the model file path, input image path, and optional output image path as arguments. The output image will cluster positive detections and draw a bounding box around their center point.

Example images are contained in the scenes directory.

# Run on demo image with default output path
python "models/model.tfl" "scenes/scene_1.png"

# Run on demo image with defined output path
python "models/model.tfl" "scenes/scene_1.png" "scenes/scene_1_detections.png"