API Reference#
The following gives a description of the classes and functions used in the Panel-Segmentation package. The main panel segmentation pipeline is used to detect solar panels in satellite imagery, using the pre-trained models provided in the Panel-Segmentation package.
Utilities#
Helper functions and utilities.
|
Generates satellite image via Google Maps, using a set of lat-long coordinates. |
|
Gets the address of a latitude, longitude coordinates using Google Geocoding API. Please note rates for running geocoding checks here: https://developers.google.com/maps/billing-and-pricing/pricing. |
|
Take satellite images via the Google Maps API in a grid fashion for a large area, and save the associated images to a folder. |
Using the grid_location_list output from the generateSatelliteImageryGrid() function, visualize all of the images taken in a grid. |
|
|
Take a master GEOTIFF file, grid it, and convert it to a series of PNG files. |
|
Locate a lat-lon coordinate in a GEOTIFF image, and then box that area and capture a PNG image of it. |
|
Vectorized translation - handles arrays of translations at once. |
|
Get the latitude-longitude coordinates of the centroid of a box output from model inference, based on the image center location & zoom level. |
Convert a binary mask output (from a deep learning model) to a list of polygon coordinates, which can later be converted to latitude-longitude coordinates. |
|
|
Take an inference mask output from a model, and convert it to a polygon with listed latitude-longitude coordinates. |
|
Take a list of lat-lon coordinates for a polygon and convert to GeoJSON format. |
|
This function uses a Hough transform to detect the most dominant lines in an image mask and the azimuth of the longest direction. |
|
Draws the Hough line in the dominant (longest) direction on a segmentation mask. |
|
Calculate the width and length of a rectangular polygon. |
|
Adjust a rectangular polygon to have a standardized width while maintaining its center position, orientation, and length. |
LiDAR#
LiDAR data processing utilities.
Models#
The following deep learning models are included in the Panel-Segmentation package:
Panel Detection Models#
panel_detection_model.pth: This is the configuration file for the DL instance segmentation panel detection model.
panel_detection_model.py: This is the DL isntance segmentation model, which detects and classifies solar array mounting configuration.
sol_searcher_config.py: This is the configuration file for the DL object detection sol-searcher model.
sol_searcher_model.pth: This is the checkpoint file for the DL object detection sol-searcher model, which searches for solar panels in satellite imagery.This model is trained on 3783 images from Google Maps imagery of the Austin, TX area from November 2023 and Denver, CO area from June 2023 with a resolution of 0.2986 meters per pixel (Google Maps zoom level 19). The architecture of the model is RTMDet-X with a mAP-50 score of 0.884.
Extreme Weather: Hail Models#
hail_config.py: This is the configuration file for the DL instance segmentation hail model.
hail_model.pth: This is the checkpoint file for the DL instance segmentation hail model, which detects hail on solar arrays in satellite imagery. This model is trained on 1883 images from Google Maps imagery of the Austin, TX area from November 2023 with a resolution of 0.0746 meters per pixel (Google Maps zoom level 21). The architecture of the model is RTMDet-Ins-X with a mAP-50 score of 0.859.
Extreme Weather: Hurricane Models#
pre_hurricane_config.py: This is the configuration file for the DL instance segmentation pre-hurricane model.
pre_hurricane_model.pth: This is the checkpoint file for the DL instance segmentation pre-hurricane model, which detects solar arrays in pre-hurricane satellite imagery. This model is trained on 1883 images from Google Maps imagery of various areas before hurricane impact with a resolution of 0.0746 meters per pixel (Google Maps zoom level 21). Many of these images includes Puerto Rico. The architecture of this model is RTMDet-Ins-l with a mAP-50 score of 0.942.
post_hurricane_config.py: This is the configuration file for the DL instance segmentation post-hurricane model.
post_hurricane_model.pth: This is the checkpoint file for the DL instance segmentation post-hurricane model, which detects solar arrays in post-hurricane satellite imagery. This model is trained on 863 images from NOAA post-Hurricane Maria satellite imagery of the Puerto Rico area with a resolution of 0.0746 meters per pixel (Google Maps zoom level 21). The architecture of this model is Mask-RCNN X-101-64x4d-FPN with a mAP-50 score of 0.844.
Automated Geotagging Models#
automated_geotagging_config.py: This is the configuration file for the DL instance segmentation automated geotagging model.
automated_geotagging_model.pth: This is the checkpoint file for the DL instance segmentation hail model, which detects site equipment in satellite imagery. This model is trained on utility PV sites with a resolution of 0.0746 meters per pixel (Google Maps zoom level 21). The architecture of the model is RTMDet-Ins-X with a mAP-50 score of 0.892.