All Projects → daveredrum → Scanrefer

daveredrum / Scanrefer

Licence: other
[ECCV 2020] ScanRefer: 3D Object Localization in RGB-D Scans using Natural Language

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Scanrefer

Multimodal Toolkit
Multimodal model for text and tabular data with HuggingFace transformers as building block for text data
Stars: ✭ 78 (-7.14%)
Mutual labels:  natural-language-processing
Opennmt Tf
Neural machine translation and sequence learning using TensorFlow
Stars: ✭ 1,223 (+1355.95%)
Mutual labels:  natural-language-processing
Rotate 3d
3D Rotation image along specific axes
Stars: ✭ 81 (-3.57%)
Mutual labels:  3d
Chinese Xlnet
Pre-Trained Chinese XLNet(中文XLNet预训练模型)
Stars: ✭ 1,213 (+1344.05%)
Mutual labels:  natural-language-processing
Trails
Simple geometrical trail to attach to your Three.js objects
Stars: ✭ 79 (-5.95%)
Mutual labels:  3d
Icellr
Single (i) Cell R package (iCellR) is an interactive R package to work with high-throughput single cell sequencing technologies (i.e scRNA-seq, scVDJ-seq, ST and CITE-seq).
Stars: ✭ 80 (-4.76%)
Mutual labels:  3d
Dialogue Understanding
This repository contains PyTorch implementation for the baseline models from the paper Utterance-level Dialogue Understanding: An Empirical Study
Stars: ✭ 77 (-8.33%)
Mutual labels:  natural-language-processing
Starviewer
Starviewer, a cross-platform open source medical imaging software
Stars: ✭ 83 (-1.19%)
Mutual labels:  3d
Ja.text8
Japanese text8 corpus for word embedding.
Stars: ✭ 79 (-5.95%)
Mutual labels:  natural-language-processing
Simplednn
SimpleDNN is a machine learning lightweight open-source library written in Kotlin designed to support relevant neural network architectures in natural language processing tasks
Stars: ✭ 81 (-3.57%)
Mutual labels:  natural-language-processing
Text Dependency Parser
🏄 依存关系分析,NLP,自然语言处理
Stars: ✭ 78 (-7.14%)
Mutual labels:  natural-language-processing
Deepmoji
State-of-the-art deep learning model for analyzing sentiment, emotion, sarcasm etc.
Stars: ✭ 1,215 (+1346.43%)
Mutual labels:  natural-language-processing
Ar Pizza Slicer
5 different shapes!
Stars: ✭ 80 (-4.76%)
Mutual labels:  3d
Spatialmath Python
Create, manipulate and convert representations of position and orientation in 2D or 3D using Python
Stars: ✭ 78 (-7.14%)
Mutual labels:  3d
Openmesheffect
A low-overhead mesh-processing plug-in API for cross-software procedural effects
Stars: ✭ 82 (-2.38%)
Mutual labels:  3d
Abigsurvey
A collection of 500+ survey papers on Natural Language Processing (NLP) and Machine Learning (ML)
Stars: ✭ 1,203 (+1332.14%)
Mutual labels:  natural-language-processing
Typenovel
A simple markup language to write novel with types.
Stars: ✭ 80 (-4.76%)
Mutual labels:  natural-language-processing
Greek Bert
A Greek edition of BERT pre-trained language model
Stars: ✭ 84 (+0%)
Mutual labels:  natural-language-processing
Fornos
GPU Texture Baking Tool
Stars: ✭ 82 (-2.38%)
Mutual labels:  3d
Spacy Graphql
🤹‍♀️ Query spaCy's linguistic annotations using GraphQL
Stars: ✭ 81 (-3.57%)
Mutual labels:  natural-language-processing

ScanRefer: 3D Object Localization in RGB-D Scans using Natural Language

Introduction

We introduce the new task of 3D object localization in RGB-D scans using natural language descriptions. As input, we assume a point cloud of a scanned 3D scene along with a free-form description of a specified target object. To address this task, we propose ScanRefer, where the core idea is to learn a fused descriptor from 3D object proposals and encoded sentence embeddings. This learned descriptor then correlates the language expressions with the underlying geometric features of the 3D scan and facilitates the regression of the 3D bounding box of the target object. In order to train and benchmark our method, we introduce a new ScanRefer dataset, containing 51,583 descriptions of 11,046 objects from 800 ScanNet scenes. ScanRefer is the first large-scale effort to perform object localization via natural language expression directly in 3D.

