Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ Notes:
<details>
<summary>Click for details...</summary>

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.
Expand All @@ -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

Expand Down Expand Up @@ -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.

Expand Down
14 changes: 13 additions & 1 deletion cosypose/bop_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down
15 changes: 15 additions & 0 deletions cosypose/datasets/datasets_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -119,13 +123,20 @@ 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'
ds = BOPDataset(ds_dir, split='val_primesense')
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')
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions cosypose/scripts/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
'tudl': {
'splits': ['test_all', 'train_real']
},

'hope': {
'splits': ['val', 'test_all']
},
}

BOP_DS_NAMES = list(BOP_DATASETS.keys())
Expand Down
2 changes: 1 addition & 1 deletion cosypose/scripts/run_bop_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand Down