Giter VIP home page Giter VIP logo

opa's Introduction

OPA: Learning Object-level Point Augmentor for Semi-supervised 3D Object Detection.

Introduction

This repository is the code release for our BMVC 2022 paper.

In this repository, we provide an implementation (with Pytorch) based on VoteNet, SESS, 3DIoUMatch and PointAugment with some modification, as well as the training and evaluation scripts on ScanNet.

Installation

This repo is tested under the following environment:

You can follow the steps below to install the above dependencies:

# Create and activate virtualenv
conda create -n OPA python=3.7.6
conda activate OPA

# Install NumPy
pip install numpy==1.18.5

# Install PyTorch according to your CUDA version.
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge

# Install TensorFlow (for TensorBoard).
# We tested this repo with TensorFlow 2.9.1.
pip install tensorflow

# Compile the CUDA code for PointNet++, which is used in the backbone network.
# If you have any probelm about this part, you can refer to [Pointnet2/Pointnet++ PyTorch](https://github.com/erikwijmans/Pointnet2_PyTorch#building-only-the-cuda-kernels)
cd pointnet2
python setup.py install

# Compile the CUDA code for general 3D IoU calculation in [OpenPCDet](https://github.com/open-mmlab/OpenPCDet):
cd OpenPCDet
python setup.py develop

# Install dependencies:
pip install -r requirements.txt

Dataset

ScanNet

Please download the ScanNet data following the README in scannet folder.

Download Pre-trained and Trained Models

We provided the pre-trained models of ScanNet 10%: detector, augmentor
We also provided the trained model of ScanNet 10%: detectot

Pre-training

Pre-train with script.

sh run_pretrain.sh <GPU_ID> <LOG_DIR> <DATASET> <LABELED_LIST> <BATCH_SIZE> <BOX_NUM> <LAMBDA> <WARM_UP>

For example:

sh run_pretrain.sh 0 results/pretrain scannet scannetv2_train_0.1.txt 4 3 0.1 0

Training

After pre-training or downloading the checkpoint, you can train with script as follow.

sh run_train.sh <GPU_ID> <LOG_DIR> <DATASET> <LABELED_LIST> <PRETRAINED_DETECOR_CKPT> <PRETRAINED_AUGMENTOR_CKPT> <BATCH_SIZE> <BOX_NUM> <BOX_NUM_UNLABELED>

For example:

sh run_train.sh 0 results/train scannet scannetv2_train_0.1.txt results/pretrain/best_checkpoint_sum.tar results/pretrain/aug_best_checkpoint_sum.tar 2,4 3 3

Evaluation

After training or downloading the checkpoint, you can evaluate with script as follow.

sh run_eval.sh <GPU_ID> <LOG_DIR> <DATASET> <LABELED_LIST> <CKPT>

For example:

sh run_eval.sh 0 results/eval scannet scannetv2_train_0.1.txt results/train/best_checkpoint_sum.tar

If you want to evaluate with IoU optimization, please run:

sh run_eval_opt.sh <GPU_ID> <LOG_DIR> <DATASET> <LABELED_LIST> <CKPT> <OPT_RATE>

The number of steps (of optimization) is by default 10.

Acknowledgements

Our implementation uses code from the following repositories:

opa's People

Contributors

nomiaro avatar

Stargazers

 avatar  avatar Jui-Che (Ben) Chiang avatar Leon avatar Yucheng Han avatar  avatar  avatar Lingdong Kong avatar JLQ avatar Yi-Hsuan Tsai avatar

Watchers

Lingdong Kong avatar JLQ avatar  avatar

Forkers

jlqzzz luluho1208

opa's Issues

Outdoor Scenarios

Hi @nomiaro, thank you for open-sourcing this work! Regarding the approach proposed, can it be applied to the outdoor cases? Such as KITTI and nuScenes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.