meidachen / STPLS3D

🔥 Synthetic and real-world 2d/3d dataset for semantic and instance segmentation (BMVC 2022 Oral)
245 stars 20 forks source link

Will you provide the code for the instance segmentation on HAIS #1

Closed bilel-bj closed 2 years ago

bilel-bj commented 2 years ago

First, I would like to thank you very much for this important breakthrough. I just want to ask if you will provide the code for the instance segmentation code applied on HAIS model?

meidachen commented 2 years ago

Hi Bilel,

Thanks for your interest in our project, yes we will provide the code for running HAIS on our datasets. The code is still under preparation, and I will let you know once it is in the repo.

Best,

Meida Chen

meidachen commented 2 years ago

Hi Bilel,

I have uploaded the code for testing HAIS in the repo. Please give it a try and let me know if you have any questions. I have made a quick draft of how you can run it as shown below. I will polish it later and add it to the repo, but for now please follow the following steps to test. (HAIS setup is the same as the official HAIS release)

git clone https://github.com/meidachen/STPLS3D.git cd STPLS3D/HAIS conda create -n hais python=3.7 conda activate hais pip install -r requirements.txt conda install -c bioconda google-sparsehash conda install libboost conda install -c daleydeng gcc-5 # (optional, install gcc-5.4 in conda env) cd STPLS3D/HAIS/lib/spconv export CUDACXX= $PATH_TO_NVCC$ (optional) python setup.py bdist_wheel cd STPLS3D/HAIS/lib/spconv/dist pip install {wheel_file_name}.whl cd STPLS3D/HAIS/lib/hais_ops export CPLUS_INCLUDE_PATH={conda_env_path}/hais/include:$CPLUS_INCLUDE_PATH python setup.py build_ext develop

Training: download the data (Synthetic_v3_InstanceSegmentation) from www.stpls3d.com/data, unzip it and place it under STPLS3D/HAIS/dataset. HAIS ├── dataset    └── Synthetic_v3_InstanceSegmentation    ├── 10_points_GTv3.txt    ├── 11_points_GTv3.txt    ├── 12_points_GTv3.txt    ├── 13_points_GTv3.txt    ├── 14_points_GTv3.txt    ├── 15_points_GTv3.txt    ├── 16_points_GTv3.txt    ├── 17_points_GTv3.txt    ├── 18_points_GTv3.txt    ├── 19_points_GTv3.txt    ├── 1_points_GTv3.txt    ├── 20_points_GTv3.txt    ├── 21_points_GTv3.txt    ├── 22_points_GTv3.txt    ├── 23_points_GTv3.txt    ├── 24_points_GTv3.txt    ├── 25_points_GTv3.txt    ├── 2_points_GTv3.txt    ├── 3_points_GTv3.txt    ├── 4_points_GTv3.txt    ├── 5_points_GTv3.txt    ├── 6_points_GTv3.txt    ├── 7_points_GTv3.txt    ├── 8_points_GTv3.txt    └── 9_points_GTv3.txt

cd STPLS3D/HAIS/data python prepare_data_inst_instance_stpls3d.py

(optional) In case you are changing training data (i.e., not using data augmentation, using different ways for data augmentation, etc.), please run prepare_data_statistic_stpls3d.py to get the class_weight, class_radius_mean, and class_numpoint_mean_dict. Change them in hais_run_stpls3d.yaml, hierarchical_aggregation.cpp, and hierarchical_aggregation.cu accordingly. Make sure you rebuild the hais_ops.

CUDA_VISIBLE_DEVICES=1 python train.py --config config/hais_run_stpls3d.yaml

Testing: CUDA_VISIBLE_DEVICES=1 python test.py --config config/hais_run_stpls3d.yaml --pretrain $PATH_TO_PRETRAIN_MODEL$

bilel-bj commented 2 years ago

Thank you very much for the update!!! Really important work!