Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BIM-to-Sensor Integration Prototype

A prototype demonstrating how to parse a real BIM (Building Information Modelling) file and integrate it with sensor or inspection data, the core pattern needed for an AI-enabled digital twin of physical infrastructure.

Related project: point-cloud-segmentation-infra (RANSAC + DBSCAN point-cloud segmentation, 95.5% accuracy)

What it does

  1. Parses a real IFC file using ifcopenshell, the standard open-source library for reading Industry Foundation Classes (IFC) BIM files. Extracts structural elements (walls, beams, footings, slabs, etc.) along with their real-world 3D coordinates and dimensions.
  2. Overlays sensor anomaly points, representing flagged locations from a sensor scan or inspection model (e.g. a point cloud flagged by a defect-detection pipeline).
  3. Spatially matches each anomaly to its nearest structural element, so a flagged issue is associated with a named wall, beam, or footing rather than left as a floating coordinate with no context.
  4. Shows the result in an interactive 3D dashboard with a sortable detail table.

On the data

The IFC file (data/sample_structure.ifc) is a real building structural model, not a synthetic mockup. It's sourced from buildingSMART International's Sample-Test-Files repository, the standard public reference set used across the BIM industry for testing IFC tooling, licensed CC-BY 4.0.

The sensor anomaly points are synthetically generated (scripts/sensor_overlay.py), since no real sensor scan of this specific building was available. Each synthetic anomaly is placed near a real structural element to simulate a plausible inspection flag, and the matching logic operates on the real BIM geometry throughout.

Why this approach

Full BIM tooling (Revit, Navisworks, production IFC pipelines) is specialised, expensive software with a steep learning curve, not something to fake familiarity with. This prototype instead demonstrates the underlying integration pattern: parsing real BIM geometry and relating it spatially to sensor data, which is the actual technical problem, regardless of which specific BIM authoring tool produced the source file.

Scope note: this is a small-scale prototype, not a production pipeline. It does not yet handle MEP systems, complex IFC relationships, the IFC4X3 infrastructure schema extensions, or clash detection. The natural next steps are extending element type coverage, replacing the synthetic anomalies with a real sensor feed (e.g. output from the companion point-cloud segmentation project), and adding richer spatial relationships such as containment within a building storey rather than just nearest-centroid distance.

Running locally

git clone https://github.com/lakshan-d/bim-sensor-integration-prototype.git
cd bim-sensor-integration-prototype

# create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate        # macOS/Linux
venv\Scripts\activate           # Windows

pip install -r requirements.txt
streamlit run app.py

Open the local URL Streamlit prints (usually http://localhost:8501). The sidebar lets you adjust the number of anomalies, the matching distance threshold, and the random seed.

When you're done, deactivate the virtual environment with deactivate.

Running the pipeline directly

cd scripts
python parse_ifc.py        # parse and list structural elements
python sensor_overlay.py   # generate anomalies and match to elements

Running tests

python tests/test_pipeline.py

Project structure

bim-sensor-integration-prototype/
├── app.py                       # Streamlit dashboard
├── requirements.txt
├── data/
│   └── sample_structure.ifc     # real IFC BIM file (buildingSMART, CC-BY 4.0)
├── scripts/
│   ├── parse_ifc.py             # IFC parsing via ifcopenshell
│   └── sensor_overlay.py        # synthetic anomaly generation + spatial matching
├── tests/
│   └── test_pipeline.py
└── README.md

Background

Built alongside an MSc dissertation on drone-based autonomous infrastructure inspection (LiDAR + YOLOv5), a co-authored IEEE paper on LiDAR-based self-localisation (FNWF Dubai 2024), and a broader portfolio of computer vision and LiDAR projects targeting infrastructure inspection and digital twin applications.

Acknowledgements

Sample IFC file from buildingSMART International's Sample-Test-Files, licensed CC-BY 4.0.

Author

Lakshan Divakar | github.com/lakshan-d | linkedin.com/in/lakshan-d

About

Parses a real IFC building model using ifcopenshell, overlays sensor anomaly points, and spatially matches each flagged location to its nearest structural element. Prototype of the BIM-to-sensor integration pattern used in infrastructure digital twins.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages