Table of Contents
- Rhino Energy Prediction Plugin
- Overview
- Features
- Architecture
- Installation
- Workflow
- Requirements
- Tech Stack
- Roadmap
- Energy Map
- Overview
- Repository Structure
- Getting Started
- Map Information
- Extracting Vegetation Data
- Overview
- NDVI Analysis
- TreeCountSegHeight
- Next Steps
- Presentation
- Team
Rhino Energy Prediction Plugin
Overview
Rhino Energy Prediction Plugin is designed to support architects in making energy-informed design decisions early in the building process. The plugin enables users to create or modify building models and receive predictions for heating and cooling loads using a machine learning (ML) model. Architects can gauge building energy performance early (concept stage) using the Rhino Energy Prediction Plugin. The plugin embeds a self-contained ONNX runtime directly in Grasshopper.
Features
-
Model Initialization
Reads an ONNX model file path and sets up anInferenceSession
that exposes each input tensor’s name, datatype, and shape. -
Real-Time Inference
Packs Grasshopper inputs into dense tensors, executes the ONNX model, and returns the first element of the output array as an energy load estimate. -
Automatic Feature Extraction
Companion Python script reads 3D building geometry and computes features such as roof area, window-to-wall ratio, floor area, and number of stories. -
Pure C# Runtime
Runs entirely in .NET via Microsoft’s ONNX Runtime—no Python interpreter required at inference time.
Architecture
-
Component Initialization
The plugin reads the ONNX model path from the Grasshopper input.
It then creates anInferenceSession
and retrieves input tensor metadata. -
Input Packing
Grasshopper values are loaded into dense tensors that match the ONNX input shapes. -
Model Inference
The plugin runs the ONNX model with the packed inputs and receives an output array.
The first element of that array is sent to the Grasshopper output. -
Feature Extraction Script
A Python helper extracts building features automatically by classifying layers namedWall
,Slab
,Window
, andRoof
.
Installation
- Download the
VIP_Energy_Plugin
folder. - Copy it to your Grasshopper Libraries folder:
- Launch Rhino and open Grasshopper.
- Drag the VIPPlugin component from the Params tab onto the canvas.
- Provide the ONNX model file path to the component input.
- View the energy load prediction on the second output parameter.
Workflow
- Open Rhino and start Grasshopper.
- Place the VIPPlugin component and connect the ONNX model path.
- Sketch or import a building mass in Rhino.
- Run the feature extraction script to compute geometry parameters.
- Grasshopper packs the inputs and runs the ONNX model.
- Inspect the real-time energy load estimate.
Requirements
- Rhino 7+ – Plugin host environment
- Windows OS – .NET and Rhino SDK compatibility
- .NET Framework 4.8+ – ONNX Runtime support
- Python 3.8+ – Feature extraction and model conversion scripts
- ONNX model file – Trained energy prediction model
Tech Stack
- Rhino SDK (C#) – Core plugin development and geometry handling
- Grasshopper (C#) – Dynamic component architecture
- Microsoft ONNX Runtime – High-performance model inference
- Python – Building feature extraction and
.joblib
→.onnx
conversion - scikit-learn / sklearn-onnx – Model training and conversion
Roadmap
-
Real-Time EUI Feedback
Provide energy use intensity updates as users modify height, WWR, and story count. -
Flexible Model Inputs
Detect parameter names and types automatically to support multiple climates and typologies. -
Multi-Format Support
Add seamless handling of both.onnx
and.joblib
models with built-in feature mapping. -
Map Integration
Link with an energy prediction map to import existing building geometry and simulate retrofits.
Energy Map
Overview
The energy map provides visualizations of predicted building energy loads (heating and cooling) across an urban environment. Users can click on individual buildings to inspect specific feature details such as building height and estimated energy loads.
Given a GeoJSON file, the application calculates various building features, including height, shape (e.g., L-shaped, H-shaped), number of stories, building type (residential, commercial, etc.), energy code classification, HVAC category, roof area, rotation, wall area, and window area. These extracted features are then fed into a machine learning model, as described here.
Repository Structure
energy map
├─ api
| ├─ calculate_building_features # Scripts to calculate building-level features like height, area, rotation
| └─ route.ts # API routing configuration for feature calculations
|
├─ flask-api # Backend Flask server
|
├─ node_modules # Dependency libraries (auto-generated)
├─ public # Static public assets
├─ src
| ├─ assets # Static files such as icons or images
| ├─ App.tsx # Main application file
| ├─ App.css # Application-level styling
| ├─ index.css # Global styles
| ├─ main.tsx # Application bootstrap and render entry
| └─ components # React components for UI (buttons, feature displays, map container, map view)
| ├─ ButtonComponent.tsx
| | ├─ FeatureDisplay.tsx
| | ├─ MapContainer.tsx
| | ├─ MapView.tsx
| └─ utils
| └─ building.ts # Utility functions for parsing and handling building feature data
└─ ...
Getting Started
Requirements
-
Run with Python 3.12.5 (otherwise there are issues with the .pkl files)
-
Install node.js
Set up to run locally
- Clone the repository using
- Navigate to the project folder
- Run front end locally using
- To run the flask backend, open a new terminal and navigate to the energy_map/app/flask-api folder. Make sure to have the required python libraries. You can then run app.py without any errors
Map Information
Datasets
The dataset is derived from the Overture Maps Foundation building footprints, provided in GeoJSON
Extracting Vegetation Data
Overview
We examined various methods of extracting vegetation data for use with the models due to the effect of shading on the heating and cooling load of nearby buildings.
NDVI Analysis
NDVI (Normalized Difference Vegetation Index) is a metric used to quantify the health and density of vegetation from satellite imagery. Seemed promising at first, but does not provide any way of estimating vegetation height, which is likely needed as a metric for the model to be trained on.
TreeCountSegHeight
A recently developed model called TreeCountSegHeight was also examined for potential integration with the model. It seemed to fit our purposes quite well, returning an estimate of tree height from input satellite imagery, but was found to be very computationally intensive. It may have the potential to yield results given sufficient hardware, but this was a stumbling point in the workflow.
Next Steps
Continue searching for a lightweight/efficient way to extract vegetation height from satellite imagery.
Presentation
Team
Name | Seniority | Major | School | # Semesters | GitHub Handle |
---|---|---|---|---|---|
Joseph M. Aerathu | Masters | Architecture (HPB) | ARCH | 2 | jma1999 |
Anubha Mahajan | Senior | Computer Science | SCS | 3 | amahajan68 |
Jessica Hernandez | Masters | Computer Science | SCS | 2 | jhernandez312 |
Hang Xu | PhD | Architecture (HBP) | ARCH | 2 | HangXXXu |
Jiayi Li | Junior | Architecture | ARCH | 2 | jli3307 |
Kavya Lalith | Sophomore | Computer Engineering | ECE | 1 | kavya‑oop |
Johnny Chen | Freshman | Computer Science | SCS | 1 | jxchen21 |
Shivam Patel | Junior | Computer Science | SCS | 3 | FlippyShivam |
Yichao Shi | PhD | Architecture (DC) | ARCH | 2 | SHIyichao98 |