diff --git a/.gitignore b/.gitignore index 1628c189..285c0f51 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,4 @@ __pycache__ *.temp *tmp/ *.cpython -experiments/outputs \ No newline at end of file +experiments/outputs diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb0b55ea..ff053908 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: 'cosypose|megapose6d' +exclude: 'cosypose|megapose6d|happypose|experiments' repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 diff --git a/.vscode/settings.json b/.vscode/settings.json index 19055a87..3b4a49c6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,4 +9,4 @@ "python.linting.enabled": true, "python.linting.flake8Enabled": true, "python.linting.mypyEnabled": true, -} \ No newline at end of file +} diff --git a/README.md b/README.md index 1238ec6d..ac7261f6 100644 --- a/README.md +++ b/README.md @@ -45,12 +45,12 @@ Create data dir /somewhere/convenient. The dataset to store are quite large. export MEGAPOSE_DATA_DIR=/somewhere/convenient cd $MEGAPOSE_DATA_DIR wget https://memmo-data.laas.fr/static/examples.tar.xz -tar xf examples.tar.xz +tar xf examples.tar.xz ``` ## 1. Download pre-trained MegaPose pose estimation models Download pose estimation models to $MEGAPOSE_DATA_DIR/megapose-models: - + ``` python -m happypose.toolbox.utils.download --megapose_models ``` @@ -78,7 +78,7 @@ download [barbecue sauce](https://drive.google.com/drive/folders/10BIvhnrKGbNr8E
Cosypose - + All data used (datasets, models, results, ...) are stored in a directory `local_data` at the root of the repository. Create it with `mkdir local_data` or use a symlink if you want the data to be stored at a different place. We provide the utility `cosypose/scripts/download.py` for downloading required data and models. All of the files can also be [downloaded manually](https://drive.google.com/drive/folders/1JmOYbu1oqN81Dlj2lh6NCAMrC8pEdAtD?usp=sharing). ## BOP Datasets @@ -124,15 +124,15 @@ Notes: ```sh python -m happypose.pose_estimators.cosypose.cosypose.scripts.make_ycbv_compat_models ``` - + ## Models for minimal version - + ```sh #ycbv python -m happypose.toolbox.utils.download --cosypose_model=detector-bop-ycbv-pbr--970850 python -m happypose.toolbox.utils.download --cosypose_model=coarse-bop-ycbv-pbr--724183 python -m happypose.toolbox.utils.download --cosypose_model=refiner-bop-ycbv-pbr--604090 - + #tless python -m happypose.toolbox.utils.download --cosypose_model=detector-bop-tless-pbr--873074 python -m happypose.toolbox.utils.download --cosypose_model=coarse-bop-tless-pbr--506801 @@ -148,11 +148,11 @@ The pre-trained models of the single-view pose estimator can be downloaded using # YCB-V Single-view refiner python -m happypose.toolbox.utils.download --cosypose_model=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 +# 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_model=ycbv-refiner-syntonly--596719 -# T-LESS coarse and refiner models +# T-LESS coarse and refiner models python -m happypose.toolbox.utils.download --cosypose_model=tless-coarse--10219 python -m happypose.toolbox.utils.download --cosypose_model=tless-refiner--585928 ``` @@ -182,13 +182,13 @@ Notes: - The Pix2pose detections were extracted using [pix2pose's](https://github.com/kirumang/Pix2Pose) code. We used the detection model from their paper, see [here](https://github.com/kirumang/Pix2Pose#download-pre-trained-weights). For the ViVo detections, their code was slightly modified. The code used to extract detections can be found [here](https://github.com/ylabbe/pix2pose_cosypose).
- +
Megapose ## 1. Download pre-trained pose estimation models Download pose estimation models to $MEGAPOSE_DATA_DIR/megapose-models: - + ``` python -m happypose.toolbox.utils.download --megapose_models ``` diff --git a/configs/code_snapshot/dsgen_deps.yaml b/configs/code_snapshot/dsgen_deps.yaml index 3afefd27..0133309b 100644 --- a/configs/code_snapshot/dsgen_deps.yaml +++ b/configs/code_snapshot/dsgen_deps.yaml @@ -5,4 +5,3 @@ python_packages_dir: - ${oc.env:PROJECTS_DIR}/happypose - ${oc.env:PROJECTS_DIR}/blenderproc - ${oc.env:PROJECTS_DIR}/bop_toolkit_lib - diff --git a/configs/dsgen/default.yaml b/configs/dsgen/default.yaml index 67ae4486..568ba619 100644 --- a/configs/dsgen/default.yaml +++ b/configs/dsgen/default.yaml @@ -1,2 +1,2 @@ defaults: - - base_dsgen \ No newline at end of file + - base_dsgen diff --git a/configs/dsgen/fastrun.yaml b/configs/dsgen/fastrun.yaml index ac7c7367..67430e19 100644 --- a/configs/dsgen/fastrun.yaml +++ b/configs/dsgen/fastrun.yaml @@ -2,4 +2,4 @@ defaults: - default few: True verbose: True -debug: True \ No newline at end of file +debug: True diff --git a/configs/dsgen/gso_1M.yaml b/configs/dsgen/gso_1M.yaml index a34ffc20..3afef1cd 100644 --- a/configs/dsgen/gso_1M.yaml +++ b/configs/dsgen/gso_1M.yaml @@ -1,3 +1,3 @@ defaults: - default -dataset_id: gso_1M \ No newline at end of file +dataset_id: gso_1M diff --git a/configs/job_env/jz_yann.yaml b/configs/job_env/jz_yann.yaml index ca799a1c..7a328d08 100644 --- a/configs/job_env/jz_yann.yaml +++ b/configs/job_env/jz_yann.yaml @@ -5,4 +5,4 @@ env: HP_DATA_DIR: $WORK/data/happypose MEGAPOSE_DATA_DIR: $WORK/data/megapose BLENDER_INSTALL_DIR: $WORK/blender/blender-2.93.0-linux-x64 - BLENDERPROC_DIR: $WORK/projects/blenderproc \ No newline at end of file + BLENDERPROC_DIR: $WORK/projects/blenderproc diff --git a/configs/job_env/lda.yaml b/configs/job_env/lda.yaml index 2c39a227..66706f34 100644 --- a/configs/job_env/lda.yaml +++ b/configs/job_env/lda.yaml @@ -5,4 +5,4 @@ env: HP_DATA_DIR: /home/ylabbe/data/happypose MEGAPOSE_DATA_DIR: /home/ylabbe/data/megapose-private BLENDER_INSTALL_DIR: $HOME/blenderproc/blender-2.93.88-linux-x64 - BLENDER_PROC_DIR: /home/ylabbe/projects/blenderproc \ No newline at end of file + BLENDER_PROC_DIR: /home/ylabbe/projects/blenderproc diff --git a/configs/local_job/single_gpu.yaml b/configs/local_job/single_gpu.yaml index 6386e9e0..b67a42f1 100644 --- a/configs/local_job/single_gpu.yaml +++ b/configs/local_job/single_gpu.yaml @@ -2,4 +2,4 @@ defaults: - base_local_job nodes: 1 tasks_per_node: 1 -gpus_per_node: 1 \ No newline at end of file +gpus_per_node: 1 diff --git a/configs/local_node/lda.yaml b/configs/local_node/lda.yaml index 34d0eaf6..0b04d3a2 100644 --- a/configs/local_node/lda.yaml +++ b/configs/local_node/lda.yaml @@ -3,4 +3,4 @@ defaults: gpus_per_node: 1 mem_per_gpu: '8GB' cpus_per_gpu: 12 -mem_per_cpu: '2.7GB' \ No newline at end of file +mem_per_cpu: '2.7GB' diff --git a/configs/run_ds_postproc/default.yaml b/configs/run_ds_postproc/default.yaml index 3b6910b3..aa419664 100644 --- a/configs/run_ds_postproc/default.yaml +++ b/configs/run_ds_postproc/default.yaml @@ -16,8 +16,8 @@ runner: cpus_per_task: 1 hydra: - run: + run: dir: ${oc.env:HP_DATA_DIR}/hydra_outputs/${now:%Y-%m-%d}/${now:%H-%M-%S} n_jobs: 128 -ds_dir: ${oc.env:HP_DATA_DIR}/blender_pbr_datasets/gso_1M \ No newline at end of file +ds_dir: ${oc.env:HP_DATA_DIR}/blender_pbr_datasets/gso_1M diff --git a/configs/run_dsgen/default.yaml b/configs/run_dsgen/default.yaml index ce8ee19d..19d65cdc 100644 --- a/configs/run_dsgen/default.yaml +++ b/configs/run_dsgen/default.yaml @@ -20,5 +20,5 @@ runner: cpus_per_task: 1 hydra: - run: - dir: ${oc.env:HP_DATA_DIR}/hydra_outputs/${now:%Y-%m-%d}/${now:%H-%M-%S} \ No newline at end of file + run: + dir: ${oc.env:HP_DATA_DIR}/hydra_outputs/${now:%Y-%m-%d}/${now:%H-%M-%S} diff --git a/configs/run_dsgen/fastrun.yaml b/configs/run_dsgen/fastrun.yaml index 3e0d22ce..1aa887d2 100644 --- a/configs/run_dsgen/fastrun.yaml +++ b/configs/run_dsgen/fastrun.yaml @@ -2,8 +2,8 @@ start_chunk: 0 n_jobs: 4 n_chunks: 4 -ds: +ds: debug: True verbose: True overwrite: True - few: True \ No newline at end of file + few: True diff --git a/configs/run_dsgen/gso_1M.yaml b/configs/run_dsgen/gso_1M.yaml index 3a5fe8b7..4ff2e19e 100644 --- a/configs/run_dsgen/gso_1M.yaml +++ b/configs/run_dsgen/gso_1M.yaml @@ -3,4 +3,4 @@ defaults: - override /dsgen@ds: gso_1M n_jobs: 128 -n_chunks: 25000 \ No newline at end of file +n_chunks: 25000 diff --git a/configs/run_dsgen/shapenet_1M.yaml b/configs/run_dsgen/shapenet_1M.yaml index 435351da..546e1872 100644 --- a/configs/run_dsgen/shapenet_1M.yaml +++ b/configs/run_dsgen/shapenet_1M.yaml @@ -3,4 +3,4 @@ defaults: - override /dsgen@ds: shapenet_1M n_jobs: 350 -n_chunks: 50000 \ No newline at end of file +n_chunks: 50000 diff --git a/configs/runner/yann_sgpu.yaml b/configs/runner/yann_sgpu.yaml index 26786b8f..a92b0adf 100644 --- a/configs/runner/yann_sgpu.yaml +++ b/configs/runner/yann_sgpu.yaml @@ -7,9 +7,9 @@ defaults: - yann - single_gpu - jz - - /job_env: + - /job_env: - happypose - lda - _self_ -log_dir: ${oc.env:HP_DATA_DIR}/submitit_logs \ No newline at end of file +log_dir: ${oc.env:HP_DATA_DIR}/submitit_logs diff --git a/configs/slurm_job/jz.yaml b/configs/slurm_job/jz.yaml index 83cebb06..697f9ff8 100644 --- a/configs/slurm_job/jz.yaml +++ b/configs/slurm_job/jz.yaml @@ -4,4 +4,4 @@ defaults: qos: 'qos_gpu-t3' time: '20:00:00' additional_parameters: - hint: nomultithread \ No newline at end of file + hint: nomultithread diff --git a/configs/slurm_job/single_gpu.yaml b/configs/slurm_job/single_gpu.yaml index 007c9d06..8e82d1a2 100644 --- a/configs/slurm_job/single_gpu.yaml +++ b/configs/slurm_job/single_gpu.yaml @@ -3,4 +3,4 @@ defaults: nodes: 1 tasks_per_node: 1 -gpus_per_node: 1 \ No newline at end of file +gpus_per_node: 1 diff --git a/configs/slurm_job/yann.yaml b/configs/slurm_job/yann.yaml index 79cac88e..68387641 100644 --- a/configs/slurm_job/yann.yaml +++ b/configs/slurm_job/yann.yaml @@ -1,4 +1,4 @@ defaults: - base_slurm_job -account: 'vuw@v100' \ No newline at end of file +account: 'vuw@v100' diff --git a/configs/slurm_queue/gpu_p2.yaml b/configs/slurm_queue/gpu_p2.yaml index 47796384..b9fa99c6 100644 --- a/configs/slurm_queue/gpu_p2.yaml +++ b/configs/slurm_queue/gpu_p2.yaml @@ -4,4 +4,4 @@ partition: "gpu_p2" gpus_per_node: 8 cpus_per_gpu: 3 mem_per_gpu: '32GB' -mem_per_cpu: ??? \ No newline at end of file +mem_per_cpu: ??? diff --git a/configs/slurm_queue/v100.yaml b/configs/slurm_queue/v100.yaml index 2993db9c..06d0d8f9 100644 --- a/configs/slurm_queue/v100.yaml +++ b/configs/slurm_queue/v100.yaml @@ -4,4 +4,4 @@ partition: "gpu_p13" gpus_per_node: 4 cpus_per_gpu: 10 mem_per_gpu: '32GB' -mem_per_cpu: '10GB' \ No newline at end of file +mem_per_cpu: '10GB' diff --git a/configs/snapshot_ignore.txt b/configs/snapshot_ignore.txt index 834b22c3..b3131c8b 100644 --- a/configs/snapshot_ignore.txt +++ b/configs/snapshot_ignore.txt @@ -23,4 +23,4 @@ blenderproc/scripts/ blenderproc/images/ my-notebooks/*.json colors.json -*.ttf \ No newline at end of file +*.ttf diff --git a/environment.yml b/environment.yml index dd8fec7f..7f509a86 100644 --- a/environment.yml +++ b/environment.yml @@ -55,7 +55,7 @@ dependencies: - selenium - omegaconf - simplejson - - line_profiler + - line_profiler - opencv-python - torchnet - tqdm @@ -63,24 +63,24 @@ dependencies: - transforms3d - panda3d - joblib - - xarray + - xarray - pandas - matplotlib - bokeh - - plyfile - - trimesh - - ipdb + - plyfile + - trimesh + - ipdb - panda3d-gltf - colorama - pyyaml - ipykernel - scipy - pypng - - h5py + - h5py - seaborn - - kornia - - pyarrow - - dt_apriltags + - kornia + - pyarrow + - dt_apriltags - open3d - structlog - imageio @@ -88,6 +88,6 @@ dependencies: - pyyaml - psutil - webdataset - - opencv-contrib-python - - roma - - torchgeometry \ No newline at end of file + - opencv-contrib-python + - roma + - torchgeometry diff --git a/pyproject.toml b/pyproject.toml index e62c5774..487b0b0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ pin = "^2.6.17" pybullet = {optional = true, version = "^3.2.5"} python = "^3.8" - [tool.poetry.extras] render = ["panda3d", "pybullet"] diff --git a/rclone.conf b/rclone.conf index b914a7bd..5fd5c5f7 100644 --- a/rclone.conf +++ b/rclone.conf @@ -1,4 +1,3 @@ [happypose] type = http url = https://www.paris.inria.fr/archive_ylabbeprojectsdata/ -