ossid_code
Source code for OSSID: Online Self-Supervised Instance Detection by (And For) Pose Estimation
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.1%) to scientific vocabulary
Keywords
Repository
Source code for OSSID: Online Self-Supervised Instance Detection by (And For) Pose Estimation
Basic Info
- Host: GitHub
- Owner: r-pad
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://georgegu1997.github.io/OSSID/
- Size: 598 KB
Statistics
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
readme.md
OSSID: Online Self-Supervised Instance Detection (and for) Pose Estimation
OSSID is a self-supervised pipeline for object instance detection by, and for, 6D pose estimation. The results of a zero-shot 6D pose estimation method (Zephyr) used to finetune a zero-shot detector online. Then the detection results in turn provide object bounding boxes and reduce the search space for pose estimation. OSSID enables detection and pose estimation to adapt to new objects and environments online, without the need of no manual annotation. OSSID achieve the state-of-the-art results on YCB-V and LM-O datasets.
[Arxiv] [Project Page] [Video]

Setup
Clone this repo. Update the path to this repo as
OSSID_ROOTin config.py.git clone git@github.com:r-pad/OSSID_code.gitWe recommend building the environment and installing all required packages using Anaconda. Also pip install this repo
cd OSSID_code conda env create -n ossid --file env.yml conda activate ossid pip install -e .Clone and pip install the following libraries. Update the path to bop_toolkit source code as
BOP_TOOLKIT_PATHin config.py.git clone git@github.com:r-pad/quat_math.git cd quat_math; pip install .; cd .. git clone git@github.com:r-pad/object_pose_utils.git cd object_pose_utils; pip install .; cd .. git clone git@github.com:r-pad/bop_toolkit.git # We have only tested with our own fork of bop_toolkit cd bop_toolkit; pip install -e .; cd ..Set up Zephyr from this link. Note that we will use the same conda environment, so please follow instructions below (steps 2, 3, and 4 of the original instructions).
``` sudo apt-get install build-essential cmake libopencv-dev python-numpy
git clone --recurse-submodules git@github.com:r-pad/zephyr.git cd zephyr
mkdir build cd build cmake .. -DPYTHONEXECUTABLE=$(python -c "import sys; print(sys.executable)") -DPYTHONINCLUDEDIR=$(python -c "from distutils.sysconfig import getpythoninc; print(getpythoninc())") -DPYTHONLIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.getconfigvar('LIBDIR'))") make; make install
cd .. # move to the root folder of zephyr pip install -e . ```
- MVTec Halcon needs to be set up to run the entire pipeline. This repo is tested with Halcon student edition (version=21.05), while it should work with newer version. Remeber to update the python binding mvtec-halcon accordingly if you use a newer version (By default,
mvtec-halcon==21050.0.0is installed). After installatio of Halcon, you might need to run
source /path/to/halcon/.profile_halcon
(For BOP Challenge evaluation) Setup the renderer needed for BOP evaluation as instructed here. This repo is tested with the C++ Renderer (bop_renderer). Note that you may need to change the python version in CMakeLists.txt from 3.6 to 3.8. Update config.py in
bop_toolkitaccordingly. UpdateBOP_RESULTS_FOLDERin OSSIDconfig.pyto be the same asresults_pathin bop_toolkitconfig.py.(For detection mAP evaluation) Clone this Github repo. Update its path as
MAP_CODE_ROOTinconfig.py.
Download data, checkpoints
Download YCB-V and LM-O datasets from BOP challenge. The "Base Archive", "Object models" and "BOP'19/20 test images" are sufficient for running evaluation. Unzip them according to the structure described in BOP Challenge into a folder and update
BOP_DATASET_ROOT.Download the checkpoints and preprocessed data. From Google Drive, download all the files and placed them in
python/ossid/ckptsandpython/ossid/datafolders accordingly. Please refer to thereadme.mdfiles in these two folders for the description of each file. Note thatycbv_grid.zipneeds to be unzipped atBOP_DATASETS_ROOT/ycbv/folder.
Experiments
The following commands can be used to reproduce the results reported in our paper. First change the directory to python/ossid/scripts/ and then run the following commands.
In case of out of GPU memory error, please consider setting --finetune_batch_size 4 or a smaller number.
If you are using student license, Halcon may not be able to run in multiple processes (HALCON error #2348: Activation error). Therefore please run the following commans sequentially.
OSSID(Ours) on LM-O in Table 1.
python online_learning.py \ --dataset_name lmo \ --n_local_test 10 \ --finetune_interval 32 \ --finetune_epochs 1 \ --always_dtoid_mask \ --use_pretrained_dtoid \ --exp_name lmo_final_mainOSSID(Ours) on YCB-V in Table 1.
python online_learning.py \ --dataset_name ycbv \ --n_local_test 10 \ --finetune_interval 32 \ --finetune_epochs 1 \ --use_sift_hypos \ --finetune_warmup 128 \ --always_dtoid_mask \ --fast \ --exp_name ycbv_final_mainOSSID(w/Conf.Filter) on LM-O in Table 1.
python online_learning.py \ --dataset_name lmo \ --n_local_test 10 \ --finetune_interval 32 \ --finetune_epochs 1 \ --use_pretrained_dtoid \ --exp_name lmo_final_confOSSID(w/Conf.Filter) on YCB-V in Table 1.
python online_learning.py \ --dataset_name ycbv \ --n_local_test 10 \ --finetune_interval 32 \ --finetune_epochs 1 \ --use_sift_hypos \ --finetune_warmup 128 \ --fast \ --exp_name ycbv_final_confOSSID(Transductive) on LM-O in Table 1.
python online_learning.py \ --dataset_name lmo \ --n_local_test 10 \ --use_offline_dtoid \ --no_finetune \ --exp_name lmo_final_transductiveOSSID(Transductive) on YCB-V in Table 1.
python online_learning.py \ --dataset_name ycbv \ --n_local_test 10 \ --use_sift_hypos \ --use_offline_dtoid \ --no_finetune \ --fast \ --exp_name ycbv_final_transductiveOSSID(Oracle) on LM-O in Table 1.
python online_learning.py \ --dataset_name lmo \ --n_local_test 10 \ --finetune_interval 32 \ --finetune_epochs 1 \ --always_dtoid_mask \ --use_pretrained_dtoid \ --use_oracle_gt \ --exp_name lmo_final_oracleOSSID(Oracle) on YCB-V in Table 1.
python online_learning.py \ --dataset_name ycbv \ --n_local_test 10 \ --finetune_interval 32 \ --finetune_epochs 1 \ --use_sift_hypos \ --finetune_warmup 128 \ --always_dtoid_mask \ --fast \ --use_oracle_gt \ --exp_name ycbv_final_oracle
Cite
If you find this codebase useful in your research, please consider citing:
``` @ARTICLE{ral2022ossid, author={Gu, Qiao and Okorn, Brian and Held, David}, journal={IEEE Robotics and Automation Letters}, title={OSSID: Online Self-Supervised Instance Detection by (And For) Pose Estimation}, year={2022}, volume={7}, number={2}, pages={3022-3029}, doi={10.1109/LRA.2022.3145488}}
@inproceedings{icra2022ossid, title={OSSID: Online Self-Supervised Instance Detection by (and for) Pose Estimation}, author={Gu, Qiao and Okorn, Brian and Held, David}, booktitle={2022 International Conference on Robotics and Automation (ICRA)}, year={2022}} ```
Reference
- We used the PPF implementation provided in MVTec HALCON software for pose hypothese generation. It is a commercial software but provides free license for student.
Owner
- Name: R-Pad - Robots Perceiving and Doing
- Login: r-pad
- Kind: organization
- Repositories: 42
- Profile: https://github.com/r-pad
This is the repository for the R-Pad lab at CMU.
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Gu"
given-names: "Qiao"
orcid: "https://orcid.org/0000-0002-1342-3307"
- family-names: "Okorn"
given-names: "Brian"
orcid: "https://orcid.org/0000-0001-8092-1288"
- family-names: "Held"
given-names: "David"
orcid: "https://orcid.org/0000-0003-0537-1508"
title: "OSSID: Online Self-Supervised Instance Detection by (And For) Pose Estimation"
version: 1.0.0
date-released: 2022.02.27
url: "https://github.com/r-pad/OSSID_code"
doi: 10.1109/LRA.2022.3145488
preferred-citation:
type: article
authors:
- family-names: "Gu"
given-names: "Qiao"
orcid: "https://orcid.org/0000-0002-1342-3307"
- family-names: "Okorn"
given-names: "Brian"
orcid: "https://orcid.org/0000-0001-8092-1288"
- family-names: "Held"
given-names: "David"
orcid: "https://orcid.org/0000-0003-0537-1508"
doi: "10.1109/LRA.2022.3145488"
journal: "IEEE Robotics and Automation Letters"
start: 3022 # First page number
end: 3029 # Last page number
title: "OSSID: Online Self-Supervised Instance Detection by (And For) Pose Estimation"
issue: 2
volume: 7
year: 2022