From 415a90b691bdb9b7da0deacad85753b40be7c589 Mon Sep 17 00:00:00 2001 From: Runsheng Song Date: Thu, 21 Jun 2018 13:48:54 -0700 Subject: [PATCH] use vgg16 --- docker-compose.yml | 2 +- src/app/apis/apis.py | 11 +- src/app/apis/mnist/__init__.py | 7 - src/app/apis/mnist/helpers.py | 45 -- src/app/apis/mnist/mnist.py | 83 --- .../{inceptionV3 => vgg16}/API_helpers.py | 33 +- .../apis/{inceptionV3 => vgg16}/__init__.py | 2 +- .../inceptionV3.py => vgg16/vgg16.py} | 67 +- src/app/models/InceptionV3/__init__.py | 2 - .../catVdog_less/catVdog_less.json | 1 - src/app/models/InceptionV3/settings.py | 9 - src/app/models/__init__.py | 3 +- src/app/models/mnist/__init__.py | 0 src/app/models/mnist/helpers.py | 45 -- src/app/models/mnist/mnist_model_server.py | 82 --- src/app/models/mnist/settings.py | 9 - src/app/models/vgg16/__init__.py | 2 + .../{InceptionV3 => vgg16}/base/base.json | 0 src/app/models/vgg16/settings.py | 9 + .../vgg16_helpers.py} | 6 +- .../vgg16_inference_server.py} | 20 +- .../vgg16_transfer_retraining.py} | 79 +- src/app/tasks.py | 48 +- src/config.py | 12 +- src/install_base_model.py | 12 +- src/notebooks/Inception V3.ipynb | 687 +----------------- src/notebooks/Untitled.ipynb | 64 ++ src/notebooks/vgg16.ipynb | 94 +++ 28 files changed, 351 insertions(+), 1083 deletions(-) delete mode 100644 src/app/apis/mnist/__init__.py delete mode 100644 src/app/apis/mnist/helpers.py delete mode 100644 src/app/apis/mnist/mnist.py rename src/app/apis/{inceptionV3 => vgg16}/API_helpers.py (65%) rename src/app/apis/{inceptionV3 => vgg16}/__init__.py (76%) rename src/app/apis/{inceptionV3/inceptionV3.py => vgg16/vgg16.py} (67%) delete mode 100644 src/app/models/InceptionV3/__init__.py delete mode 100644 src/app/models/InceptionV3/catVdog_less/catVdog_less.json delete mode 100644 src/app/models/InceptionV3/settings.py delete mode 100644 src/app/models/mnist/__init__.py delete mode 100644 src/app/models/mnist/helpers.py delete mode 100644 src/app/models/mnist/mnist_model_server.py delete mode 100644 src/app/models/mnist/settings.py create mode 100644 src/app/models/vgg16/__init__.py rename src/app/models/{InceptionV3 => vgg16}/base/base.json (100%) create mode 100644 src/app/models/vgg16/settings.py rename src/app/models/{InceptionV3/INV3_helpers.py => vgg16/vgg16_helpers.py} (92%) rename src/app/models/{InceptionV3/inception_inference_server.py => vgg16/vgg16_inference_server.py} (90%) rename src/app/models/{InceptionV3/inceptionV3_transfer_retraining.py => vgg16/vgg16_transfer_retraining.py} (72%) create mode 100644 src/notebooks/Untitled.ipynb create mode 100644 src/notebooks/vgg16.ipynb diff --git a/docker-compose.yml b/docker-compose.yml index 631fc5c..4f2b0e4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: - REDIS_PORT=6379 - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} - command: ['python', 'app/models/InceptionV3/inception_inference_server.py'] + command: ['python', 'app/models/vgg16/vgg16_inference_server.py'] volumes: - ./src:/opt/src networks: diff --git a/src/app/apis/apis.py b/src/app/apis/apis.py index 86bb31c..aac6acd 100644 --- a/src/app/apis/apis.py +++ b/src/app/apis/apis.py @@ -7,20 +7,13 @@ ''' from flask import Flask -from .mnist import blueprint as mnist_blueprint -from .inceptionV3 import blueprint as incept_blueprint +from .vgg16 import blueprint as vgg16_blueprint from app import app -app.register_blueprint(mnist_blueprint, url_prefix = '/mnist') -app.register_blueprint(incept_blueprint, url_prefix = '/inceptionV3') +app.register_blueprint(vgg16_blueprint, url_prefix = '/vgg16') @app.route('/') def index(): return 'Welcome to Michaniki' -@app.route('/add') -def add_a(): - res = add.delay(3, 4) - - diff --git a/src/app/apis/mnist/__init__.py b/src/app/apis/mnist/__init__.py deleted file mode 100644 index b7dbbb0..0000000 --- a/src/app/apis/mnist/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -''' -Created on Jun 6, 2018 - -@author: runshengsong -''' -from mnist import * - \ No newline at end of file diff --git a/src/app/apis/mnist/helpers.py b/src/app/apis/mnist/helpers.py deleted file mode 100644 index 6fab0b9..0000000 --- a/src/app/apis/mnist/helpers.py +++ /dev/null @@ -1,45 +0,0 @@ -''' -Created on Jun 8, 2018 - -@author: runshengsong -''' -# TO DO -# move settings to config -import sys -import base64 -import numpy as np - -def pre_process_image(img): - """ - format the images - """ - # To a vector - x = np.array([np.array(img)]) - # flatten 28*28 images to a 784 vector for each image - # deal with a single img - x = x.reshape(x.shape[0], 1, 28, 28).astype('float32') - - # normalization - x = x / 255 - - return x - -def base64_encode_image(a): - """ - encode the image - """ - # base64 encode the input NumPy array - return base64.b64encode(a).decode("utf-8") - -def base64_decode_image(a, dtype, shape): - """ - decode the image - """ - # convert the string to a NumPy array using the supplied data - # type and target shape - a = np.frombuffer(base64.decodestring(a), dtype=dtype) - a = a.reshape(shape) - - # return the decoded image - return a - \ No newline at end of file diff --git a/src/app/apis/mnist/mnist.py b/src/app/apis/mnist/mnist.py deleted file mode 100644 index 0e63d4f..0000000 --- a/src/app/apis/mnist/mnist.py +++ /dev/null @@ -1,83 +0,0 @@ -''' -Created on Jun 6, 2018 - -Flask API to run minst - -@author: runshengsong -''' - -# move to helper -from PIL import Image -import json -import numpy as np -import uuid -import os -import io -import uuid -import time - -# keras -from keras.models import load_model - -# flask -from flask import jsonify -from flask import Blueprint, request - -import helpers - -from app import app -from app import db - -MNIST_IMAGE_QUEUE = app.config['MNIST_IMAGE_QUEUE'] -CLIENT_SLEEP = app.config['CLIENT_SLEEP'] - -blueprint = Blueprint('mnist', __name__) - -@blueprint.route('/predict', methods=['POST']) -def run_mnist(): - """ - Load all *.png files in a directory - """ - data = {"success": False} - - # load image - img = request.files['image'] - img = Image.open(img) - # pre-process - img = helpers.pre_process_image(img) - img = img.copy(order="C") - - # generate an ID for the classification then add the - # classification ID + image to the queue - this_id = str(uuid.uuid4()) - image = helpers.base64_encode_image(img) - - print len(image) - d = {"id": this_id, "image": image} - - # push the current id and image to redis - db.rpush(MNIST_IMAGE_QUEUE, json.dumps(d)) - - while True: - # try to get the prediction results - output = db.get(this_id) - - if output is not None: - # return it - output = output.decode('utf-8') - data["predictions"] = json.loads(output) - - # it is safe to delete the output from Redis now - db.delete(this_id) - break - - # if the output is not ready - # just wait a bit - print "* Waiting....." - time.sleep(CLIENT_SLEEP) - - data['success'] = True - - return jsonify({ - "data": data - }), 200 \ No newline at end of file diff --git a/src/app/apis/inceptionV3/API_helpers.py b/src/app/apis/vgg16/API_helpers.py similarity index 65% rename from src/app/apis/inceptionV3/API_helpers.py rename to src/app/apis/vgg16/API_helpers.py index 90fc3df..f148ab7 100644 --- a/src/app/apis/inceptionV3/API_helpers.py +++ b/src/app/apis/vgg16/API_helpers.py @@ -47,24 +47,25 @@ def download_a_dir_from_s3(bucket_name, bucket_prefix, local_path): local: /src/tmp/model_data/ """ print "* Helper: Loading Images from S3 {} {}".format(bucket_name,bucket_prefix) - s3 = boto3.resource('s3') - mybucket = s3.Bucket(bucket_name) - # if blank prefix is given, return everything) - objs = mybucket.objects.filter( - Prefix = bucket_prefix) + output_path = os.path.join(local_path, bucket_prefix) - for obj in objs: - path, filename = os.path.split(obj.key) - save_path = os.path.join(local_path, path) - # boto3 s3 download_file will throw exception if folder not exists - try: - os.makedirs(save_path) - except OSError: - pass - mybucket.download_file(obj.key, os.path.join(save_path, filename)) + if not os.path.exists(os.path.join(output_path, 'train')): + s3 = boto3.resource('s3') + mybucket = s3.Bucket(bucket_name) + # if blank prefix is given, return everything) + objs = mybucket.objects.filter( + Prefix = bucket_prefix) - # move the folder to target place - output_path = os.path.join(local_path, bucket_prefix) + for obj in objs: + path, filename = os.path.split(obj.key) + save_path = os.path.join(local_path, path) + # boto3 s3 download_file will throw exception if folder not exists + try: + os.makedirs(save_path) + except OSError: + pass + mybucket.download_file(obj.key, os.path.join(save_path, filename)) + print "* Helper: Images Loaded at: {}".format(output_path) return output_path diff --git a/src/app/apis/inceptionV3/__init__.py b/src/app/apis/vgg16/__init__.py similarity index 76% rename from src/app/apis/inceptionV3/__init__.py rename to src/app/apis/vgg16/__init__.py index 9f0ffcc..f94713a 100644 --- a/src/app/apis/inceptionV3/__init__.py +++ b/src/app/apis/vgg16/__init__.py @@ -3,6 +3,6 @@ @author: runshengsong ''' -from inceptionV3 import * +from vgg16 import * from API_helpers import * \ No newline at end of file diff --git a/src/app/apis/inceptionV3/inceptionV3.py b/src/app/apis/vgg16/vgg16.py similarity index 67% rename from src/app/apis/inceptionV3/inceptionV3.py rename to src/app/apis/vgg16/vgg16.py index ff581f1..e6166a6 100644 --- a/src/app/apis/inceptionV3/inceptionV3.py +++ b/src/app/apis/vgg16/vgg16.py @@ -19,7 +19,7 @@ # keras from keras.models import load_model from keras.preprocessing import image -from keras_applications import inception_v3 +from keras_applications import vgg16 # flask from flask import jsonify @@ -33,7 +33,7 @@ # michaniki app from ...tasks import * -blueprint = Blueprint('inceptionV3', __name__) +blueprint = Blueprint('vgg16', __name__) @blueprint.route('/retrain', methods=['POST']) def retrain(): @@ -41,36 +41,34 @@ def retrain(): pick up a pre-trained model resume training using more data - @args: train_bucket_url: URL pointing to the folder for training data on S3 - @args: model_name: the name of the model want to be retraiend, the folder must be exsit + @args: s3_bucket_name: the S3 bucket name + @args: s3_bucket_prefix: the folder path of the data the folder must be exsit """ - bucket_url = request.form.get('train_bucket_url') - model_name = request.form.get('model_name') - local_data_path = os.path.join('/tmp/model_data/', model_name) + s3_bucket_name = request.form.get('s3_bucket_name') + s3_bucket_prefix = request.form.get('s3_bucket_prefix') + nb_epoch = int(request.form.get('nb_epoch')) + batch_size = int(request.form.get('batch_size')) + model_name = s3_bucket_prefix.split('/')[-1] + + # TO DO: + # check if the model is under training + + local_data_path = os.path.join('./tmp') # download the folder in the url - API_helpers.download_a_dir_from_s3(bucket_url, local = local_data_path) + output_path = API_helpers.download_a_dir_from_s3(bucket_name = s3_bucket_name, + bucket_prefix = s3_bucket_prefix, + local_path = local_data_path) - try: - # kick off the retraining service in celery worker - inceptionV3_transfer_retraining.InceptionRetrainer(model_name) - - # TO DO: - # Working on the re-traning - # Put to celery worker - - # delete the image folder - shutil.rmtree(local_data_path, ignore_errors=True) - - return jsonify({ - "status": "success" - }), 200 - except Exception as err: - # delete the image folder - shutil.rmtree(local_data_path, ignore_errors=True) - return jsonify({ - "status": str(err) - }), 500 + # generate a task id + this_id = celery.uuid() + + # call the async task + async_retrain.apply_async((model_name, output_path, nb_epoch, batch_size, this_id), task_id = this_id) + + return jsonify({ + "status": "success" + }), 200 @blueprint.route('/transfer', methods=['POST']) def init_new_model(): @@ -78,14 +76,15 @@ def init_new_model(): init a new model based on InceptionV3 that can predict picture for new classes. - @args: train_bucket_url: URL pointing to the folder for training data on S3 + @args: s3_bucket_name: the S3 bucket name + @args: s3_bucket_prefix: the folder path of the data """ - # need to load the base model here - s3_bucket_name = request.form.get('train_bucket_name') s3_bucket_prefix = request.form.get('train_bucket_prefix') model_name = s3_bucket_prefix.split('/')[-1] + # TO DO: + # check if the model is under training local_data_path = os.path.join('./tmp') # generate a celery task id @@ -121,9 +120,9 @@ def run_inceptionV3(): # load and pre-processing image img = request.files['image'] - img = image.load_img(img, target_size = (299, 299)) + img = image.load_img(img, target_size = (224, 224)) x = np.expand_dims(image.img_to_array(img), axis=0) - x = inception_v3.preprocess_input(x) + x = vgg16.preprocess_input(x) x = x.copy(order="C") # encode @@ -134,7 +133,7 @@ def run_inceptionV3(): d = {"id": this_id, "image": x, "model_name": model_name} # push to the redis queue - db.rpush(INCEPTIONV3_IMAGE_QUEUE, json.dumps(d)) + db.rpush(VGG16_IMAGE_QUEUE, json.dumps(d)) while True: # check if the response has been returned diff --git a/src/app/models/InceptionV3/__init__.py b/src/app/models/InceptionV3/__init__.py deleted file mode 100644 index 61f90b1..0000000 --- a/src/app/models/InceptionV3/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .inceptionV3_transfer_retraining import * -from .INV3_helpers import * \ No newline at end of file diff --git a/src/app/models/InceptionV3/catVdog_less/catVdog_less.json b/src/app/models/InceptionV3/catVdog_less/catVdog_less.json deleted file mode 100644 index 010b888..0000000 --- a/src/app/models/InceptionV3/catVdog_less/catVdog_less.json +++ /dev/null @@ -1 +0,0 @@ -{"0": "cat", "1": "dog"} \ No newline at end of file diff --git a/src/app/models/InceptionV3/settings.py b/src/app/models/InceptionV3/settings.py deleted file mode 100644 index fc52fa1..0000000 --- a/src/app/models/InceptionV3/settings.py +++ /dev/null @@ -1,9 +0,0 @@ -import os - -InceptionV3_MODEL_PATH = os.path.join("app", "models", "InceptionV3") -BATCH_SIZE = 32 -IMAGE_QUEUE = 'inceptionV3_image_queue' -IMAGE_TYPE = 'float32' -IMAGE_SHAPE = (1, 299, 299, 3) -FC_SIZE = 1024 -SERVER_SLEEP = 0.5 \ No newline at end of file diff --git a/src/app/models/__init__.py b/src/app/models/__init__.py index fa12c8f..51a1c51 100644 --- a/src/app/models/__init__.py +++ b/src/app/models/__init__.py @@ -1,2 +1 @@ -from .mnist import * -from .InceptionV3 import * \ No newline at end of file +from .vgg16 import * \ No newline at end of file diff --git a/src/app/models/mnist/__init__.py b/src/app/models/mnist/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/models/mnist/helpers.py b/src/app/models/mnist/helpers.py deleted file mode 100644 index 6fab0b9..0000000 --- a/src/app/models/mnist/helpers.py +++ /dev/null @@ -1,45 +0,0 @@ -''' -Created on Jun 8, 2018 - -@author: runshengsong -''' -# TO DO -# move settings to config -import sys -import base64 -import numpy as np - -def pre_process_image(img): - """ - format the images - """ - # To a vector - x = np.array([np.array(img)]) - # flatten 28*28 images to a 784 vector for each image - # deal with a single img - x = x.reshape(x.shape[0], 1, 28, 28).astype('float32') - - # normalization - x = x / 255 - - return x - -def base64_encode_image(a): - """ - encode the image - """ - # base64 encode the input NumPy array - return base64.b64encode(a).decode("utf-8") - -def base64_decode_image(a, dtype, shape): - """ - decode the image - """ - # convert the string to a NumPy array using the supplied data - # type and target shape - a = np.frombuffer(base64.decodestring(a), dtype=dtype) - a = a.reshape(shape) - - # return the decoded image - return a - \ No newline at end of file diff --git a/src/app/models/mnist/mnist_model_server.py b/src/app/models/mnist/mnist_model_server.py deleted file mode 100644 index 4878985..0000000 --- a/src/app/models/mnist/mnist_model_server.py +++ /dev/null @@ -1,82 +0,0 @@ -''' -Created on Jun 10, 2018 - -@author: runshengsong -''' -import redis -from rq import Queue -import time -import json -import numpy as np - -# Michaniki MNIST helper -import helpers -import settings - -# Keras -from keras.models import load_model - -db = redis.StrictRedis(host="localhost", port=6379, - db=0) - -def run_mnist_model_server(): - """ - The model server - - Pull image from the Redis, decode - send to the model, predict - return the response to the redis - - Images are tracked using is Image IDs - """ - print "* Loading MNIST Model..." - mnist_model = load_model(settings.MNIST_MODEL_PATH) - print "* MNIST Model Loaded!" - - while True: - # continues listening... - # grab a list of image (equal to the batch size from the - # redis db - queue = db.lrange(settings.IMAGE_QUEUE, 0, settings.BATCH_SIZE) - imageIDs = [] - batch = None - - # for each image in the queue - for q in queue: - q = json.loads(q.decode("utf-8")) - # decode the image - this_image = helpers.base64_decode_image(q['image'], - settings.IMAGE_TYPE, - shape=(1, 1, settings.IMAGE_WIDTH, settings.IMAGE_HEIGHT)) - # stack up the image to the current - # batch - if batch is None: - batch = this_image - else: - batch = np.vstack([batch, this_image]) - - # add the id - imageIDs.append(q['id']) - - # start to put the result back to the db - if len(imageIDs) > 0: - print "* Batch size: {}".format(batch.shape) - - # get the prediction results - this_preds = mnist_model.predict(batch) - - for (each_id, each_pred) in zip(imageIDs, this_preds): - output = [{"label": np.argmax(each_pred)}] - # push the results to db - # imageID as the key - db.set(each_id, json.dumps(output)) - - # remove the set of images from the queue - db.ltrim(settings.IMAGE_QUEUE, len(imageIDs), -1) - - # wait for the redis to receive new images to predict - time.sleep(settings.SERVER_SLEEP) - -if __name__ == '__main__': - run_mnist_model_server() - \ No newline at end of file diff --git a/src/app/models/mnist/settings.py b/src/app/models/mnist/settings.py deleted file mode 100644 index 88fff01..0000000 --- a/src/app/models/mnist/settings.py +++ /dev/null @@ -1,9 +0,0 @@ -import os - -MNIST_MODEL_PATH = os.path.join("models", "mnist", "mnist_baseline_less.h5") -BATCH_SIZE = 32 -IMAGE_QUEUE = 'mnist_image_queue' -IMAGE_TYPE = 'float32' -IMAGE_WIDTH = 28 -IMAGE_HEIGHT = 28 -SERVER_SLEEP = 0.5 \ No newline at end of file diff --git a/src/app/models/vgg16/__init__.py b/src/app/models/vgg16/__init__.py new file mode 100644 index 0000000..2cb2890 --- /dev/null +++ b/src/app/models/vgg16/__init__.py @@ -0,0 +1,2 @@ +from .vgg16_transfer_retraining import * +from .vgg16_helpers import * \ No newline at end of file diff --git a/src/app/models/InceptionV3/base/base.json b/src/app/models/vgg16/base/base.json similarity index 100% rename from src/app/models/InceptionV3/base/base.json rename to src/app/models/vgg16/base/base.json diff --git a/src/app/models/vgg16/settings.py b/src/app/models/vgg16/settings.py new file mode 100644 index 0000000..a9dd4ff --- /dev/null +++ b/src/app/models/vgg16/settings.py @@ -0,0 +1,9 @@ +import os + +VGG16_MODEL_PATH = os.path.join("app", "models", "vgg16") +BATCH_SIZE = 32 +IMAGE_QUEUE = 'vgg16_image_queue' +IMAGE_TYPE = 'float32' +IMAGE_SHAPE = (1, 224, 224, 3) +FC_SIZE = 1024 +SERVER_SLEEP = 0.5 \ No newline at end of file diff --git a/src/app/models/InceptionV3/INV3_helpers.py b/src/app/models/vgg16/vgg16_helpers.py similarity index 92% rename from src/app/models/InceptionV3/INV3_helpers.py rename to src/app/models/vgg16/vgg16_helpers.py index 8d03b49..49ce59e 100644 --- a/src/app/models/InceptionV3/INV3_helpers.py +++ b/src/app/models/vgg16/vgg16_helpers.py @@ -19,7 +19,7 @@ def decode_pred_to_label(preds, model_name): to class label """ class_label = OrderedDict() - json_file_path = os.path.join("app", "models", "InceptionV3", model_name, model_name + ".json") + json_file_path = os.path.join("app", "models", "vgg16", model_name, model_name + ".json") with open(json_file_path, 'r') as fp: class_label = json.load(fp) class_label = {int(k): str(v) for k,v in class_label.iteritems()} @@ -34,8 +34,6 @@ def decode_pred_to_label(preds, model_name): this_prob = np.sort(each_image_pred)[::-1] # map classes number to label - print this_classes - print this_prob this_labels = map(class_label.get, this_classes) for i in range(0, len(this_labels)): one_lable = this_labels[i] @@ -47,8 +45,6 @@ def decode_pred_to_label(preds, model_name): return batch_output - - def pre_process_image(img): """ format the images diff --git a/src/app/models/InceptionV3/inception_inference_server.py b/src/app/models/vgg16/vgg16_inference_server.py similarity index 90% rename from src/app/models/InceptionV3/inception_inference_server.py rename to src/app/models/vgg16/vgg16_inference_server.py index abb0fec..6a01fd4 100644 --- a/src/app/models/InceptionV3/inception_inference_server.py +++ b/src/app/models/vgg16/vgg16_inference_server.py @@ -12,8 +12,8 @@ from rq import Queue from collections import defaultdict -# inception helpers -import INV3_helpers +# vgg16 helpers +import vgg16_helpers import settings # Keras @@ -27,14 +27,14 @@ pool = redis.ConnectionPool(host='redis', port=6379, db=0) db = redis.Redis(connection_pool=pool) -class inceptionV3_infernece_server: +class vgg16_infernece_server: def __init__(self): # pre-load some models here on start self.loaded_models = {} - def run_inceptionV3_infernece_server(self): + def run_vgg16_infernece_server(self): ''' - run the inference server for Inception V3 + run the inference server for VGG16 Pull image from the Redis, decode send to the model, predict @@ -52,7 +52,7 @@ def run_inceptionV3_infernece_server(self): q = json.loads(q.decode("utf-8")) # decode image - this_image = INV3_helpers.base64_decode_image(q['image'], + this_image = vgg16_helpers.base64_decode_image(q['image'], settings.IMAGE_TYPE, shape = settings.IMAGE_SHAPE) @@ -88,7 +88,7 @@ def run_inceptionV3_infernece_server(self): else: # load a fresh new model print "* Loading {} Model...".format(each_model_name) - model = load_model(os.path.join(settings.InceptionV3_MODEL_PATH, each_model_name, each_model_name+'.h5')) + model = load_model(os.path.join(settings.VGG16_MODEL_PATH, each_model_name, each_model_name+'.h5')) self.loaded_models[each_model_name] = model# save the model instance print "* {} Loaded and Saved in Mem.".format(each_model_name) @@ -97,7 +97,7 @@ def run_inceptionV3_infernece_server(self): # TO DO: # Decode prediction to get the class label - results = INV3_helpers.decode_pred_to_label(preds, each_model_name) + results = vgg16_helpers.decode_pred_to_label(preds, each_model_name) # loop ever each image in the batch for (each_id, each_result) in zip(this_ids, results): @@ -123,7 +123,7 @@ def run_inceptionV3_infernece_server(self): time.sleep(settings.SERVER_SLEEP) if __name__ == "__main__": - this_server = inceptionV3_infernece_server() - this_server.run_inceptionV3_infernece_server() + this_server = vgg16_infernece_server() + this_server.run_vgg16_infernece_server() \ No newline at end of file diff --git a/src/app/models/InceptionV3/inceptionV3_transfer_retraining.py b/src/app/models/vgg16/vgg16_transfer_retraining.py similarity index 72% rename from src/app/models/InceptionV3/inceptionV3_transfer_retraining.py rename to src/app/models/vgg16/vgg16_transfer_retraining.py index 60103a8..f2dbc3b 100644 --- a/src/app/models/InceptionV3/inceptionV3_transfer_retraining.py +++ b/src/app/models/vgg16/vgg16_transfer_retraining.py @@ -11,7 +11,7 @@ from keras.models import Model from keras.optimizers import SGD from keras.models import load_model -from keras.applications.inception_v3 import InceptionV3, preprocess_input +from keras.applications.vgg16 import VGG16, preprocess_input from keras.layers import Dense, GlobalAveragePooling2D from keras.preprocessing.image import ImageDataGenerator @@ -19,9 +19,10 @@ from app import app -TOPLESS_MODEL_PATH = app.config['INCEPTIONV3_TOPLESS_MODEL_PATH'] +TOPLESS_MODEL_PATH = app.config['VGG16_TOPLESS_MODEL_PATH'] +PATH_TO_SAVE_MODELS = app.config['PATH_TO_SAVE_MODELS'] -class InceptionRetrainer: +class Vgg16Retrainer: def __init__(self, model_name): self.model_name = model_name @@ -29,13 +30,15 @@ def retrain(self, local_data_path, nb_epoch, batch_size): """ retrain the model """ - model_path = os.path.join(model_name, model_name + '.h5') + model_path = os.path.join(PATH_TO_SAVE_MODELS, model_name, model_name + '.h5') + + print "* Re-trainer: Loading Model {}...".format(self.model_name) # load the model this_model = load_model(model_path) # load the training data - train_dir = os.path.join(local_dir, "train") - val_dir = os.path.join(local_dir, "val") + train_dir = os.path.join(local_data_path, "train") + val_dir = os.path.join(local_data_path, "val") # set up parameters nb_train_samples = self.__get_nb_files(train_dir) @@ -44,6 +47,28 @@ def retrain(self, local_data_path, nb_epoch, batch_size): nb_epoch = int(nb_epoch) batch_size = int(batch_size) + # data prep + train_datagen = ImageDataGenerator( + preprocessing_function = preprocess_input + ) + + val_datagen = ImageDataGenerator( + preprocessing_function=preprocess_input + ) + + # load training and validation data + print "* Re-trainer: Loading Training and Validation Data..." + train_generator = train_datagen.flow_from_directory( + train_dir, + target_size=(224, 224), + batch_size=batch_size) + + validation_generator = val_datagen.flow_from_directory( + val_dir, + target_size=(224, 224), + batch_size=batch_size, + ) + # retrain the model this_model.fit_generator(train_generator, nb_epoch=nb_epoch, @@ -52,15 +77,9 @@ def retrain(self, local_data_path, nb_epoch, batch_size): nb_val_samples=nb_val_samples, class_weight='auto') - # TO DO: - # consider concurrent - # in the inference server, since the models are loaded first - # in memory, I can deal with the new models there - # save the model - # replace the current model - this_model.save(model_path) + return this_model, model_path -class InceptionTransferLeaner: +class Vgg16TransferLeaner: def __init__(self, model_name): self.model_name = model_name @@ -71,9 +90,9 @@ def __init__(self, model_name): self.topless_model = load_model(TOPLESS_MODEL_PATH) except IOError: # load model from keras - self.topless_model = InceptionV3(include_top=False, + self.topless_model = VGG16(include_top=False, weights='imagenet', - input_shape=(299, 299, 3)) + input_shape=(224, 224, 3)) self.new_model = None # init the new model @@ -81,7 +100,7 @@ def transfer_model(self, local_dir, nb_epoch, batch_size): """ - transfer the topless InceptionV3 model + transfer the topless Vgg16 model to classify new classes """ train_dir = os.path.join(local_dir, "train") @@ -106,12 +125,12 @@ def transfer_model(self, local_dir, # generator train_generator = train_datagen.flow_from_directory( train_dir, - target_size=(299, 299), + target_size=(224, 224), batch_size=batch_size) validation_generator = val_datagen.flow_from_directory( val_dir, - target_size=(299, 299), + target_size=(224, 224), batch_size=batch_size, ) @@ -131,11 +150,12 @@ def transfer_model(self, local_dir, # TO DO: # celery tasks history_tl = self.new_model.fit_generator(train_generator, - nb_epoch=nb_epoch, - samples_per_epoch=nb_train_samples, + steps_per_epoch=nb_train_samples//batch_size, + epochs=nb_epoch, validation_data=validation_generator, - nb_val_samples=nb_val_samples, - class_weight='auto') + validation_steps=nb_val_samples//batch_size, + class_weight='auto', + verbose=1) # set up fine-tuning model self.__setup_to_finetune(self.new_model, nb_layer_to_freeze=10) @@ -143,21 +163,20 @@ def transfer_model(self, local_dir, print "* Transfer: Starting Fine-Tuning..." # train the new model again to fine-tune it history_ft = self.new_model.fit_generator(train_generator, - samples_per_epoch=nb_train_samples, - nb_epoch=nb_epoch, + steps_per_epoch=nb_train_samples//batch_size, + epochs=nb_epoch, validation_data=validation_generator, - nb_val_samples=nb_val_samples, - class_weight='auto') - + validation_steps=nb_val_samples//batch_size, + class_weight='auto', + verbose=1) - # return the model return self.new_model, classes_label_dict def __setup_to_finetune(self, model, nb_layer_to_freeze): """ Freeze the bottom NB_IV3_LAYERS and retrain the remaining top layers. - note: NB_IV3_LAYERS corresponds to the top 2 inception blocks in the inceptionv3 arch + note: NB_IV3_LAYERS corresponds to the top 2 vgg blocks in the vgg16 arch Args: model: keras model """ diff --git a/src/app/tasks.py b/src/app/tasks.py index 9a1473c..5af527d 100644 --- a/src/app/tasks.py +++ b/src/app/tasks.py @@ -9,43 +9,65 @@ from app import app -from .apis.InceptionV3 import API_helpers -from .models.InceptionV3 import inceptionV3_transfer_retraining +from .apis.vgg16 import API_helpers +from .models.vgg16 import vgg16_transfer_retraining CLIENT_SLEEP = app.config['CLIENT_SLEEP'] -INV3_TRANSFER_NB_EPOCH = app.config['INV3_TRANSFER_NB_EPOCH'] -INV3_TRANSFER_BATCH_SIZE = app.config['INV3_TRANSFER_BATCH_SIZE'] -INCEPTIONV3_IMAGE_QUEUE = app.config['INCEPTIONV3_IMAGE_QUEUE'] -INCEPTIONV3_TOPLESS_MODEL_PATH = app.config['INCEPTIONV3_TOPLESS_MODEL_PATH'] +VGG16_TRANSFER_NB_EPOCH = app.config['VGG16_TRANSFER_NB_EPOCH'] +VGG16_TRANSFER_BATCH_SIZE = app.config['VGG16_TRANSFER_BATCH_SIZE'] +VGG16_IMAGE_QUEUE = app.config['VGG16_IMAGE_QUEUE'] +VGG16_TOPLESS_MODEL_PATH = app.config['VGG16_TOPLESS_MODEL_PATH'] +@michaniki_celery_app.task() +def async_retrain(model_name, output_path, nb_epoch, batch_size, id): + """ + resume training an existing model + """ + try: + # kick off the retraining service in celery worker + this_retrainer = vgg16_transfer_retraining.Vgg16Retrainer(model_name) + + new_model, model_path = this_retrainer.retrain(output_path, nb_epoch, batch_size) + + # save the new model + new_model.save(model_path) + + # delete the image folder + shutil.rmtree(output_path, ignore_errors=True) + except Exception as err: + # delete the image folder + shutil.rmtree(output_path, ignore_errors=True) + raise + @michaniki_celery_app.task() def async_transfer(model_name, output_path, id): """ do transfer learning """ # create a subfolder for this model if not exist - new_model_folder_path = os.path.join("app", "models", "InceptionV3", model_name) + new_model_folder_path = os.path.join("app", "models", "vgg16", model_name) if not os.path.exists(new_model_folder_path): os.makedirs(new_model_folder_path) try: # init the transfer learning manager - this_IV3_transfer = inceptionV3_transfer_retraining.InceptionTransferLeaner(model_name) - new_model, label_dict = this_IV3_transfer.transfer_model(output_path, - nb_epoch = INV3_TRANSFER_NB_EPOCH, - batch_size = INV3_TRANSFER_BATCH_SIZE) + this_transfer = vgg16_transfer_retraining.Vgg16TransferLeaner(model_name) + new_model, label_dict = this_transfer.transfer_model(output_path, + nb_epoch = VGG16_TRANSFER_NB_EPOCH, + batch_size = VGG16_TRANSFER_BATCH_SIZE) # save the model .h5 file and the class label file new_model_path = os.path.join(new_model_folder_path, model_name + ".h5") new_label_path = os.path.join(new_model_folder_path, model_name + ".json") + new_model.save(new_model_path) API_helpers.save_classes_label_dict(label_dict, new_label_path) print "* Celery Transfer: New Model Saved at: {}".format(new_model_path) # delete the image folder here: - shutil.rmtree(output_path, ignore_errors=True) +# shutil.rmtree(output_path, ignore_errors=True) except Exception as err: # catch any error shutil.rmtree(new_model_folder_path, ignore_errors=True) - shutil.rmtree(output_path, ignore_errors=True) +# shutil.rmtree(output_path, ignore_errors=True) raise \ No newline at end of file diff --git a/src/config.py b/src/config.py index 5fcf0de..6175e83 100644 --- a/src/config.py +++ b/src/config.py @@ -2,15 +2,15 @@ import redis from envparse import env -# settings_for_MNIST -MNIST_IMAGE_QUEUE = env.str('MNIST_IMAGE_QUEUE', default='mnist_image_queue') CLIENT_SLEEP = env.str('CLIENT_SLEEP', default=0.5) +PATH_TO_SAVE_MODELS = env.str('PATH_TO_SAVE_MODELS', default=os.path.join("app", "models", "vgg16")) + # settings for InceptionV3 -INCEPTIONV3_TOPLESS_MODEL_PATH = env.str('INCEPTIONV3_TOPLESS_MODEL_PATH', default=os.path.join("app", "models", "InceptionV3", "topless",'topless.h5')) -INCEPTIONV3_IMAGE_QUEUE = env.str('INCEPTIONV3_IMAGE_QUEUE', default='inceptionV3_image_queue') -INV3_TRANSFER_NB_EPOCH = env.str('INV3_TRANSFER_NB_EPOCH', default=3) -INV3_TRANSFER_BATCH_SIZE = env.str('INV3_TRANSFER_BATCH_SIZE', default=2) +VGG16_TOPLESS_MODEL_PATH = env.str('VGG16_TOPLESS_MODEL_PATH', default=os.path.join("app", "models", "vgg16", "topless",'topless.h5')) +VGG16_IMAGE_QUEUE = env.str('VGG16_IMAGE_QUEUE', default='vgg16_image_queue') +VGG16_TRANSFER_NB_EPOCH = env.str('VGG16_TRANSFER_NB_EPOCH', default=3) +VGG16_TRANSFER_BATCH_SIZE = env.str('VGG16_TRANSFER_BATCH_SIZE', default=2) # setting for mysql db # parsed from environment variables diff --git a/src/install_base_model.py b/src/install_base_model.py index 3940b97..fdcf10e 100644 --- a/src/install_base_model.py +++ b/src/install_base_model.py @@ -2,17 +2,17 @@ import keras import redis -BASE_MODEL_PATH = os.path.join("app", "models", "InceptionV3", "base", "base.h5") -TOPLESS_MODEL_PATH = os.path.join("app", "models", "InceptionV3", "topless") +BASE_MODEL_PATH = os.path.join("app", "models", "vgg16", "base", "base.h5") +TOPLESS_MODEL_PATH = os.path.join("app", "models", "vgg16", "topless") # loading base model if os.path.exists(BASE_MODEL_PATH): print "* Starting: Found Base Model." else: print "* Starting: No Base Model Found. Loading..." - base_model = keras.applications.inception_v3.InceptionV3(include_top=True, + base_model = keras.applications.vgg16.VGG16(include_top=True, weights='imagenet', - input_shape=(299, 299, 3)) + input_shape=(224, 224, 3)) base_model.save(BASE_MODEL_PATH) print "* Starting: Base Model Saved!" @@ -22,9 +22,9 @@ else: os.makedirs(TOPLESS_MODEL_PATH) print "* Starting: No Topless Model Found. Loading..." - base_model = keras.applications.inception_v3.InceptionV3(include_top=False, + base_model = keras.applications.vgg16.VGG16(include_top=False, weights='imagenet', - input_shape=(299, 299, 3)) + input_shape=(224, 224, 3)) base_model.save(os.path.join(TOPLESS_MODEL_PATH, "topless.h5")) print "* Starting: Topless Model Saved!" diff --git a/src/notebooks/Inception V3.ipynb b/src/notebooks/Inception V3.ipynb index 610cf03..c7f1cac 100644 --- a/src/notebooks/Inception V3.ipynb +++ b/src/notebooks/Inception V3.ipynb @@ -43,682 +43,35 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "base_model.save('base.h5')" + ] + }, + { + "cell_type": "code", + "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "__________________________________________________________________________________________________\n", - "Layer (type) Output Shape Param # Connected to \n", - "==================================================================================================\n", - "input_2 (InputLayer) (None, 299, 299, 3) 0 \n", - "__________________________________________________________________________________________________\n", - "conv2d_95 (Conv2D) (None, 149, 149, 32) 864 input_2[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_95 (BatchNo (None, 149, 149, 32) 96 conv2d_95[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_95 (Activation) (None, 149, 149, 32) 0 batch_normalization_95[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_96 (Conv2D) (None, 147, 147, 32) 9216 activation_95[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_96 (BatchNo (None, 147, 147, 32) 96 conv2d_96[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_96 (Activation) (None, 147, 147, 32) 0 batch_normalization_96[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_97 (Conv2D) (None, 147, 147, 64) 18432 activation_96[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_97 (BatchNo (None, 147, 147, 64) 192 conv2d_97[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_97 (Activation) (None, 147, 147, 64) 0 batch_normalization_97[0][0] \n", - "__________________________________________________________________________________________________\n", - "max_pooling2d_5 (MaxPooling2D) (None, 73, 73, 64) 0 activation_97[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_98 (Conv2D) (None, 73, 73, 80) 5120 max_pooling2d_5[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_98 (BatchNo (None, 73, 73, 80) 240 conv2d_98[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_98 (Activation) (None, 73, 73, 80) 0 batch_normalization_98[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_99 (Conv2D) (None, 71, 71, 192) 138240 activation_98[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_99 (BatchNo (None, 71, 71, 192) 576 conv2d_99[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_99 (Activation) (None, 71, 71, 192) 0 batch_normalization_99[0][0] \n", - "__________________________________________________________________________________________________\n", - "max_pooling2d_6 (MaxPooling2D) (None, 35, 35, 192) 0 activation_99[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_103 (Conv2D) (None, 35, 35, 64) 12288 max_pooling2d_6[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_103 (BatchN (None, 35, 35, 64) 192 conv2d_103[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_103 (Activation) (None, 35, 35, 64) 0 batch_normalization_103[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_101 (Conv2D) (None, 35, 35, 48) 9216 max_pooling2d_6[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_104 (Conv2D) (None, 35, 35, 96) 55296 activation_103[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_101 (BatchN (None, 35, 35, 48) 144 conv2d_101[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_104 (BatchN (None, 35, 35, 96) 288 conv2d_104[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_101 (Activation) (None, 35, 35, 48) 0 batch_normalization_101[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_104 (Activation) (None, 35, 35, 96) 0 batch_normalization_104[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_10 (AveragePo (None, 35, 35, 192) 0 max_pooling2d_6[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_100 (Conv2D) (None, 35, 35, 64) 12288 max_pooling2d_6[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_102 (Conv2D) (None, 35, 35, 64) 76800 activation_101[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_105 (Conv2D) (None, 35, 35, 96) 82944 activation_104[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_106 (Conv2D) (None, 35, 35, 32) 6144 average_pooling2d_10[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_100 (BatchN (None, 35, 35, 64) 192 conv2d_100[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_102 (BatchN (None, 35, 35, 64) 192 conv2d_102[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_105 (BatchN (None, 35, 35, 96) 288 conv2d_105[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_106 (BatchN (None, 35, 35, 32) 96 conv2d_106[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_100 (Activation) (None, 35, 35, 64) 0 batch_normalization_100[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_102 (Activation) (None, 35, 35, 64) 0 batch_normalization_102[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_105 (Activation) (None, 35, 35, 96) 0 batch_normalization_105[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_106 (Activation) (None, 35, 35, 32) 0 batch_normalization_106[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed0 (Concatenate) (None, 35, 35, 256) 0 activation_100[0][0] \n", - " activation_102[0][0] \n", - " activation_105[0][0] \n", - " activation_106[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_110 (Conv2D) (None, 35, 35, 64) 16384 mixed0[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_110 (BatchN (None, 35, 35, 64) 192 conv2d_110[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_110 (Activation) (None, 35, 35, 64) 0 batch_normalization_110[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_108 (Conv2D) (None, 35, 35, 48) 12288 mixed0[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_111 (Conv2D) (None, 35, 35, 96) 55296 activation_110[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_108 (BatchN (None, 35, 35, 48) 144 conv2d_108[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_111 (BatchN (None, 35, 35, 96) 288 conv2d_111[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_108 (Activation) (None, 35, 35, 48) 0 batch_normalization_108[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_111 (Activation) (None, 35, 35, 96) 0 batch_normalization_111[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_11 (AveragePo (None, 35, 35, 256) 0 mixed0[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_107 (Conv2D) (None, 35, 35, 64) 16384 mixed0[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_109 (Conv2D) (None, 35, 35, 64) 76800 activation_108[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_112 (Conv2D) (None, 35, 35, 96) 82944 activation_111[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_113 (Conv2D) (None, 35, 35, 64) 16384 average_pooling2d_11[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_107 (BatchN (None, 35, 35, 64) 192 conv2d_107[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_109 (BatchN (None, 35, 35, 64) 192 conv2d_109[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_112 (BatchN (None, 35, 35, 96) 288 conv2d_112[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_113 (BatchN (None, 35, 35, 64) 192 conv2d_113[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_107 (Activation) (None, 35, 35, 64) 0 batch_normalization_107[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_109 (Activation) (None, 35, 35, 64) 0 batch_normalization_109[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_112 (Activation) (None, 35, 35, 96) 0 batch_normalization_112[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_113 (Activation) (None, 35, 35, 64) 0 batch_normalization_113[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed1 (Concatenate) (None, 35, 35, 288) 0 activation_107[0][0] \n", - " activation_109[0][0] \n", - " activation_112[0][0] \n", - " activation_113[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_117 (Conv2D) (None, 35, 35, 64) 18432 mixed1[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_117 (BatchN (None, 35, 35, 64) 192 conv2d_117[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_117 (Activation) (None, 35, 35, 64) 0 batch_normalization_117[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_115 (Conv2D) (None, 35, 35, 48) 13824 mixed1[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_118 (Conv2D) (None, 35, 35, 96) 55296 activation_117[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_115 (BatchN (None, 35, 35, 48) 144 conv2d_115[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_118 (BatchN (None, 35, 35, 96) 288 conv2d_118[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_115 (Activation) (None, 35, 35, 48) 0 batch_normalization_115[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_118 (Activation) (None, 35, 35, 96) 0 batch_normalization_118[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_12 (AveragePo (None, 35, 35, 288) 0 mixed1[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_114 (Conv2D) (None, 35, 35, 64) 18432 mixed1[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_116 (Conv2D) (None, 35, 35, 64) 76800 activation_115[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_119 (Conv2D) (None, 35, 35, 96) 82944 activation_118[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_120 (Conv2D) (None, 35, 35, 64) 18432 average_pooling2d_12[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_114 (BatchN (None, 35, 35, 64) 192 conv2d_114[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_116 (BatchN (None, 35, 35, 64) 192 conv2d_116[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_119 (BatchN (None, 35, 35, 96) 288 conv2d_119[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_120 (BatchN (None, 35, 35, 64) 192 conv2d_120[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_114 (Activation) (None, 35, 35, 64) 0 batch_normalization_114[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_116 (Activation) (None, 35, 35, 64) 0 batch_normalization_116[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_119 (Activation) (None, 35, 35, 96) 0 batch_normalization_119[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_120 (Activation) (None, 35, 35, 64) 0 batch_normalization_120[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed2 (Concatenate) (None, 35, 35, 288) 0 activation_114[0][0] \n", - " activation_116[0][0] \n", - " activation_119[0][0] \n", - " activation_120[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_122 (Conv2D) (None, 35, 35, 64) 18432 mixed2[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_122 (BatchN (None, 35, 35, 64) 192 conv2d_122[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_122 (Activation) (None, 35, 35, 64) 0 batch_normalization_122[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_123 (Conv2D) (None, 35, 35, 96) 55296 activation_122[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_123 (BatchN (None, 35, 35, 96) 288 conv2d_123[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_123 (Activation) (None, 35, 35, 96) 0 batch_normalization_123[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_121 (Conv2D) (None, 17, 17, 384) 995328 mixed2[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_124 (Conv2D) (None, 17, 17, 96) 82944 activation_123[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_121 (BatchN (None, 17, 17, 384) 1152 conv2d_121[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_124 (BatchN (None, 17, 17, 96) 288 conv2d_124[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_121 (Activation) (None, 17, 17, 384) 0 batch_normalization_121[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_124 (Activation) (None, 17, 17, 96) 0 batch_normalization_124[0][0] \n", - "__________________________________________________________________________________________________\n", - "max_pooling2d_7 (MaxPooling2D) (None, 17, 17, 288) 0 mixed2[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed3 (Concatenate) (None, 17, 17, 768) 0 activation_121[0][0] \n", - " activation_124[0][0] \n", - " max_pooling2d_7[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_129 (Conv2D) (None, 17, 17, 128) 98304 mixed3[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_129 (BatchN (None, 17, 17, 128) 384 conv2d_129[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_129 (Activation) (None, 17, 17, 128) 0 batch_normalization_129[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_130 (Conv2D) (None, 17, 17, 128) 114688 activation_129[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_130 (BatchN (None, 17, 17, 128) 384 conv2d_130[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_130 (Activation) (None, 17, 17, 128) 0 batch_normalization_130[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_126 (Conv2D) (None, 17, 17, 128) 98304 mixed3[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_131 (Conv2D) (None, 17, 17, 128) 114688 activation_130[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_126 (BatchN (None, 17, 17, 128) 384 conv2d_126[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_131 (BatchN (None, 17, 17, 128) 384 conv2d_131[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_126 (Activation) (None, 17, 17, 128) 0 batch_normalization_126[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_131 (Activation) (None, 17, 17, 128) 0 batch_normalization_131[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_127 (Conv2D) (None, 17, 17, 128) 114688 activation_126[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_132 (Conv2D) (None, 17, 17, 128) 114688 activation_131[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_127 (BatchN (None, 17, 17, 128) 384 conv2d_127[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_132 (BatchN (None, 17, 17, 128) 384 conv2d_132[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_127 (Activation) (None, 17, 17, 128) 0 batch_normalization_127[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_132 (Activation) (None, 17, 17, 128) 0 batch_normalization_132[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_13 (AveragePo (None, 17, 17, 768) 0 mixed3[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_125 (Conv2D) (None, 17, 17, 192) 147456 mixed3[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_128 (Conv2D) (None, 17, 17, 192) 172032 activation_127[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_133 (Conv2D) (None, 17, 17, 192) 172032 activation_132[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_134 (Conv2D) (None, 17, 17, 192) 147456 average_pooling2d_13[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_125 (BatchN (None, 17, 17, 192) 576 conv2d_125[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_128 (BatchN (None, 17, 17, 192) 576 conv2d_128[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_133 (BatchN (None, 17, 17, 192) 576 conv2d_133[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_134 (BatchN (None, 17, 17, 192) 576 conv2d_134[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_125 (Activation) (None, 17, 17, 192) 0 batch_normalization_125[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_128 (Activation) (None, 17, 17, 192) 0 batch_normalization_128[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_133 (Activation) (None, 17, 17, 192) 0 batch_normalization_133[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_134 (Activation) (None, 17, 17, 192) 0 batch_normalization_134[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed4 (Concatenate) (None, 17, 17, 768) 0 activation_125[0][0] \n", - " activation_128[0][0] \n", - " activation_133[0][0] \n", - " activation_134[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_139 (Conv2D) (None, 17, 17, 160) 122880 mixed4[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_139 (BatchN (None, 17, 17, 160) 480 conv2d_139[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_139 (Activation) (None, 17, 17, 160) 0 batch_normalization_139[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_140 (Conv2D) (None, 17, 17, 160) 179200 activation_139[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_140 (BatchN (None, 17, 17, 160) 480 conv2d_140[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_140 (Activation) (None, 17, 17, 160) 0 batch_normalization_140[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_136 (Conv2D) (None, 17, 17, 160) 122880 mixed4[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_141 (Conv2D) (None, 17, 17, 160) 179200 activation_140[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_136 (BatchN (None, 17, 17, 160) 480 conv2d_136[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_141 (BatchN (None, 17, 17, 160) 480 conv2d_141[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_136 (Activation) (None, 17, 17, 160) 0 batch_normalization_136[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_141 (Activation) (None, 17, 17, 160) 0 batch_normalization_141[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_137 (Conv2D) (None, 17, 17, 160) 179200 activation_136[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_142 (Conv2D) (None, 17, 17, 160) 179200 activation_141[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_137 (BatchN (None, 17, 17, 160) 480 conv2d_137[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_142 (BatchN (None, 17, 17, 160) 480 conv2d_142[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_137 (Activation) (None, 17, 17, 160) 0 batch_normalization_137[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_142 (Activation) (None, 17, 17, 160) 0 batch_normalization_142[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_14 (AveragePo (None, 17, 17, 768) 0 mixed4[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_135 (Conv2D) (None, 17, 17, 192) 147456 mixed4[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_138 (Conv2D) (None, 17, 17, 192) 215040 activation_137[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_143 (Conv2D) (None, 17, 17, 192) 215040 activation_142[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_144 (Conv2D) (None, 17, 17, 192) 147456 average_pooling2d_14[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_135 (BatchN (None, 17, 17, 192) 576 conv2d_135[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_138 (BatchN (None, 17, 17, 192) 576 conv2d_138[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_143 (BatchN (None, 17, 17, 192) 576 conv2d_143[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_144 (BatchN (None, 17, 17, 192) 576 conv2d_144[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_135 (Activation) (None, 17, 17, 192) 0 batch_normalization_135[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_138 (Activation) (None, 17, 17, 192) 0 batch_normalization_138[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_143 (Activation) (None, 17, 17, 192) 0 batch_normalization_143[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_144 (Activation) (None, 17, 17, 192) 0 batch_normalization_144[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed5 (Concatenate) (None, 17, 17, 768) 0 activation_135[0][0] \n", - " activation_138[0][0] \n", - " activation_143[0][0] \n", - " activation_144[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_149 (Conv2D) (None, 17, 17, 160) 122880 mixed5[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_149 (BatchN (None, 17, 17, 160) 480 conv2d_149[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_149 (Activation) (None, 17, 17, 160) 0 batch_normalization_149[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_150 (Conv2D) (None, 17, 17, 160) 179200 activation_149[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_150 (BatchN (None, 17, 17, 160) 480 conv2d_150[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_150 (Activation) (None, 17, 17, 160) 0 batch_normalization_150[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_146 (Conv2D) (None, 17, 17, 160) 122880 mixed5[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_151 (Conv2D) (None, 17, 17, 160) 179200 activation_150[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_146 (BatchN (None, 17, 17, 160) 480 conv2d_146[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_151 (BatchN (None, 17, 17, 160) 480 conv2d_151[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_146 (Activation) (None, 17, 17, 160) 0 batch_normalization_146[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_151 (Activation) (None, 17, 17, 160) 0 batch_normalization_151[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_147 (Conv2D) (None, 17, 17, 160) 179200 activation_146[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_152 (Conv2D) (None, 17, 17, 160) 179200 activation_151[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_147 (BatchN (None, 17, 17, 160) 480 conv2d_147[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_152 (BatchN (None, 17, 17, 160) 480 conv2d_152[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_147 (Activation) (None, 17, 17, 160) 0 batch_normalization_147[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_152 (Activation) (None, 17, 17, 160) 0 batch_normalization_152[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_15 (AveragePo (None, 17, 17, 768) 0 mixed5[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_145 (Conv2D) (None, 17, 17, 192) 147456 mixed5[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_148 (Conv2D) (None, 17, 17, 192) 215040 activation_147[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_153 (Conv2D) (None, 17, 17, 192) 215040 activation_152[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_154 (Conv2D) (None, 17, 17, 192) 147456 average_pooling2d_15[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_145 (BatchN (None, 17, 17, 192) 576 conv2d_145[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_148 (BatchN (None, 17, 17, 192) 576 conv2d_148[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_153 (BatchN (None, 17, 17, 192) 576 conv2d_153[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_154 (BatchN (None, 17, 17, 192) 576 conv2d_154[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_145 (Activation) (None, 17, 17, 192) 0 batch_normalization_145[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_148 (Activation) (None, 17, 17, 192) 0 batch_normalization_148[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_153 (Activation) (None, 17, 17, 192) 0 batch_normalization_153[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_154 (Activation) (None, 17, 17, 192) 0 batch_normalization_154[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed6 (Concatenate) (None, 17, 17, 768) 0 activation_145[0][0] \n", - " activation_148[0][0] \n", - " activation_153[0][0] \n", - " activation_154[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_159 (Conv2D) (None, 17, 17, 192) 147456 mixed6[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_159 (BatchN (None, 17, 17, 192) 576 conv2d_159[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_159 (Activation) (None, 17, 17, 192) 0 batch_normalization_159[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_160 (Conv2D) (None, 17, 17, 192) 258048 activation_159[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_160 (BatchN (None, 17, 17, 192) 576 conv2d_160[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_160 (Activation) (None, 17, 17, 192) 0 batch_normalization_160[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_156 (Conv2D) (None, 17, 17, 192) 147456 mixed6[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_161 (Conv2D) (None, 17, 17, 192) 258048 activation_160[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_156 (BatchN (None, 17, 17, 192) 576 conv2d_156[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_161 (BatchN (None, 17, 17, 192) 576 conv2d_161[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_156 (Activation) (None, 17, 17, 192) 0 batch_normalization_156[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_161 (Activation) (None, 17, 17, 192) 0 batch_normalization_161[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_157 (Conv2D) (None, 17, 17, 192) 258048 activation_156[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_162 (Conv2D) (None, 17, 17, 192) 258048 activation_161[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_157 (BatchN (None, 17, 17, 192) 576 conv2d_157[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_162 (BatchN (None, 17, 17, 192) 576 conv2d_162[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_157 (Activation) (None, 17, 17, 192) 0 batch_normalization_157[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_162 (Activation) (None, 17, 17, 192) 0 batch_normalization_162[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_16 (AveragePo (None, 17, 17, 768) 0 mixed6[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_155 (Conv2D) (None, 17, 17, 192) 147456 mixed6[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_158 (Conv2D) (None, 17, 17, 192) 258048 activation_157[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_163 (Conv2D) (None, 17, 17, 192) 258048 activation_162[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_164 (Conv2D) (None, 17, 17, 192) 147456 average_pooling2d_16[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_155 (BatchN (None, 17, 17, 192) 576 conv2d_155[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_158 (BatchN (None, 17, 17, 192) 576 conv2d_158[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_163 (BatchN (None, 17, 17, 192) 576 conv2d_163[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_164 (BatchN (None, 17, 17, 192) 576 conv2d_164[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_155 (Activation) (None, 17, 17, 192) 0 batch_normalization_155[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_158 (Activation) (None, 17, 17, 192) 0 batch_normalization_158[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_163 (Activation) (None, 17, 17, 192) 0 batch_normalization_163[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_164 (Activation) (None, 17, 17, 192) 0 batch_normalization_164[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed7 (Concatenate) (None, 17, 17, 768) 0 activation_155[0][0] \n", - " activation_158[0][0] \n", - " activation_163[0][0] \n", - " activation_164[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_167 (Conv2D) (None, 17, 17, 192) 147456 mixed7[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_167 (BatchN (None, 17, 17, 192) 576 conv2d_167[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_167 (Activation) (None, 17, 17, 192) 0 batch_normalization_167[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_168 (Conv2D) (None, 17, 17, 192) 258048 activation_167[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_168 (BatchN (None, 17, 17, 192) 576 conv2d_168[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_168 (Activation) (None, 17, 17, 192) 0 batch_normalization_168[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_165 (Conv2D) (None, 17, 17, 192) 147456 mixed7[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_169 (Conv2D) (None, 17, 17, 192) 258048 activation_168[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_165 (BatchN (None, 17, 17, 192) 576 conv2d_165[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_169 (BatchN (None, 17, 17, 192) 576 conv2d_169[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_165 (Activation) (None, 17, 17, 192) 0 batch_normalization_165[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_169 (Activation) (None, 17, 17, 192) 0 batch_normalization_169[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_166 (Conv2D) (None, 8, 8, 320) 552960 activation_165[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_170 (Conv2D) (None, 8, 8, 192) 331776 activation_169[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_166 (BatchN (None, 8, 8, 320) 960 conv2d_166[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_170 (BatchN (None, 8, 8, 192) 576 conv2d_170[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_166 (Activation) (None, 8, 8, 320) 0 batch_normalization_166[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_170 (Activation) (None, 8, 8, 192) 0 batch_normalization_170[0][0] \n", - "__________________________________________________________________________________________________\n", - "max_pooling2d_8 (MaxPooling2D) (None, 8, 8, 768) 0 mixed7[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed8 (Concatenate) (None, 8, 8, 1280) 0 activation_166[0][0] \n", - " activation_170[0][0] \n", - " max_pooling2d_8[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_175 (Conv2D) (None, 8, 8, 448) 573440 mixed8[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_175 (BatchN (None, 8, 8, 448) 1344 conv2d_175[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_175 (Activation) (None, 8, 8, 448) 0 batch_normalization_175[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_172 (Conv2D) (None, 8, 8, 384) 491520 mixed8[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_176 (Conv2D) (None, 8, 8, 384) 1548288 activation_175[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_172 (BatchN (None, 8, 8, 384) 1152 conv2d_172[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_176 (BatchN (None, 8, 8, 384) 1152 conv2d_176[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_172 (Activation) (None, 8, 8, 384) 0 batch_normalization_172[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_176 (Activation) (None, 8, 8, 384) 0 batch_normalization_176[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_173 (Conv2D) (None, 8, 8, 384) 442368 activation_172[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_174 (Conv2D) (None, 8, 8, 384) 442368 activation_172[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_177 (Conv2D) (None, 8, 8, 384) 442368 activation_176[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_178 (Conv2D) (None, 8, 8, 384) 442368 activation_176[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_17 (AveragePo (None, 8, 8, 1280) 0 mixed8[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_171 (Conv2D) (None, 8, 8, 320) 409600 mixed8[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_173 (BatchN (None, 8, 8, 384) 1152 conv2d_173[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_174 (BatchN (None, 8, 8, 384) 1152 conv2d_174[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_177 (BatchN (None, 8, 8, 384) 1152 conv2d_177[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_178 (BatchN (None, 8, 8, 384) 1152 conv2d_178[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_179 (Conv2D) (None, 8, 8, 192) 245760 average_pooling2d_17[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_171 (BatchN (None, 8, 8, 320) 960 conv2d_171[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_173 (Activation) (None, 8, 8, 384) 0 batch_normalization_173[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_174 (Activation) (None, 8, 8, 384) 0 batch_normalization_174[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_177 (Activation) (None, 8, 8, 384) 0 batch_normalization_177[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_178 (Activation) (None, 8, 8, 384) 0 batch_normalization_178[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_179 (BatchN (None, 8, 8, 192) 576 conv2d_179[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_171 (Activation) (None, 8, 8, 320) 0 batch_normalization_171[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed9_0 (Concatenate) (None, 8, 8, 768) 0 activation_173[0][0] \n", - " activation_174[0][0] \n", - "__________________________________________________________________________________________________\n", - "concatenate_3 (Concatenate) (None, 8, 8, 768) 0 activation_177[0][0] \n", - " activation_178[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_179 (Activation) (None, 8, 8, 192) 0 batch_normalization_179[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed9 (Concatenate) (None, 8, 8, 2048) 0 activation_171[0][0] \n", - " mixed9_0[0][0] \n", - " concatenate_3[0][0] \n", - " activation_179[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_184 (Conv2D) (None, 8, 8, 448) 917504 mixed9[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_184 (BatchN (None, 8, 8, 448) 1344 conv2d_184[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_184 (Activation) (None, 8, 8, 448) 0 batch_normalization_184[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_181 (Conv2D) (None, 8, 8, 384) 786432 mixed9[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_185 (Conv2D) (None, 8, 8, 384) 1548288 activation_184[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_181 (BatchN (None, 8, 8, 384) 1152 conv2d_181[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_185 (BatchN (None, 8, 8, 384) 1152 conv2d_185[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_181 (Activation) (None, 8, 8, 384) 0 batch_normalization_181[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_185 (Activation) (None, 8, 8, 384) 0 batch_normalization_185[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_182 (Conv2D) (None, 8, 8, 384) 442368 activation_181[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_183 (Conv2D) (None, 8, 8, 384) 442368 activation_181[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_186 (Conv2D) (None, 8, 8, 384) 442368 activation_185[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_187 (Conv2D) (None, 8, 8, 384) 442368 activation_185[0][0] \n", - "__________________________________________________________________________________________________\n", - "average_pooling2d_18 (AveragePo (None, 8, 8, 2048) 0 mixed9[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_180 (Conv2D) (None, 8, 8, 320) 655360 mixed9[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_182 (BatchN (None, 8, 8, 384) 1152 conv2d_182[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_183 (BatchN (None, 8, 8, 384) 1152 conv2d_183[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_186 (BatchN (None, 8, 8, 384) 1152 conv2d_186[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_187 (BatchN (None, 8, 8, 384) 1152 conv2d_187[0][0] \n", - "__________________________________________________________________________________________________\n", - "conv2d_188 (Conv2D) (None, 8, 8, 192) 393216 average_pooling2d_18[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_180 (BatchN (None, 8, 8, 320) 960 conv2d_180[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_182 (Activation) (None, 8, 8, 384) 0 batch_normalization_182[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_183 (Activation) (None, 8, 8, 384) 0 batch_normalization_183[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_186 (Activation) (None, 8, 8, 384) 0 batch_normalization_186[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_187 (Activation) (None, 8, 8, 384) 0 batch_normalization_187[0][0] \n", - "__________________________________________________________________________________________________\n", - "batch_normalization_188 (BatchN (None, 8, 8, 192) 576 conv2d_188[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_180 (Activation) (None, 8, 8, 320) 0 batch_normalization_180[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed9_1 (Concatenate) (None, 8, 8, 768) 0 activation_182[0][0] \n", - " activation_183[0][0] \n", - "__________________________________________________________________________________________________\n", - "concatenate_4 (Concatenate) (None, 8, 8, 768) 0 activation_186[0][0] \n", - " activation_187[0][0] \n", - "__________________________________________________________________________________________________\n", - "activation_188 (Activation) (None, 8, 8, 192) 0 batch_normalization_188[0][0] \n", - "__________________________________________________________________________________________________\n", - "mixed10 (Concatenate) (None, 8, 8, 2048) 0 activation_180[0][0] \n", - " mixed9_1[0][0] \n", - " concatenate_4[0][0] \n", - " activation_188[0][0] \n", - "==================================================================================================\n", - "Total params: 21,802,784\n", - "Trainable params: 21,768,352\n", - "Non-trainable params: 34,432\n", - "__________________________________________________________________________________________________\n" + "Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels.h5\n", + "553467904/553467096 [==============================] - 1248s 2us/step\n", + "553476096/553467096 [==============================] - 1248s 2us/step\n" ] } ], "source": [ - "base_model.summary()" + "# Load VGG16 model\n", + "from keras_applications import vgg16\n", + "\n", + "vgg16_base = keras.applications.vgg16.VGG16(include_top=True, \n", + " weights='imagenet', \n", + " input_shape=(224, 224, 3))" ] }, { @@ -727,7 +80,7 @@ "metadata": {}, "outputs": [], "source": [ - "base_model.save('base.h5')" + "vgg16_base.save(\"vgg16_base.h5\")" ] }, { diff --git a/src/notebooks/Untitled.ipynb b/src/notebooks/Untitled.ipynb new file mode 100644 index 0000000..2cbb373 --- /dev/null +++ b/src/notebooks/Untitled.ipynb @@ -0,0 +1,64 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ")]}'\n", + "{\"HouseInfoResponse\":{\"house_assumptions\":{\"discount_rate_percent\":4,\"electricity_provider\":\"Pacific Gas and Electric Company (PG\\u0026E)\",\"rate_plan_name\":\"\",\"roof_good_solar_square_feet\":722.35236,\"yearly_hours_direct_sunlight\":1824.0618,\"yearly_panel_degradation\":0.5,\"yearly_price_increase\":2.2},\"house_center\":{\"latitude\":34.421671,\"longitude\":-119.8625077},\"house_found\":true,\"solar_potential_html\":\"Your roof has \\u003cb\\u003egood\\u003c\\/b\\u003e solar potential. Customize your savings estimate below.\",\"solar_savings_for_bill\":[{\"average_monthly_bill\":20,\"bill_assumptions\":{\"current_kwh_per_year\":0},\"default_bill\":false},{\"average_monthly_bill\":25,\"bill_assumptions\":{\"current_kwh_per_year\":0},\"default_bill\":false},{\"average_monthly_bill\":30,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":8898},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-314.8,\"carbon_offset_cars_per_yr\":0.10332567,\"carbon_offset_metric_tons\":0.48873043,\"carbon_offset_trees_per_10_yrs\":12.531549,\"energy_independence_percent\":84.68623,\"infull_details\":{\"first_year_savings\":288,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":19.25,\"total_other_payments\":0,\"twenty_year_savings\":6804,\"twenty_year_savings_present_value\":-1933.5854,\"upfront_cost\":6569},\"leasing_details\":{\"first_year_savings\":-325,\"other_payments_description\":\"240 monthly lease payments of $51.\",\"payback_period_in_years\":-1,\"total_other_payments\":12255.439,\"twenty_year_savings\":-5451,\"twenty_year_savings_present_value\":-4025.5664,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-306,\"other_payments_description\":\"240 monthly loan payments of $49. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":11878.481,\"twenty_year_savings\":-5074,\"twenty_year_savings_present_value\":-3759.171,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":4,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":2815,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":9384.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2094,\"utility_incentive\":0}}]},{\"average_monthly_bill\":35,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":10400},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-287.2,\"carbon_offset_cars_per_yr\":0.12873326,\"carbon_offset_metric_tons\":0.60890836,\"carbon_offset_trees_per_10_yrs\":15.613034,\"energy_independence_percent\":90.437515,\"infull_details\":{\"first_year_savings\":362,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":17,\"total_other_payments\":0,\"twenty_year_savings\":8564,\"twenty_year_savings_present_value\":-1263.8792,\"upfront_cost\":7098},\"leasing_details\":{\"first_year_savings\":-300,\"other_payments_description\":\"240 monthly lease payments of $55.\",\"payback_period_in_years\":-1,\"total_other_payments\":13241.447,\"twenty_year_savings\":-4678,\"twenty_year_savings_present_value\":-3524.1685,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-280,\"other_payments_description\":\"240 monthly loan payments of $53. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":12834.162,\"twenty_year_savings\":-4270,\"twenty_year_savings_present_value\":-3236.3423,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":5,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3041,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":10139.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":1837,\"utility_incentive\":0}}]},{\"average_monthly_bill\":40,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":11903},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-259.8,\"carbon_offset_cars_per_yr\":0.15401776,\"carbon_offset_metric_tons\":0.728504,\"carbon_offset_trees_per_10_yrs\":18.67959,\"energy_independence_percent\":94.67529,\"infull_details\":{\"first_year_savings\":436,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":15.25,\"total_other_payments\":0,\"twenty_year_savings\":10315,\"twenty_year_savings_present_value\":-599.60394,\"upfront_cost\":7626},\"leasing_details\":{\"first_year_savings\":-276,\"other_payments_description\":\"240 monthly lease payments of $59.\",\"payback_period_in_years\":-1,\"total_other_payments\":14227.457,\"twenty_year_savings\":-3912,\"twenty_year_savings_present_value\":-3028.2021,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-254,\"other_payments_description\":\"240 monthly loan payments of $57. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":13789.844,\"twenty_year_savings\":-3474,\"twenty_year_savings_present_value\":-2718.9414,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":6,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3268,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":10894.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":1588,\"utility_incentive\":0}}]},{\"average_monthly_bill\":45,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":13405},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-232.6,\"carbon_offset_cars_per_yr\":0.17926557,\"carbon_offset_metric_tons\":0.84792614,\"carbon_offset_trees_per_10_yrs\":21.741695,\"energy_independence_percent\":97.95131,\"infull_details\":{\"first_year_savings\":510,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":14,\"total_other_payments\":0,\"twenty_year_savings\":12065,\"twenty_year_savings_present_value\":63.0542,\"upfront_cost\":8155},\"leasing_details\":{\"first_year_savings\":-251,\"other_payments_description\":\"240 monthly lease payments of $63.\",\"payback_period_in_years\":-1,\"total_other_payments\":15213.466,\"twenty_year_savings\":-3149,\"twenty_year_savings_present_value\":-2533.8555,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-228,\"other_payments_description\":\"240 monthly loan payments of $61. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":14745.525,\"twenty_year_savings\":-2681,\"twenty_year_savings_present_value\":-2203.162,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":7,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3494,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":11649.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":1341,\"utility_incentive\":0}}]},{\"average_monthly_bill\":50,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":14907},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-227.8,\"carbon_offset_cars_per_yr\":0.17926557,\"carbon_offset_metric_tons\":0.84792614,\"carbon_offset_trees_per_10_yrs\":21.741695,\"energy_independence_percent\":88.15617,\"infull_details\":{\"first_year_savings\":514,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":14,\"total_other_payments\":0,\"twenty_year_savings\":12179,\"twenty_year_savings_present_value\":140.48439,\"upfront_cost\":8155},\"leasing_details\":{\"first_year_savings\":-246,\"other_payments_description\":\"240 monthly lease payments of $63.\",\"payback_period_in_years\":-1,\"total_other_payments\":15213.466,\"twenty_year_savings\":-3034,\"twenty_year_savings_present_value\":-2456.421,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-223,\"other_payments_description\":\"240 monthly loan payments of $61. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":14745.525,\"twenty_year_savings\":-2566,\"twenty_year_savings_present_value\":-2125.7275,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":7,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3494,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":11649.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2729,\"utility_incentive\":0}}]},{\"average_monthly_bill\":60,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":17912},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-170.2,\"carbon_offset_cars_per_yr\":0.22931457,\"carbon_offset_metric_tons\":1.0846579,\"carbon_offset_trees_per_10_yrs\":27.81174,\"energy_independence_percent\":94.58007,\"infull_details\":{\"first_year_savings\":665,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":12.5,\"total_other_payments\":0,\"twenty_year_savings\":15755,\"twenty_year_savings_present_value\":1518.3691,\"upfront_cost\":9212},\"leasing_details\":{\"first_year_savings\":-194,\"other_payments_description\":\"240 monthly lease payments of $72.\",\"payback_period_in_years\":-1,\"total_other_payments\":17185.484,\"twenty_year_savings\":-1430,\"twenty_year_savings_present_value\":-1415.1602,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-168,\"other_payments_description\":\"240 monthly loan payments of $69. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":16656.887,\"twenty_year_savings\":-901,\"twenty_year_savings_present_value\":-1041.6025,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":9,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3947,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":13159.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2157,\"utility_incentive\":0}}]},{\"average_monthly_bill\":70,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":20916},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-120.2,\"carbon_offset_cars_per_yr\":0.25427344,\"carbon_offset_metric_tons\":1.2027134,\"carbon_offset_trees_per_10_yrs\":30.838804,\"energy_independence_percent\":91.94036,\"infull_details\":{\"first_year_savings\":761,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":11.5,\"total_other_payments\":0,\"twenty_year_savings\":18048,\"twenty_year_savings_present_value\":2548.8376,\"upfront_cost\":9740},\"leasing_details\":{\"first_year_savings\":-148,\"other_payments_description\":\"240 monthly lease payments of $76.\",\"payback_period_in_years\":-1,\"total_other_payments\":18171.492,\"twenty_year_savings\":-123,\"twenty_year_savings_present_value\":-552.99805,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-120,\"other_payments_description\":\"240 monthly loan payments of $73. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":17612.566,\"twenty_year_savings\":436,\"twenty_year_savings_present_value\":-158.00684,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":10,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":4174,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":13914.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2869,\"utility_incentive\":0}}]},{\"average_monthly_bill\":80,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":23921},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-42.6,\"carbon_offset_cars_per_yr\":0.3028356,\"carbon_offset_metric_tons\":1.4324125,\"carbon_offset_trees_per_10_yrs\":36.728523,\"energy_independence_percent\":98.56903,\"infull_details\":{\"first_year_savings\":931,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":10.5,\"total_other_payments\":0,\"twenty_year_savings\":22104,\"twenty_year_savings_present_value\":4250.866,\"upfront_cost\":10797},\"leasing_details\":{\"first_year_savings\":-76,\"other_payments_description\":\"240 monthly lease payments of $84.\",\"payback_period_in_years\":-1,\"total_other_payments\":20143.512,\"twenty_year_savings\":1961,\"twenty_year_savings_present_value\":812.41504,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-45,\"other_payments_description\":\"240 monthly loan payments of $81. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":19523.93,\"twenty_year_savings\":2580,\"twenty_year_savings_present_value\":1250.2734,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":12,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":4627,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":15424.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":1817,\"utility_incentive\":0}}]},{\"average_monthly_bill\":90,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":26925},\"default_bill\":true,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":17,\"carbon_offset_cars_per_yr\":0.32648405,\"carbon_offset_metric_tons\":1.5442696,\"carbon_offset_trees_per_10_yrs\":39.596653,\"energy_independence_percent\":96.96697,\"infull_details\":{\"first_year_savings\":1036,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":10,\"total_other_payments\":0,\"twenty_year_savings\":24629,\"twenty_year_savings_present_value\":5438.054,\"upfront_cost\":11326},\"leasing_details\":{\"first_year_savings\":-21,\"other_payments_description\":\"240 monthly lease payments of $88.\",\"payback_period_in_years\":-1,\"total_other_payments\":21129.52,\"twenty_year_savings\":3499,\"twenty_year_savings_present_value\":1831.2871,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":12,\"other_payments_description\":\"240 monthly loan payments of $85. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":20479.611,\"twenty_year_savings\":4149,\"twenty_year_savings_present_value\":2290.5771,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":13,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":4853,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":16179.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2297,\"utility_incentive\":0}}]},{\"average_monthly_bill\":100,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":29930},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":74.6,\"carbon_offset_cars_per_yr\":0.3493745,\"carbon_offset_metric_tons\":1.6525414,\"carbon_offset_trees_per_10_yrs\":42.372856,\"energy_independence_percent\":95.415726,\"infull_details\":{\"first_year_savings\":1138,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":9.5,\"total_other_payments\":0,\"twenty_year_savings\":27105,\"twenty_year_savings_present_value\":6591.79,\"upfront_cost\":11854},\"leasing_details\":{\"first_year_savings\":33,\"other_payments_description\":\"240 monthly lease payments of $92.\",\"payback_period_in_years\":-1,\"total_other_payments\":22115.53,\"twenty_year_savings\":4989,\"twenty_year_savings_present_value\":2816.7158,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":67,\"other_payments_description\":\"240 monthly loan payments of $89. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":21435.291,\"twenty_year_savings\":5669,\"twenty_year_savings_present_value\":3297.4395,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":14,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":5080,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":16934.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2826,\"utility_incentive\":0}}]},{\"average_monthly_bill\":125,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":37441},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":237.4,\"carbon_offset_cars_per_yr\":0.43880445,\"carbon_offset_metric_tons\":2.075545,\"carbon_offset_trees_per_10_yrs\":53.219105,\"energy_independence_percent\":99.90289,\"infull_details\":{\"first_year_savings\":1485,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":8.75,\"total_other_payments\":0,\"twenty_year_savings\":35420,\"twenty_year_savings_present_value\":10131.207,\"upfront_cost\":13968},\"leasing_details\":{\"first_year_savings\":182,\"other_payments_description\":\"240 monthly lease payments of $109.\",\"payback_period_in_years\":-1,\"total_other_payments\":26059.566,\"twenty_year_savings\":9360,\"twenty_year_savings_present_value\":5682.8945,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":223,\"other_payments_description\":\"240 monthly loan payments of $105. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":25258.016,\"twenty_year_savings\":10162,\"twenty_year_savings_present_value\":6249.3477,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":18,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":5986,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":19954.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2022,\"utility_incentive\":0}}]},{\"average_monthly_bill\":150,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":44953},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":400,\"carbon_offset_cars_per_yr\":0.5047208,\"carbon_offset_metric_tons\":2.3873293,\"carbon_offset_trees_per_10_yrs\":61.213573,\"energy_independence_percent\":99.66765,\"infull_details\":{\"first_year_savings\":1784,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":8,\"total_other_payments\":0,\"twenty_year_savings\":42615,\"twenty_year_savings_present_value\":13434.333,\"upfront_cost\":15554},\"leasing_details\":{\"first_year_savings\":333,\"other_payments_description\":\"240 monthly lease payments of $121.\",\"payback_period_in_years\":-1,\"total_other_payments\":29017.59,\"twenty_year_savings\":13597,\"twenty_year_savings_present_value\":8481.086,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":378,\"other_payments_description\":\"240 monthly loan payments of $117. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":28125.059,\"twenty_year_savings\":14490,\"twenty_year_savings_present_value\":9111.836,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":21,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":6665,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":22219.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2339,\"utility_incentive\":0}}]},{\"average_monthly_bill\":175,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":52464},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":561,\"carbon_offset_cars_per_yr\":0.5481558,\"carbon_offset_metric_tons\":2.5927768,\"carbon_offset_trees_per_10_yrs\":66.48145,\"energy_independence_percent\":96.34226,\"infull_details\":{\"first_year_savings\":2034,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":7.5,\"total_other_payments\":0,\"twenty_year_savings\":48668,\"twenty_year_savings_present_value\":16487.203,\"upfront_cost\":16611},\"leasing_details\":{\"first_year_savings\":484,\"other_payments_description\":\"240 monthly lease payments of $129.\",\"payback_period_in_years\":-1,\"total_other_payments\":30989.611,\"twenty_year_savings\":17679,\"twenty_year_savings_present_value\":11197.342,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":532,\"other_payments_description\":\"240 monthly loan payments of $125. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":30036.422,\"twenty_year_savings\":18632,\"twenty_year_savings_present_value\":11870.955,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":23,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":7118,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":23729.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3796,\"utility_incentive\":0}}]},{\"average_monthly_bill\":200,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":59976},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":740.6,\"carbon_offset_cars_per_yr\":0.61287755,\"carbon_offset_metric_tons\":2.8989108,\"carbon_offset_trees_per_10_yrs\":74.33105,\"energy_independence_percent\":97.43434,\"infull_details\":{\"first_year_savings\":2349,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":7.25,\"total_other_payments\":0,\"twenty_year_savings\":56272,\"twenty_year_savings_present_value\":20066.725,\"upfront_cost\":18196},\"leasing_details\":{\"first_year_savings\":651,\"other_payments_description\":\"240 monthly lease payments of $141.\",\"payback_period_in_years\":-1,\"total_other_payments\":33947.64,\"twenty_year_savings\":22325,\"twenty_year_savings_present_value\":14271.924,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":704,\"other_payments_description\":\"240 monthly loan payments of $137. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":32903.465,\"twenty_year_savings\":23369,\"twenty_year_savings_present_value\":15009.842,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":26,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":7798,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":25994.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3704,\"utility_incentive\":0}}]},{\"average_monthly_bill\":225,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":67487},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":920.4,\"carbon_offset_cars_per_yr\":0.677464,\"carbon_offset_metric_tons\":3.2044048,\"carbon_offset_trees_per_10_yrs\":82.16422,\"energy_independence_percent\":98.35629,\"infull_details\":{\"first_year_savings\":2664,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":7,\"total_other_payments\":0,\"twenty_year_savings\":63886,\"twenty_year_savings_present_value\":23653.176,\"upfront_cost\":19782},\"leasing_details\":{\"first_year_savings\":819,\"other_payments_description\":\"240 monthly lease payments of $154.\",\"payback_period_in_years\":-1,\"total_other_payments\":36905.664,\"twenty_year_savings\":26981,\"twenty_year_savings_present_value\":17353.44,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":876,\"other_payments_description\":\"240 monthly loan payments of $149. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":35770.508,\"twenty_year_savings\":28116,\"twenty_year_savings_present_value\":18155.652,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":29,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":8477,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":28259.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3601,\"utility_incentive\":0}}]},{\"average_monthly_bill\":250,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":74998},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":1099.8,\"carbon_offset_cars_per_yr\":0.74181134,\"carbon_offset_metric_tons\":3.5087676,\"carbon_offset_trees_per_10_yrs\":89.9684,\"energy_independence_percent\":99.09909,\"infull_details\":{\"first_year_savings\":2979,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":6.75,\"total_other_payments\":0,\"twenty_year_savings\":71485,\"twenty_year_savings_present_value\":27229.078,\"upfront_cost\":21367},\"leasing_details\":{\"first_year_savings\":986,\"other_payments_description\":\"240 monthly lease payments of $166.\",\"payback_period_in_years\":-1,\"total_other_payments\":39863.69,\"twenty_year_savings\":31621,\"twenty_year_savings_present_value\":20424.426,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":1047,\"other_payments_description\":\"240 monthly loan payments of $161. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":38637.55,\"twenty_year_savings\":32847,\"twenty_year_savings_present_value\":21290.938,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":32,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":9157,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":30524.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3514,\"utility_incentive\":0}}]},{\"average_monthly_bill\":300,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":90021},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":1447.2,\"carbon_offset_cars_per_yr\":0.8666186,\"carbon_offset_metric_tons\":4.099106,\"carbon_offset_trees_per_10_yrs\":105.10528,\"energy_independence_percent\":99.829994,\"infull_details\":{\"first_year_savings\":3598,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":6.25,\"total_other_payments\":0,\"twenty_year_savings\":86430,\"twenty_year_savings_present_value\":34209.395,\"upfront_cost\":24538},\"leasing_details\":{\"first_year_savings\":1309,\"other_payments_description\":\"240 monthly lease payments of $191.\",\"payback_period_in_years\":-1,\"total_other_payments\":45779.742,\"twenty_year_savings\":40651,\"twenty_year_savings_present_value\":26394.877,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":1379,\"other_payments_description\":\"240 monthly loan payments of $185. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":44371.633,\"twenty_year_savings\":42059,\"twenty_year_savings_present_value\":27389.982,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":38,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":10516,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":35054.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3591,\"utility_incentive\":0}}]},{\"average_monthly_bill\":350,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":105044},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":1751.4,\"carbon_offset_cars_per_yr\":0.92405796,\"carbon_offset_metric_tons\":4.3707943,\"carbon_offset_trees_per_10_yrs\":112.07165,\"energy_independence_percent\":93.56874,\"infull_details\":{\"first_year_savings\":4032,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":6,\"total_other_payments\":0,\"twenty_year_savings\":96927,\"twenty_year_savings_present_value\":39757.83,\"upfront_cost\":26124},\"leasing_details\":{\"first_year_savings\":1595,\"other_payments_description\":\"240 monthly lease payments of $203.\",\"payback_period_in_years\":-1,\"total_other_payments\":48737.77,\"twenty_year_savings\":48189,\"twenty_year_savings_present_value\":31438.383,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":1670,\"other_payments_description\":\"240 monthly loan payments of $197. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":47238.676,\"twenty_year_savings\":49688,\"twenty_year_savings_present_value\":32497.793,\"upfront_cost\":0},\"maximum_size\":true,\"num_panels\":41,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":11195,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":37319.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":8117,\"utility_incentive\":0}}]},{\"average_monthly_bill\":400,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":120067},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":2018.6,\"carbon_offset_cars_per_yr\":0.92405796,\"carbon_offset_metric_tons\":4.3707943,\"carbon_offset_trees_per_10_yrs\":112.07165,\"energy_independence_percent\":83.47043,\"infull_details\":{\"first_year_savings\":4290,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":5.75,\"total_other_payments\":0,\"twenty_year_savings\":103015,\"twenty_year_savings_present_value\":43908.094,\"upfront_cost\":26124},\"leasing_details\":{\"first_year_savings\":1853,\"other_payments_description\":\"240 monthly lease payments of $203.\",\"payback_period_in_years\":-1,\"total_other_payments\":48737.77,\"twenty_year_savings\":54278,\"twenty_year_savings_present_value\":35588.65,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":1928,\"other_payments_description\":\"240 monthly loan payments of $197. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":47238.676,\"twenty_year_savings\":55777,\"twenty_year_savings_present_value\":36648.06,\"upfront_cost\":0},\"maximum_size\":true,\"num_panels\":41,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":11195,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":37319.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":17052,\"utility_incentive\":0}}]},{\"average_monthly_bill\":450,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":135089},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":2214.8,\"carbon_offset_cars_per_yr\":0.92405796,\"carbon_offset_metric_tons\":4.3707943,\"carbon_offset_trees_per_10_yrs\":112.07165,\"energy_independence_percent\":75.32806,\"infull_details\":{\"first_year_savings\":4487,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":5.5,\"total_other_payments\":0,\"twenty_year_savings\":106799,\"twenty_year_savings_present_value\":46557.91,\"upfront_cost\":26124},\"leasing_details\":{\"first_year_savings\":2051,\"other_payments_description\":\"240 monthly lease payments of $203.\",\"payback_period_in_years\":-1,\"total_other_payments\":48737.77,\"twenty_year_savings\":58062,\"twenty_year_savings_present_value\":38238.453,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":2126,\"other_payments_description\":\"240 monthly loan payments of $197. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":47238.676,\"twenty_year_savings\":59561,\"twenty_year_savings_present_value\":39297.863,\"upfront_cost\":0},\"maximum_size\":true,\"num_panels\":41,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":11195,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":37319.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":28291,\"utility_incentive\":0}}]},{\"average_monthly_bill\":500,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":150112},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":2331.6,\"carbon_offset_cars_per_yr\":0.92405796,\"carbon_offset_metric_tons\":4.3707943,\"carbon_offset_trees_per_10_yrs\":112.07165,\"energy_independence_percent\":68.63937,\"infull_details\":{\"first_year_savings\":4600,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":5.25,\"total_other_payments\":0,\"twenty_year_savings\":109264,\"twenty_year_savings_present_value\":48260.484,\"upfront_cost\":26124},\"leasing_details\":{\"first_year_savings\":2163,\"other_payments_description\":\"240 monthly lease payments of $203.\",\"payback_period_in_years\":-1,\"total_other_payments\":48737.77,\"twenty_year_savings\":60526,\"twenty_year_savings_present_value\":39941.03,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":2238,\"other_payments_description\":\"240 monthly loan payments of $197. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":47238.676,\"twenty_year_savings\":62025,\"twenty_year_savings_present_value\":41000.44,\"upfront_cost\":0},\"maximum_size\":true,\"num_panels\":41,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":11195,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":37319.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":40849,\"utility_incentive\":0}}]},{\"average_monthly_bill\":20,\"bill_assumptions\":{\"current_kwh_per_year\":0},\"default_bill\":false},{\"average_monthly_bill\":25,\"bill_assumptions\":{\"current_kwh_per_year\":0},\"default_bill\":false},{\"average_monthly_bill\":30,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":8898},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-314.8,\"carbon_offset_cars_per_yr\":0.10332567,\"carbon_offset_metric_tons\":0.48873043,\"carbon_offset_trees_per_10_yrs\":12.531549,\"energy_independence_percent\":84.68623,\"infull_details\":{\"first_year_savings\":288,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":19.25,\"total_other_payments\":0,\"twenty_year_savings\":6804,\"twenty_year_savings_present_value\":-1933.5854,\"upfront_cost\":6569},\"leasing_details\":{\"first_year_savings\":-325,\"other_payments_description\":\"240 monthly lease payments of $51.\",\"payback_period_in_years\":-1,\"total_other_payments\":12255.439,\"twenty_year_savings\":-5451,\"twenty_year_savings_present_value\":-4025.5664,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-306,\"other_payments_description\":\"240 monthly loan payments of $49. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":11878.481,\"twenty_year_savings\":-5074,\"twenty_year_savings_present_value\":-3759.171,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":4,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":2815,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":9384.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2094,\"utility_incentive\":0}}]},{\"average_monthly_bill\":35,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":10400},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-287.2,\"carbon_offset_cars_per_yr\":0.12873326,\"carbon_offset_metric_tons\":0.60890836,\"carbon_offset_trees_per_10_yrs\":15.613034,\"energy_independence_percent\":90.437515,\"infull_details\":{\"first_year_savings\":362,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":17,\"total_other_payments\":0,\"twenty_year_savings\":8564,\"twenty_year_savings_present_value\":-1263.8792,\"upfront_cost\":7098},\"leasing_details\":{\"first_year_savings\":-300,\"other_payments_description\":\"240 monthly lease payments of $55.\",\"payback_period_in_years\":-1,\"total_other_payments\":13241.447,\"twenty_year_savings\":-4678,\"twenty_year_savings_present_value\":-3524.1685,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-280,\"other_payments_description\":\"240 monthly loan payments of $53. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":12834.162,\"twenty_year_savings\":-4270,\"twenty_year_savings_present_value\":-3236.3423,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":5,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3041,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":10139.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":1837,\"utility_incentive\":0}}]},{\"average_monthly_bill\":40,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":11903},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-259.8,\"carbon_offset_cars_per_yr\":0.15401776,\"carbon_offset_metric_tons\":0.728504,\"carbon_offset_trees_per_10_yrs\":18.67959,\"energy_independence_percent\":94.67529,\"infull_details\":{\"first_year_savings\":436,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":15.25,\"total_other_payments\":0,\"twenty_year_savings\":10315,\"twenty_year_savings_present_value\":-599.60394,\"upfront_cost\":7626},\"leasing_details\":{\"first_year_savings\":-276,\"other_payments_description\":\"240 monthly lease payments of $59.\",\"payback_period_in_years\":-1,\"total_other_payments\":14227.457,\"twenty_year_savings\":-3912,\"twenty_year_savings_present_value\":-3028.2021,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-254,\"other_payments_description\":\"240 monthly loan payments of $57. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":13789.844,\"twenty_year_savings\":-3474,\"twenty_year_savings_present_value\":-2718.9414,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":6,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3268,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":10894.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":1588,\"utility_incentive\":0}}]},{\"average_monthly_bill\":45,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":13405},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-232.6,\"carbon_offset_cars_per_yr\":0.17926557,\"carbon_offset_metric_tons\":0.84792614,\"carbon_offset_trees_per_10_yrs\":21.741695,\"energy_independence_percent\":97.95131,\"infull_details\":{\"first_year_savings\":510,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":14,\"total_other_payments\":0,\"twenty_year_savings\":12065,\"twenty_year_savings_present_value\":63.0542,\"upfront_cost\":8155},\"leasing_details\":{\"first_year_savings\":-251,\"other_payments_description\":\"240 monthly lease payments of $63.\",\"payback_period_in_years\":-1,\"total_other_payments\":15213.466,\"twenty_year_savings\":-3149,\"twenty_year_savings_present_value\":-2533.8555,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-228,\"other_payments_description\":\"240 monthly loan payments of $61. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":14745.525,\"twenty_year_savings\":-2681,\"twenty_year_savings_present_value\":-2203.162,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":7,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3494,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":11649.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":1341,\"utility_incentive\":0}}]},{\"average_monthly_bill\":50,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":14907},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-227.8,\"carbon_offset_cars_per_yr\":0.17926557,\"carbon_offset_metric_tons\":0.84792614,\"carbon_offset_trees_per_10_yrs\":21.741695,\"energy_independence_percent\":88.15617,\"infull_details\":{\"first_year_savings\":514,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":14,\"total_other_payments\":0,\"twenty_year_savings\":12179,\"twenty_year_savings_present_value\":140.48439,\"upfront_cost\":8155},\"leasing_details\":{\"first_year_savings\":-246,\"other_payments_description\":\"240 monthly lease payments of $63.\",\"payback_period_in_years\":-1,\"total_other_payments\":15213.466,\"twenty_year_savings\":-3034,\"twenty_year_savings_present_value\":-2456.421,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-223,\"other_payments_description\":\"240 monthly loan payments of $61. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":14745.525,\"twenty_year_savings\":-2566,\"twenty_year_savings_present_value\":-2125.7275,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":7,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3494,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":11649.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2729,\"utility_incentive\":0}}]},{\"average_monthly_bill\":60,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":17912},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-170.2,\"carbon_offset_cars_per_yr\":0.22931457,\"carbon_offset_metric_tons\":1.0846579,\"carbon_offset_trees_per_10_yrs\":27.81174,\"energy_independence_percent\":94.58007,\"infull_details\":{\"first_year_savings\":665,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":12.5,\"total_other_payments\":0,\"twenty_year_savings\":15755,\"twenty_year_savings_present_value\":1518.3691,\"upfront_cost\":9212},\"leasing_details\":{\"first_year_savings\":-194,\"other_payments_description\":\"240 monthly lease payments of $72.\",\"payback_period_in_years\":-1,\"total_other_payments\":17185.484,\"twenty_year_savings\":-1430,\"twenty_year_savings_present_value\":-1415.1602,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-168,\"other_payments_description\":\"240 monthly loan payments of $69. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":16656.887,\"twenty_year_savings\":-901,\"twenty_year_savings_present_value\":-1041.6025,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":9,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":3947,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":13159.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2157,\"utility_incentive\":0}}]},{\"average_monthly_bill\":70,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":20916},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-120.2,\"carbon_offset_cars_per_yr\":0.25427344,\"carbon_offset_metric_tons\":1.2027134,\"carbon_offset_trees_per_10_yrs\":30.838804,\"energy_independence_percent\":91.94036,\"infull_details\":{\"first_year_savings\":761,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":11.5,\"total_other_payments\":0,\"twenty_year_savings\":18048,\"twenty_year_savings_present_value\":2548.8376,\"upfront_cost\":9740},\"leasing_details\":{\"first_year_savings\":-148,\"other_payments_description\":\"240 monthly lease payments of $76.\",\"payback_period_in_years\":-1,\"total_other_payments\":18171.492,\"twenty_year_savings\":-123,\"twenty_year_savings_present_value\":-552.99805,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-120,\"other_payments_description\":\"240 monthly loan payments of $73. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":17612.566,\"twenty_year_savings\":436,\"twenty_year_savings_present_value\":-158.00684,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":10,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":4174,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":13914.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2869,\"utility_incentive\":0}}]},{\"average_monthly_bill\":80,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":23921},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":-42.6,\"carbon_offset_cars_per_yr\":0.3028356,\"carbon_offset_metric_tons\":1.4324125,\"carbon_offset_trees_per_10_yrs\":36.728523,\"energy_independence_percent\":98.56903,\"infull_details\":{\"first_year_savings\":931,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":10.5,\"total_other_payments\":0,\"twenty_year_savings\":22104,\"twenty_year_savings_present_value\":4250.866,\"upfront_cost\":10797},\"leasing_details\":{\"first_year_savings\":-76,\"other_payments_description\":\"240 monthly lease payments of $84.\",\"payback_period_in_years\":-1,\"total_other_payments\":20143.512,\"twenty_year_savings\":1961,\"twenty_year_savings_present_value\":812.41504,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":-45,\"other_payments_description\":\"240 monthly loan payments of $81. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":19523.93,\"twenty_year_savings\":2580,\"twenty_year_savings_present_value\":1250.2734,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":12,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":4627,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":15424.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":1817,\"utility_incentive\":0}}]},{\"average_monthly_bill\":90,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":26925},\"default_bill\":true,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":17,\"carbon_offset_cars_per_yr\":0.32648405,\"carbon_offset_metric_tons\":1.5442696,\"carbon_offset_trees_per_10_yrs\":39.596653,\"energy_independence_percent\":96.96697,\"infull_details\":{\"first_year_savings\":1036,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":10,\"total_other_payments\":0,\"twenty_year_savings\":24629,\"twenty_year_savings_present_value\":5438.054,\"upfront_cost\":11326},\"leasing_details\":{\"first_year_savings\":-21,\"other_payments_description\":\"240 monthly lease payments of $88.\",\"payback_period_in_years\":-1,\"total_other_payments\":21129.52,\"twenty_year_savings\":3499,\"twenty_year_savings_present_value\":1831.2871,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":12,\"other_payments_description\":\"240 monthly loan payments of $85. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":20479.611,\"twenty_year_savings\":4149,\"twenty_year_savings_present_value\":2290.5771,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":13,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":4853,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":16179.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2297,\"utility_incentive\":0}}]},{\"average_monthly_bill\":100,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":29930},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":74.6,\"carbon_offset_cars_per_yr\":0.3493745,\"carbon_offset_metric_tons\":1.6525414,\"carbon_offset_trees_per_10_yrs\":42.372856,\"energy_independence_percent\":95.415726,\"infull_details\":{\"first_year_savings\":1138,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":9.5,\"total_other_payments\":0,\"twenty_year_savings\":27105,\"twenty_year_savings_present_value\":6591.79,\"upfront_cost\":11854},\"leasing_details\":{\"first_year_savings\":33,\"other_payments_description\":\"240 monthly lease payments of $92.\",\"payback_period_in_years\":-1,\"total_other_payments\":22115.53,\"twenty_year_savings\":4989,\"twenty_year_savings_present_value\":2816.7158,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":67,\"other_payments_description\":\"240 monthly loan payments of $89. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":21435.291,\"twenty_year_savings\":5669,\"twenty_year_savings_present_value\":3297.4395,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":14,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":5080,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":16934.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2826,\"utility_incentive\":0}}]},{\"average_monthly_bill\":125,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":37441},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":237.4,\"carbon_offset_cars_per_yr\":0.43880445,\"carbon_offset_metric_tons\":2.075545,\"carbon_offset_trees_per_10_yrs\":53.219105,\"energy_independence_percent\":99.90289,\"infull_details\":{\"first_year_savings\":1485,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":8.75,\"total_other_payments\":0,\"twenty_year_savings\":35420,\"twenty_year_savings_present_value\":10131.207,\"upfront_cost\":13968},\"leasing_details\":{\"first_year_savings\":182,\"other_payments_description\":\"240 monthly lease payments of $109.\",\"payback_period_in_years\":-1,\"total_other_payments\":26059.566,\"twenty_year_savings\":9360,\"twenty_year_savings_present_value\":5682.8945,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":223,\"other_payments_description\":\"240 monthly loan payments of $105. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":25258.016,\"twenty_year_savings\":10162,\"twenty_year_savings_present_value\":6249.3477,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":18,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":5986,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":19954.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2022,\"utility_incentive\":0}}]},{\"average_monthly_bill\":150,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":44953},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":400,\"carbon_offset_cars_per_yr\":0.5047208,\"carbon_offset_metric_tons\":2.3873293,\"carbon_offset_trees_per_10_yrs\":61.213573,\"energy_independence_percent\":99.66765,\"infull_details\":{\"first_year_savings\":1784,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":8,\"total_other_payments\":0,\"twenty_year_savings\":42615,\"twenty_year_savings_present_value\":13434.333,\"upfront_cost\":15554},\"leasing_details\":{\"first_year_savings\":333,\"other_payments_description\":\"240 monthly lease payments of $121.\",\"payback_period_in_years\":-1,\"total_other_payments\":29017.59,\"twenty_year_savings\":13597,\"twenty_year_savings_present_value\":8481.086,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":378,\"other_payments_description\":\"240 monthly loan payments of $117. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":28125.059,\"twenty_year_savings\":14490,\"twenty_year_savings_present_value\":9111.836,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":21,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":6665,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":22219.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":2339,\"utility_incentive\":0}}]},{\"average_monthly_bill\":175,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":52464},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":561,\"carbon_offset_cars_per_yr\":0.5481558,\"carbon_offset_metric_tons\":2.5927768,\"carbon_offset_trees_per_10_yrs\":66.48145,\"energy_independence_percent\":96.34226,\"infull_details\":{\"first_year_savings\":2034,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":7.5,\"total_other_payments\":0,\"twenty_year_savings\":48668,\"twenty_year_savings_present_value\":16487.203,\"upfront_cost\":16611},\"leasing_details\":{\"first_year_savings\":484,\"other_payments_description\":\"240 monthly lease payments of $129.\",\"payback_period_in_years\":-1,\"total_other_payments\":30989.611,\"twenty_year_savings\":17679,\"twenty_year_savings_present_value\":11197.342,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":532,\"other_payments_description\":\"240 monthly loan payments of $125. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":30036.422,\"twenty_year_savings\":18632,\"twenty_year_savings_present_value\":11870.955,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":23,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":7118,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":23729.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3796,\"utility_incentive\":0}}]},{\"average_monthly_bill\":200,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":59976},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":740.6,\"carbon_offset_cars_per_yr\":0.61287755,\"carbon_offset_metric_tons\":2.8989108,\"carbon_offset_trees_per_10_yrs\":74.33105,\"energy_independence_percent\":97.43434,\"infull_details\":{\"first_year_savings\":2349,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":7.25,\"total_other_payments\":0,\"twenty_year_savings\":56272,\"twenty_year_savings_present_value\":20066.725,\"upfront_cost\":18196},\"leasing_details\":{\"first_year_savings\":651,\"other_payments_description\":\"240 monthly lease payments of $141.\",\"payback_period_in_years\":-1,\"total_other_payments\":33947.64,\"twenty_year_savings\":22325,\"twenty_year_savings_present_value\":14271.924,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":704,\"other_payments_description\":\"240 monthly loan payments of $137. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":32903.465,\"twenty_year_savings\":23369,\"twenty_year_savings_present_value\":15009.842,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":26,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":7798,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":25994.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3704,\"utility_incentive\":0}}]},{\"average_monthly_bill\":225,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":67487},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":920.4,\"carbon_offset_cars_per_yr\":0.677464,\"carbon_offset_metric_tons\":3.2044048,\"carbon_offset_trees_per_10_yrs\":82.16422,\"energy_independence_percent\":98.35629,\"infull_details\":{\"first_year_savings\":2664,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":7,\"total_other_payments\":0,\"twenty_year_savings\":63886,\"twenty_year_savings_present_value\":23653.176,\"upfront_cost\":19782},\"leasing_details\":{\"first_year_savings\":819,\"other_payments_description\":\"240 monthly lease payments of $154.\",\"payback_period_in_years\":-1,\"total_other_payments\":36905.664,\"twenty_year_savings\":26981,\"twenty_year_savings_present_value\":17353.44,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":876,\"other_payments_description\":\"240 monthly loan payments of $149. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":35770.508,\"twenty_year_savings\":28116,\"twenty_year_savings_present_value\":18155.652,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":29,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":8477,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":28259.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3601,\"utility_incentive\":0}}]},{\"average_monthly_bill\":250,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":74998},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":1099.8,\"carbon_offset_cars_per_yr\":0.74181134,\"carbon_offset_metric_tons\":3.5087676,\"carbon_offset_trees_per_10_yrs\":89.9684,\"energy_independence_percent\":99.09909,\"infull_details\":{\"first_year_savings\":2979,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":6.75,\"total_other_payments\":0,\"twenty_year_savings\":71485,\"twenty_year_savings_present_value\":27229.078,\"upfront_cost\":21367},\"leasing_details\":{\"first_year_savings\":986,\"other_payments_description\":\"240 monthly lease payments of $166.\",\"payback_period_in_years\":-1,\"total_other_payments\":39863.69,\"twenty_year_savings\":31621,\"twenty_year_savings_present_value\":20424.426,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":1047,\"other_payments_description\":\"240 monthly loan payments of $161. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":38637.55,\"twenty_year_savings\":32847,\"twenty_year_savings_present_value\":21290.938,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":32,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":9157,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":30524.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3514,\"utility_incentive\":0}}]},{\"average_monthly_bill\":300,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":90021},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":1447.2,\"carbon_offset_cars_per_yr\":0.8666186,\"carbon_offset_metric_tons\":4.099106,\"carbon_offset_trees_per_10_yrs\":105.10528,\"energy_independence_percent\":99.829994,\"infull_details\":{\"first_year_savings\":3598,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":6.25,\"total_other_payments\":0,\"twenty_year_savings\":86430,\"twenty_year_savings_present_value\":34209.395,\"upfront_cost\":24538},\"leasing_details\":{\"first_year_savings\":1309,\"other_payments_description\":\"240 monthly lease payments of $191.\",\"payback_period_in_years\":-1,\"total_other_payments\":45779.742,\"twenty_year_savings\":40651,\"twenty_year_savings_present_value\":26394.877,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":1379,\"other_payments_description\":\"240 monthly loan payments of $185. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":44371.633,\"twenty_year_savings\":42059,\"twenty_year_savings_present_value\":27389.982,\"upfront_cost\":0},\"maximum_size\":false,\"num_panels\":38,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":10516,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":35054.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":3591,\"utility_incentive\":0}}]},{\"average_monthly_bill\":350,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":105044},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":1751.4,\"carbon_offset_cars_per_yr\":0.92405796,\"carbon_offset_metric_tons\":4.3707943,\"carbon_offset_trees_per_10_yrs\":112.07165,\"energy_independence_percent\":93.56874,\"infull_details\":{\"first_year_savings\":4032,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":6,\"total_other_payments\":0,\"twenty_year_savings\":96927,\"twenty_year_savings_present_value\":39757.83,\"upfront_cost\":26124},\"leasing_details\":{\"first_year_savings\":1595,\"other_payments_description\":\"240 monthly lease payments of $203.\",\"payback_period_in_years\":-1,\"total_other_payments\":48737.77,\"twenty_year_savings\":48189,\"twenty_year_savings_present_value\":31438.383,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":1670,\"other_payments_description\":\"240 monthly loan payments of $197. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":47238.676,\"twenty_year_savings\":49688,\"twenty_year_savings_present_value\":32497.793,\"upfront_cost\":0},\"maximum_size\":true,\"num_panels\":41,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":11195,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":37319.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":8117,\"utility_incentive\":0}}]},{\"average_monthly_bill\":400,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":120067},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":2018.6,\"carbon_offset_cars_per_yr\":0.92405796,\"carbon_offset_metric_tons\":4.3707943,\"carbon_offset_trees_per_10_yrs\":112.07165,\"energy_independence_percent\":83.47043,\"infull_details\":{\"first_year_savings\":4290,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":5.75,\"total_other_payments\":0,\"twenty_year_savings\":103015,\"twenty_year_savings_present_value\":43908.094,\"upfront_cost\":26124},\"leasing_details\":{\"first_year_savings\":1853,\"other_payments_description\":\"240 monthly lease payments of $203.\",\"payback_period_in_years\":-1,\"total_other_payments\":48737.77,\"twenty_year_savings\":54278,\"twenty_year_savings_present_value\":35588.65,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":1928,\"other_payments_description\":\"240 monthly loan payments of $197. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":47238.676,\"twenty_year_savings\":55777,\"twenty_year_savings_present_value\":36648.06,\"upfront_cost\":0},\"maximum_size\":true,\"num_panels\":41,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":11195,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":37319.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":17052,\"utility_incentive\":0}}]},{\"average_monthly_bill\":450,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":135089},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":2214.8,\"carbon_offset_cars_per_yr\":0.92405796,\"carbon_offset_metric_tons\":4.3707943,\"carbon_offset_trees_per_10_yrs\":112.07165,\"energy_independence_percent\":75.32806,\"infull_details\":{\"first_year_savings\":4487,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":5.5,\"total_other_payments\":0,\"twenty_year_savings\":106799,\"twenty_year_savings_present_value\":46557.91,\"upfront_cost\":26124},\"leasing_details\":{\"first_year_savings\":2051,\"other_payments_description\":\"240 monthly lease payments of $203.\",\"payback_period_in_years\":-1,\"total_other_payments\":48737.77,\"twenty_year_savings\":58062,\"twenty_year_savings_present_value\":38238.453,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":2126,\"other_payments_description\":\"240 monthly loan payments of $197. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":47238.676,\"twenty_year_savings\":59561,\"twenty_year_savings_present_value\":39297.863,\"upfront_cost\":0},\"maximum_size\":true,\"num_panels\":41,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":11195,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":37319.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":28291,\"utility_incentive\":0}}]},{\"average_monthly_bill\":500,\"bill_assumptions\":{\"current_kwh_per_year\":0,\"twenty_year_cost_without_solar\":150112},\"default_bill\":false,\"solar_savings_for_bill_and_size\":[{\"annual_savings\":2331.6,\"carbon_offset_cars_per_yr\":0.92405796,\"carbon_offset_metric_tons\":4.3707943,\"carbon_offset_trees_per_10_yrs\":112.07165,\"energy_independence_percent\":68.63937,\"infull_details\":{\"first_year_savings\":4600,\"other_payments_description\":\"Modern solar arrays use micro-inverters and should require no maintenance during their first 20 years.\",\"payback_period_in_years\":5.25,\"total_other_payments\":0,\"twenty_year_savings\":109264,\"twenty_year_savings_present_value\":48260.484,\"upfront_cost\":26124},\"leasing_details\":{\"first_year_savings\":2163,\"other_payments_description\":\"240 monthly lease payments of $203.\",\"payback_period_in_years\":-1,\"total_other_payments\":48737.77,\"twenty_year_savings\":60526,\"twenty_year_savings_present_value\":39941.03,\"upfront_cost\":0},\"loan_details\":{\"first_year_savings\":2238,\"other_payments_description\":\"240 monthly loan payments of $197. Assumes 6.6% interest.\",\"payback_period_in_years\":-1,\"total_other_payments\":47238.676,\"twenty_year_savings\":62025,\"twenty_year_savings_present_value\":41000.44,\"upfront_cost\":0},\"maximum_size\":true,\"num_panels\":41,\"recommended_size\":true,\"size_assumptions\":{\"federal_description\":\"Federal Investment Tax Credit (ITC)\",\"federal_incentive\":11195,\"initial_kwh_per_year\":0,\"out_of_pocket_cost\":37319.15,\"srec_total\":0,\"state_description\":\"State tax credit\",\"state_incentive\":0,\"total_remaining_bill\":40849,\"utility_incentive\":0}}]}]}}\n" + ] + } + ], + "source": [ + "import urllib\n", + "import json\n", + "import requests\n", + "\n", + "center_x = 34.421653\n", + "center_y = -119.862508\n", + "\n", + "url = 'https://www.google.com/async/sclp?async=lat:{},lng:{}'.format(center_x, center_y)\n", + "# response = urllib.request.urlopen(url)\n", + "res = requests.get(url)\n", + "\n", + "# print(res.headers['content-type'])\n", + "print(res.text)\n", + "# data = json.load(response)\n", + "# print (data)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/src/notebooks/vgg16.ipynb b/src/notebooks/vgg16.ipynb new file mode 100644 index 0000000..7887227 --- /dev/null +++ b/src/notebooks/vgg16.ipynb @@ -0,0 +1,94 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Using TensorFlow backend.\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "\n", + "import keras\n", + "\n", + "from keras.models import load_model\n", + "from keras_applications import vgg16\n", + "from keras.preprocessing import image\n", + "from keras.optimizers import Adam\n", + "from keras.preprocessing.image import ImageDataGenerator\n", + "from keras.layers import Dense, GlobalAveragePooling2D\n", + "\n", + "decode_predictions = vgg16.decode_predictions\n", + "preprocess_input = vgg16.preprocess_input" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Downloading data from https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5\n", + "58892288/58889256 [==============================] - 175s 3us/step\n", + "58900480/58889256 [==============================] - 175s 3us/step\n" + ] + } + ], + "source": [ + "# topless vgg16\n", + "from keras_applications import vgg16\n", + "\n", + "vgg16_topless = keras.applications.vgg16.VGG16(include_top=False, \n", + " weights='imagenet', \n", + " input_shape=(224, 224, 3))" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "vgg16_topless.save('vgg16_topless.h5')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "insight", + "language": "python", + "name": "insight" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.15" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}