Earthwork Network Architecture (ENA)
Overview
Earthwork Network Architecture (ENA) is designed to compare deep learning models for accurate estimation prediction of earthwork volumes from CAD-based cross-sectional drawings in construction engineering domain. The construction field, commonly known as AEC (Architecture, Engineering and Construction), has lagged behind other fields in the development of AI and LLM models for various reasons. In this open source, we demonstrate that LLM based on Transformers can be extended and applied to various applications in the engineering field through various comparisons among different methods. However, we also note that LLM may not be a cost-effective method for certain use cases. This huggingface repository contains four unique ENA deep learning models: MLP, LSTM, Transformers, and LLM-based architecture tailored to automate and improve earthwork volume estimation from CAD-based cross-sectional drawings.
Key Features:
Multi-Model Approach:
- MLP-Based Model: Lightweight and efficient for smaller datasets.
- LSTM-Based Model: Ideal for sequential dependencies in time-series data.
- Transformer-Based Model: Handles complex relationships and large datasets.
- LLM-Based Model (BERT): Excels in processing contextual and unstructured data.
Automated Data Processing:
- Converts CAD cross-sectional drawings into structured datasets.
- Employs a Half-Edge Topology Structure to tokenize and preprocess geometrical features.
Enhanced Performance:
- Provides superior accuracy in Quantity Takeoff Classification (QTC) for earthwork with reduced loss metrics.
- Demonstrates robust generalization for unseen datasets, validated through a real-world road construction project.
Research Basis:
The ENA is detailed in the paper Earthwork Network Architecture (ENA): Research for Earthwork Quantity Estimation Method Improvement with Large Language Model. It showcases a comparative analysis of the ENA models and demonstrates the advantages of LLM-based approaches in construction engineering.
Usage
Prerequisites
- Programming Language: Python 3.8 or above. PyTorch (torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118)
- Libraries: Install the required libraries using
pip install
. Detailed dependencies will be provided in the code files.pip install json os re logging torch numpy matplotlib seaborn transformers scikit-learn tqdm pip install pandas scipy trimesh laspy open3d pyautocad pywin32
Data Preparation
Prepare Drawing File:
- Prepare CAD cross-sectional drawings as input files and load it on Autocad (./input/cross_section_sample_drawing.dwg). Run the below program to extract the entities per each cross-section in the drawing. In addition, you can define the earthwork item's layer name in config.json.
python create_earthwork_dataset.py --config config.json --output output/ --view output/chain_chunk_6.json
- In Autocad, you can select the cross-section entities using command powered by create_earthwork_dataset program. In reference, we assume that each earthwork item's layer including entities were segmented(Please refer to the below paper).
Prepare Train Dataset:
- Use the provided scripts to preprocess and tokenize geometrical features.
python prepare_dataset.py --input output/ --output dataset/
Training and Evaluation
- Training Data (TBD):
- Features are tokenized into sequences for MLP, LSTM, Transformers, and LLM models. We'll upload the train source file after arrangement.
python train_ena_model.py --model_type [MLP|LSTM|Transformer|LLM]
- Run and Evaluate ENA model:
- Run the below program to run and test the each ENA model. It will generate log and graph image files to check the performance.
python ena_run_model.py
- it will generate ewnet_logs.txt output file which consists of layer sequence pattern on polyline, earthwork estimation prediction like below.
- [datetime] [DEBUG] [MLP | LSTM | Transformers | BERT] Equal : True, Label: pave_layer3, Predicted: pave_layer3, Geom: ['above(1)', 'pave_int(3)', 'slope(1)', 'pave_bottom(1)', 'curb(1)', 'slope(1)', 'pave_bottom(1)', 'slope(1)', 'pave_bottom(3)', '']
Results
- Best Model: LLM-based ENA achieved a QTC accuracy of 97.17%, outperforming other architectures in accuracy and stability.
- Performance Trade-Offs: LLMs provide high accuracy but require significant computational resources compared to other models.
Coming Soon
- Source codes for ENA models train.
License
This project is licensed under the MIT License.
Citation
If you use this repository, please cite: Kang, T.; Kang, K. Earthwork Network Architecture (ENA): Research for Earthwork Quantity Estimation Method Improvement with Large Language Models. Appl. Sci. 2024, 14, 10517. https://doi.org/10.3390/app142210517
We would like to acknowledge the contribution of the road crossing drawings used for model training, provided by engineers Dong Geun Lee and Yoon Sang Lee at Gunhwa Engineering (Seoul, Republic of Korea).
- Downloads last month
- 3