Please also check out the project website here.

For additional detail, please see the ScanRefer paper:
"ScanRefer: 3D Object Localization in RGB-D Scans using Natural Language"
by Dave Zhenyu Chen, Angel X. Chang and Matthias Nießner
from Technical University of Munich and Simon Fraser University.

🌟 Benchmark Challenge 🌟

We provide the ScanRefer Benchmark Challenge for benchmarking your model automatically on the hidden test set! Learn more at our benchmark challenge website. After finishing training the model, please download the benchmark data and put the unzipped ScanRefer_filtered_test.json under data/. Then, you can run the following script the generate predictions:

python scripts/predict.py --folder <folder_name> --use_color

Note that the flags must match the ones set before training. The training information is stored in outputs/<folder_name>/info.json. The generated predictions are stored in outputs/<folder_name>/pred.json. For submitting the predictions, please compress the pred.json as a .zip or .7z file and follow the instructions to upload your results.

Dataset

If you would like to access to the ScanRefer dataset, please fill out this form. Once your request is accepted, you will receive an email with the download link.

Note: In addition to language annotations in ScanRefer dataset, you also need to access the original ScanNet dataset. Please refer to the ScanNet Instructions for more details.

Download the dataset by simply executing the wget command:

wget <download_link>

Data format

"scene_id": [ScanNet scene id, e.g. "scene0000_00"],
"object_id": [ScanNet object id (corresponds to "objectId" in ScanNet aggregation file), e.g. "34"],
"object_name": [ScanNet object name (corresponds to "label" in ScanNet aggregation file), e.g. "coffee_table"],
"ann_id": [description id, e.g. "1"],
"description": [...],
"token": [a list of tokens from the tokenized description] 

Setup

The code is tested on Ubuntu 16.04 LTS & 18.04 LTS with PyTorch 1.2.0 CUDA 10.0 installed. There are some issues with the newer version (>=1.3.0) of PyTorch. You might want to make sure you have installed the correct version. Otherwise, please execute the following command to install PyTorch:

The code is now compatiable with PyTorch 1.6! Please execute the following command to install PyTorch

conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.2 -c pytorch

Install the necessary packages listed out in requirements.txt:

pip install -r requirements.txt

After all packages are properly installed, please run the following commands to compile the CUDA modules for the PointNet++ backbone:

cd lib/pointnet2
python setup.py install

Before moving on to the next step, please don't forget to set the project root path to the CONF.PATH.BASE in lib/config.py.

Data preparation

  1. Download the ScanRefer dataset and unzip it under data/.
  2. Download the preprocessed GLoVE embeddings (~990MB) and put them under data/.
  3. Download the ScanNetV2 dataset and put (or link) scans/ under (or to) data/scannet/scans/ (Please follow the ScanNet Instructions for downloading the ScanNet dataset).

After this step, there should be folders containing the ScanNet scene data under the data/scannet/scans/ with names like scene0000_00

  1. Pre-process ScanNet data. A folder named scannet_data/ will be generated under data/scannet/ after running the following command. Roughly 3.8GB free space is needed for this step:
cd data/scannet/
python batch_load_scannet_data.py

After this step, you can check if the processed scene data is valid by running:

python visualize.py --scene_id scene0000_00
  1. (Optional) Pre-process the multiview features from ENet.

    a. Download the ENet pretrained weights (1.4MB) and put it under data/

    b. Download and decompress the extracted ScanNet frames (~13GB).

    c. Change the data paths in config.py marked with TODO accordingly.

    d. Extract the ENet features:

    python script/compute_multiview_features.py
    

    e. Project ENet features from ScanNet frames to point clouds; you need ~36GB to store the generated HDF5 database:

    python script/project_multiview_features.py --maxpool
    

    You can check if the projections make sense by projecting the semantic labels from image to the target point cloud by:

    python script/project_multiview_labels.py --scene_id scene0000_00 --maxpool
    

