### Install PyTorch and Dependencies Source: https://github.com/ywyue/roomformer/blob/main/README.md Install PyTorch with the specified version and CUDA support, followed by other project requirements. Adjust the CUDA version if necessary. ```shell # adjust the cuda version accordingly pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html pip install -r requirements.txt ``` -------------------------------- ### Train RoomFormer on SceneCAD Source: https://github.com/ywyue/roomformer/blob/main/README.md Run this command to start training the RoomFormer model on the SceneCAD dataset. ```shell ./tools/train_scenecad.sh ``` -------------------------------- ### Create and Activate Conda Environment Source: https://github.com/ywyue/roomformer/blob/main/README.md Use these commands to create a new conda environment for the project and activate it. Ensure you have conda installed. ```shell conda create -n roomformer python=3.8 conda activate roomformer ``` -------------------------------- ### Compile Deformable Attention and Rasterization Modules Source: https://github.com/ywyue/roomformer/blob/main/README.md Compile the deformable-attention and differentiable rasterization modules. Navigate to the respective directories and execute the provided shell scripts or setup commands. ```shell cd models/ops sh make.sh # unit test for deformable-attention modules (should see all checking is True) # python test.py cd ../../diff_ras python setup.py build develop ``` -------------------------------- ### Train Semantically-Rich Floorplans Source: https://github.com/ywyue/roomformer/blob/main/README.md Run this command to train RoomFormer on the semantically-rich floorplans of Structured3D. ```shell ./tools/train_stru3d_sem_rich.sh ``` -------------------------------- ### Train RoomFormer on Structured3D Source: https://github.com/ywyue/roomformer/blob/main/README.md This command initiates the training process for the RoomFormer model on the Structured3D dataset. ```shell ./tools/train_stru3d.sh ``` -------------------------------- ### Evaluate Semantically-Rich Floorplans Source: https://github.com/ywyue/roomformer/blob/main/README.md Run this command to evaluate RoomFormer on the semantically-rich floorplans of Structured3D. ```shell ./tools/eval_stru3d_sem_rich.sh ``` -------------------------------- ### Evaluate RoomFormer on Structured3D (Tight Layout) Source: https://github.com/ywyue/roomformer/blob/main/README.md Use this command for evaluation on the Structured3D test set when using a 'tight' room layout. Note that evaluation still uses unmodified ground truth floorplans. ```shell ./tools/eval_stru3d_tight.sh ``` -------------------------------- ### Evaluate RoomFormer on Structured3D Source: https://github.com/ywyue/roomformer/blob/main/README.md Run this command to evaluate the model on the Structured3D test set using default ground truth data. ```shell ./tools/eval_stru3d.sh ``` -------------------------------- ### Evaluate RoomFormer on SceneCAD Source: https://github.com/ywyue/roomformer/blob/main/README.md Execute this command to evaluate the model on the SceneCAD dataset. This script adapts evaluation from MonteFloor. ```shell ./tools/eval_scenecad.sh ``` -------------------------------- ### Generate Point Cloud from Structured3D Panorama Source: https://github.com/ywyue/roomformer/blob/main/data_preprocess/README.md Converts registered multi-view RGB-D panoramas from the Structured3D dataset into point clouds. Ensure the Structured3D_panorama folder is downloaded and accessible. ```shell python generate_point_cloud_stru3d.py --data_root=Structured3D_panorama ``` -------------------------------- ### Generate COCO Annotation from Structured3D Source: https://github.com/ywyue/roomformer/blob/main/data_preprocess/README.md Projects point clouds to density maps and generates COCO format annotations for the Structured3D dataset. Requires the data root and an output directory. ```shell python generate_coco_stru3d.py --data_root=Structured3D_panorama --output=coco_stru3d ``` -------------------------------- ### Structured3D Dataset Organization Source: https://github.com/ywyue/roomformer/blob/main/README.md Organize the downloaded Structured3D dataset in COCO format within the 'data/stru3d' directory. Ensure the train, val, test, and annotations subdirectories are correctly populated. ```text code_root/ └── data/ └── stru3d/ ├── train/ ├── val/ ├── test/ └── annotations/ ├── train.json ├── val.json └── test.json ``` -------------------------------- ### SceneCAD Dataset Organization Source: https://github.com/ywyue/roomformer/blob/main/README.md Organize the downloaded SceneCAD dataset in COCO format within the 'data/scenecad' directory. Ensure the train, val, and annotations subdirectories are correctly populated. ```text code_root/ └── data/ └── scenecad/ ├── train/ ├── val/ └── annotations/ ├── train.json ├── val.json ``` -------------------------------- ### Generate COCO Annotation from SceneCAD Source: https://github.com/ywyue/roomformer/blob/main/data_preprocess/README.md Projects point clouds to density maps and generates COCO format annotations for the SceneCAD dataset. Requires paths to the ScanNet data, extracted 2D floor plans, scan transformations, and an output directory. ```shell python generate_coco_scenecad.py --data_root=ScanNet --scannet_floor_path=2Dfloor_planes --scans_transform_path=scans_transform --output=coco_scenecad ``` -------------------------------- ### Extract 2D Floor Plan from SceneCAD Source: https://github.com/ywyue/roomformer/blob/main/data_preprocess/README.md Extracts 2D polygons from 3D layout annotations for ScanNet data, a prerequisite for generating SceneCAD annotations. Requires paths to ScanNet planes, scan transformations, and an output path. ```shell python extract_2dfloor.py --scannet_planes_path=scannet_planes --scans_transform_path=scans_transform --out_path=2Dfloor_planes ``` -------------------------------- ### RoomFormer Citation Source: https://github.com/ywyue/roomformer/blob/main/README.md Use this BibTeX entry when citing RoomFormer in your research. ```bibtex @inproceedings{yue2023connecting, title = {{Connecting the Dots: Floorplan Reconstruction Using Two-Level Queries}}, author = {Yue, Yuanwen and Kontogianni, Theodora and Schindler, Konrad and Engelmann, Francis}, booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, year = {2023} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.