Skip to content

Commit 2b69079

Browse files
author
Perry
committed
Revert "updates before new branch"
This reverts commit c246df1.
1 parent c246df1 commit 2b69079

25 files changed

Lines changed: 2502 additions & 1098 deletions

.gitattributes

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
pvpa/_version.py export-subst
22
panel_segmentation/_version.py export-subst
3-
*.h5 filter=lfs diff=lfs merge=lfs -text
4-
*.pth filter=lfs diff=lfs merge=lfs -text
5-
*.pt filter=lfs diff=lfs merge=lfs -text

.gitconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
[lfs]
2-
url = https://git-lfs.lsst.codes
3-
batch = false
1+

.github/workflows/flake8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: [3.8]
15+
python-version: [3.11]
1616

1717
steps:
1818
- uses: actions/checkout@v3

.github/workflows/pytest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.8", "3.9", "3.10"]
11+
python-version: ["3.10", "3.11", "3.12"]
1212
env: ['-r requirements.txt']
1313

1414
steps:

.github/workflows/requirements.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Python
1717
uses: actions/setup-python@v2
1818
with:
19-
python-version: 3.8
19+
python-version: 3.11
2020
- name: Install notebook environment
2121
run: |
2222
python -m pip install --upgrade pip wheel

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
config.yaml
44
*.vs/
55
**.pyc
6+
*.pth
67

78
# Jupyter Notebook
89
.ipynb_checkpoints
@@ -12,4 +13,6 @@ build
1213
generated
1314

1415
venv/
15-
.idea/
16+
.idea/
17+
18+
panel_segmentation.egg-info/

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: "ubuntu-22.04"
55
tools:
6-
python: "3.8"
6+
python: "3.11"
77

88
sphinx:
99
configuration: docs/conf.py

MANIFEST.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
include versioneer.py
22
include panel_segmentation/_version.py
3-
include panel_segmentation/models/VGG16_classification_model.h5
4-
include panel_segmentation/models/VGG16Net_ConvTranpose_complete.h5
5-
include panel_segmentation/models/object_detection_model.pth
3+
include panel_segmentation/models/automated_geotagging_config.py
4+
include panel_segmentation/models/automated_geotagging_model.pth
5+
include panel_segmentation/models/panel_detection_config.py
6+
include panel_segmentation/models/panel_detection_model.pth
67
include panel_segmentation/models/hail_config.py
78
include panel_segmentation/models/hail_model.pth
89
include panel_segmentation/models/post_hurricane_config.py

README.md

Lines changed: 75 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,88 @@
11
![Panel Segmentation Icon](docs/_static/panel_segmentation_cropped_icon.png)
22

3-
This repo contains the scripts for automated metadata extraction of solar PV installations,
4-
using satellite imagery coupled with computer vision techniques. In this package, the user
5-
can perform the following actions:
6-
- Automatically generate a satellite image using a set of lat-long coordinates, and a Google
7-
Maps API key. To get a Google Maps API key, go to the following site and set up an account:
8-
https://developers.google.com/maps/documentation/maps-static/get-api-key
9-
- Determine the presence of a solar array in the satellite image (boolean True/False), using a
10-
classification model (VGG16_classification_model.h5).
11-
- Perform image segmentation on the satellite image, to locate the solar array(s) in the
12-
image on a pixel-by-pixel basis, using an image segmentation model (VGG16Net_ConvTranpose_complete.h5).
13-
- Using connected components clustering, isolate individual solar arrays in the masked image.
14-
- Perform azimuth estimation on each solar array cluster in the masked image.
15-
- Using an object detection model (Faster R-CNN Resnet 50 trained via transfer learning), detect
16-
and classify mounting type and configuration of solar installations in satellite imagery. This includes
17-
classification of fixed tilt and single-axis trackers, as well as the rooftop,
18-
ground, and carport mounting configurations.
19-
- Detect solar panels and get its latitude, longitude, and address within a geographic bounding box through the SOL-Searcher Pipeline.
20-
- Detect and calculate hurricane damage on solar installations given pre-hurricane and post-hurricane satellite imagery through the Hurricane Detection Pipeline.
21-
- Detect and calculate hail damage on solar installations given satellite imagery through the Hail Detection pipeline.
22-
- Convert NOAA MESH (Maximum Estimated Size of Hail) grib2 files into kml or geojson files.
23-
- Estimate tilt and azimuth of a solar array by processing USGS LiDAR data for the array's location.
24-
- Automatically estimate the solar array's tilt and azimuth by pulling and processing USGS LiDAR data
25-
within a shapely polygon outlining the solar array.
26-
27-
To install Panel-Segmentation, perform the following steps:
28-
29-
1. You must have Git large file storage (lfs) on your computer in order to download the deep learning models in this package. Go to the following site to download Git lfs:
30-
31-
https://git-lfs.github.com/
32-
33-
2. Once git lfs is installed, you can now install Panel-Segmentation on your computer. We are still working on making panel-segmentation available via PyPi, so entering the following in the command line will install the package locally on your computer:
34-
35-
git clone https://github.com/NatLabRockies/Panel-Segmentation.git
3+
# Panel-Segmentation
4+
5+
Automated metadata extraction for solar PV installations using satellite imagery and computer vision.
6+
7+
[![Build Status](https://github.com/NREL/Panel-Segmentation/actions/workflows/pytest.yaml/badge.svg)](https://github.com/NREL/Panel-Segmentation/actions)
8+
[![Documentation Status](https://readthedocs.org/projects/panel-segmentation/badge/?version=latest)](https://panel-segmentation.readthedocs.io/en/latest/)
9+
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10+
11+
---
12+
13+
## Overview
14+
15+
Panel-Segmentation provides tools to detect, locate, and characterize solar PV installations from satellite and aerial imagery. It is developed at the [National Renewable Energy Laboratory (NREL)](https://www.nrel.gov/).
16+
17+
**Capabilities include:**
18+
19+
- **Satellite image retrieval** — pull imagery for any lat/lon coordinate via the Google Maps Static API
20+
- **Solar panel detection** — locate panels and retrieve their latitude, longitude, and address within a geographic bounding box (SOL-Searcher Pipeline)
21+
- **Storm damage assessment** — detect and quantify hurricane or hail damage on solar installations from before/after satellite imagery
22+
- **NOAA MESH conversion** — convert NOAA Maximum Estimated Size of Hail (MESH) grib2 files to KML or GeoJSON
23+
- **Tilt and azimuth estimation** — estimate array tilt and azimuth from USGS LiDAR data
24+
- **Mounting configuration classification** — identify roof-mount, ground-mount, carport, and other configurations using an instance segmentation model
25+
- **Site autotagging** — geolocate tracker rows, fixed-tilt rows, and inverters at utility-scale ground-mount sites using a deep learning pipeline
26+
27+
---
28+
29+
## Installation
30+
31+
### Prerequisites
32+
33+
Panel-Segmentation stores deep learning model weights via [Git Large File Storage (LFS)](https://git-lfs.github.com/). Install Git LFS before cloning:
34+
35+
```bash
36+
# macOS
37+
brew install git-lfs
38+
39+
# Linux
40+
sudo apt install git-lfs
41+
42+
# Then initialize
43+
git lfs install
44+
```
45+
46+
### Install from source
47+
48+
```bash
49+
git clone https://github.com/NREL/Panel-Segmentation.git
3650
cd Panel-Segmentation
3751
pip install .
52+
```
3853

39-
3. Panel-Segmentation requires the MMCV package, which can be tricky to install for CPU-only, and needs to be installed from source. To install MMCV for source, run the following in the command line:
54+
### Install MMCV (required for storm damage models)
4055

56+
All CV models depend on MMCV, which must be built from source:
57+
58+
```bash
4159
pip install git+https://github.com/open-mmlab/mmcv.git@v2.1.0
60+
```
61+
62+
> **Note:** MMCV installation may take several minutes.
63+
64+
---
65+
66+
## Documentation
67+
68+
Full documentation — including installation guides, API reference, pipeline tutorials, and example notebooks — is available at **[panel-segmentation.readthedocs.io](https://panel-segmentation.readthedocs.io/en/latest/)**.
69+
70+
---
71+
72+
## Contributing
73+
74+
Contributions are welcome. Please open an issue or pull request on [GitHub](https://github.com/NREL/Panel-Segmentation).
75+
76+
---
4277

43-
Please note that installation will likely take several minutes, but is necessary for running any of the storm-related CV models.
78+
## Citation
4479

45-
3. When initiating the PanelDetection() class, be sure to point your file paths to the model paths in your local Panel-Segmentation folder!
80+
If you use Panel-Segmentation in your research, please cite it using the following citation:
4681

82+
K. Perry and C. Campos, "Panel Segmentation: A Python Package for Automated Solar Array Metadata Extraction Using Satellite Imagery," in IEEE Journal of Photovoltaics, vol. 13, no. 2, pp. 208-212, March 2023, doi: 10.1109/JPHOTOV.2022.3230565.
4783

84+
---
4885

86+
## License
4987

88+
Panel-Segmentation is released under the [BSD 3-Clause License](LICENSE).

docs/changelog/1.0.0.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
.. py:currentmodule:: panel_segmentation
33
4-
Version 1.0.0 (September 2, 2025)
4+
Version 1.0.0 (March 24, 2026)
55
---------------------------------
66

77
Documentation
@@ -15,6 +15,9 @@ Scripts
1515
~~~~~~~
1616
- Added the scripts for LiDAR pipeline in the lidar folder :py:mod:`panel_segmentation.lidar`. (:pull:`45`)
1717
- Added unit testing for all functions in the lidar folder. (:pull:`45`)
18+
- Added new panel-detection instance segmentation model and deprecated old models. This standardized all model architecture to MMDetetection (remove detecto dependency). (:pull:`55`)
19+
- Added new utils functions for faster computation + post-processing of autogeotagging pipeline, including :py:func:`panel_segmentation.utils.getRectangleDimensions`
20+
and :py:func:`panel_segmentation.utils.standardizeRectangleWidth`. Updated existing functions for polygon generation from DL masks to be vectorized. (:pull:`59`)
1821

1922
Bug Fixes
2023
~~~~~~~~~
@@ -25,6 +28,8 @@ Other Changes
2528
~~~~~~~~~~~~~
2629
- Updated setup.py and requirements.txt to include the new dependencies for Mesh Scan and LiDAR pipeline. (:pull:`44`)
2730
- Upgraded to pyproject.toml paradigm. (:pull:`54`)
31+
- Updated test harness to Python 3.10-3.12 from Python 3.8-3.10. (:pull:`56`)
32+
- Moved all model hosting to Hugging Face, and created utils function to pull models from Hugging Face repo (https://huggingface.co/kperrynrel/panel-segmentation-models). (:pull:`60`)
2833

2934
Contributors
3035
~~~~~~~~~~~~

0 commit comments

Comments
 (0)