Usage

Training

To train the ScanRefer model with RGB values:

python scripts/train.py --use_color

For more training options (like using preprocessed multiview features), please run scripts/train.py -h.

Evaluation

To evaluate the trained ScanRefer models, please find the folder under outputs/ with the current timestamp and run:

python scripts/eval.py --folder <folder_name> --reference --use_color --no_nms --force --repeat 5

Note that the flags must match the ones set before training. The training information is stored in outputs/<folder_name>/info.json

Visualization

To predict the localization results predicted by the trained ScanRefer model in a specific scene, please find the corresponding folder under outputs/ with the current timestamp and run:

python scripts/visualize.py --folder <folder_name> --scene_id <scene_id> --use_color

Note that the flags must match the ones set before training. The training information is stored in outputs/<folder_name>/info.json. The output .ply files will be stored under outputs/<folder_name>/vis/<scene_id>/

Models

For reproducing our results in the paper, we provide the following training commands and the corresponding pre-trained models:

Name Command Unique Multiple Overall Weights
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
xyz
python script/train.py --no_lang_cls
63.98 43.57 29.28 18.99 36.01 23.76 weights
xyz+rgb
python script/train.py --use_color --no_lang_cls
63.24 41.78 30.06 19.23 36.5 23.61 weights
xyz+rgb+normals
python script/train.py --use_color --use_normal --no_lang_cls
64.63 43.65 31.89 20.77 38.24 25.21 weights
xyz+multiview
python script/train.py --use_multiview --no_lang_cls
77.2 52.69 32.08 19.86 40.84 26.23 weights
xyz+multiview+normals
python script/train.py --use_multiview --use_normal --no_lang_cls
78.22 52.38 33.61 20.77 42.27 26.9 weights
xyz+lobjcls
python script/train.py
64.31 44.04 30.77 19.44 37.28 24.22 weights
xyz+rgb+lobjcls
python script/train.py --use_color
65.00 43.31 30.63 19.75 37.30 24.32 weights
xyz+rgb+normals+lobjcls
python script/train.py --use_color --use_normal
67.64 46.19 32.06 21.26 38.97 26.10 weights
xyz+multiview+lobjcls
python script/train.py --use_multiview
76.00 50.40 34.05 20.73 42.19 26.50 weights
xyz+multiview+normals+lobjcls
python script/train.py --use_multiview --use_normal
76.33 53.51 32.73 21.11 41.19 27.40 weights

If you would like to try out the pre-trained models, please download the model weights and extract the folder to outputs/. Note that the results are higher than before because of a few iterations of code refactoring and bug fixing.

Changelog

11/11/2020: Updated paper with the improved results due to bug fixing.

11/05/2020: Released pre-trained weights.

08/08/2020: Fixed the issue with lib/box_util.py.

08/03/2020: Fixed the issue with lib/solver.py and script/eval.py.

06/16/2020: Fixed the issue with multiview features.

01/31/2020: Fixed the issue with bad tokens.

01/21/2020: Released the ScanRefer dataset.

Citation

If you use the ScanRefer data or code in your work, please kindly cite our work and the original ScanNet paper:

@article{chen2020scanrefer,
    title={ScanRefer: 3D Object Localization in RGB-D Scans using Natural Language},
    author={Chen, Dave Zhenyu and Chang, Angel X and Nie{\ss}ner, Matthias},
    journal={16th European Conference on Computer Vision (ECCV)},
    year={2020}
}

@inproceedings{dai2017scannet,
    title={Scannet: Richly-annotated 3d reconstructions of indoor scenes},
    author={Dai, Angela and Chang, Angel X and Savva, Manolis and Halber, Maciej and Funkhouser, Thomas and Nie{\ss}ner, Matthias},
    booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
    pages={5828--5839},
    year={2017}
}

Acknowledgement

We would like to thank facebookresearch/votenet for the 3D object detection codebase and erikwijmans/Pointnet2_PyTorch for the CUDA accelerated PointNet++ implementation.

License

ScanRefer is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Copyright (c) 2020 Dave Zhenyu Chen, Angel X. Chang, Matthias Nießner

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].