diff --git a/README.md b/README.md index a92470f..68c24bc 100644 --- a/README.md +++ b/README.md @@ -509,7 +509,7 @@ Notes:
Click for details... -We provide the training code that we used to train single-view single-object pose estimation models on the 7 core datasets (LM-O, TLESS, TUD-L, IC-BIN, ITODD, HB, YCB-V) and pre-trained detector and pose estimation models. Note that these models are different from the ones used in the paper. The differences with the models used in the paper are the following: +We provide the training code that we used to train single-view single-object pose estimation models on the 7 core datasets (LM-O, TLESS, TUD-L, IC-BIN, ITODD, HB, YCB-V) and pre-trained detector and pose estimation models (core datasets + HOPE). Note that these models are different from the ones used in the paper. The differences with the models used in the paper are the following: - In the paper, we use already available detectors for T-LESS and YCB-Video. For the BOP20 challenge, we trained our own detectors on each dataset. - Detection and pose estimation models are trained using PBR synthetic images provided with the BOP challenge instead of using our own synthetic data to make it easier to compare fairly with the other approaches. @@ -524,7 +524,7 @@ python -m cosypose.scripts.download --bop_dataset=DATASET --pbr_training_images python -m cosypose.scripts.download --urdf_models=DATASET ``` -for DATASET={hb,icbin,itodd,lm,lmo,tless,tudl,ycbv}. If you are not interested in training the models, you can remove the flag --pbr_training_images and you can omit lm. +for DATASET={hb,icbin,itodd,lm,lmo,tless,tudl,ycbv,hope}. If you are not interested in training the models, you can remove the flag --pbr_training_images and you can omit lm. ## Downloading pre-trained models @@ -574,6 +574,10 @@ where model_id is given by the table below: | ycbv | detector | SYNT+REAL | detector-bop-ycbv-synt+real--292971 | | ycbv | coarse | SYNT+REAL | coarse-bop-ycbv-synt+real--822463 | | ycbv | refiner | SYNT+REAL | refiner-bop-ycbv-synt+real--631598 | +| | | | | +| hope | detector | PBR | detector-bop-hope-pbr--15246 | +| hope | coarse | PBR | coarse-bop-hope-pbr--225203 | +| hope | refiner | PBR | refiner-bop-hope-pbr--955392 | The detectors are MaskRCNN models with resnet50 FPN backbone. PBR corresponds to training only on provided synthetic images. SYNT+REAL corresponds to training on all available synthetic and real images when available (only for tless, tudl and ycbv). SYNT+REAL models are pre-trained from PBR. diff --git a/cosypose/bop_config.py b/cosypose/bop_config.py index 1e716cb..3ad7fca 100644 --- a/cosypose/bop_config.py +++ b/cosypose/bop_config.py @@ -59,7 +59,6 @@ train_synt_real_ds_names=[('tudl.pbr', 10), ('tudl.train.real', 1)] ) - BOP_CONFIG['ycbv'] = dict( input_resize=(640, 480), urdf_ds_name='ycbv', @@ -71,6 +70,16 @@ train_synt_real_ds_names=[('ycbv.pbr', 20), ('ycbv.train.synt', 1), ('ycbv.train.real', 3)] ) +BOP_CONFIG['hope'] = dict( + input_resize=(1920, 1080), + urdf_ds_name='hope', + obj_ds_name='hope.bop', + # train_pbr_ds_name=[hope.pbr], + inference_ds_name=['hope.bop19'], + test_ds_name=['hope.bop19'], + val_ds_name=['hope.val'], +) + PBR_DETECTORS = dict( hb='detector-bop-hb-pbr--497808', icbin='detector-bop-icbin-pbr--947409', @@ -79,6 +88,7 @@ tless='detector-bop-tless-pbr--873074', tudl='detector-bop-tudl-pbr--728047', ycbv='detector-bop-ycbv-pbr--970850', + hope='detector-bop-hope-pbr--15246', ) PBR_COARSE = dict( @@ -89,6 +99,7 @@ tless='coarse-bop-tless-pbr--506801', tudl='coarse-bop-tudl-pbr--373484', ycbv='coarse-bop-ycbv-pbr--724183', + hope='coarse-bop-hope-pbr--225203', ) PBR_REFINER = dict( @@ -99,6 +110,7 @@ tless='refiner-bop-tless-pbr--233420', tudl='refiner-bop-tudl-pbr--487212', ycbv='refiner-bop-ycbv-pbr--604090', + hope='refiner-bop-hope-pbr--955392', ) SYNT_REAL_DETECTORS = dict( diff --git a/cosypose/datasets/datasets_cfg.py b/cosypose/datasets/datasets_cfg.py index 1a2ad27..b2bad8b 100644 --- a/cosypose/datasets/datasets_cfg.py +++ b/cosypose/datasets/datasets_cfg.py @@ -97,6 +97,10 @@ def make_scene_dataset(ds_name, n_frames=None): ds_dir = BOP_DS_DIR / 'ycbv' ds = BOPDataset(ds_dir, split='test') ds = keep_bop19(ds) + elif ds_name == 'hope.bop19': + ds_dir = BOP_DS_DIR / 'hope' + ds = BOPDataset(ds_dir, split='test') + ds = keep_bop19(ds) elif ds_name == 'hb.pbr': ds_dir = BOP_DS_DIR / 'hb' @@ -119,6 +123,9 @@ def make_scene_dataset(ds_name, n_frames=None): elif ds_name == 'ycbv.pbr': ds_dir = BOP_DS_DIR / 'ycbv' ds = BOPDataset(ds_dir, split='train_pbr') + # elif ds_name == 'hope.pbr': + # ds_dir = BOP_DS_DIR / 'hope' + # ds = BOPDataset(ds_dir, split='train_pbr') elif ds_name == 'hb.val': ds_dir = BOP_DS_DIR / 'hb' @@ -126,6 +133,10 @@ def make_scene_dataset(ds_name, n_frames=None): elif ds_name == 'itodd.val': ds_dir = BOP_DS_DIR / 'itodd' ds = BOPDataset(ds_dir, split='val') + elif ds_name == 'hope.val': + ds_dir = BOP_DS_DIR / 'hope' + ds = BOPDataset(ds_dir, split='val') + elif ds_name == 'tudl.train.real': ds_dir = BOP_DS_DIR / 'tudl' ds = BOPDataset(ds_dir, split='train_real') @@ -176,6 +187,8 @@ def make_object_dataset(ds_name): ds = BOPObjectDataset(BOP_DS_DIR / 'lm/models') elif ds_name == 'tudl': ds = BOPObjectDataset(BOP_DS_DIR / 'tudl/models') + elif ds_name == 'hope': + ds = BOPObjectDataset(BOP_DS_DIR / 'hope/models') else: raise ValueError(ds_name) @@ -208,6 +221,8 @@ def make_urdf_dataset(ds_name): ds = BOPUrdfDataset(LOCAL_DATA_DIR / 'urdfs' / 'lm') elif ds_name == 'tudl': ds = BOPUrdfDataset(LOCAL_DATA_DIR / 'urdfs' / 'tudl') + elif ds_name == 'hope': + ds = BOPUrdfDataset(LOCAL_DATA_DIR / 'urdfs' / 'hope') # Custom scenario elif 'custom' in ds_name: diff --git a/cosypose/scripts/download.py b/cosypose/scripts/download.py index c04e239..70be6ec 100644 --- a/cosypose/scripts/download.py +++ b/cosypose/scripts/download.py @@ -48,6 +48,10 @@ 'tudl': { 'splits': ['test_all', 'train_real'] }, + + 'hope': { + 'splits': ['val', 'test_all'] + }, } BOP_DS_NAMES = list(BOP_DATASETS.keys()) diff --git a/cosypose/scripts/run_bop_inference.py b/cosypose/scripts/run_bop_inference.py index 94ac242..31bb2c8 100644 --- a/cosypose/scripts/run_bop_inference.py +++ b/cosypose/scripts/run_bop_inference.py @@ -246,7 +246,7 @@ def main(): if args.n_views > 1: ds_names = ['hb', 'tless', 'ycbv'] else: - ds_names = ['hb', 'icbin', 'itodd', 'lmo', 'tless', 'tudl', 'ycbv'] + ds_names = ['hb', 'icbin', 'itodd', 'lmo', 'tless', 'tudl', 'ycbv', 'hope'] if args.dataset is not None: assert args.dataset in ds_names, f'{args.dataset} not in {ds_names}'