This repository contains code and documentation for the Digital Twin Modeling project, which involves creating digital twins of physical objects using 3D modeling techniques. The project focuses on automating data collection, preprocessing 3D models, and generating 3D objects and floor plans from 2D images.
3D.Arhitect.Final.mp4
- Introduction
- Data Collection
- Preprocessing Steps
- Data Output
- Research
- Dependencies
- Usage
- Contributing
- License
The Digital Twin Modeling project aims to enhance smart city simulations by providing accurate digital representations of physical objects and environments. By integrating cutting-edge 3D modeling techniques, this project enables detailed and realistic simulations, which can be instrumental in urban planning, infrastructure management, and emergency response strategies.
The project is divided into two main components:
-
3D Object Generation: This involves creating precise 3D models of individual objects using advanced techniques such as neural radiance fields (NeRF). These models are essential for generating realistic simulations and visualizations.
-
3D Floorplan Generation: This component focuses on converting 2D floorplans into 3D models, allowing for comprehensive simulations of indoor spaces. By utilizing classical Computer Vistion(Rule-Based approch), we can generate accurate floorplans that are crucial for various applications within smart cities.
The data collection process involves automating the generation of different 2D images from a single 3D mesh at various positions and orientations. The primary data sources for 3D models include websites like Thingiverse, GrabCAD, TurboSquid, CGTrader, and Sketchfab.
- 3D Model: Imported from websites like Thingiverse, GrabCAD, TurboSquid, CGTrader, and Sketchfab.
- Formats: Compatible 3D mesh formats (e.g., .obj, .glb).
- Object Initialization: Script identifies and sets the 3D mesh location to the origin (0, 0, 0).
- Camera Configurations: Predefined views based on optimal angles from research papers.
- Lighting Configurations: Multiple light sources with varying configurations for detailed visualization.
- Rendered Images:
- Predefined Views: Six images per folder, each from different angles.
- Random Query Images: Ten additional images from random camera positions.
- File Structure: Folders contain the predefined views and one query image per folder.
- Plan2Scene: Focuses on texturing floor, wall, and window surfaces. Plan2Scene
- InstantMesh: 3D Mesh Generation from a Single Image. InstantMesh
- FloorNet: Converts RGBD videos of indoor spaces into vector-graphics floorplans. FloorNet
- Raster-to-Vector: Converts raster floorplan images to vector graphics. Floorplan Transformation
- Blender: free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling. Blender
- InstantMesh: Efficient 3D Mesh Generation from a Single Image. InstantMesh
- FloorplanToBlender3d: A tool to convert floor plans to 3D models in Blender. FloorplanToBlender3d
- Three.js: A JavaScript library for 3D graphics. Three.js
- Gradio: A Python library for building interactive UIs for machine learning models. Gradio
- Clone the repository:
https://github.com/adelelwan24/Digital-Twin-Modeling.git cd Digital-Twin-Modeling
- Install the required dependencies:
pip install -r requirements.txt pip install -r InstantMesh/requirements.txt
- Run the server:
python server.py
- Run the gradio froolplan app:
python gradio_floorplan.py
Contributions are welcome! Please read the contributing guidelines for more details.
This project is licensed under the MIT License - see the LICENSE file for details.