Git Product home page Git Product logo

deepsolar's Introduction

DeepSolar

Nationwide houseshold-level solar panel identification with deep learning. See details from our project website. We used Inception-v3 as the basic framework for image-level classification and developed greedy layerwise training for segmentation and localization. CNN model was developed with TensorFlow. slim package is credited to Google. train_classification.py and train_segmentation.py were developed with reference to inception.

Usage Instructions:

git clone https://github.com/wangzhecheng/DeepSolar.git
cd DeepSolar

The model is fine-tuned based on the pre-trained model. The pre-trained model was trained on ImageNet 2012 Challenge training set. It can be downloaded as follows:

mkdir ckpt
cd ckpt
curl -O http://download.tensorflow.org/models/image/imagenet/inception-v3-2016-03-01.tar.gz
tar xzf inception-v3-2016-03-01.tar.gz

Then download pre-trained classification model and segmentation model for solar panel identification task.

curl -O https://s3-us-west-1.amazonaws.com/roofsolar/inception_classification.tar.gz
tar xzf inception_classification.tar.gz
curl -O https://s3-us-west-1.amazonaws.com/roofsolar/inception_segmentation.tar.gz
tar xzf inception_segmentation.tar.gz

In this project, we developed a dataset containing 472,953 aerial images for training, validation and evaluation. They can be downloaded as follows:

cd /abs/path/to/DeepSolar
curl -O https://s3-us-west-1.amazonaws.com/roofsolar/SPI_train.tar.gz
tar xzf SPI_train.tar.gz
curl -O https://s3-us-west-1.amazonaws.com/roofsolar/SPI_val.tar.gz
tar xzf SPI_val.tar.gz
curl -O https://s3-us-west-1.amazonaws.com/roofsolar/SPI_eval.tar.gz
tar xzf SPI_eval.tar.gz

Install the required packages:

pip install -r requirements.txt

Firstly, you should generate data file path lists for training and evaluation:

python generate_data_list.py

Then you can train the CNN model for classification. You can start from ImageNet model:

python train_classification.py --fine_tune=False

or start from our well-trained model:

python train_classification.py --fine_tune=True

After training is done, test the model:

python test_classification.py

Our model can achieved overall recall 88.9% and overall precision 93.2% on test set. For training the segmentation branch, you should firstly train the first layer:

python train_segmentation.py --two_layers=False

Then train the second layer.

python train_segmentation.py --two_layers=True

After training is done, you can test the average absolute area error rate:

python test_segmentation.py

Our well-trained model can reach 27.3% for residential area and 18.8% for commercial area.

deepsolar's People

Contributors

wangzhecheng avatar jerluc avatar

Watchers

James Cloos avatar Anub Sinha avatar

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.