Skip to content

Commit

Permalink
update downloads docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Oct 23, 2023
1 parent 2d769da commit bdccdf8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/conda-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ jobs:
- name: Download pre-trained models required for tests
run: |
mkdir local_data
python -m happypose.toolbox.utils.download \
--cosypose_models=detector-bop-ycbv-pbr--970850 \
--cosypose_models=coarse-bop-ycbv-pbr--724183 \
--cosypose_models=refiner-bop-ycbv-pbr--604090 \
--megapose_models
python -m happypose.toolbox.utils.download --megapose_models --cosypose_models
detector-bop-ycbv-pbr--970850 \
coarse-bop-ycbv-pbr--724183 \
refiner-bop-ycbv-pbr--604090
cd tests/data
git clone https://github.com/petrikvladimir/happypose_test_data.git crackers_example
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/poetry-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ jobs:
- name: Download pre-trained models required for tests
run: |
mkdir local_data
poetry run python -m happypose.toolbox.utils.download \
--cosypose_models=detector-bop-ycbv-pbr--970850 \
--cosypose_models=coarse-bop-ycbv-pbr--724183 \
--cosypose_models=refiner-bop-ycbv-pbr--604090 \
--megapose_models
poetry run python -m happypose.toolbox.utils.download --megapose_models --cosypose_models \
detector-bop-ycbv-pbr--970850 \
coarse-bop-ycbv-pbr--724183 \
refiner-bop-ycbv-pbr--604090
cd tests/data
git clone https://github.com/petrikvladimir/happypose_test_data.git crackers_example
Expand Down
36 changes: 17 additions & 19 deletions docs/book/cosypose/download_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@ All data used (datasets, models, results, ...) are stored in a directory `$HAPPY
For both T-LESS and YCB-Video, we use the datasets in the [BOP format](https://bop.felk.cvut.cz/datasets/). If you already have them on your disk, place them in `$HAPPYPOSE_DATA_DIR/bop_datasets`. Alternatively, you can download it using :

```sh
python -m happypose.toolbox.utils.download --bop_dataset=ycbv
python -m happypose.toolbox.utils.download --bop_dataset=tless
python -m happypose.toolbox.utils.download --bop_dataset ycbv tless
```

Additional files that contain information about the datasets used to fairly compare with prior works on both datasets.

```sh
python -m happypose.toolbox.utils.download --bop_extra_files=ycbv
python -m happypose.toolbox.utils.download --bop_extra_files=tless
python -m happypose.toolbox.utils.download --bop_extra_files ycbv tless
```

We use [pybullet](https://pybullet.org/wordpress/) for rendering images which requires object models to be provided in the URDF format. We provide converted URDF files, they can be downloaded using:

```sh
python -m happypose.toolbox.utils.download --urdf_models=ycbv
python -m happypose.toolbox.utils.download --urdf_models=tless.cad
python -m happypose.toolbox.utils.download --urdf_models ycbv tless.cad
```

In the BOP format, the YCB objects `002_master_chef_can` and `040_large_marker` are considered symmetric, but not by previous works such as PoseCNN, PVNet and DeepIM. To ensure a fair comparison (using ADD instead of ADD-S for ADD-(S) for these objects), these objects must *not* be considered symmetric in the evaluation. To keep the uniformity of the models format, we generate a set of YCB objects `models_bop-compat_eval` that can be used to fairly compare our approach against previous works. You can download them directly:
Expand Down Expand Up @@ -51,14 +48,16 @@ Notes:

```sh
#ycbv
python -m happypose.toolbox.utils.download --cosypose_models=detector-bop-ycbv-pbr--970850
python -m happypose.toolbox.utils.download --cosypose_models=coarse-bop-ycbv-pbr--724183
python -m happypose.toolbox.utils.download --cosypose_models=refiner-bop-ycbv-pbr--604090
python -m happypose.toolbox.utils.download --cosypose_models \
detector-bop-ycbv-pbr--970850 \
coarse-bop-ycbv-pbr--724183 \
refiner-bop-ycbv-pbr--604090

#tless
python -m happypose.toolbox.utils.download --cosypose_models=detector-bop-tless-pbr--873074
python -m happypose.toolbox.utils.download --cosypose_models=coarse-bop-tless-pbr--506801
python -m happypose.toolbox.utils.download --cosypose_models=refiner-bop-tless-pbr--233420
python -m happypose.toolbox.utils.download --cosypose_models \
detector-bop-tless-pbr--873074 \
coarse-bop-tless-pbr--506801 \
refiner-bop-tless-pbr--233420
```

## Pre-trained models for single-view estimator
Expand All @@ -68,32 +67,31 @@ The pre-trained models of the single-view pose estimator can be downloaded using

```sh
# YCB-V Single-view refiner
python -m happypose.toolbox.utils.download --cosypose_models=ycbv-refiner-finetune--251020
python -m happypose.toolbox.utils.download --cosypose_models ycbv-refiner-finetune--251020

# YCB-V Single-view refiner trained on synthetic data only
# Only download this if you are interested in retraining the above model
python -m happypose.toolbox.utils.download --cosypose_models=ycbv-refiner-syntonly--596719
python -m happypose.toolbox.utils.download --cosypose_models ycbv-refiner-syntonly--596719

# T-LESS coarse and refiner models
python -m happypose.toolbox.utils.download --cosypose_models=tless-coarse--10219
python -m happypose.toolbox.utils.download --cosypose_models=tless-refiner--585928
python -m happypose.toolbox.utils.download --cosypose_models tless-coarse--10219 tless-refiner--585928
```

## 2D detections

To ensure a fair comparison with prior works on both datasets, we use the same detections as DeepIM (from PoseCNN) on YCB-Video and the same as Pix2pose (from a RetinaNet model) on T-LESS. Download the saved 2D detections for both datasets using

```sh
python -m happypose.toolbox.utils.download --detections=ycbv_posecnn
python -m happypose.toolbox.utils.download --detections ycbv_posecnn

# SiSo detections: 1 detection with highest per score per class per image on all images
# Available for each image of the T-LESS dataset (primesense sensor)
# These are the same detections as used in Pix2pose's experiments
python -m happypose.toolbox.utils.download --detections=tless_pix2pose_retinanet_siso_top1
python -m happypose.toolbox.utils.download --detections tless_pix2pose_retinanet_siso_top1

# ViVo detections: All detections for a subset of 1000 images of T-LESS.
# Used in our multi-view experiments.
python -m happypose.toolbox.utils.download --detections=tless_pix2pose_retinanet_vivo_all
python -m happypose.toolbox.utils.download --detections tless_pix2pose_retinanet_vivo_all
```

If you are interested in re-training a detector, please see the BOP 2020 section.
Expand Down
7 changes: 4 additions & 3 deletions docs/book/cosypose/inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Here are provided the minimal commands you have to run in order to run the infer

```sh
#ycbv
python -m happypose.toolbox.utils.download --cosypose_models=detector-bop-ycbv-pbr--970850
python -m happypose.toolbox.utils.download --cosypose_models=coarse-bop-ycbv-pbr--724183
python -m happypose.toolbox.utils.download --cosypose_models=refiner-bop-ycbv-pbr--604090
python -m happypose.toolbox.utils.download --cosypose_models \
detector-bop-ycbv-pbr--970850 \
coarse-bop-ycbv-pbr--724183 \
refiner-bop-ycbv-pbr--604090
```

## 2. Download YCB-V Dataset
Expand Down

0 comments on commit bdccdf8

Please sign in to comment.