From cf73e0292851f7ab3d11e9a6636d90a128d95f0c Mon Sep 17 00:00:00 2001 From: Stephen Tyree Date: Mon, 23 Jan 2023 15:42:58 -0600 Subject: [PATCH 1/6] added basic HOPE config and download settings --- cosypose/bop_config.py | 14 +++++++++++++- cosypose/scripts/download.py | 4 ++++ rclone.conf | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/cosypose/bop_config.py b/cosypose/bop_config.py index 1e716cb..f166182 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=(640, 480), + 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/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/rclone.conf b/rclone.conf index b43d0da..9530f20 100644 --- a/rclone.conf +++ b/rclone.conf @@ -2,5 +2,5 @@ type = drive scope = drive.readonly root_folder_id = 1JmOYbu1oqN81Dlj2lh6NCAMrC8pEdAtD -token = {"access_token":"ya29.a0AfH6SMC5mptNAOWZ_SZUhCy62ztZ9kqWbgGI8GpwAjACETpPavaMc1VCMfjDYlAXWZSLpAmygg8ppN9rqhsjtc0RI8yWVaVJtvHNfVVyHzJG2afrVuTsRq4czsDpJVJr2XaN19rlKsxp2ftG8BlcaxaujvRyawXT-CtfuA","token_type":"Bearer","refresh_token":"1//03Y__9oDQaadTCgYIARAAGAMSNwF-L9Ir1Ekfa8SGW8WupnLR2QsdRU0Su-QXIWeqAST-mbmtg2OGWB01vblv_GNyQXLjzD9b35A","expiry":"2020-08-16T16:01:06.690594859+02:00"} +token = {"access_token":"ya29.a0AX9GBdVrXEpWAaIPK_hBGt08UObqBHBCHiHH4krxLasnMJTOV2DI6dc8Rq0f3MbC08D2rgHdDYIEmZj79AyDgahwRnupQbe4yNUe4SLZwHlcEz25JBtvT5f_BrWMpHPWHth6gZn7KeNv67FTV_Ic10yEiYn9BtwmswaCgYKATMSAQASFQHUCsbCJf5GvffzaeNsY1UTgc2CTg0169","token_type":"Bearer","refresh_token":"1//03Y__9oDQaadTCgYIARAAGAMSNwF-L9Ir1Ekfa8SGW8WupnLR2QsdRU0Su-QXIWeqAST-mbmtg2OGWB01vblv_GNyQXLjzD9b35A","expiry":"2023-01-20T21:34:50.683578414-06:00"} From 716d10d78835d2de7a4050e24f39e69c7cb362bc Mon Sep 17 00:00:00 2001 From: Stephen Tyree Date: Mon, 23 Jan 2023 15:42:58 -0600 Subject: [PATCH 2/6] add hope to datasets_cfg.py --- cosypose/datasets/datasets_cfg.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cosypose/datasets/datasets_cfg.py b/cosypose/datasets/datasets_cfg.py index 1a2ad27..35c4364 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: From b969fff3be20f32eba4224f1a4aa278e7a2329ae Mon Sep 17 00:00:00 2001 From: Stephen Tyree Date: Mon, 23 Jan 2023 15:42:58 -0600 Subject: [PATCH 3/6] added hope --- cosypose/bop_config.py | 4 ++-- cosypose/datasets/datasets_cfg.py | 6 +++--- cosypose/scripts/run_bop_inference.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cosypose/bop_config.py b/cosypose/bop_config.py index f166182..f8b46bb 100644 --- a/cosypose/bop_config.py +++ b/cosypose/bop_config.py @@ -71,10 +71,10 @@ ) BOP_CONFIG['hope'] = dict( - input_resize=(640, 480), + input_resize=(1920, 1080), urdf_ds_name='hope', obj_ds_name='hope.bop', - train_pbr_ds_name=['hope.pbr'], + # train_pbr_ds_name=[hope.pbr], inference_ds_name=['hope.bop19'], test_ds_name=['hope.bop19'], val_ds_name=['hope.val'], diff --git a/cosypose/datasets/datasets_cfg.py b/cosypose/datasets/datasets_cfg.py index 35c4364..b2bad8b 100644 --- a/cosypose/datasets/datasets_cfg.py +++ b/cosypose/datasets/datasets_cfg.py @@ -123,9 +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 == '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' diff --git a/cosypose/scripts/run_bop_inference.py b/cosypose/scripts/run_bop_inference.py index 6a10177..870a2b3 100644 --- a/cosypose/scripts/run_bop_inference.py +++ b/cosypose/scripts/run_bop_inference.py @@ -245,7 +245,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'] for ds_name in ds_names: this_cfg = deepcopy(cfg) From e038c99537a45fcb64188a384fd654325d866943 Mon Sep 17 00:00:00 2001 From: Stephen Tyree Date: Mon, 23 Jan 2023 15:42:58 -0600 Subject: [PATCH 4/6] added hope to readme --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a92470f..2cb0817 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. From d4a4ed64ab3c7882e7b373b6df7d506fc4019109 Mon Sep 17 00:00:00 2001 From: Stephen Tyree Date: Mon, 23 Jan 2023 15:42:58 -0600 Subject: [PATCH 5/6] undo accidental change --- rclone.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rclone.conf b/rclone.conf index 9530f20..b43d0da 100644 --- a/rclone.conf +++ b/rclone.conf @@ -2,5 +2,5 @@ type = drive scope = drive.readonly root_folder_id = 1JmOYbu1oqN81Dlj2lh6NCAMrC8pEdAtD -token = {"access_token":"ya29.a0AX9GBdVrXEpWAaIPK_hBGt08UObqBHBCHiHH4krxLasnMJTOV2DI6dc8Rq0f3MbC08D2rgHdDYIEmZj79AyDgahwRnupQbe4yNUe4SLZwHlcEz25JBtvT5f_BrWMpHPWHth6gZn7KeNv67FTV_Ic10yEiYn9BtwmswaCgYKATMSAQASFQHUCsbCJf5GvffzaeNsY1UTgc2CTg0169","token_type":"Bearer","refresh_token":"1//03Y__9oDQaadTCgYIARAAGAMSNwF-L9Ir1Ekfa8SGW8WupnLR2QsdRU0Su-QXIWeqAST-mbmtg2OGWB01vblv_GNyQXLjzD9b35A","expiry":"2023-01-20T21:34:50.683578414-06:00"} +token = {"access_token":"ya29.a0AfH6SMC5mptNAOWZ_SZUhCy62ztZ9kqWbgGI8GpwAjACETpPavaMc1VCMfjDYlAXWZSLpAmygg8ppN9rqhsjtc0RI8yWVaVJtvHNfVVyHzJG2afrVuTsRq4czsDpJVJr2XaN19rlKsxp2ftG8BlcaxaujvRyawXT-CtfuA","token_type":"Bearer","refresh_token":"1//03Y__9oDQaadTCgYIARAAGAMSNwF-L9Ir1Ekfa8SGW8WupnLR2QsdRU0Su-QXIWeqAST-mbmtg2OGWB01vblv_GNyQXLjzD9b35A","expiry":"2020-08-16T16:01:06.690594859+02:00"} From 4c6819f4d90d857c6de289b719f2ad5996a994f5 Mon Sep 17 00:00:00 2001 From: Stephen Tyree Date: Tue, 24 Jan 2023 11:25:53 -0600 Subject: [PATCH 6/6] fixed typo in filename --- README.md | 2 +- cosypose/bop_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2cb0817..68c24bc 100644 --- a/README.md +++ b/README.md @@ -576,7 +576,7 @@ where model_id is given by the table below: | 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 | 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 f8b46bb..3ad7fca 100644 --- a/cosypose/bop_config.py +++ b/cosypose/bop_config.py @@ -99,7 +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', + hope='coarse-bop-hope-pbr--225203', ) PBR_REFINER = dict(