Looking Glass segmentation model packaged in TF serving CPU and GPU images
275
Looking Glass is a building segmentation model for identifying buildings from zoom 18 satellite imagery. The model is based off of Google's DeepLabV3 and was trained on all 30cm data from the SpaceNet building training set. The model is a "generalist" in that it wasn't tailored to any specific region -- the optimization goal was to perform well across a variety of geospatial regions.
The docker image takes in a json-like dict (via a POST request) with base64 encoded images. Images should have been read from a standard format (like png or jpg) where the valid pixel range is 0-255. When transforming the 0-255 range to 0-1, Looking Glass will perform some histogram equalization to set the minimum pixel value to 0 and the 98th percentile pixel value to 1. See serving_input_receiver_fn in the Looking Glass repo for more details on how the model preprocesses images.
Looking Glass will return a json response with the float values corresponding to the signed-distance transform. Predicted pixels outside a building have a value < 0, pixels on a building border have value 0, and pixels inside a building have values > 0. It's suggested to use a threshold value of >=0 to binarize the building prediction mask.
Note: be sure your images are projected into an equal area projection if you want to sum up pixels and get the predicted square meters of building area.
To see a full example, see the jupyter notebook walkthrough in the looking-glass repository.
The raw Keras weights and parameters used to build this image are available and stored by the Humanitarian OpenStreetMap team:
Content type
Image
Digest
Size
1.2 GB
Last updated
over 7 years ago
docker pull developmentseed/looking-glass:v2-gpu