Run the following Python scripts in sequence to preprocess the data:
python 1-json_rotate_augment.py
This script performs data augmentation through rotation of the original JSON files.
python 2-normUeJson.py
This script normalizes the Unreal Engine JSON format data.
python 3-json2boxnp.py
This script converts the JSON data to NumPy arrays in box representation format.
cp dataset_stats.txt ./BoxCenterSizeLabelNp
Running the Model
Navigate to the scripts directory:
cd scripts
Execute the commands provided in command.sh to train and/or evaluate the model:
# View the available commands
cat command.sh
# Execute specific commands as needed
# For example:
python train_diffusion_building_DDP.py ../config/text/diffusion_building_DIT.yaml uncond --experiment_tag uncond --n_processes 0 --with_swanlab_logger
Project Structure
1-json_rotate_augment.py: Data augmentation script
2-normUeJson.py: JSON normalization script
3-json2boxnp.py: JSON to NumPy conversion script
scripts/: Contains model training and evaluation scripts
configs/: Configuration files for different model settings
BoxCenterSizeLabel_all/: Directory containing the dataset
Notes
Make sure your GPU drivers are properly configured for Docker GPU passthrough
The dataset processing may take significant time depending on the size of the dataset
Check the log files for any errors during processing
For more detailed information about the model architecture and training parameters, please refer to the documentation in the respective script files.
BuildingBlock
[SIGGRAPH 2025]BuildingBlock: A Hybrid Approach for Structured Building Generation
Installation
1. Download Docker
Ensure Docker is properly installed on your system. Visit Docker’s official website for installation instructions specific to your operating system.
2. Run Docker Container
Mount your local directory to the container and start an interactive session:
Replace
your_path_of_building_blockwith the absolute path to your local directory where you want to store the project files.3. Initialize Environment
Run the initialization script to set up the required dependencies:
Dataset Preparation
1. Dataset Download and Extraction
Download the dataset from
👉 https://huggingface.co/datasets/dreaming-huang/buildingblock/blob/main/building_block_data_opensource_only_layout_and_cond.zip
Extract the
BoxCenterSizeLabel_alldirectory from the building_block_data_opensource_only_layout_and_cond.zip:2. Process Dataset
Run the following Python scripts in sequence to preprocess the data:
This script performs data augmentation through rotation of the original JSON files.
This script normalizes the Unreal Engine JSON format data.
This script converts the JSON data to NumPy arrays in box representation format.
Running the Model
Navigate to the scripts directory:
Execute the commands provided in
command.shto train and/or evaluate the model:Project Structure
1-json_rotate_augment.py: Data augmentation script2-normUeJson.py: JSON normalization script3-json2boxnp.py: JSON to NumPy conversion scriptscripts/: Contains model training and evaluation scriptsconfigs/: Configuration files for different model settingsBoxCenterSizeLabel_all/: Directory containing the datasetNotes
For more detailed information about the model architecture and training parameters, please refer to the documentation in the respective script files.