- The code has been tested on Linux with python 3.8, torch 1.9.0, and cuda 11.1.
- Install pytorch and other required packages:
# 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- Compile the deformable-attention modules (from deformable-DETR) and the differentiable rasterization module (from BoundaryFormer):
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
Please download the data from this link.And put it in RoomSegmentation/Data/
Please download and extract the checkpoints of our model from this link.And put it in RoomSegmentation/Weights/
The predicted images will be saved in RoomSegmentation/Results/ and the AP50 and mIOU will be shown in terminal.
sudo chmod +x scripts/eval_mp3d.sh
sudo chmod +x scripts/eval_mp3d_enhanced.sh
./scripts/eval_mp3d.sh
./scripts/eval_mp3d_enhanced.shThe input is a PLY file (with the Y-axis facing up by default, and preferably with a mesh). The output consists of the segmented room point clouds and their corresponding information. The input and output paths can be modified in the shell (.sh) file. Currently, the default is set to the point cloud of the first floor of GGBL in University of Michigan.
sudo chmod +x scripts/demo.sh
./scripts/demo.sh