From b43532373b5cbe95ccf96a21a7de502c6e351428 Mon Sep 17 00:00:00 2001 From: MedericFourmy Date: Tue, 17 Oct 2023 11:22:45 -0400 Subject: [PATCH] Remove useless bop deps in megapose --- .gitignore | 1 + .gitmodules | 6 ---- README.md | 35 +++++++++++-------- .../cosypose/deps/bop_toolkit_challenge | 1 - .../cosypose/deps/bop_toolkit_cosypose | 1 - 5 files changed, 22 insertions(+), 22 deletions(-) delete mode 160000 happypose/pose_estimators/cosypose/deps/bop_toolkit_challenge delete mode 160000 happypose/pose_estimators/cosypose/deps/bop_toolkit_cosypose diff --git a/.gitignore b/.gitignore index 4a401c3c..f00bbbb7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ __pycache__ *.cpython experiments/outputs /book +happypose/pose_estimators/cosypose/build/ diff --git a/.gitmodules b/.gitmodules index 699a737e..2cc4d599 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "happypose/pose_estimators/cosypose/deps/bop_toolkit_challenge"] - path = happypose/pose_estimators/cosypose/deps/bop_toolkit_challenge - url = https://github.com/ylabbe/bop_toolkit_challenge20.git -[submodule "happypose/pose_estimators/cosypose/deps/bop_toolkit_cosypose"] - path = happypose/pose_estimators/cosypose/deps/bop_toolkit_cosypose - url = https://github.com/ylabbe/bop_toolkit_cosypose.git [submodule "happypose/pose_estimators/cosypose/deps/job-runner"] path = happypose/pose_estimators/cosypose/deps/job-runner url = https://github.com/ylabbe/job-runner.git diff --git a/README.md b/README.md index 088e8282..a652067a 100644 --- a/README.md +++ b/README.md @@ -26,15 +26,6 @@ cd ../../.. pip install -e . ``` -Installation of bop_toolkit : - -``` -conda activate happypose -cd happypose/pose_estimators/megapose/deps/bop_toolkit_challenge/ -# Remove all versions enforcing on requirements.txt -pip install -r requirements.txt -e . -``` - # Create data directory @@ -45,11 +36,21 @@ export HAPPYPOSE_DATA_DIR=/somewhere/convenient # Configuration for the evaluation -If you plan on evaluating CosyPose and Megapose, you need to modify the following lines in `bop_toolkit_lib/config.py`, replace +Installation of bop_toolkit : ``` -######## Basic ######## +conda activate happypose +cd happypose/deps/bop_toolkit_challenge/ +# Remove all versions enforcing on requirements.txt +pip install -r requirements.txt -e . +``` +If you plan on evaluating CosyPose and Megapose, you need to modify the paths to data directories used by the bop_toolkit. +A simple solution is to create subfolders in `HAPPYPOSE_DATA_DIR`. +This is done by modifying following lines in `deps/bop_toolkit_challenge/bop_toolkit_lib/config.py`, replace + +``` +######## Basic ######## # Folder with the BOP datasets. if 'BOP_PATH' in os.environ: @@ -69,10 +70,16 @@ with ``` ######## Basic ######## +HAPPYPOSE_DATA_DIR = os.environ['HAPPYPOSE_DATA_DIR'] + # Folder with the BOP datasets. -datasets_path = str(os.environ['BOP_DATASETS_PATH']) -results_path = str(os.environ['BOP_RESULTS_PATH']) -eval_path = str(os.environ['BOP_EVAL_PATH']) +datasets_path = os.path.join(HAPPYPOSE_DATA_DIR, 'bop_datasets') + +# Folder with pose results to be evaluated. +results_path = os.path.join(HAPPYPOSE_DATA_DIR, 'results') + +# Folder for the calculated pose errors and performance scores. +eval_path = os.path.join(HAPPYPOSE_DATA_DIR, 'bop_eval_outputs') ``` You will also need to install [TEASER++](https://github.com/MIT-SPARK/TEASER-plusplus) if you want to use the depth for MegaPose. To do so, please run the following commands to install it : diff --git a/happypose/pose_estimators/cosypose/deps/bop_toolkit_challenge b/happypose/pose_estimators/cosypose/deps/bop_toolkit_challenge deleted file mode 160000 index f114991b..00000000 --- a/happypose/pose_estimators/cosypose/deps/bop_toolkit_challenge +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f114991b3eea186184127cddfe6a10e2d640e656 diff --git a/happypose/pose_estimators/cosypose/deps/bop_toolkit_cosypose b/happypose/pose_estimators/cosypose/deps/bop_toolkit_cosypose deleted file mode 160000 index b1308103..00000000 --- a/happypose/pose_estimators/cosypose/deps/bop_toolkit_cosypose +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b1308103c1e53733d8bbf9ceba2e68fa0b735042